UPDATE: Chatbot module
All checks were successful
Build and Release / release (push) Successful in 2m13s
All checks were successful
Build and Release / release (push) Successful in 2m13s
This commit is contained in:
90
docs/docs.go
90
docs/docs.go
@@ -399,6 +399,69 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/chatbot/chat": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Ask a history question based on project context or global knowledge using RAG",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Chatbot"
|
||||
],
|
||||
"summary": "Ask the AI chatbot",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Chatbot query",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_request.ChatbotDto"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful response with AI answer",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/entities": {
|
||||
"get": {
|
||||
"description": "Search entities with cursor pagination",
|
||||
@@ -3582,6 +3645,20 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"history-api_internal_dtos_request.ChatbotDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"question"
|
||||
],
|
||||
"properties": {
|
||||
"project_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"question": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"history-api_internal_dtos_request.CommitSnapshot": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3814,8 +3891,11 @@ const docTemplate = `{
|
||||
1
|
||||
]
|
||||
},
|
||||
"type_id": {
|
||||
"type": "string"
|
||||
"time_end": {
|
||||
"type": "number"
|
||||
},
|
||||
"time_start": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3830,7 +3910,6 @@ const docTemplate = `{
|
||||
"type": "string"
|
||||
},
|
||||
"is_deleted": {
|
||||
"description": "Legacy / Compatibility",
|
||||
"type": "integer",
|
||||
"enum": [
|
||||
0,
|
||||
@@ -4267,10 +4346,7 @@ const docTemplate = `{
|
||||
],
|
||||
"properties": {
|
||||
"doc": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
|
||||
@@ -392,6 +392,69 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/chatbot/chat": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Ask a history question based on project context or global knowledge using RAG",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Chatbot"
|
||||
],
|
||||
"summary": "Ask the AI chatbot",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Chatbot query",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_request.ChatbotDto"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful response with AI answer",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/entities": {
|
||||
"get": {
|
||||
"description": "Search entities with cursor pagination",
|
||||
@@ -3575,6 +3638,20 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"history-api_internal_dtos_request.ChatbotDto": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"question"
|
||||
],
|
||||
"properties": {
|
||||
"project_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"question": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"history-api_internal_dtos_request.CommitSnapshot": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3807,8 +3884,11 @@
|
||||
1
|
||||
]
|
||||
},
|
||||
"type_id": {
|
||||
"type": "string"
|
||||
"time_end": {
|
||||
"type": "number"
|
||||
},
|
||||
"time_start": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3823,7 +3903,6 @@
|
||||
"type": "string"
|
||||
},
|
||||
"is_deleted": {
|
||||
"description": "Legacy / Compatibility",
|
||||
"type": "integer",
|
||||
"enum": [
|
||||
0,
|
||||
@@ -4260,10 +4339,7 @@
|
||||
],
|
||||
"properties": {
|
||||
"doc": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
|
||||
@@ -59,6 +59,15 @@ definitions:
|
||||
required:
|
||||
- role_ids
|
||||
type: object
|
||||
history-api_internal_dtos_request.ChatbotDto:
|
||||
properties:
|
||||
project_id:
|
||||
type: string
|
||||
question:
|
||||
type: string
|
||||
required:
|
||||
- question
|
||||
type: object
|
||||
history-api_internal_dtos_request.CommitSnapshot:
|
||||
properties:
|
||||
editor_feature_collection:
|
||||
@@ -217,8 +226,10 @@ definitions:
|
||||
- 0
|
||||
- 1
|
||||
type: integer
|
||||
type_id:
|
||||
type: string
|
||||
time_end:
|
||||
type: number
|
||||
time_start:
|
||||
type: number
|
||||
required:
|
||||
- id
|
||||
type: object
|
||||
@@ -227,7 +238,6 @@ definitions:
|
||||
entity_id:
|
||||
type: string
|
||||
is_deleted:
|
||||
description: Legacy / Compatibility
|
||||
enum:
|
||||
- 0
|
||||
- 1
|
||||
@@ -530,9 +540,7 @@ definitions:
|
||||
history-api_internal_dtos_request.WikiSnapshot:
|
||||
properties:
|
||||
doc:
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
type: string
|
||||
id:
|
||||
type: string
|
||||
operation:
|
||||
@@ -857,6 +865,44 @@ paths:
|
||||
summary: Verify a security token
|
||||
tags:
|
||||
- Auth
|
||||
/chatbot/chat:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Ask a history question based on project context or global knowledge
|
||||
using RAG
|
||||
parameters:
|
||||
- description: Chatbot query
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_request.ChatbotDto'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: Successful response with AI answer
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
||||
- properties:
|
||||
data:
|
||||
type: string
|
||||
type: object
|
||||
"400":
|
||||
description: Invalid request
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
||||
"500":
|
||||
description: Internal server error
|
||||
schema:
|
||||
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Ask the AI chatbot
|
||||
tags:
|
||||
- Chatbot
|
||||
/entities:
|
||||
get:
|
||||
consumes:
|
||||
|
||||
Reference in New Issue
Block a user