#  对话生成 GPT-4o-search 联网查询

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/chat/completions:
    post:
      summary: ' 对话生成 GPT-4o-search 联网查询'
      deprecated: false
      description: |-
        **冰橙API提供与OPENAI官方的API兼容的接口方式，方便国内开发者进行与OPENAI的CHATGPT的接口对接服务**



        :::highlight purple 📌
        对话生成 GPT4.0 建议采用SSE方式（流式），对话响应速度更快
        :::


        ### token获取方式：
        - 访问公众号《冰橙文化科技》进入菜单冰橙GPT后，访问右上角 / API密钥 可查看 token
        - 访问：https://yewu.bcwhkj.cn 》 个人 》API密钥 》Token令牌 
      tags:
        - 文生文 对话生成
      parameters:
        - name: Content-Type
          in: header
          description: 固定值
          required: false
          example: application/json
          schema:
            type: string
        - name: Authorization
          in: header
          description: token要更换为个人自己的TOKEN
          example: Bearer token
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                messages:
                  type: array
                  items:
                    type: object
                    properties:
                      role:
                        type: string
                        default: user
                        enum:
                          - system
                          - user
                          - assistant
                        x-apifox:
                          enumDescriptions:
                            system: 表示系统默认语境
                            user: 表示用户角色
                            assistant: 表示AI角色
                      content:
                        type: string
                        description: 提问的内容
                    x-apifox-orders:
                      - role
                      - content
                    required:
                      - role
                      - content
                model:
                  type: string
                  description: 模型 GPT4的模型优先推荐：gpt-4-turbo-preview
                  enum:
                    - gpt-4o
                    - gpt-4-turbo-preview
                  x-apifox:
                    enumDescriptions:
                      gpt-4o: 2024-4-9 最新GPT4模型
                      gpt-4-turbo-preview: 新版 当前指向的是gpt-4-0125-preview
                  default: gpt-4o
                stream:
                  type: boolean
                  description: 是否启用流式
                  default: false
                max_tokens:
                  type: integer
                  description: 回复的最大内容长度
                  default: 4000
              required:
                - messages
                - model
              x-apifox-orders:
                - messages
                - model
                - stream
                - max_tokens
            example:
              messages:
                - role: user
                  content: 2025年中国科技界发生了哪些大事?
              model: gpt-4o-search
              max_tokens: 2000
              stream: false
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: string
                description: 需通过正则去匹配需要的内容
              examples:
                '1':
                  summary: 成功示例
                  value:
                    id: chatcmpl-b3e395e7-1cd8-4cd7-8d7a-b9155a23fd51
                    choices:
                      - index: 0
                        message:
                          role: assistant
                          content: >-
                            截至2025年4月28日，中国科技界已发生多项重大事件，以下是其中的几项：


                            1.
                            **神舟二十号载人飞船成功发射**：2025年4月24日17时17分，神舟二十号载人飞船在酒泉卫星发射中心成功发射升空。航天员陈冬、陈中瑞和王杰组成的乘组于当日23时49分与天宫空间站成功对接，开始为期约6个月的在轨驻留任务。
                            ([zh.wikipedia.org](https://zh.wikipedia.org/wiki/%E7%A5%9E%E8%88%9F%E4%BA%8C%E5%8D%81%E5%8F%B7?utm_source=openai))


                            2.
                            **神舟十九号任务圆满完成**：神舟十九号载人飞船于2024年10月30日发射，航天员蔡旭哲、宋令东和王浩泽在轨驻留约6个月，期间完成多项空间科学实验和技术试验。任务预计于2025年4月29日结束，航天员将返回地球。
                            ([zh.wikipedia.org](https://zh.wikipedia.org/wiki/%E7%A5%9E%E8%88%9F%E5%8D%81%E4%B9%9D%E5%8F%B7?utm_source=openai))


                            3.
                            **天问二号小行星探测任务即将启动**：中国计划于2025年5月29日发射天问二号探测器，执行对近地小行星2016
                            HO3的采样返回任务，并随后前往主带彗星P/2013
                            P5（又名311P）进行伴飞探测。整个任务预计持续约10年。
                            ([zh.wikipedia.org](https://zh.wikipedia.org/wiki/%E5%A4%A9%E5%95%8F%E4%BA%8C%E8%99%9F?utm_source=openai))


                            4.
                            **北斗系统升级技术攻关完成在即**：根据《北斗卫星导航系统2035年前发展规划》，中国计划在2025年完成北斗系统升级的技术攻关，为建设更先进、功能更强大的下一代北斗系统奠定基础。
                            ([ourchinastory.com](https://www.ourchinastory.com/cn/13848?utm_source=openai))


                            5.
                            **江门中微子实验项目即将投入运行**：位于地下700米的江门中微子实验（JUNO）探测设备预计于2025年8月完成全部灌注任务，开始正式运行。该项目将用于测量中微子质量顺序、超新星中微子、地球中微子等多项前沿研究。
                            ([ourchinastory.com](https://www.ourchinastory.com/cn/13848?utm_source=openai))


                            这些事件体现了中国在航天、卫星导航和基础科学研究等领域的持续进步和创新。 
                          annotations:
                            - type: url_citation
                              url_citation:
                                end_index: 271
                                start_index: 156
                                title: 神舟二十号
                                url: >-
                                  https://zh.wikipedia.org/wiki/%E7%A5%9E%E8%88%9F%E4%BA%8C%E5%8D%81%E5%8F%B7?utm_source=openai
                            - type: url_citation
                              url_citation:
                                end_index: 500
                                start_index: 385
                                title: 神舟十九号
                                url: >-
                                  https://zh.wikipedia.org/wiki/%E7%A5%9E%E8%88%9F%E5%8D%81%E4%B9%9D%E5%8F%B7?utm_source=openai
                            - type: url_citation
                              url_citation:
                                end_index: 727
                                start_index: 621
                                title: 天問二號
                                url: >-
                                  https://zh.wikipedia.org/wiki/%E5%A4%A9%E5%95%8F%E4%BA%8C%E8%99%9F?utm_source=openai
                            - type: url_citation
                              url_citation:
                                end_index: 903
                                start_index: 824
                                title: 大事前瞻｜2025年，中国这5件科技大事值得期待 | 航空航天 | 中国科技 | 当代中国
                                url: >-
                                  https://www.ourchinastory.com/cn/13848?utm_source=openai
                            - type: url_citation
                              url_citation:
                                end_index: 1096
                                start_index: 1017
                                title: 大事前瞻｜2025年，中国这5件科技大事值得期待 | 航空航天 | 中国科技 | 当代中国
                                url: >-
                                  https://www.ourchinastory.com/cn/13848?utm_source=openai
                        logprobs: null
                        finish_reason: stop
                    created: 1745813529
                    model: gpt-4o-search-preview-2025-03-11
                    object: chat.completion
                    usage:
                      prompt_tokens: 12
                      completion_tokens: 676
                      total_tokens: 688
                      completion_tokens_details:
                        audio_tokens: 0
                        reasoning_tokens: 0
                      prompt_tokens_details:
                        audio_tokens: 0
                        cached_tokens: 0
                    system_fingerprint: ''
                '2':
                  summary: 密钥错误
                  value:
                    codes: 900
                    mess: 密钥错误或已过期，请通过微信访问yewu.bcwhkj.cn个人中心获取
                    data: token
                '3':
                  summary: 非法内容
                  value:
                    codes: 400
                    mess: 非法字符。请勿提交
                    data: ''
                '4':
                  summary: 内容安全
                  value:
                    codes: 402
                    mess: 提交问题涉及内容安全，请修改问题
                    data: ''
                '5':
                  summary: 额度不足
                  value:
                    codes: 300
                    mess: 当前额度不足，请充值后继续使用
                    data: ''
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: 文生文 对话生成
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/3216478/apis/api-290237455-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://yewu.bcwhkj.cn
    description: 正式环境
security: []

```
