couple of months ago I started working with openAI assistant. I created a simple pdf analyzer. I implemented using Nodejs. (“openai”: “^4.31.0”,). When I created the application it worked fine. But reasonly when i delete the all the node_module and installed. then I’m getting an error saying “rgument type {instructions: string, name: string, model: “gpt-3.5-turbo”, tools: {type: “retrieval”}} is not assignable to parameter type AssistantCreateParams”. Seems like now " tools: [{ type: ‘retrieval’ }]" is not working.
below is the code that used to work.
const assistant = await openai.beta.assistants.create({
name: 'recruiter',
instructions: 'Analyze the give 'file IDs' and return an summary"
tools: [{ type: 'retrieval' }],
model: 'gpt-3.5-turbo',
"file_ids": [
"file-0EtPDfxuS6IUS1AWBY5BNDty",
"file-5wFhHiCae4ygard1O1aKc2jM",
]
});
but the best thing is curl version of above code is working perfectly in potsman. I started installing the latest openAI version also. but still same.
Please note that I’m new for openAI.