| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290 |
- // @ts-ignore
- /* eslint-disable */
- import request from '@repo/api-client'
- /** 删除智能体节点 POST /api/agent/doDeleteAgentNode */
- export async function postAgentDoDeleteAgentNode(
- body: {
- id: string
- },
- options?: { [key: string]: any }
- ) {
- return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>(
- '/api/agent/doDeleteAgentNode',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- }
- )
- }
- /** 删除智能体边缘信息 POST /api/agent/doDeleteEdge */
- export async function postAgentDoDeleteEdge(
- body: {
- id: string
- },
- options?: { [key: string]: any }
- ) {
- return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>(
- '/api/agent/doDeleteEdge',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- }
- )
- }
- /** 智能体编辑 POST /api/agent/doEditAgent */
- export async function postAgentDoEditAgent(options?: { [key: string]: any }) {
- return request<{ isSuccess: boolean; code: number; result: string; isAuthorized: boolean }>(
- '/api/agent/doEditAgent',
- {
- method: 'POST',
- ...(options || {})
- }
- )
- }
- /** 运行智能体 POST /api/agent/doExecute */
- export async function postAgentDoExecute(
- body: {
- appAgentId: string
- start_node_id: string
- is_debugger: boolean
- },
- options?: { [key: string]: any }
- ) {
- return request<{
- isSuccess: boolean
- code: number
- result: {
- agent: {
- conversation_variables: string[]
- creationTime: string
- creatorUserId: string
- env_variables: { is_require?: boolean; name?: string; type?: string; value?: string }[]
- id: string
- isDeleted: boolean
- name: string
- profilePhoto: string
- remark: string
- updateTime: string
- viewPort: { x: number; y: number; zoom: number }
- }
- runVariable: {
- session: Record<string, any>
- '492048da-6f33-4a36-adc5-cff4b973b053': {
- headers: {
- 'transfer-Encoding': string
- 'access-Control-Expose-Headers': string
- server: string
- 'access-Control-Allow-Credentials': string
- connection: string
- 'access-Control-Max-Age': string
- date: string
- 'x-proxy-pass': string
- 'content-Type': string
- }
- status_code: number
- body: string
- $execute_result: {
- code: number
- data: {
- cookieList: string[]
- error: boolean
- statusCode: number
- success: boolean
- throwableMsg: string
- }
- error: boolean
- isSelected: boolean
- msg: string
- success: boolean
- ts: string
- }
- }
- env: { api_address: string }
- }
- run_nodes: string[]
- }
- isAuthorized: boolean
- }>('/api/agent/doExecute', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
- /** 智能体添加节点 POST /api/agent/doNewAgentNode */
- export async function postAgentDoNewAgentNode(
- body: {
- appAgentId: string
- position: { x: number; y: number }
- width: number
- height: number
- selected: boolean
- nodeType: 'custom' | 'start' | 'end' | 'condition' | 'task' | 'http-request'
- zIndex: number
- parentId: string
- },
- options?: { [key: string]: any }
- ) {
- return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>(
- '/api/agent/doNewAgentNode',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- }
- )
- }
- /** 新增智能体边缘信息 POST /api/agent/doNewEdge */
- export async function postAgentDoNewEdge(
- body: {
- appAgentId: string
- source: string
- sourceHandle?: string
- target: string
- zIndex: number
- },
- options?: { [key: string]: any }
- ) {
- return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>(
- '/api/agent/doNewEdge',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- }
- )
- }
- /** 保存智能体变量 POST /api/agent/doSaveAgentVariables */
- export async function postAgentDoSaveAgentVariables(
- body: {
- appAgentId: string
- conversation_variables: string[]
- env_variables: {
- name: string
- value: string
- type: 'string' | 'number' | 'boolean' | 'object' | 'array'
- }[]
- },
- options?: { [key: string]: any }
- ) {
- return request<{ isSuccess: boolean; code: number; result: string; isAuthorized: boolean }>(
- '/api/agent/doSaveAgentVariables',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- }
- )
- }
- /** 选中智能体边缘 POST /api/agent/doSelectedEdge */
- export async function postAgentDoSelectedEdge(
- body: {
- id: string
- },
- options?: { [key: string]: any }
- ) {
- return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>(
- '/api/agent/doSelectedEdge',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- }
- )
- }
- /** 更新智能体节点 POST /api/agent/doUpdateAgentNode */
- export async function postAgentDoUpdateAgentNode(
- body: {
- id: string
- appAgentId: string
- parentId: string
- position: { x: number; y: number }
- width: number
- height: number
- selected: boolean
- nodeType: 'custom' | 'start' | 'end' | 'condition' | 'task' | 'http-request'
- zIndex: number
- data: Record<string, any>
- },
- options?: { [key: string]: any }
- ) {
- return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>(
- '/api/agent/doUpdateAgentNode',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- }
- )
- }
- /** 获取智能体信息 POST /api/agent/getAgentInfo */
- export async function postAgentGetAgentInfo(
- body: {
- id: string
- },
- options?: { [key: string]: any }
- ) {
- return request<{
- isSuccess: boolean
- code: number
- result: {
- conversation_variables: string[]
- edges: string[]
- env_variables: {
- is_require?: boolean
- name: string
- type: 'string' | 'number' | 'boolean' | 'object' | 'array'
- value: string
- }[]
- id: string
- name: string
- nodes: API.AgentNode[]
- profilePhoto: string
- viewPort: { x: number; y: number; zoom: number }
- }
- isAuthorized: boolean
- }>('/api/agent/getAgentInfo', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
|