Retrieves a thread.
Parameters
thread_id: str
Returns
Retrieve thread
from openai import OpenAI
client = OpenAI()
my_thread = client.beta.threads.retrieve("thread_abc123")
print(my_thread)
{
"id": "thread_abc123",
"object": "thread",
"created_at": 1699014083,
"metadata": {},
"tool_resources": {
"code_interpreter": {
"file_ids": []
}
}
}
Returns Examples
{
"id": "thread_abc123",
"object": "thread",
"created_at": 1699014083,
"metadata": {},
"tool_resources": {
"code_interpreter": {
"file_ids": []
}
}
}