Retrieve assistant
Deprecated
beta.assistants.retrieve(strassistant_id) -> Assistant
GET/assistants/{assistant_id}
Retrieves an assistant.
Parameters
assistant_id: str
Returns
Retrieve assistant
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("OPENAI_API_KEY"), # This is the default and can be omitted
)
assistant = client.beta.assistants.retrieve(
"assistant_id",
)
print(assistant.id){
"id": "id",
"created_at": 0,
"description": "description",
"instructions": "instructions",
"metadata": {
"foo": "string"
},
"model": "model",
"name": "name",
"object": "assistant",
"tools": [
{
"type": "code_interpreter"
}
],
"response_format": "auto",
"temperature": 1,
"tool_resources": {
"code_interpreter": {
"file_ids": [
"string"
]
},
"file_search": {
"vector_store_ids": [
"string"
]
}
},
"top_p": 1
}Returns Examples
{
"id": "id",
"created_at": 0,
"description": "description",
"instructions": "instructions",
"metadata": {
"foo": "string"
},
"model": "model",
"name": "name",
"object": "assistant",
"tools": [
{
"type": "code_interpreter"
}
],
"response_format": "auto",
"temperature": 1,
"tool_resources": {
"code_interpreter": {
"file_ids": [
"string"
]
},
"file_search": {
"vector_store_ids": [
"string"
]
}
},
"top_p": 1
}