You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:
Hello,
I have a chatflow with Retrieval Agent + Pinecone + File loader. When user uploads file via chat embed, everything works fine. File is uploaded, loaded by File loader, auto upsert to Pinecone and then Agent knows context of file.
However, in my case, I need to upload file to conversation via API first. When I call send message and upload base64, it does not work, Pinecone is not updated and Agent does not know anything about the document. There is no error in response on this API call or in LangSmith. I used the upload code from the Flowise docs example so it should work.
My general goal for context:
In our system, we have a lot of dynamic files and I want to make Agent than can retriavel from specific one file that user select. So I cant use some batch upsert of all files at one or something like that. So my idea is that when user want to "chat with file", embed is loaded and inicialised chat and my component send API call with this file automatically, with file I send same info like sessionId, chatId same as embed component. File is uploaded via API and then user can talk to agent about this specific file freshly loaded in Pinecone. I think there is alternative solution to create some other upsert flow where I can upsert single file with some metadata and then connect it to this my original flow, but Idea with api seems more clean and more compact for me.
I found out, that when user manually upload file via UI then there are 2 api calls in background, first call is 'upsert api' call and then "my" prediction api call. So my problem would be solved if I replicate it, right?
Okey it is also not posible because I found out that internal chatId in embed is generated as:
FlowiseAI/FlowiseChatEmbed:Bot.tsx::260
const [chatId, setChatId] = createSignal(
(props.chatflowConfig?.vars as any)?.customerId ? `${(props.chatflowConfig?.vars as any).customerId.toString()}+${uuidv4()}` : uuidv4(),
);
So there is no way how to get the chatId of the current conversation outside of embed. So I cant programmatically write/upload/upsert anything to this specific conversation via direct API call.
Problem:
Hello,
I have a chatflow with Retrieval Agent + Pinecone + File loader. When user uploads file via chat embed, everything works fine. File is uploaded, loaded by File loader, auto upsert to Pinecone and then Agent knows context of file.
However, in my case, I need to upload file to conversation via API first. When I call send message and upload base64, it does not work, Pinecone is not updated and Agent does not know anything about the document. There is no error in response on this API call or in LangSmith. I used the upload code from the Flowise docs example so it should work.
My general goal for context:
In our system, we have a lot of dynamic files and I want to make Agent than can retriavel from specific one file that user select. So I cant use some batch upsert of all files at one or something like that. So my idea is that when user want to "chat with file", embed is loaded and inicialised chat and my component send API call with this file automatically, with file I send same info like sessionId, chatId same as embed component. File is uploaded via API and then user can talk to agent about this specific file freshly loaded in Pinecone. I think there is alternative solution to create some other upsert flow where I can upsert single file with some metadata and then connect it to this my original flow, but Idea with api seems more clean and more compact for me.
Code
Api call:
React embed:
Expected behavior
Works same as manual user upload.
Screenshots
Setup
Thank you for your time.
The text was updated successfully, but these errors were encountered: