// @ts-ignore /* eslint-disable */ import request from '@repo/api-client' /** Excel导入 POST /api/ai/faq/batch_import */ export async function postAiFaqBatchImport( body: { knowledge_base_id: string standard_question: string similar_questions: string[] negative_questions: string[] answers: string[] is_enabled: boolean }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>( '/api/ai/faq/batch_import', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) } ) } /** 创建单个FAQ条目 POST /api/ai/faq/create */ export async function postAiFaqCreate( body: { knowledge_base_id: string standard_question: string similar_questions: string[] negative_questions: string[] answers: string[] is_enabled: boolean }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>( '/api/ai/faq/create', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) } ) } /** 删除单个FAQ条目 POST /api/ai/faq/delete */ export async function postAiFaqOpenApiDelete( body: { id: string }, options?: { [key: string]: any } ) { return request>('/api/ai/faq/delete', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) }) } /** 详情 POST /api/ai/faq/info */ export async function postAiFaqInfo( body: { id: string }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean code: number result: { answer_strategy: string answers: string[] chunk_id: string chunk_type: string creationTime: string creatorUserId: string id: string index_mode: string is_enabled: boolean is_recommended: boolean knowledge_base_id: string knowledge_id: string negative_questions: string[] similar_questions: string[] standard_question: string tag_id: string } isAuthorized: boolean }>('/api/ai/faq/info', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) }) } /** 分页列表 POST /api/ai/faq/pageList */ export async function postAiFaqPageList( body: { knowledge_base_id: string pageIndex: number pageSize: number keyword: string }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean code: number result: { currentPage: number hasNextPage: boolean hasPreviousPage: boolean model: { answer_strategy?: string answers?: string[] chunk_id?: string chunk_type?: string creationTime?: string creatorUserId?: string id?: string index_mode?: string is_enabled?: boolean is_recommended?: boolean knowledge_base_id?: string knowledge_id?: string negative_questions?: string[] similar_questions?: string[] standard_question?: string tag_id?: string }[] pageSize: number totalCount: number totalPages: number } isAuthorized: boolean }>('/api/ai/faq/pageList', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) }) } /** 更新单个FAQ条目 POST /api/ai/faq/update */ export async function postAiFaqUpdate( body: { id: string standard_question: string similar_questions: string[] negative_questions: string[] answers: string[] is_enabled: boolean }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>( '/api/ai/faq/update', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) } ) } /** 创建知识库 POST /api/ai/knowledge-base/create */ export async function postAiKnowledgeBaseCreate( body: { name: string description: string type: string wiki_config: { extraction_granularity: string max_pages_per_ingest: number synthesis_model_id: string } indexing_strategy: { graph_enabled: boolean keyword_enabled: boolean vector_enabled: boolean wiki_enabled: boolean } chunking_config: { chunk_size: number chunk_overlap: number separators: string[] parser_engine_rules: { engine: string; file_types: string[] }[] enable_parent_child: boolean parent_chunk_size: number child_chunk_size: number } embedding_model_id: string summary_model_id: string vlm_config: { model_id: string; enabled: boolean } asr_config: { model_id: string; language: string; enabled: boolean } storage_provider_config: { provider: string } storage_config: { provider: string } question_generation_config: { enabled: boolean; question_count: number } }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>( '/api/ai/knowledge-base/create', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) } ) } /** 删除知识库 POST /api/ai/knowledge-base/delete */ export async function postAiKnowledgeBaseOpenApiDelete( body: { id: string }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>( '/api/ai/knowledge-base/delete', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) } ) } /** 混合搜索 (FAQ) POST /api/ai/knowledge-base/faq_hybrid_search */ export async function postAiKnowledgeBaseFaqHybridSearch( body: { knowledge_base_id: string query_text: string vector_threshold: number match_count: number }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean code: number result: { answer_strategy?: string answers?: string[] chunk_id?: string chunk_type?: string creationTime?: string creatorUserId?: string id?: string index_mode?: string is_enabled?: boolean is_recommended?: boolean knowledge_base_id?: string knowledge_id?: string negative_questions?: string[] score?: number similar_questions?: string[] standard_question?: string tag_id?: string }[] isAuthorized: boolean }>('/api/ai/knowledge-base/faq_hybrid_search', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) }) } /** 混合搜索 POST /api/ai/knowledge-base/hybrid_search */ export async function postAiKnowledgeBaseHybridSearch( body: { id: string query_text: string vector_threshold: number keyword_threshold: number match_count: number }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean; code: number; result: string[]; isAuthorized: boolean }>( '/api/ai/knowledge-base/hybrid_search', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) } ) } /** 根据ids,混合搜索 POST /api/ai/knowledge-base/hybrid_search_ids */ export async function postAiKnowledgeBaseHybridSearchIds( body: { query: string knowledge_base_ids: string[] knowledge_ids: string[] }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean code: number result: { chunk_index?: string chunk_metadata: { generated_questions: { id: string; question: string }[] } chunk_type?: string content?: string end_at?: number id?: string image_info?: string knowledge_base_id?: string knowledge_channel?: string knowledge_filename?: string knowledge_id?: string knowledge_source?: string knowledge_title?: string match_type?: number metadata: { base_score: string } parent_chunk_id?: string score?: number seq?: number start_at?: number sub_chunk_id?: string[] }[] isAuthorized: boolean }>('/api/ai/knowledge-base/hybrid_search_ids', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) }) } /** 知识库详情 POST /api/ai/knowledge-base/info */ export async function postAiKnowledgeBaseInfo( body: { id: string }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean code: number result: { asr_config: { enabled: boolean; language: string; model_id: string } chunking_config: { child_chunk_size: number chunk_overlap: number chunk_size: number enable_parent_child: boolean parent_chunk_size: number parser_engine_rules: { engine: string; file_types: string[] }[] separators: string[] } creationTime: string creatorUserId: string description: string embedding_model_id: string faq_config: { index_mode: string; question_index_mode: string } id: string indexing_strategy: { graph_enabled: boolean keyword_enabled: boolean vector_enabled: boolean wiki_enabled: boolean } isDeleted: boolean is_pinned: boolean is_temporary: boolean name: string question_generation_config: { enabled: boolean; question_count: number } storage_config: { provider: string } storage_provider_config: { provider: string } summary_model_id: string type: string updateTime: string vlm_config: { enabled: boolean; model_id: string } wiki_config: { extraction_granularity: string max_pages_per_ingest: number synthesis_model_id: string } } isAuthorized: boolean }>('/api/ai/knowledge-base/info', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) }) } /** 获取知识库分页列表 POST /api/ai/knowledge-base/pageList */ export async function postAiKnowledgeBasePageList( body: { keyword: string type: string pageIndex: number pageSize: number }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean code: number result: { currentPage: number hasNextPage: boolean hasPreviousPage: boolean model: { asr_config: { enabled: boolean; language: string; model_id: string } chunking_config: { child_chunk_size: number chunk_overlap: number chunk_size: number enable_parent_child: boolean parent_chunk_size: number parser_engine_rules: { engine: string; file_types: string[] }[] separators: string[] } creationTime: string creatorUserId: string description: string embedding_model_id: string faq_config: { index_mode: string; question_index_mode: string } id: string indexing_strategy: { graph_enabled: boolean keyword_enabled: boolean vector_enabled: boolean wiki_enabled: boolean } isDeleted: boolean is_pinned: boolean is_temporary: boolean name: string question_generation_config: { enabled: boolean; question_count: number } storage_config: { provider: string } storage_provider_config: { provider: string } summary_model_id: string type: string updateTime: string vlm_config: { enabled: boolean; model_id: string } wiki_config: { extraction_granularity: string max_pages_per_ingest: number synthesis_model_id: string } extract_config: { enabled: boolean } }[] pageSize: number totalCount: number totalPages: number } isAuthorized: boolean }>('/api/ai/knowledge-base/pageList', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) }) } /** 获取知识库选择列表 POST /api/ai/knowledge-base/selectList */ export async function postAiKnowledgeBaseSelectList( body: { keyword?: string type?: string }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean code: number result: { asr_config: { enabled: boolean; language: string; model_id: string } chunking_config: { child_chunk_size: number chunk_overlap: number chunk_size: number enable_parent_child: boolean parent_chunk_size: number parser_engine_rules: { engine: string; file_types: string[] }[] separators: string[] } creationTime: string creatorUserId: string description: string embedding_model_id: string faq_config: { index_mode: string; question_index_mode: string } id: string indexing_strategy: { graph_enabled: boolean keyword_enabled: boolean vector_enabled: boolean wiki_enabled: boolean } isDeleted: boolean is_pinned: boolean is_temporary: boolean name: string question_generation_config: { enabled: boolean; question_count: number } storage_config: { provider: string } storage_provider_config: { provider: string } summary_model_id: string type: string updateTime: string vlm_config: { enabled: boolean; model_id: string } wiki_config: { extraction_granularity: string max_pages_per_ingest: number synthesis_model_id: string } extract_config: { enabled: boolean } }[] isAuthorized: boolean }>('/api/ai/knowledge-base/selectList', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) }) } /** 更新知识库 POST /api/ai/knowledge-base/update */ export async function postAiKnowledgeBaseUpdate( body: { id: string name: string description: string wiki_config: { extraction_granularity: string max_pages_per_ingest: number synthesis_model_id: string } indexing_strategy: { graph_enabled: boolean keyword_enabled: boolean vector_enabled: boolean wiki_enabled: boolean } chunking_config: { chunk_size: number chunk_overlap: number separators: string[] parser_engine_rules: { engine: string; file_types: string[] }[] enable_parent_child: boolean parent_chunk_size: number child_chunk_size: number } embedding_model_id: string summary_model_id: string vlm_config: { model_id: string; enabled: boolean } asr_config: { model_id: string; language: string; enabled: boolean } storage_provider_config: { provider: string } storage_config: { provider: string } question_generation_config: { enabled: boolean; question_count: number } }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>( '/api/ai/knowledge-base/update', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) } ) } /** 创建来自文件的知识 POST /api/ai/knowledge/createWithFile */ export async function postAiKnowledgeCreateWithFile( body: { knowledge_base_id: string fileId: string metadata: Record enable_multi_model: boolean }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>( '/api/ai/knowledge/createWithFile', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) } ) } /** 创建自定义知识 POST /api/ai/knowledge/createWithManual */ export async function postAiKnowledgeCreateWithManual( body: { knowledge_base_id: string title: string content: string publish: boolean }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>( '/api/ai/knowledge/createWithManual', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) } ) } /** 删除知识 POST /api/ai/knowledge/delete */ export async function postAiKnowledgeOpenApiDelete( body: { id: string }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>( '/api/ai/knowledge/delete', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) } ) } /** 获取详情 POST /api/ai/knowledge/info */ export async function postAiKnowledgeInfo( body: { id: string }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean code: number result: { channel: string creationTime: string description: string embedding_model_id: string enable_status: string error_message: string file_hash: string file_name: string file_path: string file_size: number file_type: string id: string isDeleted: boolean knowledge_base_id: string metadata: { updated_at: string format: string version: number content: string status: string } parse_status: string source: string storage_size: number summary_status: string tag_id: string title: string type: string updateTime: string userId: string } isAuthorized: boolean }>('/api/ai/knowledge/info', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) }) } /** 获取知识分页列表 POST /api/ai/knowledge/pageList */ export async function postAiKnowledgePageList( body: { knowledge_base_id: string title: string file_type: string pageIndex: number pageSize: number }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean code: number result: { currentPage: number hasNextPage: boolean hasPreviousPage: boolean model: { channel?: string creationTime?: string description?: string embedding_model_id?: string enable_status?: string error_message?: string file_hash?: string file_name?: string file_path?: string file_size?: number file_type?: string id?: string isDeleted?: boolean knowledge_base_id?: string metadata?: Record parse_status?: string source?: string storage_size?: number summary_status?: string tag_id?: string title?: string type?: string updateTime?: string }[] pageSize: number totalCount: number totalPages: number } isAuthorized: boolean }>('/api/ai/knowledge/pageList', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) }) } /** 重新解析知识 POST /api/ai/knowledge/reparse */ export async function postAiKnowledgeReparse( body: { id: string }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>( '/api/ai/knowledge/reparse', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) } ) } /** 获取知识选择列表 POST /api/ai/knowledge/selectList */ export async function postAiKnowledgeSelectList( body: { knowledge_base_id: string title?: string }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean code: number result: { currentPage: number hasNextPage: boolean hasPreviousPage: boolean model: { channel?: string creationTime?: string description?: string embedding_model_id?: string enable_status?: string error_message?: string file_hash?: string file_name?: string file_path?: string file_size?: number file_type?: string id?: string isDeleted?: boolean knowledge_base_id?: string metadata?: Record parse_status?: string source?: string storage_size?: number summary_status?: string tag_id?: string title?: string type?: string updateTime?: string }[] pageSize: number totalCount: number totalPages: number } isAuthorized: boolean }>('/api/ai/knowledge/selectList', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) }) } /** 更新知识 POST /api/ai/knowledge/update */ export async function postAiKnowledgeUpdate( body: { id: string title: string description: string }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>( '/api/ai/knowledge/update', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) } ) } /** 查询异步任务状态 状态 0: 已创建 1: 运行中 2: 成功 3: 失败 4: 挂起 POST /api/bpm/getAsynTaskInfo */ export async function postBpmGetAsynTaskInfo( body: { id: string }, options?: { [key: string]: any } ) { return request<{ isSuccess: boolean code: number result: { appPageCode: string argsInput: { args: { name?: string; value?: string }[] } code: string creationTime: string creatorUserId: string downFileId: string entityId: string fileId: string htmlStatusInfo: string id: string isDeleted: boolean nodeId: string params: string progress: string status: number taskId: string type: number updateTime: string } isAuthorized: boolean }>('/api/bpm/getAsynTaskInfo', { method: 'POST', headers: { 'Content-Type': 'application/json' }, data: body, ...(options || {}) }) }