# 对话生成 GPT3.5 非流式 get

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v2.Gptliu/nonono:
    get:
      summary: 对话生成 GPT3.5 非流式 get
      deprecated: false
      description: >+
        **冰橙API提供与OPENAI官方的API兼容的接口方式，方便国内开发者进行与OPENAI的CHATGPT的接口对接服务**




        :::highlight purple 💡

        >注：GPT3.5所有模型将强制指向gpt-3.5-turbo，即最新模型

        :::



        :::highlight purple 💡

        > 对话生成 GPT3.5  采用非SSE方式（流式），对话响应一般，需等待官方数据全部接收后才会进行响应输出

        > **推荐采用流式输出 ，效果更好**

        :::


        ### token获取方式：

        - 访问公众号《冰橙文化科技》进入菜单冰橙GPT后，访问右上角 / API密钥 可查看 token

        - 访问：https://yewu.bcwhkj.cn 》 个人 》API密钥 》Token令牌 



        只列出部分常用参数，完整参数说明参考 

        **OpenAI
        官方文档**：https://platform.openai.com/docs/api-reference/completions/create


      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
                        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: 模型
                  enum:
                    - gpt-3.5-turbo-0125
                    - gpt-3.5-turbo
                    - gpt-3.5-turbo-16k
                    - gpt-4o
                    - gpt-4-0125-preview
                    - gpt-4-turbo-preview
                  x-apifox:
                    enumDescriptions:
                      gpt-3.5-turbo-0125: 推荐，新版更快，默认支持16K
                      gpt-3.5-turbo: '    '
                      gpt-3.5-turbo-16k: ''
                      gpt-4o: ''
                      gpt-4-0125-preview: ''
                      gpt-4-turbo-preview: ''
                  default: gpt-3.5-turbo-0613
                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: system
                  content: 你是一个能干的助手.
                - role: user
                  content: 谁赢得了2020年的世界职业棒球大赛?
                - role: assistant
                  content: 洛杉矶道奇队在2020年赢得了世界职业棒球大赛冠军.
                - role: user
                  content: 它在哪里举办的?
              model: gpt-3.5-turbo
              stream: false
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  model:
                    type: string
                    description: 使用的模型
                  choices:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: object
                          properties:
                            role:
                              type: string
                            content:
                              type: string
                              description: 主要内容
                          required:
                            - role
                            - content
                          x-apifox-orders:
                            - role
                            - content
                      x-apifox-orders:
                        - message
                required:
                  - id
                  - model
                  - choices
                x-apifox-orders:
                  - id
                  - model
                  - choices
              examples:
                '1':
                  summary: 成功示例
                  value:
                    id: chatcmpl-7stavzrezgeImDvdKABNHVNbZvIN4
                    object: chat.completion
                    created: 1693317773
                    model: gpt-3.5-turbo-0613
                    choices:
                      - index: 0
                        message:
                          role: assistant
                          content: 2020年的世界职业棒球大赛是在美国德州州的阿灵顿的球场举办的.
                        finish_reason: stop
                    usage:
                      prompt_tokens: 101
                      completion_tokens: 40
                      total_tokens: 141
                '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: ''
                '6':
                  summary: 官方API维护中
                  value:
                    error:
                      code: 502
                      message: Bad gateway.
                      param: null
                      type: cf_bad_gateway
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: 文生文 对话生成
      x-apifox-status: testing
      x-run-in-apifox: https://app.apifox.com/web/project/3216478/apis/api-189023534-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://yewu.bcwhkj.cn
    description: 正式环境
security: []

```
