gpt-engineer icon indicating copy to clipboard operation
gpt-engineer copied to clipboard

Could not resolve authentication method.

Open Zhou-Shilin opened this issue 1 year ago • 7 comments

Policy and info

  • Maintainers will close issues that have been stale for 14 days if they contain relevant answers.
  • Adding the label "sweep" will automatically turn the issue into a coded pull request. Works best for mechanical tasks. More info/syntax at: https://docs.sweep.dev/

Expected Behavior

gpte works properly.

Current Behavior

I get an error after I try to run gpte. I am sure that I set the environment variables OPENAI_API_KEY and OPENAI_API_BASE.

>> gpte -m claude-3-5-sonnet-20240620 -i

Error while improving the project: "Could not resolve authentication method. Expected either api_key or auth_token to be set. Or for one of the `X-Api-Key` or `Authorization` headers to be explicitly omitted"

>> echo %OPENAI_API_KEY%
sk-***********************************

>> echo %OPENAI_API_BASE%
https://api.chatanywhere.com.cn

Failure Information

Error message: Error while improving the project: "Could not resolve authentication method. Expected either api_key or auth_token to be set. Or for one of the X-Api-KeyorAuthorization headers to be explicitly omitted"

Failure Logs

debug_log_file.txt

System Information

>> gpte --sysinfo
Usage: gpte [OPTIONS] [PROJECT_PATH]
Try 'gpte -h' for help.
╭─ Error ──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ No such option: --sysinfo                                                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Zhou-Shilin avatar Jul 25 '24 04:07 Zhou-Shilin