Closed elonlo closed 7 months ago
渠道模型那里,手动加上 gpt-4-turbo
就行了。亲测可用。
另外,”填入渠道支持模型“ 会填入默认写好的模型;能否增加一个选项,获取渠道 v1/models
接口返回的模型,这样项目不需要频繁维护这个模型列表(不过除了 OpenAI 其他API 的更新频率应该不高)。
curl $OPENAI_API_BASE/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-4-turbo",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What'\''s in this image?"
},
{
"type": "image_url",
"image_url": {
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
}
}
]
}
],
"max_tokens": 300
}'
{
"id": "chatcmpl-9DAlsV4hpKvEkdpfxaWLppuhOUa45",
"object": "chat.completion",
"created": 1712926696,
"model": "gpt-4-turbo-2024-04-09",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "This image features a beautiful natural landscape with a wooden boardwalk extending through a lush green meadow. The meadow is flanked by tall grasses and some scattered bushes, possibly hinting at a wetland or marshland environment. The sky above is clear with a few clouds, suggesting a sunny day. This scene is serene, and the boardwalk invites one to walk through and enjoy the tranquil surroundings. The overall picture is vibrant with rich green tones and a sense of peacefulness in a natural setting."
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 1118,
"completion_tokens": 102,
"total_tokens": 1220
},
"system_fingerprint": "fp_d1bac968b4"
}
@RexWzh 这个是有什么用途吗?目前 /v1/models 返回的是令牌所支持的渠道
v1/models 的处理非常好了~ 我指填写渠道时,载入的默认列表。如果每次openai更新模型,都要同步更新该表,可能有点琐碎(开发侧)
点击这个可以直接补齐:
例行检查
问题描述 支持Openai GPT-4 Turbo
复现步骤
预期结果
相关截图