UNPKG

askui

Version:

Reliable, automated end-to-end-testing that depends on what is shown on your screen instead of the technology you are running on

53 lines (52 loc) 1.7 kB
import { Beta } from '@anthropic-ai/sdk/resources'; import { BaseAgentTool } from './tools/base'; import { BetaMessageParam } from '@anthropic-ai/sdk/resources/beta/messages'; type PredictActResponseFunction = (params: { max_tokens: number; messages: Beta.BetaMessageParam[]; model: string; system?: string; tools?: any[]; betas?: string[]; tool_choice?: { type: 'tool' | 'any' | 'auto'; name?: string; }; }) => Promise<Beta.BetaMessage>; export type AgentHistory = BetaMessageParam[]; export interface ActOptions { chatId?: string; agentHistory?: Beta.BetaMessageParam[]; } export declare class ClaudeAgent { private predictActResponseFunction; private maxTokens; private onlyNMostRecentImages; private imageTruncationThreshold; private systemPrompt; private model; private betas; private _toolCollection; private tools; private history; private toolChoice; constructor(predictActResponseFunction: PredictActResponseFunction); setToolChoice(toolChoice: { type: 'tool' | 'any' | 'auto'; name?: string; }): void; setTools(tools: BaseAgentTool[]): void; addTool(tool: BaseAgentTool): void; listToolNames(): string[]; removeToolByName(toolName: string): void; setSystemPrompt(systemPrompt: string): void; private IsConfigured; private get toolCollection(); private setHistory; private getHistory; act(goal: string, imagePathOrBase64String?: string, options?: ActOptions): Promise<Beta.BetaMessageParam[]>; private makeApiToolResult; private maybePrependSystemToolResult; private static filterNMostRecentImages; } export {};