| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690 |
- // @ts-ignore
- /* eslint-disable */
- import request from '@repo/api-client'
- /** 创建单个FAQ条目 POST /api/ai/faq/create */
- export async function postFaqCreate(
- 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 postFaqOpenApiDelete(
- body: {
- id: string
- },
- options?: { [key: string]: any }
- ) {
- return request<Record<string, any>>('/api/ai/faq/delete', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
- /** 详情 POST /api/ai/faq/info */
- export async function postFaqInfo(
- 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 postFaqPageList(
- 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 postFaqUpdate(
- 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 postKnowledgeBaseCreate(
- 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 postKnowledgeBaseOpenApiDelete(
- 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 postKnowledgeBaseFaqHybridSearch(
- 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 postKnowledgeBaseHybridSearch(
- 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 postKnowledgeBaseHybridSearchIds(
- 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 postKnowledgeBaseInfo(
- 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 postKnowledgeBasePageList(
- 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/update */
- export async function postKnowledgeBaseUpdate(
- 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 postKnowledgeCreateWithFile(
- body: {
- knowledge_base_id: string
- fileId: string
- metadata: Record<string, any>
- 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 postKnowledgeCreateWithManual(
- 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 postKnowledgeOpenApiDelete(
- 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/pageList */
- export async function postKnowledgePageList(
- 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<string, any>
- 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 postKnowledgeReparse(
- 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/update */
- export async function postKnowledgeUpdate(
- 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 || {})
- }
- )
- }
|