ghostdrive1's picture
Upload folder using huggingface_hub
0b9dc2e verified
Raw
History Blame Contribute Delete
634 Bytes
import { client } from './client';
import type {
AgentListResponse,
AgentRecord,
AgentSchemaResponse,
CreateAgentRequest,
CreateAgentResponse,
UpdateAgentRequest,
} from './types';
export const agentApi = {
list: () => client.get<AgentListResponse>('/agent/'),
getSchema: () => client.get<AgentSchemaResponse>('/agent/schema'),
create: (body: CreateAgentRequest) => client.post<CreateAgentResponse>('/agent/', body),
update: (agentId: string, body: UpdateAgentRequest) =>
client.patch<AgentRecord>(`/agent/${agentId}`, body),
delete: (agentId: string) => client.delete(`/agent/${agentId}`),
};