import { PromptFunctions, PromptMemory, PromptSection, Tokenizer } from "promptrix"; import { PromptCompletionModel, PromptResponse } from "./types"; /** * Options to configure an `AnthropicModel`. */ export interface AnthropicModelOptions { /** * API key to use when calling the model. */ apiKey: string; /** * Name of the model to use when completing prompts. */ model: string; /** * Optional. Base URL to use when calling the API. */ baseURL?: string; /** * Optional. Maximum number of tokens to let the prompt use when rendering. */ max_input_tokens?: number; /** * Optional. Maximum number of tokens to generate for a completion. */ max_tokens?: number; /** * Optional. Sampling temperature to use, between `0` and `1`. */ temperature?: number; /** * Optional. The maximum cumulative probability of tokens to consider when sampling. */ top_p?: number; /** * Optional. The maximum number of tokens to consider when sampling. */ top_k?: number; /** * Optional. Stop sequences to use when generating completions. */ stop_sequence?: Array; /** * Optional. Maximum number of retries to attempt when a request fails. */ maxRetries?: number; /** * Optional. Whether to log requests to the console. * @remarks * This is useful for debugging prompts and defaults to `false`. */ logRequests?: boolean; } /** * A `PromptCompletionModel` that uses the Anthropic API to complete prompts. */ export declare class AnthropicModel implements PromptCompletionModel { private readonly anthropic; /** * Creates a new `AnthropicModel` instance. * @param options Options to configure the model with. */ constructor(options: AnthropicModelOptions); /** * Options the model was configured with. */ readonly options: AnthropicModelOptions; /** * Completes a prompt. * @param memory Memory to use when rendering the prompt. * @param functions Functions to use when rendering the prompt. * @param tokenizer Tokenizer to use when rendering the prompt. * @param prompt Prompt to complete. * @returns A `PromptResponse` with the status and message. */ completePrompt(memory: PromptMemory, functions: PromptFunctions, tokenizer: Tokenizer, prompt: PromptSection): Promise; } //# sourceMappingURL=AnthropicModel.d.ts.map