2025-12-16 08:40:13 +00:00
|
|
|
|
basePath: /api/v1
|
|
|
|
|
|
definitions:
|
2026-03-30 13:20:14 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_datasource.ConnectorMetadata:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
auth_type:
|
|
|
|
|
|
description: '"oauth2", "api_key", "token", etc.'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
capabilities:
|
|
|
|
|
|
description: '"incremental", "webhook", "deletion_sync", etc.'
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
description:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
icon:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
priority:
|
|
|
|
|
|
description: Priority order for UI display (lower = higher priority)
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2025-12-16 08:40:13 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_errors.AppError:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
code:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.ErrorCode'
|
|
|
|
|
|
details: {}
|
|
|
|
|
|
message:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_errors.ErrorCode:
|
|
|
|
|
|
enum:
|
|
|
|
|
|
- 1000
|
|
|
|
|
|
- 1001
|
|
|
|
|
|
- 1002
|
|
|
|
|
|
- 1003
|
|
|
|
|
|
- 1004
|
|
|
|
|
|
- 1005
|
|
|
|
|
|
- 1006
|
|
|
|
|
|
- 1007
|
|
|
|
|
|
- 1008
|
|
|
|
|
|
- 1009
|
|
|
|
|
|
- 1010
|
|
|
|
|
|
- 2000
|
|
|
|
|
|
- 2001
|
|
|
|
|
|
- 2002
|
|
|
|
|
|
- 2003
|
|
|
|
|
|
- 2004
|
|
|
|
|
|
- 2100
|
|
|
|
|
|
- 2101
|
|
|
|
|
|
- 2102
|
|
|
|
|
|
- 2103
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
x-enum-varnames:
|
|
|
|
|
|
- ErrBadRequest
|
|
|
|
|
|
- ErrUnauthorized
|
|
|
|
|
|
- ErrForbidden
|
|
|
|
|
|
- ErrNotFound
|
|
|
|
|
|
- ErrMethodNotAllowed
|
|
|
|
|
|
- ErrConflict
|
|
|
|
|
|
- ErrTooManyRequests
|
|
|
|
|
|
- ErrInternalServer
|
|
|
|
|
|
- ErrServiceUnavailable
|
|
|
|
|
|
- ErrTimeout
|
|
|
|
|
|
- ErrValidation
|
|
|
|
|
|
- ErrTenantNotFound
|
|
|
|
|
|
- ErrTenantAlreadyExists
|
|
|
|
|
|
- ErrTenantInactive
|
|
|
|
|
|
- ErrTenantNameRequired
|
|
|
|
|
|
- ErrTenantInvalidStatus
|
|
|
|
|
|
- ErrAgentMissingThinkingModel
|
|
|
|
|
|
- ErrAgentMissingAllowedTools
|
|
|
|
|
|
- ErrAgentInvalidMaxIterations
|
|
|
|
|
|
- ErrAgentInvalidTemperature
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.AgentConfig:
|
|
|
|
|
|
properties:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
allowed_skills:
|
|
|
|
|
|
description: Skill names whitelist (empty = allow all)
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
2025-12-16 08:40:13 +00:00
|
|
|
|
allowed_tools:
|
|
|
|
|
|
description: List of allowed tool names
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
2026-02-26 12:59:52 +00:00
|
|
|
|
history_turns:
|
|
|
|
|
|
description: Number of history turns to keep in context
|
|
|
|
|
|
type: integer
|
2025-12-16 08:40:13 +00:00
|
|
|
|
knowledge_bases:
|
|
|
|
|
|
description: Accessible knowledge base IDs
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
2025-12-22 06:36:29 +00:00
|
|
|
|
knowledge_ids:
|
|
|
|
|
|
description: Accessible knowledge IDs (individual documents)
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
2026-03-30 13:20:14 +00:00
|
|
|
|
llm_call_timeout:
|
|
|
|
|
|
description: 'LLM call timeout in seconds (default: 120). Controls the maximum
|
|
|
|
|
|
time for a single LLM call.'
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
max_context_tokens:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
Maximum context window tokens for the agent (default: 200000).
|
|
|
|
|
|
The agent compresses older messages to stay within this limit,
|
|
|
|
|
|
preserving tool_call/tool_result pairs.
|
|
|
|
|
|
type: integer
|
2025-12-16 08:40:13 +00:00
|
|
|
|
max_iterations:
|
|
|
|
|
|
description: Maximum number of ReAct iterations
|
|
|
|
|
|
type: integer
|
2026-03-30 13:20:14 +00:00
|
|
|
|
max_tool_output_chars:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
Maximum character length for tool output (default: 16000).
|
|
|
|
|
|
Outputs exceeding this limit are truncated with head + tail preservation.
|
|
|
|
|
|
type: integer
|
2026-02-26 12:59:52 +00:00
|
|
|
|
mcp_selection_mode:
|
|
|
|
|
|
description: MCP service selection
|
|
|
|
|
|
type: string
|
|
|
|
|
|
mcp_services:
|
|
|
|
|
|
description: Selected MCP service IDs (when mode is "selected")
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
multi_turn_enabled:
|
|
|
|
|
|
description: Whether multi-turn conversation is enabled
|
|
|
|
|
|
type: boolean
|
2026-03-30 13:20:14 +00:00
|
|
|
|
parallel_tool_calls:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
Whether to execute independent tool calls in parallel (default: false).
|
|
|
|
|
|
When enabled and the LLM returns multiple tool calls, they run concurrently via errgroup.
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: boolean
|
2026-02-26 12:59:52 +00:00
|
|
|
|
retrieve_kb_only_when_mentioned:
|
|
|
|
|
|
description: 'Whether to retrieve knowledge base only when explicitly mentioned
|
|
|
|
|
|
with @ (default: false)'
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
skill_dirs:
|
|
|
|
|
|
description: Directories to search for skills
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
skills_enabled:
|
|
|
|
|
|
description: Skills configuration (Progressive Disclosure pattern)
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
system_prompt:
|
|
|
|
|
|
description: Unified system prompt (uses web_search_status placeholder for
|
|
|
|
|
|
dynamic behavior)
|
|
|
|
|
|
type: string
|
2025-12-16 08:40:13 +00:00
|
|
|
|
system_prompt_web_disabled:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: 'Deprecated: Custom prompt when web search is disabled'
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: string
|
|
|
|
|
|
system_prompt_web_enabled:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: 'Deprecated: Use SystemPrompt instead. Kept for backward compatibility
|
|
|
|
|
|
during migration.'
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: string
|
|
|
|
|
|
temperature:
|
|
|
|
|
|
description: LLM temperature for agent
|
|
|
|
|
|
type: number
|
2026-02-26 12:59:52 +00:00
|
|
|
|
thinking:
|
|
|
|
|
|
description: Whether to enable thinking mode (for models that support extended
|
|
|
|
|
|
thinking)
|
|
|
|
|
|
type: boolean
|
2025-12-16 08:40:13 +00:00
|
|
|
|
use_custom_system_prompt:
|
|
|
|
|
|
description: Whether to use custom system prompt instead of default
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
web_search_enabled:
|
|
|
|
|
|
description: Whether web search tool is enabled
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
web_search_max_results:
|
|
|
|
|
|
description: 'Maximum number of web search results (default: 5)'
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.AgentStep:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
iteration:
|
|
|
|
|
|
description: Iteration number (0-indexed)
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
thought:
|
|
|
|
|
|
description: LLM's reasoning/thinking (Think phase)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
timestamp:
|
|
|
|
|
|
description: When this step occurred
|
|
|
|
|
|
type: string
|
|
|
|
|
|
tool_calls:
|
|
|
|
|
|
description: Tools called in this step (Act phase)
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ToolCall'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.AnswerStrategy:
|
|
|
|
|
|
enum:
|
|
|
|
|
|
- all
|
|
|
|
|
|
- random
|
|
|
|
|
|
type: string
|
|
|
|
|
|
x-enum-varnames:
|
|
|
|
|
|
- AnswerStrategyAll
|
|
|
|
|
|
- AnswerStrategyRandom
|
2026-03-30 13:20:14 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.COSEngineConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
app_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
bucket_name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
path_prefix:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
region:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
secret_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
secret_key:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.ChatHistoryConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
embedding_model_id:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
EmbeddingModelID is the ID of the embedding model used for vectorizing chat messages.
|
|
|
|
|
|
Once messages have been indexed, the model cannot be changed (requires re-indexing).
|
|
|
|
|
|
type: string
|
|
|
|
|
|
enabled:
|
|
|
|
|
|
description: Enabled controls whether chat history indexing is active
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
knowledge_base_id:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
KnowledgeBaseID is the auto-managed hidden knowledge base for chat history.
|
|
|
|
|
|
This is set internally when the feature is first enabled; users should not set this directly.
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2025-12-16 08:40:13 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.ChunkingConfig:
|
|
|
|
|
|
properties:
|
2026-03-30 13:20:14 +00:00
|
|
|
|
child_chunk_size:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
ChildChunkSize is the size of child chunks used for embedding (default: 384).
|
|
|
|
|
|
Only used when EnableParentChild is true.
|
|
|
|
|
|
type: integer
|
2025-12-16 08:40:13 +00:00
|
|
|
|
chunk_overlap:
|
|
|
|
|
|
description: Chunk overlap
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
chunk_size:
|
|
|
|
|
|
description: Chunk size
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
enable_multimodal:
|
|
|
|
|
|
description: EnableMultimodal (deprecated, kept for backward compatibility
|
|
|
|
|
|
with old data)
|
|
|
|
|
|
type: boolean
|
2026-03-30 13:20:14 +00:00
|
|
|
|
enable_parent_child:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
EnableParentChild enables two-level parent-child chunking strategy.
|
|
|
|
|
|
When enabled, large parent chunks provide context while small child chunks
|
|
|
|
|
|
are used for vector matching. Retrieval matches on child but returns parent content.
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
parent_chunk_size:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
ParentChunkSize is the size of parent chunks (default: 4096).
|
|
|
|
|
|
Only used when EnableParentChild is true.
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
parser_engine_rules:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
ParserEngineRules configures which parser engine to use for each file type.
|
|
|
|
|
|
When empty, the builtin engine is used for all types.
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ParserEngineRule'
|
|
|
|
|
|
type: array
|
2025-12-16 08:40:13 +00:00
|
|
|
|
separators:
|
|
|
|
|
|
description: Separators
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.ContextCompressionStrategy:
|
|
|
|
|
|
enum:
|
|
|
|
|
|
- sliding_window
|
|
|
|
|
|
- smart
|
|
|
|
|
|
type: string
|
|
|
|
|
|
x-enum-varnames:
|
|
|
|
|
|
- ContextCompressionSlidingWindow
|
|
|
|
|
|
- ContextCompressionSmart
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.ContextConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
compression_strategy:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ContextCompressionStrategy'
|
|
|
|
|
|
description: 'Compression strategy: "sliding_window" or "smart"'
|
|
|
|
|
|
max_tokens:
|
|
|
|
|
|
description: Maximum tokens allowed in LLM context
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
recent_message_count:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
For sliding_window: number of messages to keep
|
|
|
|
|
|
For smart: number of recent messages to keep uncompressed
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
summarize_threshold:
|
|
|
|
|
|
description: 'Summarize threshold: number of messages before summarization'
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.ConversationConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
context_template:
|
|
|
|
|
|
description: ContextTemplate is the prompt template for summarizing retrieval
|
|
|
|
|
|
results
|
|
|
|
|
|
type: string
|
|
|
|
|
|
embedding_top_k:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
enable_query_expansion:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
enable_rewrite:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
fallback_prompt:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
fallback_response:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
fallback_strategy:
|
|
|
|
|
|
description: Fallback strategy
|
|
|
|
|
|
type: string
|
|
|
|
|
|
keyword_threshold:
|
|
|
|
|
|
type: number
|
|
|
|
|
|
max_completion_tokens:
|
|
|
|
|
|
description: MaxTokens is the maximum number of tokens to generate
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
max_rounds:
|
|
|
|
|
|
description: Retrieval & strategy parameters
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
prompt:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: Prompt is the system prompt for normal mode
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: string
|
|
|
|
|
|
rerank_model_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
rerank_threshold:
|
|
|
|
|
|
type: number
|
|
|
|
|
|
rerank_top_k:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
rewrite_prompt_system:
|
|
|
|
|
|
description: Rewrite prompts
|
|
|
|
|
|
type: string
|
|
|
|
|
|
rewrite_prompt_user:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
summary_model_id:
|
|
|
|
|
|
description: Model configuration
|
|
|
|
|
|
type: string
|
|
|
|
|
|
temperature:
|
|
|
|
|
|
description: Temperature controls the randomness of the model output
|
|
|
|
|
|
type: number
|
2026-02-26 12:59:52 +00:00
|
|
|
|
vector_threshold:
|
|
|
|
|
|
type: number
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.CreateOrganizationRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
avatar:
|
|
|
|
|
|
description: optional avatar URL
|
|
|
|
|
|
maxLength: 512
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description:
|
|
|
|
|
|
maxLength: 1000
|
|
|
|
|
|
type: string
|
|
|
|
|
|
invite_code_validity_days:
|
|
|
|
|
|
description: 'optional: 0=never, 1, 7, 30; default 7'
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
member_limit:
|
|
|
|
|
|
description: 'optional: max members; 0=unlimited; default 50'
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
name:
|
|
|
|
|
|
maxLength: 255
|
|
|
|
|
|
minLength: 1
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- name
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.CustomAgentConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
agent_mode:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
===== Basic Settings =====
|
|
|
|
|
|
Agent mode: "quick-answer" for RAG mode, "smart-reasoning" for ReAct agent mode
|
|
|
|
|
|
type: string
|
|
|
|
|
|
allowed_tools:
|
|
|
|
|
|
description: Allowed tools (only for agent type)
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
context_template:
|
|
|
|
|
|
description: Context template for normal mode (how to format retrieved chunks)
|
|
|
|
|
|
type: string
|
2026-03-30 13:20:14 +00:00
|
|
|
|
context_template_id:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
ContextTemplateID references a template ID in prompt_templates/ YAML files.
|
|
|
|
|
|
If set and ContextTemplate is empty, the template content will be resolved at startup.
|
|
|
|
|
|
type: string
|
2026-02-26 12:59:52 +00:00
|
|
|
|
embedding_top_k:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
===== Retrieval Strategy Settings (for both modes) =====
|
|
|
|
|
|
Embedding/Vector retrieval top K
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
enable_query_expansion:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
===== Advanced Settings (mainly for normal mode) =====
|
|
|
|
|
|
Whether to enable query expansion
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
enable_rewrite:
|
|
|
|
|
|
description: Whether to enable query rewrite for multi-turn conversations
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
fallback_prompt:
|
|
|
|
|
|
description: Fallback prompt (when FallbackStrategy is "model")
|
|
|
|
|
|
type: string
|
|
|
|
|
|
fallback_response:
|
|
|
|
|
|
description: Fixed fallback response (when FallbackStrategy is "fixed")
|
|
|
|
|
|
type: string
|
|
|
|
|
|
fallback_strategy:
|
|
|
|
|
|
description: 'Fallback strategy: "fixed" for fixed response, "model" for model
|
|
|
|
|
|
generation'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
faq_direct_answer_threshold:
|
|
|
|
|
|
description: FAQ direct answer threshold - if similarity > this value, use
|
|
|
|
|
|
FAQ answer directly
|
|
|
|
|
|
type: number
|
|
|
|
|
|
faq_priority_enabled:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
===== FAQ Strategy Settings =====
|
|
|
|
|
|
Whether FAQ priority strategy is enabled (FAQ answers prioritized over document chunks)
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: boolean
|
2026-02-26 12:59:52 +00:00
|
|
|
|
faq_score_boost:
|
|
|
|
|
|
description: FAQ score boost multiplier - FAQ results score multiplied by
|
|
|
|
|
|
this factor
|
|
|
|
|
|
type: number
|
|
|
|
|
|
history_turns:
|
|
|
|
|
|
description: Number of history turns to keep in context
|
|
|
|
|
|
type: integer
|
2026-03-30 13:20:14 +00:00
|
|
|
|
image_storage_provider:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
Storage provider for image uploads: "local", "minio", "cos", "tos"
|
|
|
|
|
|
Empty means use the global/tenant default provider.
|
|
|
|
|
|
type: string
|
|
|
|
|
|
image_upload_enabled:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
===== Image Upload / Multimodal Settings =====
|
|
|
|
|
|
Whether image upload is enabled for this agent (default: false)
|
|
|
|
|
|
type: boolean
|
2026-02-26 12:59:52 +00:00
|
|
|
|
kb_selection_mode:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
===== Knowledge Base Settings =====
|
|
|
|
|
|
Knowledge base selection mode: "all" = all KBs, "selected" = specific KBs, "none" = no KB
|
|
|
|
|
|
type: string
|
|
|
|
|
|
keyword_threshold:
|
|
|
|
|
|
description: Keyword retrieval threshold
|
|
|
|
|
|
type: number
|
|
|
|
|
|
knowledge_bases:
|
|
|
|
|
|
description: Associated knowledge base IDs (only used when KBSelectionMode
|
|
|
|
|
|
is "selected")
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
max_completion_tokens:
|
|
|
|
|
|
description: Maximum completion tokens (only for normal mode)
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
max_iterations:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
===== Agent Mode Settings =====
|
|
|
|
|
|
Maximum iterations for ReAct loop (only for agent type)
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
mcp_selection_mode:
|
|
|
|
|
|
description: 'MCP service selection mode: "all" = all enabled MCP services,
|
|
|
|
|
|
"selected" = specific services, "none" = no MCP'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
mcp_services:
|
|
|
|
|
|
description: Selected MCP service IDs (only used when MCPSelectionMode is
|
|
|
|
|
|
"selected")
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
model_id:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
===== Model Settings =====
|
|
|
|
|
|
Model ID to use for conversations
|
|
|
|
|
|
type: string
|
|
|
|
|
|
multi_turn_enabled:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
===== Multi-turn Conversation Settings =====
|
|
|
|
|
|
Whether multi-turn conversation is enabled
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
rerank_model_id:
|
|
|
|
|
|
description: ReRank model ID for retrieval
|
|
|
|
|
|
type: string
|
|
|
|
|
|
rerank_threshold:
|
|
|
|
|
|
description: Rerank threshold
|
|
|
|
|
|
type: number
|
|
|
|
|
|
rerank_top_k:
|
|
|
|
|
|
description: Rerank top K
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
retrieve_kb_only_when_mentioned:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
Whether to retrieve knowledge base only when explicitly mentioned with @ (default: false)
|
|
|
|
|
|
When true, knowledge base retrieval only happens if user explicitly mentions KB/files with @
|
|
|
|
|
|
When false, knowledge base retrieval happens according to KBSelectionMode
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
rewrite_prompt_system:
|
|
|
|
|
|
description: Rewrite prompt system message
|
|
|
|
|
|
type: string
|
|
|
|
|
|
rewrite_prompt_user:
|
|
|
|
|
|
description: Rewrite prompt user message template
|
|
|
|
|
|
type: string
|
|
|
|
|
|
selected_skills:
|
|
|
|
|
|
description: Selected skill names (only used when SkillsSelectionMode is "selected")
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
skills_selection_mode:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
===== Skills Settings (only for smart-reasoning mode) =====
|
|
|
|
|
|
Skills selection mode: "all" = all preloaded skills, "selected" = specific skills, "none" = no skills
|
|
|
|
|
|
type: string
|
2026-03-30 13:20:14 +00:00
|
|
|
|
suggested_prompts:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
===== Suggested Prompts =====
|
|
|
|
|
|
推荐问题列表,用于在前端对话面板展示快捷提问
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
2026-02-26 12:59:52 +00:00
|
|
|
|
supported_file_types:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
===== File Type Restriction Settings =====
|
|
|
|
|
|
Supported file types for this agent (e.g., ["csv", "xlsx", "xls"])
|
|
|
|
|
|
Empty means all file types are supported
|
|
|
|
|
|
When set, only files with matching extensions can be used with this agent
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
system_prompt:
|
|
|
|
|
|
description: System prompt for the agent (unified prompt, uses web_search_status
|
|
|
|
|
|
placeholder for dynamic behavior)
|
|
|
|
|
|
type: string
|
2026-03-30 13:20:14 +00:00
|
|
|
|
system_prompt_id:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
SystemPromptID references a template ID in prompt_templates/ YAML files.
|
|
|
|
|
|
If set and SystemPrompt is empty, the template content will be resolved at startup.
|
|
|
|
|
|
type: string
|
2026-02-26 12:59:52 +00:00
|
|
|
|
temperature:
|
|
|
|
|
|
description: Temperature for LLM (0-1)
|
|
|
|
|
|
type: number
|
|
|
|
|
|
thinking:
|
|
|
|
|
|
description: Whether to enable thinking mode (for models that support extended
|
|
|
|
|
|
thinking)
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: boolean
|
|
|
|
|
|
vector_threshold:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: Vector retrieval threshold
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: number
|
2026-03-30 13:20:14 +00:00
|
|
|
|
vlm_model_id:
|
|
|
|
|
|
description: VLM model ID for image analysis (optional, falls back to tenant-level
|
|
|
|
|
|
VLM)
|
|
|
|
|
|
type: string
|
2026-02-26 12:59:52 +00:00
|
|
|
|
web_search_enabled:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
===== Web Search Settings =====
|
|
|
|
|
|
Whether web search is enabled
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
web_search_max_results:
|
|
|
|
|
|
description: Maximum web search results
|
|
|
|
|
|
type: integer
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: object
|
2026-03-30 13:20:14 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.DataSource:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
config:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
Encrypted configuration (API credentials, tokens, etc.)
|
|
|
|
|
|
Stored as JSON with AES-256-GCM encryption
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: array
|
|
|
|
|
|
conflict_strategy:
|
|
|
|
|
|
description: 'Conflict resolution strategy: overwrite or skip'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
created_at:
|
|
|
|
|
|
description: Creation timestamp
|
|
|
|
|
|
type: string
|
|
|
|
|
|
deleted_at:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/gorm.DeletedAt'
|
|
|
|
|
|
description: Soft delete timestamp
|
|
|
|
|
|
error_message:
|
|
|
|
|
|
description: Error message if status is "error"
|
|
|
|
|
|
type: string
|
|
|
|
|
|
id:
|
|
|
|
|
|
description: Unique identifier
|
|
|
|
|
|
type: string
|
|
|
|
|
|
knowledge_base_id:
|
|
|
|
|
|
description: Target knowledge base ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
last_sync_at:
|
|
|
|
|
|
description: Last successful sync timestamp
|
|
|
|
|
|
type: string
|
|
|
|
|
|
last_sync_cursor:
|
|
|
|
|
|
description: Cursor or state for incremental sync (connector-specific)
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: array
|
|
|
|
|
|
last_sync_result:
|
|
|
|
|
|
description: Summary of last sync result
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: array
|
|
|
|
|
|
latest_sync_log:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.SyncLog'
|
|
|
|
|
|
description: Latest sync log (not stored in DB, populated on query)
|
|
|
|
|
|
name:
|
|
|
|
|
|
description: User-friendly name
|
|
|
|
|
|
type: string
|
|
|
|
|
|
status:
|
|
|
|
|
|
description: 'Current status: active, paused, error'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
sync_deletions:
|
|
|
|
|
|
description: Whether to sync deletions from source
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
sync_log_retention_days:
|
|
|
|
|
|
description: 'Number of days to keep sync logs (default: 30)'
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
sync_mode:
|
|
|
|
|
|
description: 'Sync mode: "incremental" (recommended) or "full"'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
sync_schedule:
|
|
|
|
|
|
description: Cron expression for scheduled syncs (e.g., "0 */6 * * *" = every
|
|
|
|
|
|
6 hours)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
tenant_id:
|
|
|
|
|
|
description: Tenant ID for multi-tenancy
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
total_items_synced:
|
|
|
|
|
|
description: Total items synced (not stored in DB, calculated on query)
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type:
|
|
|
|
|
|
description: Connector type (feishu, notion, confluence, etc.)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
updated_at:
|
|
|
|
|
|
description: Last update timestamp
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2025-12-16 08:40:13 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.EmbeddingParameters:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
dimension:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
truncate_prompt_tokens:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.ExtractConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
enabled:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
nodes:
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.GraphNode'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
relations:
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.GraphRelation'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
tags:
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
text:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.FAQBatchUpsertPayload:
|
|
|
|
|
|
properties:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
dry_run:
|
|
|
|
|
|
description: 仅验证,不实际导入
|
|
|
|
|
|
type: boolean
|
2025-12-16 08:40:13 +00:00
|
|
|
|
entries:
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryPayload'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
knowledge_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
mode:
|
|
|
|
|
|
enum:
|
|
|
|
|
|
- append
|
|
|
|
|
|
- replace
|
|
|
|
|
|
type: string
|
2026-02-26 12:59:52 +00:00
|
|
|
|
task_id:
|
|
|
|
|
|
description: 可选,如果不传则自动生成UUID
|
|
|
|
|
|
type: string
|
2025-12-16 08:40:13 +00:00
|
|
|
|
required:
|
|
|
|
|
|
- entries
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.FAQConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
index_mode:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQIndexMode'
|
|
|
|
|
|
question_index_mode:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQQuestionIndexMode'
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsBatchUpdate:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
by_id:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsUpdate'
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: ByID 按条目ID更新,key为条目ID (seq_id)
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: object
|
|
|
|
|
|
by_tag:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsUpdate'
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: ByTag 按Tag批量更新,key为TagID (seq_id)
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: object
|
2026-02-26 12:59:52 +00:00
|
|
|
|
exclude_ids:
|
|
|
|
|
|
description: ExcludeIDs 在ByTag操作中需要排除的ID列表 (seq_id)
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: array
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsUpdate:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
is_enabled:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
is_recommended:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
tag_id:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
type: integer
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.FAQEntryPayload:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
answer_strategy:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.AnswerStrategy'
|
|
|
|
|
|
answers:
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
2026-02-26 12:59:52 +00:00
|
|
|
|
id:
|
|
|
|
|
|
description: ID 可选,用于数据迁移时指定 seq_id(必须小于自增起始值 100000000)
|
|
|
|
|
|
type: integer
|
2025-12-16 08:40:13 +00:00
|
|
|
|
is_enabled:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
is_recommended:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
negative_questions:
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
similar_questions:
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
standard_question:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
tag_id:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
type: integer
|
2025-12-16 08:40:13 +00:00
|
|
|
|
tag_name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- standard_question
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.FAQIndexMode:
|
|
|
|
|
|
enum:
|
|
|
|
|
|
- question_only
|
|
|
|
|
|
- question_answer
|
|
|
|
|
|
type: string
|
|
|
|
|
|
x-enum-varnames:
|
|
|
|
|
|
- FAQIndexModeQuestionOnly
|
|
|
|
|
|
- FAQIndexModeQuestionAnswer
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.FAQQuestionIndexMode:
|
|
|
|
|
|
enum:
|
|
|
|
|
|
- combined
|
|
|
|
|
|
- separate
|
|
|
|
|
|
type: string
|
|
|
|
|
|
x-enum-varnames:
|
|
|
|
|
|
- FAQQuestionIndexModeCombined
|
|
|
|
|
|
- FAQQuestionIndexModeSeparate
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.FAQSearchRequest:
|
|
|
|
|
|
properties:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
first_priority_tag_ids:
|
|
|
|
|
|
description: 第一优先级标签ID列表,限定命中范围,优先级最高
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: array
|
2025-12-16 08:40:13 +00:00
|
|
|
|
match_count:
|
|
|
|
|
|
type: integer
|
2026-02-26 12:59:52 +00:00
|
|
|
|
only_recommended:
|
|
|
|
|
|
description: 是否仅返回推荐的条目
|
|
|
|
|
|
type: boolean
|
2025-12-16 08:40:13 +00:00
|
|
|
|
query_text:
|
|
|
|
|
|
type: string
|
2026-02-26 12:59:52 +00:00
|
|
|
|
second_priority_tag_ids:
|
|
|
|
|
|
description: 第二优先级标签ID列表,限定命中范围,优先级低于第一优先级
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: array
|
2025-12-16 08:40:13 +00:00
|
|
|
|
vector_threshold:
|
|
|
|
|
|
type: number
|
|
|
|
|
|
required:
|
|
|
|
|
|
- query_text
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.GraphNode:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
attributes:
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
chunks:
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.GraphRelation:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
node1:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
node2:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.ImageProcessingConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
model_id:
|
|
|
|
|
|
description: Model ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-02-26 12:59:52 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.InviteMemberRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
role:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole'
|
|
|
|
|
|
description: 'Role to assign: admin/editor/viewer'
|
|
|
|
|
|
user_id:
|
|
|
|
|
|
description: User ID to invite
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- role
|
|
|
|
|
|
- user_id
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.JoinByOrganizationIDRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
message:
|
|
|
|
|
|
description: Optional message for join request
|
|
|
|
|
|
maxLength: 500
|
|
|
|
|
|
type: string
|
|
|
|
|
|
organization_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
role:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole'
|
|
|
|
|
|
description: 'Optional: requested role (admin/editor/viewer); default viewer'
|
|
|
|
|
|
required:
|
|
|
|
|
|
- organization_id
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.JoinOrganizationRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
invite_code:
|
|
|
|
|
|
maxLength: 32
|
|
|
|
|
|
minLength: 8
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- invite_code
|
|
|
|
|
|
type: object
|
2025-12-16 08:40:13 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.Knowledge:
|
|
|
|
|
|
properties:
|
2026-03-30 13:20:14 +00:00
|
|
|
|
channel:
|
|
|
|
|
|
description: Channel indicates through which channel the knowledge was ingested
|
|
|
|
|
|
(web, api, browser_extension, wechat, etc.)
|
|
|
|
|
|
type: string
|
2025-12-16 08:40:13 +00:00
|
|
|
|
created_at:
|
|
|
|
|
|
description: Creation time of the knowledge
|
|
|
|
|
|
type: string
|
|
|
|
|
|
deleted_at:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/gorm.DeletedAt'
|
|
|
|
|
|
description: Deletion time of the knowledge
|
|
|
|
|
|
description:
|
|
|
|
|
|
description: Description of the knowledge
|
|
|
|
|
|
type: string
|
|
|
|
|
|
embedding_model_id:
|
|
|
|
|
|
description: ID of the embedding model
|
|
|
|
|
|
type: string
|
|
|
|
|
|
enable_status:
|
|
|
|
|
|
description: Enable status of the knowledge
|
|
|
|
|
|
type: string
|
|
|
|
|
|
error_message:
|
|
|
|
|
|
description: Error message of the knowledge
|
|
|
|
|
|
type: string
|
|
|
|
|
|
file_hash:
|
|
|
|
|
|
description: File hash of the knowledge
|
|
|
|
|
|
type: string
|
|
|
|
|
|
file_name:
|
|
|
|
|
|
description: File name of the knowledge
|
|
|
|
|
|
type: string
|
|
|
|
|
|
file_path:
|
|
|
|
|
|
description: File path of the knowledge
|
|
|
|
|
|
type: string
|
|
|
|
|
|
file_size:
|
|
|
|
|
|
description: File size of the knowledge
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
file_type:
|
|
|
|
|
|
description: File type of the knowledge
|
|
|
|
|
|
type: string
|
|
|
|
|
|
id:
|
|
|
|
|
|
description: Unique identifier of the knowledge
|
|
|
|
|
|
type: string
|
|
|
|
|
|
knowledge_base_id:
|
|
|
|
|
|
description: ID of the knowledge base
|
|
|
|
|
|
type: string
|
2025-12-22 06:36:29 +00:00
|
|
|
|
knowledge_base_name:
|
|
|
|
|
|
description: Knowledge base name (not stored in database, populated on query)
|
|
|
|
|
|
type: string
|
2026-02-26 12:59:52 +00:00
|
|
|
|
last_faq_import_result:
|
|
|
|
|
|
description: Last FAQ import result (for FAQ type knowledge only)
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: array
|
2025-12-16 08:40:13 +00:00
|
|
|
|
metadata:
|
|
|
|
|
|
description: Metadata of the knowledge
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: array
|
|
|
|
|
|
parse_status:
|
|
|
|
|
|
description: Parse status of the knowledge
|
|
|
|
|
|
type: string
|
|
|
|
|
|
processed_at:
|
|
|
|
|
|
description: Processed time of the knowledge
|
|
|
|
|
|
type: string
|
|
|
|
|
|
source:
|
2026-03-30 13:20:14 +00:00
|
|
|
|
description: Source of the knowledge (e.g. URL address for url type, "manual"
|
|
|
|
|
|
for manual type)
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: string
|
|
|
|
|
|
storage_size:
|
|
|
|
|
|
description: Storage size of the knowledge
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
summary_status:
|
|
|
|
|
|
description: Summary status for async summary generation
|
|
|
|
|
|
type: string
|
|
|
|
|
|
tag_id:
|
|
|
|
|
|
description: Optional tag ID for categorization within a knowledge base
|
|
|
|
|
|
type: string
|
|
|
|
|
|
tenant_id:
|
|
|
|
|
|
description: Tenant ID
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
title:
|
|
|
|
|
|
description: Title of the knowledge
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type:
|
|
|
|
|
|
description: Type of the knowledge
|
|
|
|
|
|
type: string
|
|
|
|
|
|
updated_at:
|
|
|
|
|
|
description: Last updated time of the knowledge
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.KnowledgeBase:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
chunk_count:
|
|
|
|
|
|
description: Chunk count (not stored in database, calculated on query)
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
chunking_config:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ChunkingConfig'
|
|
|
|
|
|
description: Chunking configuration
|
|
|
|
|
|
created_at:
|
|
|
|
|
|
description: Creation time of the knowledge base
|
|
|
|
|
|
type: string
|
|
|
|
|
|
deleted_at:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/gorm.DeletedAt'
|
|
|
|
|
|
description: Deletion time of the knowledge base
|
|
|
|
|
|
description:
|
|
|
|
|
|
description: Description of the knowledge base
|
|
|
|
|
|
type: string
|
|
|
|
|
|
embedding_model_id:
|
|
|
|
|
|
description: ID of the embedding model
|
|
|
|
|
|
type: string
|
|
|
|
|
|
extract_config:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ExtractConfig'
|
|
|
|
|
|
description: Extract config
|
|
|
|
|
|
faq_config:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQConfig'
|
|
|
|
|
|
description: FAQConfig stores FAQ specific configuration such as indexing
|
|
|
|
|
|
strategy
|
|
|
|
|
|
id:
|
|
|
|
|
|
description: Unique identifier of the knowledge base
|
|
|
|
|
|
type: string
|
|
|
|
|
|
image_processing_config:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ImageProcessingConfig'
|
|
|
|
|
|
description: Image processing configuration
|
2026-03-30 13:20:14 +00:00
|
|
|
|
is_pinned:
|
|
|
|
|
|
description: Whether this knowledge base is pinned to the top of the list
|
|
|
|
|
|
type: boolean
|
2025-12-16 08:40:13 +00:00
|
|
|
|
is_processing:
|
|
|
|
|
|
description: IsProcessing indicates if there is a processing import task (for
|
|
|
|
|
|
FAQ type knowledge bases)
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
is_temporary:
|
|
|
|
|
|
description: Whether this knowledge base is temporary (ephemeral) and should
|
|
|
|
|
|
be hidden from UI
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
knowledge_count:
|
|
|
|
|
|
description: Knowledge count (not stored in database, calculated on query)
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
name:
|
|
|
|
|
|
description: Name of the knowledge base
|
|
|
|
|
|
type: string
|
2026-03-30 13:20:14 +00:00
|
|
|
|
pinned_at:
|
|
|
|
|
|
description: Time when the knowledge base was pinned (nil if not pinned)
|
|
|
|
|
|
type: string
|
2025-12-16 08:40:13 +00:00
|
|
|
|
processing_count:
|
|
|
|
|
|
description: ProcessingCount indicates the number of knowledge items being
|
|
|
|
|
|
processed (for document type knowledge bases)
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
question_generation_config:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.QuestionGenerationConfig'
|
|
|
|
|
|
description: QuestionGenerationConfig stores question generation configuration
|
|
|
|
|
|
for document knowledge bases
|
2026-02-26 12:59:52 +00:00
|
|
|
|
share_count:
|
|
|
|
|
|
description: ShareCount indicates the number of organizations this knowledge
|
|
|
|
|
|
base is shared with (not stored in database)
|
|
|
|
|
|
type: integer
|
2026-03-30 13:20:14 +00:00
|
|
|
|
storage_config:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.StorageConfig'
|
|
|
|
|
|
description: 'Deprecated: legacy COS config column. Kept for backward compatibility
|
|
|
|
|
|
with old data.'
|
|
|
|
|
|
storage_provider_config:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.StorageProviderConfig'
|
|
|
|
|
|
description: 'Storage provider config (new): only stores provider selection;
|
|
|
|
|
|
credentials from tenant StorageEngineConfig'
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary_model_id:
|
|
|
|
|
|
description: Summary model ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
tenant_id:
|
|
|
|
|
|
description: Tenant ID
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type:
|
|
|
|
|
|
description: Type of the knowledge base (document, faq, etc.)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
updated_at:
|
|
|
|
|
|
description: Last updated time of the knowledge base
|
|
|
|
|
|
type: string
|
|
|
|
|
|
vlm_config:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.VLMConfig'
|
|
|
|
|
|
description: VLM config
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.KnowledgeBaseConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
chunking_config:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ChunkingConfig'
|
|
|
|
|
|
description: Chunking configuration
|
|
|
|
|
|
faq_config:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQConfig'
|
|
|
|
|
|
description: FAQ configuration (only for FAQ type knowledge bases)
|
|
|
|
|
|
image_processing_config:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ImageProcessingConfig'
|
|
|
|
|
|
description: Image processing configuration
|
|
|
|
|
|
type: object
|
2026-02-26 12:59:52 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.KnowledgeBaseShareResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
chunk_count:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
created_at:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
knowledge_base_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
knowledge_base_name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
knowledge_base_type:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
knowledge_count:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
my_permission:
|
|
|
|
|
|
description: Effective permission for current user = min(Permission, MyRoleInOrg)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
my_role_in_org:
|
|
|
|
|
|
description: Current user's role in this organization (admin/editor/viewer)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
organization_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
organization_name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
permission:
|
|
|
|
|
|
description: 'Share permission (what the space was granted: viewer/editor)'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
require_approval:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
shared_by_user_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
shared_by_username:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
source_tenant_id:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.ListMembersResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
members:
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OrganizationMemberResponse'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
total:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.ListOrganizationsResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
organizations:
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OrganizationResponse'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
resource_counts:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ResourceCountsByOrgResponse'
|
|
|
|
|
|
description: 各空间内知识库/智能体数量,供列表侧栏展示
|
|
|
|
|
|
total:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.ListSharesResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
shares:
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBaseShareResponse'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
total:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: object
|
2026-03-30 13:20:14 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.LocalEngineConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
path_prefix:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2025-12-16 08:40:13 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.LoginRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
email:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
password:
|
|
|
|
|
|
minLength: 6
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- email
|
|
|
|
|
|
- password
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.LoginResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
message:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
refresh_token:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
success:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
tenant:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant'
|
|
|
|
|
|
token:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
user:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.User'
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.MCPAdvancedConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
retry_count:
|
|
|
|
|
|
description: 'Number of retries, default: 3'
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
retry_delay:
|
|
|
|
|
|
description: 'Delay between retries in seconds, default: 1'
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
timeout:
|
|
|
|
|
|
description: 'Timeout in seconds, default: 30'
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.MCPAuthConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
api_key:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
custom_headers:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
token:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.MCPEnvVars:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.MCPHeaders:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.MCPService:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
advanced_config:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MCPAdvancedConfig'
|
|
|
|
|
|
auth_config:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MCPAuthConfig'
|
|
|
|
|
|
created_at:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
deleted_at:
|
|
|
|
|
|
$ref: '#/definitions/gorm.DeletedAt'
|
|
|
|
|
|
description:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
enabled:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
env_vars:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MCPEnvVars'
|
|
|
|
|
|
description: Environment variables for stdio
|
|
|
|
|
|
headers:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MCPHeaders'
|
|
|
|
|
|
id:
|
|
|
|
|
|
type: string
|
2026-03-30 13:20:14 +00:00
|
|
|
|
is_builtin:
|
|
|
|
|
|
description: Whether this is a builtin MCP service (visible to all tenants)
|
|
|
|
|
|
type: boolean
|
2025-12-16 08:40:13 +00:00
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
stdio_config:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MCPStdioConfig'
|
|
|
|
|
|
description: Required for stdio transport
|
|
|
|
|
|
tenant_id:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
transport_type:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MCPTransportType'
|
|
|
|
|
|
updated_at:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
url:
|
|
|
|
|
|
description: 'Optional: required for SSE/HTTP Streamable'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.MCPStdioConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
args:
|
|
|
|
|
|
description: Command arguments array
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
command:
|
|
|
|
|
|
description: 'Command: "uvx" or "npx"'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.MCPTransportType:
|
|
|
|
|
|
enum:
|
|
|
|
|
|
- sse
|
|
|
|
|
|
- http-streamable
|
|
|
|
|
|
- stdio
|
|
|
|
|
|
type: string
|
|
|
|
|
|
x-enum-comments:
|
|
|
|
|
|
MCPTransportHTTPStreamable: HTTP Streamable
|
|
|
|
|
|
MCPTransportSSE: Server-Sent Events
|
|
|
|
|
|
MCPTransportStdio: Stdio (Standard Input/Output)
|
|
|
|
|
|
x-enum-descriptions:
|
|
|
|
|
|
- Server-Sent Events
|
|
|
|
|
|
- HTTP Streamable
|
|
|
|
|
|
- Stdio (Standard Input/Output)
|
|
|
|
|
|
x-enum-varnames:
|
|
|
|
|
|
- MCPTransportSSE
|
|
|
|
|
|
- MCPTransportHTTPStreamable
|
|
|
|
|
|
- MCPTransportStdio
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.ManualKnowledgePayload:
|
|
|
|
|
|
properties:
|
2026-03-30 13:20:14 +00:00
|
|
|
|
channel:
|
|
|
|
|
|
type: string
|
2025-12-16 08:40:13 +00:00
|
|
|
|
content:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
status:
|
|
|
|
|
|
type: string
|
2026-02-26 12:59:52 +00:00
|
|
|
|
tag_id:
|
|
|
|
|
|
type: string
|
2025-12-16 08:40:13 +00:00
|
|
|
|
title:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.MatchType:
|
|
|
|
|
|
enum:
|
|
|
|
|
|
- 0
|
|
|
|
|
|
- 1
|
|
|
|
|
|
- 2
|
|
|
|
|
|
- 3
|
|
|
|
|
|
- 4
|
|
|
|
|
|
- 5
|
|
|
|
|
|
- 6
|
|
|
|
|
|
- 7
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- 8
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- 9
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: integer
|
|
|
|
|
|
x-enum-comments:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
MatchTypeDataAnalysis: 数据分析匹配类型
|
2025-12-22 06:36:29 +00:00
|
|
|
|
MatchTypeDirectLoad: 直接加载匹配类型
|
2025-12-16 08:40:13 +00:00
|
|
|
|
MatchTypeParentChunk: 父Chunk匹配类型
|
|
|
|
|
|
MatchTypeRelationChunk: 关系Chunk匹配类型
|
|
|
|
|
|
MatchTypeWebSearch: 网络搜索匹配类型
|
|
|
|
|
|
x-enum-descriptions:
|
|
|
|
|
|
- ""
|
|
|
|
|
|
- ""
|
|
|
|
|
|
- ""
|
|
|
|
|
|
- ""
|
|
|
|
|
|
- 父Chunk匹配类型
|
|
|
|
|
|
- 关系Chunk匹配类型
|
|
|
|
|
|
- ""
|
|
|
|
|
|
- 网络搜索匹配类型
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- 直接加载匹配类型
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- 数据分析匹配类型
|
2025-12-16 08:40:13 +00:00
|
|
|
|
x-enum-varnames:
|
|
|
|
|
|
- MatchTypeEmbedding
|
|
|
|
|
|
- MatchTypeKeywords
|
|
|
|
|
|
- MatchTypeNearByChunk
|
|
|
|
|
|
- MatchTypeHistory
|
|
|
|
|
|
- MatchTypeParentChunk
|
|
|
|
|
|
- MatchTypeRelationChunk
|
|
|
|
|
|
- MatchTypeGraph
|
|
|
|
|
|
- MatchTypeWebSearch
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- MatchTypeDirectLoad
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- MatchTypeDataAnalysis
|
2025-12-22 06:36:29 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.MentionedItem:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
kb_type:
|
|
|
|
|
|
description: '"document" or "faq" (only for kb type)'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type:
|
|
|
|
|
|
description: '"kb" for knowledge base, "file" for file'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2025-12-16 08:40:13 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.Message:
|
|
|
|
|
|
properties:
|
2026-03-30 13:20:14 +00:00
|
|
|
|
agent_duration_ms:
|
|
|
|
|
|
description: Agent total execution duration in milliseconds (from query start
|
|
|
|
|
|
to answer start)
|
|
|
|
|
|
type: integer
|
2025-12-16 08:40:13 +00:00
|
|
|
|
agent_steps:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
Agent execution steps (only for assistant messages generated by agent)
|
|
|
|
|
|
This contains the detailed reasoning process and tool calls made by the agent
|
|
|
|
|
|
Stored for user history display, but NOT included in LLM context to avoid redundancy
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.AgentStep'
|
|
|
|
|
|
type: array
|
2026-03-30 13:20:14 +00:00
|
|
|
|
channel:
|
|
|
|
|
|
description: Channel indicates the source channel of this message (e.g., "web",
|
|
|
|
|
|
"api", "im")
|
|
|
|
|
|
type: string
|
2025-12-16 08:40:13 +00:00
|
|
|
|
content:
|
|
|
|
|
|
description: Message text content
|
|
|
|
|
|
type: string
|
|
|
|
|
|
created_at:
|
|
|
|
|
|
description: Message creation timestamp
|
|
|
|
|
|
type: string
|
|
|
|
|
|
deleted_at:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/gorm.DeletedAt'
|
|
|
|
|
|
description: Soft delete timestamp
|
|
|
|
|
|
id:
|
|
|
|
|
|
description: Unique identifier for the message
|
|
|
|
|
|
type: string
|
2026-03-30 13:20:14 +00:00
|
|
|
|
images:
|
|
|
|
|
|
description: Attached images with OCR/Caption text (for user messages)
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MessageImage'
|
|
|
|
|
|
type: array
|
2025-12-16 08:40:13 +00:00
|
|
|
|
is_completed:
|
|
|
|
|
|
description: Whether message generation is complete
|
|
|
|
|
|
type: boolean
|
2026-03-30 13:20:14 +00:00
|
|
|
|
is_fallback:
|
|
|
|
|
|
description: Whether this response is a fallback (no knowledge base match
|
|
|
|
|
|
found)
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
knowledge_id:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
KnowledgeID links this message to a Knowledge entry in the chat history knowledge base
|
|
|
|
|
|
Used for vector search indexing: when set, the message content has been indexed as a Knowledge passage
|
|
|
|
|
|
type: string
|
2025-12-16 08:40:13 +00:00
|
|
|
|
knowledge_references:
|
|
|
|
|
|
description: References to knowledge chunks used in the response
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.SearchResult'
|
|
|
|
|
|
type: array
|
2025-12-22 06:36:29 +00:00
|
|
|
|
mentioned_items:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
Mentioned knowledge bases and files (for user messages)
|
|
|
|
|
|
Stores the @mentioned items when user sends a message
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MentionedItem'
|
|
|
|
|
|
type: array
|
2025-12-16 08:40:13 +00:00
|
|
|
|
request_id:
|
|
|
|
|
|
description: Request identifier for tracking API requests
|
|
|
|
|
|
type: string
|
|
|
|
|
|
role:
|
|
|
|
|
|
description: 'Message role: "user", "assistant", "system"'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
session_id:
|
|
|
|
|
|
description: ID of the session this message belongs to
|
|
|
|
|
|
type: string
|
|
|
|
|
|
updated_at:
|
|
|
|
|
|
description: Last update timestamp
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-30 13:20:14 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.MessageImage:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
caption:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
url:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.MinIOEngineConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
access_key_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
bucket_name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
endpoint:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
mode:
|
|
|
|
|
|
description: '"docker" or "remote"'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
path_prefix:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
secret_access_key:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
use_ssl:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
type: object
|
2025-12-16 08:40:13 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.ModelParameters:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
api_key:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
base_url:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
embedding_parameters:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.EmbeddingParameters'
|
2026-02-26 12:59:52 +00:00
|
|
|
|
extra_config:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description: Provider-specific configuration
|
|
|
|
|
|
type: object
|
2025-12-16 08:40:13 +00:00
|
|
|
|
interface_type:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
parameter_size:
|
|
|
|
|
|
description: Ollama model parameter size (e.g., "7B", "13B", "70B")
|
|
|
|
|
|
type: string
|
2026-02-26 12:59:52 +00:00
|
|
|
|
provider:
|
|
|
|
|
|
description: 'Provider identifier: openai, aliyun, zhipu, generic'
|
|
|
|
|
|
type: string
|
2026-03-30 13:20:14 +00:00
|
|
|
|
supports_vision:
|
|
|
|
|
|
description: Whether the model accepts image/multimodal input
|
|
|
|
|
|
type: boolean
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.ModelSource:
|
|
|
|
|
|
enum:
|
|
|
|
|
|
- local
|
|
|
|
|
|
- remote
|
|
|
|
|
|
- aliyun
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- zhipu
|
|
|
|
|
|
- volcengine
|
|
|
|
|
|
- deepseek
|
|
|
|
|
|
- hunyuan
|
|
|
|
|
|
- minimax
|
|
|
|
|
|
- openai
|
|
|
|
|
|
- gemini
|
|
|
|
|
|
- mimo
|
|
|
|
|
|
- siliconflow
|
|
|
|
|
|
- jina
|
|
|
|
|
|
- openrouter
|
2026-03-30 13:20:14 +00:00
|
|
|
|
- nvidia
|
|
|
|
|
|
- novita
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: string
|
|
|
|
|
|
x-enum-comments:
|
|
|
|
|
|
ModelSourceAliyun: Aliyun DashScope model
|
2026-02-26 12:59:52 +00:00
|
|
|
|
ModelSourceDeepseek: Deepseek model
|
|
|
|
|
|
ModelSourceGemini: Gemini model
|
|
|
|
|
|
ModelSourceHunyuan: Hunyuan model
|
|
|
|
|
|
ModelSourceJina: Jina AI model
|
2025-12-16 08:40:13 +00:00
|
|
|
|
ModelSourceLocal: Local model
|
2026-02-26 12:59:52 +00:00
|
|
|
|
ModelSourceMimo: Mimo model
|
|
|
|
|
|
ModelSourceMinimax: Minimax mode
|
2026-03-30 13:20:14 +00:00
|
|
|
|
ModelSourceNovita: Novita AI model
|
|
|
|
|
|
ModelSourceNvidia: NVIDIA model
|
2026-02-26 12:59:52 +00:00
|
|
|
|
ModelSourceOpenAI: OpenAI model
|
|
|
|
|
|
ModelSourceOpenRouter: OpenRouter model
|
2025-12-16 08:40:13 +00:00
|
|
|
|
ModelSourceRemote: Remote model
|
2026-02-26 12:59:52 +00:00
|
|
|
|
ModelSourceSiliconFlow: SiliconFlow model
|
|
|
|
|
|
ModelSourceVolcengine: Volcengine model
|
|
|
|
|
|
ModelSourceZhipu: Zhipu model
|
2025-12-16 08:40:13 +00:00
|
|
|
|
x-enum-descriptions:
|
|
|
|
|
|
- Local model
|
|
|
|
|
|
- Remote model
|
|
|
|
|
|
- Aliyun DashScope model
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- Zhipu model
|
|
|
|
|
|
- Volcengine model
|
|
|
|
|
|
- Deepseek model
|
|
|
|
|
|
- Hunyuan model
|
|
|
|
|
|
- Minimax mode
|
|
|
|
|
|
- OpenAI model
|
|
|
|
|
|
- Gemini model
|
|
|
|
|
|
- Mimo model
|
|
|
|
|
|
- SiliconFlow model
|
|
|
|
|
|
- Jina AI model
|
|
|
|
|
|
- OpenRouter model
|
2026-03-30 13:20:14 +00:00
|
|
|
|
- NVIDIA model
|
|
|
|
|
|
- Novita AI model
|
2025-12-16 08:40:13 +00:00
|
|
|
|
x-enum-varnames:
|
|
|
|
|
|
- ModelSourceLocal
|
|
|
|
|
|
- ModelSourceRemote
|
|
|
|
|
|
- ModelSourceAliyun
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- ModelSourceZhipu
|
|
|
|
|
|
- ModelSourceVolcengine
|
|
|
|
|
|
- ModelSourceDeepseek
|
|
|
|
|
|
- ModelSourceHunyuan
|
|
|
|
|
|
- ModelSourceMinimax
|
|
|
|
|
|
- ModelSourceOpenAI
|
|
|
|
|
|
- ModelSourceGemini
|
|
|
|
|
|
- ModelSourceMimo
|
|
|
|
|
|
- ModelSourceSiliconFlow
|
|
|
|
|
|
- ModelSourceJina
|
|
|
|
|
|
- ModelSourceOpenRouter
|
2026-03-30 13:20:14 +00:00
|
|
|
|
- ModelSourceNvidia
|
|
|
|
|
|
- ModelSourceNovita
|
2025-12-16 08:40:13 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.ModelType:
|
|
|
|
|
|
enum:
|
|
|
|
|
|
- Embedding
|
|
|
|
|
|
- Rerank
|
|
|
|
|
|
- KnowledgeQA
|
|
|
|
|
|
- VLLM
|
|
|
|
|
|
type: string
|
|
|
|
|
|
x-enum-comments:
|
|
|
|
|
|
ModelTypeEmbedding: Embedding model
|
|
|
|
|
|
ModelTypeKnowledgeQA: KnowledgeQA model
|
|
|
|
|
|
ModelTypeRerank: Rerank model
|
|
|
|
|
|
ModelTypeVLLM: VLLM model
|
|
|
|
|
|
x-enum-descriptions:
|
|
|
|
|
|
- Embedding model
|
|
|
|
|
|
- Rerank model
|
|
|
|
|
|
- KnowledgeQA model
|
|
|
|
|
|
- VLLM model
|
|
|
|
|
|
x-enum-varnames:
|
|
|
|
|
|
- ModelTypeEmbedding
|
|
|
|
|
|
- ModelTypeRerank
|
|
|
|
|
|
- ModelTypeKnowledgeQA
|
|
|
|
|
|
- ModelTypeVLLM
|
2026-03-30 13:20:14 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.OIDCAuthURLResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
authorization_url:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
provider_display_name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
state:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
success:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.OIDCConfigResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
enabled:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
provider_display_name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
success:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
type: object
|
2026-02-26 12:59:52 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.OrgMemberRole:
|
|
|
|
|
|
enum:
|
|
|
|
|
|
- admin
|
|
|
|
|
|
- editor
|
|
|
|
|
|
- viewer
|
|
|
|
|
|
type: string
|
|
|
|
|
|
x-enum-varnames:
|
|
|
|
|
|
- OrgRoleAdmin
|
|
|
|
|
|
- OrgRoleEditor
|
|
|
|
|
|
- OrgRoleViewer
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.OrganizationMemberResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
avatar:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
email:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
joined_at:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
role:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
tenant_id:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
user_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
username:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.OrganizationResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
agent_share_count:
|
|
|
|
|
|
description: 共享到该组织的智能体数量
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
avatar:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
created_at:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
has_pending_upgrade:
|
|
|
|
|
|
description: 当前用户是否有待处理的权限升级申请
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
invite_code:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
invite_code_expires_at:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
invite_code_validity_days:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
is_owner:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
member_count:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
member_limit:
|
|
|
|
|
|
description: 0 = unlimited
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
my_role:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
owner_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
pending_join_request_count:
|
|
|
|
|
|
description: 待审批加入申请数(仅管理员可见)
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
require_approval:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
searchable:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
share_count:
|
|
|
|
|
|
description: 共享到该组织的知识库数量
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
updated_at:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-03-30 13:20:14 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.ParserEngineConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
docreader_addr:
|
|
|
|
|
|
description: 文档解析服务地址
|
|
|
|
|
|
type: string
|
|
|
|
|
|
mineru_api_key:
|
|
|
|
|
|
description: MinerU 云 API Key
|
|
|
|
|
|
type: string
|
|
|
|
|
|
mineru_cloud_enable_formula:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
mineru_cloud_enable_ocr:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
mineru_cloud_enable_table:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
mineru_cloud_language:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
mineru_cloud_model:
|
|
|
|
|
|
description: MinerU 云 API 解析参数
|
|
|
|
|
|
type: string
|
|
|
|
|
|
mineru_enable_formula:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
mineru_enable_ocr:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
mineru_enable_table:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
mineru_endpoint:
|
|
|
|
|
|
description: MinerU 自建服务端点
|
|
|
|
|
|
type: string
|
|
|
|
|
|
mineru_language:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
mineru_model:
|
|
|
|
|
|
description: MinerU 自建解析参数
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.ParserEngineRule:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
engine:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
file_types:
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
type: object
|
2025-12-16 08:40:13 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.QuestionGenerationConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
enabled:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
question_count:
|
|
|
|
|
|
description: 'Number of questions to generate per chunk (default: 3, max:
|
|
|
|
|
|
10)'
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.RegisterRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
email:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
password:
|
|
|
|
|
|
minLength: 6
|
|
|
|
|
|
type: string
|
|
|
|
|
|
username:
|
|
|
|
|
|
maxLength: 50
|
2026-03-30 13:20:14 +00:00
|
|
|
|
minLength: 2
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- email
|
|
|
|
|
|
- password
|
|
|
|
|
|
- username
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.RegisterResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
message:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
success:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
tenant:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant'
|
|
|
|
|
|
user:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.User'
|
|
|
|
|
|
type: object
|
2026-02-26 12:59:52 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.RequestRoleUpgradeRequest:
|
2025-12-16 08:40:13 +00:00
|
|
|
|
properties:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
message:
|
|
|
|
|
|
description: Optional message explaining the reason
|
|
|
|
|
|
maxLength: 500
|
|
|
|
|
|
type: string
|
|
|
|
|
|
requested_role:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole'
|
|
|
|
|
|
description: The role user wants to upgrade to
|
|
|
|
|
|
required:
|
|
|
|
|
|
- requested_role
|
|
|
|
|
|
type: object
|
2026-03-30 13:20:14 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.Resource:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
description:
|
|
|
|
|
|
description: Optional description
|
|
|
|
|
|
type: string
|
|
|
|
|
|
external_id:
|
|
|
|
|
|
description: Unique identifier in the external system
|
|
|
|
|
|
type: string
|
|
|
|
|
|
metadata:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
description: Additional metadata
|
|
|
|
|
|
type: object
|
|
|
|
|
|
modified_at:
|
|
|
|
|
|
description: Last modified time in external system
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
description: Display name
|
|
|
|
|
|
type: string
|
|
|
|
|
|
parent_id:
|
|
|
|
|
|
description: For hierarchical resources (parent ID if applicable)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type:
|
|
|
|
|
|
description: Resource type (document, folder, space, page, etc.)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
url:
|
|
|
|
|
|
description: URL to access in external system
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-02-26 12:59:52 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.ResourceCountsByOrgResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
agents:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
by_organization:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: object
|
|
|
|
|
|
type: object
|
|
|
|
|
|
knowledge_bases:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
by_organization:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: object
|
|
|
|
|
|
type: object
|
|
|
|
|
|
type: object
|
2026-03-30 13:20:14 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.RetrievalConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
embedding_top_k:
|
|
|
|
|
|
description: 'EmbeddingTopK is the maximum number of chunks returned by vector
|
|
|
|
|
|
search (default: 50)'
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
keyword_threshold:
|
|
|
|
|
|
description: 'KeywordThreshold is the minimum keyword match score (0-1, default:
|
|
|
|
|
|
0.3)'
|
|
|
|
|
|
type: number
|
|
|
|
|
|
rerank_model_id:
|
|
|
|
|
|
description: RerankModelID is the ID of the rerank model to use (required
|
|
|
|
|
|
for search)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
rerank_threshold:
|
|
|
|
|
|
description: 'RerankThreshold is the minimum rerank score (-10 to 10, default:
|
|
|
|
|
|
0.2)'
|
|
|
|
|
|
type: number
|
|
|
|
|
|
rerank_top_k:
|
|
|
|
|
|
description: 'RerankTopK is the maximum number of results after reranking
|
|
|
|
|
|
(default: 10)'
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
vector_threshold:
|
|
|
|
|
|
description: 'VectorThreshold is the minimum vector similarity score (0-1,
|
|
|
|
|
|
default: 0.15)'
|
|
|
|
|
|
type: number
|
|
|
|
|
|
type: object
|
2026-02-26 12:59:52 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.RetrieverEngineParams:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
retriever_engine_type:
|
|
|
|
|
|
allOf:
|
2025-12-16 08:40:13 +00:00
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverEngineType'
|
|
|
|
|
|
description: Retriever engine type
|
|
|
|
|
|
retriever_type:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverType'
|
|
|
|
|
|
description: Retriever type
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.RetrieverEngineType:
|
|
|
|
|
|
enum:
|
|
|
|
|
|
- postgres
|
|
|
|
|
|
- elasticsearch
|
|
|
|
|
|
- infinity
|
|
|
|
|
|
- elasticfaiss
|
|
|
|
|
|
- qdrant
|
2026-03-30 13:20:14 +00:00
|
|
|
|
- milvus
|
|
|
|
|
|
- weaviate
|
|
|
|
|
|
- sqlite
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: string
|
|
|
|
|
|
x-enum-varnames:
|
|
|
|
|
|
- PostgresRetrieverEngineType
|
|
|
|
|
|
- ElasticsearchRetrieverEngineType
|
|
|
|
|
|
- InfinityRetrieverEngineType
|
|
|
|
|
|
- ElasticFaissRetrieverEngineType
|
|
|
|
|
|
- QdrantRetrieverEngineType
|
2026-03-30 13:20:14 +00:00
|
|
|
|
- MilvusRetrieverEngineType
|
|
|
|
|
|
- WeaviateRetrieverEngineType
|
|
|
|
|
|
- SQLiteRetrieverEngineType
|
2025-12-16 08:40:13 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.RetrieverEngines:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
engines:
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverEngineParams'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.RetrieverType:
|
|
|
|
|
|
enum:
|
|
|
|
|
|
- keywords
|
|
|
|
|
|
- vector
|
|
|
|
|
|
- websearch
|
|
|
|
|
|
type: string
|
|
|
|
|
|
x-enum-comments:
|
|
|
|
|
|
KeywordsRetrieverType: Keywords retriever
|
|
|
|
|
|
VectorRetrieverType: Vector retriever
|
|
|
|
|
|
WebSearchRetrieverType: Web search retriever
|
|
|
|
|
|
x-enum-descriptions:
|
|
|
|
|
|
- Keywords retriever
|
|
|
|
|
|
- Vector retriever
|
|
|
|
|
|
- Web search retriever
|
|
|
|
|
|
x-enum-varnames:
|
|
|
|
|
|
- KeywordsRetrieverType
|
|
|
|
|
|
- VectorRetrieverType
|
|
|
|
|
|
- WebSearchRetrieverType
|
2026-02-26 12:59:52 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.ReviewJoinRequestRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
approved:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
message:
|
|
|
|
|
|
maxLength: 500
|
|
|
|
|
|
type: string
|
|
|
|
|
|
role:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole'
|
|
|
|
|
|
description: 'Optional: role to assign when approving; overrides applicant''s
|
|
|
|
|
|
requested role'
|
|
|
|
|
|
type: object
|
2026-03-30 13:20:14 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.S3EngineConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
access_key:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
bucket_name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
endpoint:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
path_prefix:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
region:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
secret_key:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2025-12-16 08:40:13 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.SearchParams:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
disable_keywords_match:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
disable_vector_match:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
keyword_threshold:
|
|
|
|
|
|
type: number
|
2026-03-30 13:20:14 +00:00
|
|
|
|
knowledge_base_ids:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
KnowledgeBaseIDs overrides the single KB ID passed to HybridSearch,
|
|
|
|
|
|
allowing a single retrieval call to span multiple KBs that share the
|
|
|
|
|
|
same embedding model. When empty, HybridSearch uses its own id parameter.
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
2025-12-22 06:36:29 +00:00
|
|
|
|
knowledge_ids:
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
2025-12-16 08:40:13 +00:00
|
|
|
|
match_count:
|
|
|
|
|
|
type: integer
|
2026-02-26 12:59:52 +00:00
|
|
|
|
only_recommended:
|
|
|
|
|
|
type: boolean
|
2026-03-30 13:20:14 +00:00
|
|
|
|
query_embedding:
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: number
|
|
|
|
|
|
type: array
|
2025-12-16 08:40:13 +00:00
|
|
|
|
query_text:
|
|
|
|
|
|
type: string
|
2026-03-30 13:20:14 +00:00
|
|
|
|
skip_context_enrichment:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
SkipContextEnrichment skips fetching parent, nearby, and relation chunks
|
|
|
|
|
|
in processSearchResults. Used by the chat pipeline where context assembly
|
|
|
|
|
|
is handled separately in the merge stage.
|
|
|
|
|
|
type: boolean
|
2026-02-26 12:59:52 +00:00
|
|
|
|
tag_ids:
|
|
|
|
|
|
description: Tag IDs for filtering (used for FAQ priority filtering)
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
2025-12-16 08:40:13 +00:00
|
|
|
|
vector_threshold:
|
|
|
|
|
|
type: number
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.SearchResult:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
chunk_index:
|
|
|
|
|
|
description: Chunk index
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
chunk_metadata:
|
|
|
|
|
|
description: ChunkMetadata stores chunk-level metadata (e.g., generated questions)
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: array
|
|
|
|
|
|
chunk_type:
|
|
|
|
|
|
description: Chunk 类型
|
|
|
|
|
|
type: string
|
|
|
|
|
|
content:
|
|
|
|
|
|
description: Content
|
|
|
|
|
|
type: string
|
|
|
|
|
|
end_at:
|
|
|
|
|
|
description: End at
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
id:
|
|
|
|
|
|
description: ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
image_info:
|
|
|
|
|
|
description: 图片信息 (JSON 格式)
|
|
|
|
|
|
type: string
|
2026-03-30 13:20:14 +00:00
|
|
|
|
knowledge_base_id:
|
|
|
|
|
|
description: KnowledgeBaseID is the ID of the knowledge base this result belongs
|
|
|
|
|
|
to
|
|
|
|
|
|
type: string
|
|
|
|
|
|
knowledge_channel:
|
|
|
|
|
|
description: KnowledgeChannel indicates through which channel the knowledge
|
|
|
|
|
|
was ingested (web, api, wechat, etc.)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
knowledge_description:
|
|
|
|
|
|
description: KnowledgeDescription is the description of the knowledge document
|
|
|
|
|
|
type: string
|
2025-12-16 08:40:13 +00:00
|
|
|
|
knowledge_filename:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
Knowledge file name
|
|
|
|
|
|
Used for file type knowledge, contains the original file name
|
|
|
|
|
|
type: string
|
|
|
|
|
|
knowledge_id:
|
|
|
|
|
|
description: Knowledge ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
knowledge_source:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
Knowledge source
|
|
|
|
|
|
Used to indicate the source of the knowledge, such as "url"
|
|
|
|
|
|
type: string
|
|
|
|
|
|
knowledge_title:
|
|
|
|
|
|
description: Knowledge title
|
|
|
|
|
|
type: string
|
|
|
|
|
|
match_type:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MatchType'
|
|
|
|
|
|
description: Match type
|
2026-02-26 12:59:52 +00:00
|
|
|
|
matched_content:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
MatchedContent is the actual content that was matched in vector search
|
|
|
|
|
|
For FAQ: this is the matched question text (standard or similar question)
|
|
|
|
|
|
type: string
|
2025-12-16 08:40:13 +00:00
|
|
|
|
metadata:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description: Metadata
|
|
|
|
|
|
type: object
|
|
|
|
|
|
parent_chunk_id:
|
|
|
|
|
|
description: 父 Chunk ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
score:
|
|
|
|
|
|
description: Score
|
|
|
|
|
|
type: number
|
|
|
|
|
|
seq:
|
|
|
|
|
|
description: Seq
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
start_at:
|
|
|
|
|
|
description: Start at
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
sub_chunk_id:
|
|
|
|
|
|
description: SubChunkIndex
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.Session:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
created_at:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
deleted_at:
|
|
|
|
|
|
$ref: '#/definitions/gorm.DeletedAt'
|
|
|
|
|
|
description:
|
|
|
|
|
|
description: Description
|
|
|
|
|
|
type: string
|
|
|
|
|
|
id:
|
|
|
|
|
|
description: ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
tenant_id:
|
|
|
|
|
|
description: Tenant ID
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
title:
|
|
|
|
|
|
description: Title
|
|
|
|
|
|
type: string
|
|
|
|
|
|
updated_at:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-02-26 12:59:52 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.ShareKnowledgeBaseRequest:
|
2025-12-16 08:40:13 +00:00
|
|
|
|
properties:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
organization_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
permission:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole'
|
|
|
|
|
|
required:
|
|
|
|
|
|
- organization_id
|
|
|
|
|
|
- permission
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.StorageConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
app_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
bucket_name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
path_prefix:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
provider:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
region:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
secret_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
secret_key:
|
2026-03-30 13:20:14 +00:00
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.StorageEngineConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
cos:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.COSEngineConfig'
|
|
|
|
|
|
default_provider:
|
|
|
|
|
|
description: '"local", "minio", "cos", "tos", "s3"'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
local:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.LocalEngineConfig'
|
|
|
|
|
|
minio:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MinIOEngineConfig'
|
|
|
|
|
|
s3:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.S3EngineConfig'
|
|
|
|
|
|
tos:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.TOSEngineConfig'
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.StorageProviderConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
provider:
|
|
|
|
|
|
description: '"local", "minio", "cos", "tos"'
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2026-02-26 12:59:52 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.SubmitJoinRequestRequest:
|
2025-12-16 08:40:13 +00:00
|
|
|
|
properties:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
invite_code:
|
|
|
|
|
|
maxLength: 32
|
|
|
|
|
|
minLength: 8
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: string
|
2026-02-26 12:59:52 +00:00
|
|
|
|
message:
|
|
|
|
|
|
maxLength: 500
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: string
|
2026-02-26 12:59:52 +00:00
|
|
|
|
role:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole'
|
|
|
|
|
|
description: 'Optional: role the applicant requests (admin/editor/viewer);
|
|
|
|
|
|
default viewer'
|
|
|
|
|
|
required:
|
|
|
|
|
|
- invite_code
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: object
|
2026-03-30 13:20:14 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.SyncLog:
|
2025-12-16 08:40:13 +00:00
|
|
|
|
properties:
|
2026-03-30 13:20:14 +00:00
|
|
|
|
created_at:
|
|
|
|
|
|
description: Creation timestamp (usually same as StartedAt)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
data_source_id:
|
|
|
|
|
|
description: Reference to the data source
|
|
|
|
|
|
type: string
|
|
|
|
|
|
error_message:
|
|
|
|
|
|
description: Error details if status is "failed"
|
|
|
|
|
|
type: string
|
|
|
|
|
|
finished_at:
|
|
|
|
|
|
description: Sync completion time
|
|
|
|
|
|
type: string
|
|
|
|
|
|
id:
|
|
|
|
|
|
description: Unique identifier
|
|
|
|
|
|
type: string
|
|
|
|
|
|
items_created:
|
|
|
|
|
|
description: New items created in knowledge base
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
items_deleted:
|
|
|
|
|
|
description: Items deleted from knowledge base
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
items_failed:
|
|
|
|
|
|
description: Items that failed to sync
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
items_skipped:
|
|
|
|
|
|
description: Items skipped (no changes detected)
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
items_total:
|
|
|
|
|
|
description: Total items fetched from source
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
items_updated:
|
|
|
|
|
|
description: Existing items updated
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
result:
|
|
|
|
|
|
description: Detailed sync result (JSON-encoded)
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: array
|
|
|
|
|
|
started_at:
|
|
|
|
|
|
description: Sync start time
|
|
|
|
|
|
type: string
|
|
|
|
|
|
status:
|
|
|
|
|
|
description: 'Sync status: running, success, partial, failed, canceled'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
tenant_id:
|
|
|
|
|
|
description: Tenant ID
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
updated_at:
|
|
|
|
|
|
description: Last update timestamp
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.TOSEngineConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
access_key:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
bucket_name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
endpoint:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
path_prefix:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
region:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
secret_key:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.Tenant:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
agent_config:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.AgentConfig'
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
Deprecated: AgentConfig is deprecated, use CustomAgent (builtin-smart-reasoning) config instead.
|
|
|
|
|
|
This field is kept for backward compatibility and will be removed in future versions.
|
|
|
|
|
|
api_key:
|
2025-12-16 08:40:13 +00:00
|
|
|
|
description: API key
|
|
|
|
|
|
type: string
|
|
|
|
|
|
business:
|
|
|
|
|
|
description: Business
|
|
|
|
|
|
type: string
|
2026-03-30 13:20:14 +00:00
|
|
|
|
chat_history_config:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ChatHistoryConfig'
|
|
|
|
|
|
description: 'Chat history config: knowledge base configuration for indexing
|
|
|
|
|
|
and searching chat messages via vector search'
|
2025-12-16 08:40:13 +00:00
|
|
|
|
context_config:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ContextConfig'
|
|
|
|
|
|
description: Global Context configuration for this tenant (default for all
|
|
|
|
|
|
sessions)
|
|
|
|
|
|
conversation_config:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ConversationConfig'
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: |-
|
|
|
|
|
|
Deprecated: ConversationConfig is deprecated, use CustomAgent (builtin-quick-answer) config instead.
|
|
|
|
|
|
This field is kept for backward compatibility and will be removed in future versions.
|
2025-12-16 08:40:13 +00:00
|
|
|
|
created_at:
|
|
|
|
|
|
description: Creation time
|
|
|
|
|
|
type: string
|
|
|
|
|
|
deleted_at:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/gorm.DeletedAt'
|
|
|
|
|
|
description: Deletion time
|
|
|
|
|
|
description:
|
|
|
|
|
|
description: Description
|
|
|
|
|
|
type: string
|
|
|
|
|
|
id:
|
|
|
|
|
|
description: ID
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
name:
|
|
|
|
|
|
description: Name
|
|
|
|
|
|
type: string
|
2026-03-30 13:20:14 +00:00
|
|
|
|
parser_engine_config:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ParserEngineConfig'
|
|
|
|
|
|
description: Parser engine config overrides (MinerU endpoint, API key, etc.).
|
|
|
|
|
|
Used when parsing documents; overrides env.
|
|
|
|
|
|
retrieval_config:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.RetrievalConfig'
|
|
|
|
|
|
description: 'Retrieval config: global search/retrieval parameters shared
|
|
|
|
|
|
by knowledge search and message search'
|
2025-12-16 08:40:13 +00:00
|
|
|
|
retriever_engines:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.RetrieverEngines'
|
|
|
|
|
|
description: Retriever engines
|
|
|
|
|
|
status:
|
|
|
|
|
|
description: Status
|
|
|
|
|
|
type: string
|
2026-03-30 13:20:14 +00:00
|
|
|
|
storage_engine_config:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.StorageEngineConfig'
|
|
|
|
|
|
description: 'Storage engine config: parameters for Local, MinIO, COS. Used
|
|
|
|
|
|
for document/file storage and docreader.'
|
2025-12-16 08:40:13 +00:00
|
|
|
|
storage_quota:
|
|
|
|
|
|
description: Storage quota (Bytes), default is 10GB, including vector, original
|
|
|
|
|
|
file, text, index, etc.
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
storage_used:
|
|
|
|
|
|
description: Storage used (Bytes)
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
updated_at:
|
|
|
|
|
|
description: Last updated time
|
|
|
|
|
|
type: string
|
|
|
|
|
|
web_search_config:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.WebSearchConfig'
|
|
|
|
|
|
description: Global WebSearch configuration for this tenant
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.ToolCall:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
args:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
description: Tool arguments
|
|
|
|
|
|
type: object
|
|
|
|
|
|
duration:
|
|
|
|
|
|
description: Execution time in milliseconds
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
id:
|
|
|
|
|
|
description: Function call ID from LLM
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
description: Tool name
|
|
|
|
|
|
type: string
|
|
|
|
|
|
reflection:
|
|
|
|
|
|
description: Agent's reflection on this tool call result (if enabled)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
result:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ToolResult'
|
|
|
|
|
|
description: Execution result (contains Output)
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.ToolResult:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
data:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
description: Structured data for programmatic use
|
|
|
|
|
|
type: object
|
|
|
|
|
|
error:
|
|
|
|
|
|
description: Error message if execution failed
|
|
|
|
|
|
type: string
|
2026-03-30 13:20:14 +00:00
|
|
|
|
images:
|
|
|
|
|
|
description: Base64 data URIs from tool (e.g. MCP image content)
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
2025-12-16 08:40:13 +00:00
|
|
|
|
output:
|
|
|
|
|
|
description: Human-readable output
|
|
|
|
|
|
type: string
|
|
|
|
|
|
success:
|
|
|
|
|
|
description: Whether the tool executed successfully
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
type: object
|
2026-02-26 12:59:52 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.UpdateMemberRoleRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
role:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole'
|
|
|
|
|
|
required:
|
|
|
|
|
|
- role
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.UpdateOrganizationRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
avatar:
|
|
|
|
|
|
description: optional avatar URL
|
|
|
|
|
|
maxLength: 512
|
|
|
|
|
|
type: string
|
|
|
|
|
|
description:
|
|
|
|
|
|
maxLength: 1000
|
|
|
|
|
|
type: string
|
|
|
|
|
|
invite_code_validity_days:
|
|
|
|
|
|
description: 0=never, 1, 7, 30
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
member_limit:
|
|
|
|
|
|
description: max members; 0=unlimited
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
name:
|
|
|
|
|
|
maxLength: 255
|
|
|
|
|
|
minLength: 1
|
|
|
|
|
|
type: string
|
|
|
|
|
|
require_approval:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
searchable:
|
|
|
|
|
|
description: open for search so others can discover and join
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.UpdateSharePermissionRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
permission:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OrgMemberRole'
|
|
|
|
|
|
required:
|
|
|
|
|
|
- permission
|
|
|
|
|
|
type: object
|
2025-12-16 08:40:13 +00:00
|
|
|
|
github_com_Tencent_WeKnora_internal_types.User:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
avatar:
|
|
|
|
|
|
description: Avatar URL of the user
|
|
|
|
|
|
type: string
|
|
|
|
|
|
can_access_all_tenants:
|
|
|
|
|
|
description: Whether the user can access all tenants (cross-tenant access)
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
created_at:
|
|
|
|
|
|
description: Creation time of the user
|
|
|
|
|
|
type: string
|
|
|
|
|
|
deleted_at:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/gorm.DeletedAt'
|
|
|
|
|
|
description: Deletion time of the user
|
|
|
|
|
|
email:
|
|
|
|
|
|
description: Email address of the user
|
|
|
|
|
|
type: string
|
|
|
|
|
|
id:
|
|
|
|
|
|
description: Unique identifier of the user
|
|
|
|
|
|
type: string
|
|
|
|
|
|
is_active:
|
|
|
|
|
|
description: Whether the user is active
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
tenant:
|
|
|
|
|
|
allOf:
|
|
|
|
|
|
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant'
|
|
|
|
|
|
description: Association relationship, not stored in the database
|
|
|
|
|
|
tenant_id:
|
|
|
|
|
|
description: Tenant ID that the user belongs to
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
updated_at:
|
|
|
|
|
|
description: Last updated time of the user
|
|
|
|
|
|
type: string
|
|
|
|
|
|
username:
|
|
|
|
|
|
description: Username of the user
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.VLMConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
api_key:
|
|
|
|
|
|
description: API Key
|
|
|
|
|
|
type: string
|
|
|
|
|
|
base_url:
|
|
|
|
|
|
description: Base URL
|
|
|
|
|
|
type: string
|
|
|
|
|
|
enabled:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
interface_type:
|
|
|
|
|
|
description: 'Interface Type: "ollama" or "openai"'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
model_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
model_name:
|
|
|
|
|
|
description: |-
|
|
|
|
|
|
兼容老版本
|
|
|
|
|
|
Model Name
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
github_com_Tencent_WeKnora_internal_types.WebSearchConfig:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
api_key:
|
|
|
|
|
|
description: API密钥(如果需要)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
blacklist:
|
|
|
|
|
|
description: 黑名单规则列表
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
compression_method:
|
|
|
|
|
|
description: 压缩方法:none, summary, extract, rag
|
|
|
|
|
|
type: string
|
|
|
|
|
|
document_fragments:
|
|
|
|
|
|
description: 文档片段数量(用于RAG压缩)
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
embedding_dimension:
|
|
|
|
|
|
description: 嵌入维度(用于RAG压缩)
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
embedding_model_id:
|
|
|
|
|
|
description: RAG压缩相关配置
|
|
|
|
|
|
type: string
|
|
|
|
|
|
include_date:
|
|
|
|
|
|
description: 是否包含日期
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
max_results:
|
|
|
|
|
|
description: 最大搜索结果数
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
provider:
|
|
|
|
|
|
description: 搜索引擎提供商ID
|
|
|
|
|
|
type: string
|
|
|
|
|
|
rerank_model_id:
|
|
|
|
|
|
description: 重排模型ID(用于RAG压缩)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
gorm.DeletedAt:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
time:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
valid:
|
|
|
|
|
|
description: Valid is true if Time is not NULL
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
type: object
|
|
|
|
|
|
internal_handler.CopyKnowledgeBaseRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
source_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
target_id:
|
|
|
|
|
|
type: string
|
2026-02-26 12:59:52 +00:00
|
|
|
|
task_id:
|
|
|
|
|
|
type: string
|
2025-12-16 08:40:13 +00:00
|
|
|
|
required:
|
|
|
|
|
|
- source_id
|
|
|
|
|
|
type: object
|
2026-02-26 12:59:52 +00:00
|
|
|
|
internal_handler.CreateAgentRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
avatar:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
config:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.CustomAgentConfig'
|
|
|
|
|
|
description:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- name
|
|
|
|
|
|
type: object
|
2025-12-16 08:40:13 +00:00
|
|
|
|
internal_handler.CreateModelRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
description:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ModelParameters'
|
|
|
|
|
|
source:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ModelSource'
|
|
|
|
|
|
type:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ModelType'
|
|
|
|
|
|
required:
|
|
|
|
|
|
- name
|
|
|
|
|
|
- parameters
|
|
|
|
|
|
- source
|
|
|
|
|
|
- type
|
|
|
|
|
|
type: object
|
2026-02-26 12:59:52 +00:00
|
|
|
|
internal_handler.DeleteTagRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
exclude_ids:
|
|
|
|
|
|
description: Chunk seq_ids to exclude from deletion
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: array
|
|
|
|
|
|
type: object
|
2025-12-16 08:40:13 +00:00
|
|
|
|
internal_handler.EvaluationRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
chat_id:
|
|
|
|
|
|
description: ID of chat model to use
|
|
|
|
|
|
type: string
|
|
|
|
|
|
dataset_id:
|
|
|
|
|
|
description: ID of dataset to evaluate
|
|
|
|
|
|
type: string
|
|
|
|
|
|
knowledge_base_id:
|
|
|
|
|
|
description: ID of knowledge base to use
|
|
|
|
|
|
type: string
|
|
|
|
|
|
rerank_id:
|
|
|
|
|
|
description: ID of rerank model to use
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
internal_handler.FabriTextRequest:
|
|
|
|
|
|
properties:
|
2026-03-30 13:20:14 +00:00
|
|
|
|
model_id:
|
|
|
|
|
|
type: string
|
2025-12-16 08:40:13 +00:00
|
|
|
|
tags:
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
2026-03-30 13:20:14 +00:00
|
|
|
|
required:
|
|
|
|
|
|
- model_id
|
|
|
|
|
|
type: object
|
|
|
|
|
|
internal_handler.GetStorageEngineStatusResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
engines:
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler.StorageEngineStatusItem'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
minio_env_available:
|
|
|
|
|
|
type: boolean
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: object
|
|
|
|
|
|
internal_handler.GetSystemInfoResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
build_time:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
commit_id:
|
|
|
|
|
|
type: string
|
2026-03-30 13:20:14 +00:00
|
|
|
|
db_version:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
edition:
|
|
|
|
|
|
type: string
|
2025-12-16 08:40:13 +00:00
|
|
|
|
go_version:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
graph_database_engine:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
keyword_index_engine:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
minio_enabled:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
vector_store_engine:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
version:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
internal_handler.KBModelConfigRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
documentSplitting:
|
|
|
|
|
|
description: 文档分块配置
|
|
|
|
|
|
properties:
|
2026-03-30 13:20:14 +00:00
|
|
|
|
childChunkSize:
|
|
|
|
|
|
type: integer
|
2025-12-16 08:40:13 +00:00
|
|
|
|
chunkOverlap:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
chunkSize:
|
|
|
|
|
|
type: integer
|
2026-03-30 13:20:14 +00:00
|
|
|
|
enableParentChild:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
parentChunkSize:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
parserEngineRules:
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ParserEngineRule'
|
|
|
|
|
|
type: array
|
2025-12-16 08:40:13 +00:00
|
|
|
|
separators:
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
type: object
|
|
|
|
|
|
embeddingModelId:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
llmModelId:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
multimodal:
|
2026-03-30 13:20:14 +00:00
|
|
|
|
description: 多模态配置(仅模型相关;存储引擎在 storageProvider 中配置)
|
2025-12-16 08:40:13 +00:00
|
|
|
|
properties:
|
|
|
|
|
|
enabled:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
type: object
|
|
|
|
|
|
nodeExtract:
|
|
|
|
|
|
description: 知识图谱配置
|
|
|
|
|
|
properties:
|
|
|
|
|
|
enabled:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
nodes:
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.GraphNode'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
relations:
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.GraphRelation'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
tags:
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
text:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
questionGeneration:
|
|
|
|
|
|
description: 问题生成配置
|
|
|
|
|
|
properties:
|
|
|
|
|
|
enabled:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
questionCount:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: object
|
2026-03-30 13:20:14 +00:00
|
|
|
|
storageProvider:
|
|
|
|
|
|
description: 存储引擎选择("local" | "minio" | "cos"),影响文档上传与文档内图片存储,参数从全局设置读取
|
|
|
|
|
|
type: string
|
2025-12-16 08:40:13 +00:00
|
|
|
|
vlm_config:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.VLMConfig'
|
|
|
|
|
|
required:
|
|
|
|
|
|
- embeddingModelId
|
|
|
|
|
|
- llmModelId
|
|
|
|
|
|
type: object
|
2026-02-26 12:59:52 +00:00
|
|
|
|
internal_handler.ListMinioBucketsResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
buckets:
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler.MinioBucketInfo'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
type: object
|
|
|
|
|
|
internal_handler.MinioBucketInfo:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
created_at:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
policy:
|
|
|
|
|
|
description: '"public", "private", "custom"'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2025-12-16 08:40:13 +00:00
|
|
|
|
internal_handler.RemoteModelCheckRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
apiKey:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
baseUrl:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
modelName:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- baseUrl
|
|
|
|
|
|
- modelName
|
|
|
|
|
|
type: object
|
2026-03-30 13:20:14 +00:00
|
|
|
|
internal_handler.SearchMessagesRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
limit:
|
|
|
|
|
|
description: 'Maximum number of results to return (default: 20)'
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
mode:
|
|
|
|
|
|
description: 'Search mode: "keyword", "vector", "hybrid" (default: "hybrid")'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
query:
|
|
|
|
|
|
description: Query text for search
|
|
|
|
|
|
type: string
|
|
|
|
|
|
session_ids:
|
|
|
|
|
|
description: Filter by specific session IDs (optional)
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
required:
|
|
|
|
|
|
- query
|
|
|
|
|
|
type: object
|
|
|
|
|
|
internal_handler.StorageCheckRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
cos:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.COSEngineConfig'
|
|
|
|
|
|
minio:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MinIOEngineConfig'
|
|
|
|
|
|
provider:
|
|
|
|
|
|
description: '"minio", "cos", "tos", or "s3"'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
s3:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.S3EngineConfig'
|
|
|
|
|
|
tos:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.TOSEngineConfig'
|
|
|
|
|
|
type: object
|
|
|
|
|
|
internal_handler.StorageCheckResponse:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
bucket_created:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
message:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
ok:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
type: object
|
|
|
|
|
|
internal_handler.StorageEngineStatusItem:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
available:
|
|
|
|
|
|
description: whether the engine can be used
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
description:
|
|
|
|
|
|
description: short description for UI
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
description: '"local", "minio", "cos", "tos"'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2025-12-16 08:40:13 +00:00
|
|
|
|
internal_handler.TextRelationExtractionRequest:
|
|
|
|
|
|
properties:
|
2026-03-30 13:20:14 +00:00
|
|
|
|
model_id:
|
|
|
|
|
|
type: string
|
2025-12-16 08:40:13 +00:00
|
|
|
|
tags:
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
text:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
2026-03-30 13:20:14 +00:00
|
|
|
|
- model_id
|
2025-12-16 08:40:13 +00:00
|
|
|
|
- tags
|
|
|
|
|
|
- text
|
|
|
|
|
|
type: object
|
2026-02-26 12:59:52 +00:00
|
|
|
|
internal_handler.UpdateAgentRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
avatar:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
config:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.CustomAgentConfig'
|
|
|
|
|
|
description:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2025-12-16 08:40:13 +00:00
|
|
|
|
internal_handler.UpdateChunkRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
chunk_index:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
content:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
embedding:
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: number
|
|
|
|
|
|
type: array
|
|
|
|
|
|
end_at:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
image_info:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
is_enabled:
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
start_at:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: object
|
|
|
|
|
|
internal_handler.UpdateKnowledgeBaseRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
config:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBaseConfig'
|
|
|
|
|
|
description:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- name
|
|
|
|
|
|
type: object
|
|
|
|
|
|
internal_handler.UpdateModelRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
description:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ModelParameters'
|
|
|
|
|
|
source:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ModelSource'
|
|
|
|
|
|
type:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ModelType'
|
|
|
|
|
|
type: object
|
2026-02-26 12:59:52 +00:00
|
|
|
|
internal_handler.addSimilarQuestionsRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
similar_questions:
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
minItems: 1
|
|
|
|
|
|
type: array
|
|
|
|
|
|
required:
|
|
|
|
|
|
- similar_questions
|
|
|
|
|
|
type: object
|
|
|
|
|
|
internal_handler.updateLastFAQImportResultDisplayStatusRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
display_status:
|
|
|
|
|
|
enum:
|
|
|
|
|
|
- open
|
|
|
|
|
|
- close
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- display_status
|
|
|
|
|
|
type: object
|
2025-12-16 08:40:13 +00:00
|
|
|
|
internal_handler_session.CreateKnowledgeQARequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
agent_enabled:
|
|
|
|
|
|
description: Whether agent mode is enabled for this request
|
|
|
|
|
|
type: boolean
|
2026-02-26 12:59:52 +00:00
|
|
|
|
agent_id:
|
|
|
|
|
|
description: Selected custom agent ID (backend resolves shared agent and its
|
|
|
|
|
|
tenant from share relation)
|
|
|
|
|
|
type: string
|
2026-03-30 13:20:14 +00:00
|
|
|
|
channel:
|
|
|
|
|
|
description: 'Source channel: "web", "api", "im", etc.'
|
|
|
|
|
|
type: string
|
2026-02-26 12:59:52 +00:00
|
|
|
|
disable_title:
|
|
|
|
|
|
description: Whether to disable auto title generation
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
enable_memory:
|
|
|
|
|
|
description: Whether memory feature is enabled for this request
|
|
|
|
|
|
type: boolean
|
2026-03-30 13:20:14 +00:00
|
|
|
|
images:
|
|
|
|
|
|
description: Attached images for multimodal chat
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler_session.ImageAttachment'
|
|
|
|
|
|
type: array
|
2025-12-16 08:40:13 +00:00
|
|
|
|
knowledge_base_ids:
|
|
|
|
|
|
description: Selected knowledge base ID for this request
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
2025-12-22 06:36:29 +00:00
|
|
|
|
knowledge_ids:
|
|
|
|
|
|
description: Selected knowledge ID for this request
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
mentioned_items:
|
|
|
|
|
|
description: '@mentioned knowledge bases and files'
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler_session.MentionedItemRequest'
|
|
|
|
|
|
type: array
|
2025-12-16 08:40:13 +00:00
|
|
|
|
query:
|
|
|
|
|
|
description: Query text for knowledge base search
|
|
|
|
|
|
type: string
|
|
|
|
|
|
summary_model_id:
|
|
|
|
|
|
description: Optional summary model ID for this request (overrides session
|
|
|
|
|
|
default)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
web_search_enabled:
|
|
|
|
|
|
description: Whether web search is enabled for this request
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
required:
|
|
|
|
|
|
- query
|
|
|
|
|
|
type: object
|
|
|
|
|
|
internal_handler_session.CreateSessionRequest:
|
|
|
|
|
|
properties:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description:
|
|
|
|
|
|
description: Description for the session (optional)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
title:
|
|
|
|
|
|
description: Title for the session (optional)
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
internal_handler_session.GenerateTitleRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
messages:
|
|
|
|
|
|
description: Messages to use as context for title generation
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.Message'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
required:
|
|
|
|
|
|
- messages
|
|
|
|
|
|
type: object
|
2026-03-30 13:20:14 +00:00
|
|
|
|
internal_handler_session.ImageAttachment:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
caption:
|
|
|
|
|
|
description: VLM analysis result (context-aware, single call)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
data:
|
|
|
|
|
|
description: base64 data URI from frontend (data:image/png;base64,...)
|
|
|
|
|
|
type: string
|
|
|
|
|
|
url:
|
|
|
|
|
|
description: serving URL after saving to storage
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2025-12-22 06:36:29 +00:00
|
|
|
|
internal_handler_session.MentionedItemRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
kb_type:
|
|
|
|
|
|
description: '"document" or "faq" (only for kb type)'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type:
|
|
|
|
|
|
description: '"kb" for knowledge base, "file" for file'
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
2025-12-16 08:40:13 +00:00
|
|
|
|
internal_handler_session.SearchKnowledgeRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
knowledge_base_id:
|
2025-12-24 07:45:42 +00:00
|
|
|
|
description: Single knowledge base ID (for backward compatibility)
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: string
|
2025-12-24 07:45:42 +00:00
|
|
|
|
knowledge_base_ids:
|
|
|
|
|
|
description: IDs of knowledge bases to search (multi-KB support)
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
knowledge_ids:
|
|
|
|
|
|
description: IDs of specific knowledge (files) to search
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
2025-12-16 08:40:13 +00:00
|
|
|
|
query:
|
|
|
|
|
|
description: Query text to search for
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- query
|
|
|
|
|
|
type: object
|
|
|
|
|
|
internal_handler_session.StopSessionRequest:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
message_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
required:
|
|
|
|
|
|
- message_id
|
|
|
|
|
|
type: object
|
2026-02-26 12:59:52 +00:00
|
|
|
|
internal_handler_session.batchDeleteRequest:
|
|
|
|
|
|
properties:
|
2026-03-30 13:20:14 +00:00
|
|
|
|
delete_all:
|
|
|
|
|
|
type: boolean
|
2026-02-26 12:59:52 +00:00
|
|
|
|
ids:
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
type: object
|
2025-12-16 08:40:13 +00:00
|
|
|
|
info:
|
|
|
|
|
|
contact:
|
|
|
|
|
|
name: WeKnora Github
|
|
|
|
|
|
url: https://github.com/Tencent/WeKnora
|
|
|
|
|
|
description: WeKnora 知识库管理系统 API 文档
|
|
|
|
|
|
termsOfService: http://swagger.io/terms/
|
|
|
|
|
|
title: WeKnora API
|
|
|
|
|
|
version: "1.0"
|
|
|
|
|
|
paths:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
/agents:
|
|
|
|
|
|
get:
|
2025-12-16 08:40:13 +00:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: 获取当前租户的所有智能体(包括内置智能体)
|
2025-12-16 08:40:13 +00:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: 智能体列表
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
2026-02-26 12:59:52 +00:00
|
|
|
|
"500":
|
|
|
|
|
|
description: 服务器错误
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 获取智能体列表
|
2025-12-16 08:40:13 +00:00
|
|
|
|
tags:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- 智能体
|
2025-12-16 08:40:13 +00:00
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: 创建新的自定义智能体
|
2025-12-16 08:40:13 +00:00
|
|
|
|
parameters:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- description: 智能体信息
|
2025-12-16 08:40:13 +00:00
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
$ref: '#/definitions/internal_handler.CreateAgentRequest'
|
2025-12-16 08:40:13 +00:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
"201":
|
|
|
|
|
|
description: 创建的智能体
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
2026-02-26 12:59:52 +00:00
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 创建智能体
|
2025-12-16 08:40:13 +00:00
|
|
|
|
tags:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- 智能体
|
|
|
|
|
|
/agents/{id}:
|
|
|
|
|
|
delete:
|
2025-12-16 08:40:13 +00:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: 删除指定的智能体
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 智能体ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 删除成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
"403":
|
|
|
|
|
|
description: 无法删除内置智能体
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 智能体不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 删除智能体
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 智能体
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 根据ID获取智能体详情
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 智能体ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 智能体详情
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 智能体不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 获取智能体详情
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 智能体
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 更新智能体的名称、描述和配置
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 智能体ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 更新请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler.UpdateAgentRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 更新后的智能体
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
"403":
|
|
|
|
|
|
description: 无法修改内置智能体
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 更新智能体
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 智能体
|
|
|
|
|
|
/agents/{id}/copy:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 复制指定的智能体
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 智能体ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"201":
|
|
|
|
|
|
description: 复制成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 智能体不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 复制智能体
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 智能体
|
2026-03-30 13:20:14 +00:00
|
|
|
|
/agents/{id}/suggested-questions:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 基于智能体关联的知识库,返回推荐问题供用户快捷提问
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 智能体ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 知识库ID列表(逗号分隔),覆盖智能体默认配置
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: knowledge_base_ids
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 知识ID列表(逗号分隔),限定到具体文档
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: knowledge_ids
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 返回数量上限(默认6)
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: limit
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 推荐问题列表
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 智能体不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 获取推荐问题
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 智能体
|
2026-02-26 12:59:52 +00:00
|
|
|
|
/agents/placeholders:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取所有可用的提示词占位符定义,按字段类型分组
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 占位符定义
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 获取占位符定义
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 智能体
|
2026-03-30 13:20:14 +00:00
|
|
|
|
/api/v1/datasource:
|
|
|
|
|
|
get:
|
|
|
|
|
|
description: List all data sources for a specific knowledge base
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: Knowledge base ID
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: kb_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: List data sources for a knowledge base
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- DataSource
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: Create a new data source configuration for a knowledge base
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: Data source configuration
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"201":
|
|
|
|
|
|
description: Created
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource'
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: Create a new data source
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- DataSource
|
|
|
|
|
|
/api/v1/datasource/{id}:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
description: Delete a data source (soft delete)
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: Data source ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"204":
|
|
|
|
|
|
description: No Content
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: Delete a data source
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- DataSource
|
|
|
|
|
|
get:
|
|
|
|
|
|
description: Retrieve a data source configuration by ID
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: Data source ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: Get a data source by ID
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- DataSource
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: Update an existing data source configuration
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: Data source ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: Updated configuration
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.DataSource'
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: Update a data source
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- DataSource
|
|
|
|
|
|
/api/v1/datasource/{id}/logs:
|
|
|
|
|
|
get:
|
|
|
|
|
|
description: Retrieve sync history for a data source
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: Data source ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 'Limit (default: 10)'
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: limit
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
- description: 'Offset (default: 0)'
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: offset
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.SyncLog'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: Get sync logs
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- DataSource
|
|
|
|
|
|
/api/v1/datasource/{id}/pause:
|
|
|
|
|
|
post:
|
|
|
|
|
|
description: Pause a data source's scheduled syncs
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: Data source ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: Pause data source
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- DataSource
|
|
|
|
|
|
/api/v1/datasource/{id}/resources:
|
|
|
|
|
|
get:
|
|
|
|
|
|
description: List resources available for sync in the external system
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: Data source ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.Resource'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: List available resources in data source
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- DataSource
|
|
|
|
|
|
/api/v1/datasource/{id}/resume:
|
|
|
|
|
|
post:
|
|
|
|
|
|
description: Resume a paused data source
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: Data source ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: Resume data source
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- DataSource
|
|
|
|
|
|
/api/v1/datasource/{id}/sync:
|
|
|
|
|
|
post:
|
|
|
|
|
|
description: Trigger an immediate sync for a data source
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: Data source ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.SyncLog'
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: Trigger immediate sync
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- DataSource
|
|
|
|
|
|
/api/v1/datasource/{id}/validate:
|
|
|
|
|
|
post:
|
|
|
|
|
|
description: Validate the connection to an external data source
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: Data source ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: Test data source connection
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- DataSource
|
|
|
|
|
|
/api/v1/datasource/logs/{log_id}:
|
|
|
|
|
|
get:
|
|
|
|
|
|
description: Retrieve a specific sync log entry
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: Sync log ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: log_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.SyncLog'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: Get specific sync log
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- DataSource
|
|
|
|
|
|
/api/v1/datasource/types:
|
|
|
|
|
|
get:
|
|
|
|
|
|
description: Get list of available data source connectors
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
items:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_datasource.ConnectorMetadata'
|
|
|
|
|
|
type: array
|
|
|
|
|
|
summary: Get available connectors
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- DataSource
|
|
|
|
|
|
/api/v1/datasource/validate-credentials:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: Validate connectivity to an external data source using type + credentials
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: type and credentials
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: object
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: Test connection with raw credentials (no persistence)
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- DataSource
|
2026-02-26 12:59:52 +00:00
|
|
|
|
/auth/change-password:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 修改当前用户的登录密码
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 密码修改请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
new_password:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
old_password:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 修改成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 修改密码
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 认证
|
|
|
|
|
|
/auth/login:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 用户登录并获取访问令牌
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 登录请求参数
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.LoginRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.LoginResponse'
|
|
|
|
|
|
"401":
|
|
|
|
|
|
description: 认证失败
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
summary: 用户登录
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 认证
|
2026-03-30 13:20:14 +00:00
|
|
|
|
/auth/logout:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 撤销当前访问令牌并登出
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 登出成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 用户登出
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 认证
|
|
|
|
|
|
/auth/me:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取当前登录用户的详细信息
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 用户信息
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"401":
|
|
|
|
|
|
description: 未授权
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 获取当前用户信息
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 认证
|
|
|
|
|
|
/auth/oidc/callback:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 接收OIDC provider回调并由后端完成code交换,随后重定向回前端登录页
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: OIDC授权码
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: code
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: OIDC状态
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: state
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: OIDC错误码
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: error
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"302":
|
|
|
|
|
|
description: Found
|
|
|
|
|
|
summary: OIDC登录重定向回调
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 认证
|
|
|
|
|
|
/auth/oidc/config:
|
|
|
|
|
|
get:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-30 13:20:14 +00:00
|
|
|
|
description: 返回OIDC是否启用以及provider展示名称,供前端决定是否展示OIDC登录入口
|
2026-02-26 12:59:52 +00:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
2025-12-16 08:40:13 +00:00
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
2026-03-30 13:20:14 +00:00
|
|
|
|
description: OK
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
2026-03-30 13:20:14 +00:00
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OIDCConfigResponse'
|
|
|
|
|
|
summary: 获取OIDC登录配置
|
2025-12-16 08:40:13 +00:00
|
|
|
|
tags:
|
|
|
|
|
|
- 认证
|
2026-03-30 13:20:14 +00:00
|
|
|
|
/auth/oidc/url:
|
2025-12-16 08:40:13 +00:00
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-30 13:20:14 +00:00
|
|
|
|
description: 根据后端OIDC配置生成第三方登录跳转地址
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: OIDC回调地址
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: redirect_uri
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2025-12-16 08:40:13 +00:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
2026-03-30 13:20:14 +00:00
|
|
|
|
description: OK
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
2026-03-30 13:20:14 +00:00
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.OIDCAuthURLResponse'
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
2026-03-30 13:20:14 +00:00
|
|
|
|
"403":
|
|
|
|
|
|
description: OIDC未启用
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
summary: 获取OIDC授权地址
|
2025-12-16 08:40:13 +00:00
|
|
|
|
tags:
|
|
|
|
|
|
- 认证
|
|
|
|
|
|
/auth/refresh:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 使用刷新令牌获取新的访问令牌
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 刷新令牌
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
refreshToken:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 新令牌
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"401":
|
|
|
|
|
|
description: 令牌无效
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
summary: 刷新令牌
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 认证
|
|
|
|
|
|
/auth/register:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 注册新用户账号
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 注册请求参数
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.RegisterRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"201":
|
|
|
|
|
|
description: Created
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.RegisterResponse'
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
2025-12-24 07:45:42 +00:00
|
|
|
|
"403":
|
|
|
|
|
|
description: 注册功能已禁用
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 用户注册
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 认证
|
|
|
|
|
|
/auth/validate:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 验证访问令牌是否有效
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 令牌有效
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"401":
|
|
|
|
|
|
description: 令牌无效
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 验证令牌
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 认证
|
|
|
|
|
|
/chunks/{knowledge_id}:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 删除指定知识下的所有分块
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: knowledge_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 删除成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 删除知识下所有分块
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 分块管理
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取指定知识下的所有分块列表,支持分页
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: knowledge_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- default: 1
|
|
|
|
|
|
description: 页码
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: page
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
- default: 10
|
|
|
|
|
|
description: 每页数量
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: page_size
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 分块列表
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 获取知识分块列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 分块管理
|
|
|
|
|
|
/chunks/{knowledge_id}/{id}:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 删除指定的分块
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: knowledge_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 分块ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 删除成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 分块不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 删除分块
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 分块管理
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 更新指定分块的内容和属性
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: knowledge_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 分块ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 更新请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler.UpdateChunkRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 更新后的分块
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 分块不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 更新分块
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 分块管理
|
|
|
|
|
|
/chunks/by-id/{id}:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: 仅通过分块ID获取分块详情(不需要knowledge_id);支持共享知识库下的分块访问
|
2025-12-16 08:40:13 +00:00
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 分块ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 分块详情
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 分块不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 通过ID获取分块
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 分块管理
|
|
|
|
|
|
/chunks/by-id/{id}/questions:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 删除分块中生成的问题
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 分块ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 问题ID
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
question_id:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 删除成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 分块不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 删除生成的问题
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 分块管理
|
|
|
|
|
|
/evaluation/:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 根据任务ID获取评估结果
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 评估任务ID
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: task_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 评估结果
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 获取评估结果
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 评估
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 对知识库进行评估测试
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 评估请求参数
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler.EvaluationRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 评估任务
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 执行评估
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 评估
|
2025-12-22 06:36:29 +00:00
|
|
|
|
/faq/import/progress/{task_id}:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取FAQ导入任务的进度
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 任务ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: task_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 导入进度
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 任务不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 获取FAQ导入进度
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- FAQ管理
|
2025-12-16 08:40:13 +00:00
|
|
|
|
/initialization/extract/relations:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 从文本中提取实体和关系
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 提取请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler.TextRelationExtractionRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 提取结果
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 提取文本关系
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 初始化
|
|
|
|
|
|
/initialization/fabri/tag:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 随机生成一组标签
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 生成的标签
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 生成随机标签
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 初始化
|
|
|
|
|
|
/initialization/fabri/text:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 根据标签生成示例文本
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 生成请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler.FabriTextRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 生成的文本
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 生成示例文本
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 初始化
|
|
|
|
|
|
/initialization/kb/{kbId}:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 根据知识库ID执行完整配置更新
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: kbId
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 初始化请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: object
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 初始化成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 初始化知识库配置
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 初始化
|
|
|
|
|
|
/initialization/kb/{kbId}/config:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 根据知识库ID获取当前配置信息
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: kbId
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 配置信息
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 知识库不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 获取知识库配置
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 初始化
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 根据知识库ID更新模型和分块配置
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: kbId
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 配置请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler.KBModelConfigRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 更新成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 知识库不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 更新知识库配置
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 初始化
|
|
|
|
|
|
/initialization/models/embedding/test:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 测试Embedding接口是否可用并返回向量维度
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: Embedding测试请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: object
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 测试结果
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 测试Embedding模型
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 初始化
|
|
|
|
|
|
/initialization/models/remote/check:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 检查远程API模型连接是否正常
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 模型检查请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler.RemoteModelCheckRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 检查结果
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 检查远程模型
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 初始化
|
|
|
|
|
|
/initialization/models/rerank/check:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 检查Rerank模型连接和功能是否正常
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: Rerank检查请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: object
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 检查结果
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 检查Rerank模型
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 初始化
|
|
|
|
|
|
/initialization/multimodal/test:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- multipart/form-data
|
|
|
|
|
|
description: 上传图片测试多模态处理功能
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 测试图片
|
|
|
|
|
|
in: formData
|
|
|
|
|
|
name: image
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: file
|
|
|
|
|
|
- description: VLM模型名称
|
|
|
|
|
|
in: formData
|
|
|
|
|
|
name: vlm_model
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: VLM Base URL
|
|
|
|
|
|
in: formData
|
|
|
|
|
|
name: vlm_base_url
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: VLM API Key
|
|
|
|
|
|
in: formData
|
|
|
|
|
|
name: vlm_api_key
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: VLM接口类型
|
|
|
|
|
|
in: formData
|
|
|
|
|
|
name: vlm_interface_type
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 存储类型(cos/minio)
|
|
|
|
|
|
in: formData
|
|
|
|
|
|
name: storage_type
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 测试结果
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 测试多模态功能
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 初始化
|
|
|
|
|
|
/initialization/ollama/download/{taskId}:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取Ollama模型下载任务的进度
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 任务ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: taskId
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 下载进度
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 任务不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 获取下载进度
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 初始化
|
|
|
|
|
|
/initialization/ollama/download/tasks:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 列出所有Ollama模型下载任务
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 任务列表
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 列出下载任务
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 初始化
|
|
|
|
|
|
/initialization/ollama/models:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 列出已安装的Ollama模型
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 模型列表
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: 服务器错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 列出Ollama模型
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 初始化
|
|
|
|
|
|
/initialization/ollama/models/check:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 检查指定的Ollama模型是否已安装
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 模型名称列表
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
models:
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: array
|
|
|
|
|
|
type: object
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 模型状态
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 检查Ollama模型状态
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 初始化
|
|
|
|
|
|
/initialization/ollama/models/download:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 异步下载指定的Ollama模型
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 模型名称
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
modelName:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 下载任务信息
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 下载Ollama模型
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 初始化
|
|
|
|
|
|
/initialization/ollama/status:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 检查Ollama服务是否可用
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: Ollama状态
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 检查Ollama服务状态
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 初始化
|
|
|
|
|
|
/knowledge-bases:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: 获取当前租户的所有知识库;或当传入 agent_id(共享智能体)时,校验权限后返回该智能体配置的知识库范围(用于 @ 提及)
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 共享智能体 ID(传入时返回该智能体可用的知识库)
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: agent_id
|
|
|
|
|
|
type: string
|
2025-12-16 08:40:13 +00:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 知识库列表
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: 服务器错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 获取知识库列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 创建新的知识库
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.KnowledgeBase'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"201":
|
|
|
|
|
|
description: 创建的知识库
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 创建知识库
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库
|
|
|
|
|
|
/knowledge-bases/{id}:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 删除指定的知识库及其所有内容
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 删除成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 删除知识库
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: 根据ID获取知识库详情。当使用共享智能体时,可传 agent_id 以校验该智能体是否有权访问该知识库。
|
2025-12-16 08:40:13 +00:00
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- description: 共享智能体 ID(用于校验智能体是否有权访问该知识库)
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: agent_id
|
|
|
|
|
|
type: string
|
2025-12-16 08:40:13 +00:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 知识库详情
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 知识库不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 获取知识库详情
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 更新知识库的名称、描述和配置
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 更新请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler.UpdateKnowledgeBaseRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 更新后的知识库
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 更新知识库
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库
|
|
|
|
|
|
/knowledge-bases/{id}/faq/entries:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 批量删除指定的FAQ条目
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- description: 要删除的FAQ ID列表(seq_id)
|
2025-12-16 08:40:13 +00:00
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
ids:
|
|
|
|
|
|
items:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
type: integer
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: array
|
|
|
|
|
|
type: object
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 删除成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 批量删除FAQ条目
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- FAQ管理
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取知识库下的FAQ条目列表,支持分页和筛选
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 页码
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: page
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
- description: 每页数量
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: page_size
|
|
|
|
|
|
type: integer
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- description: 标签ID筛选(seq_id)
|
2025-12-16 08:40:13 +00:00
|
|
|
|
in: query
|
|
|
|
|
|
name: tag_id
|
2026-02-26 12:59:52 +00:00
|
|
|
|
type: integer
|
2025-12-16 08:40:13 +00:00
|
|
|
|
- description: 关键词搜索
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: keyword
|
|
|
|
|
|
type: string
|
2025-12-24 07:45:42 +00:00
|
|
|
|
- description: '搜索字段: standard_question(标准问题), similar_questions(相似问法), answers(答案),
|
|
|
|
|
|
默认搜索全部'
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: search_field
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: '排序方式: asc(按更新时间正序), 默认按更新时间倒序'
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: sort_order
|
|
|
|
|
|
type: string
|
2025-12-16 08:40:13 +00:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: FAQ列表
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 获取FAQ条目列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- FAQ管理
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: |-
|
|
|
|
|
|
异步批量更新或插入FAQ条目。支持 dry_run 模式(设置 dry_run=true),异步验证不实际导入。
|
|
|
|
|
|
dry_run 模式是异步操作,返回 task_id,通过 /faq/import/progress/{task_id} 查询进度和结果。
|
|
|
|
|
|
验证内容包括:1) 条目基本格式 2) 重复问题(批次内和知识库已有) 3) 内容安全检查。
|
2025-12-16 08:40:13 +00:00
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 批量操作请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQBatchUpsertPayload'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 任务ID
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 批量更新/插入FAQ条目
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- FAQ管理
|
|
|
|
|
|
/knowledge-bases/{id}/faq/entries/{entry_id}:
|
2025-12-24 07:45:42 +00:00
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 根据ID获取单个FAQ条目的详情
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- description: FAQ条目ID(seq_id)
|
2025-12-24 07:45:42 +00:00
|
|
|
|
in: path
|
|
|
|
|
|
name: entry_id
|
|
|
|
|
|
required: true
|
2026-02-26 12:59:52 +00:00
|
|
|
|
type: integer
|
2025-12-24 07:45:42 +00:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: FAQ条目详情
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 条目不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 获取FAQ条目详情
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- FAQ管理
|
2025-12-16 08:40:13 +00:00
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 更新指定的FAQ条目
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- description: FAQ条目ID(seq_id)
|
2025-12-16 08:40:13 +00:00
|
|
|
|
in: path
|
|
|
|
|
|
name: entry_id
|
|
|
|
|
|
required: true
|
2026-02-26 12:59:52 +00:00
|
|
|
|
type: integer
|
2025-12-16 08:40:13 +00:00
|
|
|
|
- description: FAQ条目
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryPayload'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 更新成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 更新FAQ条目
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- FAQ管理
|
2026-02-26 12:59:52 +00:00
|
|
|
|
/knowledge-bases/{id}/faq/entries/{entry_id}/similar-questions:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 向指定的FAQ条目添加相似问题
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: FAQ条目ID(seq_id)
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: entry_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
- description: 相似问列表
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler.addSimilarQuestionsRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 更新后的FAQ条目
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 条目不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 添加相似问
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- FAQ管理
|
2025-12-16 08:40:13 +00:00
|
|
|
|
/knowledge-bases/{id}/faq/entries/export:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 将所有FAQ条目导出为CSV文件
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- text/csv
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: CSV文件
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: file
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 导出FAQ条目
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- FAQ管理
|
|
|
|
|
|
/knowledge-bases/{id}/faq/entries/fields:
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 批量更新FAQ条目的多个字段(is_enabled, is_recommended, tag_id)
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 字段更新请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryFieldsBatchUpdate'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 更新成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 批量更新FAQ字段
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- FAQ管理
|
|
|
|
|
|
/knowledge-bases/{id}/faq/entries/tags:
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 批量更新FAQ条目的标签
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 标签更新请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: object
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 更新成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 批量更新FAQ标签
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- FAQ管理
|
|
|
|
|
|
/knowledge-bases/{id}/faq/entry:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 同步创建单个FAQ条目
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: FAQ条目
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQEntryPayload'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 创建的FAQ条目
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 创建单个FAQ条目
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- FAQ管理
|
2026-02-26 12:59:52 +00:00
|
|
|
|
/knowledge-bases/{id}/faq/import/last-result/display:
|
|
|
|
|
|
put:
|
2025-12-16 08:40:13 +00:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: 更新FAQ知识库导入结果统计卡片的显示或隐藏状态
|
2025-12-16 08:40:13 +00:00
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- description: 状态更新请求
|
2025-12-16 08:40:13 +00:00
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
$ref: '#/definitions/internal_handler.updateLastFAQImportResultDisplayStatusRequest'
|
2025-12-16 08:40:13 +00:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: 更新成功
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
2026-02-26 12:59:52 +00:00
|
|
|
|
"404":
|
|
|
|
|
|
description: 知识库不存在或无导入记录
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
2025-12-16 08:40:13 +00:00
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2026-02-26 12:59:52 +00:00
|
|
|
|
summary: 更新FAQ最后一次导入结果显示状态
|
2025-12-16 08:40:13 +00:00
|
|
|
|
tags:
|
|
|
|
|
|
- FAQ管理
|
2026-02-26 12:59:52 +00:00
|
|
|
|
/knowledge-bases/{id}/faq/search:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 使用混合搜索在FAQ中搜索,支持两级优先级标签召回:first_priority_tag_ids优先级最高,second_priority_tag_ids次之
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 搜索请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.FAQSearchRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 搜索结果
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 搜索FAQ
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- FAQ管理
|
|
|
|
|
|
/knowledge-bases/{id}/hybrid-search:
|
|
|
|
|
|
get:
|
2025-12-16 08:40:13 +00:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 在知识库中执行向量和关键词混合搜索
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 搜索参数
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.SearchParams'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 搜索结果
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 混合搜索
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库
|
|
|
|
|
|
/knowledge-bases/{id}/knowledge:
|
2026-03-30 13:20:14 +00:00
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 删除知识库下的所有知识条目(异步任务)。知识库本身保留,仅清空其中的内容
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 清空任务已提交
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
"403":
|
|
|
|
|
|
description: 权限不足
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 清空知识库内容
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识管理
|
2025-12-16 08:40:13 +00:00
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取知识库下的知识列表,支持分页和筛选
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 页码
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: page
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
- description: 每页数量
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: page_size
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
- description: 标签ID筛选
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: tag_id
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 关键词搜索
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: keyword
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 文件类型筛选
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: file_type
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 知识列表
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 获取知识列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识管理
|
|
|
|
|
|
/knowledge-bases/{id}/knowledge/file:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- multipart/form-data
|
|
|
|
|
|
description: 上传文件并创建知识条目
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 上传的文件
|
|
|
|
|
|
in: formData
|
|
|
|
|
|
name: file
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: file
|
|
|
|
|
|
- description: 自定义文件名
|
|
|
|
|
|
in: formData
|
|
|
|
|
|
name: fileName
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 元数据JSON
|
|
|
|
|
|
in: formData
|
|
|
|
|
|
name: metadata
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 启用多模态处理
|
|
|
|
|
|
in: formData
|
|
|
|
|
|
name: enable_multimodel
|
|
|
|
|
|
type: boolean
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 创建的知识
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
"409":
|
|
|
|
|
|
description: 文件重复
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 从文件创建知识
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识管理
|
|
|
|
|
|
/knowledge-bases/{id}/knowledge/manual:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 手工录入Markdown格式的知识内容
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 手工知识内容
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ManualKnowledgePayload'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 创建的知识
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 手工创建知识
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识管理
|
|
|
|
|
|
/knowledge-bases/{id}/knowledge/url:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: 从指定URL抓取内容并创建知识条目。当提供 file_name/file_type 或 URL 路径含已知文件扩展名时,自动切换为文件下载模式
|
2025-12-16 08:40:13 +00:00
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: URL请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
enable_multimodel:
|
|
|
|
|
|
type: boolean
|
2026-02-26 12:59:52 +00:00
|
|
|
|
file_name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
file_type:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
tag_id:
|
|
|
|
|
|
type: string
|
2025-12-16 08:40:13 +00:00
|
|
|
|
title:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
url:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"201":
|
|
|
|
|
|
description: 创建的知识
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
"409":
|
|
|
|
|
|
description: URL重复
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 从URL创建知识
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识管理
|
2026-03-30 13:20:14 +00:00
|
|
|
|
/knowledge-bases/{id}/pin:
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 切换知识库的置顶状态
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 更新后的知识库
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 知识库不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 置顶/取消置顶知识库
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库
|
2026-02-26 12:59:52 +00:00
|
|
|
|
/knowledge-bases/{id}/shares:
|
|
|
|
|
|
get:
|
|
|
|
|
|
description: 获取知识库的所有共享记录
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ListSharesResponse'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 获取知识库的共享列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库共享
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 将知识库共享到指定组织
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 共享信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ShareKnowledgeBaseRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"201":
|
|
|
|
|
|
description: Created
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"403":
|
|
|
|
|
|
description: Forbidden
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 共享知识库到组织
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库共享
|
|
|
|
|
|
/knowledge-bases/{id}/shares/{share_id}:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
description: 取消知识库的共享
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 共享记录ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: share_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"403":
|
|
|
|
|
|
description: Forbidden
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 取消共享
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库共享
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 更新知识库共享的权限级别
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 共享记录ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: share_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 权限信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateSharePermissionRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"403":
|
|
|
|
|
|
description: Forbidden
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 更新共享权限
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库共享
|
2025-12-16 08:40:13 +00:00
|
|
|
|
/knowledge-bases/{id}/tags:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取知识库下的所有标签及统计信息
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 页码
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: page
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
- description: 每页数量
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: page_size
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
- description: 关键词搜索
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: keyword
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 标签列表
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 获取标签列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 标签管理
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 在知识库下创建新标签
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 标签信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
color:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
sort_order:
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
type: object
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 创建的标签
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 创建标签
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 标签管理
|
|
|
|
|
|
/knowledge-bases/{id}/tags/{tag_id}:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2025-12-24 07:45:42 +00:00
|
|
|
|
description: 删除标签,可使用force=true强制删除被引用的标签,content_only=true仅删除标签下的内容而保留标签本身
|
2025-12-16 08:40:13 +00:00
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- description: 标签ID (UUID或seq_id)
|
2025-12-16 08:40:13 +00:00
|
|
|
|
in: path
|
|
|
|
|
|
name: tag_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 强制删除
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: force
|
|
|
|
|
|
type: boolean
|
2025-12-24 07:45:42 +00:00
|
|
|
|
- description: 仅删除内容,保留标签
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: content_only
|
|
|
|
|
|
type: boolean
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- description: 删除选项
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: body
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler.DeleteTagRequest'
|
2025-12-16 08:40:13 +00:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 删除成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 删除标签
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 标签管理
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 更新标签信息
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识库ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- description: 标签ID (UUID或seq_id)
|
2025-12-16 08:40:13 +00:00
|
|
|
|
in: path
|
|
|
|
|
|
name: tag_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 标签更新信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: object
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 更新后的标签
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 更新标签
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 标签管理
|
|
|
|
|
|
/knowledge-bases/copy:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2025-12-22 06:36:29 +00:00
|
|
|
|
description: 将一个知识库的内容复制到另一个知识库(异步任务)
|
2025-12-16 08:40:13 +00:00
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 复制请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler.CopyKnowledgeBaseRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
2025-12-22 06:36:29 +00:00
|
|
|
|
description: 任务ID
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 复制知识库
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库
|
2025-12-22 06:36:29 +00:00
|
|
|
|
/knowledge-bases/copy/progress/{task_id}:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取知识库复制任务的进度
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 任务ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: task_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 进度信息
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 任务不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 获取知识库复制进度
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库
|
2025-12-16 08:40:13 +00:00
|
|
|
|
/knowledge/{id}:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 根据ID删除知识条目
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 删除成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 删除知识
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识管理
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 根据ID获取知识条目详情
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 知识详情
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 知识不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 获取知识详情
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识管理
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 更新知识条目信息
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 知识信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.Knowledge'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 更新成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 更新知识
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识管理
|
|
|
|
|
|
/knowledge/{id}/download:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 下载知识条目关联的原始文件
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/octet-stream
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 文件内容
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: file
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 下载知识文件
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识管理
|
2026-03-30 13:20:14 +00:00
|
|
|
|
/knowledge/{id}/preview:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 返回知识条目关联的原始文件,Content-Type 根据文件类型设置,用于浏览器内嵌预览
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/pdf
|
|
|
|
|
|
- image/jpeg
|
|
|
|
|
|
- image/png
|
|
|
|
|
|
- text/plain
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 文件内容
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: file
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 预览知识文件
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识管理
|
2026-02-26 12:59:52 +00:00
|
|
|
|
/knowledge/{id}/reparse:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 删除知识中现有的文档内容并重新解析,使用异步任务方式处理
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 重新解析任务已提交
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
"403":
|
|
|
|
|
|
description: 权限不足
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 重新解析知识
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识管理
|
2025-12-16 08:40:13 +00:00
|
|
|
|
/knowledge/batch:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: 根据ID列表批量获取知识条目。可选 kb_id:指定时按该知识库校验权限并用于共享知识库的租户解析;可选 agent_id:使用共享智能体时传此参数,后端按智能体所属租户查询(用于刷新后恢复共享知识库下的文件)
|
2025-12-16 08:40:13 +00:00
|
|
|
|
parameters:
|
|
|
|
|
|
- collectionFormat: csv
|
|
|
|
|
|
description: 知识ID列表
|
|
|
|
|
|
in: query
|
|
|
|
|
|
items:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
name: ids
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: array
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- description: 可选,知识库ID(用于共享知识库时指定范围)
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: kb_id
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 可选,共享智能体ID(用于按智能体租户批量拉取文件详情)
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: agent_id
|
|
|
|
|
|
type: string
|
2025-12-16 08:40:13 +00:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 知识列表
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 批量获取知识
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识管理
|
|
|
|
|
|
/knowledge/image/{id}/{chunk_id}:
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 更新知识分块的图像信息
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 分块ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: chunk_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 图像信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
properties:
|
|
|
|
|
|
image_info:
|
|
|
|
|
|
type: string
|
|
|
|
|
|
type: object
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 更新成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 更新图像信息
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识管理
|
|
|
|
|
|
/knowledge/manual/{id}:
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 更新手工录入的Markdown知识内容
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 知识ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 手工知识内容
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ManualKnowledgePayload'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 更新后的知识
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 更新手工知识
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识管理
|
2025-12-22 06:36:29 +00:00
|
|
|
|
/knowledge/search:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: Search knowledge files by keyword. When agent_id is set (shared
|
|
|
|
|
|
agent), scope is the agent's configured knowledge bases.
|
2025-12-22 06:36:29 +00:00
|
|
|
|
parameters:
|
|
|
|
|
|
- description: Keyword to search
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: keyword
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: Offset for pagination
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: offset
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
- description: Limit for pagination (default 20)
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: limit
|
|
|
|
|
|
type: integer
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- description: Comma-separated file extensions to filter (e.g., csv,xlsx)
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: file_types
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: Shared agent ID (search within agent's KB scope)
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: agent_id
|
|
|
|
|
|
type: string
|
2025-12-22 06:36:29 +00:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: Search results
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Invalid request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: Search knowledge
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- Knowledge
|
2025-12-16 08:40:13 +00:00
|
|
|
|
/knowledge/tags:
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: 批量更新知识条目的标签。可选 kb_id:指定时按该知识库校验编辑权限并用于共享知识库的租户解析
|
2025-12-16 08:40:13 +00:00
|
|
|
|
parameters:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- description: 标签更新请求(updates 必填,kb_id 可选)
|
2025-12-16 08:40:13 +00:00
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: object
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 更新成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 批量更新知识标签
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识管理
|
|
|
|
|
|
/mcp-services:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取当前租户的所有MCP服务
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: MCP服务列表
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 获取MCP服务列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- MCP服务
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 创建新的MCP服务配置
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: MCP服务配置
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.MCPService'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 创建的MCP服务
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 创建MCP服务
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- MCP服务
|
|
|
|
|
|
/mcp-services/{id}:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 删除指定的MCP服务
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: MCP服务ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 删除成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: 服务器错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 删除MCP服务
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- MCP服务
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 根据ID获取MCP服务详情
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: MCP服务ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: MCP服务详情
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 服务不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 获取MCP服务详情
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- MCP服务
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 更新MCP服务配置
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: MCP服务ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 更新字段
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: object
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 更新后的MCP服务
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 更新MCP服务
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- MCP服务
|
|
|
|
|
|
/mcp-services/{id}/resources:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取MCP服务提供的资源列表
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: MCP服务ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 资源列表
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: 服务器错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 获取MCP服务资源列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- MCP服务
|
|
|
|
|
|
/mcp-services/{id}/test:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 测试MCP服务是否可以正常连接
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: MCP服务ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: 测试结果
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 测试MCP服务连接
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- MCP服务
|
|
|
|
|
|
/mcp-services/{id}/tools:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取MCP服务提供的工具列表
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: MCP服务ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 工具列表
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: 服务器错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 获取MCP服务工具列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- MCP服务
|
|
|
|
|
|
/messages/{session_id}/{id}:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 从会话中删除指定消息
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 会话ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: session_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 消息ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 删除成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: 服务器错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 删除消息
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 消息
|
|
|
|
|
|
/messages/{session_id}/load:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 加载会话的消息历史,支持分页和时间筛选
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 会话ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: session_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- default: 20
|
|
|
|
|
|
description: 返回数量
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: limit
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
- description: 在此时间之前的消息(RFC3339Nano格式)
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: before_time
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 消息列表
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 加载消息历史
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 消息
|
2026-03-30 13:20:14 +00:00
|
|
|
|
/messages/chat-history-stats:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取聊天历史知识库的统计信息(已索引消息数、知识库大小等)
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 统计信息
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 获取聊天历史知识库统计
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 消息
|
|
|
|
|
|
/messages/search:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 通过关键词和/或向量相似度搜索历史对话记录,支持关键词、向量、混合三种模式
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 搜索请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler.SearchMessagesRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 搜索结果
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 搜索历史对话
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 消息
|
2026-02-26 12:59:52 +00:00
|
|
|
|
/models:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取当前租户的所有模型
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 模型列表
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 获取模型列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 模型管理
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 创建新的模型配置
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 模型信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler.CreateModelRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"201":
|
|
|
|
|
|
description: 创建的模型
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 创建模型
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 模型管理
|
|
|
|
|
|
/models/{id}:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 删除指定的模型
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 模型ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 删除成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 模型不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 删除模型
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 模型管理
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 根据ID获取模型详情
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 模型ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 模型详情
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 模型不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 获取模型详情
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 模型管理
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 更新模型配置信息
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 模型ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 更新信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler.UpdateModelRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 更新后的模型
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 模型不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 更新模型
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 模型管理
|
|
|
|
|
|
/models/providers:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 根据模型类型获取支持的厂商列表及配置信息
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 模型类型 (chat, embedding, rerank, vllm)
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: model_type
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 厂商列表
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 获取模型厂商列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 模型管理
|
|
|
|
|
|
/organizations:
|
|
|
|
|
|
get:
|
|
|
|
|
|
description: 获取当前用户所属的所有组织,并附带各空间内知识库/智能体数量
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ListOrganizationsResponse'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 获取我的组织列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 组织管理
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 创建新的组织,创建者自动成为管理员
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 组织信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.CreateOrganizationRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"201":
|
|
|
|
|
|
description: Created
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 创建组织
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 组织管理
|
|
|
|
|
|
/organizations/{id}:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
description: 删除组织(仅组织创建者可操作)
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 组织ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"403":
|
|
|
|
|
|
description: Forbidden
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 删除组织
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 组织管理
|
|
|
|
|
|
get:
|
|
|
|
|
|
description: 根据ID获取组织详情
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 组织ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 获取组织详情
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 组织管理
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 更新组织信息(需要管理员权限)
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 组织ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 更新信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateOrganizationRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"403":
|
|
|
|
|
|
description: Forbidden
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 更新组织
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 组织管理
|
|
|
|
|
|
/organizations/{id}/invite:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 管理员直接添加用户为组织成员
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 组织ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 邀请信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.InviteMemberRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
"403":
|
|
|
|
|
|
description: Forbidden
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 邀请成员
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 组织管理
|
|
|
|
|
|
/organizations/{id}/invite-code:
|
|
|
|
|
|
post:
|
|
|
|
|
|
description: 生成新的组织邀请码(需要管理员权限)
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 组织ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"403":
|
|
|
|
|
|
description: Forbidden
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 生成邀请码
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 组织管理
|
|
|
|
|
|
/organizations/{id}/join-requests:
|
|
|
|
|
|
get:
|
|
|
|
|
|
description: 获取组织的待审核加入申请(仅管理员)
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 组织ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"403":
|
|
|
|
|
|
description: Forbidden
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 获取待审核加入申请列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 组织管理
|
|
|
|
|
|
/organizations/{id}/join-requests/{request_id}/review:
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 通过或拒绝加入申请(仅管理员)
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 组织ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 申请ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: request_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 审核结果
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ReviewJoinRequestRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"403":
|
|
|
|
|
|
description: Forbidden
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 审核加入申请
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 组织管理
|
|
|
|
|
|
/organizations/{id}/leave:
|
|
|
|
|
|
post:
|
|
|
|
|
|
description: 退出指定组织
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 组织ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"403":
|
|
|
|
|
|
description: Forbidden
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 退出组织
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 组织管理
|
|
|
|
|
|
/organizations/{id}/members:
|
|
|
|
|
|
get:
|
|
|
|
|
|
description: 获取组织的所有成员
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 组织ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ListMembersResponse'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 获取组织成员列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 组织管理
|
|
|
|
|
|
/organizations/{id}/members/{user_id}:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
description: 从组织中移除成员(需要管理员权限)
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 组织ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 用户ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: user_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"403":
|
|
|
|
|
|
description: Forbidden
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 移除成员
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 组织管理
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 更新组织成员的角色(需要管理员权限)
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 组织ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 用户ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: user_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 角色信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.UpdateMemberRoleRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"403":
|
|
|
|
|
|
description: Forbidden
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 更新成员角色
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 组织管理
|
|
|
|
|
|
/organizations/{id}/request-upgrade:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 现有成员申请更高权限
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 组织ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 申请信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.RequestRoleUpgradeRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 申请权限升级
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 组织管理
|
|
|
|
|
|
/organizations/{id}/search-users:
|
|
|
|
|
|
get:
|
|
|
|
|
|
description: 搜索用户(排除已有成员)用于邀请加入组织
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 组织ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 搜索关键词(用户名或邮箱)
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: q
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- default: 10
|
|
|
|
|
|
description: 返回数量限制
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: limit
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
2026-02-26 12:59:52 +00:00
|
|
|
|
"403":
|
|
|
|
|
|
description: Forbidden
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2026-02-26 12:59:52 +00:00
|
|
|
|
summary: 搜索可邀请的用户
|
2025-12-16 08:40:13 +00:00
|
|
|
|
tags:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- 组织管理
|
|
|
|
|
|
/organizations/{id}/shared-agents:
|
2025-12-16 08:40:13 +00:00
|
|
|
|
get:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: 获取指定空间下所有共享智能体,包含他人共享的与我共享的,用于列表页空间视角
|
2025-12-16 08:40:13 +00:00
|
|
|
|
parameters:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- description: 组织ID
|
2025-12-16 08:40:13 +00:00
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: OK
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2026-02-26 12:59:52 +00:00
|
|
|
|
summary: 获取空间内全部智能体(含我共享的)
|
2025-12-16 08:40:13 +00:00
|
|
|
|
tags:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- 组织管理
|
|
|
|
|
|
/organizations/{id}/shared-knowledge-bases:
|
|
|
|
|
|
get:
|
|
|
|
|
|
description: 获取指定空间下所有共享知识库,包含直接共享的与通过共享智能体可见的,用于列表页空间视角
|
2025-12-16 08:40:13 +00:00
|
|
|
|
parameters:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- description: 组织ID
|
2025-12-16 08:40:13 +00:00
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: OK
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2026-02-26 12:59:52 +00:00
|
|
|
|
summary: 获取空间内全部知识库(含我共享的、含智能体携带的)
|
2025-12-16 08:40:13 +00:00
|
|
|
|
tags:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- 组织管理
|
|
|
|
|
|
/organizations/{id}/shares:
|
2025-12-16 08:40:13 +00:00
|
|
|
|
get:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: 获取共享到指定组织的所有知识库
|
2025-12-16 08:40:13 +00:00
|
|
|
|
parameters:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- description: 组织ID
|
2025-12-16 08:40:13 +00:00
|
|
|
|
in: path
|
2026-02-26 12:59:52 +00:00
|
|
|
|
name: id
|
2025-12-16 08:40:13 +00:00
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: OK
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.ListSharesResponse'
|
2025-12-16 08:40:13 +00:00
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2026-02-26 12:59:52 +00:00
|
|
|
|
summary: 获取组织的共享知识库列表
|
2025-12-16 08:40:13 +00:00
|
|
|
|
tags:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- 组织管理
|
|
|
|
|
|
/organizations/join:
|
|
|
|
|
|
post:
|
2025-12-16 08:40:13 +00:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: 使用邀请码加入组织
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 邀请码
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.JoinOrganizationRequest'
|
2025-12-16 08:40:13 +00:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: OK
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
2026-02-26 12:59:52 +00:00
|
|
|
|
"404":
|
|
|
|
|
|
description: Not Found
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2026-02-26 12:59:52 +00:00
|
|
|
|
summary: 通过邀请码加入组织
|
2025-12-16 08:40:13 +00:00
|
|
|
|
tags:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- 组织管理
|
|
|
|
|
|
/organizations/join-by-id:
|
2025-12-16 08:40:13 +00:00
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: 加入已开放可被搜索的空间,无需邀请码
|
2025-12-16 08:40:13 +00:00
|
|
|
|
parameters:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- description: 空间 ID
|
2025-12-16 08:40:13 +00:00
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.JoinByOrganizationIDRequest'
|
2025-12-16 08:40:13 +00:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
2026-02-26 12:59:52 +00:00
|
|
|
|
"403":
|
|
|
|
|
|
description: Forbidden
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2026-02-26 12:59:52 +00:00
|
|
|
|
summary: 通过空间 ID 加入(可搜索空间)
|
2025-12-16 08:40:13 +00:00
|
|
|
|
tags:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- 组织管理
|
|
|
|
|
|
/organizations/join-request:
|
|
|
|
|
|
post:
|
2025-12-16 08:40:13 +00:00
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: 对需要审核的组织提交加入申请
|
2025-12-16 08:40:13 +00:00
|
|
|
|
parameters:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- description: 申请信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
2025-12-16 08:40:13 +00:00
|
|
|
|
required: true
|
2026-02-26 12:59:52 +00:00
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.SubmitJoinRequestRequest'
|
2025-12-16 08:40:13 +00:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: OK
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
2026-02-26 12:59:52 +00:00
|
|
|
|
"400":
|
|
|
|
|
|
description: Bad Request
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2026-02-26 12:59:52 +00:00
|
|
|
|
summary: 提交加入申请
|
2025-12-16 08:40:13 +00:00
|
|
|
|
tags:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- 组织管理
|
|
|
|
|
|
/organizations/preview/{code}:
|
2025-12-16 08:40:13 +00:00
|
|
|
|
get:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: 通过邀请码获取组织基本信息(不加入)
|
2025-12-16 08:40:13 +00:00
|
|
|
|
parameters:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- description: 邀请码
|
2025-12-16 08:40:13 +00:00
|
|
|
|
in: path
|
2026-02-26 12:59:52 +00:00
|
|
|
|
name: code
|
2025-12-16 08:40:13 +00:00
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: OK
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"404":
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: Not Found
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2026-02-26 12:59:52 +00:00
|
|
|
|
summary: 通过邀请码预览组织
|
2025-12-16 08:40:13 +00:00
|
|
|
|
tags:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- 组织管理
|
|
|
|
|
|
/organizations/search:
|
|
|
|
|
|
get:
|
|
|
|
|
|
description: 搜索已开放可被搜索的空间,用于发现并加入
|
2025-12-16 08:40:13 +00:00
|
|
|
|
parameters:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- description: 搜索关键词(空间名称或描述)
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: q
|
2025-12-16 08:40:13 +00:00
|
|
|
|
type: string
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- default: 20
|
|
|
|
|
|
description: 返回数量限制
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: limit
|
|
|
|
|
|
type: integer
|
2025-12-16 08:40:13 +00:00
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
2026-02-26 12:59:52 +00:00
|
|
|
|
description: OK
|
2025-12-16 08:40:13 +00:00
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2026-02-26 12:59:52 +00:00
|
|
|
|
summary: 搜索可加入的空间
|
2025-12-16 08:40:13 +00:00
|
|
|
|
tags:
|
2026-02-26 12:59:52 +00:00
|
|
|
|
- 组织管理
|
2025-12-16 08:40:13 +00:00
|
|
|
|
/sessions:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取当前租户的会话列表,支持分页
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 页码
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: page
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
- description: 每页数量
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: page_size
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 会话列表
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 获取会话列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 会话
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 创建新的对话会话
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 会话创建请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler_session.CreateSessionRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"201":
|
|
|
|
|
|
description: 创建的会话
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 创建会话
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 会话
|
|
|
|
|
|
/sessions/{id}:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 删除指定的会话
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 会话ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 删除成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 会话不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 删除会话
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 会话
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 根据ID获取会话详情
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 会话ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 会话详情
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 会话不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 获取会话详情
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 会话
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 更新会话属性
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 会话ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 会话信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.Session'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 更新后的会话
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 会话不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 更新会话
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 会话
|
2026-03-30 13:20:14 +00:00
|
|
|
|
/sessions/{id}/messages:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 删除会话中的所有消息,同时清除 LLM 上下文和聊天历史知识库条目。会话本身保留。
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 会话ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 清空成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 会话不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 清空会话消息
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 会话
|
2025-12-16 08:40:13 +00:00
|
|
|
|
/sessions/{session_id}/agent-qa:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 基于Agent的智能问答,支持多轮对话和SSE流式响应
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 会话ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: session_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 问答请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler_session.CreateKnowledgeQARequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- text/event-stream
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 问答结果(SSE流)
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: Agent问答
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 问答
|
|
|
|
|
|
/sessions/{session_id}/continue:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 继续获取正在进行的流式响应
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 会话ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: session_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 消息ID
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: message_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- text/event-stream
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 流式响应
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 会话或消息不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 继续流式响应
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 问答
|
|
|
|
|
|
/sessions/{session_id}/knowledge-qa:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 基于知识库的问答(使用LLM总结),支持SSE流式响应
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 会话ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: session_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 问答请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler_session.CreateKnowledgeQARequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- text/event-stream
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 问答结果(SSE流)
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 知识问答
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 问答
|
|
|
|
|
|
/sessions/{session_id}/stop:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 停止当前正在进行的生成任务
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 会话ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: session_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 停止请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler_session.StopSessionRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 停止成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 会话或消息不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 停止生成
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 问答
|
|
|
|
|
|
/sessions/{session_id}/title:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 根据消息内容自动生成会话标题
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 会话ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: session_id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 生成请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler_session.GenerateTitleRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 生成的标题
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 生成会话标题
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 会话
|
2026-02-26 12:59:52 +00:00
|
|
|
|
/sessions/batch:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
2026-03-30 13:20:14 +00:00
|
|
|
|
description: 根据ID列表批量删除对话会话,或设置 delete_all=true 删除当前租户的所有会话
|
2026-02-26 12:59:52 +00:00
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 批量删除请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler_session.batchDeleteRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 删除结果
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 批量删除会话
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 会话
|
2025-12-16 08:40:13 +00:00
|
|
|
|
/sessions/search:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 在知识库中搜索(不使用LLM总结)
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 搜索请求
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler_session.SearchKnowledgeRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 搜索结果
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 知识搜索
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 问答
|
2026-02-26 12:59:52 +00:00
|
|
|
|
/shared-knowledge-bases:
|
|
|
|
|
|
get:
|
|
|
|
|
|
description: 获取通过组织共享给当前用户的所有知识库
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 获取共享给我的知识库列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 知识库共享
|
|
|
|
|
|
/skills:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取所有预装的Agent Skills元数据
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: Skills列表
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: 服务器错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 获取预装Skills列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- Skills
|
2026-03-30 13:20:14 +00:00
|
|
|
|
/system/docreader/reconnect:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: DocReader 地址
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: object
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
summary: 重连文档解析服务
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 系统
|
2025-12-16 08:40:13 +00:00
|
|
|
|
/system/info:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取系统版本、构建信息和引擎配置
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 系统信息
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler.GetSystemInfoResponse'
|
|
|
|
|
|
summary: 获取系统信息
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 系统
|
2026-02-26 12:59:52 +00:00
|
|
|
|
/system/minio/buckets:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取所有 MinIO 存储桶及其访问权限
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 存储桶列表
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler.ListMinioBucketsResponse'
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: MinIO 未启用
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: 服务器错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 列出 MinIO 存储桶
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 系统
|
2026-03-30 13:20:14 +00:00
|
|
|
|
/system/parser-engines:
|
|
|
|
|
|
get:
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 解析引擎列表
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
summary: 列出可用的文档解析引擎
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 系统
|
|
|
|
|
|
/system/parser-engines/check:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 解析引擎配置(与保存接口同结构)
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: body
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: object
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
summary: 使用当前参数检测解析引擎可用性
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 系统
|
|
|
|
|
|
/system/storage-engine-check:
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 使用当前填写的参数测试 MinIO/COS 连通性,不保存配置
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 存储引擎配置
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: body
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler.StorageCheckRequest'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler.StorageCheckResponse'
|
|
|
|
|
|
summary: 测试存储引擎连通性
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 系统
|
|
|
|
|
|
/system/storage-engine-status:
|
|
|
|
|
|
get:
|
|
|
|
|
|
description: 返回 Local、MinIO、COS 各存储引擎的可用状态及说明,供全局设置与知识库选择使用
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: OK
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/internal_handler.GetStorageEngineStatusResponse'
|
|
|
|
|
|
summary: 获取存储引擎状态
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 系统
|
2025-12-16 08:40:13 +00:00
|
|
|
|
/tenants:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取当前用户可访问的租户列表
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 租户列表
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"500":
|
|
|
|
|
|
description: 服务器错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 获取租户列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 租户管理
|
|
|
|
|
|
post:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 创建新的租户
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 租户信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"201":
|
|
|
|
|
|
description: 创建的租户
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 创建租户
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 租户管理
|
|
|
|
|
|
/tenants/{id}:
|
|
|
|
|
|
delete:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 删除指定的租户
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 租户ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 删除成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 删除租户
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 租户管理
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 根据ID获取租户详情
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 租户ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 租户详情
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
"404":
|
|
|
|
|
|
description: 租户不存在
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 获取租户详情
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 租户管理
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 更新租户信息
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 租户ID
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: id
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
- description: 租户信息
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.Tenant'
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 更新后的租户
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 更新租户
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 租户管理
|
|
|
|
|
|
/tenants/all:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取系统中所有租户(需要跨租户访问权限)
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 所有租户列表
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"403":
|
|
|
|
|
|
description: 权限不足
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
summary: 获取所有租户列表
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 租户管理
|
|
|
|
|
|
/tenants/kv/{key}:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取租户级别的KV配置(支持agent-config、web-search-config、conversation-config)
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 配置键名
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: key
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 配置值
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 不支持的键
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 获取租户KV配置
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 租户管理
|
|
|
|
|
|
put:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 更新租户级别的KV配置(支持agent-config、web-search-config、conversation-config)
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 配置键名
|
|
|
|
|
|
in: path
|
|
|
|
|
|
name: key
|
|
|
|
|
|
required: true
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 配置值
|
|
|
|
|
|
in: body
|
|
|
|
|
|
name: request
|
|
|
|
|
|
required: true
|
|
|
|
|
|
schema:
|
|
|
|
|
|
type: object
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 更新成功
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 不支持的键
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 更新租户KV配置
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 租户管理
|
|
|
|
|
|
/tenants/kv/agent-config:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取租户的全局Agent配置(默认应用于所有会话)
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: Agent配置
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 获取租户Agent配置
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 租户管理
|
|
|
|
|
|
/tenants/kv/conversation-config:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取租户的全局对话配置(默认应用于普通模式会话)
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 对话配置
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 获取租户对话配置
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 租户管理
|
2026-02-26 12:59:52 +00:00
|
|
|
|
/tenants/kv/prompt-templates:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取系统配置的提示词模板列表
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 提示词模板配置
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: 获取提示词模板
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 租户管理
|
2025-12-16 08:40:13 +00:00
|
|
|
|
/tenants/kv/web-search-config:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 获取租户的网络搜索配置
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 网络搜索配置
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"400":
|
|
|
|
|
|
description: 请求参数错误
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 获取租户网络搜索配置
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 租户管理
|
|
|
|
|
|
/tenants/search:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: 分页搜索租户(需要跨租户访问权限)
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
- description: 搜索关键词
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: keyword
|
|
|
|
|
|
type: string
|
|
|
|
|
|
- description: 租户ID筛选
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: tenant_id
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
- default: 1
|
|
|
|
|
|
description: 页码
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: page
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
- default: 20
|
|
|
|
|
|
description: 每页数量
|
|
|
|
|
|
in: query
|
|
|
|
|
|
name: page_size
|
|
|
|
|
|
type: integer
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: 搜索结果
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
"403":
|
|
|
|
|
|
description: 权限不足
|
|
|
|
|
|
schema:
|
|
|
|
|
|
$ref: '#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError'
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
2025-12-22 06:36:29 +00:00
|
|
|
|
- ApiKeyAuth: []
|
2025-12-16 08:40:13 +00:00
|
|
|
|
summary: 搜索租户
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- 租户管理
|
2025-12-22 06:36:29 +00:00
|
|
|
|
/web-search/providers:
|
|
|
|
|
|
get:
|
|
|
|
|
|
consumes:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
description: Returns the list of available web search providers from configuration
|
|
|
|
|
|
produces:
|
|
|
|
|
|
- application/json
|
|
|
|
|
|
responses:
|
|
|
|
|
|
"200":
|
|
|
|
|
|
description: List of providers
|
|
|
|
|
|
schema:
|
|
|
|
|
|
additionalProperties: true
|
|
|
|
|
|
type: object
|
|
|
|
|
|
security:
|
|
|
|
|
|
- Bearer: []
|
|
|
|
|
|
- ApiKeyAuth: []
|
|
|
|
|
|
summary: Get available web search providers
|
|
|
|
|
|
tags:
|
|
|
|
|
|
- web-search
|
2025-12-16 08:40:13 +00:00
|
|
|
|
securityDefinitions:
|
2025-12-22 06:36:29 +00:00
|
|
|
|
ApiKeyAuth:
|
|
|
|
|
|
description: 租户身份认证:输入 sk- 开头的 API Key
|
|
|
|
|
|
in: header
|
|
|
|
|
|
name: X-API-Key
|
|
|
|
|
|
type: apiKey
|
2025-12-16 08:40:13 +00:00
|
|
|
|
Bearer:
|
2025-12-22 06:36:29 +00:00
|
|
|
|
description: 用户登录认证:输入 Bearer {token} 格式的 JWT 令牌
|
2025-12-16 08:40:13 +00:00
|
|
|
|
in: header
|
|
|
|
|
|
name: Authorization
|
|
|
|
|
|
type: apiKey
|
|
|
|
|
|
swagger: "2.0"
|