Retrieve assistant
Deprecated
client.beta.assistants.retrieve(stringassistantID, RequestOptionsoptions?): Assistant { id, created_at, description, 10 more }
GET/assistants/{assistant_id}
Retrieve assistant
import OpenAI from "openai";
const openai = new OpenAI();
async function main() {
const myAssistant = await openai.beta.assistants.retrieve(
"asst_abc123"
);
console.log(myAssistant);
}
main();{
"id": "asst_abc123",
"object": "assistant",
"created_at": 1699009709,
"name": "HR Helper",
"description": null,
"model": "gpt-4o",
"instructions": "You are an HR bot, and you have access to files to answer employee questions about company policies.",
"tools": [
{
"type": "file_search"
}
],
"metadata": {},
"top_p": 1.0,
"temperature": 1.0,
"response_format": "auto"
}
Returns Examples
{
"id": "asst_abc123",
"object": "assistant",
"created_at": 1699009709,
"name": "HR Helper",
"description": null,
"model": "gpt-4o",
"instructions": "You are an HR bot, and you have access to files to answer employee questions about company policies.",
"tools": [
{
"type": "file_search"
}
],
"metadata": {},
"top_p": 1.0,
"temperature": 1.0,
"response_format": "auto"
}