Deeptrain-Community / chatnio

🚀 Next Generation AI One-Stop Internationalization Solution. 🚀 下一代 AI 一站式 B/C 端解决方案,支持 OpenAI,Midjourney,Claude,讯飞星火,Stable Diffusion,DALL·E,ChatGLM,通义千问,腾讯混元,360 智脑,百川 AI,火山方舟,新必应,Gemini,Moonshot 等模型,支持对话分享,自定义预设,云端同步,模型市场,支持弹性计费和订阅计划模式,支持图片解析,支持联网搜索,支持模型缓存,丰富美观的后台管理与仪表盘数据统计。
https://chatnio.com
Apache License 2.0
2.7k stars 446 forks source link

API返回内容不对? #220

Closed ersaijun closed 11 hours ago

ersaijun commented 4 days ago

{"auth":true,"method":"POST","status":true}

请问这是什么原因呢?


    "Content-Type": "application/json",
    "Authorization": "sk-f08ajjj7017"
}

data = {
    "max_tokens": 1200,
    "model": "gpt-3.5-turbo",
    "temperature": 0.8,
    "top_p": 1,
    "presence_penalty": 1,
    "messages": [
        {
            "role": "system",
            "content": "You are ChatGPT, a large language model trained by OpenAI. Answer as concisely as possible."
        },
        {
            "role": "user",
            "content": "你是chatGPT多少?"
        }
    ]
}

response = requests.post(url, headers=headers, data=json.dumps(data).encode('utf-8') )
result = response.content.decode("utf-8")

print(result)```

返回的是 {"auth":true,"method":"POST","status":true}
Issues-translate-bot commented 4 days ago

Bot detected the issue body's language is not English, translate it automatically.


Title: Is the content returned by the API incorrect?

{"auth":true,"method":"POST","status":true}

may I know what is the reason?

`headers = { "Content-Type": "application/json", "Authorization": "sk-f08ajjj7017" }

data = { "max_tokens": 1200, "model": "gpt-3.5-turbo", "temperature": 0.8, "top_p": 1, "presence_penalty": 1, "messages": [ { "role": "system", "content": "You are ChatGPT, a large language model trained by OpenAI. Answer as concisely as possible." }, { "role": "user", "content": "How much are you chatGPT?" } ] }

response = requests.post(url, headers=headers, data=json.dumps(data).encode('utf-8') ) result = response.content.decode("utf-8")

print(result)`

What is returned is {"auth":true,"method":"POST","status":true}

zmh-program commented 4 days ago

不是你url是啥呢

Issues-translate-bot commented 4 days ago

Bot detected the issue body's language is not English, translate it automatically.


If not, what is your url?