# 卸载模型

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/chat:
    post:
      summary: 卸载模型
      deprecated: false
      description: >-
        If the messages array is empty and the `keep_alive` parameter is set to
        `0`, a model will be unloaded from memory.
      tags:
        - 生成对话补全
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  enum:
                    - llama3.2
                  example: llama3.2
                messages:
                  type: array
                  items:
                    type: object
                    example:
                      role: user
                      content: 你好
                    properties: {}
                keep_alive:
                  type: integer
                  minimum: 0
                  example: 60
              required:
                - model
                - messages
                - keep_alive
              example:
                model: llama3.2
                messages:
                  - role: user
                    content: 你好
                keep_alive: 60
            examples: {}
      responses:
        '200':
          description: 'A single JSON object is returned:'
          content:
            application/json:
              schema:
                type: object
                properties:
                  model:
                    type: string
                  created_at:
                    type: string
                  message:
                    type: object
                    properties:
                      role:
                        type: string
                      content:
                        type: string
                    required:
                      - role
                      - content
                    x-apifox-orders:
                      - role
                      - content
                  done_reason:
                    type: string
                  done:
                    type: boolean
                required:
                  - model
                  - created_at
                  - message
                  - done_reason
                  - done
                x-apifox-orders:
                  - model
                  - created_at
                  - message
                  - done_reason
                  - done
              example:
                model: llama3.2
                created_at: '2024-09-12T21:33:17.547535Z'
                message:
                  role: assistant
                  content: ''
                done_reason: unload
                done: true
          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-272428831-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: http://localhost:11434/api/
    description: 正式环境
security: []

```
