| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491 |
- // @ts-ignore
- /* eslint-disable */
- import request from '@repo/api-client'
- /** 创建智能体 POST /api/ai/agent/create */
- export async function postAiAgentCreate(
- body: {
- name: string
- description: string
- avatar: string
- mode: string
- config: {
- basic_config: { system_prompt: string }
- model_config: {
- model_id: string
- rerank_model_id: string
- temperature: number
- max_completion_tokens: number
- thinking: boolean
- }
- setting_config: { max_iterations: number; mcp_selection_mode: string; mcp_services: string[] }
- kb_config: {
- kb_selection_mode: string
- knowledge_bases: string[]
- retrieve_kb_only_when_mentioned: boolean
- supported_file_types: string[]
- }
- img_vlm_config: {
- image_upload_enabled: boolean
- vlm_model_id: string
- image_storage_provider: string
- }
- faq_config: {
- faq_priority_enabled: boolean
- faq_direct_answer_threshold: number
- faq_score_boost: number
- }
- web_search_config: {
- web_search_enabled: boolean
- web_search_max_results: number
- web_search_provider_id: string
- web_fetch_enabled: boolean
- web_fetch_top_n: number
- }
- multiple_config: { multi_turn_enabled: boolean; history_turns: number }
- search_config: {
- embedding_top_k: number
- keyword_threshold: number
- vector_threshold: number
- rerank_top_k: number
- rerank_threshold: number
- }
- advanced_config: {
- enable_query_expansion: boolean
- enable_rewrite: boolean
- rewrite_prompt_system: string
- rewrite_prompt_user: string
- fallback_strategy: string
- fallback_response: string
- fallback_prompt: string
- }
- }
- },
- options?: { [key: string]: any }
- ) {
- return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>(
- '/api/ai/agent/create',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- }
- )
- }
- /** 删除智能体 POST /api/ai/agent/delete */
- export async function postAiAgentOpenApiDelete(
- body: {
- id: string
- },
- options?: { [key: string]: any }
- ) {
- return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>(
- '/api/ai/agent/delete',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- }
- )
- }
- /** 获取智能体可以使用的分组工具列表 POST /api/ai/agent/group-tools */
- export async function postAiAgentGroupTools(body: {}, options?: { [key: string]: any }) {
- return request<{
- isSuccess: boolean
- code: number
- result: { name: string; tools: { description: string; label: string; name: string }[] }[]
- isAuthorized: boolean
- }>('/api/ai/agent/group-tools', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
- /** 详情 POST /api/ai/agent/info */
- export async function postAiAgentInfo(
- body: {
- id: string
- },
- options?: { [key: string]: any }
- ) {
- return request<{
- isSuccess: boolean
- code: number
- result: {
- avatar: string
- config: {
- advanced_config: {
- enable_query_expansion: boolean
- enable_rewrite: boolean
- fallback_prompt: string
- fallback_response: string
- fallback_strategy: string
- rewrite_prompt_system: string
- rewrite_prompt_user: string
- }
- basic_config: {
- agent_mode: string
- agent_type: string
- context_template: string
- suggested_prompts: string[]
- system_prompt: string
- }
- faq_config: {
- faq_direct_answer_threshold: number
- faq_priority_enabled: boolean
- faq_score_boost: number
- }
- img_vlm_config: {
- image_storage_provider: string
- image_upload_enabled: boolean
- vlm_model_id: string
- }
- kb_config: {
- kb_selection_mode: string
- knowledge_bases: string[]
- retrieve_kb_only_when_mentioned: boolean
- supported_file_types: string[]
- }
- model_config: {
- max_completion_tokens: number
- model_id: string
- rerank_model_id: string
- temperature: number
- thinking: boolean
- }
- multiple_config: { history_turns: number; multi_turn_enabled: boolean }
- search_config: {
- embedding_top_k: number
- keyword_threshold: number
- rerank_threshold: number
- rerank_top_k: number
- vector_threshold: number
- }
- setting_config: {
- allowed_tools: string[]
- max_iterations: number
- mcp_selection_mode: string
- mcp_services: string[]
- selected_skills: string[]
- skills_selection_mode: string
- }
- web_search_config: {
- web_fetch_enabled: boolean
- web_fetch_top_n: number
- web_search_enabled: boolean
- web_search_max_results: number
- }
- }
- creationTime: string
- creatorUserId: string
- description: string
- id: string
- isDeleted: boolean
- is_builtin: boolean
- mode: string
- name: string
- type: string
- updateTime: string
- }
- isAuthorized: boolean
- }>('/api/ai/agent/info', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
- /** 获取分页列表 POST /api/ai/agent/pageList */
- export async function postAiAgentPageList(
- body: {
- keyword: string
- mode: 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: {
- avatar?: string
- config: {
- advanced_config: {
- enable_query_expansion: boolean
- enable_rewrite: boolean
- fallback_prompt: string
- fallback_response: string
- fallback_strategy: string
- rewrite_prompt_system: string
- rewrite_prompt_user: string
- }
- basic_config: {
- agent_mode: string
- agent_type: string
- context_template: string
- suggested_prompts: string[]
- system_prompt: string
- }
- faq_config: {
- faq_direct_answer_threshold: number
- faq_priority_enabled: boolean
- faq_score_boost: number
- }
- img_vlm_config: {
- image_storage_provider: string
- image_upload_enabled: boolean
- vlm_model_id: string
- }
- kb_config: {
- kb_selection_mode: string
- knowledge_bases: string[]
- retrieve_kb_only_when_mentioned: boolean
- supported_file_types: string[]
- }
- model_config: {
- max_completion_tokens: number
- model_id: string
- rerank_model_id: string
- temperature: number
- thinking: boolean
- }
- multiple_config: { history_turns: number; multi_turn_enabled: boolean }
- search_config: {
- embedding_top_k: number
- keyword_threshold: number
- rerank_threshold: number
- rerank_top_k: number
- vector_threshold: number
- }
- setting_config: {
- allowed_tools: string[]
- max_iterations: number
- mcp_selection_mode: string
- mcp_services: string[]
- selected_skills: string[]
- skills_selection_mode: string
- }
- web_search_config: {
- web_fetch_enabled: boolean
- web_fetch_top_n: number
- web_search_enabled: boolean
- web_search_max_results: number
- }
- }
- creationTime?: string
- creatorUserId?: string
- description?: string
- id?: string
- isDeleted?: boolean
- is_builtin?: boolean
- mode?: string
- name?: string
- type?: string
- updateTime?: string
- }[]
- pageSize: number
- totalCount: number
- totalPages: number
- }
- isAuthorized: boolean
- }>('/api/ai/agent/pageList', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
- /** 获取智能体选择列表 POST /api/ai/agent/selectList */
- export async function postAiAgentSelectList(
- body: {
- keyword?: string
- mode?: string
- type?: string
- },
- options?: { [key: string]: any }
- ) {
- return request<{
- isSuccess: boolean
- code: number
- result: {
- avatar?: string
- config: {
- advanced_config: {
- enable_query_expansion: boolean
- enable_rewrite: boolean
- fallback_prompt: string
- fallback_response: string
- fallback_strategy: string
- rewrite_prompt_system: string
- rewrite_prompt_user: string
- }
- basic_config: {
- agent_mode: string
- agent_type: string
- context_template: string
- suggested_prompts: string[]
- system_prompt: string
- }
- model_config: { max_completion_tokens: number; model_id: string; temperature: number }
- }
- creationTime?: string
- creatorUserId?: string
- description?: string
- id?: string
- isDeleted?: boolean
- is_builtin?: boolean
- mode?: string
- name?: string
- type?: string
- updateTime?: string
- }[]
- isAuthorized: boolean
- }>('/api/ai/agent/selectList', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
- /** 获取智能体建议提问列表 POST /api/ai/agent/suggested-questions */
- export async function postAiAgentSuggestedQuestions(
- body: {
- id: string
- limit: number
- },
- options?: { [key: string]: any }
- ) {
- return request<{
- isSuccess: boolean
- code: number
- result: { knowledge_base_id: string; question: string; source: string }[]
- isAuthorized: boolean
- }>('/api/ai/agent/suggested-questions', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
- /** 获取智能体可以使用的工具列表 POST /api/ai/agent/tools */
- export async function postAiAgentTools(body: {}, options?: { [key: string]: any }) {
- return request<{
- isSuccess: boolean
- code: number
- result: { description: string; label: string; name: string }[]
- isAuthorized: boolean
- }>('/api/ai/agent/tools', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
- /** 修改智能体 POST /api/ai/agent/update */
- export async function postAiAgentUpdate(
- body: {
- id: string
- name: string
- description: string
- avatar: string
- mode: string
- config: {
- basic_config: { system_prompt: string }
- model_config: {
- model_id: string
- rerank_model_id: string
- temperature: number
- max_completion_tokens: number
- thinking: boolean
- }
- setting_config: { max_iterations: number; mcp_selection_mode: string; mcp_services: string[] }
- kb_config: {
- kb_selection_mode: string
- knowledge_bases: string[]
- retrieve_kb_only_when_mentioned: boolean
- supported_file_types: string[]
- }
- img_vlm_config: {
- image_upload_enabled: boolean
- vlm_model_id: string
- image_storage_provider: string
- }
- faq_config: {
- faq_priority_enabled: boolean
- faq_direct_answer_threshold: number
- faq_score_boost: number
- }
- web_search_config: {
- web_search_enabled: boolean
- web_search_max_results: number
- web_search_provider_id: string
- web_fetch_enabled: boolean
- web_fetch_top_n: number
- }
- multiple_config: { multi_turn_enabled: boolean; history_turns: number }
- search_config: {
- embedding_top_k: number
- keyword_threshold: number
- vector_threshold: number
- rerank_top_k: number
- rerank_threshold: number
- }
- advanced_config: {
- enable_query_expansion: boolean
- enable_rewrite: boolean
- rewrite_prompt_system: string
- rewrite_prompt_user: string
- fallback_strategy: string
- fallback_response: string
- fallback_prompt: string
- }
- }
- },
- options?: { [key: string]: any }
- ) {
- return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>(
- '/api/ai/agent/update',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- }
- )
- }
|