获取可使用的模型列表
GET /v1/models
有用户登录获取用户分组下的可用列表,无用户登录获取default分组下的可用列表 header中有Authorization字段 则查询key对应的token下配置的模型列表
返回示例
{
  "data": [
    {
      "id": "gpt-3.5-turbo-16k",
      "object": "model",
      "created": 1626777600,
      "owned_by": "OpenAI",
      "permission": [
        {
          "id": "modelperm-LwHkVFn8AcMItP432fKKDIKJ",
          "object": "model_permission",
          "created": 1626777600,
          "allow_create_engine": true,
          "allow_sampling": true,
          "allow_logprobs": true,
          "allow_search_indices": false,
          "allow_view": true,
          "allow_fine_tuning": false,
          "organization": "*",
          "group": null,
          "is_blocking": false
        }
      ],
      "root": "gpt-3.5-turbo-16k",
      "parent": null
    }
  ]
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 | 
|---|---|---|---|
| 200 | OK | none | Inline | 
返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 | 
|---|---|---|---|---|---|
| » data | [object] | true | none | none | |
| »» id | string | true | none | 模型ID | none | 
| »» object | string | true | none | model | none | 
| »» created | integer | true | none | 创建时间 | none | 
| »» owned_by | string | true | none | 开发者 | none | 
| »» permission | [object]¦null | true | none | none | |
| »»» id | string | true | none | none | |
| »»» object | string | true | none | none | |
| »»» created | integer | true | none | none | |
| »»» allow_create_engine | boolean | true | none | none | |
| »»» allow_sampling | boolean | true | none | none | |
| »»» allow_logprobs | boolean | true | none | none | |
| »»» allow_search_indices | boolean | true | none | none | |
| »»» allow_view | boolean | true | none | none | |
| »»» allow_fine_tuning | boolean | true | none | none | |
| »»» organization | string | true | none | none | |
| »»» group | null | true | none | none | |
| »»» is_blocking | boolean | true | none | none | |
| »» root | string | true | none | 模型名称 | none | 
| »» parent | null | true | none | 父节点 | none |