Git Product home page Git Product logo

discourse-chatbot's People

Contributors

fokx avatar jjaffeux avatar marcrez33 avatar merefield avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

discourse-chatbot's Issues

undefined method `dig' for #<HTTParty::Response:0x6f1a8 parsed_response

OpenAIBot: There was a problem, but will retry til limit: undefined method `dig' for #<HTTParty::Response:0x6f1a8 parsed_response="{\"id\":\"chatcmpl-79xtZsNQeICPCXq5BaD2VmlvuHMGx\",\"object\":\"chat.completion\",\"created\":1682609545,\"model\":\"gpt-3.5-turbo-0301\",\"usage\":{\"prompt_tokens\":63,\"completion_tokens\":9,\"total_tokens\":72},\"choices\":[{\"message\":{\"role\":\"assistant\",\"content\":\"Hello! How may I assist you today?\"},\"finish_reason\":\"stop\",\"index\":0}]}\n", @response=#<Net::HTTPOK 200 OK readbody=true>, @headers={"date"=>["Thu, 27 Apr 2023 15:32:27 GMT"], "content-type"=>["text/html; charset=utf-8"], "transfer-encoding"=>["chunked"], "connection"=>["close"], "access-control-allow-origin"=>["*"], "cf-cache-status"=>["DYNAMIC"], "report-to"=>["{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=6rhZAcoOI4QqoiFaKt2%2BjbRfq%2FxsZzjotfzRovBbMFkEXkr9J2BDO6A7smBH6qHCuoMAtk5YZrNSXE7alsL%2B%2FflbggfO2dnuH222Eoyzs9Fsi7UtxLzprdG09SJjQMK9CA%3D%3D\"}],\"group\":\"cf-nel\",\"max_age\":604800}"], "nel"=>["{\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}"], "server"=>["cloudflare"], "cf-ray"=>["7be81e361877b45e-HKG"], "alt-svc"=>["h3=\":443\"; ma=86400, h3-29=\":443\"; ma=86400"]}>
Job exception: undefined method `dig' for #<HTTParty::Response:0x6f1a8 parsed_response="{\"id\":\"chatcmpl-79xtZsNQeICPCXq5BaD2VmlvuHMGx\",\"object\":\"chat.completion\",\"created\":1682609545,\"model\":\"gpt-3.5-turbo-0301\",\"usage\":{\"prompt_tokens\":63,\"completion_tokens\":9,\"total_tokens\":72},\"choices\":[{\"message\":{\"role\":\"assistant\",\"content\":\"Hello! How may I assist you today?\"},\"finish_reason\":\"stop\",\"index\":0}]}\n", @response=#<Net::HTTPOK 200 OK readbody=true>, @headers={"date"=>["Thu, 27 Apr 2023 15:32:27 GMT"], "content-type"=>["text/html; charset=utf-8"], "transfer-encoding"=>["chunked"], "connection"=>["close"], "access-control-allow-origin"=>["*"], "cf-cache-status"=>["DYNAMIC"], "report-to"=>["{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=6rhZAcoOI4QqoiFaKt2%2BjbRfq%2FxsZzjotfzRovBbMFkEXkr9J2BDO6A7smBH6qHCuoMAtk5YZrNSXE7alsL%2B%2FflbggfO2dnuH222Eoyzs9Fsi7UtxLzprdG09SJjQMK9CA%3D%3D\"}],\"group\":\"cf-nel\",\"max_age\":604800}"], "nel"=>["{\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}"], "server"=>["cloudflare"], "cf-ray"=>["7be81e361877b45e-HKG"], "alt-svc"=>["h3=\":443\"; ma=86400, h3-29=\":443\"; ma=86400"]}>

The AIBot only replied: "Sorry, I’m not well right now. Lets talk some other time. Meanwhile, please ask the admin to check the logs, thank you!"

Great repo!! Really interesting!

But there is a new issue that surfaced recently.
We didn't post many threads, only 5 threads.
The first one succeeded in getting correct reply.
But the rest 4 all failed.
The AIBot only replied: "Sorry, I’m not well right now. Lets talk some other time. Meanwhile, please ask the admin to check the logs, thank you!"

Logs:
OpenAIBot: There was a problem: You exceeded your current quota, please check your plan and billing details.

Our API key didn't expire. We only posted 5 threads. Why did we exceed your current quota?
So, how can we proceed?

Can we add a network proxy option?

I often encounter an issue while using the discourse-chatbot plugin, where the bot responds with the message Sorry, I'm not well right now. Let's talk some other time. Meanwhile, please ask the admin to check the logs, thank you! Upon checking the logs, I found several ReadTimeout errors, which may be due to network issues. Additionally, I noticed that the bot's response time varies; sometimes, it responds within seconds, while at other times, it takes several minutes, even though I've been using a ChatGPT premium account API key. Perhaps this issue is also related to the network.

Therefore, can we consider adding a proxy option to the plugin, similar to how we use export http_proxy=http://server.com in the terminal? I have already attempted to configure it in the env section of the discourse's app.yml file, but it appears that the plugin is not utilizing these environment variables. (I did not observe any records of the proxy client accessing the OpenAI Service in the logs).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.