Closed SlightDust closed 12 months ago
https://platform.openai.com/docs/guides/vision
from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
model="gpt-4-vision-preview",
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,
)
print(response.choices[0])
这几个礼拜比较忙,你可以看看隔壁插件有没有,我这边可能要12月才会加吧
那我这几天试着改一下,能用的话pr一个(x)
那我这几天试着改一下,能用的话pr一个(x)
好好好!
done
gpt4-turbo的gpt-4-1106-vision-preview模型应该可以在对话时加入图片了,请求实现图片支持