调用ChatGPT API接口一直报错invalid_request_error(Invalid URL (POST /chat/completions)),但是用gpt-3.5-turbo 模型去获取答案又是对的 stackoverflow.com/quest 找到别人的解释发现,一些模型是属于ChatGPT 3的,需要用 v1/completions 接口去获取答案 对于ChatGPT 3.5的模型,则是用v1/chat/completions 接口去获取...
“model”: “gpt-3.5-turbo”,“messages”: [{“role”: “user”, “content”: “Hello!”}] } and still getting {“message”: “Invalid URL (POST /v1/chat/completions)”,“type”: “invalid_request_error”,“param”: null,“code”: null } It does read the json as when I break...
No response PierrunoYTadded thebugSomething isn't workinglabelMar 31, 2023 Hi - this happens because your conversation is likely long. And for GPT-* models, the extension provided the whole history for better accuracy. However, we see the limitations that may bring and we made a change in...
openai.error.InvalidRequestError: This is a chat model and not supported in the v1/completions endpoint. Did you mean to use v1/chat/completions? Hi im new to chat gpt api and im trying to make a chatbot with it. I keep gett...
, "param": null } } JTCorrin commented Aug 13, 2024 add /chat/completions to the OPENAI_API_BASE env var in models.py 👍 1 Author amittos commented Aug 13, 2024 It is now fixed. Thank you. liujiangning30 closed this as completed Aug 14, 2024 ...
错误信息 "this is a chat model and not supported in..." 明确指出了问题的根源:你尝试在不支持聊天模型的环境中使用了聊天模型。 检查OpenAI API的调用代码: 你需要回顾你的代码,特别是与OpenAI API交互的部分。确保你没有在不支持聊天模型的API端点(endpoint)上调用聊天模型。 示例代码(假设你使用的是Pytho...
[root]# curl https://api.openai.com/v1/chat/completions \>-H'Content-Type:application/json' \>-H'Authorization:Bearer OPENAI_API_KEY' \>-d'{"model":"gpt-3.5-turbo","messages":[{"role":"user","content":"Hello!"}]}'{"error":{"message":"Invalid URL (POST /v1/chat/completions...
I am trying to replicate the the add your own data feature for Azure Open AI following the instruction found here: Quickstart: Chat with Azure OpenAI models using your own data import os import openai import dotenv dotenv.load_dotenv() endpoint =…
I've discovered white space characters at the end of API base & key, and at the end of the api-version parameter - a result of copying from the Azure portal and / or the ChatGPT playground. This wasn't obvious until viewing the cURL code snippet in Postman. Deleting these solved ...
const OpenAI = require("openai"); const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY, }); async function main() { const completion = await openai.chat.completions.create({ model: "gpt-3.5-turbo", messages: [ { role: "system", content: "You are a helpful assistant." ...