gpt4-pdf-chatbot-langchain icon indicating copy to clipboard operation
gpt4-pdf-chatbot-langchain copied to clipboard

please teach us to deploy

Open text2sql opened this issue 2 years ago • 21 comments

Hey @mayooear thank you so much for your incredible work and sharing it with the world. For those of us, who are not very experienced, can you pls share your recommendations with step-by-step how to deploy it on vercel or any other platform? Vercel in my case keeps throwing tantrums. Thank you!

text2sql avatar Mar 26 '23 18:03 text2sql

@TextToSQL you only need to need to connect vercel to your github repo and the env variables. And that's all.

That being said: there's also a problem with the streaming of the answer: it's lost when deployed, and I think we need to convert it to an edge function.

https://vercel.com/templates/svelte/watch-this

louis-sanna-eki avatar Mar 26 '23 19:03 louis-sanna-eki

I keep getting this error when trying to deploy Failed to compile. ./config/pinecone.ts:5:12 Type error: '=' expected. 3 | */ 4 |

5 | import node-fetch; | ^ 6 | 7 | const PINECONE_INDEX_NAME = 'chat-pdf'; 8 | Error: Command "pnpm run build" exited with 1 BUILD_UTILS_SPAWN_1: Command "pnpm run build" exited with 1

text2sql avatar Mar 26 '23 19:03 text2sql

what do you have in environment settings on vercell?

text2sql avatar Mar 26 '23 20:03 text2sql

@TextToSQL the 3 ones shown in .env.example

And there should be no import your config file, see example: https://github.com/mayooear/gpt4-pdf-chatbot-langchain/blob/main/config/pinecone.ts

louis-sanna-perso avatar Mar 26 '23 20:03 louis-sanna-perso

figured it out ., thank you. deployed!

text2sql avatar Mar 26 '23 20:03 text2sql

figured it out ., thank you. deployed!

@louis-sanna-perso thank you for providing guidance.

@TextToSQL can you share your steps towards deployment for future users?

I assume the "streaming" effect isn't working.

mayooear avatar Mar 26 '23 22:03 mayooear

The streaming effect is not working for me either. I need to wait for 3-4 sec and then the whole paragraph appears. Is there any way to fix it for non-technical folks?

text2sql avatar Mar 27 '23 00:03 text2sql

@TextToSQL you have to deploy it on another provider, Fly for instance.

https://twitter.com/mayowaoshin/status/1640128383051767808

louis-sanna-eki avatar Mar 27 '23 01:03 louis-sanna-eki

hey @mayooear thanks for creating this! currently having a trouble with runtime error - after deploying on vercel, it keeps giving me a post 504 error - would the problem be vercel? or is there something wrong with my code Screenshot 2023-03-27 at 12 07 43 PM

danielcwq avatar Mar 27 '23 04:03 danielcwq

hey @mayooear thanks for creating this! currently having a trouble with runtime error - after deploying on vercel, it keeps giving me a post 504 error - would the problem be vercel? or is there something wrong with my code Screenshot 2023-03-27 at 12 07 43 PM

Check your deployment logs on the Vercel dashboard. I suspect it's related to serverless timeout issues.

mayooear avatar Apr 01 '23 13:04 mayooear

TextToSQL

hi dude, i'm also tring to deploy it to vercel, would you like to share how did you make it?

The steps i did are like this but seems no vectors in pinecone.

1, made new project, via third party and paste this link https://github.com/mayooear/gpt4-pdf-chatbot-langchain

2, creat and wait until it's deployed,

3, add openaiapikey/pineconekey,evnironment,indexname as .env.example, in vercel project Environment Variables

4,redeploy the project

then i could talk with it and get response, but the chatbot's answer does not refer to the docs,

it's like this: what is the legal case about? bot answer: Hmm, I'm not sure. The extracted parts of the document provided do not give enough information to determine the overall content of the document. Can you provide more context or a specific section of the document to focus on?

and in pinecone, i could not find any vectors

wish for your kindly help

tiwentichat avatar Apr 02 '23 13:04 tiwentichat

@mayooear I'm also running into the 504 error once deployed on Vercel, have you found a solution?

notflip avatar Apr 02 '23 16:04 notflip

Is there a solution to enable us to deploy this on vercel without upgrading to pro?

AyoCodess avatar Apr 10 '23 11:04 AyoCodess

i deployed on render. worked fine.

