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

error when start and send message

Open juicyideas opened this issue 1 year ago • 3 comments

Hi there, when I enter the web page and send a message, I got the error below and did not get any response.

 messages: [                                                                                                                              
    {                                                                                                                                      
      message: 'Hi, what would you like to learn about this legal case?',                                                                  
      type: 'apiMessage'                                                                                                                   
    }                                                                                                                                      
  ],                                                                                                                                       
  history: [],                                                                                                                             
  pendingSourceDocs: []                                                                                                                    
}                                                                                                                                          
Warning: Each child in a list should have a unique "key" prop.                                                                             
                                                                                                                                           
Check the top-level render call using <div>. See https://reactjs.org/link/warning-keys for more information.                               
    at Home (webpack-internal:///./pages/index.tsx:32:78)                                                                                  
    at main                                                                                                                                
    at MyApp (webpack-internal:///./pages/_app.tsx:14:18)                                                                                  
    at StyleRegistry (/home/ubuntu/gpt/gpt4-pdf-chatbot-langchain/node_modules/.pnpm/[email protected][email protected]/node_modules/styled-jsx/dist/index/index.js:449:36)                                                                                                                
    at PathnameContextProviderAdapter (/home/ubuntu/gpt/gpt4-pdf-chatbot-langchain/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/shared/lib/router/adapters.js:60:11)                                                                              
    at AppContainer (/home/ubuntu/gpt/gpt4-pdf-chatbot-langchain/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/render.js:291:29)                                                                                                            
    at AppContainerWithIsomorphicFiberStructure (/home/ubuntu/gpt/gpt4-pdf-chatbot-langchain/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/server/render.js:327:57)                                                                                
    at div                                                                                                                                     at Body (/home/ubuntu/gpt/gpt4-pdf-chatbot-langchain/node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/s
erver/render.js:614:21)                                                                                                                    messageState {                                                                                                                             
  messages: [                                                                                                                                  {                                                                                                                                      
      message: 'Hi, what would you like to learn about this legal case?',                                                                        type: 'apiMessage'                                                                                                                   
    }                                                                                                                                        ],                                                                                                                                       
  history: [],                                                                                                                               pendingSourceDocs: []                                                                                                                    
}                                                                                                                                          wait  - compiling /api/chat (client and server)...                                                                                         
event - compiled successfully in 80 ms (75 modules)                                                                                        us-central1-gcp                                                                                                                            
error [Error: PineconeClient: Error calling query: Error: PineconeClient: Error calling queryRaw: FetchError: The request failed and the interceptors did not return an alternative response]                                                                                         
error [Error: PineconeClient: Error calling query: Error: PineconeClient: Error calling queryRaw: FetchError: The request failed and the interceptors did not return an alternative response]                                                                                         
error [Error: PineconeClient: Error calling query: Error: PineconeClient: Error calling queryRaw: FetchError: The request failed and the interceptors did not return an alternative response] 

juicyideas avatar Mar 23 '23 02:03 juicyideas

Have you followed the steps in the README? Installing dependencies and running the ingest script.

mayooear avatar Mar 23 '23 14:03 mayooear

thx I have solved this by set the index name. To add: could we add the index name in .env file so that users don't need to change the index name in 2 places.

juicyideas avatar Mar 24 '23 01:03 juicyideas

other than config, where else did you change the index name?

MakkiAi avatar Mar 24 '23 08:03 MakkiAi

thx I have solved this by set the index name. To add: could we add the index name in .env file so that users don't need to change the index name in 2 places.

You should only change the index in config, but i can push it to .env instead.

mayooear avatar Mar 26 '23 03:03 mayooear

other than config, where else did you change the index name?

No where else, once it's set there once it applies across entire app.

mayooear avatar Mar 26 '23 03:03 mayooear

I got the same error - it turned out that I haven't got access to gpt-4 and had to adjust utils/makechain.ts docChain to use gpt-3.5-turbo.

 new OpenAIChat({
      temperature: 0,
      modelName: 'gpt-3.5-turbo', //change this to older versions (e.g. gpt-3.5-turbo) if you don't have access to gpt-4
...

florianm avatar Apr 02 '23 11:04 florianm