OpenAI-Assistant-API-Chat icon indicating copy to clipboard operation
OpenAI-Assistant-API-Chat copied to clipboard

A fork with a lot of improvements

Open pavel-lukes opened this issue 1 year ago • 3 comments

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.

pavel-lukes avatar Dec 15 '23 07:12 pavel-lukes

thanks, very nice!

I´m working on a new version , a lot changed recently.

admineral avatar May 07 '24 09:05 admineral

@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" });
    }

EfrosIonelu avatar May 23 '24 09:05 EfrosIonelu

thanks @EfrosIonelu, fixed

pavel-lukes avatar May 29 '24 08:05 pavel-lukes