| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 |
- // @ts-ignore
- /* eslint-disable */
- import request from '@repo/api-client'
- /** 基于Agent的智能问答 (SSE) POST /api/ai/chat/agent-chat */
- export async function postChatAgentChat(
- body: {
- session_id: string
- query: string
- knowledge_base_ids: string[]
- knowledge_ids: string[]
- agent_id: string
- summary_model_id: string
- disable_title: boolean
- enable_memory: boolean
- images: string[]
- agent_enabled: boolean
- web_search_enabled: boolean
- },
- options?: { [key: string]: any }
- ) {
- return request<Record<string, any>>('/api/ai/chat/agent-chat', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
- /** 基于知识库的问答 (SSE) POST /api/ai/chat/knowledge-chat */
- export async function postChatKnowledgeChat(
- body: {
- session_id: string
- query: string
- knowledge_base_ids: string[]
- knowledge_ids: string[]
- summary_model_id: string
- disable_title: boolean
- enable_memory: boolean
- },
- options?: { [key: string]: any }
- ) {
- return request<Record<string, any>>('/api/ai/chat/knowledge-chat', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
- /** 基于模型聊天 (SSE) POST /api/ai/chat/model-chat */
- export async function postChatModelChat(
- body: {
- session_id: string
- query: string
- summary_model_id: string
- disable_title: boolean
- enable_memory: boolean
- },
- options?: { [key: string]: any }
- ) {
- return request<Record<string, any>>('/api/ai/chat/model-chat', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
- /** 停止会话 POST /api/ai/chat/stop-answer */
- export async function postChatStopAnswer(
- body: {
- session_id: string
- msgId: string
- },
- options?: { [key: string]: any }
- ) {
- return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>(
- '/api/ai/chat/stop-answer',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- }
- )
- }
- /** 创建会话 POST /api/ai/session/create */
- export async function postSessionCreate(
- body: {
- name: string
- },
- options?: { [key: string]: any }
- ) {
- return request<{ isSuccess: boolean; code: number; result: string; isAuthorized: boolean }>(
- '/api/ai/session/create',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- }
- )
- }
- /** 删除会话 POST /api/ai/session/delete */
- export async function postSessionOpenApiDelete(
- body: {
- id: string
- },
- options?: { [key: string]: any }
- ) {
- return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>(
- '/api/ai/session/delete',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- }
- )
- }
- /** 获取分页列表 POST /api/ai/session/pageList */
- export async function postSessionPageList(
- body: {
- pageIndex: number
- pageSize: number
- },
- options?: { [key: string]: any }
- ) {
- return request<{
- isSuccess: boolean
- code: number
- result: {
- currentPage: number
- hasNextPage: boolean
- hasPreviousPage: boolean
- model: {
- app: string
- creationTime: string
- entityId: string
- id: string
- isDeleted: boolean
- name: string
- sessionId: string
- updateTime: string
- userId: string
- creatorUserId: string
- }[]
- pageSize: number
- totalCount: number
- totalPages: number
- }
- isAuthorized: boolean
- }>('/api/ai/session/pageList', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
- /** 获取消息分页列表 POST /api/ai/session/sessionMessages */
- export async function postSessionSessionMessages(
- body: {
- sessionId: string
- pageIndex: number
- pageSize: number
- },
- options?: { [key: string]: any }
- ) {
- return request<{
- isSuccess: boolean
- code: number
- result: {
- currentPage: number
- hasNextPage: boolean
- hasPreviousPage: boolean
- model: {
- answer?: string
- app?: string
- creationTime?: string
- creatorUserId?: string
- entityId?: string
- id?: string
- isDeleted?: boolean
- message_files?: string
- msgId?: string
- query?: string
- sessionId?: string
- taskId?: string
- updateTime?: string
- userId?: string
- }[]
- pageSize: number
- totalCount: number
- totalPages: number
- }
- isAuthorized: boolean
- }>('/api/ai/session/sessionMessages', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
- /** 更新会话 POST /api/ai/session/update */
- export async function postSessionUpdate(
- body: {
- id: string
- name: string
- },
- options?: { [key: string]: any }
- ) {
- return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>(
- '/api/ai/session/update',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- }
- )
- }
|