UNPKG

donobu

Version:

Create browser automations with an LLM agent and replay them as Playwright scripts.

27 lines 1.05 kB
import { GptClient, ToolOption } from './GptClient'; import { JSONSchema7 } from 'json-schema'; import { GptMessage, AssistantMessage, StructuredOutputMessage, ProposedToolCallsMessage } from '../models/GptMessage'; import { LanguageModel } from 'ai'; /** * A GPT client implemented using the Vercel AI SDK. */ export declare class VercelAiGptClient extends GptClient { private readonly model; /** * Create a new instance. */ constructor(model: LanguageModel); ping(): Promise<void>; getMessage(messages: GptMessage[]): Promise<AssistantMessage>; getStructuredOutput(messages: GptMessage[], jsonSchema: JSONSchema7): Promise<StructuredOutputMessage>; getToolCalls(messages: GptMessage[], tools: ToolOption[]): Promise<ProposedToolCallsMessage>; /** * Convert GptMessage array to CoreMessage array for Vercel AI SDK */ private convertToCoreMessages; /** * Maps an error to a DonobuException */ private mapErrorToDonobuException; } //# sourceMappingURL=VercelAiGptClient.d.ts.map