mirror of
https://github.com/langgenius/dify.git
synced 2026-08-09 16:33:44 +08:00
6088 lines
215 KiB
JSON
6088 lines
215 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"basePath": "\/v1",
|
|
"paths": {
|
|
"\/": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
}
|
|
},
|
|
"operationId": "get_index_api",
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/app\/feedbacks": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Feedbacks retrieved successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
}
|
|
},
|
|
"summary": "Get all feedbacks for the application",
|
|
"description": "Get all feedbacks for the application\nReturns paginated list of all feedback submitted for messages in this app.",
|
|
"operationId": "get_app_feedbacks",
|
|
"parameters": [
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/FeedbackListQuery"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/apps\/annotation-reply\/{action}": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Action completed successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
}
|
|
},
|
|
"summary": "Enable or disable annotation reply feature",
|
|
"description": "Enable or disable annotation reply feature",
|
|
"operationId": "annotation_reply_action",
|
|
"parameters": [
|
|
{
|
|
"name": "action",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Action to perform: 'enable' or 'disable'"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/AnnotationReplyActionPayload"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/apps\/annotation-reply\/{action}\/status\/{job_id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Job status retrieved successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Job not found"
|
|
}
|
|
},
|
|
"summary": "Get the status of an annotation reply action job",
|
|
"description": "Get the status of an annotation reply action job",
|
|
"operationId": "get_annotation_reply_action_status",
|
|
"parameters": [
|
|
{
|
|
"name": "action",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Action type"
|
|
},
|
|
{
|
|
"name": "job_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Job ID"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/apps\/annotations": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Annotations retrieved successfully",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/AnnotationList"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
}
|
|
},
|
|
"summary": "List annotations for the application",
|
|
"description": "List annotations for the application",
|
|
"operationId": "list_annotations",
|
|
"parameters": [
|
|
{
|
|
"name": "X-Fields",
|
|
"in": "header",
|
|
"type": "string",
|
|
"format": "mask",
|
|
"description": "An optional fields mask"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"201": {
|
|
"description": "Annotation created successfully",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/Annotation"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
}
|
|
},
|
|
"summary": "Create a new annotation",
|
|
"description": "Create a new annotation",
|
|
"operationId": "create_annotation",
|
|
"parameters": [
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/AnnotationCreatePayload"
|
|
}
|
|
},
|
|
{
|
|
"name": "X-Fields",
|
|
"in": "header",
|
|
"type": "string",
|
|
"format": "mask",
|
|
"description": "An optional fields mask"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/apps\/annotations\/{annotation_id}": {
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Annotation updated successfully",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/Annotation"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden - insufficient permissions"
|
|
},
|
|
"404": {
|
|
"description": "Annotation not found"
|
|
}
|
|
},
|
|
"summary": "Update an existing annotation",
|
|
"description": "Update an existing annotation",
|
|
"operationId": "update_annotation",
|
|
"parameters": [
|
|
{
|
|
"name": "annotation_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Annotation ID"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/AnnotationCreatePayload"
|
|
}
|
|
},
|
|
{
|
|
"name": "X-Fields",
|
|
"in": "header",
|
|
"type": "string",
|
|
"format": "mask",
|
|
"description": "An optional fields mask"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"204": {
|
|
"description": "Annotation deleted successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden - insufficient permissions"
|
|
},
|
|
"404": {
|
|
"description": "Annotation not found"
|
|
}
|
|
},
|
|
"summary": "Delete an annotation",
|
|
"description": "Delete an annotation",
|
|
"operationId": "delete_annotation",
|
|
"parameters": [
|
|
{
|
|
"name": "annotation_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Annotation ID"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/audio-to-text": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Audio successfully transcribed"
|
|
},
|
|
"400": {
|
|
"description": "Bad request - no audio or invalid audio"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"413": {
|
|
"description": "Audio file too large"
|
|
},
|
|
"415": {
|
|
"description": "Unsupported audio type"
|
|
},
|
|
"500": {
|
|
"description": "Internal server error"
|
|
}
|
|
},
|
|
"summary": "Convert audio to text using speech-to-text",
|
|
"description": "Convert audio to text using speech-to-text\nAccepts an audio file upload and returns the transcribed text.",
|
|
"operationId": "audio_to_text",
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/chat-messages": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Message sent successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request - invalid parameters or workflow issues"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Conversation or workflow not found"
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded"
|
|
},
|
|
"500": {
|
|
"description": "Internal server error"
|
|
}
|
|
},
|
|
"summary": "Send a message in a chat conversation",
|
|
"description": "Send a message in a chat conversation\nThis endpoint handles chat messages for chat, agent chat, and advanced chat applications.\nSupports conversation management and both blocking and streaming response modes.",
|
|
"operationId": "create_chat_message",
|
|
"parameters": [
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/ChatRequestPayload"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/chat-messages\/{task_id}\/stop": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Task stopped successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Task not found"
|
|
}
|
|
},
|
|
"summary": "Stop a running chat message generation",
|
|
"description": "Stop a running chat message generation",
|
|
"operationId": "stop_chat_message",
|
|
"parameters": [
|
|
{
|
|
"name": "task_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "The ID of the task to stop"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/completion-messages": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Completion created successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request - invalid parameters"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Conversation not found"
|
|
},
|
|
"500": {
|
|
"description": "Internal server error"
|
|
}
|
|
},
|
|
"summary": "Create a completion for the given prompt",
|
|
"description": "Create a completion for the given prompt\nThis endpoint generates a completion based on the provided inputs and query.\nSupports both blocking and streaming response modes.",
|
|
"operationId": "create_completion",
|
|
"parameters": [
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/CompletionRequestPayload"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/completion-messages\/{task_id}\/stop": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Task stopped successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Task not found"
|
|
}
|
|
},
|
|
"summary": "Stop a running completion task",
|
|
"description": "Stop a running completion task",
|
|
"operationId": "stop_completion",
|
|
"parameters": [
|
|
{
|
|
"name": "task_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "The ID of the task to stop"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/conversations": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Conversations retrieved successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Last conversation not found"
|
|
}
|
|
},
|
|
"summary": "List all conversations for the current user",
|
|
"description": "List all conversations for the current user\nSupports pagination using last_id and limit parameters.",
|
|
"operationId": "list_conversations",
|
|
"parameters": [
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/ConversationListQuery"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/conversations\/{c_id}": {
|
|
"delete": {
|
|
"responses": {
|
|
"204": {
|
|
"description": "Conversation deleted successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Conversation not found"
|
|
}
|
|
},
|
|
"summary": "Delete a specific conversation",
|
|
"description": "Delete a specific conversation",
|
|
"operationId": "delete_conversation",
|
|
"parameters": [
|
|
{
|
|
"name": "c_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Conversation ID"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/conversations\/{c_id}\/name": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Conversation renamed successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Conversation not found"
|
|
}
|
|
},
|
|
"summary": "Rename a conversation or auto-generate a name",
|
|
"description": "Rename a conversation or auto-generate a name",
|
|
"operationId": "rename_conversation",
|
|
"parameters": [
|
|
{
|
|
"name": "c_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Conversation ID"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/ConversationRenamePayload"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/conversations\/{c_id}\/variables": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Variables retrieved successfully",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/ConversationVariableInfiniteScrollPagination"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Conversation not found"
|
|
}
|
|
},
|
|
"summary": "List all variables for a conversation",
|
|
"description": "List all variables for a conversation\nConversational variables are only available for chat applications.",
|
|
"operationId": "list_conversation_variables",
|
|
"parameters": [
|
|
{
|
|
"name": "c_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Conversation ID"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/ConversationVariablesQuery"
|
|
}
|
|
},
|
|
{
|
|
"name": "X-Fields",
|
|
"in": "header",
|
|
"type": "string",
|
|
"format": "mask",
|
|
"description": "An optional fields mask"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/conversations\/{c_id}\/variables\/{variable_id}": {
|
|
"put": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Variable updated successfully",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/ConversationVariable"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request - type mismatch"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Conversation or variable not found"
|
|
}
|
|
},
|
|
"summary": "Update a conversation variable's value",
|
|
"description": "Update a conversation variable's value\nAllows updating the value of a specific conversation variable.\nThe value must match the variable's expected type.",
|
|
"operationId": "update_conversation_variable",
|
|
"parameters": [
|
|
{
|
|
"name": "c_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Conversation ID"
|
|
},
|
|
{
|
|
"name": "variable_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Variable ID"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/ConversationVariableUpdatePayload"
|
|
}
|
|
},
|
|
{
|
|
"name": "X-Fields",
|
|
"in": "header",
|
|
"type": "string",
|
|
"format": "mask",
|
|
"description": "An optional fields mask"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Datasets retrieved successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
}
|
|
},
|
|
"summary": "Resource for getting datasets",
|
|
"description": "List all datasets",
|
|
"operationId": "list_datasets",
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Dataset created successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"400": {
|
|
"description": "Bad request - invalid parameters"
|
|
}
|
|
},
|
|
"summary": "Resource for creating datasets",
|
|
"description": "Create a new dataset",
|
|
"operationId": "create_dataset",
|
|
"parameters": [
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/DatasetCreatePayload"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/tags": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Tags retrieved successfully",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/DataSetTag"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
}
|
|
},
|
|
"summary": "Get all knowledge type tags",
|
|
"description": "Get all knowledge type tags",
|
|
"operationId": "list_dataset_tags",
|
|
"parameters": [
|
|
{
|
|
"name": "X-Fields",
|
|
"in": "header",
|
|
"type": "string",
|
|
"format": "mask",
|
|
"description": "An optional fields mask"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Tag created successfully",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/DataSetTag"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden - insufficient permissions"
|
|
}
|
|
},
|
|
"summary": "Add a knowledge type tag",
|
|
"description": "Add a knowledge type tag",
|
|
"operationId": "create_dataset_tag",
|
|
"parameters": [
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/TagCreatePayload"
|
|
}
|
|
},
|
|
{
|
|
"name": "X-Fields",
|
|
"in": "header",
|
|
"type": "string",
|
|
"format": "mask",
|
|
"description": "An optional fields mask"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"204": {
|
|
"description": "Tag deleted successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden - insufficient permissions"
|
|
}
|
|
},
|
|
"summary": "Delete a knowledge type tag",
|
|
"description": "Delete a knowledge type tag",
|
|
"operationId": "delete_dataset_tag",
|
|
"parameters": [
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/TagDeletePayload"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Tag updated successfully",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/DataSetTag"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden - insufficient permissions"
|
|
}
|
|
},
|
|
"description": "Update a knowledge type tag",
|
|
"operationId": "update_dataset_tag",
|
|
"parameters": [
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/TagUpdatePayload"
|
|
}
|
|
},
|
|
{
|
|
"name": "X-Fields",
|
|
"in": "header",
|
|
"type": "string",
|
|
"format": "mask",
|
|
"description": "An optional fields mask"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/tags\/binding": {
|
|
"post": {
|
|
"responses": {
|
|
"204": {
|
|
"description": "Tags bound successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden - insufficient permissions"
|
|
}
|
|
},
|
|
"description": "Bind tags to a dataset",
|
|
"operationId": "bind_dataset_tags",
|
|
"parameters": [
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/TagBindingPayload"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/tags\/unbinding": {
|
|
"post": {
|
|
"responses": {
|
|
"204": {
|
|
"description": "Tag unbound successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden - insufficient permissions"
|
|
}
|
|
},
|
|
"description": "Unbind a tag from a dataset",
|
|
"operationId": "unbind_dataset_tag",
|
|
"parameters": [
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/TagUnbindingPayload"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Dataset retrieved successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden - insufficient permissions"
|
|
},
|
|
"404": {
|
|
"description": "Dataset not found"
|
|
}
|
|
},
|
|
"description": "Get a specific dataset by ID",
|
|
"operationId": "get_dataset",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"204": {
|
|
"description": "Dataset deleted successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Dataset not found"
|
|
},
|
|
"409": {
|
|
"description": "Conflict - dataset is in use"
|
|
}
|
|
},
|
|
"summary": "Deletes a dataset given its ID",
|
|
"description": "Delete a dataset\nArgs:\n _: ignore\n dataset_id (UUID): The ID of the dataset to be deleted.\n\nReturns:\n dict: A dictionary with a key 'result' and a value 'success'\n if the dataset was successfully deleted. Omitted in HTTP response.\n int: HTTP status code 204 indicating that the operation was successful.\n\nRaises:\n NotFound: If the dataset with the given ID does not exist.",
|
|
"operationId": "delete_dataset",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Dataset updated successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden - insufficient permissions"
|
|
},
|
|
"404": {
|
|
"description": "Dataset not found"
|
|
}
|
|
},
|
|
"description": "Update an existing dataset",
|
|
"operationId": "update_dataset",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/DatasetUpdatePayload"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/document\/create-by-file": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Document created successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"400": {
|
|
"description": "Bad request - invalid file or parameters"
|
|
}
|
|
},
|
|
"description": "Create a new document by uploading a file",
|
|
"operationId": "create_document_by_file",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/document\/create-by-text": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Document created successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"400": {
|
|
"description": "Bad request - invalid parameters"
|
|
}
|
|
},
|
|
"description": "Create a new document by providing text content",
|
|
"operationId": "create_document_by_text",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/DocumentTextCreatePayload"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/document\/create_by_file": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Document created successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"400": {
|
|
"description": "Bad request - invalid file or parameters"
|
|
}
|
|
},
|
|
"description": "Create a new document by uploading a file",
|
|
"operationId": "create_document_by_file",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/document\/create_by_text": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Document created successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"400": {
|
|
"description": "Bad request - invalid parameters"
|
|
}
|
|
},
|
|
"description": "Create a new document by providing text content",
|
|
"operationId": "create_document_by_text",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/DocumentTextCreatePayload"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/documents": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Documents retrieved successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Dataset not found"
|
|
}
|
|
},
|
|
"description": "List all documents in a dataset",
|
|
"operationId": "list_documents",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/documents\/metadata": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Documents metadata updated successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Dataset not found"
|
|
}
|
|
},
|
|
"summary": "Update metadata for multiple documents",
|
|
"description": "Update metadata for multiple documents",
|
|
"operationId": "update_documents_metadata",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/MetadataOperationData"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/documents\/status\/{action}": {
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Document status updated successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden - insufficient permissions"
|
|
},
|
|
"404": {
|
|
"description": "Dataset not found"
|
|
},
|
|
"400": {
|
|
"description": "Bad request - invalid action"
|
|
}
|
|
},
|
|
"summary": "Batch update document status",
|
|
"description": "Batch update document status\nArgs:\n tenant_id: tenant id\n dataset_id: dataset id\n action: action to perform (Literal[\"enable\", \"disable\", \"archive\", \"un_archive\"])\n\nReturns:\n dict: A dictionary with a key 'result' and a value 'success'\n int: HTTP status code 200 indicating that the operation was successful.\n\nRaises:\n NotFound: If the dataset with the given ID does not exist.\n Forbidden: If the user does not have permission.\n InvalidActionError: If the action is invalid or cannot be performed.",
|
|
"operationId": "update_document_status",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "action",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Action to perform: 'enable', 'disable', 'archive', or 'un_archive'"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/documents\/{batch}\/indexing-status": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Indexing status retrieved successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Dataset or documents not found"
|
|
}
|
|
},
|
|
"description": "Get indexing status for documents in a batch",
|
|
"operationId": "get_document_indexing_status",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "batch",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Batch ID"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/documents\/{document_id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Document retrieved successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden - insufficient permissions"
|
|
},
|
|
"404": {
|
|
"description": "Document not found"
|
|
}
|
|
},
|
|
"description": "Get a specific document by ID",
|
|
"operationId": "get_document",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "document_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Document ID"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"204": {
|
|
"description": "Document deleted successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden - document is archived"
|
|
},
|
|
"404": {
|
|
"description": "Document not found"
|
|
}
|
|
},
|
|
"summary": "Delete document",
|
|
"description": "Delete a document",
|
|
"operationId": "delete_document",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "document_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Document ID"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/documents\/{document_id}\/segments": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Segments retrieved successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Dataset or document not found"
|
|
}
|
|
},
|
|
"description": "List segments in a document",
|
|
"operationId": "list_segments",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "document_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Document ID"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/SegmentListQuery"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Segments created successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request - segments data is missing"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Dataset or document not found"
|
|
}
|
|
},
|
|
"description": "Create segments in a document",
|
|
"operationId": "create_segments",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "document_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Document ID"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/SegmentCreatePayload"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/documents\/{document_id}\/segments\/{segment_id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Segment retrieved successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Dataset, document, or segment not found"
|
|
}
|
|
},
|
|
"description": "Get a specific segment by ID",
|
|
"operationId": "get_segment",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "segment_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "document_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Segment updated successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Dataset, document, or segment not found"
|
|
}
|
|
},
|
|
"description": "Update a specific segment",
|
|
"operationId": "update_segment",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "document_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Document ID"
|
|
},
|
|
{
|
|
"name": "segment_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Segment ID to update"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/SegmentUpdatePayload"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
},
|
|
"delete": {
|
|
"responses": {
|
|
"204": {
|
|
"description": "Segment deleted successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Dataset, document, or segment not found"
|
|
}
|
|
},
|
|
"description": "Delete a specific segment",
|
|
"operationId": "delete_segment",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "document_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Document ID"
|
|
},
|
|
{
|
|
"name": "segment_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Segment ID to delete"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/documents\/{document_id}\/segments\/{segment_id}\/child_chunks": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Child chunks retrieved successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Dataset, document, or segment not found"
|
|
}
|
|
},
|
|
"description": "List child chunks for a segment",
|
|
"operationId": "list_child_chunks",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "document_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Document ID"
|
|
},
|
|
{
|
|
"name": "segment_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Parent segment ID"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/ChildChunkListQuery"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Child chunk created successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Dataset, document, or segment not found"
|
|
}
|
|
},
|
|
"description": "Create a new child chunk for a segment",
|
|
"operationId": "create_child_chunk",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "document_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Document ID"
|
|
},
|
|
{
|
|
"name": "segment_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Parent segment ID"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/ChildChunkCreatePayload"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/documents\/{document_id}\/segments\/{segment_id}\/child_chunks\/{child_chunk_id}": {
|
|
"delete": {
|
|
"responses": {
|
|
"204": {
|
|
"description": "Child chunk deleted successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Dataset, document, segment, or child chunk not found"
|
|
}
|
|
},
|
|
"description": "Delete a specific child chunk",
|
|
"operationId": "delete_child_chunk",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "document_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Document ID"
|
|
},
|
|
{
|
|
"name": "segment_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Parent segment ID"
|
|
},
|
|
{
|
|
"name": "child_chunk_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Child chunk ID to delete"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Child chunk updated successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Dataset, document, segment, or child chunk not found"
|
|
}
|
|
},
|
|
"description": "Update a specific child chunk",
|
|
"operationId": "update_child_chunk",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "document_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Document ID"
|
|
},
|
|
{
|
|
"name": "segment_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Parent segment ID"
|
|
},
|
|
{
|
|
"name": "child_chunk_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Child chunk ID to update"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/ChildChunkUpdatePayload"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/documents\/{document_id}\/update-by-file": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Document updated successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Document not found"
|
|
}
|
|
},
|
|
"description": "Update an existing document by uploading a file",
|
|
"operationId": "update_document_by_file",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "document_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Document ID"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/documents\/{document_id}\/update-by-text": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Document updated successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Document not found"
|
|
}
|
|
},
|
|
"description": "Update an existing document by providing text content",
|
|
"operationId": "update_document_by_text",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "document_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Document ID"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/DocumentTextUpdate"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/documents\/{document_id}\/update_by_file": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Document updated successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Document not found"
|
|
}
|
|
},
|
|
"description": "Update an existing document by uploading a file",
|
|
"operationId": "update_document_by_file",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "document_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Document ID"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/documents\/{document_id}\/update_by_text": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Document updated successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Document not found"
|
|
}
|
|
},
|
|
"description": "Update an existing document by providing text content",
|
|
"operationId": "update_document_by_text",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "document_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Document ID"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/DocumentTextUpdate"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/hit-testing": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Hit testing results"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Dataset not found"
|
|
}
|
|
},
|
|
"summary": "Perform hit testing on a dataset",
|
|
"description": "Perform hit testing on a dataset\nTests retrieval performance for the specified dataset.",
|
|
"operationId": "dataset_hit_testing",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/HitTestingPayload"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/metadata": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Metadata retrieved successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Dataset not found"
|
|
}
|
|
},
|
|
"summary": "Get all metadata for a dataset",
|
|
"description": "Get all metadata for a dataset",
|
|
"operationId": "get_dataset_metadata",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
},
|
|
"post": {
|
|
"responses": {
|
|
"201": {
|
|
"description": "Metadata created successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Dataset not found"
|
|
}
|
|
},
|
|
"summary": "Create metadata for a dataset",
|
|
"description": "Create metadata for a dataset",
|
|
"operationId": "create_dataset_metadata",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/MetadataArgs"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/metadata\/built-in": {
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Built-in fields retrieved successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
}
|
|
},
|
|
"summary": "Get all built-in metadata fields",
|
|
"description": "Get all built-in metadata fields",
|
|
"operationId": "get_built_in_fields",
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/metadata\/built-in\/{action}": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Action completed successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Dataset not found"
|
|
}
|
|
},
|
|
"summary": "Enable or disable built-in metadata field",
|
|
"description": "Enable or disable built-in metadata field",
|
|
"operationId": "toggle_built_in_field",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "action",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Action to perform: 'enable' or 'disable'"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/metadata\/{metadata_id}": {
|
|
"delete": {
|
|
"responses": {
|
|
"204": {
|
|
"description": "Metadata deleted successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Dataset or metadata not found"
|
|
}
|
|
},
|
|
"summary": "Delete metadata",
|
|
"description": "Delete metadata",
|
|
"operationId": "delete_dataset_metadata",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "metadata_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Metadata ID"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
},
|
|
"patch": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Metadata updated successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Dataset or metadata not found"
|
|
}
|
|
},
|
|
"summary": "Update metadata name",
|
|
"description": "Update metadata name",
|
|
"operationId": "update_dataset_metadata",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "metadata_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Metadata ID"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/MetadataUpdatePayload"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/retrieve": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Hit testing results"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Dataset not found"
|
|
}
|
|
},
|
|
"summary": "Perform hit testing on a dataset",
|
|
"description": "Perform hit testing on a dataset\nTests retrieval performance for the specified dataset.",
|
|
"operationId": "dataset_hit_testing",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/HitTestingPayload"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/datasets\/{dataset_id}\/tags": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Tags retrieved successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
}
|
|
},
|
|
"summary": "Get all knowledge type tags",
|
|
"description": "Get tags bound to a specific dataset",
|
|
"operationId": "get_dataset_tags_binding_status",
|
|
"parameters": [
|
|
{
|
|
"name": "dataset_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Dataset ID"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/files\/upload": {
|
|
"post": {
|
|
"responses": {
|
|
"201": {
|
|
"description": "File uploaded successfully",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/FileResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request - no file or invalid file"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"413": {
|
|
"description": "File too large"
|
|
},
|
|
"415": {
|
|
"description": "Unsupported file type"
|
|
}
|
|
},
|
|
"summary": "Upload a file for use in conversations",
|
|
"description": "Upload a file for use in conversations\nAccepts a single file upload via multipart\/form-data.",
|
|
"operationId": "upload_file",
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/files\/{file_id}\/preview": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "File retrieved successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden - file access denied"
|
|
},
|
|
"404": {
|
|
"description": "File not found"
|
|
}
|
|
},
|
|
"summary": "Preview\/Download a file that was uploaded via Service API",
|
|
"description": "Preview or download a file uploaded via Service API\nProvides secure file preview\/download functionality.\nFiles can only be accessed if they belong to messages within the requesting app's context.",
|
|
"operationId": "preview_file",
|
|
"parameters": [
|
|
{
|
|
"name": "file_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "UUID of the file to preview"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/FilePreviewQuery"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/info": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Application info retrieved successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Application not found"
|
|
}
|
|
},
|
|
"summary": "Get app information",
|
|
"description": "Get basic application information\nReturns basic information about the application including name, description, tags, and mode.",
|
|
"operationId": "get_app_info",
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/messages": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Messages retrieved successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Conversation or first message not found"
|
|
}
|
|
},
|
|
"summary": "List messages in a conversation",
|
|
"description": "List messages in a conversation\nRetrieves messages with pagination support using first_id.",
|
|
"operationId": "list_messages",
|
|
"parameters": [
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/MessageListQuery"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/messages\/{message_id}\/feedbacks": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Feedback submitted successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Message not found"
|
|
}
|
|
},
|
|
"summary": "Submit feedback for a message",
|
|
"description": "Submit feedback for a message\nAllows users to rate messages as like\/dislike and provide optional feedback content.",
|
|
"operationId": "create_message_feedback",
|
|
"parameters": [
|
|
{
|
|
"name": "message_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Message ID"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/MessageFeedbackPayload"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/messages\/{message_id}\/suggested": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Suggested questions retrieved successfully"
|
|
},
|
|
"400": {
|
|
"description": "Suggested questions feature is disabled"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Message not found"
|
|
},
|
|
"500": {
|
|
"description": "Internal server error"
|
|
}
|
|
},
|
|
"summary": "Get suggested follow-up questions for a message",
|
|
"description": "Get suggested follow-up questions for a message\nReturns AI-generated follow-up questions based on the message content.",
|
|
"operationId": "get_suggested_questions",
|
|
"parameters": [
|
|
{
|
|
"name": "message_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Message ID"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/meta": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Metadata retrieved successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Application not found"
|
|
}
|
|
},
|
|
"summary": "Get app metadata",
|
|
"description": "Get application metadata\nReturns metadata about the application including configuration and settings.",
|
|
"operationId": "get_app_meta",
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/parameters": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Parameters retrieved successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Application not found"
|
|
}
|
|
},
|
|
"summary": "Retrieve app parameters",
|
|
"description": "Retrieve application input parameters and configuration\nReturns the input form parameters and configuration for the application.",
|
|
"operationId": "get_app_parameters",
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/site": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Site configuration retrieved successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"403": {
|
|
"description": "Forbidden - site not found or tenant archived"
|
|
}
|
|
},
|
|
"summary": "Retrieve app site info",
|
|
"description": "Get application site configuration\nReturns the site configuration for the application including theme, icons, and text.",
|
|
"operationId": "get_app_site",
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/text-to-audio": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Text successfully converted to audio"
|
|
},
|
|
"400": {
|
|
"description": "Bad request - invalid parameters"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"500": {
|
|
"description": "Internal server error"
|
|
}
|
|
},
|
|
"summary": "Convert text to audio using text-to-speech",
|
|
"description": "Convert text to audio using text-to-speech\nConverts the provided text to audio using the specified voice.",
|
|
"operationId": "text_to_audio",
|
|
"parameters": [
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/TextToAudioPayload"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/workflows\/logs": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Logs retrieved successfully",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/WorkflowAppLogPagination"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
}
|
|
},
|
|
"summary": "Get workflow app logs",
|
|
"description": "Get workflow execution logs\nReturns paginated workflow execution logs with filtering options.",
|
|
"operationId": "get_workflow_logs",
|
|
"parameters": [
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/WorkflowLogQuery"
|
|
}
|
|
},
|
|
{
|
|
"name": "X-Fields",
|
|
"in": "header",
|
|
"type": "string",
|
|
"format": "mask",
|
|
"description": "An optional fields mask"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/workflows\/run": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Workflow executed successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request - invalid parameters or workflow issues"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Workflow not found"
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded"
|
|
},
|
|
"500": {
|
|
"description": "Internal server error"
|
|
}
|
|
},
|
|
"summary": "Execute a workflow",
|
|
"description": "Execute a workflow\nRuns a workflow with the provided inputs and returns the results.\nSupports both blocking and streaming response modes.",
|
|
"operationId": "run_workflow",
|
|
"parameters": [
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/WorkflowRunPayload"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/workflows\/run\/{workflow_run_id}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Workflow run details retrieved successfully",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/WorkflowRun"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Workflow run not found"
|
|
}
|
|
},
|
|
"summary": "Get a workflow task running detail",
|
|
"description": "Get workflow run details\nReturns detailed information about a specific workflow run.",
|
|
"operationId": "get_workflow_run_detail",
|
|
"parameters": [
|
|
{
|
|
"name": "workflow_run_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Workflow run ID"
|
|
},
|
|
{
|
|
"name": "X-Fields",
|
|
"in": "header",
|
|
"type": "string",
|
|
"format": "mask",
|
|
"description": "An optional fields mask"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/workflows\/tasks\/{task_id}\/stop": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Task stopped successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Task not found"
|
|
}
|
|
},
|
|
"summary": "Stop a running workflow task",
|
|
"description": "Stop a running workflow task",
|
|
"operationId": "stop_workflow_task",
|
|
"parameters": [
|
|
{
|
|
"name": "task_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Task ID to stop"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/workflows\/{workflow_id}\/run": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Workflow executed successfully"
|
|
},
|
|
"400": {
|
|
"description": "Bad request - invalid parameters or workflow issues"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
},
|
|
"404": {
|
|
"description": "Workflow not found"
|
|
},
|
|
"429": {
|
|
"description": "Rate limit exceeded"
|
|
},
|
|
"500": {
|
|
"description": "Internal server error"
|
|
}
|
|
},
|
|
"summary": "Run specific workflow by ID",
|
|
"description": "Execute a specific workflow by ID\nExecutes a specific workflow version identified by its ID.",
|
|
"operationId": "run_workflow_by_id",
|
|
"parameters": [
|
|
{
|
|
"name": "workflow_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Workflow ID to execute"
|
|
},
|
|
{
|
|
"name": "payload",
|
|
"required": true,
|
|
"in": "body",
|
|
"schema": {
|
|
"$ref": "#\/definitions\/WorkflowRunPayload"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
},
|
|
"\/workspaces\/current\/models\/model-types\/{model_type}": {
|
|
"get": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "Models retrieved successfully"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized - invalid API token"
|
|
}
|
|
},
|
|
"summary": "Get available models by model type",
|
|
"description": "Get available models by model type\nReturns a list of available models for the specified model type.",
|
|
"operationId": "get_available_models",
|
|
"parameters": [
|
|
{
|
|
"name": "model_type",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string",
|
|
"description": "Type of model to retrieve"
|
|
}
|
|
],
|
|
"tags": [
|
|
"service_api"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"info": {
|
|
"title": "Service API",
|
|
"version": "1.0",
|
|
"description": "API for application services"
|
|
},
|
|
"produces": [
|
|
"application\/json"
|
|
],
|
|
"consumes": [
|
|
"application\/json"
|
|
],
|
|
"securityDefinitions": {
|
|
"Bearer": {
|
|
"type": "apiKey",
|
|
"in": "header",
|
|
"name": "Authorization",
|
|
"description": "Type: Bearer {your-api-key}"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"tags": [
|
|
{
|
|
"name": "service_api",
|
|
"description": "Service operations"
|
|
}
|
|
],
|
|
"definitions": {
|
|
"AnnotationReplyActionPayload": {
|
|
"properties": {
|
|
"score_threshold": {
|
|
"description": "Score threshold for annotation matching",
|
|
"title": "Score Threshold",
|
|
"type": "number"
|
|
},
|
|
"embedding_provider_name": {
|
|
"description": "Embedding provider name",
|
|
"title": "Embedding Provider Name",
|
|
"type": "string"
|
|
},
|
|
"embedding_model_name": {
|
|
"description": "Embedding model name",
|
|
"title": "Embedding Model Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"score_threshold",
|
|
"embedding_provider_name",
|
|
"embedding_model_name"
|
|
],
|
|
"title": "AnnotationReplyActionPayload",
|
|
"type": "object"
|
|
},
|
|
"AnnotationCreatePayload": {
|
|
"properties": {
|
|
"question": {
|
|
"description": "Annotation question",
|
|
"title": "Question",
|
|
"type": "string"
|
|
},
|
|
"answer": {
|
|
"description": "Annotation answer",
|
|
"title": "Answer",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"question",
|
|
"answer"
|
|
],
|
|
"title": "AnnotationCreatePayload",
|
|
"type": "object"
|
|
},
|
|
"AnnotationList": {
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#\/definitions\/Annotation"
|
|
}
|
|
},
|
|
"has_more": {
|
|
"type": "boolean"
|
|
},
|
|
"limit": {
|
|
"type": "integer"
|
|
},
|
|
"total": {
|
|
"type": "integer"
|
|
},
|
|
"page": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"Annotation": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"question": {
|
|
"type": "string"
|
|
},
|
|
"answer": {
|
|
"type": "object"
|
|
},
|
|
"hit_count": {
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"TextToAudioPayload": {
|
|
"properties": {
|
|
"message_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"description": "Message ID",
|
|
"title": "Message Id"
|
|
},
|
|
"voice": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"description": "Voice to use for TTS",
|
|
"title": "Voice"
|
|
},
|
|
"text": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"description": "Text to convert to audio",
|
|
"title": "Text"
|
|
},
|
|
"streaming": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"description": "Enable streaming response",
|
|
"title": "Streaming"
|
|
}
|
|
},
|
|
"title": "TextToAudioPayload",
|
|
"type": "object"
|
|
},
|
|
"CompletionRequestPayload": {
|
|
"properties": {
|
|
"inputs": {
|
|
"additionalProperties": true,
|
|
"title": "Inputs",
|
|
"type": "object"
|
|
},
|
|
"query": {
|
|
"default": "",
|
|
"title": "Query",
|
|
"type": "string"
|
|
},
|
|
"files": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Files"
|
|
},
|
|
"response_mode": {
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"blocking",
|
|
"streaming"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Response Mode"
|
|
},
|
|
"retriever_from": {
|
|
"default": "dev",
|
|
"title": "Retriever From",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"inputs"
|
|
],
|
|
"title": "CompletionRequestPayload",
|
|
"type": "object"
|
|
},
|
|
"ChatRequestPayload": {
|
|
"properties": {
|
|
"inputs": {
|
|
"additionalProperties": true,
|
|
"title": "Inputs",
|
|
"type": "object"
|
|
},
|
|
"query": {
|
|
"title": "Query",
|
|
"type": "string"
|
|
},
|
|
"files": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Files"
|
|
},
|
|
"response_mode": {
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"blocking",
|
|
"streaming"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Response Mode"
|
|
},
|
|
"conversation_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"description": "Conversation UUID",
|
|
"title": "Conversation Id"
|
|
},
|
|
"retriever_from": {
|
|
"default": "dev",
|
|
"title": "Retriever From",
|
|
"type": "string"
|
|
},
|
|
"auto_generate_name": {
|
|
"default": true,
|
|
"description": "Auto generate conversation name",
|
|
"title": "Auto Generate Name",
|
|
"type": "boolean"
|
|
},
|
|
"workflow_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"description": "Workflow ID for advanced chat",
|
|
"title": "Workflow Id"
|
|
}
|
|
},
|
|
"required": [
|
|
"inputs",
|
|
"query"
|
|
],
|
|
"title": "ChatRequestPayload",
|
|
"type": "object"
|
|
},
|
|
"ConversationListQuery": {
|
|
"properties": {
|
|
"last_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"description": "Last conversation ID for pagination",
|
|
"title": "Last Id"
|
|
},
|
|
"limit": {
|
|
"default": 20,
|
|
"description": "Number of conversations to return",
|
|
"maximum": 100,
|
|
"minimum": 1,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
},
|
|
"sort_by": {
|
|
"default": "-updated_at",
|
|
"description": "Sort order for conversations",
|
|
"enum": [
|
|
"created_at",
|
|
"-created_at",
|
|
"updated_at",
|
|
"-updated_at"
|
|
],
|
|
"title": "Sort By",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "ConversationListQuery",
|
|
"type": "object"
|
|
},
|
|
"ConversationRenamePayload": {
|
|
"properties": {
|
|
"name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"description": "New conversation name (required if auto_generate is false)",
|
|
"title": "Name"
|
|
},
|
|
"auto_generate": {
|
|
"default": false,
|
|
"description": "Auto-generate conversation name",
|
|
"title": "Auto Generate",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"title": "ConversationRenamePayload",
|
|
"type": "object"
|
|
},
|
|
"ConversationVariablesQuery": {
|
|
"properties": {
|
|
"last_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"description": "Last variable ID for pagination",
|
|
"title": "Last Id"
|
|
},
|
|
"limit": {
|
|
"default": 20,
|
|
"description": "Number of variables to return",
|
|
"maximum": 100,
|
|
"minimum": 1,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
},
|
|
"variable_name": {
|
|
"anyOf": [
|
|
{
|
|
"maxLength": 255,
|
|
"minLength": 1,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"description": "Filter variables by name",
|
|
"title": "Variable Name"
|
|
}
|
|
},
|
|
"title": "ConversationVariablesQuery",
|
|
"type": "object"
|
|
},
|
|
"ConversationVariableInfiniteScrollPagination": {
|
|
"properties": {
|
|
"limit": {
|
|
"type": "integer"
|
|
},
|
|
"has_more": {
|
|
"type": "boolean"
|
|
},
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#\/definitions\/ConversationVariable"
|
|
}
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ConversationVariable": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"value_type": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "object"
|
|
},
|
|
"updated_at": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"ConversationVariableUpdatePayload": {
|
|
"properties": {
|
|
"value": {
|
|
"title": "Value"
|
|
}
|
|
},
|
|
"required": [
|
|
"value"
|
|
],
|
|
"title": "ConversationVariableUpdatePayload",
|
|
"type": "object"
|
|
},
|
|
"FileResponse": {
|
|
"properties": {
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"size": {
|
|
"title": "Size",
|
|
"type": "integer"
|
|
},
|
|
"extension": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Extension"
|
|
},
|
|
"mime_type": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Mime Type"
|
|
},
|
|
"created_by": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Created By"
|
|
},
|
|
"created_at": {
|
|
"anyOf": [
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Created At"
|
|
},
|
|
"preview_url": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Preview Url"
|
|
},
|
|
"source_url": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Source Url"
|
|
},
|
|
"original_url": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Original Url"
|
|
},
|
|
"user_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "User Id"
|
|
},
|
|
"tenant_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Tenant Id"
|
|
},
|
|
"conversation_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Conversation Id"
|
|
},
|
|
"file_key": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "File Key"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"name",
|
|
"size"
|
|
],
|
|
"title": "FileResponse",
|
|
"type": "object"
|
|
},
|
|
"FilePreviewQuery": {
|
|
"properties": {
|
|
"as_attachment": {
|
|
"default": false,
|
|
"description": "Download as attachment",
|
|
"title": "As Attachment",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"title": "FilePreviewQuery",
|
|
"type": "object"
|
|
},
|
|
"MessageListQuery": {
|
|
"properties": {
|
|
"conversation_id": {
|
|
"title": "Conversation Id",
|
|
"type": "string"
|
|
},
|
|
"first_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "First Id"
|
|
},
|
|
"limit": {
|
|
"default": 20,
|
|
"description": "Number of messages to return",
|
|
"maximum": 100,
|
|
"minimum": 1,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"conversation_id"
|
|
],
|
|
"title": "MessageListQuery",
|
|
"type": "object"
|
|
},
|
|
"MessageFeedbackPayload": {
|
|
"properties": {
|
|
"rating": {
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"like",
|
|
"dislike"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"description": "Feedback rating",
|
|
"title": "Rating"
|
|
},
|
|
"content": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"description": "Feedback content",
|
|
"title": "Content"
|
|
}
|
|
},
|
|
"title": "MessageFeedbackPayload",
|
|
"type": "object"
|
|
},
|
|
"FeedbackListQuery": {
|
|
"properties": {
|
|
"page": {
|
|
"default": 1,
|
|
"description": "Page number",
|
|
"minimum": 1,
|
|
"title": "Page",
|
|
"type": "integer"
|
|
},
|
|
"limit": {
|
|
"default": 20,
|
|
"description": "Number of feedbacks per page",
|
|
"maximum": 101,
|
|
"minimum": 1,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"title": "FeedbackListQuery",
|
|
"type": "object"
|
|
},
|
|
"WorkflowRun": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"workflow_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"inputs": {
|
|
"type": "object"
|
|
},
|
|
"outputs": {
|
|
"type": "object"
|
|
},
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"total_steps": {
|
|
"type": "integer"
|
|
},
|
|
"total_tokens": {
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"type": "object"
|
|
},
|
|
"finished_at": {
|
|
"type": "object"
|
|
},
|
|
"elapsed_time": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"WorkflowRunPayload": {
|
|
"properties": {
|
|
"inputs": {
|
|
"additionalProperties": true,
|
|
"title": "Inputs",
|
|
"type": "object"
|
|
},
|
|
"files": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Files"
|
|
},
|
|
"response_mode": {
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"blocking",
|
|
"streaming"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Response Mode"
|
|
}
|
|
},
|
|
"required": [
|
|
"inputs"
|
|
],
|
|
"title": "WorkflowRunPayload",
|
|
"type": "object"
|
|
},
|
|
"WorkflowLogQuery": {
|
|
"properties": {
|
|
"keyword": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Keyword"
|
|
},
|
|
"status": {
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"succeeded",
|
|
"failed",
|
|
"stopped"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Status"
|
|
},
|
|
"created_at__before": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Created At Before"
|
|
},
|
|
"created_at__after": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Created At After"
|
|
},
|
|
"created_by_end_user_session_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Created By End User Session Id"
|
|
},
|
|
"created_by_account": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Created By Account"
|
|
},
|
|
"page": {
|
|
"default": 1,
|
|
"maximum": 99999,
|
|
"minimum": 1,
|
|
"title": "Page",
|
|
"type": "integer"
|
|
},
|
|
"limit": {
|
|
"default": 20,
|
|
"maximum": 100,
|
|
"minimum": 1,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"title": "WorkflowLogQuery",
|
|
"type": "object"
|
|
},
|
|
"WorkflowAppLogPagination": {
|
|
"properties": {
|
|
"page": {
|
|
"type": "integer"
|
|
},
|
|
"limit": {
|
|
"type": "integer"
|
|
},
|
|
"total": {
|
|
"type": "integer"
|
|
},
|
|
"has_more": {
|
|
"type": "boolean"
|
|
},
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#\/definitions\/WorkflowAppLogPartial"
|
|
}
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"WorkflowAppLogPartial": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"workflow_run": {
|
|
"$ref": "#\/definitions\/WorkflowRunForLog"
|
|
},
|
|
"details": {
|
|
"type": "object"
|
|
},
|
|
"created_from": {
|
|
"type": "string"
|
|
},
|
|
"created_by_role": {
|
|
"type": "string"
|
|
},
|
|
"created_by_account": {
|
|
"$ref": "#\/definitions\/SimpleAccount"
|
|
},
|
|
"created_by_end_user": {
|
|
"$ref": "#\/definitions\/SimpleEndUser"
|
|
},
|
|
"created_at": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"WorkflowRunForLog": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"triggered_from": {
|
|
"type": "string"
|
|
},
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"elapsed_time": {
|
|
"type": "number"
|
|
},
|
|
"total_tokens": {
|
|
"type": "integer"
|
|
},
|
|
"total_steps": {
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"type": "object"
|
|
},
|
|
"finished_at": {
|
|
"type": "object"
|
|
},
|
|
"exceptions_count": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"SimpleAccount": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"SimpleEndUser": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"is_anonymous": {
|
|
"type": "boolean"
|
|
},
|
|
"session_id": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"DatasetCreatePayload": {
|
|
"$defs": {
|
|
"DatasetPermissionEnum": {
|
|
"enum": [
|
|
"only_me",
|
|
"all_team_members",
|
|
"partial_members"
|
|
],
|
|
"title": "DatasetPermissionEnum",
|
|
"type": "string"
|
|
},
|
|
"RerankingModel": {
|
|
"properties": {
|
|
"reranking_provider_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Reranking Provider Name"
|
|
},
|
|
"reranking_model_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Reranking Model Name"
|
|
}
|
|
},
|
|
"title": "RerankingModel",
|
|
"type": "object"
|
|
},
|
|
"RetrievalMethod": {
|
|
"enum": [
|
|
"semantic_search",
|
|
"full_text_search",
|
|
"hybrid_search",
|
|
"keyword_search"
|
|
],
|
|
"title": "RetrievalMethod",
|
|
"type": "string"
|
|
},
|
|
"RetrievalModel": {
|
|
"properties": {
|
|
"search_method": {
|
|
"$ref": "#\/definitions\/RetrievalMethod"
|
|
},
|
|
"reranking_enable": {
|
|
"title": "Reranking Enable",
|
|
"type": "boolean"
|
|
},
|
|
"reranking_model": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/RerankingModel"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
},
|
|
"reranking_mode": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Reranking Mode"
|
|
},
|
|
"top_k": {
|
|
"title": "Top K",
|
|
"type": "integer"
|
|
},
|
|
"score_threshold_enabled": {
|
|
"title": "Score Threshold Enabled",
|
|
"type": "boolean"
|
|
},
|
|
"score_threshold": {
|
|
"anyOf": [
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Score Threshold"
|
|
},
|
|
"weights": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/WeightModel"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
}
|
|
},
|
|
"required": [
|
|
"search_method",
|
|
"reranking_enable",
|
|
"top_k",
|
|
"score_threshold_enabled"
|
|
],
|
|
"title": "RetrievalModel",
|
|
"type": "object"
|
|
},
|
|
"WeightKeywordSetting": {
|
|
"properties": {
|
|
"keyword_weight": {
|
|
"title": "Keyword Weight",
|
|
"type": "number"
|
|
}
|
|
},
|
|
"required": [
|
|
"keyword_weight"
|
|
],
|
|
"title": "WeightKeywordSetting",
|
|
"type": "object"
|
|
},
|
|
"WeightModel": {
|
|
"properties": {
|
|
"weight_type": {
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"semantic_first",
|
|
"keyword_first",
|
|
"customized"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Weight Type"
|
|
},
|
|
"vector_setting": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/WeightVectorSetting"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
},
|
|
"keyword_setting": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/WeightKeywordSetting"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
}
|
|
},
|
|
"title": "WeightModel",
|
|
"type": "object"
|
|
},
|
|
"WeightVectorSetting": {
|
|
"properties": {
|
|
"vector_weight": {
|
|
"title": "Vector Weight",
|
|
"type": "number"
|
|
},
|
|
"embedding_provider_name": {
|
|
"title": "Embedding Provider Name",
|
|
"type": "string"
|
|
},
|
|
"embedding_model_name": {
|
|
"title": "Embedding Model Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"vector_weight",
|
|
"embedding_provider_name",
|
|
"embedding_model_name"
|
|
],
|
|
"title": "WeightVectorSetting",
|
|
"type": "object"
|
|
}
|
|
},
|
|
"properties": {
|
|
"name": {
|
|
"maxLength": 40,
|
|
"minLength": 1,
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"default": "",
|
|
"description": "Dataset description (max 400 chars)",
|
|
"maxLength": 400,
|
|
"title": "Description",
|
|
"type": "string"
|
|
},
|
|
"indexing_technique": {
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"high_quality",
|
|
"economy"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Indexing Technique"
|
|
},
|
|
"permission": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/DatasetPermissionEnum"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": "only_me"
|
|
},
|
|
"external_knowledge_api_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "External Knowledge Api Id"
|
|
},
|
|
"provider": {
|
|
"default": "vendor",
|
|
"title": "Provider",
|
|
"type": "string"
|
|
},
|
|
"external_knowledge_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "External Knowledge Id"
|
|
},
|
|
"retrieval_model": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/RetrievalModel"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
},
|
|
"embedding_model": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Embedding Model"
|
|
},
|
|
"embedding_model_provider": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Embedding Model Provider"
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
],
|
|
"title": "DatasetCreatePayload",
|
|
"type": "object"
|
|
},
|
|
"DatasetUpdatePayload": {
|
|
"$defs": {
|
|
"DatasetPermissionEnum": {
|
|
"enum": [
|
|
"only_me",
|
|
"all_team_members",
|
|
"partial_members"
|
|
],
|
|
"title": "DatasetPermissionEnum",
|
|
"type": "string"
|
|
},
|
|
"RerankingModel": {
|
|
"properties": {
|
|
"reranking_provider_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Reranking Provider Name"
|
|
},
|
|
"reranking_model_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Reranking Model Name"
|
|
}
|
|
},
|
|
"title": "RerankingModel",
|
|
"type": "object"
|
|
},
|
|
"RetrievalMethod": {
|
|
"enum": [
|
|
"semantic_search",
|
|
"full_text_search",
|
|
"hybrid_search",
|
|
"keyword_search"
|
|
],
|
|
"title": "RetrievalMethod",
|
|
"type": "string"
|
|
},
|
|
"RetrievalModel": {
|
|
"properties": {
|
|
"search_method": {
|
|
"$ref": "#\/definitions\/RetrievalMethod"
|
|
},
|
|
"reranking_enable": {
|
|
"title": "Reranking Enable",
|
|
"type": "boolean"
|
|
},
|
|
"reranking_model": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/RerankingModel"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
},
|
|
"reranking_mode": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Reranking Mode"
|
|
},
|
|
"top_k": {
|
|
"title": "Top K",
|
|
"type": "integer"
|
|
},
|
|
"score_threshold_enabled": {
|
|
"title": "Score Threshold Enabled",
|
|
"type": "boolean"
|
|
},
|
|
"score_threshold": {
|
|
"anyOf": [
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Score Threshold"
|
|
},
|
|
"weights": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/WeightModel"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
}
|
|
},
|
|
"required": [
|
|
"search_method",
|
|
"reranking_enable",
|
|
"top_k",
|
|
"score_threshold_enabled"
|
|
],
|
|
"title": "RetrievalModel",
|
|
"type": "object"
|
|
},
|
|
"WeightKeywordSetting": {
|
|
"properties": {
|
|
"keyword_weight": {
|
|
"title": "Keyword Weight",
|
|
"type": "number"
|
|
}
|
|
},
|
|
"required": [
|
|
"keyword_weight"
|
|
],
|
|
"title": "WeightKeywordSetting",
|
|
"type": "object"
|
|
},
|
|
"WeightModel": {
|
|
"properties": {
|
|
"weight_type": {
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"semantic_first",
|
|
"keyword_first",
|
|
"customized"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Weight Type"
|
|
},
|
|
"vector_setting": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/WeightVectorSetting"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
},
|
|
"keyword_setting": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/WeightKeywordSetting"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
}
|
|
},
|
|
"title": "WeightModel",
|
|
"type": "object"
|
|
},
|
|
"WeightVectorSetting": {
|
|
"properties": {
|
|
"vector_weight": {
|
|
"title": "Vector Weight",
|
|
"type": "number"
|
|
},
|
|
"embedding_provider_name": {
|
|
"title": "Embedding Provider Name",
|
|
"type": "string"
|
|
},
|
|
"embedding_model_name": {
|
|
"title": "Embedding Model Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"vector_weight",
|
|
"embedding_provider_name",
|
|
"embedding_model_name"
|
|
],
|
|
"title": "WeightVectorSetting",
|
|
"type": "object"
|
|
}
|
|
},
|
|
"properties": {
|
|
"name": {
|
|
"anyOf": [
|
|
{
|
|
"maxLength": 40,
|
|
"minLength": 1,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Name"
|
|
},
|
|
"description": {
|
|
"anyOf": [
|
|
{
|
|
"maxLength": 400,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"description": "Dataset description (max 400 chars)",
|
|
"title": "Description"
|
|
},
|
|
"indexing_technique": {
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"high_quality",
|
|
"economy"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Indexing Technique"
|
|
},
|
|
"permission": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/DatasetPermissionEnum"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
},
|
|
"embedding_model": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Embedding Model"
|
|
},
|
|
"embedding_model_provider": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Embedding Model Provider"
|
|
},
|
|
"retrieval_model": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/RetrievalModel"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
},
|
|
"partial_member_list": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Partial Member List"
|
|
},
|
|
"external_retrieval_model": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "External Retrieval Model"
|
|
},
|
|
"external_knowledge_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "External Knowledge Id"
|
|
},
|
|
"external_knowledge_api_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "External Knowledge Api Id"
|
|
}
|
|
},
|
|
"title": "DatasetUpdatePayload",
|
|
"type": "object"
|
|
},
|
|
"TagCreatePayload": {
|
|
"properties": {
|
|
"name": {
|
|
"maxLength": 50,
|
|
"minLength": 1,
|
|
"title": "Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
],
|
|
"title": "TagCreatePayload",
|
|
"type": "object"
|
|
},
|
|
"TagDeletePayload": {
|
|
"properties": {
|
|
"tag_id": {
|
|
"title": "Tag Id",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"tag_id"
|
|
],
|
|
"title": "TagDeletePayload",
|
|
"type": "object"
|
|
},
|
|
"TagUpdatePayload": {
|
|
"properties": {
|
|
"name": {
|
|
"maxLength": 50,
|
|
"minLength": 1,
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"tag_id": {
|
|
"title": "Tag Id",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"tag_id"
|
|
],
|
|
"title": "TagUpdatePayload",
|
|
"type": "object"
|
|
},
|
|
"DataSetTag": {
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"binding_count": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"TagBindingPayload": {
|
|
"properties": {
|
|
"tag_ids": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"title": "Tag Ids",
|
|
"type": "array"
|
|
},
|
|
"target_id": {
|
|
"title": "Target Id",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"tag_ids",
|
|
"target_id"
|
|
],
|
|
"title": "TagBindingPayload",
|
|
"type": "object"
|
|
},
|
|
"TagUnbindingPayload": {
|
|
"properties": {
|
|
"tag_id": {
|
|
"title": "Tag Id",
|
|
"type": "string"
|
|
},
|
|
"target_id": {
|
|
"title": "Target Id",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"tag_id",
|
|
"target_id"
|
|
],
|
|
"title": "TagUnbindingPayload",
|
|
"type": "object"
|
|
},
|
|
"DocumentTextCreatePayload": {
|
|
"$defs": {
|
|
"PreProcessingRule": {
|
|
"properties": {
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "string"
|
|
},
|
|
"enabled": {
|
|
"title": "Enabled",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"enabled"
|
|
],
|
|
"title": "PreProcessingRule",
|
|
"type": "object"
|
|
},
|
|
"ProcessRule": {
|
|
"properties": {
|
|
"mode": {
|
|
"enum": [
|
|
"automatic",
|
|
"custom",
|
|
"hierarchical"
|
|
],
|
|
"title": "Mode",
|
|
"type": "string"
|
|
},
|
|
"rules": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/Rule"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
}
|
|
},
|
|
"required": [
|
|
"mode"
|
|
],
|
|
"title": "ProcessRule",
|
|
"type": "object"
|
|
},
|
|
"RerankingModel": {
|
|
"properties": {
|
|
"reranking_provider_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Reranking Provider Name"
|
|
},
|
|
"reranking_model_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Reranking Model Name"
|
|
}
|
|
},
|
|
"title": "RerankingModel",
|
|
"type": "object"
|
|
},
|
|
"RetrievalMethod": {
|
|
"enum": [
|
|
"semantic_search",
|
|
"full_text_search",
|
|
"hybrid_search",
|
|
"keyword_search"
|
|
],
|
|
"title": "RetrievalMethod",
|
|
"type": "string"
|
|
},
|
|
"RetrievalModel": {
|
|
"properties": {
|
|
"search_method": {
|
|
"$ref": "#\/definitions\/RetrievalMethod"
|
|
},
|
|
"reranking_enable": {
|
|
"title": "Reranking Enable",
|
|
"type": "boolean"
|
|
},
|
|
"reranking_model": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/RerankingModel"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
},
|
|
"reranking_mode": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Reranking Mode"
|
|
},
|
|
"top_k": {
|
|
"title": "Top K",
|
|
"type": "integer"
|
|
},
|
|
"score_threshold_enabled": {
|
|
"title": "Score Threshold Enabled",
|
|
"type": "boolean"
|
|
},
|
|
"score_threshold": {
|
|
"anyOf": [
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Score Threshold"
|
|
},
|
|
"weights": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/WeightModel"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
}
|
|
},
|
|
"required": [
|
|
"search_method",
|
|
"reranking_enable",
|
|
"top_k",
|
|
"score_threshold_enabled"
|
|
],
|
|
"title": "RetrievalModel",
|
|
"type": "object"
|
|
},
|
|
"Rule": {
|
|
"properties": {
|
|
"pre_processing_rules": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"$ref": "#\/definitions\/PreProcessingRule"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Pre Processing Rules"
|
|
},
|
|
"segmentation": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/Segmentation"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
},
|
|
"parent_mode": {
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"full-doc",
|
|
"paragraph"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Parent Mode"
|
|
},
|
|
"subchunk_segmentation": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/Segmentation"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
}
|
|
},
|
|
"title": "Rule",
|
|
"type": "object"
|
|
},
|
|
"Segmentation": {
|
|
"properties": {
|
|
"separator": {
|
|
"default": "\n",
|
|
"title": "Separator",
|
|
"type": "string"
|
|
},
|
|
"max_tokens": {
|
|
"title": "Max Tokens",
|
|
"type": "integer"
|
|
},
|
|
"chunk_overlap": {
|
|
"default": 0,
|
|
"title": "Chunk Overlap",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"max_tokens"
|
|
],
|
|
"title": "Segmentation",
|
|
"type": "object"
|
|
},
|
|
"WeightKeywordSetting": {
|
|
"properties": {
|
|
"keyword_weight": {
|
|
"title": "Keyword Weight",
|
|
"type": "number"
|
|
}
|
|
},
|
|
"required": [
|
|
"keyword_weight"
|
|
],
|
|
"title": "WeightKeywordSetting",
|
|
"type": "object"
|
|
},
|
|
"WeightModel": {
|
|
"properties": {
|
|
"weight_type": {
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"semantic_first",
|
|
"keyword_first",
|
|
"customized"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Weight Type"
|
|
},
|
|
"vector_setting": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/WeightVectorSetting"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
},
|
|
"keyword_setting": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/WeightKeywordSetting"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
}
|
|
},
|
|
"title": "WeightModel",
|
|
"type": "object"
|
|
},
|
|
"WeightVectorSetting": {
|
|
"properties": {
|
|
"vector_weight": {
|
|
"title": "Vector Weight",
|
|
"type": "number"
|
|
},
|
|
"embedding_provider_name": {
|
|
"title": "Embedding Provider Name",
|
|
"type": "string"
|
|
},
|
|
"embedding_model_name": {
|
|
"title": "Embedding Model Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"vector_weight",
|
|
"embedding_provider_name",
|
|
"embedding_model_name"
|
|
],
|
|
"title": "WeightVectorSetting",
|
|
"type": "object"
|
|
}
|
|
},
|
|
"properties": {
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"text": {
|
|
"title": "Text",
|
|
"type": "string"
|
|
},
|
|
"process_rule": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/ProcessRule"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
},
|
|
"original_document_id": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Original Document Id"
|
|
},
|
|
"doc_form": {
|
|
"default": "text_model",
|
|
"title": "Doc Form",
|
|
"type": "string"
|
|
},
|
|
"doc_language": {
|
|
"default": "English",
|
|
"title": "Doc Language",
|
|
"type": "string"
|
|
},
|
|
"indexing_technique": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Indexing Technique"
|
|
},
|
|
"retrieval_model": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/RetrievalModel"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
},
|
|
"embedding_model": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Embedding Model"
|
|
},
|
|
"embedding_model_provider": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Embedding Model Provider"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"text"
|
|
],
|
|
"title": "DocumentTextCreatePayload",
|
|
"type": "object"
|
|
},
|
|
"DocumentTextUpdate": {
|
|
"$defs": {
|
|
"PreProcessingRule": {
|
|
"properties": {
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "string"
|
|
},
|
|
"enabled": {
|
|
"title": "Enabled",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"enabled"
|
|
],
|
|
"title": "PreProcessingRule",
|
|
"type": "object"
|
|
},
|
|
"ProcessRule": {
|
|
"properties": {
|
|
"mode": {
|
|
"enum": [
|
|
"automatic",
|
|
"custom",
|
|
"hierarchical"
|
|
],
|
|
"title": "Mode",
|
|
"type": "string"
|
|
},
|
|
"rules": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/Rule"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
}
|
|
},
|
|
"required": [
|
|
"mode"
|
|
],
|
|
"title": "ProcessRule",
|
|
"type": "object"
|
|
},
|
|
"RerankingModel": {
|
|
"properties": {
|
|
"reranking_provider_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Reranking Provider Name"
|
|
},
|
|
"reranking_model_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Reranking Model Name"
|
|
}
|
|
},
|
|
"title": "RerankingModel",
|
|
"type": "object"
|
|
},
|
|
"RetrievalMethod": {
|
|
"enum": [
|
|
"semantic_search",
|
|
"full_text_search",
|
|
"hybrid_search",
|
|
"keyword_search"
|
|
],
|
|
"title": "RetrievalMethod",
|
|
"type": "string"
|
|
},
|
|
"RetrievalModel": {
|
|
"properties": {
|
|
"search_method": {
|
|
"$ref": "#\/definitions\/RetrievalMethod"
|
|
},
|
|
"reranking_enable": {
|
|
"title": "Reranking Enable",
|
|
"type": "boolean"
|
|
},
|
|
"reranking_model": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/RerankingModel"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
},
|
|
"reranking_mode": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Reranking Mode"
|
|
},
|
|
"top_k": {
|
|
"title": "Top K",
|
|
"type": "integer"
|
|
},
|
|
"score_threshold_enabled": {
|
|
"title": "Score Threshold Enabled",
|
|
"type": "boolean"
|
|
},
|
|
"score_threshold": {
|
|
"anyOf": [
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Score Threshold"
|
|
},
|
|
"weights": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/WeightModel"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
}
|
|
},
|
|
"required": [
|
|
"search_method",
|
|
"reranking_enable",
|
|
"top_k",
|
|
"score_threshold_enabled"
|
|
],
|
|
"title": "RetrievalModel",
|
|
"type": "object"
|
|
},
|
|
"Rule": {
|
|
"properties": {
|
|
"pre_processing_rules": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"$ref": "#\/definitions\/PreProcessingRule"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Pre Processing Rules"
|
|
},
|
|
"segmentation": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/Segmentation"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
},
|
|
"parent_mode": {
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"full-doc",
|
|
"paragraph"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Parent Mode"
|
|
},
|
|
"subchunk_segmentation": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/Segmentation"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
}
|
|
},
|
|
"title": "Rule",
|
|
"type": "object"
|
|
},
|
|
"Segmentation": {
|
|
"properties": {
|
|
"separator": {
|
|
"default": "\n",
|
|
"title": "Separator",
|
|
"type": "string"
|
|
},
|
|
"max_tokens": {
|
|
"title": "Max Tokens",
|
|
"type": "integer"
|
|
},
|
|
"chunk_overlap": {
|
|
"default": 0,
|
|
"title": "Chunk Overlap",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"max_tokens"
|
|
],
|
|
"title": "Segmentation",
|
|
"type": "object"
|
|
},
|
|
"WeightKeywordSetting": {
|
|
"properties": {
|
|
"keyword_weight": {
|
|
"title": "Keyword Weight",
|
|
"type": "number"
|
|
}
|
|
},
|
|
"required": [
|
|
"keyword_weight"
|
|
],
|
|
"title": "WeightKeywordSetting",
|
|
"type": "object"
|
|
},
|
|
"WeightModel": {
|
|
"properties": {
|
|
"weight_type": {
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"semantic_first",
|
|
"keyword_first",
|
|
"customized"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Weight Type"
|
|
},
|
|
"vector_setting": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/WeightVectorSetting"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
},
|
|
"keyword_setting": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/WeightKeywordSetting"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
}
|
|
},
|
|
"title": "WeightModel",
|
|
"type": "object"
|
|
},
|
|
"WeightVectorSetting": {
|
|
"properties": {
|
|
"vector_weight": {
|
|
"title": "Vector Weight",
|
|
"type": "number"
|
|
},
|
|
"embedding_provider_name": {
|
|
"title": "Embedding Provider Name",
|
|
"type": "string"
|
|
},
|
|
"embedding_model_name": {
|
|
"title": "Embedding Model Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"vector_weight",
|
|
"embedding_provider_name",
|
|
"embedding_model_name"
|
|
],
|
|
"title": "WeightVectorSetting",
|
|
"type": "object"
|
|
}
|
|
},
|
|
"properties": {
|
|
"name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Name"
|
|
},
|
|
"text": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Text"
|
|
},
|
|
"process_rule": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/ProcessRule"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
},
|
|
"doc_form": {
|
|
"default": "text_model",
|
|
"title": "Doc Form",
|
|
"type": "string"
|
|
},
|
|
"doc_language": {
|
|
"default": "English",
|
|
"title": "Doc Language",
|
|
"type": "string"
|
|
},
|
|
"retrieval_model": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/RetrievalModel"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
}
|
|
},
|
|
"title": "DocumentTextUpdate",
|
|
"type": "object"
|
|
},
|
|
"HitTestingPayload": {
|
|
"properties": {
|
|
"query": {
|
|
"maxLength": 250,
|
|
"title": "Query",
|
|
"type": "string"
|
|
},
|
|
"retrieval_model": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Retrieval Model"
|
|
},
|
|
"external_retrieval_model": {
|
|
"anyOf": [
|
|
{
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "External Retrieval Model"
|
|
},
|
|
"attachment_ids": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Attachment Ids"
|
|
}
|
|
},
|
|
"required": [
|
|
"query"
|
|
],
|
|
"title": "HitTestingPayload",
|
|
"type": "object"
|
|
},
|
|
"MetadataArgs": {
|
|
"properties": {
|
|
"type": {
|
|
"enum": [
|
|
"string",
|
|
"number",
|
|
"time"
|
|
],
|
|
"title": "Type",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"name"
|
|
],
|
|
"title": "MetadataArgs",
|
|
"type": "object"
|
|
},
|
|
"MetadataUpdatePayload": {
|
|
"properties": {
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
],
|
|
"title": "MetadataUpdatePayload",
|
|
"type": "object"
|
|
},
|
|
"MetadataOperationData": {
|
|
"$defs": {
|
|
"DocumentMetadataOperation": {
|
|
"properties": {
|
|
"document_id": {
|
|
"title": "Document Id",
|
|
"type": "string"
|
|
},
|
|
"metadata_list": {
|
|
"items": {
|
|
"$ref": "#\/definitions\/MetadataDetail"
|
|
},
|
|
"title": "Metadata List",
|
|
"type": "array"
|
|
},
|
|
"partial_update": {
|
|
"default": false,
|
|
"title": "Partial Update",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"document_id",
|
|
"metadata_list"
|
|
],
|
|
"title": "DocumentMetadataOperation",
|
|
"type": "object"
|
|
},
|
|
"MetadataDetail": {
|
|
"properties": {
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"title": "Name",
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Value"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"name"
|
|
],
|
|
"title": "MetadataDetail",
|
|
"type": "object"
|
|
}
|
|
},
|
|
"description": "Metadata operation data",
|
|
"properties": {
|
|
"operation_data": {
|
|
"items": {
|
|
"$ref": "#\/definitions\/DocumentMetadataOperation"
|
|
},
|
|
"title": "Operation Data",
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"operation_data"
|
|
],
|
|
"title": "MetadataOperationData",
|
|
"type": "object"
|
|
},
|
|
"SegmentListQuery": {
|
|
"properties": {
|
|
"status": {
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"title": "Status",
|
|
"type": "array"
|
|
},
|
|
"keyword": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Keyword"
|
|
}
|
|
},
|
|
"title": "SegmentListQuery",
|
|
"type": "object"
|
|
},
|
|
"SegmentCreatePayload": {
|
|
"properties": {
|
|
"segments": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Segments"
|
|
}
|
|
},
|
|
"title": "SegmentCreatePayload",
|
|
"type": "object"
|
|
},
|
|
"SegmentUpdatePayload": {
|
|
"$defs": {
|
|
"SegmentUpdateArgs": {
|
|
"properties": {
|
|
"content": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Content"
|
|
},
|
|
"answer": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Answer"
|
|
},
|
|
"keywords": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Keywords"
|
|
},
|
|
"regenerate_child_chunks": {
|
|
"default": false,
|
|
"title": "Regenerate Child Chunks",
|
|
"type": "boolean"
|
|
},
|
|
"enabled": {
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Enabled"
|
|
},
|
|
"attachment_ids": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Attachment Ids"
|
|
}
|
|
},
|
|
"title": "SegmentUpdateArgs",
|
|
"type": "object"
|
|
}
|
|
},
|
|
"properties": {
|
|
"segment": {
|
|
"$ref": "#\/definitions\/SegmentUpdateArgs"
|
|
}
|
|
},
|
|
"required": [
|
|
"segment"
|
|
],
|
|
"title": "SegmentUpdatePayload",
|
|
"type": "object"
|
|
},
|
|
"ChildChunkListQuery": {
|
|
"properties": {
|
|
"limit": {
|
|
"default": 20,
|
|
"minimum": 1,
|
|
"title": "Limit",
|
|
"type": "integer"
|
|
},
|
|
"keyword": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Keyword"
|
|
},
|
|
"page": {
|
|
"default": 1,
|
|
"minimum": 1,
|
|
"title": "Page",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"title": "ChildChunkListQuery",
|
|
"type": "object"
|
|
},
|
|
"ChildChunkCreatePayload": {
|
|
"properties": {
|
|
"content": {
|
|
"title": "Content",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"content"
|
|
],
|
|
"title": "ChildChunkCreatePayload",
|
|
"type": "object"
|
|
},
|
|
"ChildChunkUpdatePayload": {
|
|
"properties": {
|
|
"content": {
|
|
"title": "Content",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"content"
|
|
],
|
|
"title": "ChildChunkUpdatePayload",
|
|
"type": "object"
|
|
},
|
|
"ProcessRule": {
|
|
"$defs": {
|
|
"PreProcessingRule": {
|
|
"properties": {
|
|
"id": {
|
|
"title": "Id",
|
|
"type": "string"
|
|
},
|
|
"enabled": {
|
|
"title": "Enabled",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"enabled"
|
|
],
|
|
"title": "PreProcessingRule",
|
|
"type": "object"
|
|
},
|
|
"Rule": {
|
|
"properties": {
|
|
"pre_processing_rules": {
|
|
"anyOf": [
|
|
{
|
|
"items": {
|
|
"$ref": "#\/definitions\/PreProcessingRule"
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Pre Processing Rules"
|
|
},
|
|
"segmentation": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/Segmentation"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
},
|
|
"parent_mode": {
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"full-doc",
|
|
"paragraph"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Parent Mode"
|
|
},
|
|
"subchunk_segmentation": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/Segmentation"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
}
|
|
},
|
|
"title": "Rule",
|
|
"type": "object"
|
|
},
|
|
"Segmentation": {
|
|
"properties": {
|
|
"separator": {
|
|
"default": "\n",
|
|
"title": "Separator",
|
|
"type": "string"
|
|
},
|
|
"max_tokens": {
|
|
"title": "Max Tokens",
|
|
"type": "integer"
|
|
},
|
|
"chunk_overlap": {
|
|
"default": 0,
|
|
"title": "Chunk Overlap",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"max_tokens"
|
|
],
|
|
"title": "Segmentation",
|
|
"type": "object"
|
|
}
|
|
},
|
|
"properties": {
|
|
"mode": {
|
|
"enum": [
|
|
"automatic",
|
|
"custom",
|
|
"hierarchical"
|
|
],
|
|
"title": "Mode",
|
|
"type": "string"
|
|
},
|
|
"rules": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/Rule"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
}
|
|
},
|
|
"required": [
|
|
"mode"
|
|
],
|
|
"title": "ProcessRule",
|
|
"type": "object"
|
|
},
|
|
"RetrievalModel": {
|
|
"$defs": {
|
|
"RerankingModel": {
|
|
"properties": {
|
|
"reranking_provider_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Reranking Provider Name"
|
|
},
|
|
"reranking_model_name": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Reranking Model Name"
|
|
}
|
|
},
|
|
"title": "RerankingModel",
|
|
"type": "object"
|
|
},
|
|
"RetrievalMethod": {
|
|
"enum": [
|
|
"semantic_search",
|
|
"full_text_search",
|
|
"hybrid_search",
|
|
"keyword_search"
|
|
],
|
|
"title": "RetrievalMethod",
|
|
"type": "string"
|
|
},
|
|
"WeightKeywordSetting": {
|
|
"properties": {
|
|
"keyword_weight": {
|
|
"title": "Keyword Weight",
|
|
"type": "number"
|
|
}
|
|
},
|
|
"required": [
|
|
"keyword_weight"
|
|
],
|
|
"title": "WeightKeywordSetting",
|
|
"type": "object"
|
|
},
|
|
"WeightModel": {
|
|
"properties": {
|
|
"weight_type": {
|
|
"anyOf": [
|
|
{
|
|
"enum": [
|
|
"semantic_first",
|
|
"keyword_first",
|
|
"customized"
|
|
],
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Weight Type"
|
|
},
|
|
"vector_setting": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/WeightVectorSetting"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
},
|
|
"keyword_setting": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/WeightKeywordSetting"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
}
|
|
},
|
|
"title": "WeightModel",
|
|
"type": "object"
|
|
},
|
|
"WeightVectorSetting": {
|
|
"properties": {
|
|
"vector_weight": {
|
|
"title": "Vector Weight",
|
|
"type": "number"
|
|
},
|
|
"embedding_provider_name": {
|
|
"title": "Embedding Provider Name",
|
|
"type": "string"
|
|
},
|
|
"embedding_model_name": {
|
|
"title": "Embedding Model Name",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"vector_weight",
|
|
"embedding_provider_name",
|
|
"embedding_model_name"
|
|
],
|
|
"title": "WeightVectorSetting",
|
|
"type": "object"
|
|
}
|
|
},
|
|
"properties": {
|
|
"search_method": {
|
|
"$ref": "#\/definitions\/RetrievalMethod"
|
|
},
|
|
"reranking_enable": {
|
|
"title": "Reranking Enable",
|
|
"type": "boolean"
|
|
},
|
|
"reranking_model": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/RerankingModel"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
},
|
|
"reranking_mode": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Reranking Mode"
|
|
},
|
|
"top_k": {
|
|
"title": "Top K",
|
|
"type": "integer"
|
|
},
|
|
"score_threshold_enabled": {
|
|
"title": "Score Threshold Enabled",
|
|
"type": "boolean"
|
|
},
|
|
"score_threshold": {
|
|
"anyOf": [
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null,
|
|
"title": "Score Threshold"
|
|
},
|
|
"weights": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#\/definitions\/WeightModel"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"default": null
|
|
}
|
|
},
|
|
"required": [
|
|
"search_method",
|
|
"reranking_enable",
|
|
"top_k",
|
|
"score_threshold_enabled"
|
|
],
|
|
"title": "RetrievalModel",
|
|
"type": "object"
|
|
}
|
|
},
|
|
"responses": {
|
|
"ParseError": {
|
|
"description": "When a mask can't be parsed"
|
|
},
|
|
"MaskError": {
|
|
"description": "When any error occurs on mask"
|
|
},
|
|
"HTTPException": {},
|
|
"ValueError": {},
|
|
"AppInvokeQuotaExceededError": {},
|
|
"Exception": {}
|
|
}
|
|
}
|