...
|
...
|
@@ -15,6 +15,294 @@ |
|
|
"application/json"
|
|
|
],
|
|
|
"paths": {
|
|
|
"v1/chat/dataset": {
|
|
|
"post": {
|
|
|
"summary": "知识库-保存",
|
|
|
"operationId": "chatDatasetSave",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatDatasetSaveResponse"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"parameters": [
|
|
|
{
|
|
|
"name": "body",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatDatasetSaveRequest"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
|
|
"tags": [
|
|
|
"dataset"
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
"v1/chat/dataset/rename": {
|
|
|
"post": {
|
|
|
"summary": "知识库-重命名",
|
|
|
"operationId": "chatDatasetRename",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatDatasetUpdateResponse"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"parameters": [
|
|
|
{
|
|
|
"name": "body",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatDatasetUpdateRequest"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
|
|
"tags": [
|
|
|
"dataset"
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
"v1/chat/dataset/search": {
|
|
|
"post": {
|
|
|
"summary": "知识库-搜索",
|
|
|
"operationId": "chatDatasetSearch",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatDatasetSearchResponse"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"parameters": [
|
|
|
{
|
|
|
"name": "body",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatDatasetSearchRequest"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
|
|
"tags": [
|
|
|
"dataset"
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
"v1/chat/dataset/{id}": {
|
|
|
"get": {
|
|
|
"summary": "知识库-详情",
|
|
|
"operationId": "chatDatasetGet",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatDatasetGetResponse"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"parameters": [
|
|
|
{
|
|
|
"name": "id",
|
|
|
"in": "path",
|
|
|
"required": true,
|
|
|
"type": "string"
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
|
|
"tags": [
|
|
|
"dataset"
|
|
|
]
|
|
|
},
|
|
|
"delete": {
|
|
|
"summary": "知识库-删除",
|
|
|
"operationId": "chatDatasetDelete",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatDatasetDeleteResponse"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"parameters": [
|
|
|
{
|
|
|
"name": "id",
|
|
|
"in": "path",
|
|
|
"required": true,
|
|
|
"type": "string"
|
|
|
},
|
|
|
{
|
|
|
"name": "body",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatDatasetDeleteRequest"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
|
|
"tags": [
|
|
|
"dataset"
|
|
|
]
|
|
|
},
|
|
|
"put": {
|
|
|
"summary": "知识库-更新",
|
|
|
"operationId": "chatDatasetUpdate",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatDatasetUpdateResponse"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"parameters": [
|
|
|
{
|
|
|
"name": "id",
|
|
|
"in": "path",
|
|
|
"required": true,
|
|
|
"type": "string"
|
|
|
},
|
|
|
{
|
|
|
"name": "body",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatDatasetUpdateRequest"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
|
|
"tags": [
|
|
|
"dataset"
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
"v1/chat/document": {
|
|
|
"post": {
|
|
|
"summary": "文档-保存",
|
|
|
"operationId": "chatDocumentSave",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatDocumentSaveResponse"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"parameters": [
|
|
|
{
|
|
|
"name": "body",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatDocumentSaveRequest"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
|
|
"tags": [
|
|
|
"document"
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
"v1/chat/document/search": {
|
|
|
"post": {
|
|
|
"summary": "文档-搜索",
|
|
|
"operationId": "chatDocumentSearch",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatDocumentSearchResponse"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"parameters": [
|
|
|
{
|
|
|
"name": "body",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatDocumentSearchRequest"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
|
|
"tags": [
|
|
|
"document"
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
"v1/chat/document/{id}": {
|
|
|
"get": {
|
|
|
"summary": "文档-详情",
|
|
|
"operationId": "chatDocumentGet",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatDocumentGetResponse"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"parameters": [
|
|
|
{
|
|
|
"name": "id",
|
|
|
"in": "path",
|
|
|
"required": true,
|
|
|
"type": "string"
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
|
|
"tags": [
|
|
|
"document"
|
|
|
]
|
|
|
},
|
|
|
"delete": {
|
|
|
"summary": "文档-删除",
|
|
|
"operationId": "chatDocumentDelete",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatDocumentDeleteResponse"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"parameters": [
|
|
|
{
|
|
|
"name": "id",
|
|
|
"in": "path",
|
|
|
"required": true,
|
|
|
"type": "string"
|
|
|
},
|
|
|
{
|
|
|
"name": "body",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatDocumentDeleteRequest"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
|
|
"tags": [
|
|
|
"document"
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
"v1/chat/models": {
|
|
|
"get": {
|
|
|
"summary": "模型列表",
|
...
|
...
|
@@ -64,7 +352,7 @@ |
|
|
"v1/chat/session/conversation": {
|
|
|
"get": {
|
|
|
"summary": "聊天会话-对话",
|
|
|
"operationId": "chatSessionConversation",
|
|
|
"operationId": "chatSessionConversationWs",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
...
|
...
|
@@ -103,54 +391,234 @@ |
|
|
"in": "query",
|
|
|
"required": true,
|
|
|
"type": "string"
|
|
|
},
|
|
|
{
|
|
|
"name": "fileUrl",
|
|
|
"description": " 文件地址",
|
|
|
"in": "query",
|
|
|
"required": true,
|
|
|
"type": "string"
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
|
|
"tags": [
|
|
|
"chat"
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
"v1/chat/session/records": {
|
|
|
"get": {
|
|
|
"summary": "聊天会话-对话记录列表",
|
|
|
"operationId": "chatSessionRecords",
|
|
|
},
|
|
|
"post": {
|
|
|
"summary": "聊天会话-对话",
|
|
|
"operationId": "chatSessionConversation",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatSessionRecordsResponse"
|
|
|
"$ref": "#/definitions/ChatSessionConversationResponse"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"parameters": [
|
|
|
{
|
|
|
"name": "page",
|
|
|
"in": "query",
|
|
|
"required": false,
|
|
|
"type": "integer",
|
|
|
"format": "int32"
|
|
|
},
|
|
|
{
|
|
|
"name": "size",
|
|
|
"in": "query",
|
|
|
"required": false,
|
|
|
"type": "integer",
|
|
|
"format": "int32"
|
|
|
"name": "body",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatSessionConversationRequest"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
|
|
"tags": [
|
|
|
"chat"
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
"v1/chat/session/my_spark_sessions": {
|
|
|
"post": {
|
|
|
"summary": "星火聊天会话-我的会话",
|
|
|
"operationId": "chatMySparkSessions",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatSessionSearchResponse"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"parameters": [
|
|
|
{
|
|
|
"name": "body",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatSessionSearchRequest"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
|
|
"tags": [
|
|
|
"chat"
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
"v1/chat/session/records": {
|
|
|
"post": {
|
|
|
"summary": "聊天会话-对话记录列表",
|
|
|
"operationId": "chatSessionRecords",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatSessionRecordsResponse"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"parameters": [
|
|
|
{
|
|
|
"name": "body",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatSessionRecordsRequest"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
|
|
"tags": [
|
|
|
"chat"
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
"v1/chat/session/search": {
|
|
|
"post": {
|
|
|
"summary": "聊天会话-搜索",
|
|
|
"operationId": "chatSessionSearch",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatSessionSearchResponse"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"parameters": [
|
|
|
{
|
|
|
"name": "body",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatSessionSearchRequest"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
|
|
"tags": [
|
|
|
"chat"
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
"v1/chat/session/{id}": {
|
|
|
"get": {
|
|
|
"summary": "聊天会话-详情",
|
|
|
"operationId": "chatSessionGet",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatSessionGetResponse"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"parameters": [
|
|
|
{
|
|
|
"name": "id",
|
|
|
"in": "path",
|
|
|
"required": true,
|
|
|
"type": "string"
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
|
|
"tags": [
|
|
|
"chat"
|
|
|
]
|
|
|
},
|
|
|
"delete": {
|
|
|
"summary": "聊天会话-删除",
|
|
|
"operationId": "chatSessionDelete",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatSessionDeleteResponse"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"parameters": [
|
|
|
{
|
|
|
"name": "id",
|
|
|
"in": "path",
|
|
|
"required": true,
|
|
|
"type": "string"
|
|
|
},
|
|
|
{
|
|
|
"name": "sessionId",
|
|
|
"in": "query",
|
|
|
"name": "body",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"type": "integer",
|
|
|
"format": "int64"
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatSessionDeleteRequest"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
|
|
"tags": [
|
|
|
"chat"
|
|
|
]
|
|
|
},
|
|
|
"put": {
|
|
|
"summary": "聊天会话-更新",
|
|
|
"operationId": "chatSessionUpdate",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatSessionUpdateResponse"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"parameters": [
|
|
|
{
|
|
|
"name": "id",
|
|
|
"in": "path",
|
|
|
"required": true,
|
|
|
"type": "string"
|
|
|
},
|
|
|
{
|
|
|
"name": "body",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatSessionUpdateRequest"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
|
|
"tags": [
|
|
|
"chat"
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
"v1/chat/spark_session": {
|
|
|
"post": {
|
|
|
"summary": "星火聊天会话-保存",
|
|
|
"operationId": "chatSparkSessionSave",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatSessionSaveResponse"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"parameters": [
|
|
|
{
|
|
|
"name": "body",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatSessionSaveRequest"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
...
|
...
|
@@ -158,127 +626,414 @@ |
|
|
"chat"
|
|
|
]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"definitions": {
|
|
|
"ChatDatasetDeleteRequest": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"id": {
|
|
|
"type": "integer",
|
|
|
"format": "int64"
|
|
|
}
|
|
|
},
|
|
|
"title": "ChatDatasetDeleteRequest",
|
|
|
"required": [
|
|
|
"id"
|
|
|
]
|
|
|
},
|
|
|
"ChatDatasetDeleteResponse": {
|
|
|
"type": "object",
|
|
|
"title": "ChatDatasetDeleteResponse"
|
|
|
},
|
|
|
"ChatDatasetGetRequest": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"id": {
|
|
|
"type": "integer",
|
|
|
"format": "int64"
|
|
|
}
|
|
|
},
|
|
|
"title": "ChatDatasetGetRequest",
|
|
|
"required": [
|
|
|
"id"
|
|
|
]
|
|
|
},
|
|
|
"ChatDatasetGetResponse": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"dataset": {
|
|
|
"$ref": "#/definitions/ChatDatasetItem"
|
|
|
},
|
|
|
"documents": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"$ref": "#/definitions/ChatDocumentItem"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"title": "ChatDatasetGetResponse",
|
|
|
"required": [
|
|
|
"dataset",
|
|
|
"documents"
|
|
|
]
|
|
|
},
|
|
|
"ChatDatasetItem": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"id": {
|
|
|
"type": "integer",
|
|
|
"format": "int64"
|
|
|
},
|
|
|
"name": {
|
|
|
"$ref": "#/definitions/string",
|
|
|
"description": " 名称"
|
|
|
},
|
|
|
"desc": {
|
|
|
"$ref": "#/definitions/string",
|
|
|
"description": " 描述"
|
|
|
},
|
|
|
"status": {
|
|
|
"$ref": "#/definitions/int",
|
|
|
"description": " 状态 1:启用 2:禁用"
|
|
|
},
|
|
|
"createdAt": {
|
|
|
"type": "integer",
|
|
|
"format": "int64",
|
|
|
"description": " 创建时间"
|
|
|
},
|
|
|
"updatedAt": {
|
|
|
"type": "integer",
|
|
|
"format": "int64",
|
|
|
"description": " 更新时间"
|
|
|
},
|
|
|
"fileNumber": {
|
|
|
"$ref": "#/definitions/int",
|
|
|
"description": " 文件数量"
|
|
|
}
|
|
|
},
|
|
|
"title": "ChatDatasetItem",
|
|
|
"required": [
|
|
|
"id",
|
|
|
"name",
|
|
|
"desc",
|
|
|
"status",
|
|
|
"createdAt",
|
|
|
"updatedAt",
|
|
|
"fileNumber"
|
|
|
]
|
|
|
},
|
|
|
"ChatDatasetSaveRequest": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"name": {
|
|
|
"type": "string",
|
|
|
"description": " 名称"
|
|
|
},
|
|
|
"documentIds": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "integer",
|
|
|
"format": "int64"
|
|
|
},
|
|
|
"description": " 文档ID列表"
|
|
|
}
|
|
|
},
|
|
|
"title": "ChatDatasetSaveRequest",
|
|
|
"required": [
|
|
|
"name",
|
|
|
"documentIds"
|
|
|
]
|
|
|
},
|
|
|
"ChatDatasetSaveResponse": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"dataset": {
|
|
|
"$ref": "#/definitions/ChatDatasetItem"
|
|
|
}
|
|
|
},
|
|
|
"title": "ChatDatasetSaveResponse",
|
|
|
"required": [
|
|
|
"dataset"
|
|
|
]
|
|
|
},
|
|
|
"ChatDatasetSearchRequest": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"page": {
|
|
|
"type": "integer",
|
|
|
"format": "int32"
|
|
|
},
|
|
|
"size": {
|
|
|
"type": "integer",
|
|
|
"format": "int32"
|
|
|
},
|
|
|
"name": {
|
|
|
"type": "string",
|
|
|
"description": " 文件名匹配"
|
|
|
},
|
|
|
"name": {
|
|
|
"type": "integer",
|
|
|
"format": "int32",
|
|
|
"description": " 1:启用 2:禁用"
|
|
|
}
|
|
|
},
|
|
|
"title": "ChatDatasetSearchRequest",
|
|
|
"required": [
|
|
|
"name"
|
|
|
]
|
|
|
},
|
|
|
"ChatDatasetSearchResponse": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"list": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"$ref": "#/definitions/ChatDatasetItem"
|
|
|
}
|
|
|
},
|
|
|
"total": {
|
|
|
"type": "integer",
|
|
|
"format": "int64"
|
|
|
}
|
|
|
},
|
|
|
"title": "ChatDatasetSearchResponse",
|
|
|
"required": [
|
|
|
"list",
|
|
|
"total"
|
|
|
]
|
|
|
},
|
|
|
"ChatDatasetUpdateRequest": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"id": {
|
|
|
"type": "integer",
|
|
|
"format": "int64"
|
|
|
},
|
|
|
"dataset": {
|
|
|
"$ref": "#/definitions/ChatDatasetItem"
|
|
|
}
|
|
|
},
|
|
|
"title": "ChatDatasetUpdateRequest",
|
|
|
"required": [
|
|
|
"id",
|
|
|
"dataset"
|
|
|
]
|
|
|
},
|
|
|
"ChatDatasetUpdateResponse": {
|
|
|
"type": "object",
|
|
|
"title": "ChatDatasetUpdateResponse"
|
|
|
},
|
|
|
"ChatDocumentDeleteRequest": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"id": {
|
|
|
"type": "integer",
|
|
|
"format": "int64"
|
|
|
}
|
|
|
},
|
|
|
"title": "ChatDocumentDeleteRequest",
|
|
|
"required": [
|
|
|
"id"
|
|
|
]
|
|
|
},
|
|
|
"ChatDocumentDeleteResponse": {
|
|
|
"type": "object",
|
|
|
"title": "ChatDocumentDeleteResponse"
|
|
|
},
|
|
|
"ChatDocumentGetRequest": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"id": {
|
|
|
"type": "integer",
|
|
|
"format": "int64"
|
|
|
}
|
|
|
},
|
|
|
"title": "ChatDocumentGetRequest",
|
|
|
"required": [
|
|
|
"id"
|
|
|
]
|
|
|
},
|
|
|
"ChatDocumentGetResponse": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"document": {
|
|
|
"$ref": "#/definitions/ChatDocumentItem"
|
|
|
}
|
|
|
},
|
|
|
"title": "ChatDocumentGetResponse",
|
|
|
"required": [
|
|
|
"document"
|
|
|
]
|
|
|
},
|
|
|
"ChatDocumentItem": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"id": {
|
|
|
"type": "integer",
|
|
|
"format": "int64"
|
|
|
},
|
|
|
"name": {
|
|
|
"type": "string",
|
|
|
"description": " 文件名"
|
|
|
},
|
|
|
"fileType": {
|
|
|
"type": "string",
|
|
|
"description": " 文件类型 markdown\\pdf\\txt\\doc\u0026docx"
|
|
|
},
|
|
|
"status": {
|
|
|
"type": "integer",
|
|
|
"format": "int32",
|
|
|
"description": " 1.使用中、0.待处理、2.预处理中、3.处理失败"
|
|
|
},
|
|
|
"originFileName": {
|
|
|
"type": "string",
|
|
|
"description": " 源文件命"
|
|
|
},
|
|
|
"ext": {
|
|
|
"type": "string",
|
|
|
"description": " 格式"
|
|
|
},
|
|
|
"fileId": {
|
|
|
"type": "string",
|
|
|
"description": " 星火文件ID"
|
|
|
},
|
|
|
"fileUrl": {
|
|
|
"type": "string",
|
|
|
"description": " 文件地址"
|
|
|
},
|
|
|
"fileSize": {
|
|
|
"type": "number",
|
|
|
"format": "double",
|
|
|
"description": " 文件大小KB"
|
|
|
},
|
|
|
"createdAt": {
|
|
|
"type": "integer",
|
|
|
"format": "int64",
|
|
|
"description": " 创建时间"
|
|
|
},
|
|
|
"updatedAt": {
|
|
|
"type": "integer",
|
|
|
"format": "int64",
|
|
|
"description": " 更新时间"
|
|
|
}
|
|
|
},
|
|
|
"title": "ChatDocumentItem",
|
|
|
"required": [
|
|
|
"id",
|
|
|
"fileType",
|
|
|
"status",
|
|
|
"originFileName",
|
|
|
"ext",
|
|
|
"fileId",
|
|
|
"fileUrl",
|
|
|
"fileSize",
|
|
|
"createdAt",
|
|
|
"updatedAt"
|
|
|
]
|
|
|
},
|
|
|
"v1/chat/session/search": {
|
|
|
"post": {
|
|
|
"summary": "聊天会话-搜索",
|
|
|
"operationId": "chatSessionSearch",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatSessionSearchResponse"
|
|
|
}
|
|
|
}
|
|
|
"ChatDocumentSaveRequest": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"fileName": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"parameters": [
|
|
|
{
|
|
|
"name": "body",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatSessionSearchRequest"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
|
|
"tags": [
|
|
|
"chat"
|
|
|
]
|
|
|
}
|
|
|
"url": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"size": {
|
|
|
"type": "number",
|
|
|
"format": "double",
|
|
|
"description": " 文件大小(KB)"
|
|
|
}
|
|
|
},
|
|
|
"title": "ChatDocumentSaveRequest",
|
|
|
"required": [
|
|
|
"fileName",
|
|
|
"url",
|
|
|
"size"
|
|
|
]
|
|
|
},
|
|
|
"v1/chat/session/{id}": {
|
|
|
"get": {
|
|
|
"summary": "聊天会话-详情",
|
|
|
"operationId": "chatSessionGet",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatSessionGetResponse"
|
|
|
}
|
|
|
}
|
|
|
"ChatDocumentSaveResponse": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"document": {
|
|
|
"$ref": "#/definitions/ChatDocumentItem"
|
|
|
}
|
|
|
},
|
|
|
"title": "ChatDocumentSaveResponse",
|
|
|
"required": [
|
|
|
"document"
|
|
|
]
|
|
|
},
|
|
|
"ChatDocumentSearchRequest": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"page": {
|
|
|
"type": "integer",
|
|
|
"format": "int32"
|
|
|
},
|
|
|
"parameters": [
|
|
|
{
|
|
|
"name": "id",
|
|
|
"in": "path",
|
|
|
"required": true,
|
|
|
"type": "string"
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
|
|
"tags": [
|
|
|
"chat"
|
|
|
]
|
|
|
"size": {
|
|
|
"type": "integer",
|
|
|
"format": "int32"
|
|
|
},
|
|
|
"name": {
|
|
|
"type": "string",
|
|
|
"description": " 文件名匹配"
|
|
|
},
|
|
|
"fileType": {
|
|
|
"type": "string",
|
|
|
"description": " 文件类型 markdown\\pdf\\txt\\doc\u0026docx"
|
|
|
},
|
|
|
"status": {
|
|
|
"type": "integer",
|
|
|
"format": "int32",
|
|
|
"description": " 文件状态 1.使用中、0.待处理、2.预处理中、3.处理失败"
|
|
|
}
|
|
|
},
|
|
|
"delete": {
|
|
|
"summary": "聊天会话-删除",
|
|
|
"operationId": "chatSessionDelete",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatSessionDeleteResponse"
|
|
|
}
|
|
|
"title": "ChatDocumentSearchRequest"
|
|
|
},
|
|
|
"ChatDocumentSearchResponse": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"list": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"$ref": "#/definitions/ChatDocumentItem"
|
|
|
}
|
|
|
},
|
|
|
"parameters": [
|
|
|
{
|
|
|
"name": "id",
|
|
|
"in": "path",
|
|
|
"required": true,
|
|
|
"type": "string"
|
|
|
},
|
|
|
{
|
|
|
"name": "body",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatSessionDeleteRequest"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
|
|
"tags": [
|
|
|
"chat"
|
|
|
]
|
|
|
"total": {
|
|
|
"type": "integer",
|
|
|
"format": "int64"
|
|
|
}
|
|
|
},
|
|
|
"put": {
|
|
|
"summary": "聊天会话-更新",
|
|
|
"operationId": "chatSessionUpdate",
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "A successful response.",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatSessionUpdateResponse"
|
|
|
}
|
|
|
}
|
|
|
"title": "ChatDocumentSearchResponse",
|
|
|
"required": [
|
|
|
"list",
|
|
|
"total"
|
|
|
]
|
|
|
},
|
|
|
"ChatDocumentUpdateRequest": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"id": {
|
|
|
"type": "integer",
|
|
|
"format": "int64"
|
|
|
},
|
|
|
"parameters": [
|
|
|
{
|
|
|
"name": "id",
|
|
|
"in": "path",
|
|
|
"required": true,
|
|
|
"type": "string"
|
|
|
},
|
|
|
{
|
|
|
"name": "body",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/ChatSessionUpdateRequest"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"requestBody": {},
|
|
|
"tags": [
|
|
|
"chat"
|
|
|
]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"definitions": {
|
|
|
"document": {
|
|
|
"$ref": "#/definitions/ChatDocumentItem"
|
|
|
}
|
|
|
},
|
|
|
"title": "ChatDocumentUpdateRequest",
|
|
|
"required": [
|
|
|
"id",
|
|
|
"document"
|
|
|
]
|
|
|
},
|
|
|
"ChatDocumentUpdateResponse": {
|
|
|
"type": "object",
|
|
|
"title": "ChatDocumentUpdateResponse"
|
|
|
},
|
|
|
"ChatModelsRequest": {
|
|
|
"type": "object",
|
|
|
"title": "ChatModelsRequest"
|
...
|
...
|
@@ -329,13 +1084,62 @@ |
|
|
"sessionId",
|
|
|
"modelId",
|
|
|
"contentType",
|
|
|
"text",
|
|
|
"fileUrl"
|
|
|
"text"
|
|
|
]
|
|
|
},
|
|
|
"ChatSessionConversationRequestWs": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"sessionId": {
|
|
|
"type": "integer",
|
|
|
"format": "int64",
|
|
|
"description": " 会话ID"
|
|
|
},
|
|
|
"modelId": {
|
|
|
"type": "integer",
|
|
|
"format": "int64",
|
|
|
"description": " 模型ID"
|
|
|
},
|
|
|
"contentType": {
|
|
|
"type": "string",
|
|
|
"description": " 内容类型 文本:text (图片:image 文档:document)"
|
|
|
},
|
|
|
"text": {
|
|
|
"type": "string",
|
|
|
"description": " 内容文本"
|
|
|
}
|
|
|
},
|
|
|
"title": "ChatSessionConversationRequestWs",
|
|
|
"required": [
|
|
|
"sessionId",
|
|
|
"modelId",
|
|
|
"contentType",
|
|
|
"text"
|
|
|
]
|
|
|
},
|
|
|
"ChatSessionConversationResponse": {
|
|
|
"type": "object",
|
|
|
"title": "ChatSessionConversationResponse"
|
|
|
"properties": {
|
|
|
"record": {
|
|
|
"$ref": "#/definitions/Record"
|
|
|
},
|
|
|
"parts": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
|
}
|
|
|
},
|
|
|
"finished": {
|
|
|
"type": "boolean",
|
|
|
"format": "boolean"
|
|
|
}
|
|
|
},
|
|
|
"title": "ChatSessionConversationResponse",
|
|
|
"required": [
|
|
|
"record",
|
|
|
"parts",
|
|
|
"finished"
|
|
|
]
|
|
|
},
|
|
|
"ChatSessionDeleteRequest": {
|
|
|
"type": "object",
|
...
|
...
|
@@ -406,6 +1210,30 @@ |
|
|
"type": "integer",
|
|
|
"format": "int64",
|
|
|
"description": " 创建时间"
|
|
|
},
|
|
|
"module": {
|
|
|
"type": "integer",
|
|
|
"format": "int32",
|
|
|
"default": "1",
|
|
|
"description": " 1:openai chat 2:星火文档问答"
|
|
|
},
|
|
|
"type": {
|
|
|
"type": "string",
|
|
|
"default": "chat",
|
|
|
"description": " 类型 chat:普通问答 spark_dataset_chat:星火知识库问答 spark_documents_chat:星火多文档问答"
|
|
|
},
|
|
|
"datasetId": {
|
|
|
"type": "integer",
|
|
|
"format": "int64",
|
|
|
"description": " 知识库"
|
|
|
},
|
|
|
"documentIds": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "integer",
|
|
|
"format": "int64"
|
|
|
},
|
|
|
"description": " 多文档"
|
|
|
}
|
|
|
},
|
|
|
"title": "ChatSessionItem",
|
...
|
...
|
@@ -413,7 +1241,11 @@ |
|
|
"id",
|
|
|
"title",
|
|
|
"abstract",
|
|
|
"createdAt"
|
|
|
"createdAt",
|
|
|
"module",
|
|
|
"type",
|
|
|
"datasetId",
|
|
|
"documentIds"
|
|
|
]
|
|
|
},
|
|
|
"ChatSessionRecordsRequest": {
|
...
|
...
|
@@ -471,7 +1303,15 @@ |
|
|
},
|
|
|
"ChatSessionSaveResponse": {
|
|
|
"type": "object",
|
|
|
"title": "ChatSessionSaveResponse"
|
|
|
"properties": {
|
|
|
"session": {
|
|
|
"$ref": "#/definitions/ChatSessionItem"
|
|
|
}
|
|
|
},
|
|
|
"title": "ChatSessionSaveResponse",
|
|
|
"required": [
|
|
|
"session"
|
|
|
]
|
|
|
},
|
|
|
"ChatSessionSearchRequest": {
|
|
|
"type": "object",
|
...
|
...
|
@@ -487,6 +1327,11 @@ |
|
|
"title": {
|
|
|
"type": "string",
|
|
|
"description": " 按标题搜索"
|
|
|
},
|
|
|
"module": {
|
|
|
"type": "integer",
|
|
|
"format": "int32",
|
|
|
"description": " 模块 1:openai chat 2:星火文档问答"
|
|
|
}
|
|
|
},
|
|
|
"title": "ChatSessionSearchRequest"
|
...
|
...
|
|