lifan0127 / ai-research-assistant

Aria is Your AI Research Assistant Powered by GPT Large Language Models
GNU Affero General Public License v3.0
994 stars 55 forks source link

Though I followed the instructions I get one error message after the other when trying to make Aria work in Zotero. What exactly do I have to do now? #140

Open tomderreimer opened 1 day ago

tomderreimer commented 1 day ago

I have created a fresh API key in my openai-account, copied and pasted it into Aria's form in Zotero and got the following error message:

"error": { "message": "Incorrect API key provided: YOUR_OPE_KEY. You can find your API key at https://platform.openai.com/account/api-keys.", "type": "invalid_request_error", "param": null, "code": "invalid_api_key" }, "code": "invalid_api_key", "param": null, "type": "invalid_request_error", "attemptNumber": 1, "retriesLeft": 6, "name": "Error", "message": "401 Incorrect API key provided: YOUR_OPE_KEY. You can find your API key at https://platform.openai.com/account/api-keys.", "stack": "Ae@jar:file:/local-profile-dir>/extensions/aria@apex974.com.xpi!/chrome/content/scripts/aria.js:244:3146\nt@jar:file:/<local-profile-dir/extensions/aria@apex974.com.xpi!/chrome/content/scripts/aria.js:244:3211\ngu@jar:file:/local-profile-dir>/extensions/aria@apex974.com.xpi!/chrome/content/scripts/aria.js:244:4316\ngenerate@jar:file:/<local-profile-dir/extensions/aria@apex974.com.xpi!/chrome/content/scripts/aria.js:244:3677\nmakeStatusError@jar:file:/local-profile-dir>/extensions/aria@apex974.com.xpi!/chrome/content/scripts/aria.js:247:7509\nmakeRequest@jar:file:/<local-profile-dir/extensions/aria@apex974.com.xpi!/chrome/content/scripts/aria.js:247:8402\n" }

I then deleted this API key in my openai account, created a new one, copy and pasted it again to the said form and got a new error message, namely:

"error": { "type": "invalid_request_error", "code": "unknown_url", "message": "Unknown request URL: POST /chat/completions. Please check the URL for typos, or see the docs at https://platform.openai.com/docs/api-reference/.", "param": null }, "code": "unknown_url", "param": null, "type": "invalid_request_error", "attemptNumber": 1, "retriesLeft": 6, "name": "Error", "message": "404 Unknown request URL: POST /chat/completions. Please check the URL for typos, or see the docs at https://platform.openai.com/docs/api-reference/.", "stack": "Ae@jar:file:/local-profile-dir>/extensions/aria@apex974.com.xpi!/chrome/content/scripts/aria.js:244:3146\nt@jar:file:/<local-profile-dir/extensions/aria@apex974.com.xpi!/chrome/content/scripts/aria.js:244:3211\nbu@jar:file:/local-profile-dir>/extensions/aria@apex974.com.xpi!/chrome/content/scripts/aria.js:244:4460\ngenerate@jar:file:/<local-profile-dir/extensions/aria@apex974.com.xpi!/chrome/content/scripts/aria.js:244:3725\nmakeStatusError@jar:file:/local-profile-dir>/extensions/aria@apex974.com.xpi!/chrome/content/scripts/aria.js:247:7509\nmakeRequest@jar:file:/<local-profile-dir/extensions/aria@apex974.com.xpi!/chrome/content/scripts/aria.js:247:8402\n" }

I'm no techie an noone using Zotero should need to be one! I never before had so much trouble connecting an app by an API key. So please let me know, what exactly I need to do to make Aria work seamlessly in Zotero. Thank you very much in advance!

lifan0127 commented 7 hours ago

Hi @tomderreimer, Thanks for reaching out. Please ensure that your API key is exactly the same as copied from OpenAI's website. Also, the OpenAI API Base URL should be the same as shown below:

image