kardolus / chatgpt-cli

ChatGPT CLI is an advanced command-line interface for ChatGPT models via OpenAI and Azure, offering streaming, query mode, and history tracking for seamless, context-aware conversations. Ideal for both users and developers, it provides advanced configuration and easy setup options to ensure a tailored conversational experience with the GPT model.
MIT License
404 stars 28 forks source link

Error: failed to make request #8

Closed ancientcatz closed 1 year ago

ancientcatz commented 1 year ago
~ $ chatgpt -l
Error: failed to make request: Get "https://api.openai.com/v1/models": dial tcp: lookup api.openai.com on [::1]:53: read udp [::1]:46086->[::1]:53: read: connection refused
Usage:
  chatgpt [flags]

Flags:
      --clear-history        Clear all prior conversation context for the current thread
  -c, --config               Display the configuration
  -h, --help                 help for chatgpt
  -i, --interactive          Use interactive mode
  -l, --list-models          List available models
  -q, --query                Use query mode instead of stream mode
      --set-max-tokens int   Set a new default max token size by specifying the max tokens
      --set-model string     Set a new default GPT model by specifying the model name
  -v, --version              Display the version information

failed to make request: Get "https://api.openai.com/v1/models": dial tcp: lookup api.openai.com on [::1]:53: read udp [::1]:46086->[::1]:53: read: connection refused
~ $ chatgpt -c
name: openai
api_key: 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
model: gpt-3.5-turbo
max_tokens: 4096
thread: default
omit_history: false
url: https://api.openai.com
completions_path: /v1/chat/completions
models_path: /v1/models
kardolus commented 1 year ago

Thanks for reaching out.

Are you still having this error? I think it may have been temporary for I am not having this issue. You may want to try hitting the endpoint directly to confirm you can hit it:

curl https://api.openai.com/v1/models -H "Authorization: Bearer $OPENAI_API_KEY" | jq .
kardolus commented 1 year ago

I assume this was resolved, let me know if you continue to have the issue.