# 带后缀的生成请求（with Suffix）

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/generate:
    post:
      summary: 带后缀的生成请求（with Suffix）
      deprecated: false
      description: ''
      tags:
        - 生成补全
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  x-apifox-mock: codellama:code
                prompt:
                  type: string
                  x-apifox-mock: def compute_gcd(a, b)
                suffix:
                  type: string
                  x-apifox-mock: return result
                options:
                  type: object
                  properties:
                    temperature:
                      type: string
                      x-apifox-mock: '0'
                  x-apifox-orders:
                    - temperature
                  x-apifox-mock: temperature
                  required:
                    - temperature
                stream:
                  type: boolean
                  x-apifox-mock: 'false'
              x-apifox-orders:
                - model
                - prompt
                - suffix
                - options
                - stream
              required:
                - model
                - prompt
                - suffix
                - options
                - stream
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  model:
                    type: string
                  created_at:
                    type: string
                  response:
                    type: string
                  done:
                    type: boolean
                  done_reason:
                    type: string
                  context:
                    type: array
                    items:
                      type: string
                  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
                  - done_reason
                  - context
                  - total_duration
                  - load_duration
                  - prompt_eval_count
                  - prompt_eval_duration
                  - eval_count
                  - eval_duration
                x-apifox-orders:
                  - model
                  - created_at
                  - response
                  - done
                  - done_reason
                  - context
                  - total_duration
                  - load_duration
                  - prompt_eval_count
                  - prompt_eval_duration
                  - eval_count
                  - eval_duration
              example: "{\r\n  \"model\": \"codellama:code\",\r\n  \"created_at\": \"2024-07-22T20:47:51.147561Z\",\r\n  \"response\": \"\\n  if a == 0:\\n    return b\\n  else:\\n    return compute_gcd(b % a, a)\\n\\ndef compute_lcm(a, b):\\n  result = (a * b) / compute_gcd(a, b)\\n\",\r\n  \"done\": true,\r\n  \"done_reason\": \"stop\",\r\n  \"context\": [...],\r\n  \"total_duration\": 1162761250,\r\n  \"load_duration\": 6683708,\r\n  \"prompt_eval_count\": 17,\r\n  \"prompt_eval_duration\": 201222000,\r\n  \"eval_count\": 63,\r\n  \"eval_duration\": 953997000\r\n}"
          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-272428814-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: http://localhost:11434/api/
    description: 正式环境
security: []

```
