liuw5367 / chatgpt-web

ChatGPT web application. ChatGPT 网页应用,支持多对话、海量提示词、PWA、ASR、TTS
https://chatgpt-light.netlify.app
MIT License
122 stars 28 forks source link

需要增加gpt-4o的图片消息 #13

Open land007 opened 3 months ago

land007 commented 3 months ago

作者能增加gpt-4o的图片消息不,消息体如下,请参考其中的image_url

{
    "messages": [
      {
        "role": "system",
        "content": [
          {
            "type": "text",
            "text": "You are an AI assistant that helps people find information."
          }
        ]
      },
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "描述这张图片"
          },
          {
            "type": "image_url",
            "image_url": {
                "url": "data:image/jpeg;base64,/9j/4WEwRXhpZgAATU0AKgAAAA=="
            }
          }
        ]
      },
      {
        "role": "assistant",
        "content": [
          {
            "type": "text",
            "text": "这张图片展示了一个人站在户外的场景中,背景是一条绿树成荫的河流和一座桥。这个人穿着浅色的衣服,手里拿着一瓶蓝色包装的饮料。周围环境显得非常宁静和自然,桥梁和河流的设置也增加了画面的深度感。"
          }
        ]
      },
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "你猜这是哪里"
          }
        ]
      },
      {
        "role": "assistant",
        "content": [
          {
            "type": "text",
            "text": "这张图片的背景显示了一条河流和一座桥梁,周围有绿树成荫的环境,这些元素可能会让人联想到城市中的公园或河道。具体地点无法准确确定,但看起来像是一个城市中的公共休闲场所,可能是某个城市的河畔公园或风景区。"
          }
        ]
      },
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "这个人是哪个国家,有啥特点?"
          }
        ]
      },
      {
        "role": "assistant",
        "content": [
          {
            "type": "text",
            "text": "根据图片的背景和人物的穿着,很难确定这个人具体来自哪个国家。图片中的瓶装饮料上有一些看似中文的文字,这或许暗示照片可能是在一个说中文的地区拍摄的,比如中国、台湾或新加坡等地。特点包括:\n\n1. **环境特点**:背景有河流、绿树和桥梁,环境看起来像是一个公共休闲区或公园。\n2. **人物特点**:这个人穿着浅色的上衣和带有花纹的背带裤,手里拿着一瓶饮料。\n\n这些特点虽然能提供一些线索,但不能确定具体的国家或地点。"
          }
        ]
      },
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "这个人多大年纪"
          }
        ]
      },
      {
        "role": "assistant",
        "content": [
          {
            "type": "text",
            "text": "从图片中的身高和穿着来看,这个人似乎是一个小孩,大概在6到12岁之间。具体年龄很难精确判断,但看起来像是学龄儿童。"
          }
        ]
      },
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "这个孩子是男孩还是女孩"
          }
        ]
      }
    ],
    "temperature": 0.7,
    "top_p": 0.95,
    "frequency_penalty": 0,
    "presence_penalty": 0,
    "max_tokens": 800,
    "stop": null,
    "stream": true
  }
land007 commented 3 months ago

可能是一个多媒体输入框就能解决