OpenAI-Assistant-API-Chat
OpenAI-Assistant-API-Chat copied to clipboard
A fork with a lot of improvements
Hello, here is a repo with a number of improvements, including image display, file downloads, loading assistants, communication history, and the ability to share assistants and conversations.
https://github.com/Direct-Technologies-CZ/OpenAI-Assistant-API-Chat
feel free to merge it.
thanks, very nice!
I´m working on a new version , a lot changed recently.
@pavel-lukes i tried to help your branch there is an issue with await openai.beta.threads.messages.create(
attachments was introduced in [email protected]
const attachments = [];
if(fileIds){
for(const fileId of fileIds){
attachments.push({
file_id: fileId,
tools: [
{
type: "file_search" as const
},
{
type: "code_interpreter" as const
}
]
})
}
}
// If input is provided, create a new message in the thread using the OpenAI API
if (input) {
await openai.beta.threads.messages.create(threadId, {
role: "user",
content: input,
attachments:attachments
});
console.log("add_Message successfully");
return NextResponse.json({ message: "Message created successfully" });
}
thanks @EfrosIonelu, fixed