
Click on the button as shown in the image below to read the log. This is probably because you have the free version of chatgpt. You need to add credits to the openai API (as explained earlier in this topic) or use a paying account. You can also configure gemini which does work for free but is less performing.Aragon Burner wrote: Wed Feb 05, 2025 3:00 am I'm getting this when it tries to reply to a thread.. ChatGPT
Code: Select all
{
"url_chat": "https://api.openai.com/v1/chat/completions",
"api_key": "my-api-key",
"model": "gpt-4o",
"temperature": 0.9,
"max_tokens": 4096,
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 0.6,
"prefix": "",
"prefix_tokens": 0,
"max_quote_length": 10
}
You can test your API key using CURL at https://platform.openai.com/docs/quicks ... guage=curlAragon Burner wrote: Sat Feb 08, 2025 9:19 pm The error is telling m,e im using the wrong api key which is really weird as i only have the 1 key generated and I've copied it exactly
I'm trying to do so now... I'm new to CLI kind of lol... But it's asking me to execute the following curl in my terminal...privet.fun wrote: Sun Feb 09, 2025 6:05 pmYou can test your API key using CURL at https://platform.openai.com/docs/quicks ... guage=curlAragon Burner wrote: Sat Feb 08, 2025 9:19 pm The error is telling m,e im using the wrong api key which is really weird as i only have the 1 key generated and I've copied it exactly
curl "https://api.openai.com/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Write a haiku that explains the concept of recursion."
}
]
}'
Code: Select all
[c]...[/c]
[code]...[/code]
Code: Select all
curl "https://api.openai.com/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-4o-mini",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Write a haiku that explains the concept of recursion."
}
]
}'