abconlinecourses / chatgpt-xblock

chatgpt-xblock for Open edX
GNU General Public License v3.0
6 stars 8 forks source link

Bug: Error sending question to the server #4

Closed zameel7 closed 8 months ago

zameel7 commented 1 year ago

Tried to submit a question and get an answer but the console shows this Screenshot 2023-05-19 at 11 09 30 AM

Did anyone face the same? Is it that I missed to add something in the installed apps?

zameel7 commented 1 year ago

I have added "chatgptxblock" into lms-env inside ADDL_INSTALLED_APPS. Isn't that where it should be added? @isankadn @DeanJayMathew , could you please look into this?

isankadn commented 1 year ago

@zameel7 What's your Open edX version? And especially the Python version? Could you let me know if you checked the error logs?

zameel7 commented 1 year ago

@isankadn , we are using tutor==15.3.5 (Open edX Olive) and Python version is 3.11 in our bastion and 3.8 I guess in our platform

isankadn commented 1 year ago

@zameel7 then it should work, we have tested it on tutor==15.3.5. How did you install it? using a tutor plugin?

zameel7 commented 1 year ago

@isankadn

zameel7 commented 1 year ago

@zameel7 What's your Open edX version? And especially the Python version? Could you let me know if you checked the error logs?

Currently when I checked the logs, I got to find this that maybe causing the issue:

openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing details.
tutor_local-lms-1  | [pid: 7|app: 0|req: 43/159] 172.18.0.10 () {54 vars in 3554 bytes} [Mon May 22 11:37:22 2023] POST /courses/course-v1:edX+DemoX+Demo_Course/xblock/block-v1:edX+DemoX+Demo_Course+type@chatgptxblock+block@49099150a68349398c17aeec21c96292/handler/get_answer => generated 9912 bytes in 814 msecs (HTTP/1.1 500) 9 headers in 582 bytes (1 switches on core 0)
zameel7 commented 1 year ago

I had been changing the API keys to check if its working and after 2 tries, a new API got it to work

isankadn commented 1 year ago

@zameel7 I see, Thanks for sharing. It seems API key issue.