donobu
Version:
Create browser automations with an LLM agent and replay them as Playwright scripts.
38 lines • 1.65 kB
TypeScript
import { z } from 'zod/v4';
import type { AnthropicConfig } from '../models/GptConfig';
import type { AssistantMessage, GptMessage, ProposedToolCallsMessage, StructuredOutputMessage } from '../models/GptMessage';
import type { ToolOption } from './GptClient';
import { GptClient } from './GptClient';
/**
* A GPT client implemented using the Anthropic API
* @see https://docs.anthropic.com/en/api/messages
*/
export declare class AnthropicGptClient extends GptClient {
private readonly anthropicConfig;
private static readonly API_URL;
private static readonly REQUEST_TIMEOUT_MILLISECONDS;
private static readonly API_KEY_HEADER_NAME;
private static readonly API_VERSION_HEADER_NAME;
private static readonly API_VERSION_HEADER_VALUE;
private static readonly CONTENT_TYPE_HEADER_VALUE;
private static readonly MAX_TOKENS;
private readonly headers;
constructor(anthropicConfig: AnthropicConfig);
ping(options?: {
signal?: AbortSignal;
}): Promise<void>;
getMessage(messages: GptMessage[], options?: {
signal?: AbortSignal;
}): Promise<AssistantMessage>;
getStructuredOutput<T>(messages: GptMessage[], zodSchema: z.ZodSchema<T>, options?: {
signal?: AbortSignal;
}): Promise<StructuredOutputMessage<T>>;
getToolCalls(messages: GptMessage[], tools: ToolOption[], options?: {
signal?: AbortSignal;
}): Promise<ProposedToolCallsMessage>;
private mapErrorResponseToDonobuException;
private makeRequest;
private static chatRequestMessageFromGptMessage;
private static toolChoiceFromTool;
}
//# sourceMappingURL=AnthropicGptClient.d.ts.map