OpenAI Reactjs assistant issue

const assistant = await openAI.beta.assistants.create(
name= “Doc Analyzer”,
instructions=
“You analyze documents and retrieve key information”,
tools= [{ “type”: “retrieval”}],
model= “gpt-4-turbo”,
);
This is the code im using to create my assistant in react js however my program does not go to the next line of code after this, Im not sure what the problem is. Any insight or help is appreciated.

OpenAI SDKs have been updated to send Assistants beta v2 headers.

That means they do not use deprecated “retrieval”, but instead file_search as a method to enhance knowledge.

You can refer to the changes you’ll need to attach a vector store to an assistant in API documentation.

2 Likes

Thats weird, theres nothing about that in creating assistants page in the documentation. Will simply changing the type to “file_search” fix the problem or do I need to explore the vector store more?

1 Like

There is a migration guide:
https://platform.openai.com/docs/assistants/migration

1 Like