# 非流式生成请求（No Streaming）

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/generate:
    post:
      summary: 非流式生成请求（No Streaming）
      deprecated: false
      description: A response can be received in one reply when streaming is off.
      tags:
        - 生成补全
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  x-apifox-mock: llama3.2
                prompt:
                  type: string
                  x-apifox-mock: Why is the sky blue?
                stream:
                  type: boolean
                  x-apifox-mock: 'false'
              x-apifox-orders:
                - model
                - prompt
                - stream
              required:
                - model
                - prompt
      responses:
        '200':
          description: >-
            If `stream` is set to `false`, the response will be a single JSON
            object:
          content:
            application/json:
              schema:
                type: object
                properties:
                  model:
                    type: string
                  created_at:
                    type: string
                  response:
                    type: string
                  done:
                    type: boolean
                  context:
                    type: array
                    items:
                      type: integer
                  total_duration:
                    type: integer
                  load_duration:
                    type: integer
                  prompt_eval_count:
                    type: integer
                  prompt_eval_duration:
                    type: integer
                  eval_count:
                    type: integer
                  eval_duration:
                    type: integer
                required:
                  - model
                  - created_at
                  - response
                  - done
                  - context
                  - total_duration
                  - load_duration
                  - prompt_eval_count
                  - prompt_eval_duration
                  - eval_count
                  - eval_duration
                x-apifox-orders:
                  - model
                  - created_at
                  - response
                  - done
                  - context
                  - total_duration
                  - load_duration
                  - prompt_eval_count
                  - prompt_eval_duration
                  - eval_count
                  - eval_duration
              example:
                model: llama3.2
                created_at: '2023-08-04T19:22:45.499127Z'
                response: The sky is blue because it is the color of the sky.
                done: true
                context:
                  - 1
                  - 2
                  - 3
                total_duration: 5043500667
                load_duration: 5025959
                prompt_eval_count: 26
                prompt_eval_duration: 325953000
                eval_count: 290
                eval_duration: 4709213000
          headers: {}
          x-apifox-name: Success
      security: []
      x-apifox-folder: 生成补全
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/6041320/apis/api-272428813-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: http://localhost:11434/api/
    description: 正式环境
security: []

```
