JZO001 / Forge.OpenAI

OpenAI API client library for .NET. I was developed it for for public use and it is free.
MIT License
37 stars 14 forks source link

Can you please help me with File upload and read from it in assistant? #22

Open TheDevTwister opened 1 month ago

TheDevTwister commented 1 month ago

Hi @JZO001,

my code was working perfectly fine. but now they have decided to work with vector store. my complete scenario is like below.

upload file then create assistant with all details attach this file to current assistant(CreateAssistantFileRequest). (here i was using below code and now its giving false result.) create the thread. create MessageResponse create RunResponse if run response true then get all MessageData from MessagesService.

after all these i was deleting file and assistant in finally block.

so what to do now to fix this?


var createAssistantFileRequest = new CreateAssistantFileRequest()
{
    AssistantId = assistantId,
    FileId = assistantFileId
};

var createAssistantFileResult = await openAi.AssistantFileService.CreateAsync(createAssistantFileRequest, CancellationToken.None);
TheDevTwister commented 3 weeks ago

can anyone please help me? i am stuck.

TheDevTwister commented 2 weeks ago

@JZO001 , can you please help? if this is possible with current code then can you please tell me how to do it?