Forge.OpenAI icon indicating copy to clipboard operation
Forge.OpenAI copied to clipboard

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

Open TejpallPathak opened this issue 1 year ago • 2 comments

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);

TejpallPathak avatar Oct 06 '24 01:10 TejpallPathak

can anyone please help me? i am stuck.

TejpallPathak avatar Oct 09 '24 21:10 TejpallPathak

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

TejpallPathak avatar Oct 22 '24 08:10 TejpallPathak