Hey, I’m trying to migrate my v1 assistant to the v2 assistant and use the ChatGPT 4o mini for my application. I can’t figure out exactly how to use the vector store.
Originaly my code was :
export const createAssistant = async ({ name, instructions, fileId }: any) => {
const assistant = await openai.beta.assistants.create({
name: name,
instructions: instructions,
tools: [{ type: “retrieval” }],
model: “gpt-4-turbo”,
file_ids: fileId && [fileId],
});
The V2 code looking like this :
export const createAssistant = async ({ name, instructions, fileId }: any) => {
const assistant = await openai.v2.assistants.create({
name: name,
instructions: instructions,
model: “gpt-4o-mini”,
tools: [{ type: “retrieval” }],
tool_resources: {
file_search: { vector_store_id: },
code_interpreter: { file_ids: fileId && [fileId] : }
}
});
Can someone help me? Even after reading the documentation, I still can’t figure out how this works. (By the way, I’m not a developer, just a learner.)