appleboy / CodeGPT

A CLI written in Go language that writes git commit messages or do a code review brief for you using ChatGPT AI (gpt-4o, gpt-4-turbo, gpt-3.5-turbo model) and automatically installs a git prepare-commit-msg hook.
MIT License
1.27k stars 110 forks source link

codegpt review - context deadline exceeded #160

Closed lee1221ee closed 6 months ago

lee1221ee commented 6 months ago

Thanks to this project for providing excellent AI generation commits.

I can use codegpt commit.

But can't use codegpt preview.

Error message:

❯ codegpt review
Code review your changes using gpt-4-turbo model
We are trying to review code changes
Error: Post "https://api.openai.com/v1/chat/completions": context deadline exceeded

❯ codegpt review
Code review your changes using gpt-4-turbo model
We are trying to review code changes
Error: Post "https://api.openai.com/v1/chat/completions": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

YAML:

git:
  diff_unified: 0
  exclude_list: ""
  template_file: ""
  template_string: ""
openai:
  api_key: "sk-proj-xxxxxxxxxxxx"
  base_url: ""
  max_tokens: 300
  model: "gpt-4-turbo"
  model_name: ""
  org_id: "org-xxxxxxxxxxx"
  provider: openai
  proxy: ""
  socks: ""
  temperature: "1"
  timeout: "10"
output:
  file: ""
  lang: en
appleboy commented 6 months ago

I will take it.

appleboy commented 6 months ago

@lee1221ee update the timeout to 1m using the following command.

codegpt config set openai.timeout 1m