更改了页面布局,调通了模型调用界面

This commit is contained in:
2026-01-13 12:09:41 +08:00
parent a3a19630b7
commit e1ab76a9a1
28 changed files with 6206 additions and 220 deletions

View File

@@ -689,14 +689,14 @@
}
}
},
"/api/datasets/{file_id}": {
"/datasets/{file_id}": {
"delete": {
"tags": [
"Datasets"
],
"summary": "delete_dataset",
"description": "删除数据集\n\nArgs:\n file_id: 文件ID\n\nReturns:\n StandardResponse: 包含删除结果的标准响应",
"operationId": "delete_dataset_api_datasets__file_id__delete",
"operationId": "delete_dataset_datasets__file_id__delete",
"parameters": [
{
"name": "file_id",
@@ -737,7 +737,7 @@
],
"summary": "get_dataset",
"description": "获取特定数据集的详细信息\n\nArgs:\n file_id: 文件ID\n\nReturns:\n StandardResponse: 包含数据集详情的标准响应",
"operationId": "get_dataset_api_datasets__file_id__get",
"operationId": "get_dataset_datasets__file_id__get",
"parameters": [
{
"name": "file_id",
@@ -773,14 +773,14 @@
}
}
},
"/api/datasets/{file_id}/content": {
"/datasets/{file_id}/content": {
"get": {
"tags": [
"Datasets"
],
"summary": "get_dataset_content",
"description": "获取数据集文件内容前N条记录\n\nArgs:\n file_id: 文件ID\n limit: 返回的记录数量默认5条\n\nReturns:\n StandardResponse: 包含数据集内容的标准响应",
"operationId": "get_dataset_content_api_datasets__file_id__content_get",
"operationId": "get_dataset_content_datasets__file_id__content_get",
"parameters": [
{
"name": "file_id",
@@ -826,14 +826,14 @@
}
}
},
"/api/datasets/list-files": {
"/datasets/list-files": {
"get": {
"tags": [
"Datasets"
],
"summary": "list_data_files",
"description": "查询data目录下的文件列表\n\nReturns:\n StandardResponse: 包含文件列表的标准响应",
"operationId": "list_data_files_api_datasets_list_files_get",
"operationId": "list_data_files_datasets_list_files_get",
"responses": {
"200": {
"description": "Successful Response",
@@ -848,14 +848,14 @@
}
}
},
"/api/datasets": {
"/datasets": {
"get": {
"tags": [
"Datasets"
],
"summary": "list_datasets",
"description": "获取所有数据集列表\n\nArgs:\n list_all: 是否列出data目录下的所有文件物理文件默认False只列出API上传的文件\n\nReturns:\n StandardResponse: 包含数据集列表的标准响应",
"operationId": "list_datasets_api_datasets_get",
"operationId": "list_datasets_datasets_get",
"parameters": [
{
"name": "list_all",
@@ -892,19 +892,19 @@
}
}
},
"/api/datasets/upload": {
"/datasets/upload": {
"post": {
"tags": [
"Datasets"
],
"summary": "upload_dataset",
"description": "上传数据集文件\n\nArgs:\n file: 上传的文件(支持 .json, .jsonl 格式)\n description: 文件描述(可选)\n\nReturns:\n StandardResponse: 包含上传结果的标准响应",
"operationId": "upload_dataset_api_datasets_upload_post",
"operationId": "upload_dataset_datasets_upload_post",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/Body_upload_dataset_api_datasets_upload_post"
"$ref": "#/components/schemas/Body_upload_dataset_datasets_upload_post"
}
}
},
@@ -933,6 +933,392 @@
}
}
}
},
"/models/batch-delete": {
"post": {
"tags": [
"Models"
],
"summary": "batch_delete_models",
"description": "批量删除模型",
"operationId": "batch_delete_models_models_batch_delete_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"items": {
"type": "string"
},
"type": "array",
"title": "Model Ids"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/models/{model_id}/call": {
"post": {
"tags": [
"Models"
],
"summary": "call_model_api",
"description": "调用模型进行对话(支持流式输出)",
"operationId": "call_model_api_models__model_id__call_post",
"parameters": [
{
"name": "model_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Model Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"title": "Request Data"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/models/": {
"get": {
"tags": [
"Models"
],
"summary": "get_models",
"description": "获取所有模型配置",
"operationId": "get_models_models__get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
},
"post": {
"tags": [
"Models"
],
"summary": "create_model",
"description": "创建新模型配置",
"operationId": "create_model_models__post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"title": "Model Data"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/models/{model_id}": {
"delete": {
"tags": [
"Models"
],
"summary": "delete_model",
"description": "删除模型配置",
"operationId": "delete_model_models__model_id__delete",
"parameters": [
{
"name": "model_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Model Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"get": {
"tags": [
"Models"
],
"summary": "get_model",
"description": "获取单个模型配置",
"operationId": "get_model_models__model_id__get",
"parameters": [
{
"name": "model_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Model Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"put": {
"tags": [
"Models"
],
"summary": "update_model",
"description": "更新模型配置",
"operationId": "update_model_models__model_id__put",
"parameters": [
{
"name": "model_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Model Id"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"title": "Model Data"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/models/providers/list": {
"get": {
"tags": [
"Models"
],
"summary": "get_model_providers",
"description": "获取模型提供方列表",
"operationId": "get_model_providers_models_providers_list_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/models/status/list": {
"get": {
"tags": [
"Models"
],
"summary": "get_model_statuses",
"description": "获取模型状态列表",
"operationId": "get_model_statuses_models_status_list_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/models/types/list": {
"get": {
"tags": [
"Models"
],
"summary": "get_model_types",
"description": "获取模型类型列表",
"operationId": "get_model_types_models_types_list_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/models/{model_id}/test": {
"post": {
"tags": [
"Models"
],
"summary": "test_model_connection",
"description": "测试模型连接",
"operationId": "test_model_connection_models__model_id__test_post",
"parameters": [
{
"name": "model_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"title": "Model Id"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
}
},
"components": {
@@ -971,7 +1357,7 @@
"title": "BatchDownloadRequest",
"description": "批量下载请求模型"
},
"Body_upload_dataset_api_datasets_upload_post": {
"Body_upload_dataset_datasets_upload_post": {
"properties": {
"file": {
"type": "string",
@@ -994,7 +1380,7 @@
"required": [
"file"
],
"title": "Body_upload_dataset_api_datasets_upload_post"
"title": "Body_upload_dataset_datasets_upload_post"
},
"HTTPValidationError": {
"properties": {