UNPKG

@asterai/client

Version:
62 lines (61 loc) 1.56 kB
export type FetchTeamArgs = { teamId: string; accountApiKey: string; apiBaseUrl?: string; }; export type ListTeamsArgs = { accountApiKey: string; apiBaseUrl?: string; }; export type AsteraiAgentInformation = { id: string; name: string; publicQueryKeys: string[]; teamId: string; plugins: AgentPlugin[]; llmParams: AgentLlmParams; }; export type AgentPlugin = { /** * The ID of the plugin instance. */ id: string; name: string; isEnabled: boolean; }; export type AgentLlmParams = { model: string; provider: string; maxTokens: number; temperature: number; topP: number; presencePenalty: number; frequencyPenalty: number; }; export type FetchAgentArgs = { agentId: string; }; /** * Represents an asterai team. * * This can be used to fetch data from and control * a team programmatically. * * The team is authenticated with the account's API key, * therefore this should not be used in untrusted clients such as * the client side of a public web app. */ export declare class AsteraiTeam { readonly id: string; readonly name: string; private readonly accountApiKey; private readonly apiBaseUrl; private constructor(); static fetch(args: FetchTeamArgs): Promise<AsteraiTeam | undefined>; /** * List teams from an account. */ static list(args: ListTeamsArgs): Promise<AsteraiTeam[]>; listAgents(): Promise<AsteraiAgentInformation[]>; fetchAgent(args: FetchAgentArgs): Promise<AsteraiAgentInformation>; }