curl https://api.openai.com/v1/completions -H "Content-Type: application/json" -H "Authorization: Bearer $OPENAI_API_KEY" -d '{ "model": "text-davinci-003", "prompt": "Say this is a test", "max_tokens": 7, "temperature": 0 }'
curl https://api.openai.com/v1/completions -H "Content-Type: application/json" -H "Authorization: Bearer $OPENAI_API_KEY" -d '{ "model": "text-davinci-003", "prompt": "Say this is a test", "max_tokens": 7, "temperature": 0 }'
So my api key is valid. But something in chatblade or the python packages it depends on trashes the input I provide, and replaces it with an email address of mine. Sounds weird, but is apparently true.
An other option is that you passed your email as a parameter mistakingly (which takes precedence over the env variable)
But the code is really pretty simple. https://github.com/npiv/chatblade/blob/4ce28739ca7ada1611029...
I even replaced get_openai_key(params) with a hardcoded
return "sk-redacted"
and still no luck. I guess the bug must be in the openai python package, but I cant find it either. However, rest assured I am not providing this email anywhere manually...> If no authentication method is given with the auth argument, Requests will attempt to get the authentication credentials for the URL’s hostname from the user’s netrc file. The netrc file overrides raw HTTP authentication headers set with headers.
Source: https://docs.python-requests.org/en/latest/user/authenticati...