fraserxu / book-gpt

Drop a book, start asking question.

Home Page:https://book-gpt.fraserxu.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

something went wrong

johndpope opened this issue · comments

Screenshot 2023-03-06 at 4 42 54 pm

Screenshot 2023-03-06 at 5 29 21 pm

it would help me if this error was actually returned in the client - rather than having to debug app.
'PineconeClient: Error calling upsert: PineconeClient: Error calling upsertRaw: FetchError: The request failed and the interceptors did not return an alternative response '

Happening the same to me with certain PDFs files. Actually, I did a test and divided that big PDF into one-page size PDFs and I tried with each of them and I didn't have any issues. Unfortunately, the description of the Pinecone issue is very poor.

I think there's no attribute message e.message - the error is "e" object.

Thanks @Klaudioz @johndpope do you know a way to reproduce this consistently? Happy to handle this case to provide a better error feedback.

Please send me a PM on Twitter (https://twitter.com/klaudioz) to share the file with you.

Not sure if related as this toast is showing an explicit error message, but I'm experiencing this on my end:

Screenshot 2023-03-07 at 11 43 50

Followed everything exactly as outlined

This error is usually because the the client is not able to find the index created under the account, can you double check the followings:

  • index name is book-gpt
  • index region is in us-west1-gcp (I will make this configurable in the future)

cc @BaileySimrell

thanks for troubleshooting - after updating env to us-east - I finally get upload success callback.
This popped up on my radar - maybe useful
https://github.com/johndpope/PatrikZeros-ChatGPT-API-UI

us-west1-gcp

thanks for troubleshooting - after updating env to us-east - I finally get upload success callback. This popped up on my radar - maybe useful https://github.com/johndpope/PatrikZeros-ChatGPT-API-UI

Is a paid plan required to change the environment? I can't figure out how to do this from the web UI

Nevermind, I see this was hard-coded in. Finally got it working on my end!

To anybody seeing this, just make sure you change the environment to us-east1-gcp or whatever your specific region is in both pages/api/ingest.ts AND pages/api/chat.ts

Great work @fraserxu and thanks for your help troubleshooting as well @johndpope!

@Klaudioz I tried your provided pdf and can reproduce the issue. I was able to get better error response after upgraded the pinecone npm package thanks to @rschwabco 's recent work on better error handling.

[Error: PineconeClient: Error calling upsert: Error: Your request is larger than the maximum supported size - 2MB. Please try to reduce your batch size.]

A short term fix is maybe try to cut the pdf manually by yourself. I'll be looking at if I can do this with code or maybe adjust batch size or something in the next few days.

Thanks for your answer. That limitation sounds weird to me. I've uploaded bigger files in the past without any issues.

I'd really like to know where that limitation is mentioned in Pinecone's documentation.

I'm going to update the Pinecone package right now!!

@johndpope @Klaudioz while we waiting for the issue being clarified by the upstream, I've implemented a simple chunk function which would write the doc in to pinecone with small chunks.

I tested with the PDF @Klaudioz provided and can query fine. Please let me know if it works for you, cheers.