patterns-ai-core / ecommerce-ai-assistant-demo

An e-commerce AI assistant built with Langchain.rb
MIT License
43 stars 6 forks source link

500 Error #2

Open sergiobayona opened 5 months ago

sergiobayona commented 5 months ago

irb(main):051> assistant.add_message_and_run content: "Andrei Bondarev (andrei@sourcelabs.io) just purchased 5 t-shirts (Y3048509). His address is 667 Madison Avenue, New York, NY 10065", auto_tool_execution: true I, [2024-07-02T11:52:33.787829 #13293] INFO -- : [Langchain.rb] [Langchain::Assistant]: Sending a call to Langchain::LLM::OpenAI I, [2024-07-02T11:52:35.626201 #13293] INFO -- : [Langchain.rb] [Langchain::Tool::CustomerManagement]: [ 👤 ] Looking up Customer record for andrei@sourcelabs.io I, [2024-07-02T11:52:35.626912 #13293] INFO -- : [Langchain.rb] [Langchain::Assistant]: Sending a call to Langchain::LLM::OpenAI I, [2024-07-02T11:52:37.091724 #13293] INFO -- : [Langchain.rb] [Langchain::Tool::InventoryManagement]: [ 📋 ] Looking up Product SKU: Y3048509 I, [2024-07-02T11:52:37.092688 #13293] INFO -- : [Langchain.rb] [Langchain::Assistant]: Sending a call to Langchain::LLM::OpenAI OpenAI HTTP Error (spotted in ruby-openai 6.5.0): {"error"=>{"message"=>"The server had an error processing your request. Sorry about that! You can retry your request, or contact us through our help center at help.openai.com if you keep seeing this error. (Please include the request ID req_21bec007e8364572e6d78946d8258b0a in your email.)", "type"=>"server_error", "param"=>nil, "code"=>nil}} /Users/sergiobayona/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/faraday-2.9.0/lib/faraday/response/raise_error.rb:38:in on_complete': the server responded with status 500 (Faraday::ServerError) from /Users/sergiobayona/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/faraday-2.9.0/lib/faraday/middleware.rb:18:inblock in call' from /Users/sergiobayona/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/faraday-2.9.0/lib/faraday/response.rb:42:in on_complete' from /Users/sergiobayona/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/faraday-2.9.0/lib/faraday/middleware.rb:17:incall' from /Users/sergiobayona/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/ruby-openai-6.5.0/lib/openai.rb:24:in call' from /Users/sergiobayona/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/faraday-2.9.0/lib/faraday/rack_builder.rb:152:inbuild_response' from /Users/sergiobayona/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/faraday-2.9.0/lib/faraday/connection.rb:444:in run_request' from /Users/sergiobayona/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/faraday-2.9.0/lib/faraday/connection.rb:280:inpost' from /Users/sergiobayona/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/ruby-openai-6.5.0/lib/openai/http.rb:22:in json_post' from /Users/sergiobayona/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/ruby-openai-6.5.0/lib/openai/client.rb:26:inchat' from /Users/sergiobayona/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/langchainrb-0.13.3/lib/langchain/llm/openai.rb:133:in block in chat' from /Users/sergiobayona/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/langchainrb-0.13.3/lib/langchain/llm/openai.rb:168:inwith_api_error_handling' from /Users/sergiobayona/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/langchainrb-0.13.3/lib/langchain/llm/openai.rb:132:in chat' from /Users/sergiobayona/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/langchainrb-0.13.3/lib/langchain/assistants/assistant.rb:210:inchat_with_llm' from /Users/sergiobayona/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/langchainrb-0.13.3/lib/langchain/assistants/assistant.rb:236:in run_tools' from /Users/sergiobayona/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/langchainrb-0.13.3/lib/langchain/assistants/assistant.rb:94:inrun' from /Users/sergiobayona/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/langchainrb-0.13.3/lib/langchain/assistants/assistant.rb:140:in `add_message_and_run' ... 2 levels...