Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChatGPT source failing API call #397

Open
GilgameshR opened this issue Aug 24, 2024 · 0 comments
Open

ChatGPT source failing API call #397

GilgameshR opened this issue Aug 24, 2024 · 0 comments

Comments

@GilgameshR
Copy link

This was encountered and tested using jidoujisho versions 2.9.0 (preview 1 and 2), and 2.8.9.

• After adding the API key to mediasource, i attempted to start the chat but was met with the following error message:
Request failed or rate limited. Try again shortly or check your usage limits

• Despite verifying the API key, generating a new one, adjusting usage limits, and increasing credit, the issue persisted.

• I then ran the API key through Postman with the required JSON key/value pairs, and it worked fine.

• The API key is in other words fine, and the problem presumably lies either in the data key/value pairs pushed by jidoujisho, or i guess potentially the address where the data is being sent is outdated.

Heres what i ran when verifying through Postman:

https://api.openai.com/v1/chat/completions

Authorization: Bearer OPENAI_API_KEY 
/* specifically has to be project key, not user key due to additional authentication requirements with the latter. */

{ "model": "gpt-4o-mini", 
"messages": [ {
 "role": "system", 
"content": "Test" },
 { "role": "user", 
"content": "Write a short paragraph." } ] }

Note: A lazy and more permanent solution to this problem would be to add an input box for JSON which you fill once at the same time as adding the key. That way any arbitrary changes to the API can be resolved immediately by looking at the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant