import { GeminiContent, GoogleAIBaseLLMInput, GoogleAIModelParams, GoogleAIResponseMimeType, GoogleAISafetyHandler, GoogleAISafetySetting, GoogleBaseLLMInput, GooglePlatformType } from "./types.cjs"; import { GoogleAbstractedClient } from "./auth.cjs"; import { AbstractGoogleLLMConnection } from "./connection.cjs"; import { ChatGoogleBase } from "./chat_models.cjs"; import { LLM } from "@langchain/core/language_models/llms"; import { BaseMessage, MessageContent } from "@langchain/core/messages"; import { BaseLanguageModelCallOptions, BaseLanguageModelInput } from "@langchain/core/language_models/base"; import { Callbacks } from "@langchain/core/callbacks/manager"; //#region src/llms.d.ts declare class GoogleLLMConnection extends AbstractGoogleLLMConnection { formatContents(input: MessageContent, _parameters: GoogleAIModelParams): Promise; } /** * Integration with an LLM. */ declare abstract class GoogleBaseLLM extends LLM implements GoogleBaseLLMInput { static lc_name(): string; get lc_secrets(): { [key: string]: string; } | undefined; originalFields?: GoogleBaseLLMInput; lc_serializable: boolean; modelName: string; model: string; temperature: number; maxOutputTokens: number; topP: number; topK: number; stopSequences: string[]; safetySettings: GoogleAISafetySetting[]; safetyHandler: GoogleAISafetyHandler; responseMimeType: GoogleAIResponseMimeType; protected connection: GoogleLLMConnection; protected streamedConnection: GoogleLLMConnection; constructor(fields?: GoogleBaseLLMInput); abstract buildAbstractedClient(fields?: GoogleAIBaseLLMInput): GoogleAbstractedClient; buildApiKeyClient(apiKey: string): GoogleAbstractedClient; buildApiKey(fields?: GoogleAIBaseLLMInput): string | undefined; buildClient(fields?: GoogleAIBaseLLMInput): GoogleAbstractedClient; buildConnection(fields: GoogleBaseLLMInput, client: GoogleAbstractedClient): void; get platform(): GooglePlatformType; _llmType(): string; formatPrompt(prompt: string): MessageContent; /** * For some given input string and options, return a string output. * * Despite the fact that `invoke` is overridden below, we still need this * in order to handle public APi calls to `generate()`. */ _call(prompt: string, options: this["ParsedCallOptions"]): Promise; _streamIterator(input: BaseLanguageModelInput, options?: BaseLanguageModelCallOptions): AsyncGenerator; predictMessages(messages: BaseMessage[], options?: string[] | BaseLanguageModelCallOptions, _callbacks?: Callbacks): Promise; /** * Internal implementation detail to allow Google LLMs to support * multimodal input by delegating to the chat model implementation. * * TODO: Replace with something less hacky. */ protected createProxyChat(): ChatGoogleBase; invoke(input: BaseLanguageModelInput, options?: BaseLanguageModelCallOptions): Promise; } //#endregion export { GoogleBaseLLM }; //# sourceMappingURL=llms.d.cts.map