You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit:
- updates the API token validation from using regex match to making a free API call to OpenAI
- updates validation failure messages to be more clear and never assume a key is from prepend.me
It looks like you're using an official API key from OpenAI with proxying enabled. When proxying is enabled you must use an OpenAI API key from prepend.me. Please disable proxy or update your API key before generating a response.
578
+
It looks like you're using an invalid API key. Proxying is enabled, so you must use an OpenAI API key from prepend.me. Please disable proxy or update your API key before generating a response.
579
579
STRING
580
-
elsifproxy_api_key_used && proxy_disabled
580
+
else
581
581
raiseWrongAPITokenUsedError,<<~STRING
582
-
It looks like you're using an unofficial OpenAI API key from prepend.me. When using an unofficial API key you must enable proxy before generating a response. Proxying is currently disabled, please enable it before generating a response.
583
-
584
-
Example:
585
-
586
-
chat = AI::Chat.new
587
-
chat.proxy = true
588
-
chat.user(...)
589
-
chat.generate!
582
+
It looks like you're using an invalid API key. Check to make sure your API key is valid before generating a response.
0 commit comments