| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- // @ts-ignore
- /* eslint-disable */
- import request from '@repo/api-client'
- /** 智能体编辑 POST /api/agent/doEditAgent */
- export async function postDoEditAgent(options?: { [key: string]: any }) {
- return request<{ isSuccess: boolean; code: number; result: string; isAuthorized: boolean }>(
- '/api/agent/doEditAgent',
- {
- method: 'POST',
- ...(options || {})
- }
- )
- }
- /** 智能体添加节点 POST /api/agent/doNewAgentNode */
- export async function postDoNewAgentNode(
- 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/doSaveAgentVariables */
- export async function postDoSaveAgentVariables(
- 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/doTestNodeRunner */
- export async function postDoTestNodeRunner(
- body: {
- id: string
- appAgentId: string
- },
- options?: { [key: string]: any }
- ) {
- return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>(
- '/api/agent/doTestNodeRunner',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- }
- )
- }
- /** 更新智能体节点 POST /api/agent/doUpdateAgentNode */
- export async function postDoUpdateAgentNode(
- 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 postGetAgentInfo(
- 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 || {})
- })
- }
|