sigoden / aichat

All-in-one AI CLI tool featuring Chat-REPL, Shell Assistant, RAG, AI tools & agents, with access to OpenAI, Claude, Gemini, Ollama, Groq, and more.
Apache License 2.0
4.04k stars 275 forks source link

Error: Failed to call chat-completions api #924

Closed zachvalenta closed 5 hours ago

zachvalenta commented 5 hours ago

error msg

$ aichat

Welcome to aichat 0.22.0
Type ".help" for additional help.

> Can you create a taxonomy of mathematical domains and where category theory fits into that taxonomy and why?
Error: Failed to call chat-completions api

Caused by:
    The model `gpt-4o` does not exist or you do not have access to it. (type: invalid_request_error)

screenshots and description

My account has access to gpt-4o:

account

I tried using a user API key:

user API key

as well as a project API key:

project API key

aichat config

$ aichat --info

model                   openai:gpt-4o
max_output_tokens       -
temperature             -
top_p                   -
dry_run                 false
stream                  true
save                    false
keybindings             emacs
wrap                    no
wrap_code               false
function_calling        true
use_tools               -
agent_prelude           -
save_session            -
compress_threshold      4000
rag_reranker_model      -
rag_top_k               4
highlight               true
light_theme             false
env_file                /Users/zvalenta/Library/Application Support/aichat/.env
config_file             /Users/zvalenta/Library/Application Support/aichat/config.yaml
roles_dir               /Users/zvalenta/Library/Application Support/aichat/roles
sessions_dir            /Users/zvalenta/Library/Application Support/aichat/sessions
rags_dir                /Users/zvalenta/Library/Application Support/aichat/rags
functions_dir           /Users/zvalenta/Library/Application Support/aichat/functions
messages_file           /Users/zvalenta/Library/Application Support/aichat/messages.md

env info

neofetch
                 ,xNMM.          --------------------------------
               .OMMMMo           OS: macOS 14.6.1 23G93 arm64
               OMMM0,            Host: MacBookAir10,1
     .;loddo:' loolloddol;.      Kernel: 23.6.0
   cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 34 days, 3 hours, 8 mins
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Packages: 137 (brew)
 XMMMMMMMMMMMMMMMMMMMMMMMX.      Shell: zsh 5.9
;MMMMMMMMMMMMMMMMMMMMMMMM:       Resolution: 1920x1080
:MMMMMMMMMMMMMMMMMMMMMMMM:       DE: Aqua
.MMMMMMMMMMMMMMMMMMMMMMMMX.      WM: Quartz Compositor
 kMMMMMMMMMMMMMMMMMMMMMMMMWd.    WM Theme: Blue (Dark)
 .XMMMMMMMMMMMMMMMMMMMMMMMMMMk   Terminal: iTerm2
  .XMMMMMMMMMMMMMMMMMMMMMMMMK.   Terminal Font: FiraMonoNerdFontComplete-Regular 12
    kMMMMMMMMMMMMMMMMMMMMMMd     CPU: Apple M1
     ;KMMMMMMMWXXWMMMMMMMk.      GPU: Apple M1
       .cooc,.    .,coo:.        Memory: 2951MiB / 16384MiB
sigoden commented 5 hours ago

OpenAI currently requires a Tier 1 account for access to GPT-4o. Please refer to the OpenAI documentation for details on usage tiers. At the time of writing (October 2024), a one-time $5 payment is required to graduate to Tier 1.