dissorial / doc-chatbot

Document chatbot — multiple files, topics, chat windows and chat history. Powered by GPT.
813 stars 137 forks source link

Failed to ingest - Vercel Deployed #17

Closed Doscadesa closed 1 year ago

Doscadesa commented 1 year ago

I have been trying locally and it has worked smoothly.

But now I have deployed into Vercel and I get this "failed to ingest" for whatever file I try to process. These files has been ingested previously in local so I guess they are not the problem.

Is there any extra step that needs to be performed in Vercel apart from setting all the Env Variables and deploying? I mean, don`t fully understand where goes the updated file while is not ingested.

Thanks for your help in advance.

Failed to ingest

d3287t328 commented 1 year ago

You are going to have to add a lot more detail about what you did.

dissorial commented 1 year ago

I have been trying locally and it has worked smoothly.

But now I have deployed into Vercel and I get this "failed to ingest" for whatever file I try to process. These files has been ingested previously in local so I guess they are not the problem.

Is there any extra step that needs to be performed in Vercel apart from setting all the Env Variables and deploying? I mean, don`t fully understand where goes the updated file while is not ingested.

Thanks for your help in advance.

Failed to ingest

I did the following:

If you did all that and it still doesn't work, try adding a bunch of console logs to the consume.ts file and pasting the messages/output here for more details.

izzanrijal commented 1 year ago

same here. already done what youve said.

here console logs error: [WARN] Importing from 'langchain/document_loaders' is deprecated. Import from eg. 'langchain/document_loaders/fs/text' or 'langchain/document_loaders/web/cheerio' instead. See https://js.langchain.com/docs/getting-started/install#updating-from-0052 for upgrade instructions.

dissorial commented 1 year ago

That's a warning -- this can't be the cause of the error. I just remembered what the error was -- because we're using a bunch of APIs here, certain api routes time out on the free version of vercel. You'll need to host this on the pro vercel version because it supports longer time execution of serverless functions.

GRKdev commented 1 year ago

I can confirm that, to many time outs with free version of vercel.

Doscadesa commented 1 year ago

I have:

ENV was in 'production' the first time I got the failed to ingest.

It is working in short periods (Yesterday I got to upload and ingest some docs and succesfully chat with them). But a couple hours later, Namespaces appear as empty and cannot ingest docs.

Pinecone index is active and have the vectors that i filled yesterday still stored (just checked) but they seem not to be connecting with the Vercel app.

So I don`t know if this is a problem with the Api routing with free pinecone/mongo but certainly, in my case is not because of Vercel since I use pro.

I have cleaned cache/anonym, different connections LAN/Wifi/4-5g with different providers.

Since sometimes it gets to work I assume is not based on a configuration mistake.

dissorial commented 1 year ago

Yeah, sounds like it's configured well and the problem may be elsewhere. At times when it wasn't working, you said that namespaces appeared as empty and you couldn't ingest docs. Namespaces are entirely controlled by pinecone, so if those appeared empty (and they weren't before), there might've been an issue on their side. If the namespaces don't work, then ingesting docs won't either because there's nowhere to store the embeddings.

Doscadesa commented 1 year ago

By the way. I has not happened again during last couple days. I believe it may be related with the whitelisted IPs in Mongo and dynamic routing.

On a static IP whitelisted it has been working smoothly with very few fails at ingesting.