import { BaseLLM } from "../base.js"; import { Generation, LLMResult } from "../../schema/index.js"; import { GoogleVertexAILLMConnection } from "../../util/googlevertexai-connection.js"; import { GoogleVertexAIBaseLLMInput, GoogleVertexAIBasePrediction, GoogleVertexAILLMResponse } from "../../types/googlevertexai-types.js"; import { BaseLanguageModelCallOptions } from "../../base_language/index.js"; /** * Interface representing the instance of text input to the Google Vertex * AI model. */ interface GoogleVertexAILLMTextInstance { content: string; } /** * Interface representing the instance of code input to the Google Vertex * AI model. */ interface GoogleVertexAILLMCodeInstance { prefix: string; } /** * Type representing an instance of either text or code input to the * Google Vertex AI model. */ type GoogleVertexAILLMInstance = GoogleVertexAILLMTextInstance | GoogleVertexAILLMCodeInstance; /** * Models the data returned from the API call */ interface TextPrediction extends GoogleVertexAIBasePrediction { content: string; } /** * Base class for Google Vertex AI LLMs. * Implemented subclasses must provide a GoogleVertexAILLMConnection * with an appropriate auth client. */ export declare class BaseGoogleVertexAI extends BaseLLM implements GoogleVertexAIBaseLLMInput { lc_serializable: boolean; model: string; temperature: number; maxOutputTokens: number; topP: number; topK: number; protected connection: GoogleVertexAILLMConnection; get lc_aliases(): Record; constructor(fields?: GoogleVertexAIBaseLLMInput); _llmType(): string; _generate(prompts: string[], options: this["ParsedCallOptions"]): Promise; _generatePrompt(prompt: string, options: this["ParsedCallOptions"]): Promise; /** * Formats the input instance as a text instance for the Google Vertex AI * model. * @param prompt Prompt to be formatted as a text instance. * @returns A GoogleVertexAILLMInstance object representing the formatted text instance. */ formatInstanceText(prompt: string): GoogleVertexAILLMInstance; /** * Formats the input instance as a code instance for the Google Vertex AI * model. * @param prompt Prompt to be formatted as a code instance. * @returns A GoogleVertexAILLMInstance object representing the formatted code instance. */ formatInstanceCode(prompt: string): GoogleVertexAILLMInstance; /** * Formats the input instance for the Google Vertex AI model based on the * model type (text or code). * @param prompt Prompt to be formatted as an instance. * @returns A GoogleVertexAILLMInstance object representing the formatted instance. */ formatInstance(prompt: string): GoogleVertexAILLMInstance; /** * Extracts the prediction from the API response. * @param result The API response from which to extract the prediction. * @returns A TextPrediction object representing the extracted prediction. */ extractPredictionFromResponse(result: GoogleVertexAILLMResponse): TextPrediction; } export {};