text2sql avatar Apr 10 '23 13:04 text2sql

Yes

On Apr 10, 2023, at 11:41 AM, Ayo Daniel Adesanya @.***> wrote:

i deployed on render. worked fine.

Did you use the "web service" option?

— Reply to this email directly, view it on GitHub https://github.com/mayooear/gpt4-pdf-chatbot-langchain/issues/62#issuecomment-1501969134, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6P4S6HJ3MMMV35A47J4VQDXAQSZJANCNFSM6AAAAAAWIK5BJM. You are receiving this because you were mentioned.

text2sql avatar Apr 10 '23 15:04 text2sql

i deployed on render. worked fine. thank you

AyoCodess avatar Apr 10 '23 16:04 AyoCodess

Should be a web service, not a static page

On Apr 10, 2023, at 12:01 PM, Ayo Daniel Adesanya @.***> wrote:

i deployed on render. worked fine.

Im getting page "not found" when it supposedly builds successfully on render. I selected the static website option, can you share your deploy settings? The docs uses yarn commands and that does not work for me.

— Reply to this email directly, view it on GitHub https://github.com/mayooear/gpt4-pdf-chatbot-langchain/issues/62#issuecomment-1501992439, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6P4S6BSMAOXHGJ7GAHB57LXAQVGXANCNFSM6AAAAAAWIK5BJM. You are receiving this because you were mentioned.

text2sql avatar Apr 10 '23 16:04 text2sql

add all the keys to the “Environment” and also add the commands as in the picture 

On Apr 10, 2023, at 12:34 PM, @.*** wrote:

Should be a web service, not a static page

On Apr 10, 2023, at 12:01 PM, Ayo Daniel Adesanya @.***> wrote:

i deployed on render. worked fine.

Im getting page "not found" when it supposedly builds successfully on render. I selected the static website option, can you share your deploy settings? The docs uses yarn commands and that does not work for me.

— Reply to this email directly, view it on GitHub https://github.com/mayooear/gpt4-pdf-chatbot-langchain/issues/62#issuecomment-1501992439, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6P4S6BSMAOXHGJ7GAHB57LXAQVGXANCNFSM6AAAAAAWIK5BJM. You are receiving this because you were mentioned.

text2sql avatar Apr 10 '23 16:04 text2sql

Screenshot 2023-04-10 at 12 36 06 PM

text2sql avatar Apr 10 '23 16:04 text2sql

Thank you, i worked it out in the end but this will help others when it comes to deployment.

AyoCodess avatar Apr 10 '23 18:04 AyoCodess

@TextToSQL I was able to deploy based on your info, thank you. I'm able to ask a question, and I can see that it logs some sort of result, but the answer is just blank. What can I look for? FYI, I trained it with my own data, and I did not find the start command you mentioned above.

2023-04-11 08_38_14-Window

jpjord avatar Apr 11 '23 06:04 jpjord

@texttosql I was able to deploy based on your info, thank you. I'm able to ask a question, and I can see that it logs some sort of result, but the answer is just blank. What can I look for? FYI, I trained it with my own data, and I did not find the start command you mentioned above.

2023-04-11 08_38_14-Window

Make sure you change the modelName located in utils>makechain.ts to gpt-3.5-turbo

This fixed the issue for me as I was getting empty outputs. I don't have access to gpt-4 API yet.

alexndrvega avatar Jul 20 '23 19:07 alexndrvega

Hi, @text2sql! I'm Dosu, and I'm helping the gpt4-pdf-chatbot-langchain team manage their backlog. I wanted to let you know that we are marking this issue as stale.

From what I understand, you were seeking guidance on deploying the text2sql project on platforms like Vercel. You encountered difficulties with Vercel and received instructions from user "louis-sanna-eki" on connecting Vercel to your GitHub repo and setting up environment variables. However, you later resolved your deployment issue and successfully deployed on Render. Other users also encountered deployment issues and received guidance from you and other users. There was also a discussion about the streaming effect not working and potential solutions.

Before we close this issue, we wanted to check if it is still relevant to the latest version of the gpt4-pdf-chatbot-langchain repository. If it is, please let us know by commenting on the issue. Otherwise, feel free to close the issue yourself or it will be automatically closed in 7 days.

Thank you for your contribution to the gpt4-pdf-chatbot-langchain project!

dosubot[bot] avatar Oct 19 '23 16:10 dosubot[bot]