List ChatKit thread items
ThreadListItemsPage beta().chatkit().threads().listItems(ThreadListItemsParamsparams = ThreadListItemsParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/chatkit/threads/{thread_id}/items
List ChatKit thread items
Parameters
Returns
List ChatKit thread items
package com.openai.example;
import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.beta.chatkit.threads.ThreadListItemsPage;
import com.openai.models.beta.chatkit.threads.ThreadListItemsParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
OpenAIClient client = OpenAIOkHttpClient.fromEnv();
ThreadListItemsPage page = client.beta().chatkit().threads().listItems("cthr_123");
}
}
{
"data": [
{
"id": "cthi_user_001",
"object": "chatkit.thread_item",
"type": "user_message",
"content": [
{
"type": "input_text",
"text": "I need help debugging an onboarding issue."
}
],
"attachments": []
},
{
"id": "cthi_assistant_002",
"object": "chatkit.thread_item",
"type": "assistant_message",
"content": [
{
"type": "output_text",
"text": "Let's start by confirming the workflow version you deployed."
}
]
}
],
"has_more": false,
"object": "list"
}
Returns Examples
{
"data": [
{
"id": "id",
"attachments": [
{
"id": "id",
"mime_type": "mime_type",
"name": "name",
"preview_url": "preview_url",
"type": "image"
}
],
"content": [
{
"text": "text",
"type": "input_text"
}
],
"created_at": 0,
"inference_options": {
"model": "model",
"tool_choice": {
"id": "id"
}
},
"object": "chatkit.thread_item",
"thread_id": "thread_id",
"type": "chatkit.user_message"
}
],
"first_id": "first_id",
"has_more": true,
"last_id": "last_id",
"object": "list"
}