diff --git a/.yarn/patches/@google-genai-npm-0.8.0-450d0d9a7d.patch b/.yarn/patches/@google-genai-npm-0.8.0-450d0d9a7d.patch new file mode 100644 index 00000000..3a180643 --- /dev/null +++ b/.yarn/patches/@google-genai-npm-0.8.0-450d0d9a7d.patch @@ -0,0 +1,37698 @@ +diff --git a/dist/genai.d.ts b/dist/genai.d.ts +index 812160ef9cdeb8708e1eca07695c0ff710d05daf..5b166dda3061a074c53dedfb5daa6ccdfbec829a 100644 +--- a/dist/genai.d.ts ++++ b/dist/genai.d.ts +@@ -46,11 +46,11 @@ declare class ApiClient { + private shouldPrependVertexProjectPath; + request(request: HttpRequest): Promise; + private patchHttpOptions; +- requestStream(request: HttpRequest): Promise; ++ requestStream(request: HttpRequest): Promise>; + private includeExtraHttpOptionsToRequestInit; + private unaryApiCall; + private streamApiCall; +- processStreamResponse(response: Response): AsyncGenerator; ++ processStreamResponse(response: Response): AsyncGenerator; + private apiCall; + getDefaultHeaders(): Record; + private getHeadersInternal; +@@ -237,8 +237,8 @@ export declare class Caches extends BaseModule { + * + * @remarks + * Context caching is only supported for specific models. See [Gemini +- * Developer API reference] (https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac) +- * and [Vertex AI reference] (https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models) ++ * Developer API reference](https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac) ++ * and [Vertex AI reference](https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models) + * for more information. + * + * @param params - The parameters for the create request. +@@ -540,7 +540,7 @@ export declare interface ContentEmbeddingStatistics { + tokenCount?: number; + } + +-export declare type ContentListUnion = ContentUnion[] | ContentUnion; ++export declare type ContentListUnion = Content | Content[] | PartUnion | PartUnion[]; + + export declare type ContentUnion = Content | PartUnion[] | PartUnion; + +@@ -897,6 +897,14 @@ export declare interface ExecutableCode { + language?: Language; + } + ++/** Options for feature selection preference. */ ++export declare enum FeatureSelectionPreference { ++ FEATURE_SELECTION_PREFERENCE_UNSPECIFIED = "FEATURE_SELECTION_PREFERENCE_UNSPECIFIED", ++ PRIORITIZE_QUALITY = "PRIORITIZE_QUALITY", ++ BALANCED = "BALANCED", ++ PRIORITIZE_COST = "PRIORITIZE_COST" ++} ++ + export declare interface FetchPredictOperationConfig { + /** Used to override HTTP request options. */ + httpOptions?: HttpOptions; +@@ -1239,6 +1247,9 @@ export declare interface GenerateContentConfig { + /** Configuration for model router requests. + */ + routingConfig?: GenerationConfigRoutingConfig; ++ /** Configuration for model selection. ++ */ ++ modelSelectionConfig?: ModelSelectionConfig; + /** Safety settings in the request to block unsafe content in the + response. + */ +@@ -1977,6 +1988,8 @@ export declare interface HttpOptions { + headers?: Record; + /** Timeout for the request in milliseconds. */ + timeout?: number; ++ /** Signal for the request. */ ++ signal?: AbortSignal; + } + + /** +@@ -2128,17 +2141,20 @@ export declare class Live { + @experimental + + @remarks +- If using the Gemini API, Live is currently only supported behind API +- version `v1alpha`. Ensure that the API version is set to `v1alpha` when +- initializing the SDK if relying on the Gemini API. + + @param params - The parameters for establishing a connection to the model. + @return A live session. + + @example + ```ts ++ let model: string; ++ if (GOOGLE_GENAI_USE_VERTEXAI) { ++ model = 'gemini-2.0-flash-live-preview-04-09'; ++ } else { ++ model = 'gemini-2.0-flash-live-001'; ++ } + const session = await ai.live.connect({ +- model: 'gemini-2.0-flash-exp', ++ model: model, + config: { + responseModalities: [Modality.AUDIO], + }, +@@ -2253,7 +2269,7 @@ export declare interface LiveClientSetup { + /** The user provided system instructions for the model. + Note: only text should be used in parts and content in each part will be + in a separate paragraph. */ +- systemInstruction?: Content; ++ systemInstruction?: ContentUnion; + /** A list of `Tools` the model may use to generate the next response. + + A `Tool` is a piece of code that enables the system to interact with +@@ -2301,7 +2317,7 @@ export declare interface LiveConnectConfig { + /** The user provided system instructions for the model. + Note: only text should be used in parts and content in each part will be + in a separate paragraph. */ +- systemInstruction?: Content; ++ systemInstruction?: ContentUnion; + /** A list of `Tools` the model may use to generate the next response. + + A `Tool` is a piece of code that enables the system to interact with +@@ -2799,6 +2815,12 @@ export declare class Models extends BaseModule { + generateVideos(params: types.GenerateVideosParameters): Promise; + } + ++/** Config for model selection. */ ++export declare interface ModelSelectionConfig { ++ /** Options for feature selection preference. */ ++ featureSelectionPreference?: FeatureSelectionPreference; ++} ++ + /** Parameters for the get method of the operations module. */ + export declare interface OperationGetParameters { + /** The operation to be retrieved. */ +@@ -3006,6 +3028,54 @@ export declare interface PrebuiltVoiceConfig { + voiceName?: string; + } + ++/** Specifies the context retrieval config. */ ++export declare interface RagRetrievalConfig { ++ /** Optional. Config for filters. */ ++ filter?: RagRetrievalConfigFilter; ++ /** Optional. Config for Hybrid Search. */ ++ hybridSearch?: RagRetrievalConfigHybridSearch; ++ /** Optional. Config for ranking and reranking. */ ++ ranking?: RagRetrievalConfigRanking; ++ /** Optional. The number of contexts to retrieve. */ ++ topK?: number; ++} ++ ++/** Config for filters. */ ++export declare interface RagRetrievalConfigFilter { ++ /** Optional. String for metadata filtering. */ ++ metadataFilter?: string; ++ /** Optional. Only returns contexts with vector distance smaller than the threshold. */ ++ vectorDistanceThreshold?: number; ++ /** Optional. Only returns contexts with vector similarity larger than the threshold. */ ++ vectorSimilarityThreshold?: number; ++} ++ ++/** Config for Hybrid Search. */ ++export declare interface RagRetrievalConfigHybridSearch { ++ /** Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally. */ ++ alpha?: number; ++} ++ ++/** Config for ranking and reranking. */ ++export declare interface RagRetrievalConfigRanking { ++ /** Optional. Config for LlmRanker. */ ++ llmRanker?: RagRetrievalConfigRankingLlmRanker; ++ /** Optional. Config for Rank Service. */ ++ rankService?: RagRetrievalConfigRankingRankService; ++} ++ ++/** Config for LlmRanker. */ ++export declare interface RagRetrievalConfigRankingLlmRanker { ++ /** Optional. The model name used for ranking. Format: `gemini-1.5-pro` */ ++ modelName?: string; ++} ++ ++/** Config for Rank Service. */ ++export declare interface RagRetrievalConfigRankingRankService { ++ /** Optional. The model name of the rank service. Format: `semantic-ranker-512@latest` */ ++ modelName?: string; ++} ++ + /** A raw reference image. + + A raw reference image represents the base image to edit, provided by the user. +@@ -3328,8 +3398,14 @@ export declare class Session { + + @example + ```ts ++ let model: string; ++ if (GOOGLE_GENAI_USE_VERTEXAI) { ++ model = 'gemini-2.0-flash-live-preview-04-09'; ++ } else { ++ model = 'gemini-2.0-flash-live-001'; ++ } + const session = await ai.live.connect({ +- model: 'gemini-2.0-flash-exp', ++ model: model, + config: { + responseModalities: [Modality.AUDIO], + } +@@ -3372,6 +3448,10 @@ export declare interface SpeechConfig { + /** The configuration for the speaker to use. + */ + voiceConfig?: VoiceConfig; ++ /** Language code (ISO 639. e.g. en-US) for the speech synthesization. ++ Only available for Live API. ++ */ ++ languageCode?: string; + } + + export declare type SpeechConfigUnion = SpeechConfig | string; +@@ -3579,6 +3659,7 @@ declare namespace types { + TrafficType, + Modality, + MediaResolution, ++ FeatureSelectionPreference, + DynamicRetrievalConfigMode, + FunctionCallingConfigMode, + SafetyFilterLevel, +@@ -3605,6 +3686,7 @@ declare namespace types { + Content, + HttpOptions, + Schema, ++ ModelSelectionConfig, + SafetySetting, + FunctionDeclaration, + GoogleSearch, +@@ -3612,6 +3694,12 @@ declare namespace types { + GoogleSearchRetrieval, + VertexAISearch, + VertexRagStoreRagResource, ++ RagRetrievalConfigFilter, ++ RagRetrievalConfigHybridSearch, ++ RagRetrievalConfigRankingLlmRanker, ++ RagRetrievalConfigRankingRankService, ++ RagRetrievalConfigRanking, ++ RagRetrievalConfig, + VertexRagStore, + Retrieval, + ToolCodeExecution, +@@ -3744,6 +3832,7 @@ declare namespace types { + SessionResumptionConfig, + SlidingWindow, + ContextWindowCompressionConfig, ++ AudioTranscriptionConfig, + LiveClientSetup, + LiveClientContent, + ActivityStart, +@@ -3751,7 +3840,6 @@ declare namespace types { + LiveClientRealtimeInput, + LiveClientToolResponse, + LiveClientMessage, +- AudioTranscriptionConfig, + LiveConnectConfig, + LiveConnectParameters, + CreateChatParameters, +@@ -3904,6 +3992,8 @@ export declare interface VertexRagStore { + ragCorpora?: string[]; + /** Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. */ + ragResources?: VertexRagStoreRagResource[]; ++ /** Optional. The retrieval config for the Rag query. */ ++ ragRetrievalConfig?: RagRetrievalConfig; + /** Optional. Number of top k results to return from the selected corpora. */ + similarityTopK?: number; + /** Optional. Only return results with vector distance smaller than the threshold. */ +diff --git a/dist/index.js b/dist/index.js +index a247eea122d57e740a349fbd575ea7d5cf0fc7d1..e89794707ae201e485330995417c7892eef7d90a 100644 +--- a/dist/index.js ++++ b/dist/index.js +@@ -211,44 +211,25 @@ function _isFunctionCallPart(origin) { + typeof origin === 'object' && + 'functionCall' in origin); + } +-function _isUserPart(origin) { +- if (origin === null || origin === undefined) { +- return false; +- } +- if (_isFunctionCallPart(origin)) { +- return false; +- } +- return true; +-} +-function _areUserParts(origin) { +- if (origin === null || +- origin === undefined || +- (Array.isArray(origin) && origin.length === 0)) { +- return false; +- } +- return origin.every(_isUserPart); ++function _isFunctionResponsePart(origin) { ++ return (origin !== null && ++ origin !== undefined && ++ typeof origin === 'object' && ++ 'functionResponse' in origin); + } + function tContent(apiClient, origin) { + if (origin === null || origin === undefined) { + throw new Error('ContentUnion is required'); + } + if (_isContent(origin)) { +- // @ts-expect-error: _isContent is a utility function that checks if the ++ // _isContent is a utility function that checks if the + // origin is a Content. + return origin; + } +- if (_isUserPart(origin)) { +- return { +- role: 'user', +- parts: tParts(apiClient, origin), +- }; +- } +- else { +- return { +- role: 'model', +- parts: tParts(apiClient, origin), +- }; +- } ++ return { ++ role: 'user', ++ parts: tParts(apiClient, origin), ++ }; + } + function tContentsForEmbed(apiClient, origin) { + if (!origin) { +@@ -279,34 +260,6 @@ function tContentsForEmbed(apiClient, origin) { + } + return [tContent(apiClient, origin)]; + } +-function _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts) { +- if (accumulatedParts.length === 0) { +- return; +- } +- if (_areUserParts(accumulatedParts)) { +- result.push({ +- role: 'user', +- parts: tParts(apiClient, accumulatedParts), +- }); +- } +- else { +- result.push({ +- role: 'model', +- parts: tParts(apiClient, accumulatedParts), +- }); +- } +- accumulatedParts.length = 0; // clear the array inplace +-} +-function _handleCurrentPart(apiClient, result, accumulatedParts, currentPart) { +- if (_isUserPart(currentPart) === _areUserParts(accumulatedParts)) { +- accumulatedParts.push(currentPart); +- } +- else { +- _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts); +- accumulatedParts.length = 0; +- accumulatedParts.push(currentPart); +- } +-} + function tContents(apiClient, origin) { + if (origin === null || + origin === undefined || +@@ -314,35 +267,35 @@ function tContents(apiClient, origin) { + throw new Error('contents are required'); + } + if (!Array.isArray(origin)) { ++ // If it's not an array, it's a single content or a single PartUnion. ++ if (_isFunctionCallPart(origin) || _isFunctionResponsePart(origin)) { ++ throw new Error('To specify functionCall or functionResponse parts, please wrap them in a Content object, specifying the role for them'); ++ } + return [tContent(apiClient, origin)]; + } + const result = []; + const accumulatedParts = []; +- for (const content of origin) { +- if (_isContent(content)) { +- _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts); +- // @ts-expect-error: content is a Content here +- result.push(content); +- } +- else if (typeof content === 'string' || +- (typeof content === 'object' && !Array.isArray(content))) { +- // @ts-expect-error: content is a part here +- _handleCurrentPart(apiClient, result, accumulatedParts, content); +- } +- else if (Array.isArray(content)) { +- // if there're consecutive user parts before the list, +- // convert to UserContent and append to result +- _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts); +- result.push({ +- role: 'user', +- parts: tParts(apiClient, content), +- }); ++ const isContentArray = _isContent(origin[0]); ++ for (const item of origin) { ++ const isContent = _isContent(item); ++ if (isContent != isContentArray) { ++ throw new Error('Mixing Content and Parts is not supported, please group the parts into a the appropriate Content objects and specify the roles for them'); ++ } ++ if (isContent) { ++ // `isContent` contains the result of _isContent, which is a utility ++ // function that checks if the item is a Content. ++ result.push(item); ++ } ++ else if (_isFunctionCallPart(item) || _isFunctionResponsePart(item)) { ++ throw new Error('To specify functionCall or functionResponse parts, please wrap them, and any other parts, in Content objects as appropriate, specifying the role for them'); + } + else { +- throw new Error(`Unsupported content type: ${typeof content}`); ++ accumulatedParts.push(item); + } + } +- _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts); ++ if (!isContentArray) { ++ result.push({ role: 'user', parts: tParts(apiClient, accumulatedParts) }); ++ } + return result; + } + function processSchema(apiClient, schema) { +@@ -507,7 +460,7 @@ function tFileName(apiClient, fromName) { + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +-function partToMldev$1(apiClient, fromObject) { ++function partToMldev$2(apiClient, fromObject) { + const toObject = {}; + if (getValueByPath(fromObject, ['videoMetadata']) !== undefined) { + throw new Error('videoMetadata parameter is not supported in Gemini API.'); +@@ -552,13 +505,13 @@ function partToMldev$1(apiClient, fromObject) { + } + return toObject; + } +-function contentToMldev$1(apiClient, fromObject) { ++function contentToMldev$2(apiClient, fromObject) { + const toObject = {}; + const fromParts = getValueByPath(fromObject, ['parts']); + if (fromParts != null) { + if (Array.isArray(fromParts)) { + setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partToMldev$1(apiClient, item); ++ return partToMldev$2(apiClient, item); + })); + } + else { +@@ -571,7 +524,7 @@ function contentToMldev$1(apiClient, fromObject) { + } + return toObject; + } +-function functionDeclarationToMldev$1(apiClient, fromObject) { ++function functionDeclarationToMldev$2(apiClient, fromObject) { + const toObject = {}; + if (getValueByPath(fromObject, ['response']) !== undefined) { + throw new Error('response parameter is not supported in Gemini API.'); +@@ -590,11 +543,11 @@ function functionDeclarationToMldev$1(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchToMldev$1() { ++function googleSearchToMldev$2() { + const toObject = {}; + return toObject; + } +-function dynamicRetrievalConfigToMldev$1(apiClient, fromObject) { ++function dynamicRetrievalConfigToMldev$2(apiClient, fromObject) { + const toObject = {}; + const fromMode = getValueByPath(fromObject, ['mode']); + if (fromMode != null) { +@@ -608,17 +561,17 @@ function dynamicRetrievalConfigToMldev$1(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchRetrievalToMldev$1(apiClient, fromObject) { ++function googleSearchRetrievalToMldev$2(apiClient, fromObject) { + const toObject = {}; + const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ + 'dynamicRetrievalConfig', + ]); + if (fromDynamicRetrievalConfig != null) { +- setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev$1(apiClient, fromDynamicRetrievalConfig)); ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev$2(apiClient, fromDynamicRetrievalConfig)); + } + return toObject; + } +-function toolToMldev$1(apiClient, fromObject) { ++function toolToMldev$2(apiClient, fromObject) { + const toObject = {}; + const fromFunctionDeclarations = getValueByPath(fromObject, [ + 'functionDeclarations', +@@ -626,7 +579,7 @@ function toolToMldev$1(apiClient, fromObject) { + if (fromFunctionDeclarations != null) { + if (Array.isArray(fromFunctionDeclarations)) { + setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { +- return functionDeclarationToMldev$1(apiClient, item); ++ return functionDeclarationToMldev$2(apiClient, item); + })); + } + else { +@@ -638,13 +591,13 @@ function toolToMldev$1(apiClient, fromObject) { + } + const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); + if (fromGoogleSearch != null) { +- setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$1()); ++ setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$2()); + } + const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ + 'googleSearchRetrieval', + ]); + if (fromGoogleSearchRetrieval != null) { +- setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev$1(apiClient, fromGoogleSearchRetrieval)); ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev$2(apiClient, fromGoogleSearchRetrieval)); + } + const fromCodeExecution = getValueByPath(fromObject, [ + 'codeExecution', +@@ -696,7 +649,7 @@ function createCachedContentConfigToMldev(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromContents != null) { + if (Array.isArray(fromContents)) { + setValueByPath(parentObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToMldev$1(apiClient, item); ++ return contentToMldev$2(apiClient, item); + }))); + } + else { +@@ -707,13 +660,13 @@ function createCachedContentConfigToMldev(apiClient, fromObject, parentObject) { + 'systemInstruction', + ]); + if (parentObject !== undefined && fromSystemInstruction != null) { +- setValueByPath(parentObject, ['systemInstruction'], contentToMldev$1(apiClient, tContent(apiClient, fromSystemInstruction))); ++ setValueByPath(parentObject, ['systemInstruction'], contentToMldev$2(apiClient, tContent(apiClient, fromSystemInstruction))); + } + const fromTools = getValueByPath(fromObject, ['tools']); + if (parentObject !== undefined && fromTools != null) { + if (Array.isArray(fromTools)) { + setValueByPath(parentObject, ['tools'], fromTools.map((item) => { +- return toolToMldev$1(apiClient, item); ++ return toolToMldev$2(apiClient, item); + })); + } + else { +@@ -806,7 +759,7 @@ function listCachedContentsParametersToMldev(apiClient, fromObject) { + } + return toObject; + } +-function partToVertex$1(apiClient, fromObject) { ++function partToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromVideoMetadata = getValueByPath(fromObject, [ + 'videoMetadata', +@@ -854,13 +807,13 @@ function partToVertex$1(apiClient, fromObject) { + } + return toObject; + } +-function contentToVertex$1(apiClient, fromObject) { ++function contentToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromParts = getValueByPath(fromObject, ['parts']); + if (fromParts != null) { + if (Array.isArray(fromParts)) { + setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partToVertex$1(apiClient, item); ++ return partToVertex$2(apiClient, item); + })); + } + else { +@@ -873,7 +826,7 @@ function contentToVertex$1(apiClient, fromObject) { + } + return toObject; + } +-function schemaToVertex$1(apiClient, fromObject) { ++function schemaToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromExample = getValueByPath(fromObject, ['example']); + if (fromExample != null) { +@@ -971,11 +924,11 @@ function schemaToVertex$1(apiClient, fromObject) { + } + return toObject; + } +-function functionDeclarationToVertex$1(apiClient, fromObject) { ++function functionDeclarationToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromResponse = getValueByPath(fromObject, ['response']); + if (fromResponse != null) { +- setValueByPath(toObject, ['response'], schemaToVertex$1(apiClient, fromResponse)); ++ setValueByPath(toObject, ['response'], schemaToVertex$2(apiClient, fromResponse)); + } + const fromDescription = getValueByPath(fromObject, ['description']); + if (fromDescription != null) { +@@ -991,11 +944,11 @@ function functionDeclarationToVertex$1(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchToVertex$1() { ++function googleSearchToVertex$2() { + const toObject = {}; + return toObject; + } +-function dynamicRetrievalConfigToVertex$1(apiClient, fromObject) { ++function dynamicRetrievalConfigToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromMode = getValueByPath(fromObject, ['mode']); + if (fromMode != null) { +@@ -1009,17 +962,17 @@ function dynamicRetrievalConfigToVertex$1(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchRetrievalToVertex$1(apiClient, fromObject) { ++function googleSearchRetrievalToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ + 'dynamicRetrievalConfig', + ]); + if (fromDynamicRetrievalConfig != null) { +- setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$1(apiClient, fromDynamicRetrievalConfig)); ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$2(apiClient, fromDynamicRetrievalConfig)); + } + return toObject; + } +-function toolToVertex$1(apiClient, fromObject) { ++function toolToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromFunctionDeclarations = getValueByPath(fromObject, [ + 'functionDeclarations', +@@ -1027,7 +980,7 @@ function toolToVertex$1(apiClient, fromObject) { + if (fromFunctionDeclarations != null) { + if (Array.isArray(fromFunctionDeclarations)) { + setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { +- return functionDeclarationToVertex$1(apiClient, item); ++ return functionDeclarationToVertex$2(apiClient, item); + })); + } + else { +@@ -1040,13 +993,13 @@ function toolToVertex$1(apiClient, fromObject) { + } + const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); + if (fromGoogleSearch != null) { +- setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$1()); ++ setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$2()); + } + const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ + 'googleSearchRetrieval', + ]); + if (fromGoogleSearchRetrieval != null) { +- setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$1(apiClient, fromGoogleSearchRetrieval)); ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$2(apiClient, fromGoogleSearchRetrieval)); + } + const fromCodeExecution = getValueByPath(fromObject, [ + 'codeExecution', +@@ -1098,7 +1051,7 @@ function createCachedContentConfigToVertex(apiClient, fromObject, parentObject) + if (parentObject !== undefined && fromContents != null) { + if (Array.isArray(fromContents)) { + setValueByPath(parentObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToVertex$1(apiClient, item); ++ return contentToVertex$2(apiClient, item); + }))); + } + else { +@@ -1109,13 +1062,13 @@ function createCachedContentConfigToVertex(apiClient, fromObject, parentObject) + 'systemInstruction', + ]); + if (parentObject !== undefined && fromSystemInstruction != null) { +- setValueByPath(parentObject, ['systemInstruction'], contentToVertex$1(apiClient, tContent(apiClient, fromSystemInstruction))); ++ setValueByPath(parentObject, ['systemInstruction'], contentToVertex$2(apiClient, tContent(apiClient, fromSystemInstruction))); + } + const fromTools = getValueByPath(fromObject, ['tools']); + if (parentObject !== undefined && fromTools != null) { + if (Array.isArray(fromTools)) { + setValueByPath(parentObject, ['tools'], fromTools.map((item) => { +- return toolToVertex$1(apiClient, item); ++ return toolToVertex$2(apiClient, item); + })); + } + else { +@@ -1640,6 +1593,14 @@ exports.MediaResolution = void 0; + MediaResolution["MEDIA_RESOLUTION_MEDIUM"] = "MEDIA_RESOLUTION_MEDIUM"; + MediaResolution["MEDIA_RESOLUTION_HIGH"] = "MEDIA_RESOLUTION_HIGH"; + })(exports.MediaResolution || (exports.MediaResolution = {})); ++/** Options for feature selection preference. */ ++exports.FeatureSelectionPreference = void 0; ++(function (FeatureSelectionPreference) { ++ FeatureSelectionPreference["FEATURE_SELECTION_PREFERENCE_UNSPECIFIED"] = "FEATURE_SELECTION_PREFERENCE_UNSPECIFIED"; ++ FeatureSelectionPreference["PRIORITIZE_QUALITY"] = "PRIORITIZE_QUALITY"; ++ FeatureSelectionPreference["BALANCED"] = "BALANCED"; ++ FeatureSelectionPreference["PRIORITIZE_COST"] = "PRIORITIZE_COST"; ++})(exports.FeatureSelectionPreference || (exports.FeatureSelectionPreference = {})); + /** Config for the dynamic retrieval config mode. */ + exports.DynamicRetrievalConfigMode = void 0; + (function (DynamicRetrievalConfigMode) { +@@ -2190,8 +2151,8 @@ class Caches extends BaseModule { + * + * @remarks + * Context caching is only supported for specific models. See [Gemini +- * Developer API reference] (https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac) +- * and [Vertex AI reference] (https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models) ++ * Developer API reference](https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac) ++ * and [Vertex AI reference](https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models) + * for more information. + * + * @param params - The parameters for the create request. +@@ -3115,10 +3076,18 @@ class ApiClient { + return this.streamApiCall(url, requestInit, request.httpMethod); + } + async includeExtraHttpOptionsToRequestInit(requestInit, httpOptions) { +- if (httpOptions && httpOptions.timeout && httpOptions.timeout > 0) { ++ var _a; ++ if (httpOptions && (httpOptions.signal || httpOptions.timeout && (httpOptions === null || httpOptions === void 0 ? void 0 : httpOptions.timeout) >= 0)) { + const abortController = new AbortController(); + const signal = abortController.signal; +- setTimeout(() => abortController.abort(), httpOptions.timeout); ++ if (httpOptions.timeout && httpOptions.timeout >= 0) { ++ setTimeout(() => abortController.abort(), httpOptions.timeout); ++ } ++ if (httpOptions.signal) { ++ (_a = httpOptions.signal) === null || _a === void 0 ? void 0 : _a.addEventListener('abort', () => { ++ abortController.abort(); ++ }); ++ } + requestInit.signal = signal; + } + requestInit.headers = await this.getHeadersInternal(httpOptions); +@@ -3178,8 +3147,12 @@ class ApiClient { + while (match) { + const processedChunkString = match[1]; + try { +- const chunkData = JSON.parse(processedChunkString); +- yield yield __await(chunkData); ++ const partialResponse = new Response(processedChunkString, { ++ headers: response === null || response === void 0 ? void 0 : response.headers, ++ status: response === null || response === void 0 ? void 0 : response.status, ++ statusText: response === null || response === void 0 ? void 0 : response.statusText, ++ }); ++ yield yield __await(new HttpResponse(partialResponse)); + buffer = buffer.slice(match[0].length); + match = buffer.match(responseLineRE); + } +@@ -3665,12 +3638,8 @@ function listFilesResponseFromMldev(apiClient, fromObject) { + } + return toObject; + } +-function createFileResponseFromMldev(apiClient, fromObject) { ++function createFileResponseFromMldev() { + const toObject = {}; +- const fromHttpHeaders = getValueByPath(fromObject, ['httpHeaders']); +- if (fromHttpHeaders != null) { +- setValueByPath(toObject, ['httpHeaders'], fromHttpHeaders); +- } + return toObject; + } + function deleteFileResponseFromMldev() { +@@ -3822,8 +3791,8 @@ class Files extends BaseModule { + .then((httpResponse) => { + return httpResponse.json(); + }); +- return response.then((apiResponse) => { +- const resp = createFileResponseFromMldev(this.apiClient, apiResponse); ++ return response.then(() => { ++ const resp = createFileResponseFromMldev(); + const typedResp = new CreateFileResponse(); + Object.assign(typedResp, resp); + return typedResp; +@@ -3931,7 +3900,7 @@ class Files extends BaseModule { + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +-function partToMldev(apiClient, fromObject) { ++function partToMldev$1(apiClient, fromObject) { + const toObject = {}; + if (getValueByPath(fromObject, ['videoMetadata']) !== undefined) { + throw new Error('videoMetadata parameter is not supported in Gemini API.'); +@@ -3976,13 +3945,61 @@ function partToMldev(apiClient, fromObject) { + } + return toObject; + } +-function contentToMldev(apiClient, fromObject) { ++function partToVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromVideoMetadata = getValueByPath(fromObject, [ ++ 'videoMetadata', ++ ]); ++ if (fromVideoMetadata != null) { ++ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); ++ } ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); ++ } ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', ++ ]); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); ++ } ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', ++ ]); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); ++ } ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); ++ } ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); ++ } ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', ++ ]); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); ++ } ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); ++ } ++ const fromText = getValueByPath(fromObject, ['text']); ++ if (fromText != null) { ++ setValueByPath(toObject, ['text'], fromText); ++ } ++ return toObject; ++} ++function contentToMldev$1(apiClient, fromObject) { + const toObject = {}; + const fromParts = getValueByPath(fromObject, ['parts']); + if (fromParts != null) { + if (Array.isArray(fromParts)) { + setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partToMldev(apiClient, item); ++ return partToMldev$1(apiClient, item); + })); + } + else { +@@ -3995,28 +4012,58 @@ function contentToMldev(apiClient, fromObject) { + } + return toObject; + } +-function schemaToMldev(apiClient, fromObject) { ++function contentToVertex$1(apiClient, fromObject) { + const toObject = {}; +- if (getValueByPath(fromObject, ['example']) !== undefined) { +- throw new Error('example parameter is not supported in Gemini API.'); ++ const fromParts = getValueByPath(fromObject, ['parts']); ++ if (fromParts != null) { ++ if (Array.isArray(fromParts)) { ++ setValueByPath(toObject, ['parts'], fromParts.map((item) => { ++ return partToVertex$1(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['parts'], fromParts); ++ } + } +- if (getValueByPath(fromObject, ['pattern']) !== undefined) { +- throw new Error('pattern parameter is not supported in Gemini API.'); ++ const fromRole = getValueByPath(fromObject, ['role']); ++ if (fromRole != null) { ++ setValueByPath(toObject, ['role'], fromRole); + } +- if (getValueByPath(fromObject, ['default']) !== undefined) { +- throw new Error('default parameter is not supported in Gemini API.'); ++ return toObject; ++} ++function schemaToVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromExample = getValueByPath(fromObject, ['example']); ++ if (fromExample != null) { ++ setValueByPath(toObject, ['example'], fromExample); + } +- if (getValueByPath(fromObject, ['maxLength']) !== undefined) { +- throw new Error('maxLength parameter is not supported in Gemini API.'); ++ const fromPattern = getValueByPath(fromObject, ['pattern']); ++ if (fromPattern != null) { ++ setValueByPath(toObject, ['pattern'], fromPattern); + } +- if (getValueByPath(fromObject, ['minLength']) !== undefined) { +- throw new Error('minLength parameter is not supported in Gemini API.'); ++ const fromDefault = getValueByPath(fromObject, ['default']); ++ if (fromDefault != null) { ++ setValueByPath(toObject, ['default'], fromDefault); + } +- if (getValueByPath(fromObject, ['minProperties']) !== undefined) { +- throw new Error('minProperties parameter is not supported in Gemini API.'); ++ const fromMaxLength = getValueByPath(fromObject, ['maxLength']); ++ if (fromMaxLength != null) { ++ setValueByPath(toObject, ['maxLength'], fromMaxLength); + } +- if (getValueByPath(fromObject, ['maxProperties']) !== undefined) { +- throw new Error('maxProperties parameter is not supported in Gemini API.'); ++ const fromMinLength = getValueByPath(fromObject, ['minLength']); ++ if (fromMinLength != null) { ++ setValueByPath(toObject, ['minLength'], fromMinLength); ++ } ++ const fromMinProperties = getValueByPath(fromObject, [ ++ 'minProperties', ++ ]); ++ if (fromMinProperties != null) { ++ setValueByPath(toObject, ['minProperties'], fromMinProperties); ++ } ++ const fromMaxProperties = getValueByPath(fromObject, [ ++ 'maxProperties', ++ ]); ++ if (fromMaxProperties != null) { ++ setValueByPath(toObject, ['maxProperties'], fromMaxProperties); + } + const fromAnyOf = getValueByPath(fromObject, ['anyOf']); + if (fromAnyOf != null) { +@@ -4082,25 +4129,30 @@ function schemaToMldev(apiClient, fromObject) { + } + return toObject; + } +-function safetySettingToMldev(apiClient, fromObject) { ++function functionDeclarationToMldev$1(apiClient, fromObject) { + const toObject = {}; +- if (getValueByPath(fromObject, ['method']) !== undefined) { +- throw new Error('method parameter is not supported in Gemini API.'); ++ if (getValueByPath(fromObject, ['response']) !== undefined) { ++ throw new Error('response parameter is not supported in Gemini API.'); + } +- const fromCategory = getValueByPath(fromObject, ['category']); +- if (fromCategory != null) { +- setValueByPath(toObject, ['category'], fromCategory); ++ const fromDescription = getValueByPath(fromObject, ['description']); ++ if (fromDescription != null) { ++ setValueByPath(toObject, ['description'], fromDescription); + } +- const fromThreshold = getValueByPath(fromObject, ['threshold']); +- if (fromThreshold != null) { +- setValueByPath(toObject, ['threshold'], fromThreshold); ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); ++ } ++ const fromParameters = getValueByPath(fromObject, ['parameters']); ++ if (fromParameters != null) { ++ setValueByPath(toObject, ['parameters'], fromParameters); + } + return toObject; + } +-function functionDeclarationToMldev(apiClient, fromObject) { ++function functionDeclarationToVertex$1(apiClient, fromObject) { + const toObject = {}; +- if (getValueByPath(fromObject, ['response']) !== undefined) { +- throw new Error('response parameter is not supported in Gemini API.'); ++ const fromResponse = getValueByPath(fromObject, ['response']); ++ if (fromResponse != null) { ++ setValueByPath(toObject, ['response'], schemaToVertex$1(apiClient, fromResponse)); + } + const fromDescription = getValueByPath(fromObject, ['description']); + if (fromDescription != null) { +@@ -4116,11 +4168,15 @@ function functionDeclarationToMldev(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchToMldev() { ++function googleSearchToMldev$1() { + const toObject = {}; + return toObject; + } +-function dynamicRetrievalConfigToMldev(apiClient, fromObject) { ++function googleSearchToVertex$1() { ++ const toObject = {}; ++ return toObject; ++} ++function dynamicRetrievalConfigToMldev$1(apiClient, fromObject) { + const toObject = {}; + const fromMode = getValueByPath(fromObject, ['mode']); + if (fromMode != null) { +@@ -4134,17 +4190,41 @@ function dynamicRetrievalConfigToMldev(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchRetrievalToMldev(apiClient, fromObject) { ++function dynamicRetrievalConfigToVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromMode = getValueByPath(fromObject, ['mode']); ++ if (fromMode != null) { ++ setValueByPath(toObject, ['mode'], fromMode); ++ } ++ const fromDynamicThreshold = getValueByPath(fromObject, [ ++ 'dynamicThreshold', ++ ]); ++ if (fromDynamicThreshold != null) { ++ setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold); ++ } ++ return toObject; ++} ++function googleSearchRetrievalToMldev$1(apiClient, fromObject) { + const toObject = {}; + const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ + 'dynamicRetrievalConfig', + ]); + if (fromDynamicRetrievalConfig != null) { +- setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig)); ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev$1(apiClient, fromDynamicRetrievalConfig)); + } + return toObject; + } +-function toolToMldev(apiClient, fromObject) { ++function googleSearchRetrievalToVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ ++ 'dynamicRetrievalConfig', ++ ]); ++ if (fromDynamicRetrievalConfig != null) { ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$1(apiClient, fromDynamicRetrievalConfig)); ++ } ++ return toObject; ++} ++function toolToMldev$1(apiClient, fromObject) { + const toObject = {}; + const fromFunctionDeclarations = getValueByPath(fromObject, [ + 'functionDeclarations', +@@ -4152,7 +4232,7 @@ function toolToMldev(apiClient, fromObject) { + if (fromFunctionDeclarations != null) { + if (Array.isArray(fromFunctionDeclarations)) { + setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { +- return functionDeclarationToMldev(apiClient, item); ++ return functionDeclarationToMldev$1(apiClient, item); + })); + } + else { +@@ -4164,13 +4244,13 @@ function toolToMldev(apiClient, fromObject) { + } + const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); + if (fromGoogleSearch != null) { +- setValueByPath(toObject, ['googleSearch'], googleSearchToMldev()); ++ setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$1()); + } + const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ + 'googleSearchRetrieval', + ]); + if (fromGoogleSearchRetrieval != null) { +- setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval)); ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev$1(apiClient, fromGoogleSearchRetrieval)); + } + const fromCodeExecution = getValueByPath(fromObject, [ + 'codeExecution', +@@ -4180,547 +4260,1002 @@ function toolToMldev(apiClient, fromObject) { + } + return toObject; + } +-function functionCallingConfigToMldev(apiClient, fromObject) { ++function toolToVertex$1(apiClient, fromObject) { + const toObject = {}; +- const fromMode = getValueByPath(fromObject, ['mode']); +- if (fromMode != null) { +- setValueByPath(toObject, ['mode'], fromMode); ++ const fromFunctionDeclarations = getValueByPath(fromObject, [ ++ 'functionDeclarations', ++ ]); ++ if (fromFunctionDeclarations != null) { ++ if (Array.isArray(fromFunctionDeclarations)) { ++ setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { ++ return functionDeclarationToVertex$1(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations); ++ } + } +- const fromAllowedFunctionNames = getValueByPath(fromObject, [ +- 'allowedFunctionNames', ++ const fromRetrieval = getValueByPath(fromObject, ['retrieval']); ++ if (fromRetrieval != null) { ++ setValueByPath(toObject, ['retrieval'], fromRetrieval); ++ } ++ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); ++ if (fromGoogleSearch != null) { ++ setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$1()); ++ } ++ const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ ++ 'googleSearchRetrieval', + ]); +- if (fromAllowedFunctionNames != null) { +- setValueByPath(toObject, ['allowedFunctionNames'], fromAllowedFunctionNames); ++ if (fromGoogleSearchRetrieval != null) { ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$1(apiClient, fromGoogleSearchRetrieval)); ++ } ++ const fromCodeExecution = getValueByPath(fromObject, [ ++ 'codeExecution', ++ ]); ++ if (fromCodeExecution != null) { ++ setValueByPath(toObject, ['codeExecution'], fromCodeExecution); + } + return toObject; + } +-function toolConfigToMldev(apiClient, fromObject) { ++function sessionResumptionConfigToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromFunctionCallingConfig = getValueByPath(fromObject, [ +- 'functionCallingConfig', +- ]); +- if (fromFunctionCallingConfig != null) { +- setValueByPath(toObject, ['functionCallingConfig'], functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig)); ++ const fromHandle = getValueByPath(fromObject, ['handle']); ++ if (fromHandle != null) { ++ setValueByPath(toObject, ['handle'], fromHandle); ++ } ++ if (getValueByPath(fromObject, ['transparent']) !== undefined) { ++ throw new Error('transparent parameter is not supported in Gemini API.'); + } + return toObject; + } +-function prebuiltVoiceConfigToMldev(apiClient, fromObject) { ++function sessionResumptionConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromVoiceName = getValueByPath(fromObject, ['voiceName']); +- if (fromVoiceName != null) { +- setValueByPath(toObject, ['voiceName'], fromVoiceName); ++ const fromHandle = getValueByPath(fromObject, ['handle']); ++ if (fromHandle != null) { ++ setValueByPath(toObject, ['handle'], fromHandle); ++ } ++ const fromTransparent = getValueByPath(fromObject, ['transparent']); ++ if (fromTransparent != null) { ++ setValueByPath(toObject, ['transparent'], fromTransparent); + } + return toObject; + } +-function voiceConfigToMldev(apiClient, fromObject) { ++function automaticActivityDetectionToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [ +- 'prebuiltVoiceConfig', ++ const fromDisabled = getValueByPath(fromObject, ['disabled']); ++ if (fromDisabled != null) { ++ setValueByPath(toObject, ['disabled'], fromDisabled); ++ } ++ const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [ ++ 'startOfSpeechSensitivity', + ]); +- if (fromPrebuiltVoiceConfig != null) { +- setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToMldev(apiClient, fromPrebuiltVoiceConfig)); ++ if (fromStartOfSpeechSensitivity != null) { ++ setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity); ++ } ++ const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [ ++ 'endOfSpeechSensitivity', ++ ]); ++ if (fromEndOfSpeechSensitivity != null) { ++ setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity); ++ } ++ const fromPrefixPaddingMs = getValueByPath(fromObject, [ ++ 'prefixPaddingMs', ++ ]); ++ if (fromPrefixPaddingMs != null) { ++ setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs); ++ } ++ const fromSilenceDurationMs = getValueByPath(fromObject, [ ++ 'silenceDurationMs', ++ ]); ++ if (fromSilenceDurationMs != null) { ++ setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs); + } + return toObject; + } +-function speechConfigToMldev(apiClient, fromObject) { ++function automaticActivityDetectionToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']); +- if (fromVoiceConfig != null) { +- setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev(apiClient, fromVoiceConfig)); ++ const fromDisabled = getValueByPath(fromObject, ['disabled']); ++ if (fromDisabled != null) { ++ setValueByPath(toObject, ['disabled'], fromDisabled); ++ } ++ const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [ ++ 'startOfSpeechSensitivity', ++ ]); ++ if (fromStartOfSpeechSensitivity != null) { ++ setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity); ++ } ++ const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [ ++ 'endOfSpeechSensitivity', ++ ]); ++ if (fromEndOfSpeechSensitivity != null) { ++ setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity); ++ } ++ const fromPrefixPaddingMs = getValueByPath(fromObject, [ ++ 'prefixPaddingMs', ++ ]); ++ if (fromPrefixPaddingMs != null) { ++ setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs); ++ } ++ const fromSilenceDurationMs = getValueByPath(fromObject, [ ++ 'silenceDurationMs', ++ ]); ++ if (fromSilenceDurationMs != null) { ++ setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs); + } + return toObject; + } +-function thinkingConfigToMldev(apiClient, fromObject) { ++function realtimeInputConfigToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromIncludeThoughts = getValueByPath(fromObject, [ +- 'includeThoughts', ++ const fromAutomaticActivityDetection = getValueByPath(fromObject, [ ++ 'automaticActivityDetection', + ]); +- if (fromIncludeThoughts != null) { +- setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts); ++ if (fromAutomaticActivityDetection != null) { ++ setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToMldev(apiClient, fromAutomaticActivityDetection)); + } +- const fromThinkingBudget = getValueByPath(fromObject, [ +- 'thinkingBudget', ++ const fromActivityHandling = getValueByPath(fromObject, [ ++ 'activityHandling', + ]); +- if (fromThinkingBudget != null) { +- setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget); ++ if (fromActivityHandling != null) { ++ setValueByPath(toObject, ['activityHandling'], fromActivityHandling); ++ } ++ const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']); ++ if (fromTurnCoverage != null) { ++ setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage); + } + return toObject; + } +-function generateContentConfigToMldev(apiClient, fromObject, parentObject) { ++function realtimeInputConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromSystemInstruction = getValueByPath(fromObject, [ +- 'systemInstruction', ++ const fromAutomaticActivityDetection = getValueByPath(fromObject, [ ++ 'automaticActivityDetection', + ]); +- if (parentObject !== undefined && fromSystemInstruction != null) { +- setValueByPath(parentObject, ['systemInstruction'], contentToMldev(apiClient, tContent(apiClient, fromSystemInstruction))); +- } +- const fromTemperature = getValueByPath(fromObject, ['temperature']); +- if (fromTemperature != null) { +- setValueByPath(toObject, ['temperature'], fromTemperature); ++ if (fromAutomaticActivityDetection != null) { ++ setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToVertex(apiClient, fromAutomaticActivityDetection)); + } +- const fromTopP = getValueByPath(fromObject, ['topP']); +- if (fromTopP != null) { +- setValueByPath(toObject, ['topP'], fromTopP); ++ const fromActivityHandling = getValueByPath(fromObject, [ ++ 'activityHandling', ++ ]); ++ if (fromActivityHandling != null) { ++ setValueByPath(toObject, ['activityHandling'], fromActivityHandling); + } +- const fromTopK = getValueByPath(fromObject, ['topK']); +- if (fromTopK != null) { +- setValueByPath(toObject, ['topK'], fromTopK); ++ const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']); ++ if (fromTurnCoverage != null) { ++ setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage); + } +- const fromCandidateCount = getValueByPath(fromObject, [ +- 'candidateCount', +- ]); +- if (fromCandidateCount != null) { +- setValueByPath(toObject, ['candidateCount'], fromCandidateCount); ++ return toObject; ++} ++function slidingWindowToMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']); ++ if (fromTargetTokens != null) { ++ setValueByPath(toObject, ['targetTokens'], fromTargetTokens); + } +- const fromMaxOutputTokens = getValueByPath(fromObject, [ +- 'maxOutputTokens', +- ]); +- if (fromMaxOutputTokens != null) { +- setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens); ++ return toObject; ++} ++function slidingWindowToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']); ++ if (fromTargetTokens != null) { ++ setValueByPath(toObject, ['targetTokens'], fromTargetTokens); + } +- const fromStopSequences = getValueByPath(fromObject, [ +- 'stopSequences', ++ return toObject; ++} ++function contextWindowCompressionConfigToMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTriggerTokens = getValueByPath(fromObject, [ ++ 'triggerTokens', + ]); +- if (fromStopSequences != null) { +- setValueByPath(toObject, ['stopSequences'], fromStopSequences); ++ if (fromTriggerTokens != null) { ++ setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens); + } +- const fromResponseLogprobs = getValueByPath(fromObject, [ +- 'responseLogprobs', ++ const fromSlidingWindow = getValueByPath(fromObject, [ ++ 'slidingWindow', + ]); +- if (fromResponseLogprobs != null) { +- setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs); +- } +- const fromLogprobs = getValueByPath(fromObject, ['logprobs']); +- if (fromLogprobs != null) { +- setValueByPath(toObject, ['logprobs'], fromLogprobs); ++ if (fromSlidingWindow != null) { ++ setValueByPath(toObject, ['slidingWindow'], slidingWindowToMldev(apiClient, fromSlidingWindow)); + } +- const fromPresencePenalty = getValueByPath(fromObject, [ +- 'presencePenalty', ++ return toObject; ++} ++function contextWindowCompressionConfigToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTriggerTokens = getValueByPath(fromObject, [ ++ 'triggerTokens', + ]); +- if (fromPresencePenalty != null) { +- setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty); ++ if (fromTriggerTokens != null) { ++ setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens); + } +- const fromFrequencyPenalty = getValueByPath(fromObject, [ +- 'frequencyPenalty', ++ const fromSlidingWindow = getValueByPath(fromObject, [ ++ 'slidingWindow', + ]); +- if (fromFrequencyPenalty != null) { +- setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty); +- } +- const fromSeed = getValueByPath(fromObject, ['seed']); +- if (fromSeed != null) { +- setValueByPath(toObject, ['seed'], fromSeed); ++ if (fromSlidingWindow != null) { ++ setValueByPath(toObject, ['slidingWindow'], slidingWindowToVertex(apiClient, fromSlidingWindow)); + } +- const fromResponseMimeType = getValueByPath(fromObject, [ +- 'responseMimeType', ++ return toObject; ++} ++function liveConnectConfigToMldev(apiClient, fromObject, parentObject) { ++ const toObject = {}; ++ const fromGenerationConfig = getValueByPath(fromObject, [ ++ 'generationConfig', + ]); +- if (fromResponseMimeType != null) { +- setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType); ++ if (parentObject !== undefined && fromGenerationConfig != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig); + } +- const fromResponseSchema = getValueByPath(fromObject, [ +- 'responseSchema', ++ const fromResponseModalities = getValueByPath(fromObject, [ ++ 'responseModalities', + ]); +- if (fromResponseSchema != null) { +- setValueByPath(toObject, ['responseSchema'], schemaToMldev(apiClient, tSchema(apiClient, fromResponseSchema))); ++ if (parentObject !== undefined && fromResponseModalities != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities); + } +- if (getValueByPath(fromObject, ['routingConfig']) !== undefined) { +- throw new Error('routingConfig parameter is not supported in Gemini API.'); ++ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); ++ if (parentObject !== undefined && fromSpeechConfig != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], fromSpeechConfig); + } +- const fromSafetySettings = getValueByPath(fromObject, [ +- 'safetySettings', ++ const fromSystemInstruction = getValueByPath(fromObject, [ ++ 'systemInstruction', + ]); +- if (parentObject !== undefined && fromSafetySettings != null) { +- if (Array.isArray(fromSafetySettings)) { +- setValueByPath(parentObject, ['safetySettings'], fromSafetySettings.map((item) => { +- return safetySettingToMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(parentObject, ['safetySettings'], fromSafetySettings); +- } ++ if (parentObject !== undefined && fromSystemInstruction != null) { ++ setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToMldev$1(apiClient, tContent(apiClient, fromSystemInstruction))); + } + const fromTools = getValueByPath(fromObject, ['tools']); + if (parentObject !== undefined && fromTools != null) { + if (Array.isArray(fromTools)) { +- setValueByPath(parentObject, ['tools'], tTools(apiClient, tTools(apiClient, fromTools).map((item) => { +- return toolToMldev(apiClient, tTool(apiClient, item)); ++ setValueByPath(parentObject, ['setup', 'tools'], tTools(apiClient, tTools(apiClient, fromTools).map((item) => { ++ return toolToMldev$1(apiClient, tTool(apiClient, item)); + }))); + } + else { +- setValueByPath(parentObject, ['tools'], tTools(apiClient, fromTools)); ++ setValueByPath(parentObject, ['setup', 'tools'], tTools(apiClient, fromTools)); + } + } +- const fromToolConfig = getValueByPath(fromObject, ['toolConfig']); +- if (parentObject !== undefined && fromToolConfig != null) { +- setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev(apiClient, fromToolConfig)); ++ const fromSessionResumption = getValueByPath(fromObject, [ ++ 'sessionResumption', ++ ]); ++ if (parentObject !== undefined && fromSessionResumption != null) { ++ setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToMldev(apiClient, fromSessionResumption)); + } +- if (getValueByPath(fromObject, ['labels']) !== undefined) { +- throw new Error('labels parameter is not supported in Gemini API.'); ++ const fromRealtimeInputConfig = getValueByPath(fromObject, [ ++ 'realtimeInputConfig', ++ ]); ++ if (parentObject !== undefined && fromRealtimeInputConfig != null) { ++ setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToMldev(apiClient, fromRealtimeInputConfig)); + } +- const fromCachedContent = getValueByPath(fromObject, [ +- 'cachedContent', ++ const fromContextWindowCompression = getValueByPath(fromObject, [ ++ 'contextWindowCompression', + ]); +- if (parentObject !== undefined && fromCachedContent != null) { +- setValueByPath(parentObject, ['cachedContent'], tCachedContentName(apiClient, fromCachedContent)); ++ if (parentObject !== undefined && fromContextWindowCompression != null) { ++ setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToMldev(apiClient, fromContextWindowCompression)); + } +- const fromResponseModalities = getValueByPath(fromObject, [ +- 'responseModalities', ++ return toObject; ++} ++function liveConnectConfigToVertex(apiClient, fromObject, parentObject) { ++ const toObject = {}; ++ const fromGenerationConfig = getValueByPath(fromObject, [ ++ 'generationConfig', + ]); +- if (fromResponseModalities != null) { +- setValueByPath(toObject, ['responseModalities'], fromResponseModalities); ++ if (parentObject !== undefined && fromGenerationConfig != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig); + } +- const fromMediaResolution = getValueByPath(fromObject, [ +- 'mediaResolution', ++ const fromResponseModalities = getValueByPath(fromObject, [ ++ 'responseModalities', + ]); +- if (fromMediaResolution != null) { +- setValueByPath(toObject, ['mediaResolution'], fromMediaResolution); ++ if (parentObject !== undefined && fromResponseModalities != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities); + } + const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); +- if (fromSpeechConfig != null) { +- setValueByPath(toObject, ['speechConfig'], speechConfigToMldev(apiClient, tSpeechConfig(apiClient, fromSpeechConfig))); ++ if (parentObject !== undefined && fromSpeechConfig != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], fromSpeechConfig); + } +- if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) { +- throw new Error('audioTimestamp parameter is not supported in Gemini API.'); +- } +- const fromThinkingConfig = getValueByPath(fromObject, [ +- 'thinkingConfig', ++ const fromSystemInstruction = getValueByPath(fromObject, [ ++ 'systemInstruction', + ]); +- if (fromThinkingConfig != null) { +- setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev(apiClient, fromThinkingConfig)); +- } +- return toObject; +-} +-function generateContentParametersToMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); ++ if (parentObject !== undefined && fromSystemInstruction != null) { ++ setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToVertex$1(apiClient, tContent(apiClient, fromSystemInstruction))); + } +- const fromContents = getValueByPath(fromObject, ['contents']); +- if (fromContents != null) { +- if (Array.isArray(fromContents)) { +- setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToMldev(apiClient, item); ++ const fromTools = getValueByPath(fromObject, ['tools']); ++ if (parentObject !== undefined && fromTools != null) { ++ if (Array.isArray(fromTools)) { ++ setValueByPath(parentObject, ['setup', 'tools'], tTools(apiClient, tTools(apiClient, fromTools).map((item) => { ++ return toolToVertex$1(apiClient, tTool(apiClient, item)); + }))); + } + else { +- setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); ++ setValueByPath(parentObject, ['setup', 'tools'], tTools(apiClient, fromTools)); + } + } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['generationConfig'], generateContentConfigToMldev(apiClient, fromConfig, toObject)); +- } +- return toObject; +-} +-function embedContentConfigToMldev(apiClient, fromObject, parentObject) { +- const toObject = {}; +- const fromTaskType = getValueByPath(fromObject, ['taskType']); +- if (parentObject !== undefined && fromTaskType != null) { +- setValueByPath(parentObject, ['requests[]', 'taskType'], fromTaskType); ++ const fromSessionResumption = getValueByPath(fromObject, [ ++ 'sessionResumption', ++ ]); ++ if (parentObject !== undefined && fromSessionResumption != null) { ++ setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToVertex(apiClient, fromSessionResumption)); + } +- const fromTitle = getValueByPath(fromObject, ['title']); +- if (parentObject !== undefined && fromTitle != null) { +- setValueByPath(parentObject, ['requests[]', 'title'], fromTitle); ++ const fromRealtimeInputConfig = getValueByPath(fromObject, [ ++ 'realtimeInputConfig', ++ ]); ++ if (parentObject !== undefined && fromRealtimeInputConfig != null) { ++ setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToVertex(apiClient, fromRealtimeInputConfig)); + } +- const fromOutputDimensionality = getValueByPath(fromObject, [ +- 'outputDimensionality', ++ const fromContextWindowCompression = getValueByPath(fromObject, [ ++ 'contextWindowCompression', + ]); +- if (parentObject !== undefined && fromOutputDimensionality != null) { +- setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality); ++ if (parentObject !== undefined && fromContextWindowCompression != null) { ++ setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToVertex(apiClient, fromContextWindowCompression)); + } +- if (getValueByPath(fromObject, ['mimeType']) !== undefined) { +- throw new Error('mimeType parameter is not supported in Gemini API.'); ++ return toObject; ++} ++function liveConnectParametersToMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel)); + } +- if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) { +- throw new Error('autoTruncate parameter is not supported in Gemini API.'); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], liveConnectConfigToMldev(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function embedContentParametersToMldev(apiClient, fromObject) { ++function liveConnectParametersToVertex(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); +- } +- const fromContents = getValueByPath(fromObject, ['contents']); +- if (fromContents != null) { +- setValueByPath(toObject, ['requests[]', 'content'], tContentsForEmbed(apiClient, fromContents)); ++ setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel)); + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['config'], embedContentConfigToMldev(apiClient, fromConfig, toObject)); +- } +- const fromModelForEmbedContent = getValueByPath(fromObject, ['model']); +- if (fromModelForEmbedContent !== undefined) { +- setValueByPath(toObject, ['requests[]', 'model'], tModel(apiClient, fromModelForEmbedContent)); ++ setValueByPath(toObject, ['config'], liveConnectConfigToVertex(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function generateImagesConfigToMldev(apiClient, fromObject, parentObject) { ++function liveServerSetupCompleteFromMldev() { + const toObject = {}; +- if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) { +- throw new Error('outputGcsUri parameter is not supported in Gemini API.'); ++ return toObject; ++} ++function liveServerSetupCompleteFromVertex() { ++ const toObject = {}; ++ return toObject; ++} ++function partFromMldev$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); + } +- if (getValueByPath(fromObject, ['negativePrompt']) !== undefined) { +- throw new Error('negativePrompt parameter is not supported in Gemini API.'); ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', ++ ]); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); + } +- const fromNumberOfImages = getValueByPath(fromObject, [ +- 'numberOfImages', ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', + ]); +- if (parentObject !== undefined && fromNumberOfImages != null) { +- setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfImages); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); + } +- const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']); +- if (parentObject !== undefined && fromAspectRatio != null) { +- setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio); ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); + } +- const fromGuidanceScale = getValueByPath(fromObject, [ +- 'guidanceScale', ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); ++ } ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', + ]); +- if (parentObject !== undefined && fromGuidanceScale != null) { +- setValueByPath(parentObject, ['parameters', 'guidanceScale'], fromGuidanceScale); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); + } +- if (getValueByPath(fromObject, ['seed']) !== undefined) { +- throw new Error('seed parameter is not supported in Gemini API.'); ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); + } +- const fromSafetyFilterLevel = getValueByPath(fromObject, [ +- 'safetyFilterLevel', +- ]); +- if (parentObject !== undefined && fromSafetyFilterLevel != null) { +- setValueByPath(parentObject, ['parameters', 'safetySetting'], fromSafetyFilterLevel); ++ const fromText = getValueByPath(fromObject, ['text']); ++ if (fromText != null) { ++ setValueByPath(toObject, ['text'], fromText); + } +- const fromPersonGeneration = getValueByPath(fromObject, [ +- 'personGeneration', ++ return toObject; ++} ++function partFromVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromVideoMetadata = getValueByPath(fromObject, [ ++ 'videoMetadata', + ]); +- if (parentObject !== undefined && fromPersonGeneration != null) { +- setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration); ++ if (fromVideoMetadata != null) { ++ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); + } +- const fromIncludeSafetyAttributes = getValueByPath(fromObject, [ +- 'includeSafetyAttributes', ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); ++ } ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', + ]); +- if (parentObject !== undefined && fromIncludeSafetyAttributes != null) { +- setValueByPath(parentObject, ['parameters', 'includeSafetyAttributes'], fromIncludeSafetyAttributes); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); + } +- const fromIncludeRaiReason = getValueByPath(fromObject, [ +- 'includeRaiReason', ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', + ]); +- if (parentObject !== undefined && fromIncludeRaiReason != null) { +- setValueByPath(parentObject, ['parameters', 'includeRaiReason'], fromIncludeRaiReason); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); + } +- const fromLanguage = getValueByPath(fromObject, ['language']); +- if (parentObject !== undefined && fromLanguage != null) { +- setValueByPath(parentObject, ['parameters', 'language'], fromLanguage); ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); + } +- const fromOutputMimeType = getValueByPath(fromObject, [ +- 'outputMimeType', +- ]); +- if (parentObject !== undefined && fromOutputMimeType != null) { +- setValueByPath(parentObject, ['parameters', 'outputOptions', 'mimeType'], fromOutputMimeType); ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); + } +- const fromOutputCompressionQuality = getValueByPath(fromObject, [ +- 'outputCompressionQuality', ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', + ]); +- if (parentObject !== undefined && fromOutputCompressionQuality != null) { +- setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); + } +- if (getValueByPath(fromObject, ['addWatermark']) !== undefined) { +- throw new Error('addWatermark parameter is not supported in Gemini API.'); ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); + } +- if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) { +- throw new Error('enhancePrompt parameter is not supported in Gemini API.'); ++ const fromText = getValueByPath(fromObject, ['text']); ++ if (fromText != null) { ++ setValueByPath(toObject, ['text'], fromText); + } + return toObject; + } +-function generateImagesParametersToMldev(apiClient, fromObject) { ++function contentFromMldev$1(apiClient, fromObject) { + const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); +- } +- const fromPrompt = getValueByPath(fromObject, ['prompt']); +- if (fromPrompt != null) { +- setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt); ++ const fromParts = getValueByPath(fromObject, ['parts']); ++ if (fromParts != null) { ++ if (Array.isArray(fromParts)) { ++ setValueByPath(toObject, ['parts'], fromParts.map((item) => { ++ return partFromMldev$1(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['parts'], fromParts); ++ } + } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['config'], generateImagesConfigToMldev(apiClient, fromConfig, toObject)); ++ const fromRole = getValueByPath(fromObject, ['role']); ++ if (fromRole != null) { ++ setValueByPath(toObject, ['role'], fromRole); + } + return toObject; + } +-function getModelParametersToMldev(apiClient, fromObject) { ++function contentFromVertex$1(apiClient, fromObject) { + const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'name'], tModel(apiClient, fromModel)); ++ const fromParts = getValueByPath(fromObject, ['parts']); ++ if (fromParts != null) { ++ if (Array.isArray(fromParts)) { ++ setValueByPath(toObject, ['parts'], fromParts.map((item) => { ++ return partFromVertex$1(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['parts'], fromParts); ++ } + } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['config'], fromConfig); ++ const fromRole = getValueByPath(fromObject, ['role']); ++ if (fromRole != null) { ++ setValueByPath(toObject, ['role'], fromRole); + } + return toObject; + } +-function countTokensConfigToMldev(apiClient, fromObject) { ++function liveServerContentFromMldev(apiClient, fromObject) { + const toObject = {}; +- if (getValueByPath(fromObject, ['systemInstruction']) !== undefined) { +- throw new Error('systemInstruction parameter is not supported in Gemini API.'); ++ const fromModelTurn = getValueByPath(fromObject, ['modelTurn']); ++ if (fromModelTurn != null) { ++ setValueByPath(toObject, ['modelTurn'], contentFromMldev$1(apiClient, fromModelTurn)); + } +- if (getValueByPath(fromObject, ['tools']) !== undefined) { +- throw new Error('tools parameter is not supported in Gemini API.'); ++ const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']); ++ if (fromTurnComplete != null) { ++ setValueByPath(toObject, ['turnComplete'], fromTurnComplete); + } +- if (getValueByPath(fromObject, ['generationConfig']) !== undefined) { +- throw new Error('generationConfig parameter is not supported in Gemini API.'); ++ const fromInterrupted = getValueByPath(fromObject, ['interrupted']); ++ if (fromInterrupted != null) { ++ setValueByPath(toObject, ['interrupted'], fromInterrupted); ++ } ++ const fromGenerationComplete = getValueByPath(fromObject, [ ++ 'generationComplete', ++ ]); ++ if (fromGenerationComplete != null) { ++ setValueByPath(toObject, ['generationComplete'], fromGenerationComplete); + } + return toObject; + } +-function countTokensParametersToMldev(apiClient, fromObject) { ++function liveServerContentFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); ++ const fromModelTurn = getValueByPath(fromObject, ['modelTurn']); ++ if (fromModelTurn != null) { ++ setValueByPath(toObject, ['modelTurn'], contentFromVertex$1(apiClient, fromModelTurn)); + } +- const fromContents = getValueByPath(fromObject, ['contents']); +- if (fromContents != null) { +- if (Array.isArray(fromContents)) { +- setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToMldev(apiClient, item); +- }))); +- } +- else { +- setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); +- } ++ const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']); ++ if (fromTurnComplete != null) { ++ setValueByPath(toObject, ['turnComplete'], fromTurnComplete); + } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['config'], countTokensConfigToMldev(apiClient, fromConfig)); ++ const fromInterrupted = getValueByPath(fromObject, ['interrupted']); ++ if (fromInterrupted != null) { ++ setValueByPath(toObject, ['interrupted'], fromInterrupted); ++ } ++ const fromGenerationComplete = getValueByPath(fromObject, [ ++ 'generationComplete', ++ ]); ++ if (fromGenerationComplete != null) { ++ setValueByPath(toObject, ['generationComplete'], fromGenerationComplete); + } + return toObject; + } +-function imageToMldev(apiClient, fromObject) { ++function functionCallFromMldev(apiClient, fromObject) { + const toObject = {}; +- if (getValueByPath(fromObject, ['gcsUri']) !== undefined) { +- throw new Error('gcsUri parameter is not supported in Gemini API.'); ++ const fromId = getValueByPath(fromObject, ['id']); ++ if (fromId != null) { ++ setValueByPath(toObject, ['id'], fromId); + } +- const fromImageBytes = getValueByPath(fromObject, ['imageBytes']); +- if (fromImageBytes != null) { +- setValueByPath(toObject, ['bytesBase64Encoded'], tBytes(apiClient, fromImageBytes)); ++ const fromArgs = getValueByPath(fromObject, ['args']); ++ if (fromArgs != null) { ++ setValueByPath(toObject, ['args'], fromArgs); + } +- const fromMimeType = getValueByPath(fromObject, ['mimeType']); +- if (fromMimeType != null) { +- setValueByPath(toObject, ['mimeType'], fromMimeType); ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); + } + return toObject; + } +-function generateVideosConfigToMldev(apiClient, fromObject, parentObject) { ++function functionCallFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromNumberOfVideos = getValueByPath(fromObject, [ +- 'numberOfVideos', +- ]); +- if (parentObject !== undefined && fromNumberOfVideos != null) { +- setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfVideos); +- } +- if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) { +- throw new Error('outputGcsUri parameter is not supported in Gemini API.'); ++ const fromArgs = getValueByPath(fromObject, ['args']); ++ if (fromArgs != null) { ++ setValueByPath(toObject, ['args'], fromArgs); + } +- if (getValueByPath(fromObject, ['fps']) !== undefined) { +- throw new Error('fps parameter is not supported in Gemini API.'); ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); + } +- const fromDurationSeconds = getValueByPath(fromObject, [ +- 'durationSeconds', ++ return toObject; ++} ++function liveServerToolCallFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromFunctionCalls = getValueByPath(fromObject, [ ++ 'functionCalls', + ]); +- if (parentObject !== undefined && fromDurationSeconds != null) { +- setValueByPath(parentObject, ['parameters', 'durationSeconds'], fromDurationSeconds); +- } +- if (getValueByPath(fromObject, ['seed']) !== undefined) { +- throw new Error('seed parameter is not supported in Gemini API.'); +- } +- const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']); +- if (parentObject !== undefined && fromAspectRatio != null) { +- setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio); +- } +- if (getValueByPath(fromObject, ['resolution']) !== undefined) { +- throw new Error('resolution parameter is not supported in Gemini API.'); ++ if (fromFunctionCalls != null) { ++ if (Array.isArray(fromFunctionCalls)) { ++ setValueByPath(toObject, ['functionCalls'], fromFunctionCalls.map((item) => { ++ return functionCallFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['functionCalls'], fromFunctionCalls); ++ } + } +- const fromPersonGeneration = getValueByPath(fromObject, [ +- 'personGeneration', ++ return toObject; ++} ++function liveServerToolCallFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromFunctionCalls = getValueByPath(fromObject, [ ++ 'functionCalls', + ]); +- if (parentObject !== undefined && fromPersonGeneration != null) { +- setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration); +- } +- if (getValueByPath(fromObject, ['pubsubTopic']) !== undefined) { +- throw new Error('pubsubTopic parameter is not supported in Gemini API.'); ++ if (fromFunctionCalls != null) { ++ if (Array.isArray(fromFunctionCalls)) { ++ setValueByPath(toObject, ['functionCalls'], fromFunctionCalls.map((item) => { ++ return functionCallFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['functionCalls'], fromFunctionCalls); ++ } + } +- const fromNegativePrompt = getValueByPath(fromObject, [ +- 'negativePrompt', +- ]); +- if (parentObject !== undefined && fromNegativePrompt != null) { +- setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt); ++ return toObject; ++} ++function liveServerToolCallCancellationFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromIds = getValueByPath(fromObject, ['ids']); ++ if (fromIds != null) { ++ setValueByPath(toObject, ['ids'], fromIds); + } +- if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) { +- throw new Error('enhancePrompt parameter is not supported in Gemini API.'); ++ return toObject; ++} ++function liveServerToolCallCancellationFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromIds = getValueByPath(fromObject, ['ids']); ++ if (fromIds != null) { ++ setValueByPath(toObject, ['ids'], fromIds); + } + return toObject; + } +-function generateVideosParametersToMldev(apiClient, fromObject) { ++function modalityTokenCountFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); ++ const fromModality = getValueByPath(fromObject, ['modality']); ++ if (fromModality != null) { ++ setValueByPath(toObject, ['modality'], fromModality); + } +- const fromPrompt = getValueByPath(fromObject, ['prompt']); +- if (fromPrompt != null) { +- setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt); ++ const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); ++ if (fromTokenCount != null) { ++ setValueByPath(toObject, ['tokenCount'], fromTokenCount); + } +- const fromImage = getValueByPath(fromObject, ['image']); +- if (fromImage != null) { +- setValueByPath(toObject, ['instances[0]', 'image'], imageToMldev(apiClient, fromImage)); ++ return toObject; ++} ++function modalityTokenCountFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromModality = getValueByPath(fromObject, ['modality']); ++ if (fromModality != null) { ++ setValueByPath(toObject, ['modality'], fromModality); + } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['config'], generateVideosConfigToMldev(apiClient, fromConfig, toObject)); ++ const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); ++ if (fromTokenCount != null) { ++ setValueByPath(toObject, ['tokenCount'], fromTokenCount); + } + return toObject; + } +-function partToVertex(apiClient, fromObject) { ++function usageMetadataFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromVideoMetadata = getValueByPath(fromObject, [ +- 'videoMetadata', ++ const fromPromptTokenCount = getValueByPath(fromObject, [ ++ 'promptTokenCount', + ]); +- if (fromVideoMetadata != null) { +- setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); ++ if (fromPromptTokenCount != null) { ++ setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount); + } +- const fromThought = getValueByPath(fromObject, ['thought']); +- if (fromThought != null) { +- setValueByPath(toObject, ['thought'], fromThought); ++ const fromCachedContentTokenCount = getValueByPath(fromObject, [ ++ 'cachedContentTokenCount', ++ ]); ++ if (fromCachedContentTokenCount != null) { ++ setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); + } +- const fromCodeExecutionResult = getValueByPath(fromObject, [ +- 'codeExecutionResult', ++ const fromResponseTokenCount = getValueByPath(fromObject, [ ++ 'responseTokenCount', + ]); +- if (fromCodeExecutionResult != null) { +- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); ++ if (fromResponseTokenCount != null) { ++ setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount); + } +- const fromExecutableCode = getValueByPath(fromObject, [ +- 'executableCode', ++ const fromToolUsePromptTokenCount = getValueByPath(fromObject, [ ++ 'toolUsePromptTokenCount', + ]); +- if (fromExecutableCode != null) { +- setValueByPath(toObject, ['executableCode'], fromExecutableCode); ++ if (fromToolUsePromptTokenCount != null) { ++ setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount); + } +- const fromFileData = getValueByPath(fromObject, ['fileData']); +- if (fromFileData != null) { +- setValueByPath(toObject, ['fileData'], fromFileData); ++ const fromThoughtsTokenCount = getValueByPath(fromObject, [ ++ 'thoughtsTokenCount', ++ ]); ++ if (fromThoughtsTokenCount != null) { ++ setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount); + } +- const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); +- if (fromFunctionCall != null) { +- setValueByPath(toObject, ['functionCall'], fromFunctionCall); ++ const fromTotalTokenCount = getValueByPath(fromObject, [ ++ 'totalTokenCount', ++ ]); ++ if (fromTotalTokenCount != null) { ++ setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount); + } +- const fromFunctionResponse = getValueByPath(fromObject, [ +- 'functionResponse', ++ const fromPromptTokensDetails = getValueByPath(fromObject, [ ++ 'promptTokensDetails', + ]); +- if (fromFunctionResponse != null) { +- setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); ++ if (fromPromptTokensDetails != null) { ++ if (Array.isArray(fromPromptTokensDetails)) { ++ setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails.map((item) => { ++ return modalityTokenCountFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails); ++ } + } +- const fromInlineData = getValueByPath(fromObject, ['inlineData']); +- if (fromInlineData != null) { +- setValueByPath(toObject, ['inlineData'], fromInlineData); ++ const fromCacheTokensDetails = getValueByPath(fromObject, [ ++ 'cacheTokensDetails', ++ ]); ++ if (fromCacheTokensDetails != null) { ++ if (Array.isArray(fromCacheTokensDetails)) { ++ setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails.map((item) => { ++ return modalityTokenCountFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails); ++ } ++ } ++ const fromResponseTokensDetails = getValueByPath(fromObject, [ ++ 'responseTokensDetails', ++ ]); ++ if (fromResponseTokensDetails != null) { ++ if (Array.isArray(fromResponseTokensDetails)) { ++ setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails.map((item) => { ++ return modalityTokenCountFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails); ++ } ++ } ++ const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [ ++ 'toolUsePromptTokensDetails', ++ ]); ++ if (fromToolUsePromptTokensDetails != null) { ++ if (Array.isArray(fromToolUsePromptTokensDetails)) { ++ setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails.map((item) => { ++ return modalityTokenCountFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails); ++ } ++ } ++ return toObject; ++} ++function usageMetadataFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromPromptTokenCount = getValueByPath(fromObject, [ ++ 'promptTokenCount', ++ ]); ++ if (fromPromptTokenCount != null) { ++ setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount); ++ } ++ const fromCachedContentTokenCount = getValueByPath(fromObject, [ ++ 'cachedContentTokenCount', ++ ]); ++ if (fromCachedContentTokenCount != null) { ++ setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); ++ } ++ const fromResponseTokenCount = getValueByPath(fromObject, [ ++ 'candidatesTokenCount', ++ ]); ++ if (fromResponseTokenCount != null) { ++ setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount); ++ } ++ const fromToolUsePromptTokenCount = getValueByPath(fromObject, [ ++ 'toolUsePromptTokenCount', ++ ]); ++ if (fromToolUsePromptTokenCount != null) { ++ setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount); ++ } ++ const fromThoughtsTokenCount = getValueByPath(fromObject, [ ++ 'thoughtsTokenCount', ++ ]); ++ if (fromThoughtsTokenCount != null) { ++ setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount); ++ } ++ const fromTotalTokenCount = getValueByPath(fromObject, [ ++ 'totalTokenCount', ++ ]); ++ if (fromTotalTokenCount != null) { ++ setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount); ++ } ++ const fromPromptTokensDetails = getValueByPath(fromObject, [ ++ 'promptTokensDetails', ++ ]); ++ if (fromPromptTokensDetails != null) { ++ if (Array.isArray(fromPromptTokensDetails)) { ++ setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails.map((item) => { ++ return modalityTokenCountFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails); ++ } ++ } ++ const fromCacheTokensDetails = getValueByPath(fromObject, [ ++ 'cacheTokensDetails', ++ ]); ++ if (fromCacheTokensDetails != null) { ++ if (Array.isArray(fromCacheTokensDetails)) { ++ setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails.map((item) => { ++ return modalityTokenCountFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails); ++ } ++ } ++ const fromResponseTokensDetails = getValueByPath(fromObject, [ ++ 'candidatesTokensDetails', ++ ]); ++ if (fromResponseTokensDetails != null) { ++ if (Array.isArray(fromResponseTokensDetails)) { ++ setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails.map((item) => { ++ return modalityTokenCountFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails); ++ } ++ } ++ const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [ ++ 'toolUsePromptTokensDetails', ++ ]); ++ if (fromToolUsePromptTokensDetails != null) { ++ if (Array.isArray(fromToolUsePromptTokensDetails)) { ++ setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails.map((item) => { ++ return modalityTokenCountFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails); ++ } ++ } ++ const fromTrafficType = getValueByPath(fromObject, ['trafficType']); ++ if (fromTrafficType != null) { ++ setValueByPath(toObject, ['trafficType'], fromTrafficType); ++ } ++ return toObject; ++} ++function liveServerGoAwayFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']); ++ if (fromTimeLeft != null) { ++ setValueByPath(toObject, ['timeLeft'], fromTimeLeft); ++ } ++ return toObject; ++} ++function liveServerGoAwayFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']); ++ if (fromTimeLeft != null) { ++ setValueByPath(toObject, ['timeLeft'], fromTimeLeft); ++ } ++ return toObject; ++} ++function liveServerSessionResumptionUpdateFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromNewHandle = getValueByPath(fromObject, ['newHandle']); ++ if (fromNewHandle != null) { ++ setValueByPath(toObject, ['newHandle'], fromNewHandle); ++ } ++ const fromResumable = getValueByPath(fromObject, ['resumable']); ++ if (fromResumable != null) { ++ setValueByPath(toObject, ['resumable'], fromResumable); ++ } ++ const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [ ++ 'lastConsumedClientMessageIndex', ++ ]); ++ if (fromLastConsumedClientMessageIndex != null) { ++ setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex); ++ } ++ return toObject; ++} ++function liveServerSessionResumptionUpdateFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromNewHandle = getValueByPath(fromObject, ['newHandle']); ++ if (fromNewHandle != null) { ++ setValueByPath(toObject, ['newHandle'], fromNewHandle); ++ } ++ const fromResumable = getValueByPath(fromObject, ['resumable']); ++ if (fromResumable != null) { ++ setValueByPath(toObject, ['resumable'], fromResumable); ++ } ++ const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [ ++ 'lastConsumedClientMessageIndex', ++ ]); ++ if (fromLastConsumedClientMessageIndex != null) { ++ setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex); ++ } ++ return toObject; ++} ++function liveServerMessageFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromSetupComplete = getValueByPath(fromObject, [ ++ 'setupComplete', ++ ]); ++ if (fromSetupComplete != null) { ++ setValueByPath(toObject, ['setupComplete'], liveServerSetupCompleteFromMldev()); ++ } ++ const fromServerContent = getValueByPath(fromObject, [ ++ 'serverContent', ++ ]); ++ if (fromServerContent != null) { ++ setValueByPath(toObject, ['serverContent'], liveServerContentFromMldev(apiClient, fromServerContent)); ++ } ++ const fromToolCall = getValueByPath(fromObject, ['toolCall']); ++ if (fromToolCall != null) { ++ setValueByPath(toObject, ['toolCall'], liveServerToolCallFromMldev(apiClient, fromToolCall)); ++ } ++ const fromToolCallCancellation = getValueByPath(fromObject, [ ++ 'toolCallCancellation', ++ ]); ++ if (fromToolCallCancellation != null) { ++ setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromMldev(apiClient, fromToolCallCancellation)); ++ } ++ const fromUsageMetadata = getValueByPath(fromObject, [ ++ 'usageMetadata', ++ ]); ++ if (fromUsageMetadata != null) { ++ setValueByPath(toObject, ['usageMetadata'], usageMetadataFromMldev(apiClient, fromUsageMetadata)); ++ } ++ const fromGoAway = getValueByPath(fromObject, ['goAway']); ++ if (fromGoAway != null) { ++ setValueByPath(toObject, ['goAway'], liveServerGoAwayFromMldev(apiClient, fromGoAway)); ++ } ++ const fromSessionResumptionUpdate = getValueByPath(fromObject, [ ++ 'sessionResumptionUpdate', ++ ]); ++ if (fromSessionResumptionUpdate != null) { ++ setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromMldev(apiClient, fromSessionResumptionUpdate)); ++ } ++ return toObject; ++} ++function liveServerMessageFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromSetupComplete = getValueByPath(fromObject, [ ++ 'setupComplete', ++ ]); ++ if (fromSetupComplete != null) { ++ setValueByPath(toObject, ['setupComplete'], liveServerSetupCompleteFromVertex()); ++ } ++ const fromServerContent = getValueByPath(fromObject, [ ++ 'serverContent', ++ ]); ++ if (fromServerContent != null) { ++ setValueByPath(toObject, ['serverContent'], liveServerContentFromVertex(apiClient, fromServerContent)); ++ } ++ const fromToolCall = getValueByPath(fromObject, ['toolCall']); ++ if (fromToolCall != null) { ++ setValueByPath(toObject, ['toolCall'], liveServerToolCallFromVertex(apiClient, fromToolCall)); ++ } ++ const fromToolCallCancellation = getValueByPath(fromObject, [ ++ 'toolCallCancellation', ++ ]); ++ if (fromToolCallCancellation != null) { ++ setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromVertex(apiClient, fromToolCallCancellation)); ++ } ++ const fromUsageMetadata = getValueByPath(fromObject, [ ++ 'usageMetadata', ++ ]); ++ if (fromUsageMetadata != null) { ++ setValueByPath(toObject, ['usageMetadata'], usageMetadataFromVertex(apiClient, fromUsageMetadata)); ++ } ++ const fromGoAway = getValueByPath(fromObject, ['goAway']); ++ if (fromGoAway != null) { ++ setValueByPath(toObject, ['goAway'], liveServerGoAwayFromVertex(apiClient, fromGoAway)); ++ } ++ const fromSessionResumptionUpdate = getValueByPath(fromObject, [ ++ 'sessionResumptionUpdate', ++ ]); ++ if (fromSessionResumptionUpdate != null) { ++ setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromVertex(apiClient, fromSessionResumptionUpdate)); ++ } ++ return toObject; ++} ++ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++function partToMldev(apiClient, fromObject) { ++ const toObject = {}; ++ if (getValueByPath(fromObject, ['videoMetadata']) !== undefined) { ++ throw new Error('videoMetadata parameter is not supported in Gemini API.'); ++ } ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); ++ } ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', ++ ]); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); ++ } ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', ++ ]); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); ++ } ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); ++ } ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); ++ } ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', ++ ]); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); ++ } ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); + } + const fromText = getValueByPath(fromObject, ['text']); + if (fromText != null) { +@@ -4728,13 +5263,13 @@ function partToVertex(apiClient, fromObject) { + } + return toObject; + } +-function contentToVertex(apiClient, fromObject) { ++function contentToMldev(apiClient, fromObject) { + const toObject = {}; + const fromParts = getValueByPath(fromObject, ['parts']); + if (fromParts != null) { + if (Array.isArray(fromParts)) { + setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partToVertex(apiClient, item); ++ return partToMldev(apiClient, item); + })); + } + else { +@@ -4747,39 +5282,28 @@ function contentToVertex(apiClient, fromObject) { + } + return toObject; + } +-function schemaToVertex(apiClient, fromObject) { ++function schemaToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromExample = getValueByPath(fromObject, ['example']); +- if (fromExample != null) { +- setValueByPath(toObject, ['example'], fromExample); ++ if (getValueByPath(fromObject, ['example']) !== undefined) { ++ throw new Error('example parameter is not supported in Gemini API.'); + } +- const fromPattern = getValueByPath(fromObject, ['pattern']); +- if (fromPattern != null) { +- setValueByPath(toObject, ['pattern'], fromPattern); ++ if (getValueByPath(fromObject, ['pattern']) !== undefined) { ++ throw new Error('pattern parameter is not supported in Gemini API.'); + } +- const fromDefault = getValueByPath(fromObject, ['default']); +- if (fromDefault != null) { +- setValueByPath(toObject, ['default'], fromDefault); ++ if (getValueByPath(fromObject, ['default']) !== undefined) { ++ throw new Error('default parameter is not supported in Gemini API.'); + } +- const fromMaxLength = getValueByPath(fromObject, ['maxLength']); +- if (fromMaxLength != null) { +- setValueByPath(toObject, ['maxLength'], fromMaxLength); ++ if (getValueByPath(fromObject, ['maxLength']) !== undefined) { ++ throw new Error('maxLength parameter is not supported in Gemini API.'); + } +- const fromMinLength = getValueByPath(fromObject, ['minLength']); +- if (fromMinLength != null) { +- setValueByPath(toObject, ['minLength'], fromMinLength); ++ if (getValueByPath(fromObject, ['minLength']) !== undefined) { ++ throw new Error('minLength parameter is not supported in Gemini API.'); + } +- const fromMinProperties = getValueByPath(fromObject, [ +- 'minProperties', +- ]); +- if (fromMinProperties != null) { +- setValueByPath(toObject, ['minProperties'], fromMinProperties); ++ if (getValueByPath(fromObject, ['minProperties']) !== undefined) { ++ throw new Error('minProperties parameter is not supported in Gemini API.'); + } +- const fromMaxProperties = getValueByPath(fromObject, [ +- 'maxProperties', +- ]); +- if (fromMaxProperties != null) { +- setValueByPath(toObject, ['maxProperties'], fromMaxProperties); ++ if (getValueByPath(fromObject, ['maxProperties']) !== undefined) { ++ throw new Error('maxProperties parameter is not supported in Gemini API.'); + } + const fromAnyOf = getValueByPath(fromObject, ['anyOf']); + if (fromAnyOf != null) { +@@ -4845,11 +5369,10 @@ function schemaToVertex(apiClient, fromObject) { + } + return toObject; + } +-function safetySettingToVertex(apiClient, fromObject) { ++function safetySettingToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromMethod = getValueByPath(fromObject, ['method']); +- if (fromMethod != null) { +- setValueByPath(toObject, ['method'], fromMethod); ++ if (getValueByPath(fromObject, ['method']) !== undefined) { ++ throw new Error('method parameter is not supported in Gemini API.'); + } + const fromCategory = getValueByPath(fromObject, ['category']); + if (fromCategory != null) { +@@ -4861,11 +5384,10 @@ function safetySettingToVertex(apiClient, fromObject) { + } + return toObject; + } +-function functionDeclarationToVertex(apiClient, fromObject) { ++function functionDeclarationToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromResponse = getValueByPath(fromObject, ['response']); +- if (fromResponse != null) { +- setValueByPath(toObject, ['response'], schemaToVertex(apiClient, fromResponse)); ++ if (getValueByPath(fromObject, ['response']) !== undefined) { ++ throw new Error('response parameter is not supported in Gemini API.'); + } + const fromDescription = getValueByPath(fromObject, ['description']); + if (fromDescription != null) { +@@ -4881,11 +5403,11 @@ function functionDeclarationToVertex(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchToVertex() { ++function googleSearchToMldev() { + const toObject = {}; + return toObject; + } +-function dynamicRetrievalConfigToVertex(apiClient, fromObject) { ++function dynamicRetrievalConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromMode = getValueByPath(fromObject, ['mode']); + if (fromMode != null) { +@@ -4899,17 +5421,17 @@ function dynamicRetrievalConfigToVertex(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchRetrievalToVertex(apiClient, fromObject) { ++function googleSearchRetrievalToMldev(apiClient, fromObject) { + const toObject = {}; + const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ + 'dynamicRetrievalConfig', + ]); + if (fromDynamicRetrievalConfig != null) { +- setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig)); ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig)); + } + return toObject; + } +-function toolToVertex(apiClient, fromObject) { ++function toolToMldev(apiClient, fromObject) { + const toObject = {}; + const fromFunctionDeclarations = getValueByPath(fromObject, [ + 'functionDeclarations', +@@ -4917,26 +5439,25 @@ function toolToVertex(apiClient, fromObject) { + if (fromFunctionDeclarations != null) { + if (Array.isArray(fromFunctionDeclarations)) { + setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { +- return functionDeclarationToVertex(apiClient, item); ++ return functionDeclarationToMldev(apiClient, item); + })); + } + else { + setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations); + } + } +- const fromRetrieval = getValueByPath(fromObject, ['retrieval']); +- if (fromRetrieval != null) { +- setValueByPath(toObject, ['retrieval'], fromRetrieval); ++ if (getValueByPath(fromObject, ['retrieval']) !== undefined) { ++ throw new Error('retrieval parameter is not supported in Gemini API.'); + } + const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); + if (fromGoogleSearch != null) { +- setValueByPath(toObject, ['googleSearch'], googleSearchToVertex()); ++ setValueByPath(toObject, ['googleSearch'], googleSearchToMldev()); + } + const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ + 'googleSearchRetrieval', + ]); + if (fromGoogleSearchRetrieval != null) { +- setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval)); ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval)); + } + const fromCodeExecution = getValueByPath(fromObject, [ + 'codeExecution', +@@ -4946,7 +5467,7 @@ function toolToVertex(apiClient, fromObject) { + } + return toObject; + } +-function functionCallingConfigToVertex(apiClient, fromObject) { ++function functionCallingConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromMode = getValueByPath(fromObject, ['mode']); + if (fromMode != null) { +@@ -4960,17 +5481,17 @@ function functionCallingConfigToVertex(apiClient, fromObject) { + } + return toObject; + } +-function toolConfigToVertex(apiClient, fromObject) { ++function toolConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromFunctionCallingConfig = getValueByPath(fromObject, [ + 'functionCallingConfig', + ]); + if (fromFunctionCallingConfig != null) { +- setValueByPath(toObject, ['functionCallingConfig'], functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig)); ++ setValueByPath(toObject, ['functionCallingConfig'], functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig)); + } + return toObject; + } +-function prebuiltVoiceConfigToVertex(apiClient, fromObject) { ++function prebuiltVoiceConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromVoiceName = getValueByPath(fromObject, ['voiceName']); + if (fromVoiceName != null) { +@@ -4978,25 +5499,29 @@ function prebuiltVoiceConfigToVertex(apiClient, fromObject) { + } + return toObject; + } +-function voiceConfigToVertex(apiClient, fromObject) { ++function voiceConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [ + 'prebuiltVoiceConfig', + ]); + if (fromPrebuiltVoiceConfig != null) { +- setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToVertex(apiClient, fromPrebuiltVoiceConfig)); ++ setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToMldev(apiClient, fromPrebuiltVoiceConfig)); + } + return toObject; + } +-function speechConfigToVertex(apiClient, fromObject) { ++function speechConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']); + if (fromVoiceConfig != null) { +- setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(apiClient, fromVoiceConfig)); ++ setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev(apiClient, fromVoiceConfig)); ++ } ++ const fromLanguageCode = getValueByPath(fromObject, ['languageCode']); ++ if (fromLanguageCode != null) { ++ setValueByPath(toObject, ['languageCode'], fromLanguageCode); + } + return toObject; + } +-function thinkingConfigToVertex(apiClient, fromObject) { ++function thinkingConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromIncludeThoughts = getValueByPath(fromObject, [ + 'includeThoughts', +@@ -5012,13 +5537,13 @@ function thinkingConfigToVertex(apiClient, fromObject) { + } + return toObject; + } +-function generateContentConfigToVertex(apiClient, fromObject, parentObject) { ++function generateContentConfigToMldev(apiClient, fromObject, parentObject) { + const toObject = {}; + const fromSystemInstruction = getValueByPath(fromObject, [ + 'systemInstruction', + ]); + if (parentObject !== undefined && fromSystemInstruction != null) { +- setValueByPath(parentObject, ['systemInstruction'], contentToVertex(apiClient, tContent(apiClient, fromSystemInstruction))); ++ setValueByPath(parentObject, ['systemInstruction'], contentToMldev(apiClient, tContent(apiClient, fromSystemInstruction))); + } + const fromTemperature = getValueByPath(fromObject, ['temperature']); + if (fromTemperature != null) { +@@ -5086,13 +5611,13 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + 'responseSchema', + ]); + if (fromResponseSchema != null) { +- setValueByPath(toObject, ['responseSchema'], schemaToVertex(apiClient, tSchema(apiClient, fromResponseSchema))); ++ setValueByPath(toObject, ['responseSchema'], schemaToMldev(apiClient, tSchema(apiClient, fromResponseSchema))); + } +- const fromRoutingConfig = getValueByPath(fromObject, [ +- 'routingConfig', +- ]); +- if (fromRoutingConfig != null) { +- setValueByPath(toObject, ['routingConfig'], fromRoutingConfig); ++ if (getValueByPath(fromObject, ['routingConfig']) !== undefined) { ++ throw new Error('routingConfig parameter is not supported in Gemini API.'); ++ } ++ if (getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined) { ++ throw new Error('modelSelectionConfig parameter is not supported in Gemini API.'); + } + const fromSafetySettings = getValueByPath(fromObject, [ + 'safetySettings', +@@ -5100,7 +5625,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromSafetySettings != null) { + if (Array.isArray(fromSafetySettings)) { + setValueByPath(parentObject, ['safetySettings'], fromSafetySettings.map((item) => { +- return safetySettingToVertex(apiClient, item); ++ return safetySettingToMldev(apiClient, item); + })); + } + else { +@@ -5111,7 +5636,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromTools != null) { + if (Array.isArray(fromTools)) { + setValueByPath(parentObject, ['tools'], tTools(apiClient, tTools(apiClient, fromTools).map((item) => { +- return toolToVertex(apiClient, tTool(apiClient, item)); ++ return toolToMldev(apiClient, tTool(apiClient, item)); + }))); + } + else { +@@ -5120,11 +5645,10 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + } + const fromToolConfig = getValueByPath(fromObject, ['toolConfig']); + if (parentObject !== undefined && fromToolConfig != null) { +- setValueByPath(parentObject, ['toolConfig'], toolConfigToVertex(apiClient, fromToolConfig)); ++ setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev(apiClient, fromToolConfig)); + } +- const fromLabels = getValueByPath(fromObject, ['labels']); +- if (parentObject !== undefined && fromLabels != null) { +- setValueByPath(parentObject, ['labels'], fromLabels); ++ if (getValueByPath(fromObject, ['labels']) !== undefined) { ++ throw new Error('labels parameter is not supported in Gemini API.'); + } + const fromCachedContent = getValueByPath(fromObject, [ + 'cachedContent', +@@ -5146,23 +5670,20 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + } + const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); + if (fromSpeechConfig != null) { +- setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(apiClient, tSpeechConfig(apiClient, fromSpeechConfig))); ++ setValueByPath(toObject, ['speechConfig'], speechConfigToMldev(apiClient, tSpeechConfig(apiClient, fromSpeechConfig))); + } +- const fromAudioTimestamp = getValueByPath(fromObject, [ +- 'audioTimestamp', +- ]); +- if (fromAudioTimestamp != null) { +- setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp); ++ if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) { ++ throw new Error('audioTimestamp parameter is not supported in Gemini API.'); + } + const fromThinkingConfig = getValueByPath(fromObject, [ + 'thinkingConfig', + ]); + if (fromThinkingConfig != null) { +- setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToVertex(apiClient, fromThinkingConfig)); ++ setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev(apiClient, fromThinkingConfig)); + } + return toObject; + } +-function generateContentParametersToVertex(apiClient, fromObject) { ++function generateContentParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -5172,7 +5693,7 @@ function generateContentParametersToVertex(apiClient, fromObject) { + if (fromContents != null) { + if (Array.isArray(fromContents)) { + setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToVertex(apiClient, item); ++ return contentToMldev(apiClient, item); + }))); + } + else { +@@ -5181,37 +5702,35 @@ function generateContentParametersToVertex(apiClient, fromObject) { + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['generationConfig'], generateContentConfigToVertex(apiClient, fromConfig, toObject)); ++ setValueByPath(toObject, ['generationConfig'], generateContentConfigToMldev(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function embedContentConfigToVertex(apiClient, fromObject, parentObject) { ++function embedContentConfigToMldev(apiClient, fromObject, parentObject) { + const toObject = {}; + const fromTaskType = getValueByPath(fromObject, ['taskType']); + if (parentObject !== undefined && fromTaskType != null) { +- setValueByPath(parentObject, ['instances[]', 'task_type'], fromTaskType); ++ setValueByPath(parentObject, ['requests[]', 'taskType'], fromTaskType); + } + const fromTitle = getValueByPath(fromObject, ['title']); + if (parentObject !== undefined && fromTitle != null) { +- setValueByPath(parentObject, ['instances[]', 'title'], fromTitle); ++ setValueByPath(parentObject, ['requests[]', 'title'], fromTitle); + } + const fromOutputDimensionality = getValueByPath(fromObject, [ + 'outputDimensionality', + ]); + if (parentObject !== undefined && fromOutputDimensionality != null) { +- setValueByPath(parentObject, ['parameters', 'outputDimensionality'], fromOutputDimensionality); ++ setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality); + } +- const fromMimeType = getValueByPath(fromObject, ['mimeType']); +- if (parentObject !== undefined && fromMimeType != null) { +- setValueByPath(parentObject, ['instances[]', 'mimeType'], fromMimeType); ++ if (getValueByPath(fromObject, ['mimeType']) !== undefined) { ++ throw new Error('mimeType parameter is not supported in Gemini API.'); + } +- const fromAutoTruncate = getValueByPath(fromObject, ['autoTruncate']); +- if (parentObject !== undefined && fromAutoTruncate != null) { +- setValueByPath(parentObject, ['parameters', 'autoTruncate'], fromAutoTruncate); ++ if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) { ++ throw new Error('autoTruncate parameter is not supported in Gemini API.'); + } + return toObject; + } +-function embedContentParametersToVertex(apiClient, fromObject) { ++function embedContentParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -5219,25 +5738,25 @@ function embedContentParametersToVertex(apiClient, fromObject) { + } + const fromContents = getValueByPath(fromObject, ['contents']); + if (fromContents != null) { +- setValueByPath(toObject, ['instances[]', 'content'], tContentsForEmbed(apiClient, fromContents)); ++ setValueByPath(toObject, ['requests[]', 'content'], tContentsForEmbed(apiClient, fromContents)); + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['config'], embedContentConfigToVertex(apiClient, fromConfig, toObject)); ++ setValueByPath(toObject, ['config'], embedContentConfigToMldev(apiClient, fromConfig, toObject)); ++ } ++ const fromModelForEmbedContent = getValueByPath(fromObject, ['model']); ++ if (fromModelForEmbedContent !== undefined) { ++ setValueByPath(toObject, ['requests[]', 'model'], tModel(apiClient, fromModelForEmbedContent)); + } + return toObject; + } +-function generateImagesConfigToVertex(apiClient, fromObject, parentObject) { ++function generateImagesConfigToMldev(apiClient, fromObject, parentObject) { + const toObject = {}; +- const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']); +- if (parentObject !== undefined && fromOutputGcsUri != null) { +- setValueByPath(parentObject, ['parameters', 'storageUri'], fromOutputGcsUri); ++ if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) { ++ throw new Error('outputGcsUri parameter is not supported in Gemini API.'); + } +- const fromNegativePrompt = getValueByPath(fromObject, [ +- 'negativePrompt', +- ]); +- if (parentObject !== undefined && fromNegativePrompt != null) { +- setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt); ++ if (getValueByPath(fromObject, ['negativePrompt']) !== undefined) { ++ throw new Error('negativePrompt parameter is not supported in Gemini API.'); + } + const fromNumberOfImages = getValueByPath(fromObject, [ + 'numberOfImages', +@@ -5255,9 +5774,8 @@ function generateImagesConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromGuidanceScale != null) { + setValueByPath(parentObject, ['parameters', 'guidanceScale'], fromGuidanceScale); + } +- const fromSeed = getValueByPath(fromObject, ['seed']); +- if (parentObject !== undefined && fromSeed != null) { +- setValueByPath(parentObject, ['parameters', 'seed'], fromSeed); ++ if (getValueByPath(fromObject, ['seed']) !== undefined) { ++ throw new Error('seed parameter is not supported in Gemini API.'); + } + const fromSafetyFilterLevel = getValueByPath(fromObject, [ + 'safetyFilterLevel', +@@ -5299,19 +5817,15 @@ function generateImagesConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromOutputCompressionQuality != null) { + setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality); + } +- const fromAddWatermark = getValueByPath(fromObject, ['addWatermark']); +- if (parentObject !== undefined && fromAddWatermark != null) { +- setValueByPath(parentObject, ['parameters', 'addWatermark'], fromAddWatermark); ++ if (getValueByPath(fromObject, ['addWatermark']) !== undefined) { ++ throw new Error('addWatermark parameter is not supported in Gemini API.'); + } +- const fromEnhancePrompt = getValueByPath(fromObject, [ +- 'enhancePrompt', +- ]); +- if (parentObject !== undefined && fromEnhancePrompt != null) { +- setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt); ++ if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) { ++ throw new Error('enhancePrompt parameter is not supported in Gemini API.'); + } + return toObject; + } +-function generateImagesParametersToVertex(apiClient, fromObject) { ++function generateImagesParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -5323,11 +5837,11 @@ function generateImagesParametersToVertex(apiClient, fromObject) { + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['config'], generateImagesConfigToVertex(apiClient, fromConfig, toObject)); ++ setValueByPath(toObject, ['config'], generateImagesConfigToMldev(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function getModelParametersToVertex(apiClient, fromObject) { ++function getModelParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -5339,57 +5853,20 @@ function getModelParametersToVertex(apiClient, fromObject) { + } + return toObject; + } +-function countTokensConfigToVertex(apiClient, fromObject, parentObject) { +- const toObject = {}; +- const fromSystemInstruction = getValueByPath(fromObject, [ +- 'systemInstruction', +- ]); +- if (parentObject !== undefined && fromSystemInstruction != null) { +- setValueByPath(parentObject, ['systemInstruction'], contentToVertex(apiClient, tContent(apiClient, fromSystemInstruction))); +- } +- const fromTools = getValueByPath(fromObject, ['tools']); +- if (parentObject !== undefined && fromTools != null) { +- if (Array.isArray(fromTools)) { +- setValueByPath(parentObject, ['tools'], fromTools.map((item) => { +- return toolToVertex(apiClient, item); +- })); +- } +- else { +- setValueByPath(parentObject, ['tools'], fromTools); +- } +- } +- const fromGenerationConfig = getValueByPath(fromObject, [ +- 'generationConfig', +- ]); +- if (parentObject !== undefined && fromGenerationConfig != null) { +- setValueByPath(parentObject, ['generationConfig'], fromGenerationConfig); +- } +- return toObject; +-} +-function countTokensParametersToVertex(apiClient, fromObject) { ++function countTokensConfigToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); +- } +- const fromContents = getValueByPath(fromObject, ['contents']); +- if (fromContents != null) { +- if (Array.isArray(fromContents)) { +- setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToVertex(apiClient, item); +- }))); +- } +- else { +- setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); +- } ++ if (getValueByPath(fromObject, ['systemInstruction']) !== undefined) { ++ throw new Error('systemInstruction parameter is not supported in Gemini API.'); + } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['config'], countTokensConfigToVertex(apiClient, fromConfig, toObject)); ++ if (getValueByPath(fromObject, ['tools']) !== undefined) { ++ throw new Error('tools parameter is not supported in Gemini API.'); ++ } ++ if (getValueByPath(fromObject, ['generationConfig']) !== undefined) { ++ throw new Error('generationConfig parameter is not supported in Gemini API.'); + } + return toObject; + } +-function computeTokensParametersToVertex(apiClient, fromObject) { ++function countTokensParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -5399,7 +5876,7 @@ function computeTokensParametersToVertex(apiClient, fromObject) { + if (fromContents != null) { + if (Array.isArray(fromContents)) { + setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToVertex(apiClient, item); ++ return contentToMldev(apiClient, item); + }))); + } + else { +@@ -5408,15 +5885,14 @@ function computeTokensParametersToVertex(apiClient, fromObject) { + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['config'], fromConfig); ++ setValueByPath(toObject, ['config'], countTokensConfigToMldev(apiClient, fromConfig)); + } + return toObject; + } +-function imageToVertex(apiClient, fromObject) { ++function imageToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromGcsUri = getValueByPath(fromObject, ['gcsUri']); +- if (fromGcsUri != null) { +- setValueByPath(toObject, ['gcsUri'], fromGcsUri); ++ if (getValueByPath(fromObject, ['gcsUri']) !== undefined) { ++ throw new Error('gcsUri parameter is not supported in Gemini API.'); + } + const fromImageBytes = getValueByPath(fromObject, ['imageBytes']); + if (fromImageBytes != null) { +@@ -5428,7 +5904,7 @@ function imageToVertex(apiClient, fromObject) { + } + return toObject; + } +-function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { ++function generateVideosConfigToMldev(apiClient, fromObject, parentObject) { + const toObject = {}; + const fromNumberOfVideos = getValueByPath(fromObject, [ + 'numberOfVideos', +@@ -5436,13 +5912,11 @@ function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromNumberOfVideos != null) { + setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfVideos); + } +- const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']); +- if (parentObject !== undefined && fromOutputGcsUri != null) { +- setValueByPath(parentObject, ['parameters', 'storageUri'], fromOutputGcsUri); ++ if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) { ++ throw new Error('outputGcsUri parameter is not supported in Gemini API.'); + } +- const fromFps = getValueByPath(fromObject, ['fps']); +- if (parentObject !== undefined && fromFps != null) { +- setValueByPath(parentObject, ['parameters', 'fps'], fromFps); ++ if (getValueByPath(fromObject, ['fps']) !== undefined) { ++ throw new Error('fps parameter is not supported in Gemini API.'); + } + const fromDurationSeconds = getValueByPath(fromObject, [ + 'durationSeconds', +@@ -5450,17 +5924,15 @@ function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromDurationSeconds != null) { + setValueByPath(parentObject, ['parameters', 'durationSeconds'], fromDurationSeconds); + } +- const fromSeed = getValueByPath(fromObject, ['seed']); +- if (parentObject !== undefined && fromSeed != null) { +- setValueByPath(parentObject, ['parameters', 'seed'], fromSeed); ++ if (getValueByPath(fromObject, ['seed']) !== undefined) { ++ throw new Error('seed parameter is not supported in Gemini API.'); + } + const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']); + if (parentObject !== undefined && fromAspectRatio != null) { + setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio); + } +- const fromResolution = getValueByPath(fromObject, ['resolution']); +- if (parentObject !== undefined && fromResolution != null) { +- setValueByPath(parentObject, ['parameters', 'resolution'], fromResolution); ++ if (getValueByPath(fromObject, ['resolution']) !== undefined) { ++ throw new Error('resolution parameter is not supported in Gemini API.'); + } + const fromPersonGeneration = getValueByPath(fromObject, [ + 'personGeneration', +@@ -5468,9 +5940,8 @@ function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromPersonGeneration != null) { + setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration); + } +- const fromPubsubTopic = getValueByPath(fromObject, ['pubsubTopic']); +- if (parentObject !== undefined && fromPubsubTopic != null) { +- setValueByPath(parentObject, ['parameters', 'pubsubTopic'], fromPubsubTopic); ++ if (getValueByPath(fromObject, ['pubsubTopic']) !== undefined) { ++ throw new Error('pubsubTopic parameter is not supported in Gemini API.'); + } + const fromNegativePrompt = getValueByPath(fromObject, [ + 'negativePrompt', +@@ -5478,15 +5949,12 @@ function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromNegativePrompt != null) { + setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt); + } +- const fromEnhancePrompt = getValueByPath(fromObject, [ +- 'enhancePrompt', +- ]); +- if (parentObject !== undefined && fromEnhancePrompt != null) { +- setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt); ++ if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) { ++ throw new Error('enhancePrompt parameter is not supported in Gemini API.'); + } + return toObject; + } +-function generateVideosParametersToVertex(apiClient, fromObject) { ++function generateVideosParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -5498,16 +5966,22 @@ function generateVideosParametersToVertex(apiClient, fromObject) { + } + const fromImage = getValueByPath(fromObject, ['image']); + if (fromImage != null) { +- setValueByPath(toObject, ['instances[0]', 'image'], imageToVertex(apiClient, fromImage)); ++ setValueByPath(toObject, ['instances[0]', 'image'], imageToMldev(apiClient, fromImage)); + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['config'], generateVideosConfigToVertex(apiClient, fromConfig, toObject)); ++ setValueByPath(toObject, ['config'], generateVideosConfigToMldev(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function partFromMldev(apiClient, fromObject) { ++function partToVertex(apiClient, fromObject) { + const toObject = {}; ++ const fromVideoMetadata = getValueByPath(fromObject, [ ++ 'videoMetadata', ++ ]); ++ if (fromVideoMetadata != null) { ++ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); ++ } + const fromThought = getValueByPath(fromObject, ['thought']); + if (fromThought != null) { + setValueByPath(toObject, ['thought'], fromThought); +@@ -5548,13 +6022,13 @@ function partFromMldev(apiClient, fromObject) { + } + return toObject; + } +-function contentFromMldev(apiClient, fromObject) { ++function contentToVertex(apiClient, fromObject) { + const toObject = {}; + const fromParts = getValueByPath(fromObject, ['parts']); + if (fromParts != null) { + if (Array.isArray(fromParts)) { + setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partFromMldev(apiClient, item); ++ return partToVertex(apiClient, item); + })); + } + else { +@@ -5567,1628 +6041,1663 @@ function contentFromMldev(apiClient, fromObject) { + } + return toObject; + } +-function citationMetadataFromMldev(apiClient, fromObject) { ++function schemaToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromCitations = getValueByPath(fromObject, ['citationSources']); +- if (fromCitations != null) { +- setValueByPath(toObject, ['citations'], fromCitations); ++ const fromExample = getValueByPath(fromObject, ['example']); ++ if (fromExample != null) { ++ setValueByPath(toObject, ['example'], fromExample); + } +- return toObject; +-} +-function candidateFromMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromContent = getValueByPath(fromObject, ['content']); +- if (fromContent != null) { +- setValueByPath(toObject, ['content'], contentFromMldev(apiClient, fromContent)); ++ const fromPattern = getValueByPath(fromObject, ['pattern']); ++ if (fromPattern != null) { ++ setValueByPath(toObject, ['pattern'], fromPattern); + } +- const fromCitationMetadata = getValueByPath(fromObject, [ +- 'citationMetadata', +- ]); +- if (fromCitationMetadata != null) { +- setValueByPath(toObject, ['citationMetadata'], citationMetadataFromMldev(apiClient, fromCitationMetadata)); ++ const fromDefault = getValueByPath(fromObject, ['default']); ++ if (fromDefault != null) { ++ setValueByPath(toObject, ['default'], fromDefault); + } +- const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); +- if (fromTokenCount != null) { +- setValueByPath(toObject, ['tokenCount'], fromTokenCount); ++ const fromMaxLength = getValueByPath(fromObject, ['maxLength']); ++ if (fromMaxLength != null) { ++ setValueByPath(toObject, ['maxLength'], fromMaxLength); + } +- const fromFinishReason = getValueByPath(fromObject, ['finishReason']); +- if (fromFinishReason != null) { +- setValueByPath(toObject, ['finishReason'], fromFinishReason); ++ const fromMinLength = getValueByPath(fromObject, ['minLength']); ++ if (fromMinLength != null) { ++ setValueByPath(toObject, ['minLength'], fromMinLength); + } +- const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']); +- if (fromAvgLogprobs != null) { +- setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs); ++ const fromMinProperties = getValueByPath(fromObject, [ ++ 'minProperties', ++ ]); ++ if (fromMinProperties != null) { ++ setValueByPath(toObject, ['minProperties'], fromMinProperties); + } +- const fromGroundingMetadata = getValueByPath(fromObject, [ +- 'groundingMetadata', ++ const fromMaxProperties = getValueByPath(fromObject, [ ++ 'maxProperties', + ]); +- if (fromGroundingMetadata != null) { +- setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata); ++ if (fromMaxProperties != null) { ++ setValueByPath(toObject, ['maxProperties'], fromMaxProperties); + } +- const fromIndex = getValueByPath(fromObject, ['index']); +- if (fromIndex != null) { +- setValueByPath(toObject, ['index'], fromIndex); ++ const fromAnyOf = getValueByPath(fromObject, ['anyOf']); ++ if (fromAnyOf != null) { ++ setValueByPath(toObject, ['anyOf'], fromAnyOf); + } +- const fromLogprobsResult = getValueByPath(fromObject, [ +- 'logprobsResult', +- ]); +- if (fromLogprobsResult != null) { +- setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult); ++ const fromDescription = getValueByPath(fromObject, ['description']); ++ if (fromDescription != null) { ++ setValueByPath(toObject, ['description'], fromDescription); + } +- const fromSafetyRatings = getValueByPath(fromObject, [ +- 'safetyRatings', +- ]); +- if (fromSafetyRatings != null) { +- setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings); ++ const fromEnum = getValueByPath(fromObject, ['enum']); ++ if (fromEnum != null) { ++ setValueByPath(toObject, ['enum'], fromEnum); + } +- return toObject; +-} +-function generateContentResponseFromMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromCandidates = getValueByPath(fromObject, ['candidates']); +- if (fromCandidates != null) { +- if (Array.isArray(fromCandidates)) { +- setValueByPath(toObject, ['candidates'], fromCandidates.map((item) => { +- return candidateFromMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['candidates'], fromCandidates); +- } ++ const fromFormat = getValueByPath(fromObject, ['format']); ++ if (fromFormat != null) { ++ setValueByPath(toObject, ['format'], fromFormat); + } +- const fromModelVersion = getValueByPath(fromObject, ['modelVersion']); +- if (fromModelVersion != null) { +- setValueByPath(toObject, ['modelVersion'], fromModelVersion); ++ const fromItems = getValueByPath(fromObject, ['items']); ++ if (fromItems != null) { ++ setValueByPath(toObject, ['items'], fromItems); + } +- const fromPromptFeedback = getValueByPath(fromObject, [ +- 'promptFeedback', +- ]); +- if (fromPromptFeedback != null) { +- setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback); ++ const fromMaxItems = getValueByPath(fromObject, ['maxItems']); ++ if (fromMaxItems != null) { ++ setValueByPath(toObject, ['maxItems'], fromMaxItems); + } +- const fromUsageMetadata = getValueByPath(fromObject, [ +- 'usageMetadata', ++ const fromMaximum = getValueByPath(fromObject, ['maximum']); ++ if (fromMaximum != null) { ++ setValueByPath(toObject, ['maximum'], fromMaximum); ++ } ++ const fromMinItems = getValueByPath(fromObject, ['minItems']); ++ if (fromMinItems != null) { ++ setValueByPath(toObject, ['minItems'], fromMinItems); ++ } ++ const fromMinimum = getValueByPath(fromObject, ['minimum']); ++ if (fromMinimum != null) { ++ setValueByPath(toObject, ['minimum'], fromMinimum); ++ } ++ const fromNullable = getValueByPath(fromObject, ['nullable']); ++ if (fromNullable != null) { ++ setValueByPath(toObject, ['nullable'], fromNullable); ++ } ++ const fromProperties = getValueByPath(fromObject, ['properties']); ++ if (fromProperties != null) { ++ setValueByPath(toObject, ['properties'], fromProperties); ++ } ++ const fromPropertyOrdering = getValueByPath(fromObject, [ ++ 'propertyOrdering', + ]); +- if (fromUsageMetadata != null) { +- setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata); ++ if (fromPropertyOrdering != null) { ++ setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering); ++ } ++ const fromRequired = getValueByPath(fromObject, ['required']); ++ if (fromRequired != null) { ++ setValueByPath(toObject, ['required'], fromRequired); ++ } ++ const fromTitle = getValueByPath(fromObject, ['title']); ++ if (fromTitle != null) { ++ setValueByPath(toObject, ['title'], fromTitle); ++ } ++ const fromType = getValueByPath(fromObject, ['type']); ++ if (fromType != null) { ++ setValueByPath(toObject, ['type'], fromType); + } + return toObject; + } +-function contentEmbeddingFromMldev(apiClient, fromObject) { ++function modelSelectionConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromValues = getValueByPath(fromObject, ['values']); +- if (fromValues != null) { +- setValueByPath(toObject, ['values'], fromValues); ++ const fromFeatureSelectionPreference = getValueByPath(fromObject, [ ++ 'featureSelectionPreference', ++ ]); ++ if (fromFeatureSelectionPreference != null) { ++ setValueByPath(toObject, ['featureSelectionPreference'], fromFeatureSelectionPreference); + } + return toObject; + } +-function embedContentMetadataFromMldev() { ++function safetySettingToVertex(apiClient, fromObject) { + const toObject = {}; ++ const fromMethod = getValueByPath(fromObject, ['method']); ++ if (fromMethod != null) { ++ setValueByPath(toObject, ['method'], fromMethod); ++ } ++ const fromCategory = getValueByPath(fromObject, ['category']); ++ if (fromCategory != null) { ++ setValueByPath(toObject, ['category'], fromCategory); ++ } ++ const fromThreshold = getValueByPath(fromObject, ['threshold']); ++ if (fromThreshold != null) { ++ setValueByPath(toObject, ['threshold'], fromThreshold); ++ } + return toObject; + } +-function embedContentResponseFromMldev(apiClient, fromObject) { ++function functionDeclarationToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromEmbeddings = getValueByPath(fromObject, ['embeddings']); +- if (fromEmbeddings != null) { +- if (Array.isArray(fromEmbeddings)) { +- setValueByPath(toObject, ['embeddings'], fromEmbeddings.map((item) => { +- return contentEmbeddingFromMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['embeddings'], fromEmbeddings); +- } ++ const fromResponse = getValueByPath(fromObject, ['response']); ++ if (fromResponse != null) { ++ setValueByPath(toObject, ['response'], schemaToVertex(apiClient, fromResponse)); + } +- const fromMetadata = getValueByPath(fromObject, ['metadata']); +- if (fromMetadata != null) { +- setValueByPath(toObject, ['metadata'], embedContentMetadataFromMldev()); ++ const fromDescription = getValueByPath(fromObject, ['description']); ++ if (fromDescription != null) { ++ setValueByPath(toObject, ['description'], fromDescription); ++ } ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); ++ } ++ const fromParameters = getValueByPath(fromObject, ['parameters']); ++ if (fromParameters != null) { ++ setValueByPath(toObject, ['parameters'], fromParameters); + } + return toObject; + } +-function imageFromMldev(apiClient, fromObject) { ++function googleSearchToVertex() { + const toObject = {}; +- const fromImageBytes = getValueByPath(fromObject, [ +- 'bytesBase64Encoded', +- ]); +- if (fromImageBytes != null) { +- setValueByPath(toObject, ['imageBytes'], tBytes(apiClient, fromImageBytes)); +- } +- const fromMimeType = getValueByPath(fromObject, ['mimeType']); +- if (fromMimeType != null) { +- setValueByPath(toObject, ['mimeType'], fromMimeType); +- } + return toObject; + } +-function safetyAttributesFromMldev(apiClient, fromObject) { ++function dynamicRetrievalConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromCategories = getValueByPath(fromObject, [ +- 'safetyAttributes', +- 'categories', +- ]); +- if (fromCategories != null) { +- setValueByPath(toObject, ['categories'], fromCategories); ++ const fromMode = getValueByPath(fromObject, ['mode']); ++ if (fromMode != null) { ++ setValueByPath(toObject, ['mode'], fromMode); + } +- const fromScores = getValueByPath(fromObject, [ +- 'safetyAttributes', +- 'scores', ++ const fromDynamicThreshold = getValueByPath(fromObject, [ ++ 'dynamicThreshold', + ]); +- if (fromScores != null) { +- setValueByPath(toObject, ['scores'], fromScores); +- } +- const fromContentType = getValueByPath(fromObject, ['contentType']); +- if (fromContentType != null) { +- setValueByPath(toObject, ['contentType'], fromContentType); ++ if (fromDynamicThreshold != null) { ++ setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold); + } + return toObject; + } +-function generatedImageFromMldev(apiClient, fromObject) { ++function googleSearchRetrievalToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromImage = getValueByPath(fromObject, ['_self']); +- if (fromImage != null) { +- setValueByPath(toObject, ['image'], imageFromMldev(apiClient, fromImage)); +- } +- const fromRaiFilteredReason = getValueByPath(fromObject, [ +- 'raiFilteredReason', ++ const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ ++ 'dynamicRetrievalConfig', + ]); +- if (fromRaiFilteredReason != null) { +- setValueByPath(toObject, ['raiFilteredReason'], fromRaiFilteredReason); +- } +- const fromSafetyAttributes = getValueByPath(fromObject, ['_self']); +- if (fromSafetyAttributes != null) { +- setValueByPath(toObject, ['safetyAttributes'], safetyAttributesFromMldev(apiClient, fromSafetyAttributes)); ++ if (fromDynamicRetrievalConfig != null) { ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig)); + } + return toObject; + } +-function generateImagesResponseFromMldev(apiClient, fromObject) { ++function toolToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromGeneratedImages = getValueByPath(fromObject, [ +- 'predictions', ++ const fromFunctionDeclarations = getValueByPath(fromObject, [ ++ 'functionDeclarations', + ]); +- if (fromGeneratedImages != null) { +- if (Array.isArray(fromGeneratedImages)) { +- setValueByPath(toObject, ['generatedImages'], fromGeneratedImages.map((item) => { +- return generatedImageFromMldev(apiClient, item); ++ if (fromFunctionDeclarations != null) { ++ if (Array.isArray(fromFunctionDeclarations)) { ++ setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { ++ return functionDeclarationToVertex(apiClient, item); + })); + } + else { +- setValueByPath(toObject, ['generatedImages'], fromGeneratedImages); ++ setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations); + } + } +- const fromPositivePromptSafetyAttributes = getValueByPath(fromObject, [ +- 'positivePromptSafetyAttributes', +- ]); +- if (fromPositivePromptSafetyAttributes != null) { +- setValueByPath(toObject, ['positivePromptSafetyAttributes'], safetyAttributesFromMldev(apiClient, fromPositivePromptSafetyAttributes)); ++ const fromRetrieval = getValueByPath(fromObject, ['retrieval']); ++ if (fromRetrieval != null) { ++ setValueByPath(toObject, ['retrieval'], fromRetrieval); + } +- return toObject; +-} +-function tunedModelInfoFromMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromBaseModel = getValueByPath(fromObject, ['baseModel']); +- if (fromBaseModel != null) { +- setValueByPath(toObject, ['baseModel'], fromBaseModel); ++ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); ++ if (fromGoogleSearch != null) { ++ setValueByPath(toObject, ['googleSearch'], googleSearchToVertex()); + } +- const fromCreateTime = getValueByPath(fromObject, ['createTime']); +- if (fromCreateTime != null) { +- setValueByPath(toObject, ['createTime'], fromCreateTime); ++ const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ ++ 'googleSearchRetrieval', ++ ]); ++ if (fromGoogleSearchRetrieval != null) { ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval)); + } +- const fromUpdateTime = getValueByPath(fromObject, ['updateTime']); +- if (fromUpdateTime != null) { +- setValueByPath(toObject, ['updateTime'], fromUpdateTime); ++ const fromCodeExecution = getValueByPath(fromObject, [ ++ 'codeExecution', ++ ]); ++ if (fromCodeExecution != null) { ++ setValueByPath(toObject, ['codeExecution'], fromCodeExecution); + } + return toObject; + } +-function modelFromMldev(apiClient, fromObject) { ++function functionCallingConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName != null) { +- setValueByPath(toObject, ['name'], fromName); +- } +- const fromDisplayName = getValueByPath(fromObject, ['displayName']); +- if (fromDisplayName != null) { +- setValueByPath(toObject, ['displayName'], fromDisplayName); +- } +- const fromDescription = getValueByPath(fromObject, ['description']); +- if (fromDescription != null) { +- setValueByPath(toObject, ['description'], fromDescription); +- } +- const fromVersion = getValueByPath(fromObject, ['version']); +- if (fromVersion != null) { +- setValueByPath(toObject, ['version'], fromVersion); +- } +- const fromTunedModelInfo = getValueByPath(fromObject, ['_self']); +- if (fromTunedModelInfo != null) { +- setValueByPath(toObject, ['tunedModelInfo'], tunedModelInfoFromMldev(apiClient, fromTunedModelInfo)); +- } +- const fromInputTokenLimit = getValueByPath(fromObject, [ +- 'inputTokenLimit', +- ]); +- if (fromInputTokenLimit != null) { +- setValueByPath(toObject, ['inputTokenLimit'], fromInputTokenLimit); ++ const fromMode = getValueByPath(fromObject, ['mode']); ++ if (fromMode != null) { ++ setValueByPath(toObject, ['mode'], fromMode); + } +- const fromOutputTokenLimit = getValueByPath(fromObject, [ +- 'outputTokenLimit', ++ const fromAllowedFunctionNames = getValueByPath(fromObject, [ ++ 'allowedFunctionNames', + ]); +- if (fromOutputTokenLimit != null) { +- setValueByPath(toObject, ['outputTokenLimit'], fromOutputTokenLimit); ++ if (fromAllowedFunctionNames != null) { ++ setValueByPath(toObject, ['allowedFunctionNames'], fromAllowedFunctionNames); + } +- const fromSupportedActions = getValueByPath(fromObject, [ +- 'supportedGenerationMethods', ++ return toObject; ++} ++function toolConfigToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromFunctionCallingConfig = getValueByPath(fromObject, [ ++ 'functionCallingConfig', + ]); +- if (fromSupportedActions != null) { +- setValueByPath(toObject, ['supportedActions'], fromSupportedActions); ++ if (fromFunctionCallingConfig != null) { ++ setValueByPath(toObject, ['functionCallingConfig'], functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig)); + } + return toObject; + } +-function countTokensResponseFromMldev(apiClient, fromObject) { ++function prebuiltVoiceConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromTotalTokens = getValueByPath(fromObject, ['totalTokens']); +- if (fromTotalTokens != null) { +- setValueByPath(toObject, ['totalTokens'], fromTotalTokens); ++ const fromVoiceName = getValueByPath(fromObject, ['voiceName']); ++ if (fromVoiceName != null) { ++ setValueByPath(toObject, ['voiceName'], fromVoiceName); + } +- const fromCachedContentTokenCount = getValueByPath(fromObject, [ +- 'cachedContentTokenCount', ++ return toObject; ++} ++function voiceConfigToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [ ++ 'prebuiltVoiceConfig', + ]); +- if (fromCachedContentTokenCount != null) { +- setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); ++ if (fromPrebuiltVoiceConfig != null) { ++ setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToVertex(apiClient, fromPrebuiltVoiceConfig)); + } + return toObject; + } +-function videoFromMldev$1(apiClient, fromObject) { ++function speechConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromUri = getValueByPath(fromObject, ['video', 'uri']); +- if (fromUri != null) { +- setValueByPath(toObject, ['uri'], fromUri); +- } +- const fromVideoBytes = getValueByPath(fromObject, [ +- 'video', +- 'encodedVideo', +- ]); +- if (fromVideoBytes != null) { +- setValueByPath(toObject, ['videoBytes'], tBytes(apiClient, fromVideoBytes)); ++ const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']); ++ if (fromVoiceConfig != null) { ++ setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(apiClient, fromVoiceConfig)); + } +- const fromMimeType = getValueByPath(fromObject, ['encoding']); +- if (fromMimeType != null) { +- setValueByPath(toObject, ['mimeType'], fromMimeType); ++ const fromLanguageCode = getValueByPath(fromObject, ['languageCode']); ++ if (fromLanguageCode != null) { ++ setValueByPath(toObject, ['languageCode'], fromLanguageCode); + } + return toObject; + } +-function generatedVideoFromMldev$1(apiClient, fromObject) { ++function thinkingConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromVideo = getValueByPath(fromObject, ['_self']); +- if (fromVideo != null) { +- setValueByPath(toObject, ['video'], videoFromMldev$1(apiClient, fromVideo)); ++ const fromIncludeThoughts = getValueByPath(fromObject, [ ++ 'includeThoughts', ++ ]); ++ if (fromIncludeThoughts != null) { ++ setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts); ++ } ++ const fromThinkingBudget = getValueByPath(fromObject, [ ++ 'thinkingBudget', ++ ]); ++ if (fromThinkingBudget != null) { ++ setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget); + } + return toObject; + } +-function generateVideosResponseFromMldev$1(apiClient, fromObject) { ++function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + const toObject = {}; +- const fromGeneratedVideos = getValueByPath(fromObject, [ +- 'generatedSamples', ++ const fromSystemInstruction = getValueByPath(fromObject, [ ++ 'systemInstruction', ++ ]); ++ if (parentObject !== undefined && fromSystemInstruction != null) { ++ setValueByPath(parentObject, ['systemInstruction'], contentToVertex(apiClient, tContent(apiClient, fromSystemInstruction))); ++ } ++ const fromTemperature = getValueByPath(fromObject, ['temperature']); ++ if (fromTemperature != null) { ++ setValueByPath(toObject, ['temperature'], fromTemperature); ++ } ++ const fromTopP = getValueByPath(fromObject, ['topP']); ++ if (fromTopP != null) { ++ setValueByPath(toObject, ['topP'], fromTopP); ++ } ++ const fromTopK = getValueByPath(fromObject, ['topK']); ++ if (fromTopK != null) { ++ setValueByPath(toObject, ['topK'], fromTopK); ++ } ++ const fromCandidateCount = getValueByPath(fromObject, [ ++ 'candidateCount', ++ ]); ++ if (fromCandidateCount != null) { ++ setValueByPath(toObject, ['candidateCount'], fromCandidateCount); ++ } ++ const fromMaxOutputTokens = getValueByPath(fromObject, [ ++ 'maxOutputTokens', ++ ]); ++ if (fromMaxOutputTokens != null) { ++ setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens); ++ } ++ const fromStopSequences = getValueByPath(fromObject, [ ++ 'stopSequences', + ]); +- if (fromGeneratedVideos != null) { +- if (Array.isArray(fromGeneratedVideos)) { +- setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos.map((item) => { +- return generatedVideoFromMldev$1(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos); +- } ++ if (fromStopSequences != null) { ++ setValueByPath(toObject, ['stopSequences'], fromStopSequences); + } +- const fromRaiMediaFilteredCount = getValueByPath(fromObject, [ +- 'raiMediaFilteredCount', ++ const fromResponseLogprobs = getValueByPath(fromObject, [ ++ 'responseLogprobs', + ]); +- if (fromRaiMediaFilteredCount != null) { +- setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount); ++ if (fromResponseLogprobs != null) { ++ setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs); + } +- const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [ +- 'raiMediaFilteredReasons', ++ const fromLogprobs = getValueByPath(fromObject, ['logprobs']); ++ if (fromLogprobs != null) { ++ setValueByPath(toObject, ['logprobs'], fromLogprobs); ++ } ++ const fromPresencePenalty = getValueByPath(fromObject, [ ++ 'presencePenalty', + ]); +- if (fromRaiMediaFilteredReasons != null) { +- setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons); ++ if (fromPresencePenalty != null) { ++ setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty); + } +- return toObject; +-} +-function generateVideosOperationFromMldev$1(apiClient, fromObject) { +- const toObject = {}; +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName != null) { +- setValueByPath(toObject, ['name'], fromName); ++ const fromFrequencyPenalty = getValueByPath(fromObject, [ ++ 'frequencyPenalty', ++ ]); ++ if (fromFrequencyPenalty != null) { ++ setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty); + } +- const fromMetadata = getValueByPath(fromObject, ['metadata']); +- if (fromMetadata != null) { +- setValueByPath(toObject, ['metadata'], fromMetadata); ++ const fromSeed = getValueByPath(fromObject, ['seed']); ++ if (fromSeed != null) { ++ setValueByPath(toObject, ['seed'], fromSeed); + } +- const fromDone = getValueByPath(fromObject, ['done']); +- if (fromDone != null) { +- setValueByPath(toObject, ['done'], fromDone); ++ const fromResponseMimeType = getValueByPath(fromObject, [ ++ 'responseMimeType', ++ ]); ++ if (fromResponseMimeType != null) { ++ setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType); + } +- const fromError = getValueByPath(fromObject, ['error']); +- if (fromError != null) { +- setValueByPath(toObject, ['error'], fromError); ++ const fromResponseSchema = getValueByPath(fromObject, [ ++ 'responseSchema', ++ ]); ++ if (fromResponseSchema != null) { ++ setValueByPath(toObject, ['responseSchema'], schemaToVertex(apiClient, tSchema(apiClient, fromResponseSchema))); + } +- const fromResponse = getValueByPath(fromObject, [ +- 'response', +- 'generateVideoResponse', ++ const fromRoutingConfig = getValueByPath(fromObject, [ ++ 'routingConfig', + ]); +- if (fromResponse != null) { +- setValueByPath(toObject, ['response'], generateVideosResponseFromMldev$1(apiClient, fromResponse)); ++ if (fromRoutingConfig != null) { ++ setValueByPath(toObject, ['routingConfig'], fromRoutingConfig); + } +- const fromResult = getValueByPath(fromObject, [ +- 'response', +- 'generateVideoResponse', ++ const fromModelSelectionConfig = getValueByPath(fromObject, [ ++ 'modelSelectionConfig', + ]); +- if (fromResult != null) { +- setValueByPath(toObject, ['result'], generateVideosResponseFromMldev$1(apiClient, fromResult)); ++ if (fromModelSelectionConfig != null) { ++ setValueByPath(toObject, ['modelConfig'], modelSelectionConfigToVertex(apiClient, fromModelSelectionConfig)); + } +- return toObject; +-} +-function partFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromVideoMetadata = getValueByPath(fromObject, [ +- 'videoMetadata', ++ const fromSafetySettings = getValueByPath(fromObject, [ ++ 'safetySettings', + ]); +- if (fromVideoMetadata != null) { +- setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); ++ if (parentObject !== undefined && fromSafetySettings != null) { ++ if (Array.isArray(fromSafetySettings)) { ++ setValueByPath(parentObject, ['safetySettings'], fromSafetySettings.map((item) => { ++ return safetySettingToVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(parentObject, ['safetySettings'], fromSafetySettings); ++ } + } +- const fromThought = getValueByPath(fromObject, ['thought']); +- if (fromThought != null) { +- setValueByPath(toObject, ['thought'], fromThought); ++ const fromTools = getValueByPath(fromObject, ['tools']); ++ if (parentObject !== undefined && fromTools != null) { ++ if (Array.isArray(fromTools)) { ++ setValueByPath(parentObject, ['tools'], tTools(apiClient, tTools(apiClient, fromTools).map((item) => { ++ return toolToVertex(apiClient, tTool(apiClient, item)); ++ }))); ++ } ++ else { ++ setValueByPath(parentObject, ['tools'], tTools(apiClient, fromTools)); ++ } + } +- const fromCodeExecutionResult = getValueByPath(fromObject, [ +- 'codeExecutionResult', ++ const fromToolConfig = getValueByPath(fromObject, ['toolConfig']); ++ if (parentObject !== undefined && fromToolConfig != null) { ++ setValueByPath(parentObject, ['toolConfig'], toolConfigToVertex(apiClient, fromToolConfig)); ++ } ++ const fromLabels = getValueByPath(fromObject, ['labels']); ++ if (parentObject !== undefined && fromLabels != null) { ++ setValueByPath(parentObject, ['labels'], fromLabels); ++ } ++ const fromCachedContent = getValueByPath(fromObject, [ ++ 'cachedContent', + ]); +- if (fromCodeExecutionResult != null) { +- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); ++ if (parentObject !== undefined && fromCachedContent != null) { ++ setValueByPath(parentObject, ['cachedContent'], tCachedContentName(apiClient, fromCachedContent)); + } +- const fromExecutableCode = getValueByPath(fromObject, [ +- 'executableCode', ++ const fromResponseModalities = getValueByPath(fromObject, [ ++ 'responseModalities', + ]); +- if (fromExecutableCode != null) { +- setValueByPath(toObject, ['executableCode'], fromExecutableCode); ++ if (fromResponseModalities != null) { ++ setValueByPath(toObject, ['responseModalities'], fromResponseModalities); + } +- const fromFileData = getValueByPath(fromObject, ['fileData']); +- if (fromFileData != null) { +- setValueByPath(toObject, ['fileData'], fromFileData); ++ const fromMediaResolution = getValueByPath(fromObject, [ ++ 'mediaResolution', ++ ]); ++ if (fromMediaResolution != null) { ++ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution); + } +- const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); +- if (fromFunctionCall != null) { +- setValueByPath(toObject, ['functionCall'], fromFunctionCall); ++ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); ++ if (fromSpeechConfig != null) { ++ setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(apiClient, tSpeechConfig(apiClient, fromSpeechConfig))); + } +- const fromFunctionResponse = getValueByPath(fromObject, [ +- 'functionResponse', ++ const fromAudioTimestamp = getValueByPath(fromObject, [ ++ 'audioTimestamp', + ]); +- if (fromFunctionResponse != null) { +- setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); +- } +- const fromInlineData = getValueByPath(fromObject, ['inlineData']); +- if (fromInlineData != null) { +- setValueByPath(toObject, ['inlineData'], fromInlineData); ++ if (fromAudioTimestamp != null) { ++ setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp); + } +- const fromText = getValueByPath(fromObject, ['text']); +- if (fromText != null) { +- setValueByPath(toObject, ['text'], fromText); ++ const fromThinkingConfig = getValueByPath(fromObject, [ ++ 'thinkingConfig', ++ ]); ++ if (fromThinkingConfig != null) { ++ setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToVertex(apiClient, fromThinkingConfig)); + } + return toObject; + } +-function contentFromVertex(apiClient, fromObject) { ++function generateContentParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromParts = getValueByPath(fromObject, ['parts']); +- if (fromParts != null) { +- if (Array.isArray(fromParts)) { +- setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partFromVertex(apiClient, item); +- })); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); ++ } ++ const fromContents = getValueByPath(fromObject, ['contents']); ++ if (fromContents != null) { ++ if (Array.isArray(fromContents)) { ++ setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { ++ return contentToVertex(apiClient, item); ++ }))); + } + else { +- setValueByPath(toObject, ['parts'], fromParts); ++ setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); + } + } +- const fromRole = getValueByPath(fromObject, ['role']); +- if (fromRole != null) { +- setValueByPath(toObject, ['role'], fromRole); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['generationConfig'], generateContentConfigToVertex(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function citationMetadataFromVertex(apiClient, fromObject) { ++function embedContentConfigToVertex(apiClient, fromObject, parentObject) { + const toObject = {}; +- const fromCitations = getValueByPath(fromObject, ['citations']); +- if (fromCitations != null) { +- setValueByPath(toObject, ['citations'], fromCitations); ++ const fromTaskType = getValueByPath(fromObject, ['taskType']); ++ if (parentObject !== undefined && fromTaskType != null) { ++ setValueByPath(parentObject, ['instances[]', 'task_type'], fromTaskType); ++ } ++ const fromTitle = getValueByPath(fromObject, ['title']); ++ if (parentObject !== undefined && fromTitle != null) { ++ setValueByPath(parentObject, ['instances[]', 'title'], fromTitle); ++ } ++ const fromOutputDimensionality = getValueByPath(fromObject, [ ++ 'outputDimensionality', ++ ]); ++ if (parentObject !== undefined && fromOutputDimensionality != null) { ++ setValueByPath(parentObject, ['parameters', 'outputDimensionality'], fromOutputDimensionality); ++ } ++ const fromMimeType = getValueByPath(fromObject, ['mimeType']); ++ if (parentObject !== undefined && fromMimeType != null) { ++ setValueByPath(parentObject, ['instances[]', 'mimeType'], fromMimeType); ++ } ++ const fromAutoTruncate = getValueByPath(fromObject, ['autoTruncate']); ++ if (parentObject !== undefined && fromAutoTruncate != null) { ++ setValueByPath(parentObject, ['parameters', 'autoTruncate'], fromAutoTruncate); + } + return toObject; + } +-function candidateFromVertex(apiClient, fromObject) { ++function embedContentParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromContent = getValueByPath(fromObject, ['content']); +- if (fromContent != null) { +- setValueByPath(toObject, ['content'], contentFromVertex(apiClient, fromContent)); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); + } +- const fromCitationMetadata = getValueByPath(fromObject, [ +- 'citationMetadata', +- ]); +- if (fromCitationMetadata != null) { +- setValueByPath(toObject, ['citationMetadata'], citationMetadataFromVertex(apiClient, fromCitationMetadata)); ++ const fromContents = getValueByPath(fromObject, ['contents']); ++ if (fromContents != null) { ++ setValueByPath(toObject, ['instances[]', 'content'], tContentsForEmbed(apiClient, fromContents)); + } +- const fromFinishMessage = getValueByPath(fromObject, [ +- 'finishMessage', ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], embedContentConfigToVertex(apiClient, fromConfig, toObject)); ++ } ++ return toObject; ++} ++function generateImagesConfigToVertex(apiClient, fromObject, parentObject) { ++ const toObject = {}; ++ const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']); ++ if (parentObject !== undefined && fromOutputGcsUri != null) { ++ setValueByPath(parentObject, ['parameters', 'storageUri'], fromOutputGcsUri); ++ } ++ const fromNegativePrompt = getValueByPath(fromObject, [ ++ 'negativePrompt', + ]); +- if (fromFinishMessage != null) { +- setValueByPath(toObject, ['finishMessage'], fromFinishMessage); ++ if (parentObject !== undefined && fromNegativePrompt != null) { ++ setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt); + } +- const fromFinishReason = getValueByPath(fromObject, ['finishReason']); +- if (fromFinishReason != null) { +- setValueByPath(toObject, ['finishReason'], fromFinishReason); ++ const fromNumberOfImages = getValueByPath(fromObject, [ ++ 'numberOfImages', ++ ]); ++ if (parentObject !== undefined && fromNumberOfImages != null) { ++ setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfImages); + } +- const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']); +- if (fromAvgLogprobs != null) { +- setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs); ++ const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']); ++ if (parentObject !== undefined && fromAspectRatio != null) { ++ setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio); + } +- const fromGroundingMetadata = getValueByPath(fromObject, [ +- 'groundingMetadata', ++ const fromGuidanceScale = getValueByPath(fromObject, [ ++ 'guidanceScale', + ]); +- if (fromGroundingMetadata != null) { +- setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata); ++ if (parentObject !== undefined && fromGuidanceScale != null) { ++ setValueByPath(parentObject, ['parameters', 'guidanceScale'], fromGuidanceScale); + } +- const fromIndex = getValueByPath(fromObject, ['index']); +- if (fromIndex != null) { +- setValueByPath(toObject, ['index'], fromIndex); ++ const fromSeed = getValueByPath(fromObject, ['seed']); ++ if (parentObject !== undefined && fromSeed != null) { ++ setValueByPath(parentObject, ['parameters', 'seed'], fromSeed); + } +- const fromLogprobsResult = getValueByPath(fromObject, [ +- 'logprobsResult', ++ const fromSafetyFilterLevel = getValueByPath(fromObject, [ ++ 'safetyFilterLevel', + ]); +- if (fromLogprobsResult != null) { +- setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult); ++ if (parentObject !== undefined && fromSafetyFilterLevel != null) { ++ setValueByPath(parentObject, ['parameters', 'safetySetting'], fromSafetyFilterLevel); + } +- const fromSafetyRatings = getValueByPath(fromObject, [ +- 'safetyRatings', ++ const fromPersonGeneration = getValueByPath(fromObject, [ ++ 'personGeneration', + ]); +- if (fromSafetyRatings != null) { +- setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings); ++ if (parentObject !== undefined && fromPersonGeneration != null) { ++ setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration); + } +- return toObject; +-} +-function generateContentResponseFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromCandidates = getValueByPath(fromObject, ['candidates']); +- if (fromCandidates != null) { +- if (Array.isArray(fromCandidates)) { +- setValueByPath(toObject, ['candidates'], fromCandidates.map((item) => { +- return candidateFromVertex(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['candidates'], fromCandidates); +- } ++ const fromIncludeSafetyAttributes = getValueByPath(fromObject, [ ++ 'includeSafetyAttributes', ++ ]); ++ if (parentObject !== undefined && fromIncludeSafetyAttributes != null) { ++ setValueByPath(parentObject, ['parameters', 'includeSafetyAttributes'], fromIncludeSafetyAttributes); + } +- const fromCreateTime = getValueByPath(fromObject, ['createTime']); +- if (fromCreateTime != null) { +- setValueByPath(toObject, ['createTime'], fromCreateTime); ++ const fromIncludeRaiReason = getValueByPath(fromObject, [ ++ 'includeRaiReason', ++ ]); ++ if (parentObject !== undefined && fromIncludeRaiReason != null) { ++ setValueByPath(parentObject, ['parameters', 'includeRaiReason'], fromIncludeRaiReason); + } +- const fromResponseId = getValueByPath(fromObject, ['responseId']); +- if (fromResponseId != null) { +- setValueByPath(toObject, ['responseId'], fromResponseId); ++ const fromLanguage = getValueByPath(fromObject, ['language']); ++ if (parentObject !== undefined && fromLanguage != null) { ++ setValueByPath(parentObject, ['parameters', 'language'], fromLanguage); + } +- const fromModelVersion = getValueByPath(fromObject, ['modelVersion']); +- if (fromModelVersion != null) { +- setValueByPath(toObject, ['modelVersion'], fromModelVersion); ++ const fromOutputMimeType = getValueByPath(fromObject, [ ++ 'outputMimeType', ++ ]); ++ if (parentObject !== undefined && fromOutputMimeType != null) { ++ setValueByPath(parentObject, ['parameters', 'outputOptions', 'mimeType'], fromOutputMimeType); + } +- const fromPromptFeedback = getValueByPath(fromObject, [ +- 'promptFeedback', ++ const fromOutputCompressionQuality = getValueByPath(fromObject, [ ++ 'outputCompressionQuality', + ]); +- if (fromPromptFeedback != null) { +- setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback); ++ if (parentObject !== undefined && fromOutputCompressionQuality != null) { ++ setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality); + } +- const fromUsageMetadata = getValueByPath(fromObject, [ +- 'usageMetadata', ++ const fromAddWatermark = getValueByPath(fromObject, ['addWatermark']); ++ if (parentObject !== undefined && fromAddWatermark != null) { ++ setValueByPath(parentObject, ['parameters', 'addWatermark'], fromAddWatermark); ++ } ++ const fromEnhancePrompt = getValueByPath(fromObject, [ ++ 'enhancePrompt', + ]); +- if (fromUsageMetadata != null) { +- setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata); ++ if (parentObject !== undefined && fromEnhancePrompt != null) { ++ setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt); + } + return toObject; + } +-function contentEmbeddingStatisticsFromVertex(apiClient, fromObject) { ++function generateImagesParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromTruncated = getValueByPath(fromObject, ['truncated']); +- if (fromTruncated != null) { +- setValueByPath(toObject, ['truncated'], fromTruncated); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); + } +- const fromTokenCount = getValueByPath(fromObject, ['token_count']); +- if (fromTokenCount != null) { +- setValueByPath(toObject, ['tokenCount'], fromTokenCount); ++ const fromPrompt = getValueByPath(fromObject, ['prompt']); ++ if (fromPrompt != null) { ++ setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt); ++ } ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], generateImagesConfigToVertex(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function contentEmbeddingFromVertex(apiClient, fromObject) { ++function getModelParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromValues = getValueByPath(fromObject, ['values']); +- if (fromValues != null) { +- setValueByPath(toObject, ['values'], fromValues); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'name'], tModel(apiClient, fromModel)); + } +- const fromStatistics = getValueByPath(fromObject, ['statistics']); +- if (fromStatistics != null) { +- setValueByPath(toObject, ['statistics'], contentEmbeddingStatisticsFromVertex(apiClient, fromStatistics)); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], fromConfig); + } + return toObject; + } +-function embedContentMetadataFromVertex(apiClient, fromObject) { ++function countTokensConfigToVertex(apiClient, fromObject, parentObject) { + const toObject = {}; +- const fromBillableCharacterCount = getValueByPath(fromObject, [ +- 'billableCharacterCount', ++ const fromSystemInstruction = getValueByPath(fromObject, [ ++ 'systemInstruction', + ]); +- if (fromBillableCharacterCount != null) { +- setValueByPath(toObject, ['billableCharacterCount'], fromBillableCharacterCount); ++ if (parentObject !== undefined && fromSystemInstruction != null) { ++ setValueByPath(parentObject, ['systemInstruction'], contentToVertex(apiClient, tContent(apiClient, fromSystemInstruction))); + } +- return toObject; +-} +-function embedContentResponseFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromEmbeddings = getValueByPath(fromObject, [ +- 'predictions[]', +- 'embeddings', +- ]); +- if (fromEmbeddings != null) { +- if (Array.isArray(fromEmbeddings)) { +- setValueByPath(toObject, ['embeddings'], fromEmbeddings.map((item) => { +- return contentEmbeddingFromVertex(apiClient, item); ++ const fromTools = getValueByPath(fromObject, ['tools']); ++ if (parentObject !== undefined && fromTools != null) { ++ if (Array.isArray(fromTools)) { ++ setValueByPath(parentObject, ['tools'], fromTools.map((item) => { ++ return toolToVertex(apiClient, item); + })); + } + else { +- setValueByPath(toObject, ['embeddings'], fromEmbeddings); ++ setValueByPath(parentObject, ['tools'], fromTools); + } + } +- const fromMetadata = getValueByPath(fromObject, ['metadata']); +- if (fromMetadata != null) { +- setValueByPath(toObject, ['metadata'], embedContentMetadataFromVertex(apiClient, fromMetadata)); +- } +- return toObject; +-} +-function imageFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromGcsUri = getValueByPath(fromObject, ['gcsUri']); +- if (fromGcsUri != null) { +- setValueByPath(toObject, ['gcsUri'], fromGcsUri); +- } +- const fromImageBytes = getValueByPath(fromObject, [ +- 'bytesBase64Encoded', +- ]); +- if (fromImageBytes != null) { +- setValueByPath(toObject, ['imageBytes'], tBytes(apiClient, fromImageBytes)); +- } +- const fromMimeType = getValueByPath(fromObject, ['mimeType']); +- if (fromMimeType != null) { +- setValueByPath(toObject, ['mimeType'], fromMimeType); +- } +- return toObject; +-} +-function safetyAttributesFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromCategories = getValueByPath(fromObject, [ +- 'safetyAttributes', +- 'categories', +- ]); +- if (fromCategories != null) { +- setValueByPath(toObject, ['categories'], fromCategories); +- } +- const fromScores = getValueByPath(fromObject, [ +- 'safetyAttributes', +- 'scores', ++ const fromGenerationConfig = getValueByPath(fromObject, [ ++ 'generationConfig', + ]); +- if (fromScores != null) { +- setValueByPath(toObject, ['scores'], fromScores); +- } +- const fromContentType = getValueByPath(fromObject, ['contentType']); +- if (fromContentType != null) { +- setValueByPath(toObject, ['contentType'], fromContentType); ++ if (parentObject !== undefined && fromGenerationConfig != null) { ++ setValueByPath(parentObject, ['generationConfig'], fromGenerationConfig); + } + return toObject; + } +-function generatedImageFromVertex(apiClient, fromObject) { ++function countTokensParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromImage = getValueByPath(fromObject, ['_self']); +- if (fromImage != null) { +- setValueByPath(toObject, ['image'], imageFromVertex(apiClient, fromImage)); +- } +- const fromRaiFilteredReason = getValueByPath(fromObject, [ +- 'raiFilteredReason', +- ]); +- if (fromRaiFilteredReason != null) { +- setValueByPath(toObject, ['raiFilteredReason'], fromRaiFilteredReason); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); + } +- const fromSafetyAttributes = getValueByPath(fromObject, ['_self']); +- if (fromSafetyAttributes != null) { +- setValueByPath(toObject, ['safetyAttributes'], safetyAttributesFromVertex(apiClient, fromSafetyAttributes)); ++ const fromContents = getValueByPath(fromObject, ['contents']); ++ if (fromContents != null) { ++ if (Array.isArray(fromContents)) { ++ setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { ++ return contentToVertex(apiClient, item); ++ }))); ++ } ++ else { ++ setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); ++ } + } +- const fromEnhancedPrompt = getValueByPath(fromObject, ['prompt']); +- if (fromEnhancedPrompt != null) { +- setValueByPath(toObject, ['enhancedPrompt'], fromEnhancedPrompt); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], countTokensConfigToVertex(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function generateImagesResponseFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromGeneratedImages = getValueByPath(fromObject, [ +- 'predictions', +- ]); +- if (fromGeneratedImages != null) { +- if (Array.isArray(fromGeneratedImages)) { +- setValueByPath(toObject, ['generatedImages'], fromGeneratedImages.map((item) => { +- return generatedImageFromVertex(apiClient, item); +- })); ++function computeTokensParametersToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); ++ } ++ const fromContents = getValueByPath(fromObject, ['contents']); ++ if (fromContents != null) { ++ if (Array.isArray(fromContents)) { ++ setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { ++ return contentToVertex(apiClient, item); ++ }))); + } + else { +- setValueByPath(toObject, ['generatedImages'], fromGeneratedImages); ++ setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); + } + } +- const fromPositivePromptSafetyAttributes = getValueByPath(fromObject, [ +- 'positivePromptSafetyAttributes', +- ]); +- if (fromPositivePromptSafetyAttributes != null) { +- setValueByPath(toObject, ['positivePromptSafetyAttributes'], safetyAttributesFromVertex(apiClient, fromPositivePromptSafetyAttributes)); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], fromConfig); + } + return toObject; + } +-function endpointFromVertex(apiClient, fromObject) { ++function imageToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromName = getValueByPath(fromObject, ['endpoint']); +- if (fromName != null) { +- setValueByPath(toObject, ['name'], fromName); ++ const fromGcsUri = getValueByPath(fromObject, ['gcsUri']); ++ if (fromGcsUri != null) { ++ setValueByPath(toObject, ['gcsUri'], fromGcsUri); + } +- const fromDeployedModelId = getValueByPath(fromObject, [ +- 'deployedModelId', +- ]); +- if (fromDeployedModelId != null) { +- setValueByPath(toObject, ['deployedModelId'], fromDeployedModelId); ++ const fromImageBytes = getValueByPath(fromObject, ['imageBytes']); ++ if (fromImageBytes != null) { ++ setValueByPath(toObject, ['bytesBase64Encoded'], tBytes(apiClient, fromImageBytes)); ++ } ++ const fromMimeType = getValueByPath(fromObject, ['mimeType']); ++ if (fromMimeType != null) { ++ setValueByPath(toObject, ['mimeType'], fromMimeType); + } + return toObject; + } +-function tunedModelInfoFromVertex(apiClient, fromObject) { ++function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { + const toObject = {}; +- const fromBaseModel = getValueByPath(fromObject, [ +- 'labels', +- 'google-vertex-llm-tuning-base-model-id', ++ const fromNumberOfVideos = getValueByPath(fromObject, [ ++ 'numberOfVideos', + ]); +- if (fromBaseModel != null) { +- setValueByPath(toObject, ['baseModel'], fromBaseModel); +- } +- const fromCreateTime = getValueByPath(fromObject, ['createTime']); +- if (fromCreateTime != null) { +- setValueByPath(toObject, ['createTime'], fromCreateTime); ++ if (parentObject !== undefined && fromNumberOfVideos != null) { ++ setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfVideos); + } +- const fromUpdateTime = getValueByPath(fromObject, ['updateTime']); +- if (fromUpdateTime != null) { +- setValueByPath(toObject, ['updateTime'], fromUpdateTime); ++ const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']); ++ if (parentObject !== undefined && fromOutputGcsUri != null) { ++ setValueByPath(parentObject, ['parameters', 'storageUri'], fromOutputGcsUri); + } +- return toObject; +-} +-function modelFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName != null) { +- setValueByPath(toObject, ['name'], fromName); ++ const fromFps = getValueByPath(fromObject, ['fps']); ++ if (parentObject !== undefined && fromFps != null) { ++ setValueByPath(parentObject, ['parameters', 'fps'], fromFps); + } +- const fromDisplayName = getValueByPath(fromObject, ['displayName']); +- if (fromDisplayName != null) { +- setValueByPath(toObject, ['displayName'], fromDisplayName); ++ const fromDurationSeconds = getValueByPath(fromObject, [ ++ 'durationSeconds', ++ ]); ++ if (parentObject !== undefined && fromDurationSeconds != null) { ++ setValueByPath(parentObject, ['parameters', 'durationSeconds'], fromDurationSeconds); + } +- const fromDescription = getValueByPath(fromObject, ['description']); +- if (fromDescription != null) { +- setValueByPath(toObject, ['description'], fromDescription); ++ const fromSeed = getValueByPath(fromObject, ['seed']); ++ if (parentObject !== undefined && fromSeed != null) { ++ setValueByPath(parentObject, ['parameters', 'seed'], fromSeed); + } +- const fromVersion = getValueByPath(fromObject, ['versionId']); +- if (fromVersion != null) { +- setValueByPath(toObject, ['version'], fromVersion); ++ const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']); ++ if (parentObject !== undefined && fromAspectRatio != null) { ++ setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio); + } +- const fromEndpoints = getValueByPath(fromObject, ['deployedModels']); +- if (fromEndpoints != null) { +- if (Array.isArray(fromEndpoints)) { +- setValueByPath(toObject, ['endpoints'], fromEndpoints.map((item) => { +- return endpointFromVertex(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['endpoints'], fromEndpoints); +- } ++ const fromResolution = getValueByPath(fromObject, ['resolution']); ++ if (parentObject !== undefined && fromResolution != null) { ++ setValueByPath(parentObject, ['parameters', 'resolution'], fromResolution); + } +- const fromLabels = getValueByPath(fromObject, ['labels']); +- if (fromLabels != null) { +- setValueByPath(toObject, ['labels'], fromLabels); ++ const fromPersonGeneration = getValueByPath(fromObject, [ ++ 'personGeneration', ++ ]); ++ if (parentObject !== undefined && fromPersonGeneration != null) { ++ setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration); + } +- const fromTunedModelInfo = getValueByPath(fromObject, ['_self']); +- if (fromTunedModelInfo != null) { +- setValueByPath(toObject, ['tunedModelInfo'], tunedModelInfoFromVertex(apiClient, fromTunedModelInfo)); ++ const fromPubsubTopic = getValueByPath(fromObject, ['pubsubTopic']); ++ if (parentObject !== undefined && fromPubsubTopic != null) { ++ setValueByPath(parentObject, ['parameters', 'pubsubTopic'], fromPubsubTopic); + } +- return toObject; +-} +-function countTokensResponseFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromTotalTokens = getValueByPath(fromObject, ['totalTokens']); +- if (fromTotalTokens != null) { +- setValueByPath(toObject, ['totalTokens'], fromTotalTokens); ++ const fromNegativePrompt = getValueByPath(fromObject, [ ++ 'negativePrompt', ++ ]); ++ if (parentObject !== undefined && fromNegativePrompt != null) { ++ setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt); + } +- return toObject; +-} +-function computeTokensResponseFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromTokensInfo = getValueByPath(fromObject, ['tokensInfo']); +- if (fromTokensInfo != null) { +- setValueByPath(toObject, ['tokensInfo'], fromTokensInfo); ++ const fromEnhancePrompt = getValueByPath(fromObject, [ ++ 'enhancePrompt', ++ ]); ++ if (parentObject !== undefined && fromEnhancePrompt != null) { ++ setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt); + } + return toObject; + } +-function videoFromVertex$1(apiClient, fromObject) { ++function generateVideosParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromUri = getValueByPath(fromObject, ['gcsUri']); +- if (fromUri != null) { +- setValueByPath(toObject, ['uri'], fromUri); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); + } +- const fromVideoBytes = getValueByPath(fromObject, [ +- 'bytesBase64Encoded', +- ]); +- if (fromVideoBytes != null) { +- setValueByPath(toObject, ['videoBytes'], tBytes(apiClient, fromVideoBytes)); ++ const fromPrompt = getValueByPath(fromObject, ['prompt']); ++ if (fromPrompt != null) { ++ setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt); + } +- const fromMimeType = getValueByPath(fromObject, ['mimeType']); +- if (fromMimeType != null) { +- setValueByPath(toObject, ['mimeType'], fromMimeType); ++ const fromImage = getValueByPath(fromObject, ['image']); ++ if (fromImage != null) { ++ setValueByPath(toObject, ['instances[0]', 'image'], imageToVertex(apiClient, fromImage)); + } +- return toObject; +-} +-function generatedVideoFromVertex$1(apiClient, fromObject) { +- const toObject = {}; +- const fromVideo = getValueByPath(fromObject, ['_self']); +- if (fromVideo != null) { +- setValueByPath(toObject, ['video'], videoFromVertex$1(apiClient, fromVideo)); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], generateVideosConfigToVertex(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function generateVideosResponseFromVertex$1(apiClient, fromObject) { ++function partFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromGeneratedVideos = getValueByPath(fromObject, ['videos']); +- if (fromGeneratedVideos != null) { +- if (Array.isArray(fromGeneratedVideos)) { +- setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos.map((item) => { +- return generatedVideoFromVertex$1(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos); +- } ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); + } +- const fromRaiMediaFilteredCount = getValueByPath(fromObject, [ +- 'raiMediaFilteredCount', ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', + ]); +- if (fromRaiMediaFilteredCount != null) { +- setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); + } +- const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [ +- 'raiMediaFilteredReasons', ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', + ]); +- if (fromRaiMediaFilteredReasons != null) { +- setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons); +- } +- return toObject; +-} +-function generateVideosOperationFromVertex$1(apiClient, fromObject) { +- const toObject = {}; +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName != null) { +- setValueByPath(toObject, ['name'], fromName); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); + } +- const fromMetadata = getValueByPath(fromObject, ['metadata']); +- if (fromMetadata != null) { +- setValueByPath(toObject, ['metadata'], fromMetadata); ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); + } +- const fromDone = getValueByPath(fromObject, ['done']); +- if (fromDone != null) { +- setValueByPath(toObject, ['done'], fromDone); ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); + } +- const fromError = getValueByPath(fromObject, ['error']); +- if (fromError != null) { +- setValueByPath(toObject, ['error'], fromError); ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', ++ ]); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); + } +- const fromResponse = getValueByPath(fromObject, ['response']); +- if (fromResponse != null) { +- setValueByPath(toObject, ['response'], generateVideosResponseFromVertex$1(apiClient, fromResponse)); ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); + } +- const fromResult = getValueByPath(fromObject, ['response']); +- if (fromResult != null) { +- setValueByPath(toObject, ['result'], generateVideosResponseFromVertex$1(apiClient, fromResult)); ++ const fromText = getValueByPath(fromObject, ['text']); ++ if (fromText != null) { ++ setValueByPath(toObject, ['text'], fromText); + } + return toObject; + } +- +-/** +- * @license +- * Copyright 2025 Google LLC +- * SPDX-License-Identifier: Apache-2.0 +- */ +-/** +- * Converters for live client. +- */ +-function liveConnectParametersToMldev(apiClient, fromObject) { ++function contentFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig !== undefined && fromConfig !== null) { +- setValueByPath(toObject, ['setup'], liveConnectConfigToMldev(apiClient, fromConfig)); ++ const fromParts = getValueByPath(fromObject, ['parts']); ++ if (fromParts != null) { ++ if (Array.isArray(fromParts)) { ++ setValueByPath(toObject, ['parts'], fromParts.map((item) => { ++ return partFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['parts'], fromParts); ++ } + } +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel !== undefined) { +- setValueByPath(toObject, ['setup', 'model'], fromModel); ++ const fromRole = getValueByPath(fromObject, ['role']); ++ if (fromRole != null) { ++ setValueByPath(toObject, ['role'], fromRole); + } + return toObject; + } +-function liveConnectParametersToVertex(apiClient, fromObject) { ++function citationMetadataFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig !== undefined && fromConfig !== null) { +- setValueByPath(toObject, ['setup'], liveConnectConfigToVertex(apiClient, fromConfig)); +- } +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel !== undefined) { +- setValueByPath(toObject, ['setup', 'model'], fromModel); ++ const fromCitations = getValueByPath(fromObject, ['citationSources']); ++ if (fromCitations != null) { ++ setValueByPath(toObject, ['citations'], fromCitations); + } + return toObject; + } +-function liveServerMessageFromMldev(apiClient, fromObject) { ++function candidateFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromSetupComplete = getValueByPath(fromObject, [ +- 'setupComplete', +- ]); +- if (fromSetupComplete !== undefined) { +- setValueByPath(toObject, ['setupComplete'], fromSetupComplete); ++ const fromContent = getValueByPath(fromObject, ['content']); ++ if (fromContent != null) { ++ setValueByPath(toObject, ['content'], contentFromMldev(apiClient, fromContent)); + } +- const fromServerContent = getValueByPath(fromObject, [ +- 'serverContent', ++ const fromCitationMetadata = getValueByPath(fromObject, [ ++ 'citationMetadata', + ]); +- if (fromServerContent !== undefined && fromServerContent !== null) { +- setValueByPath(toObject, ['serverContent'], liveServerContentFromMldev(apiClient, fromServerContent)); ++ if (fromCitationMetadata != null) { ++ setValueByPath(toObject, ['citationMetadata'], citationMetadataFromMldev(apiClient, fromCitationMetadata)); + } +- const fromToolCall = getValueByPath(fromObject, ['toolCall']); +- if (fromToolCall !== undefined && fromToolCall !== null) { +- setValueByPath(toObject, ['toolCall'], liveServerToolCallFromMldev(apiClient, fromToolCall)); ++ const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); ++ if (fromTokenCount != null) { ++ setValueByPath(toObject, ['tokenCount'], fromTokenCount); + } +- const fromToolCallCancellation = getValueByPath(fromObject, [ +- 'toolCallCancellation', +- ]); +- if (fromToolCallCancellation !== undefined && +- fromToolCallCancellation !== null) { +- setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromMldev(apiClient, fromToolCallCancellation)); ++ const fromFinishReason = getValueByPath(fromObject, ['finishReason']); ++ if (fromFinishReason != null) { ++ setValueByPath(toObject, ['finishReason'], fromFinishReason); + } +- const fromUsageMetadata = getValueByPath(fromObject, [ +- 'usageMetadata', ++ const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']); ++ if (fromAvgLogprobs != null) { ++ setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs); ++ } ++ const fromGroundingMetadata = getValueByPath(fromObject, [ ++ 'groundingMetadata', + ]); +- if (fromUsageMetadata != undefined && fromUsageMetadata != null) { +- setValueByPath(toObject, ['usageMetadata'], usageMetadataFromMldev(apiClient, fromUsageMetadata)); ++ if (fromGroundingMetadata != null) { ++ setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata); + } +- const fromGoAway = getValueByPath(fromObject, ['goAway']); +- if (fromGoAway !== undefined && fromGoAway !== null) { +- setValueByPath(toObject, ['goAway'], liveServerGoAwayFromMldev(fromGoAway)); ++ const fromIndex = getValueByPath(fromObject, ['index']); ++ if (fromIndex != null) { ++ setValueByPath(toObject, ['index'], fromIndex); + } +- const fromSessionResumptionUpdate = getValueByPath(fromObject, [ +- 'sessionResumptionUpdate', ++ const fromLogprobsResult = getValueByPath(fromObject, [ ++ 'logprobsResult', ++ ]); ++ if (fromLogprobsResult != null) { ++ setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult); ++ } ++ const fromSafetyRatings = getValueByPath(fromObject, [ ++ 'safetyRatings', + ]); +- if (fromSessionResumptionUpdate !== undefined && +- fromSessionResumptionUpdate !== null) { +- setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromMldev(fromSessionResumptionUpdate)); ++ if (fromSafetyRatings != null) { ++ setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings); + } + return toObject; + } +-function liveServerMessageFromVertex(apiClient, fromObject) { ++function generateContentResponseFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromSetupComplete = getValueByPath(fromObject, [ +- 'setupComplete', +- ]); +- if (fromSetupComplete !== undefined) { +- setValueByPath(toObject, ['setupComplete'], fromSetupComplete); +- } +- const fromServerContent = getValueByPath(fromObject, [ +- 'serverContent', +- ]); +- if (fromServerContent !== undefined && fromServerContent !== null) { +- setValueByPath(toObject, ['serverContent'], liveServerContentFromVertex(apiClient, fromServerContent)); +- } +- const fromToolCall = getValueByPath(fromObject, ['toolCall']); +- if (fromToolCall !== undefined && fromToolCall !== null) { +- setValueByPath(toObject, ['toolCall'], liveServerToolCallFromVertex(apiClient, fromToolCall)); +- } +- const fromToolCallCancellation = getValueByPath(fromObject, [ +- 'toolCallCancellation', +- ]); +- if (fromToolCallCancellation !== undefined && +- fromToolCallCancellation !== null) { +- setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromVertex(apiClient, fromToolCallCancellation)); ++ const fromCandidates = getValueByPath(fromObject, ['candidates']); ++ if (fromCandidates != null) { ++ if (Array.isArray(fromCandidates)) { ++ setValueByPath(toObject, ['candidates'], fromCandidates.map((item) => { ++ return candidateFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['candidates'], fromCandidates); ++ } + } +- const fromGoAway = getValueByPath(fromObject, ['goAway']); +- if (fromGoAway !== undefined && fromGoAway !== null) { +- setValueByPath(toObject, ['goAway'], liveServerGoAwayFromVertex(fromGoAway)); ++ const fromModelVersion = getValueByPath(fromObject, ['modelVersion']); ++ if (fromModelVersion != null) { ++ setValueByPath(toObject, ['modelVersion'], fromModelVersion); + } +- const fromSessionResumptionUpdate = getValueByPath(fromObject, [ +- 'sessionResumptionUpdate', ++ const fromPromptFeedback = getValueByPath(fromObject, [ ++ 'promptFeedback', + ]); +- if (fromSessionResumptionUpdate !== undefined && +- fromSessionResumptionUpdate !== null) { +- setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromVertex(fromSessionResumptionUpdate)); ++ if (fromPromptFeedback != null) { ++ setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback); + } + const fromUsageMetadata = getValueByPath(fromObject, [ + 'usageMetadata', + ]); +- if (fromUsageMetadata != undefined && fromUsageMetadata != null) { +- setValueByPath(toObject, ['usageMetadata'], usageMetadataFromVertex(apiClient, fromUsageMetadata)); ++ if (fromUsageMetadata != null) { ++ setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata); + } + return toObject; + } +-function slidingWindowToMldev(fromObject) { ++function contentEmbeddingFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']); +- if (fromTargetTokens !== undefined && fromTargetTokens !== null) { +- setValueByPath(toObject, ['targetTokens'], fromTargetTokens); ++ const fromValues = getValueByPath(fromObject, ['values']); ++ if (fromValues != null) { ++ setValueByPath(toObject, ['values'], fromValues); + } + return toObject; + } +-function slidingWindowToVertex(fromObject) { ++function embedContentMetadataFromMldev() { + const toObject = {}; +- const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']); +- if (fromTargetTokens !== undefined && fromTargetTokens !== null) { +- setValueByPath(toObject, ['targetTokens'], fromTargetTokens); ++ return toObject; ++} ++function embedContentResponseFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromEmbeddings = getValueByPath(fromObject, ['embeddings']); ++ if (fromEmbeddings != null) { ++ if (Array.isArray(fromEmbeddings)) { ++ setValueByPath(toObject, ['embeddings'], fromEmbeddings.map((item) => { ++ return contentEmbeddingFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['embeddings'], fromEmbeddings); ++ } ++ } ++ const fromMetadata = getValueByPath(fromObject, ['metadata']); ++ if (fromMetadata != null) { ++ setValueByPath(toObject, ['metadata'], embedContentMetadataFromMldev()); + } + return toObject; + } +-function contextWindowCompressionToMldev(fromObject) { ++function imageFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromTriggerTokens = getValueByPath(fromObject, [ +- 'triggerTokens', ++ const fromImageBytes = getValueByPath(fromObject, [ ++ 'bytesBase64Encoded', + ]); +- if (fromTriggerTokens !== undefined && fromTriggerTokens !== null) { +- setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens); ++ if (fromImageBytes != null) { ++ setValueByPath(toObject, ['imageBytes'], tBytes(apiClient, fromImageBytes)); + } +- const fromSlidingWindow = getValueByPath(fromObject, [ +- 'slidingWindow', +- ]); +- if (fromSlidingWindow !== undefined && fromSlidingWindow !== null) { +- setValueByPath(toObject, ['slidingWindow'], slidingWindowToMldev(fromSlidingWindow)); ++ const fromMimeType = getValueByPath(fromObject, ['mimeType']); ++ if (fromMimeType != null) { ++ setValueByPath(toObject, ['mimeType'], fromMimeType); + } + return toObject; + } +-function contextWindowCompressionToVertex(fromObject) { ++function safetyAttributesFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromTriggerTokens = getValueByPath(fromObject, [ +- 'triggerTokens', ++ const fromCategories = getValueByPath(fromObject, [ ++ 'safetyAttributes', ++ 'categories', + ]); +- if (fromTriggerTokens !== undefined && fromTriggerTokens !== null) { +- setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens); ++ if (fromCategories != null) { ++ setValueByPath(toObject, ['categories'], fromCategories); + } +- const fromSlidingWindow = getValueByPath(fromObject, [ +- 'slidingWindow', ++ const fromScores = getValueByPath(fromObject, [ ++ 'safetyAttributes', ++ 'scores', + ]); +- if (fromSlidingWindow !== undefined && fromSlidingWindow !== null) { +- setValueByPath(toObject, ['slidingWindow'], slidingWindowToVertex(fromSlidingWindow)); ++ if (fromScores != null) { ++ setValueByPath(toObject, ['scores'], fromScores); ++ } ++ const fromContentType = getValueByPath(fromObject, ['contentType']); ++ if (fromContentType != null) { ++ setValueByPath(toObject, ['contentType'], fromContentType); + } + return toObject; + } +-function automaticActivityDetectionToMldev(fromObject) { ++function generatedImageFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromDisabled = getValueByPath(fromObject, ['disabled']); +- if (fromDisabled !== undefined && fromDisabled !== null) { +- setValueByPath(toObject, ['disabled'], fromDisabled); ++ const fromImage = getValueByPath(fromObject, ['_self']); ++ if (fromImage != null) { ++ setValueByPath(toObject, ['image'], imageFromMldev(apiClient, fromImage)); + } +- const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [ +- 'startOfSpeechSensitivity', ++ const fromRaiFilteredReason = getValueByPath(fromObject, [ ++ 'raiFilteredReason', + ]); +- if (fromStartOfSpeechSensitivity !== undefined && +- fromStartOfSpeechSensitivity !== null) { +- setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity); ++ if (fromRaiFilteredReason != null) { ++ setValueByPath(toObject, ['raiFilteredReason'], fromRaiFilteredReason); + } +- const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [ +- 'endOfSpeechSensitivity', +- ]); +- if (fromEndOfSpeechSensitivity !== undefined && +- fromEndOfSpeechSensitivity !== null) { +- setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity); ++ const fromSafetyAttributes = getValueByPath(fromObject, ['_self']); ++ if (fromSafetyAttributes != null) { ++ setValueByPath(toObject, ['safetyAttributes'], safetyAttributesFromMldev(apiClient, fromSafetyAttributes)); + } +- const fromPrefixPaddingMs = getValueByPath(fromObject, [ +- 'prefixPaddingMs', ++ return toObject; ++} ++function generateImagesResponseFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromGeneratedImages = getValueByPath(fromObject, [ ++ 'predictions', + ]); +- if (fromPrefixPaddingMs !== undefined && fromPrefixPaddingMs !== null) { +- setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs); ++ if (fromGeneratedImages != null) { ++ if (Array.isArray(fromGeneratedImages)) { ++ setValueByPath(toObject, ['generatedImages'], fromGeneratedImages.map((item) => { ++ return generatedImageFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['generatedImages'], fromGeneratedImages); ++ } + } +- const fromSilenceDurationMs = getValueByPath(fromObject, [ +- 'silenceDurationMs', ++ const fromPositivePromptSafetyAttributes = getValueByPath(fromObject, [ ++ 'positivePromptSafetyAttributes', + ]); +- if (fromSilenceDurationMs !== undefined && fromSilenceDurationMs !== null) { +- setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs); ++ if (fromPositivePromptSafetyAttributes != null) { ++ setValueByPath(toObject, ['positivePromptSafetyAttributes'], safetyAttributesFromMldev(apiClient, fromPositivePromptSafetyAttributes)); + } + return toObject; + } +-function automaticActivityDetectionToVertex(fromObject) { ++function tunedModelInfoFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromDisabled = getValueByPath(fromObject, ['disabled']); +- if (fromDisabled !== undefined && fromDisabled !== null) { +- setValueByPath(toObject, ['disabled'], fromDisabled); ++ const fromBaseModel = getValueByPath(fromObject, ['baseModel']); ++ if (fromBaseModel != null) { ++ setValueByPath(toObject, ['baseModel'], fromBaseModel); + } +- const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [ +- 'startOfSpeechSensitivity', +- ]); +- if (fromStartOfSpeechSensitivity !== undefined && +- fromStartOfSpeechSensitivity !== null) { +- setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity); ++ const fromCreateTime = getValueByPath(fromObject, ['createTime']); ++ if (fromCreateTime != null) { ++ setValueByPath(toObject, ['createTime'], fromCreateTime); ++ } ++ const fromUpdateTime = getValueByPath(fromObject, ['updateTime']); ++ if (fromUpdateTime != null) { ++ setValueByPath(toObject, ['updateTime'], fromUpdateTime); ++ } ++ return toObject; ++} ++function modelFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); ++ } ++ const fromDisplayName = getValueByPath(fromObject, ['displayName']); ++ if (fromDisplayName != null) { ++ setValueByPath(toObject, ['displayName'], fromDisplayName); ++ } ++ const fromDescription = getValueByPath(fromObject, ['description']); ++ if (fromDescription != null) { ++ setValueByPath(toObject, ['description'], fromDescription); ++ } ++ const fromVersion = getValueByPath(fromObject, ['version']); ++ if (fromVersion != null) { ++ setValueByPath(toObject, ['version'], fromVersion); + } +- const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [ +- 'endOfSpeechSensitivity', ++ const fromTunedModelInfo = getValueByPath(fromObject, ['_self']); ++ if (fromTunedModelInfo != null) { ++ setValueByPath(toObject, ['tunedModelInfo'], tunedModelInfoFromMldev(apiClient, fromTunedModelInfo)); ++ } ++ const fromInputTokenLimit = getValueByPath(fromObject, [ ++ 'inputTokenLimit', + ]); +- if (fromEndOfSpeechSensitivity !== undefined && +- fromEndOfSpeechSensitivity !== null) { +- setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity); ++ if (fromInputTokenLimit != null) { ++ setValueByPath(toObject, ['inputTokenLimit'], fromInputTokenLimit); + } +- const fromPrefixPaddingMs = getValueByPath(fromObject, [ +- 'prefixPaddingMs', ++ const fromOutputTokenLimit = getValueByPath(fromObject, [ ++ 'outputTokenLimit', + ]); +- if (fromPrefixPaddingMs !== undefined && fromPrefixPaddingMs !== null) { +- setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs); ++ if (fromOutputTokenLimit != null) { ++ setValueByPath(toObject, ['outputTokenLimit'], fromOutputTokenLimit); + } +- const fromSilenceDurationMs = getValueByPath(fromObject, [ +- 'silenceDurationMs', ++ const fromSupportedActions = getValueByPath(fromObject, [ ++ 'supportedGenerationMethods', + ]); +- if (fromSilenceDurationMs !== undefined && fromSilenceDurationMs !== null) { +- setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs); ++ if (fromSupportedActions != null) { ++ setValueByPath(toObject, ['supportedActions'], fromSupportedActions); + } + return toObject; + } +-function realtimeInputConfigToMldev(fromObject) { ++function countTokensResponseFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromAutomaticActivityDetection = getValueByPath(fromObject, [ +- 'automaticActivityDetection', +- ]); +- if (fromAutomaticActivityDetection !== undefined && +- fromAutomaticActivityDetection !== null) { +- setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToMldev(fromAutomaticActivityDetection)); ++ const fromTotalTokens = getValueByPath(fromObject, ['totalTokens']); ++ if (fromTotalTokens != null) { ++ setValueByPath(toObject, ['totalTokens'], fromTotalTokens); + } +- const fromActivityHandling = getValueByPath(fromObject, [ +- 'activityHandling', ++ const fromCachedContentTokenCount = getValueByPath(fromObject, [ ++ 'cachedContentTokenCount', + ]); +- if (fromActivityHandling !== undefined && fromActivityHandling !== null) { +- setValueByPath(toObject, ['activityHandling'], fromActivityHandling); +- } +- const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']); +- if (fromTurnCoverage !== undefined && fromTurnCoverage !== null) { +- setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage); ++ if (fromCachedContentTokenCount != null) { ++ setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); + } + return toObject; + } +-function realtimeInputConfigToVertex(fromObject) { ++function videoFromMldev$1(apiClient, fromObject) { + const toObject = {}; +- const fromAutomaticActivityDetection = getValueByPath(fromObject, [ +- 'automaticActivityDetection', +- ]); +- if (fromAutomaticActivityDetection !== undefined && +- fromAutomaticActivityDetection !== null) { +- setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToVertex(fromAutomaticActivityDetection)); ++ const fromUri = getValueByPath(fromObject, ['video', 'uri']); ++ if (fromUri != null) { ++ setValueByPath(toObject, ['uri'], fromUri); + } +- const fromActivityHandling = getValueByPath(fromObject, [ +- 'activityHandling', ++ const fromVideoBytes = getValueByPath(fromObject, [ ++ 'video', ++ 'encodedVideo', + ]); +- if (fromActivityHandling !== undefined && fromActivityHandling !== null) { +- setValueByPath(toObject, ['activityHandling'], fromActivityHandling); ++ if (fromVideoBytes != null) { ++ setValueByPath(toObject, ['videoBytes'], tBytes(apiClient, fromVideoBytes)); + } +- const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']); +- if (fromTurnCoverage !== undefined && fromTurnCoverage !== null) { +- setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage); ++ const fromMimeType = getValueByPath(fromObject, ['encoding']); ++ if (fromMimeType != null) { ++ setValueByPath(toObject, ['mimeType'], fromMimeType); + } + return toObject; + } +-function liveConnectConfigToMldev(apiClient, fromObject) { ++function generatedVideoFromMldev$1(apiClient, fromObject) { + const toObject = {}; +- const fromGenerationConfig = getValueByPath(fromObject, [ +- 'generationConfig', +- ]); +- if (fromGenerationConfig !== undefined) { +- setValueByPath(toObject, ['generationConfig'], fromGenerationConfig); ++ const fromVideo = getValueByPath(fromObject, ['_self']); ++ if (fromVideo != null) { ++ setValueByPath(toObject, ['video'], videoFromMldev$1(apiClient, fromVideo)); + } +- const fromResponseModalities = getValueByPath(fromObject, [ +- 'responseModalities', ++ return toObject; ++} ++function generateVideosResponseFromMldev$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromGeneratedVideos = getValueByPath(fromObject, [ ++ 'generatedSamples', + ]); +- if (fromResponseModalities !== undefined) { +- setValueByPath(toObject, ['generationConfig', 'responseModalities'], fromResponseModalities); ++ if (fromGeneratedVideos != null) { ++ if (Array.isArray(fromGeneratedVideos)) { ++ setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos.map((item) => { ++ return generatedVideoFromMldev$1(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos); ++ } + } +- const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); +- if (fromSpeechConfig !== undefined) { +- setValueByPath(toObject, ['generationConfig', 'speechConfig'], fromSpeechConfig); ++ const fromRaiMediaFilteredCount = getValueByPath(fromObject, [ ++ 'raiMediaFilteredCount', ++ ]); ++ if (fromRaiMediaFilteredCount != null) { ++ setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount); + } +- const fromSystemInstruction = getValueByPath(fromObject, [ +- 'systemInstruction', ++ const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [ ++ 'raiMediaFilteredReasons', + ]); +- if (fromSystemInstruction !== undefined && fromSystemInstruction !== null) { +- setValueByPath(toObject, ['systemInstruction'], contentToMldev(apiClient, fromSystemInstruction)); ++ if (fromRaiMediaFilteredReasons != null) { ++ setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons); + } +- const fromTools = getValueByPath(fromObject, ['tools']); +- if (fromTools !== undefined && +- fromTools !== null && +- Array.isArray(fromTools)) { +- setValueByPath(toObject, ['tools'], fromTools.map((item) => { +- return toolToMldev(apiClient, item); +- })); ++ return toObject; ++} ++function generateVideosOperationFromMldev$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); + } +- const fromSessionResumption = getValueByPath(fromObject, [ +- 'sessionResumption', +- ]); +- if (fromSessionResumption !== undefined && fromSessionResumption !== null) { +- setValueByPath(toObject, ['sessionResumption'], liveClientSessionResumptionConfigToMldev(fromSessionResumption)); ++ const fromMetadata = getValueByPath(fromObject, ['metadata']); ++ if (fromMetadata != null) { ++ setValueByPath(toObject, ['metadata'], fromMetadata); + } +- const fromContextWindowCompression = getValueByPath(fromObject, [ +- 'contextWindowCompression', +- ]); +- if (fromContextWindowCompression !== undefined && +- fromContextWindowCompression !== null) { +- setValueByPath(toObject, ['contextWindowCompression'], contextWindowCompressionToMldev(fromContextWindowCompression)); ++ const fromDone = getValueByPath(fromObject, ['done']); ++ if (fromDone != null) { ++ setValueByPath(toObject, ['done'], fromDone); + } +- const fromRealtimeInputConfig = getValueByPath(fromObject, [ +- 'realtimeInputConfig', ++ const fromError = getValueByPath(fromObject, ['error']); ++ if (fromError != null) { ++ setValueByPath(toObject, ['error'], fromError); ++ } ++ const fromResponse = getValueByPath(fromObject, [ ++ 'response', ++ 'generateVideoResponse', + ]); +- if (fromRealtimeInputConfig !== undefined && +- fromRealtimeInputConfig !== null) { +- setValueByPath(toObject, ['realtimeInputConfig'], realtimeInputConfigToMldev(fromRealtimeInputConfig)); ++ if (fromResponse != null) { ++ setValueByPath(toObject, ['response'], generateVideosResponseFromMldev$1(apiClient, fromResponse)); + } + return toObject; + } +-function liveConnectConfigToVertex(apiClient, fromObject) { ++function partFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromGenerationConfig = getValueByPath(fromObject, [ +- 'generationConfig', +- ]); +- if (fromGenerationConfig !== undefined) { +- setValueByPath(toObject, ['generationConfig'], fromGenerationConfig); +- } +- const fromResponseModalities = getValueByPath(fromObject, [ +- 'responseModalities', ++ const fromVideoMetadata = getValueByPath(fromObject, [ ++ 'videoMetadata', + ]); +- if (fromResponseModalities !== undefined) { +- setValueByPath(toObject, ['generationConfig', 'responseModalities'], fromResponseModalities); ++ if (fromVideoMetadata != null) { ++ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); + } +- else { +- // Set default to AUDIO to align with MLDev API. +- setValueByPath(toObject, ['generationConfig', 'responseModalities'], ['AUDIO']); ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); + } +- const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); +- if (fromSpeechConfig !== undefined) { +- setValueByPath(toObject, ['generationConfig', 'speechConfig'], fromSpeechConfig); ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', ++ ]); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); + } +- const fromSystemInstruction = getValueByPath(fromObject, [ +- 'systemInstruction', ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', + ]); +- if (fromSystemInstruction !== undefined && fromSystemInstruction !== null) { +- setValueByPath(toObject, ['systemInstruction'], contentToVertex(apiClient, fromSystemInstruction)); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); + } +- const fromTools = getValueByPath(fromObject, ['tools']); +- if (fromTools !== undefined && +- fromTools !== null && +- Array.isArray(fromTools)) { +- setValueByPath(toObject, ['tools'], fromTools.map((item) => { +- return toolToVertex(apiClient, item); +- })); ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); + } +- const fromSessionResumption = getValueByPath(fromObject, [ +- 'sessionResumption', +- ]); +- if (fromSessionResumption !== undefined && fromSessionResumption !== null) { +- setValueByPath(toObject, ['sessionResumption'], liveClientSessionResumptionConfigToVertex(fromSessionResumption)); ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); + } +- const fromContextWindowCompression = getValueByPath(fromObject, [ +- 'contextWindowCompression', ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', + ]); +- if (fromContextWindowCompression !== undefined && +- fromContextWindowCompression !== null) { +- setValueByPath(toObject, ['contextWindowCompression'], contextWindowCompressionToVertex(fromContextWindowCompression)); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); + } +- const fromRealtimeInputConfig = getValueByPath(fromObject, [ +- 'realtimeInputConfig', +- ]); +- if (fromRealtimeInputConfig !== undefined && +- fromRealtimeInputConfig !== null) { +- setValueByPath(toObject, ['realtimeInputConfig'], realtimeInputConfigToVertex(fromRealtimeInputConfig)); ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); ++ } ++ const fromText = getValueByPath(fromObject, ['text']); ++ if (fromText != null) { ++ setValueByPath(toObject, ['text'], fromText); + } + return toObject; + } +-function liveServerContentFromMldev(apiClient, fromObject) { ++function contentFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromModelTurn = getValueByPath(fromObject, ['modelTurn']); +- if (fromModelTurn !== undefined && fromModelTurn !== null) { +- setValueByPath(toObject, ['modelTurn'], contentFromMldev(apiClient, fromModelTurn)); +- } +- const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']); +- if (fromTurnComplete !== undefined) { +- setValueByPath(toObject, ['turnComplete'], fromTurnComplete); ++ const fromParts = getValueByPath(fromObject, ['parts']); ++ if (fromParts != null) { ++ if (Array.isArray(fromParts)) { ++ setValueByPath(toObject, ['parts'], fromParts.map((item) => { ++ return partFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['parts'], fromParts); ++ } + } +- const fromInterrupted = getValueByPath(fromObject, ['interrupted']); +- if (fromInterrupted !== undefined) { +- setValueByPath(toObject, ['interrupted'], fromInterrupted); ++ const fromRole = getValueByPath(fromObject, ['role']); ++ if (fromRole != null) { ++ setValueByPath(toObject, ['role'], fromRole); + } +- const fromGenerationComplete = getValueByPath(fromObject, [ +- 'generationComplete', +- ]); +- if (fromGenerationComplete != null) { +- setValueByPath(toObject, ['generationComplete'], fromGenerationComplete); ++ return toObject; ++} ++function citationMetadataFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromCitations = getValueByPath(fromObject, ['citations']); ++ if (fromCitations != null) { ++ setValueByPath(toObject, ['citations'], fromCitations); + } + return toObject; + } +-function liveServerContentFromVertex(apiClient, fromObject) { ++function candidateFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromModelTurn = getValueByPath(fromObject, ['modelTurn']); +- if (fromModelTurn !== undefined && fromModelTurn !== null) { +- setValueByPath(toObject, ['modelTurn'], contentFromVertex(apiClient, fromModelTurn)); ++ const fromContent = getValueByPath(fromObject, ['content']); ++ if (fromContent != null) { ++ setValueByPath(toObject, ['content'], contentFromVertex(apiClient, fromContent)); + } +- const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']); +- if (fromTurnComplete !== undefined) { +- setValueByPath(toObject, ['turnComplete'], fromTurnComplete); ++ const fromCitationMetadata = getValueByPath(fromObject, [ ++ 'citationMetadata', ++ ]); ++ if (fromCitationMetadata != null) { ++ setValueByPath(toObject, ['citationMetadata'], citationMetadataFromVertex(apiClient, fromCitationMetadata)); + } +- const fromInterrupted = getValueByPath(fromObject, ['interrupted']); +- if (fromInterrupted !== undefined) { +- setValueByPath(toObject, ['interrupted'], fromInterrupted); ++ const fromFinishMessage = getValueByPath(fromObject, [ ++ 'finishMessage', ++ ]); ++ if (fromFinishMessage != null) { ++ setValueByPath(toObject, ['finishMessage'], fromFinishMessage); ++ } ++ const fromFinishReason = getValueByPath(fromObject, ['finishReason']); ++ if (fromFinishReason != null) { ++ setValueByPath(toObject, ['finishReason'], fromFinishReason); ++ } ++ const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']); ++ if (fromAvgLogprobs != null) { ++ setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs); ++ } ++ const fromGroundingMetadata = getValueByPath(fromObject, [ ++ 'groundingMetadata', ++ ]); ++ if (fromGroundingMetadata != null) { ++ setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata); ++ } ++ const fromIndex = getValueByPath(fromObject, ['index']); ++ if (fromIndex != null) { ++ setValueByPath(toObject, ['index'], fromIndex); ++ } ++ const fromLogprobsResult = getValueByPath(fromObject, [ ++ 'logprobsResult', ++ ]); ++ if (fromLogprobsResult != null) { ++ setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult); + } +- const fromGenerationComplete = getValueByPath(fromObject, [ +- 'generationComplete', ++ const fromSafetyRatings = getValueByPath(fromObject, [ ++ 'safetyRatings', + ]); +- if (fromGenerationComplete != null) { +- setValueByPath(toObject, ['generationComplete'], fromGenerationComplete); ++ if (fromSafetyRatings != null) { ++ setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings); + } + return toObject; + } +-function functionCallFromMldev(apiClient, fromObject) { ++function generateContentResponseFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromId = getValueByPath(fromObject, ['id']); +- if (fromId !== undefined) { +- setValueByPath(toObject, ['id'], fromId); +- } +- const fromArgs = getValueByPath(fromObject, ['args']); +- if (fromArgs !== undefined) { +- setValueByPath(toObject, ['args'], fromArgs); ++ const fromCandidates = getValueByPath(fromObject, ['candidates']); ++ if (fromCandidates != null) { ++ if (Array.isArray(fromCandidates)) { ++ setValueByPath(toObject, ['candidates'], fromCandidates.map((item) => { ++ return candidateFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['candidates'], fromCandidates); ++ } + } +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName !== undefined) { +- setValueByPath(toObject, ['name'], fromName); ++ const fromCreateTime = getValueByPath(fromObject, ['createTime']); ++ if (fromCreateTime != null) { ++ setValueByPath(toObject, ['createTime'], fromCreateTime); + } +- return toObject; +-} +-function functionCallFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromArgs = getValueByPath(fromObject, ['args']); +- if (fromArgs !== undefined) { +- setValueByPath(toObject, ['args'], fromArgs); ++ const fromResponseId = getValueByPath(fromObject, ['responseId']); ++ if (fromResponseId != null) { ++ setValueByPath(toObject, ['responseId'], fromResponseId); + } +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName !== undefined) { +- setValueByPath(toObject, ['name'], fromName); ++ const fromModelVersion = getValueByPath(fromObject, ['modelVersion']); ++ if (fromModelVersion != null) { ++ setValueByPath(toObject, ['modelVersion'], fromModelVersion); + } +- return toObject; +-} +-function liveServerToolCallFromMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromFunctionCalls = getValueByPath(fromObject, [ +- 'functionCalls', ++ const fromPromptFeedback = getValueByPath(fromObject, [ ++ 'promptFeedback', + ]); +- if (fromFunctionCalls !== undefined && +- fromFunctionCalls !== null && +- Array.isArray(fromFunctionCalls)) { +- setValueByPath(toObject, ['functionCalls'], fromFunctionCalls.map((item) => { +- return functionCallFromMldev(apiClient, item); +- })); ++ if (fromPromptFeedback != null) { ++ setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback); + } +- return toObject; +-} +-function liveServerToolCallFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromFunctionCalls = getValueByPath(fromObject, [ +- 'functionCalls', ++ const fromUsageMetadata = getValueByPath(fromObject, [ ++ 'usageMetadata', + ]); +- if (fromFunctionCalls !== undefined && +- fromFunctionCalls !== null && +- Array.isArray(fromFunctionCalls)) { +- setValueByPath(toObject, ['functionCalls'], fromFunctionCalls.map((item) => { +- return functionCallFromVertex(apiClient, item); +- })); ++ if (fromUsageMetadata != null) { ++ setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata); + } + return toObject; + } +-function liveServerToolCallCancellationFromMldev(apiClient, fromObject) { ++function contentEmbeddingStatisticsFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromIds = getValueByPath(fromObject, ['ids']); +- if (fromIds !== undefined) { +- setValueByPath(toObject, ['ids'], fromIds); ++ const fromTruncated = getValueByPath(fromObject, ['truncated']); ++ if (fromTruncated != null) { ++ setValueByPath(toObject, ['truncated'], fromTruncated); + } +- return toObject; +-} +-function liveServerToolCallCancellationFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromIds = getValueByPath(fromObject, ['ids']); +- if (fromIds !== undefined) { +- setValueByPath(toObject, ['ids'], fromIds); ++ const fromTokenCount = getValueByPath(fromObject, ['token_count']); ++ if (fromTokenCount != null) { ++ setValueByPath(toObject, ['tokenCount'], fromTokenCount); + } + return toObject; + } +-function liveServerGoAwayFromMldev(fromObject) { ++function contentEmbeddingFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']); +- if (fromTimeLeft !== undefined) { +- setValueByPath(toObject, ['timeLeft'], fromTimeLeft); ++ const fromValues = getValueByPath(fromObject, ['values']); ++ if (fromValues != null) { ++ setValueByPath(toObject, ['values'], fromValues); + } +- return toObject; +-} +-function liveServerGoAwayFromVertex(fromObject) { +- const toObject = {}; +- const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']); +- if (fromTimeLeft !== undefined) { +- setValueByPath(toObject, ['timeLeft'], fromTimeLeft); ++ const fromStatistics = getValueByPath(fromObject, ['statistics']); ++ if (fromStatistics != null) { ++ setValueByPath(toObject, ['statistics'], contentEmbeddingStatisticsFromVertex(apiClient, fromStatistics)); + } + return toObject; + } +-function liveServerSessionResumptionUpdateFromMldev(fromObject) { ++function embedContentMetadataFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromNewHandle = getValueByPath(fromObject, ['newHandle']); +- if (fromNewHandle !== undefined) { +- setValueByPath(toObject, ['newHandle'], fromNewHandle); +- } +- const fromResumable = getValueByPath(fromObject, ['resumable']); +- if (fromResumable !== undefined) { +- setValueByPath(toObject, ['resumable'], fromResumable); +- } +- const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [ +- 'lastConsumedClientMessageIndex', ++ const fromBillableCharacterCount = getValueByPath(fromObject, [ ++ 'billableCharacterCount', + ]); +- if (fromLastConsumedClientMessageIndex !== undefined) { +- setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex); ++ if (fromBillableCharacterCount != null) { ++ setValueByPath(toObject, ['billableCharacterCount'], fromBillableCharacterCount); + } + return toObject; + } +-function liveServerSessionResumptionUpdateFromVertex(fromObject) { ++function embedContentResponseFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromNewHandle = getValueByPath(fromObject, ['newHandle']); +- if (fromNewHandle !== undefined) { +- setValueByPath(toObject, ['newHandle'], fromNewHandle); +- } +- const fromResumable = getValueByPath(fromObject, ['resumable']); +- if (fromResumable !== undefined) { +- setValueByPath(toObject, ['resumable'], fromResumable); +- } +- const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [ +- 'lastConsumedClientMessageIndex', ++ const fromEmbeddings = getValueByPath(fromObject, [ ++ 'predictions[]', ++ 'embeddings', + ]); +- if (fromLastConsumedClientMessageIndex !== undefined) { +- setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex); +- } +- return toObject; +-} +-function liveClientSessionResumptionConfigToMldev(fromObject) { +- const toObject = {}; +- const fromHandle = getValueByPath(fromObject, ['handle']); +- if (fromHandle !== undefined) { +- setValueByPath(toObject, ['handle'], fromHandle); ++ if (fromEmbeddings != null) { ++ if (Array.isArray(fromEmbeddings)) { ++ setValueByPath(toObject, ['embeddings'], fromEmbeddings.map((item) => { ++ return contentEmbeddingFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['embeddings'], fromEmbeddings); ++ } + } +- if (getValueByPath(fromObject, ['transparent']) !== undefined) { +- throw new Error('transparent parameter is not supported in Gemini API.'); ++ const fromMetadata = getValueByPath(fromObject, ['metadata']); ++ if (fromMetadata != null) { ++ setValueByPath(toObject, ['metadata'], embedContentMetadataFromVertex(apiClient, fromMetadata)); + } + return toObject; + } +-function liveClientSessionResumptionConfigToVertex(fromObject) { ++function imageFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromHandle = getValueByPath(fromObject, ['handle']); +- if (fromHandle !== undefined) { +- setValueByPath(toObject, ['handle'], fromHandle); +- } +- const fromTransparent = getValueByPath(fromObject, ['transparent']); +- if (fromTransparent !== undefined) { +- setValueByPath(toObject, ['transparent'], fromTransparent); ++ const fromGcsUri = getValueByPath(fromObject, ['gcsUri']); ++ if (fromGcsUri != null) { ++ setValueByPath(toObject, ['gcsUri'], fromGcsUri); + } +- return toObject; +-} +-function modalityTokenCountFromMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromModality = getValueByPath(fromObject, ['modality']); +- if (fromModality != null) { +- setValueByPath(toObject, ['modality'], fromModality); ++ const fromImageBytes = getValueByPath(fromObject, [ ++ 'bytesBase64Encoded', ++ ]); ++ if (fromImageBytes != null) { ++ setValueByPath(toObject, ['imageBytes'], tBytes(apiClient, fromImageBytes)); + } +- const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); +- if (fromTokenCount != null) { +- setValueByPath(toObject, ['tokenCount'], fromTokenCount); ++ const fromMimeType = getValueByPath(fromObject, ['mimeType']); ++ if (fromMimeType != null) { ++ setValueByPath(toObject, ['mimeType'], fromMimeType); + } + return toObject; + } +-function usageMetadataFromMldev(apiClient, fromObject) { ++function safetyAttributesFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromPromptTokenCount = getValueByPath(fromObject, [ +- 'promptTokenCount', +- ]); +- if (fromPromptTokenCount != null) { +- setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount); +- } +- const fromCachedContentTokenCount = getValueByPath(fromObject, [ +- 'cachedContentTokenCount', ++ const fromCategories = getValueByPath(fromObject, [ ++ 'safetyAttributes', ++ 'categories', + ]); +- if (fromCachedContentTokenCount != null) { +- setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); ++ if (fromCategories != null) { ++ setValueByPath(toObject, ['categories'], fromCategories); + } +- const fromResponseTokenCount = getValueByPath(fromObject, [ +- 'responseTokenCount', ++ const fromScores = getValueByPath(fromObject, [ ++ 'safetyAttributes', ++ 'scores', + ]); +- if (fromResponseTokenCount != null) { +- setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount); ++ if (fromScores != null) { ++ setValueByPath(toObject, ['scores'], fromScores); + } +- const fromToolUsePromptTokenCount = getValueByPath(fromObject, [ +- 'toolUsePromptTokenCount', +- ]); +- if (fromToolUsePromptTokenCount != null) { +- setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount); ++ const fromContentType = getValueByPath(fromObject, ['contentType']); ++ if (fromContentType != null) { ++ setValueByPath(toObject, ['contentType'], fromContentType); + } +- const fromThoughtsTokenCount = getValueByPath(fromObject, [ +- 'thoughtsTokenCount', +- ]); +- if (fromThoughtsTokenCount != null) { +- setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount); ++ return toObject; ++} ++function generatedImageFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromImage = getValueByPath(fromObject, ['_self']); ++ if (fromImage != null) { ++ setValueByPath(toObject, ['image'], imageFromVertex(apiClient, fromImage)); + } +- const fromTotalTokenCount = getValueByPath(fromObject, [ +- 'totalTokenCount', ++ const fromRaiFilteredReason = getValueByPath(fromObject, [ ++ 'raiFilteredReason', + ]); +- if (fromTotalTokenCount != null) { +- setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount); ++ if (fromRaiFilteredReason != null) { ++ setValueByPath(toObject, ['raiFilteredReason'], fromRaiFilteredReason); + } +- const fromPromptTokensDetails = getValueByPath(fromObject, [ +- 'promptTokensDetails', +- ]); +- if (fromPromptTokensDetails != null) { +- if (Array.isArray(fromPromptTokensDetails)) { +- setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails.map((item) => { +- return modalityTokenCountFromMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails); +- } ++ const fromSafetyAttributes = getValueByPath(fromObject, ['_self']); ++ if (fromSafetyAttributes != null) { ++ setValueByPath(toObject, ['safetyAttributes'], safetyAttributesFromVertex(apiClient, fromSafetyAttributes)); + } +- const fromCacheTokensDetails = getValueByPath(fromObject, [ +- 'cacheTokensDetails', +- ]); +- if (fromCacheTokensDetails != null) { +- if (Array.isArray(fromCacheTokensDetails)) { +- setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails.map((item) => { +- return modalityTokenCountFromMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails); +- } ++ const fromEnhancedPrompt = getValueByPath(fromObject, ['prompt']); ++ if (fromEnhancedPrompt != null) { ++ setValueByPath(toObject, ['enhancedPrompt'], fromEnhancedPrompt); + } +- const fromResponseTokensDetails = getValueByPath(fromObject, [ +- 'responseTokensDetails', ++ return toObject; ++} ++function generateImagesResponseFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromGeneratedImages = getValueByPath(fromObject, [ ++ 'predictions', + ]); +- if (fromResponseTokensDetails != null) { +- if (Array.isArray(fromResponseTokensDetails)) { +- setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails.map((item) => { +- return modalityTokenCountFromMldev(apiClient, item); ++ if (fromGeneratedImages != null) { ++ if (Array.isArray(fromGeneratedImages)) { ++ setValueByPath(toObject, ['generatedImages'], fromGeneratedImages.map((item) => { ++ return generatedImageFromVertex(apiClient, item); + })); + } + else { +- setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails); ++ setValueByPath(toObject, ['generatedImages'], fromGeneratedImages); + } + } +- const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [ +- 'toolUsePromptTokensDetails', ++ const fromPositivePromptSafetyAttributes = getValueByPath(fromObject, [ ++ 'positivePromptSafetyAttributes', + ]); +- if (fromToolUsePromptTokensDetails != null) { +- if (Array.isArray(fromToolUsePromptTokensDetails)) { +- setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails.map((item) => { +- return modalityTokenCountFromMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails); +- } ++ if (fromPositivePromptSafetyAttributes != null) { ++ setValueByPath(toObject, ['positivePromptSafetyAttributes'], safetyAttributesFromVertex(apiClient, fromPositivePromptSafetyAttributes)); + } + return toObject; + } +-function modalityTokenCountFromVertex(apiClient, fromObject) { ++function endpointFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromModality = getValueByPath(fromObject, ['modality']); +- if (fromModality != null) { +- setValueByPath(toObject, ['modality'], fromModality); ++ const fromName = getValueByPath(fromObject, ['endpoint']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); + } +- const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); +- if (fromTokenCount != null) { +- setValueByPath(toObject, ['tokenCount'], fromTokenCount); ++ const fromDeployedModelId = getValueByPath(fromObject, [ ++ 'deployedModelId', ++ ]); ++ if (fromDeployedModelId != null) { ++ setValueByPath(toObject, ['deployedModelId'], fromDeployedModelId); + } + return toObject; + } +-function usageMetadataFromVertex(apiClient, fromObject) { ++function tunedModelInfoFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromPromptTokenCount = getValueByPath(fromObject, [ +- 'promptTokenCount', ++ const fromBaseModel = getValueByPath(fromObject, [ ++ 'labels', ++ 'google-vertex-llm-tuning-base-model-id', + ]); +- if (fromPromptTokenCount != null) { +- setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount); ++ if (fromBaseModel != null) { ++ setValueByPath(toObject, ['baseModel'], fromBaseModel); + } +- const fromCachedContentTokenCount = getValueByPath(fromObject, [ +- 'cachedContentTokenCount', +- ]); +- if (fromCachedContentTokenCount != null) { +- setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); ++ const fromCreateTime = getValueByPath(fromObject, ['createTime']); ++ if (fromCreateTime != null) { ++ setValueByPath(toObject, ['createTime'], fromCreateTime); + } +- const fromResponseTokenCount = getValueByPath(fromObject, [ +- 'candidatesTokenCount', +- ]); +- if (fromResponseTokenCount != null) { +- setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount); ++ const fromUpdateTime = getValueByPath(fromObject, ['updateTime']); ++ if (fromUpdateTime != null) { ++ setValueByPath(toObject, ['updateTime'], fromUpdateTime); + } +- const fromToolUsePromptTokenCount = getValueByPath(fromObject, [ +- 'toolUsePromptTokenCount', +- ]); +- if (fromToolUsePromptTokenCount != null) { +- setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount); ++ return toObject; ++} ++function modelFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); + } +- const fromThoughtsTokenCount = getValueByPath(fromObject, [ +- 'thoughtsTokenCount', +- ]); +- if (fromThoughtsTokenCount != null) { +- setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount); ++ const fromDisplayName = getValueByPath(fromObject, ['displayName']); ++ if (fromDisplayName != null) { ++ setValueByPath(toObject, ['displayName'], fromDisplayName); + } +- const fromTotalTokenCount = getValueByPath(fromObject, [ +- 'totalTokenCount', +- ]); +- if (fromTotalTokenCount != null) { +- setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount); ++ const fromDescription = getValueByPath(fromObject, ['description']); ++ if (fromDescription != null) { ++ setValueByPath(toObject, ['description'], fromDescription); + } +- const fromPromptTokensDetails = getValueByPath(fromObject, [ +- 'promptTokensDetails', +- ]); +- if (fromPromptTokensDetails != null) { +- if (Array.isArray(fromPromptTokensDetails)) { +- setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails.map((item) => { +- return modalityTokenCountFromVertex(apiClient, item); ++ const fromVersion = getValueByPath(fromObject, ['versionId']); ++ if (fromVersion != null) { ++ setValueByPath(toObject, ['version'], fromVersion); ++ } ++ const fromEndpoints = getValueByPath(fromObject, ['deployedModels']); ++ if (fromEndpoints != null) { ++ if (Array.isArray(fromEndpoints)) { ++ setValueByPath(toObject, ['endpoints'], fromEndpoints.map((item) => { ++ return endpointFromVertex(apiClient, item); + })); + } + else { +- setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails); ++ setValueByPath(toObject, ['endpoints'], fromEndpoints); + } + } +- const fromCacheTokensDetails = getValueByPath(fromObject, [ +- 'cacheTokensDetails', ++ const fromLabels = getValueByPath(fromObject, ['labels']); ++ if (fromLabels != null) { ++ setValueByPath(toObject, ['labels'], fromLabels); ++ } ++ const fromTunedModelInfo = getValueByPath(fromObject, ['_self']); ++ if (fromTunedModelInfo != null) { ++ setValueByPath(toObject, ['tunedModelInfo'], tunedModelInfoFromVertex(apiClient, fromTunedModelInfo)); ++ } ++ return toObject; ++} ++function countTokensResponseFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTotalTokens = getValueByPath(fromObject, ['totalTokens']); ++ if (fromTotalTokens != null) { ++ setValueByPath(toObject, ['totalTokens'], fromTotalTokens); ++ } ++ return toObject; ++} ++function computeTokensResponseFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTokensInfo = getValueByPath(fromObject, ['tokensInfo']); ++ if (fromTokensInfo != null) { ++ setValueByPath(toObject, ['tokensInfo'], fromTokensInfo); ++ } ++ return toObject; ++} ++function videoFromVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromUri = getValueByPath(fromObject, ['gcsUri']); ++ if (fromUri != null) { ++ setValueByPath(toObject, ['uri'], fromUri); ++ } ++ const fromVideoBytes = getValueByPath(fromObject, [ ++ 'bytesBase64Encoded', + ]); +- if (fromCacheTokensDetails != null) { +- if (Array.isArray(fromCacheTokensDetails)) { +- setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails.map((item) => { +- return modalityTokenCountFromVertex(apiClient, item); ++ if (fromVideoBytes != null) { ++ setValueByPath(toObject, ['videoBytes'], tBytes(apiClient, fromVideoBytes)); ++ } ++ const fromMimeType = getValueByPath(fromObject, ['mimeType']); ++ if (fromMimeType != null) { ++ setValueByPath(toObject, ['mimeType'], fromMimeType); ++ } ++ return toObject; ++} ++function generatedVideoFromVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromVideo = getValueByPath(fromObject, ['_self']); ++ if (fromVideo != null) { ++ setValueByPath(toObject, ['video'], videoFromVertex$1(apiClient, fromVideo)); ++ } ++ return toObject; ++} ++function generateVideosResponseFromVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromGeneratedVideos = getValueByPath(fromObject, ['videos']); ++ if (fromGeneratedVideos != null) { ++ if (Array.isArray(fromGeneratedVideos)) { ++ setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos.map((item) => { ++ return generatedVideoFromVertex$1(apiClient, item); + })); + } + else { +- setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails); ++ setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos); + } + } +- const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [ +- 'toolUsePromptTokensDetails', ++ const fromRaiMediaFilteredCount = getValueByPath(fromObject, [ ++ 'raiMediaFilteredCount', + ]); +- if (fromToolUsePromptTokensDetails != null) { +- if (Array.isArray(fromToolUsePromptTokensDetails)) { +- setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails.map((item) => { +- return modalityTokenCountFromVertex(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails); +- } ++ if (fromRaiMediaFilteredCount != null) { ++ setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount); + } +- const fromResponseTokensDetails = getValueByPath(fromObject, [ +- 'candidatesTokensDetails', ++ const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [ ++ 'raiMediaFilteredReasons', + ]); +- if (fromResponseTokensDetails != null) { +- if (Array.isArray(fromResponseTokensDetails)) { +- setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails.map((item) => { +- return modalityTokenCountFromVertex(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails); +- } ++ if (fromRaiMediaFilteredReasons != null) { ++ setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons); + } +- const fromTrafficType = getValueByPath(fromObject, ['trafficType']); +- if (fromTrafficType != null) { +- setValueByPath(toObject, ['trafficType'], fromTrafficType); ++ return toObject; ++} ++function generateVideosOperationFromVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); ++ } ++ const fromMetadata = getValueByPath(fromObject, ['metadata']); ++ if (fromMetadata != null) { ++ setValueByPath(toObject, ['metadata'], fromMetadata); ++ } ++ const fromDone = getValueByPath(fromObject, ['done']); ++ if (fromDone != null) { ++ setValueByPath(toObject, ['done'], fromDone); ++ } ++ const fromError = getValueByPath(fromObject, ['error']); ++ if (fromError != null) { ++ setValueByPath(toObject, ['error'], fromError); ++ } ++ const fromResponse = getValueByPath(fromObject, ['response']); ++ if (fromResponse != null) { ++ setValueByPath(toObject, ['response'], generateVideosResponseFromVertex$1(apiClient, fromResponse)); + } + return toObject; + } +@@ -7248,17 +7757,20 @@ class Live { + @experimental + + @remarks +- If using the Gemini API, Live is currently only supported behind API +- version `v1alpha`. Ensure that the API version is set to `v1alpha` when +- initializing the SDK if relying on the Gemini API. + + @param params - The parameters for establishing a connection to the model. + @return A live session. + + @example + ```ts ++ let model: string; ++ if (GOOGLE_GENAI_USE_VERTEXAI) { ++ model = 'gemini-2.0-flash-live-preview-04-09'; ++ } else { ++ model = 'gemini-2.0-flash-live-001'; ++ } + const session = await ai.live.connect({ +- model: 'gemini-2.0-flash-exp', ++ model: model, + config: { + responseModalities: [Modality.AUDIO], + }, +@@ -7280,7 +7792,7 @@ class Live { + ``` + */ + async connect(params) { +- var _a, _b; ++ var _a, _b, _c; + const websocketBaseUrl = this.apiClient.getWebsocketBaseUrl(); + const apiVersion = this.apiClient.getApiVersion(); + let url; +@@ -7327,6 +7839,16 @@ class Live { + `projects/${project}/locations/${location}/` + transformedModel; + } + let clientMessage = {}; ++ if (this.apiClient.isVertexAI() && ++ ((_c = params.config) === null || _c === void 0 ? void 0 : _c.responseModalities) === undefined) { ++ // Set default to AUDIO to align with MLDev API. ++ if (params.config === undefined) { ++ params.config = { responseModalities: [exports.Modality.AUDIO] }; ++ } ++ else { ++ params.config.responseModalities = [exports.Modality.AUDIO]; ++ } ++ } + const liveConnectParameters = { + model: transformedModel, + config: params.config, +@@ -7338,6 +7860,7 @@ class Live { + else { + clientMessage = liveConnectParametersToMldev(this.apiClient, liveConnectParameters); + } ++ delete clientMessage['config']; + conn.send(JSON.stringify(clientMessage)); + return new Session(conn, this.apiClient); + } +@@ -7534,8 +8057,14 @@ class Session { + + @example + ```ts ++ let model: string; ++ if (GOOGLE_GENAI_USE_VERTEXAI) { ++ model = 'gemini-2.0-flash-live-preview-04-09'; ++ } else { ++ model = 'gemini-2.0-flash-live-001'; ++ } + const session = await ai.live.connect({ +- model: 'gemini-2.0-flash-exp', ++ model: model, + config: { + responseModalities: [Modality.AUDIO], + } +@@ -7801,7 +8330,7 @@ class Models extends BaseModule { + _c = apiResponse_1_1.value; + _d = false; + const chunk = _c; +- const resp = generateContentResponseFromVertex(apiClient, chunk); ++ const resp = generateContentResponseFromVertex(apiClient, (yield __await(chunk.json()))); + const typedResp = new GenerateContentResponse(); + Object.assign(typedResp, resp); + yield yield __await(typedResp); +@@ -7840,7 +8369,7 @@ class Models extends BaseModule { + _c = apiResponse_2_1.value; + _d = false; + const chunk = _c; +- const resp = generateContentResponseFromMldev(apiClient, chunk); ++ const resp = generateContentResponseFromMldev(apiClient, (yield __await(chunk.json()))); + const typedResp = new GenerateContentResponse(); + Object.assign(typedResp, resp); + yield yield __await(typedResp); +@@ -8402,13 +8931,6 @@ function generateVideosOperationFromMldev(apiClient, fromObject) { + if (fromResponse != null) { + setValueByPath(toObject, ['response'], generateVideosResponseFromMldev(apiClient, fromResponse)); + } +- const fromResult = getValueByPath(fromObject, [ +- 'response', +- 'generateVideoResponse', +- ]); +- if (fromResult != null) { +- setValueByPath(toObject, ['result'], generateVideosResponseFromMldev(apiClient, fromResult)); +- } + return toObject; + } + function videoFromVertex(apiClient, fromObject) { +@@ -8486,10 +9008,6 @@ function generateVideosOperationFromVertex(apiClient, fromObject) { + if (fromResponse != null) { + setValueByPath(toObject, ['response'], generateVideosResponseFromVertex(apiClient, fromResponse)); + } +- const fromResult = getValueByPath(fromObject, ['response']); +- if (fromResult != null) { +- setValueByPath(toObject, ['result'], generateVideosResponseFromVertex(apiClient, fromResult)); +- } + return toObject; + } + +@@ -8517,7 +9035,7 @@ class Operations extends BaseModule { + } + if (this.apiClient.isVertexAI()) { + const resourceName = operation.name.split('/operations/')[0]; +- var httpOptions = undefined; ++ let httpOptions = undefined; + if (config && 'httpOptions' in config) { + httpOptions = config.httpOptions; + } +diff --git a/dist/index.js.map b/dist/index.js.map +index 9f58d1e936c1ce94173f2e8ad78e7ad630c45815..c81e018030973004cf5ab7100ea231ed0848be76 100644 +--- a/dist/index.js.map ++++ b/dist/index.js.map +@@ -1 +1 @@ +-{"version":3,"file":"index.js","sources":["../src/_common.ts","../src/_transformers.ts","../src/converters/_caches_converters.ts","../src/pagers.ts","../src/types.ts","../src/caches.ts","../src/chats.ts","../src/_api_client.ts","../src/cross/_cross_error.ts","../src/cross/_cross_uploader.ts","../src/cross/_cross_websocket.ts","../src/converters/_files_converters.ts","../src/files.ts","../src/converters/_models_converters.ts","../src/converters/_live_converters.ts","../src/live.ts","../src/models.ts","../src/converters/_operations_converters.ts","../src/operations.ts","../src/web/_web_auth.ts","../src/client.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport class BaseModule {}\n\nexport function formatMap(\n templateString: string,\n valueMap: Record,\n): string {\n // Use a regular expression to find all placeholders in the template string\n const regex = /\\{([^}]+)\\}/g;\n\n // Replace each placeholder with its corresponding value from the valueMap\n return templateString.replace(regex, (match, key) => {\n if (Object.prototype.hasOwnProperty.call(valueMap, key)) {\n const value = valueMap[key];\n // Convert the value to a string if it's not a string already\n return value !== undefined && value !== null ? String(value) : '';\n } else {\n // Handle missing keys\n throw new Error(`Key '${key}' not found in valueMap.`);\n }\n });\n}\n\nexport function setValueByPath(\n data: Record,\n keys: string[],\n value: unknown,\n): void {\n for (let i = 0; i < keys.length - 1; i++) {\n const key = keys[i];\n\n if (key.endsWith('[]')) {\n const keyName = key.slice(0, -2);\n if (!(keyName in data)) {\n if (Array.isArray(value)) {\n data[keyName] = Array.from({length: value.length}, () => ({}));\n } else {\n throw new Error(`Value must be a list given an array path ${key}`);\n }\n }\n\n if (Array.isArray(data[keyName])) {\n const arrayData = data[keyName] as Array;\n\n if (Array.isArray(value)) {\n for (let j = 0; j < arrayData.length; j++) {\n const entry = arrayData[j] as Record;\n setValueByPath(entry, keys.slice(i + 1), value[j]);\n }\n } else {\n for (const d of arrayData) {\n setValueByPath(\n d as Record,\n keys.slice(i + 1),\n value,\n );\n }\n }\n }\n return;\n } else if (key.endsWith('[0]')) {\n const keyName = key.slice(0, -3);\n if (!(keyName in data)) {\n data[keyName] = [{}];\n }\n const arrayData = (data as Record)[keyName];\n setValueByPath(\n (arrayData as Array>)[0],\n keys.slice(i + 1),\n value,\n );\n return;\n }\n\n if (!data[key] || typeof data[key] !== 'object') {\n data[key] = {};\n }\n\n data = data[key] as Record;\n }\n\n const keyToSet = keys[keys.length - 1];\n const existingData = data[keyToSet];\n\n if (existingData !== undefined) {\n if (\n !value ||\n (typeof value === 'object' && Object.keys(value).length === 0)\n ) {\n return;\n }\n\n if (value === existingData) {\n return;\n }\n\n if (\n typeof existingData === 'object' &&\n typeof value === 'object' &&\n existingData !== null &&\n value !== null\n ) {\n Object.assign(existingData, value);\n } else {\n throw new Error(`Cannot set value for an existing key. Key: ${keyToSet}`);\n }\n } else {\n data[keyToSet] = value;\n }\n}\n\nexport function getValueByPath(data: unknown, keys: string[]): unknown {\n try {\n if (keys.length === 1 && keys[0] === '_self') {\n return data;\n }\n\n for (let i = 0; i < keys.length; i++) {\n if (typeof data !== 'object' || data === null) {\n return undefined;\n }\n\n const key = keys[i];\n if (key.endsWith('[]')) {\n const keyName = key.slice(0, -2);\n if (keyName in data) {\n const arrayData = (data as Record)[keyName];\n if (!Array.isArray(arrayData)) {\n return undefined;\n }\n return arrayData.map((d) => getValueByPath(d, keys.slice(i + 1)));\n } else {\n return undefined;\n }\n } else {\n data = (data as Record)[key];\n }\n }\n\n return data;\n } catch (error) {\n if (error instanceof TypeError) {\n return undefined;\n }\n throw error;\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ApiClient} from './_api_client';\nimport * as types from './types';\n\nexport function tModel(apiClient: ApiClient, model: string | unknown): string {\n if (!model || typeof model !== 'string') {\n throw new Error('model is required and must be a string');\n }\n\n if (apiClient.isVertexAI()) {\n if (\n model.startsWith('publishers/') ||\n model.startsWith('projects/') ||\n model.startsWith('models/')\n ) {\n return model;\n } else if (model.indexOf('/') >= 0) {\n const parts = model.split('/', 2);\n return `publishers/${parts[0]}/models/${parts[1]}`;\n } else {\n return `publishers/google/models/${model}`;\n }\n } else {\n if (model.startsWith('models/') || model.startsWith('tunedModels/')) {\n return model;\n } else {\n return `models/${model}`;\n }\n }\n}\n\nexport function tCachesModel(\n apiClient: ApiClient,\n model: string | unknown,\n): string {\n const transformedModel = tModel(apiClient, model as string);\n if (!transformedModel) {\n return '';\n }\n\n if (transformedModel.startsWith('publishers/') && apiClient.isVertexAI()) {\n // vertex caches only support model name start with projects.\n return `projects/${apiClient.getProject()}/locations/${apiClient.getLocation()}/${transformedModel}`;\n } else if (transformedModel.startsWith('models/') && apiClient.isVertexAI()) {\n return `projects/${apiClient.getProject()}/locations/${apiClient.getLocation()}/publishers/google/${transformedModel}`;\n } else {\n return transformedModel;\n }\n}\n\nexport function tPart(\n apiClient: ApiClient,\n origin?: types.PartUnion | null,\n): types.Part {\n if (origin === null || origin === undefined) {\n throw new Error('PartUnion is required');\n }\n if (typeof origin === 'object') {\n return origin;\n }\n if (typeof origin === 'string') {\n return {text: origin};\n }\n throw new Error(`Unsupported part type: ${typeof origin}`);\n}\n\nexport function tParts(\n apiClient: ApiClient,\n origin?: types.PartListUnion | null,\n): types.Part[] {\n if (\n origin === null ||\n origin === undefined ||\n (Array.isArray(origin) && origin.length === 0)\n ) {\n throw new Error('PartListUnion is required');\n }\n if (Array.isArray(origin)) {\n return origin.map((item) => tPart(apiClient, item as types.PartUnion)!);\n }\n return [tPart(apiClient, origin)!];\n}\n\nfunction _isContent(origin: unknown): boolean {\n return (\n origin !== null &&\n origin !== undefined &&\n typeof origin === 'object' &&\n 'parts' in origin &&\n Array.isArray(origin.parts)\n );\n}\n\nfunction _isFunctionCallPart(origin: unknown): boolean {\n return (\n origin !== null &&\n origin !== undefined &&\n typeof origin === 'object' &&\n 'functionCall' in origin\n );\n}\n\nfunction _isUserPart(origin: unknown): boolean {\n if (origin === null || origin === undefined) {\n return false;\n }\n if (_isFunctionCallPart(origin)) {\n return false;\n }\n return true;\n}\n\nfunction _areUserParts(origin: types.PartListUnion[]): boolean {\n if (\n origin === null ||\n origin === undefined ||\n (Array.isArray(origin) && origin.length === 0)\n ) {\n return false;\n }\n return origin.every(_isUserPart);\n}\n\nexport function tContent(\n apiClient: ApiClient,\n origin?: types.ContentUnion,\n): types.Content {\n if (origin === null || origin === undefined) {\n throw new Error('ContentUnion is required');\n }\n if (_isContent(origin)) {\n // @ts-expect-error: _isContent is a utility function that checks if the\n // origin is a Content.\n return origin;\n }\n\n if (_isUserPart(origin)) {\n return {\n role: 'user',\n parts: tParts(apiClient, origin as types.PartListUnion)!,\n };\n } else {\n return {\n role: 'model',\n parts: tParts(apiClient, origin as types.PartListUnion)!,\n };\n }\n}\n\nexport function tContentsForEmbed(\n apiClient: ApiClient,\n origin: types.ContentListUnion,\n): types.ContentUnion[] {\n if (!origin) {\n return [];\n }\n if (apiClient.isVertexAI() && Array.isArray(origin)) {\n return origin.flatMap((item) => {\n const content = tContent(apiClient, item as types.ContentUnion);\n if (\n content.parts &&\n content.parts.length > 0 &&\n content.parts[0].text !== undefined\n ) {\n return [content.parts[0].text];\n }\n return [];\n });\n } else if (apiClient.isVertexAI()) {\n const content = tContent(apiClient, origin as types.ContentUnion);\n if (\n content.parts &&\n content.parts.length > 0 &&\n content.parts[0].text !== undefined\n ) {\n return [content.parts[0].text];\n }\n return [];\n }\n if (Array.isArray(origin)) {\n return origin.map(\n (item) => tContent(apiClient, item as types.ContentUnion)!,\n );\n }\n return [tContent(apiClient, origin as types.ContentUnion)!];\n}\n\nfunction _appendAccumulatedPartsAsContent(\n apiClient: ApiClient,\n result: types.Content[],\n accumulatedParts: types.PartUnion[],\n) {\n if (accumulatedParts.length === 0) {\n return;\n }\n if (_areUserParts(accumulatedParts)) {\n result.push({\n role: 'user',\n parts: tParts(apiClient, accumulatedParts),\n });\n } else {\n result.push({\n role: 'model',\n parts: tParts(apiClient, accumulatedParts),\n });\n }\n accumulatedParts.length = 0; // clear the array inplace\n}\n\nfunction _handleCurrentPart(\n apiClient: ApiClient,\n result: types.Content[],\n accumulatedParts: types.PartUnion[],\n currentPart: types.PartUnion,\n) {\n if (_isUserPart(currentPart) === _areUserParts(accumulatedParts)) {\n accumulatedParts.push(currentPart);\n } else {\n _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts);\n accumulatedParts.length = 0;\n accumulatedParts.push(currentPart);\n }\n}\n\nexport function tContents(\n apiClient: ApiClient,\n origin?: types.ContentListUnion,\n): types.Content[] {\n if (\n origin === null ||\n origin === undefined ||\n (Array.isArray(origin) && origin.length === 0)\n ) {\n throw new Error('contents are required');\n }\n if (!Array.isArray(origin)) {\n return [tContent(apiClient, origin)];\n }\n\n const result: types.Content[] = [];\n const accumulatedParts: types.PartUnion[] = [];\n\n for (const content of origin) {\n if (_isContent(content)) {\n _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts);\n // @ts-expect-error: content is a Content here\n result.push(content);\n } else if (\n typeof content === 'string' ||\n (typeof content === 'object' && !Array.isArray(content))\n ) {\n // @ts-expect-error: content is a part here\n _handleCurrentPart(apiClient, result, accumulatedParts, content);\n } else if (Array.isArray(content)) {\n // if there're consecutive user parts before the list,\n // convert to UserContent and append to result\n _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts);\n result.push({\n role: 'user',\n parts: tParts(apiClient, content),\n });\n } else {\n throw new Error(`Unsupported content type: ${typeof content}`);\n }\n }\n _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts);\n\n return result;\n}\n\nexport function processSchema(apiClient: ApiClient, schema: types.Schema) {\n if (!apiClient.isVertexAI()) {\n if ('default' in schema) {\n throw new Error(\n 'Default value is not supported in the response schema for the Gemini API.',\n );\n }\n }\n\n if ('anyOf' in schema) {\n if (schema['anyOf'] !== undefined) {\n for (const subSchema of schema['anyOf']) {\n processSchema(apiClient, subSchema);\n }\n }\n }\n\n if ('items' in schema) {\n if (schema['items'] !== undefined) {\n processSchema(apiClient, schema['items']);\n }\n }\n\n if ('properties' in schema) {\n if (schema['properties'] !== undefined) {\n for (const subSchema of Object.values(schema['properties'])) {\n processSchema(apiClient, subSchema);\n }\n }\n }\n}\n\nexport function tSchema(\n apiClient: ApiClient,\n schema: types.Schema,\n): types.Schema {\n processSchema(apiClient, schema);\n return schema;\n}\n\nexport function tSpeechConfig(\n apiClient: ApiClient,\n speechConfig: types.SpeechConfigUnion,\n): types.SpeechConfig {\n if (typeof speechConfig === 'object' && 'voiceConfig' in speechConfig) {\n return speechConfig;\n } else if (typeof speechConfig === 'string') {\n return {\n voiceConfig: {\n prebuiltVoiceConfig: {\n voiceName: speechConfig,\n },\n },\n };\n } else {\n throw new Error(`Unsupported speechConfig type: ${typeof speechConfig}`);\n }\n}\n\nexport function tTool(apiClient: ApiClient, tool: types.Tool): types.Tool {\n return tool;\n}\n\nexport function tTools(\n apiClient: ApiClient,\n tool: types.Tool[] | unknown,\n): types.Tool[] {\n if (!Array.isArray(tool)) {\n throw new Error('tool is required and must be an array of Tools');\n }\n return tool;\n}\n\n/**\n * Prepends resource name with project, location, resource_prefix if needed.\n *\n * @param client The API client.\n * @param resourceName The resource name.\n * @param resourcePrefix The resource prefix.\n * @param splitsAfterPrefix The number of splits after the prefix.\n * @returns The completed resource name.\n *\n * Examples:\n *\n * ```\n * resource_name = '123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = True\n * client.project = 'bar'\n * client.location = 'us-west1'\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns: 'projects/bar/locations/us-west1/cachedContents/123'\n * ```\n *\n * ```\n * resource_name = 'projects/foo/locations/us-central1/cachedContents/123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = True\n * client.project = 'bar'\n * client.location = 'us-west1'\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns: 'projects/foo/locations/us-central1/cachedContents/123'\n * ```\n *\n * ```\n * resource_name = '123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = False\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns 'cachedContents/123'\n * ```\n *\n * ```\n * resource_name = 'some/wrong/cachedContents/resource/name/123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = False\n * # client.vertexai = True\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * -> 'some/wrong/resource/name/123'\n * ```\n */\nfunction resourceName(\n client: ApiClient,\n resourceName: string,\n resourcePrefix: string,\n splitsAfterPrefix: number = 1,\n): string {\n const shouldAppendPrefix =\n !resourceName.startsWith(`${resourcePrefix}/`) &&\n resourceName.split('/').length === splitsAfterPrefix;\n if (client.isVertexAI()) {\n if (resourceName.startsWith('projects/')) {\n return resourceName;\n } else if (resourceName.startsWith('locations/')) {\n return `projects/${client.getProject()}/${resourceName}`;\n } else if (resourceName.startsWith(`${resourcePrefix}/`)) {\n return `projects/${client.getProject()}/locations/${client.getLocation()}/${resourceName}`;\n } else if (shouldAppendPrefix) {\n return `projects/${client.getProject()}/locations/${client.getLocation()}/${resourcePrefix}/${resourceName}`;\n } else {\n return resourceName;\n }\n }\n if (shouldAppendPrefix) {\n return `${resourcePrefix}/${resourceName}`;\n }\n return resourceName;\n}\n\nexport function tCachedContentName(\n apiClient: ApiClient,\n name: string | unknown,\n): string {\n if (typeof name !== 'string') {\n throw new Error('name must be a string');\n }\n return resourceName(apiClient, name, 'cachedContents');\n}\n\nexport function tTuningJobStatus(\n apiClient: ApiClient,\n status: string | unknown,\n): string {\n switch (status) {\n case 'STATE_UNSPECIFIED':\n return 'JOB_STATE_UNSPECIFIED';\n case 'CREATING':\n return 'JOB_STATE_RUNNING';\n case 'ACTIVE':\n return 'JOB_STATE_SUCCEEDED';\n case 'FAILED':\n return 'JOB_STATE_FAILED';\n default:\n return status as string;\n }\n}\n\nexport function tBytes(\n apiClient: ApiClient,\n fromImageBytes: string | unknown,\n): string {\n if (typeof fromImageBytes !== 'string') {\n throw new Error('fromImageBytes must be a string');\n }\n // TODO(b/389133914): Remove dummy bytes converter.\n return fromImageBytes;\n}\nexport function tFileName(\n apiClient: ApiClient,\n fromName: string | unknown,\n): string {\n if (typeof fromName !== 'string') {\n throw new Error('fromName must be a string');\n }\n // Remove the files/ prefx for MLdev urls to get the actual name of the file.\n if (fromName.startsWith('files/')) {\n return fromName.split('files/')[1];\n }\n return fromName;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function partToMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['videoMetadata']) !== undefined) {\n throw new Error('videoMetadata parameter is not supported in Gemini API.');\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToMldev(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['example']) !== undefined) {\n throw new Error('example parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['pattern']) !== undefined) {\n throw new Error('pattern parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['default']) !== undefined) {\n throw new Error('default parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxLength']) !== undefined) {\n throw new Error('maxLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minLength']) !== undefined) {\n throw new Error('minLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minProperties']) !== undefined) {\n throw new Error('minProperties parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxProperties']) !== undefined) {\n throw new Error('maxProperties parameter is not supported in Gemini API.');\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['response']) !== undefined) {\n throw new Error('response parameter is not supported in Gemini API.');\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToMldev(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToMldev(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n if (common.getValueByPath(fromObject, ['retrieval']) !== undefined) {\n throw new Error('retrieval parameter is not supported in Gemini API.');\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToMldev());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (parentObject !== undefined && fromDisplayName != null) {\n common.setValueByPath(parentObject, ['displayName'], fromDisplayName);\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (parentObject !== undefined && fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToMldev(apiClient, fromToolConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['model'],\n t.tCachesModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n createCachedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.DeleteCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n updateCachedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function listCachedContentsConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listCachedContentsParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listCachedContentsConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partToVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToVertex(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n const fromExample = common.getValueByPath(fromObject, ['example']);\n if (fromExample != null) {\n common.setValueByPath(toObject, ['example'], fromExample);\n }\n\n const fromPattern = common.getValueByPath(fromObject, ['pattern']);\n if (fromPattern != null) {\n common.setValueByPath(toObject, ['pattern'], fromPattern);\n }\n\n const fromDefault = common.getValueByPath(fromObject, ['default']);\n if (fromDefault != null) {\n common.setValueByPath(toObject, ['default'], fromDefault);\n }\n\n const fromMaxLength = common.getValueByPath(fromObject, ['maxLength']);\n if (fromMaxLength != null) {\n common.setValueByPath(toObject, ['maxLength'], fromMaxLength);\n }\n\n const fromMinLength = common.getValueByPath(fromObject, ['minLength']);\n if (fromMinLength != null) {\n common.setValueByPath(toObject, ['minLength'], fromMinLength);\n }\n\n const fromMinProperties = common.getValueByPath(fromObject, [\n 'minProperties',\n ]);\n if (fromMinProperties != null) {\n common.setValueByPath(toObject, ['minProperties'], fromMinProperties);\n }\n\n const fromMaxProperties = common.getValueByPath(fromObject, [\n 'maxProperties',\n ]);\n if (fromMaxProperties != null) {\n common.setValueByPath(toObject, ['maxProperties'], fromMaxProperties);\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n schemaToVertex(apiClient, fromResponse),\n );\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToVertex(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToVertex(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n const fromRetrieval = common.getValueByPath(fromObject, ['retrieval']);\n if (fromRetrieval != null) {\n common.setValueByPath(toObject, ['retrieval'], fromRetrieval);\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToVertex());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (parentObject !== undefined && fromDisplayName != null) {\n common.setValueByPath(parentObject, ['displayName'], fromDisplayName);\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (parentObject !== undefined && fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToVertex(apiClient, fromToolConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['model'],\n t.tCachesModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n createCachedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.DeleteCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n updateCachedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function listCachedContentsConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listCachedContentsParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listCachedContentsConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function cachedContentFromMldev(\n apiClient: ApiClient,\n fromObject: types.CachedContent,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (fromExpireTime != null) {\n common.setValueByPath(toObject, ['expireTime'], fromExpireTime);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentResponseFromMldev(): Record<\n string,\n unknown\n> {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function listCachedContentsResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromCachedContents = common.getValueByPath(fromObject, [\n 'cachedContents',\n ]);\n if (fromCachedContents != null) {\n if (Array.isArray(fromCachedContents)) {\n common.setValueByPath(\n toObject,\n ['cachedContents'],\n fromCachedContents.map((item) => {\n return cachedContentFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['cachedContents'], fromCachedContents);\n }\n }\n\n return toObject;\n}\n\nexport function cachedContentFromVertex(\n apiClient: ApiClient,\n fromObject: types.CachedContent,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (fromExpireTime != null) {\n common.setValueByPath(toObject, ['expireTime'], fromExpireTime);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentResponseFromVertex(): Record<\n string,\n unknown\n> {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function listCachedContentsResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromCachedContents = common.getValueByPath(fromObject, [\n 'cachedContents',\n ]);\n if (fromCachedContents != null) {\n if (Array.isArray(fromCachedContents)) {\n common.setValueByPath(\n toObject,\n ['cachedContents'],\n fromCachedContents.map((item) => {\n return cachedContentFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['cachedContents'], fromCachedContents);\n }\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Pagers for the GenAI List APIs.\n */\n\nexport enum PagedItem {\n PAGED_ITEM_BATCH_JOBS = 'batchJobs',\n PAGED_ITEM_MODELS = 'models',\n PAGED_ITEM_TUNING_JOBS = 'tuningJobs',\n PAGED_ITEM_FILES = 'files',\n PAGED_ITEM_CACHED_CONTENTS = 'cachedContents',\n}\n\ninterface PagedItemConfig {\n config?: {\n pageToken?: string;\n pageSize?: number;\n };\n}\n\ninterface PagedItemResponse {\n nextPageToken?: string;\n batchJobs?: T[];\n models?: T[];\n tuningJobs?: T[];\n files?: T[];\n cachedContents?: T[];\n}\n\n/**\n * Pager class for iterating through paginated results.\n */\nexport class Pager implements AsyncIterable {\n private nameInternal!: PagedItem;\n private pageInternal: T[] = [];\n private paramsInternal: PagedItemConfig = {};\n private pageInternalSize!: number;\n protected requestInternal!: (\n params: PagedItemConfig,\n ) => Promise>;\n protected idxInternal!: number;\n\n constructor(\n name: PagedItem,\n request: (params: PagedItemConfig) => Promise>,\n response: PagedItemResponse,\n params: PagedItemConfig,\n ) {\n this.requestInternal = request;\n this.init(name, response, params);\n }\n\n private init(\n name: PagedItem,\n response: PagedItemResponse,\n params: PagedItemConfig,\n ) {\n this.nameInternal = name;\n this.pageInternal = response[this.nameInternal] || [];\n this.idxInternal = 0;\n let requestParams: PagedItemConfig = {config: {}};\n if (!params) {\n requestParams = {config: {}};\n } else if (typeof params === 'object') {\n requestParams = {...params};\n } else {\n requestParams = params;\n }\n if (requestParams['config']) {\n requestParams['config']['pageToken'] = response['nextPageToken'];\n }\n this.paramsInternal = requestParams;\n this.pageInternalSize =\n requestParams['config']?.['pageSize'] ?? this.pageInternal.length;\n }\n\n private initNextPage(response: PagedItemResponse): void {\n this.init(this.nameInternal, response, this.paramsInternal);\n }\n\n /**\n * Returns the current page, which is a list of items.\n *\n * @remarks\n * The first page is retrieved when the pager is created. The returned list of\n * items could be a subset of the entire list.\n */\n get page(): T[] {\n return this.pageInternal;\n }\n\n /**\n * Returns the type of paged item (for example, ``batch_jobs``).\n */\n get name(): PagedItem {\n return this.nameInternal;\n }\n\n /**\n * Returns the length of the page fetched each time by this pager.\n *\n * @remarks\n * The number of items in the page is less than or equal to the page length.\n */\n get pageSize(): number {\n return this.pageInternalSize;\n }\n\n /**\n * Returns the parameters when making the API request for the next page.\n *\n * @remarks\n * Parameters contain a set of optional configs that can be\n * used to customize the API request. For example, the `pageToken` parameter\n * contains the token to request the next page.\n */\n get params(): PagedItemConfig {\n return this.paramsInternal;\n }\n\n /**\n * Returns the total number of items in the current page.\n */\n get pageLength(): number {\n return this.pageInternal.length;\n }\n\n /**\n * Returns the item at the given index.\n */\n getItem(index: number): T {\n return this.pageInternal[index];\n }\n\n /**\n * Returns an async iterator that support iterating through all items\n * retrieved from the API.\n *\n * @remarks\n * The iterator will automatically fetch the next page if there are more items\n * to fetch from the API.\n *\n * @example\n *\n * ```ts\n * const pager = await ai.files.list({config: {pageSize: 10}});\n * for await (const file of pager) {\n * console.log(file.name);\n * }\n * ```\n */\n [Symbol.asyncIterator](): AsyncIterator {\n return {\n next: async () => {\n if (this.idxInternal >= this.pageLength) {\n if (this.hasNextPage()) {\n await this.nextPage();\n } else {\n return {value: undefined, done: true};\n }\n }\n const item = this.getItem(this.idxInternal);\n this.idxInternal += 1;\n return {value: item, done: false};\n },\n return: async () => {\n return {value: undefined, done: true};\n },\n };\n }\n\n /**\n * Fetches the next page of items. This makes a new API request.\n *\n * @throws {Error} If there are no more pages to fetch.\n *\n * @example\n *\n * ```ts\n * const pager = await ai.files.list({config: {pageSize: 10}});\n * let page = pager.page;\n * while (true) {\n * for (const file of page) {\n * console.log(file.name);\n * }\n * if (!pager.hasNextPage()) {\n * break;\n * }\n * page = await pager.nextPage();\n * }\n * ```\n */\n async nextPage(): Promise {\n if (!this.hasNextPage()) {\n throw new Error('No more pages to fetch.');\n }\n const response = await this.requestInternal(this.params);\n this.initNextPage(response);\n return this.page;\n }\n\n /**\n * Returns true if there are more pages to fetch from the API.\n */\n hasNextPage(): boolean {\n if (this.params['config']?.['pageToken'] !== undefined) {\n return true;\n }\n return false;\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\n/** Required. Outcome of the code execution. */\nexport enum Outcome {\n OUTCOME_UNSPECIFIED = 'OUTCOME_UNSPECIFIED',\n OUTCOME_OK = 'OUTCOME_OK',\n OUTCOME_FAILED = 'OUTCOME_FAILED',\n OUTCOME_DEADLINE_EXCEEDED = 'OUTCOME_DEADLINE_EXCEEDED',\n}\n\n/** Required. Programming language of the `code`. */\nexport enum Language {\n LANGUAGE_UNSPECIFIED = 'LANGUAGE_UNSPECIFIED',\n PYTHON = 'PYTHON',\n}\n\n/** Optional. The type of the data. */\nexport enum Type {\n TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED',\n STRING = 'STRING',\n NUMBER = 'NUMBER',\n INTEGER = 'INTEGER',\n BOOLEAN = 'BOOLEAN',\n ARRAY = 'ARRAY',\n OBJECT = 'OBJECT',\n}\n\n/** Required. Harm category. */\nexport enum HarmCategory {\n HARM_CATEGORY_UNSPECIFIED = 'HARM_CATEGORY_UNSPECIFIED',\n HARM_CATEGORY_HATE_SPEECH = 'HARM_CATEGORY_HATE_SPEECH',\n HARM_CATEGORY_DANGEROUS_CONTENT = 'HARM_CATEGORY_DANGEROUS_CONTENT',\n HARM_CATEGORY_HARASSMENT = 'HARM_CATEGORY_HARASSMENT',\n HARM_CATEGORY_SEXUALLY_EXPLICIT = 'HARM_CATEGORY_SEXUALLY_EXPLICIT',\n HARM_CATEGORY_CIVIC_INTEGRITY = 'HARM_CATEGORY_CIVIC_INTEGRITY',\n}\n\n/** Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. */\nexport enum HarmBlockMethod {\n HARM_BLOCK_METHOD_UNSPECIFIED = 'HARM_BLOCK_METHOD_UNSPECIFIED',\n SEVERITY = 'SEVERITY',\n PROBABILITY = 'PROBABILITY',\n}\n\n/** Required. The harm block threshold. */\nexport enum HarmBlockThreshold {\n HARM_BLOCK_THRESHOLD_UNSPECIFIED = 'HARM_BLOCK_THRESHOLD_UNSPECIFIED',\n BLOCK_LOW_AND_ABOVE = 'BLOCK_LOW_AND_ABOVE',\n BLOCK_MEDIUM_AND_ABOVE = 'BLOCK_MEDIUM_AND_ABOVE',\n BLOCK_ONLY_HIGH = 'BLOCK_ONLY_HIGH',\n BLOCK_NONE = 'BLOCK_NONE',\n OFF = 'OFF',\n}\n\n/** The mode of the predictor to be used in dynamic retrieval. */\nexport enum Mode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n MODE_DYNAMIC = 'MODE_DYNAMIC',\n}\n\n/** Output only. The reason why the model stopped generating tokens.\n\n If empty, the model has not stopped generating the tokens.\n */\nexport enum FinishReason {\n FINISH_REASON_UNSPECIFIED = 'FINISH_REASON_UNSPECIFIED',\n STOP = 'STOP',\n MAX_TOKENS = 'MAX_TOKENS',\n SAFETY = 'SAFETY',\n RECITATION = 'RECITATION',\n OTHER = 'OTHER',\n BLOCKLIST = 'BLOCKLIST',\n PROHIBITED_CONTENT = 'PROHIBITED_CONTENT',\n SPII = 'SPII',\n MALFORMED_FUNCTION_CALL = 'MALFORMED_FUNCTION_CALL',\n IMAGE_SAFETY = 'IMAGE_SAFETY',\n}\n\n/** Output only. Harm probability levels in the content. */\nexport enum HarmProbability {\n HARM_PROBABILITY_UNSPECIFIED = 'HARM_PROBABILITY_UNSPECIFIED',\n NEGLIGIBLE = 'NEGLIGIBLE',\n LOW = 'LOW',\n MEDIUM = 'MEDIUM',\n HIGH = 'HIGH',\n}\n\n/** Output only. Harm severity levels in the content. */\nexport enum HarmSeverity {\n HARM_SEVERITY_UNSPECIFIED = 'HARM_SEVERITY_UNSPECIFIED',\n HARM_SEVERITY_NEGLIGIBLE = 'HARM_SEVERITY_NEGLIGIBLE',\n HARM_SEVERITY_LOW = 'HARM_SEVERITY_LOW',\n HARM_SEVERITY_MEDIUM = 'HARM_SEVERITY_MEDIUM',\n HARM_SEVERITY_HIGH = 'HARM_SEVERITY_HIGH',\n}\n\n/** Output only. Blocked reason. */\nexport enum BlockedReason {\n BLOCKED_REASON_UNSPECIFIED = 'BLOCKED_REASON_UNSPECIFIED',\n SAFETY = 'SAFETY',\n OTHER = 'OTHER',\n BLOCKLIST = 'BLOCKLIST',\n PROHIBITED_CONTENT = 'PROHIBITED_CONTENT',\n}\n\n/** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */\nexport enum TrafficType {\n TRAFFIC_TYPE_UNSPECIFIED = 'TRAFFIC_TYPE_UNSPECIFIED',\n ON_DEMAND = 'ON_DEMAND',\n PROVISIONED_THROUGHPUT = 'PROVISIONED_THROUGHPUT',\n}\n\n/** Server content modalities. */\nexport enum Modality {\n MODALITY_UNSPECIFIED = 'MODALITY_UNSPECIFIED',\n TEXT = 'TEXT',\n IMAGE = 'IMAGE',\n AUDIO = 'AUDIO',\n}\n\n/** The media resolution to use. */\nexport enum MediaResolution {\n MEDIA_RESOLUTION_UNSPECIFIED = 'MEDIA_RESOLUTION_UNSPECIFIED',\n MEDIA_RESOLUTION_LOW = 'MEDIA_RESOLUTION_LOW',\n MEDIA_RESOLUTION_MEDIUM = 'MEDIA_RESOLUTION_MEDIUM',\n MEDIA_RESOLUTION_HIGH = 'MEDIA_RESOLUTION_HIGH',\n}\n\n/** Config for the dynamic retrieval config mode. */\nexport enum DynamicRetrievalConfigMode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n MODE_DYNAMIC = 'MODE_DYNAMIC',\n}\n\n/** Config for the function calling config mode. */\nexport enum FunctionCallingConfigMode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n AUTO = 'AUTO',\n ANY = 'ANY',\n NONE = 'NONE',\n}\n\n/** Enum that controls the safety filter level for objectionable content. */\nexport enum SafetyFilterLevel {\n BLOCK_LOW_AND_ABOVE = 'BLOCK_LOW_AND_ABOVE',\n BLOCK_MEDIUM_AND_ABOVE = 'BLOCK_MEDIUM_AND_ABOVE',\n BLOCK_ONLY_HIGH = 'BLOCK_ONLY_HIGH',\n BLOCK_NONE = 'BLOCK_NONE',\n}\n\n/** Enum that controls the generation of people. */\nexport enum PersonGeneration {\n DONT_ALLOW = 'DONT_ALLOW',\n ALLOW_ADULT = 'ALLOW_ADULT',\n ALLOW_ALL = 'ALLOW_ALL',\n}\n\n/** Enum that specifies the language of the text in the prompt. */\nexport enum ImagePromptLanguage {\n auto = 'auto',\n en = 'en',\n ja = 'ja',\n ko = 'ko',\n hi = 'hi',\n}\n\n/** State for the lifecycle of a File. */\nexport enum FileState {\n STATE_UNSPECIFIED = 'STATE_UNSPECIFIED',\n PROCESSING = 'PROCESSING',\n ACTIVE = 'ACTIVE',\n FAILED = 'FAILED',\n}\n\n/** Source of the File. */\nexport enum FileSource {\n SOURCE_UNSPECIFIED = 'SOURCE_UNSPECIFIED',\n UPLOADED = 'UPLOADED',\n GENERATED = 'GENERATED',\n}\n\n/** Enum representing the mask mode of a mask reference image. */\nexport enum MaskReferenceMode {\n MASK_MODE_DEFAULT = 'MASK_MODE_DEFAULT',\n MASK_MODE_USER_PROVIDED = 'MASK_MODE_USER_PROVIDED',\n MASK_MODE_BACKGROUND = 'MASK_MODE_BACKGROUND',\n MASK_MODE_FOREGROUND = 'MASK_MODE_FOREGROUND',\n MASK_MODE_SEMANTIC = 'MASK_MODE_SEMANTIC',\n}\n\n/** Enum representing the control type of a control reference image. */\nexport enum ControlReferenceType {\n CONTROL_TYPE_DEFAULT = 'CONTROL_TYPE_DEFAULT',\n CONTROL_TYPE_CANNY = 'CONTROL_TYPE_CANNY',\n CONTROL_TYPE_SCRIBBLE = 'CONTROL_TYPE_SCRIBBLE',\n CONTROL_TYPE_FACE_MESH = 'CONTROL_TYPE_FACE_MESH',\n}\n\n/** Enum representing the subject type of a subject reference image. */\nexport enum SubjectReferenceType {\n SUBJECT_TYPE_DEFAULT = 'SUBJECT_TYPE_DEFAULT',\n SUBJECT_TYPE_PERSON = 'SUBJECT_TYPE_PERSON',\n SUBJECT_TYPE_ANIMAL = 'SUBJECT_TYPE_ANIMAL',\n SUBJECT_TYPE_PRODUCT = 'SUBJECT_TYPE_PRODUCT',\n}\n\n/** Server content modalities. */\nexport enum MediaModality {\n MODALITY_UNSPECIFIED = 'MODALITY_UNSPECIFIED',\n TEXT = 'TEXT',\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n AUDIO = 'AUDIO',\n DOCUMENT = 'DOCUMENT',\n}\n\n/** Start of speech sensitivity. */\nexport enum StartSensitivity {\n START_SENSITIVITY_UNSPECIFIED = 'START_SENSITIVITY_UNSPECIFIED',\n START_SENSITIVITY_HIGH = 'START_SENSITIVITY_HIGH',\n START_SENSITIVITY_LOW = 'START_SENSITIVITY_LOW',\n}\n\n/** End of speech sensitivity. */\nexport enum EndSensitivity {\n END_SENSITIVITY_UNSPECIFIED = 'END_SENSITIVITY_UNSPECIFIED',\n END_SENSITIVITY_HIGH = 'END_SENSITIVITY_HIGH',\n END_SENSITIVITY_LOW = 'END_SENSITIVITY_LOW',\n}\n\n/** The different ways of handling user activity. */\nexport enum ActivityHandling {\n ACTIVITY_HANDLING_UNSPECIFIED = 'ACTIVITY_HANDLING_UNSPECIFIED',\n START_OF_ACTIVITY_INTERRUPTS = 'START_OF_ACTIVITY_INTERRUPTS',\n NO_INTERRUPTION = 'NO_INTERRUPTION',\n}\n\n/** Options about which input is included in the user's turn. */\nexport enum TurnCoverage {\n TURN_COVERAGE_UNSPECIFIED = 'TURN_COVERAGE_UNSPECIFIED',\n TURN_INCLUDES_ONLY_ACTIVITY = 'TURN_INCLUDES_ONLY_ACTIVITY',\n TURN_INCLUDES_ALL_INPUT = 'TURN_INCLUDES_ALL_INPUT',\n}\n\n/** Metadata describes the input video content. */\nexport declare interface VideoMetadata {\n /** Optional. The end offset of the video. */\n endOffset?: string;\n /** Optional. The start offset of the video. */\n startOffset?: string;\n}\n\n/** Result of executing the [ExecutableCode]. Always follows a `part` containing the [ExecutableCode]. */\nexport declare interface CodeExecutionResult {\n /** Required. Outcome of the code execution. */\n outcome?: Outcome;\n /** Optional. Contains stdout when code execution is successful, stderr or other description otherwise. */\n output?: string;\n}\n\n/** Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the [FunctionDeclaration] tool and [FunctionCallingConfig] mode is set to [Mode.CODE]. */\nexport declare interface ExecutableCode {\n /** Required. The code to be executed. */\n code?: string;\n /** Required. Programming language of the `code`. */\n language?: Language;\n}\n\n/** URI based data. */\nexport declare interface FileData {\n /** Required. URI. */\n fileUri?: string;\n /** Required. The IANA standard MIME type of the source data. */\n mimeType?: string;\n}\n\n/** A function call. */\nexport declare interface FunctionCall {\n /** The unique id of the function call. If populated, the client to execute the\n `function_call` and return the response with the matching `id`. */\n id?: string;\n /** Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. */\n args?: Record;\n /** Required. The name of the function to call. Matches [FunctionDeclaration.name]. */\n name?: string;\n}\n\n/** A function response. */\nexport class FunctionResponse {\n /** The id of the function call this response is for. Populated by the client\n to match the corresponding function call `id`. */\n id?: string;\n /** Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. */\n name?: string;\n /** Required. The function response in JSON object format. Use \"output\" key to specify function output and \"error\" key to specify error details (if any). If \"output\" and \"error\" keys are not specified, then whole \"response\" is treated as function output. */\n response?: Record;\n}\n\n/** Content blob. */\nexport declare interface Blob {\n /** Required. Raw bytes. */\n data?: string;\n /** Required. The IANA standard MIME type of the source data. */\n mimeType?: string;\n}\n\n/** A datatype containing media content.\n\n Exactly one field within a Part should be set, representing the specific type\n of content being conveyed. Using multiple fields within the same `Part`\n instance is considered invalid.\n */\nexport declare interface Part {\n /** Metadata for a given video. */\n videoMetadata?: VideoMetadata;\n /** Indicates if the part is thought from the model. */\n thought?: boolean;\n /** Optional. Result of executing the [ExecutableCode]. */\n codeExecutionResult?: CodeExecutionResult;\n /** Optional. Code generated by the model that is meant to be executed. */\n executableCode?: ExecutableCode;\n /** Optional. URI based data. */\n fileData?: FileData;\n /** Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. */\n functionCall?: FunctionCall;\n /** Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. */\n functionResponse?: FunctionResponse;\n /** Optional. Inlined bytes data. */\n inlineData?: Blob;\n /** Optional. Text part (can be code). */\n text?: string;\n}\n/**\n * Creates a `Part` object from a `URI` string.\n */\nexport function createPartFromUri(uri: string, mimeType: string): Part {\n return {\n fileData: {\n fileUri: uri,\n mimeType: mimeType,\n },\n };\n}\n/**\n * Creates a `Part` object from a `text` string.\n */\nexport function createPartFromText(text: string): Part {\n return {\n text: text,\n };\n}\n/**\n * Creates a `Part` object from a `FunctionCall` object.\n */\nexport function createPartFromFunctionCall(\n name: string,\n args: Record,\n): Part {\n return {\n functionCall: {\n name: name,\n args: args,\n },\n };\n}\n/**\n * Creates a `Part` object from a `FunctionResponse` object.\n */\nexport function createPartFromFunctionResponse(\n id: string,\n name: string,\n response: Record,\n): Part {\n return {\n functionResponse: {\n id: id,\n name: name,\n response: response,\n },\n };\n}\n/**\n * Creates a `Part` object from a `base64` encoded `string`.\n */\nexport function createPartFromBase64(data: string, mimeType: string): Part {\n return {\n inlineData: {\n data: data,\n mimeType: mimeType,\n },\n };\n}\n/**\n * Creates a `Part` object from the `outcome` and `output` of a `CodeExecutionResult` object.\n */\nexport function createPartFromCodeExecutionResult(\n outcome: Outcome,\n output: string,\n): Part {\n return {\n codeExecutionResult: {\n outcome: outcome,\n output: output,\n },\n };\n}\n/**\n * Creates a `Part` object from the `code` and `language` of an `ExecutableCode` object.\n */\nexport function createPartFromExecutableCode(\n code: string,\n language: Language,\n): Part {\n return {\n executableCode: {\n code: code,\n language: language,\n },\n };\n}\n\n/** Contains the multi-part content of a message. */\nexport declare interface Content {\n /** List of parts that constitute a single message. Each part may have\n a different IANA MIME type. */\n parts?: Part[];\n /** Optional. The producer of the content. Must be either 'user' or\n 'model'. Useful to set for multi-turn conversations, otherwise can be\n empty. If role is not specified, SDK will determine the role. */\n role?: string;\n}\nfunction _isPart(obj: unknown): obj is Part {\n if (typeof obj === 'object' && obj !== null) {\n return (\n 'fileData' in obj ||\n 'text' in obj ||\n 'functionCall' in obj ||\n 'functionResponse' in obj ||\n 'inlineData' in obj ||\n 'videoMetadata' in obj ||\n 'codeExecutionResult' in obj ||\n 'executableCode' in obj\n );\n }\n return false;\n}\nfunction _toParts(partOrString: PartListUnion | string): Part[] {\n const parts: Part[] = [];\n if (typeof partOrString === 'string') {\n parts.push(createPartFromText(partOrString));\n } else if (_isPart(partOrString)) {\n parts.push(partOrString);\n } else if (Array.isArray(partOrString)) {\n if (partOrString.length === 0) {\n throw new Error('partOrString cannot be an empty array');\n }\n for (const part of partOrString) {\n if (typeof part === 'string') {\n parts.push(createPartFromText(part));\n } else if (_isPart(part)) {\n parts.push(part);\n } else {\n throw new Error('element in PartUnion must be a Part object or string');\n }\n }\n } else {\n throw new Error('partOrString must be a Part object, string, or array');\n }\n return parts;\n}\n/**\n * Creates a `Content` object with a user role from a `PartListUnion` object or `string`.\n */\nexport function createUserContent(\n partOrString: PartListUnion | string,\n): Content {\n return {\n role: 'user',\n parts: _toParts(partOrString),\n };\n}\n\n/**\n * Creates a `Content` object with a model role from a `PartListUnion` object or `string`.\n */\nexport function createModelContent(\n partOrString: PartListUnion | string,\n): Content {\n return {\n role: 'model',\n parts: _toParts(partOrString),\n };\n}\n/** HTTP options to be used in each of the requests. */\nexport declare interface HttpOptions {\n /** The base URL for the AI platform service endpoint. */\n baseUrl?: string;\n /** Specifies the version of the API to use. */\n apiVersion?: string;\n /** Additional HTTP headers to be sent with the request. */\n headers?: Record;\n /** Timeout for the request in milliseconds. */\n timeout?: number;\n}\n\n/** Schema that defines the format of input and output data.\n\n Represents a select subset of an OpenAPI 3.0 schema object.\n */\nexport declare interface Schema {\n /** Optional. Example of the object. Will only populated when the object is the root. */\n example?: unknown;\n /** Optional. Pattern of the Type.STRING to restrict a string to a regular expression. */\n pattern?: string;\n /** Optional. Default value of the data. */\n default?: unknown;\n /** Optional. Maximum length of the Type.STRING */\n maxLength?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING */\n minLength?: string;\n /** Optional. Minimum number of the properties for Type.OBJECT. */\n minProperties?: string;\n /** Optional. Maximum number of the properties for Type.OBJECT. */\n maxProperties?: string;\n /** Optional. The value should be validated against any (one or more) of the subschemas in the list. */\n anyOf?: Schema[];\n /** Optional. The description of the data. */\n description?: string;\n /** Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:[\"EAST\", NORTH\", \"SOUTH\", \"WEST\"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:[\"101\", \"201\", \"301\"]} */\n enum?: string[];\n /** Optional. The format of the data. Supported formats: for NUMBER type: \"float\", \"double\" for INTEGER type: \"int32\", \"int64\" for STRING type: \"email\", \"byte\", etc */\n format?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. */\n items?: Schema;\n /** Optional. Maximum number of the elements for Type.ARRAY. */\n maxItems?: string;\n /** Optional. Maximum value of the Type.INTEGER and Type.NUMBER */\n maximum?: number;\n /** Optional. Minimum number of the elements for Type.ARRAY. */\n minItems?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER */\n minimum?: number;\n /** Optional. Indicates if the value may be null. */\n nullable?: boolean;\n /** Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. */\n properties?: Record;\n /** Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. */\n propertyOrdering?: string[];\n /** Optional. Required properties of Type.OBJECT. */\n required?: string[];\n /** Optional. The title of the Schema. */\n title?: string;\n /** Optional. The type of the data. */\n type?: Type;\n}\n\n/** Safety settings. */\nexport declare interface SafetySetting {\n /** Determines if the harm block method uses probability or probability\n and severity scores. */\n method?: HarmBlockMethod;\n /** Required. Harm category. */\n category?: HarmCategory;\n /** Required. The harm block threshold. */\n threshold?: HarmBlockThreshold;\n}\n\n/** Defines a function that the model can generate JSON inputs for.\n\n The inputs are based on `OpenAPI 3.0 specifications\n `_.\n */\nexport declare interface FunctionDeclaration {\n /** Describes the output from the function in the OpenAPI JSON Schema\n Object format. */\n response?: Schema;\n /** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */\n description?: string;\n /** Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. */\n name?: string;\n /** Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 */\n parameters?: Schema;\n}\n\n/** Tool to support Google Search in Model. Powered by Google. */\nexport declare interface GoogleSearch {}\n\n/** Describes the options to customize dynamic retrieval. */\nexport declare interface DynamicRetrievalConfig {\n /** The mode of the predictor to be used in dynamic retrieval. */\n mode?: DynamicRetrievalConfigMode;\n /** Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used. */\n dynamicThreshold?: number;\n}\n\n/** Tool to retrieve public web data for grounding, powered by Google. */\nexport declare interface GoogleSearchRetrieval {\n /** Specifies the dynamic retrieval configuration for the given source. */\n dynamicRetrievalConfig?: DynamicRetrievalConfig;\n}\n\n/** Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder */\nexport declare interface VertexAISearch {\n /** Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` */\n datastore?: string;\n /** Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` */\n engine?: string;\n}\n\n/** The definition of the Rag resource. */\nexport declare interface VertexRagStoreRagResource {\n /** Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` */\n ragCorpus?: string;\n /** Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field. */\n ragFileIds?: string[];\n}\n\n/** Retrieve from Vertex RAG Store for grounding. */\nexport declare interface VertexRagStore {\n /** Optional. Deprecated. Please use rag_resources instead. */\n ragCorpora?: string[];\n /** Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. */\n ragResources?: VertexRagStoreRagResource[];\n /** Optional. Number of top k results to return from the selected corpora. */\n similarityTopK?: number;\n /** Optional. Only return results with vector distance smaller than the threshold. */\n vectorDistanceThreshold?: number;\n}\n\n/** Defines a retrieval tool that model can call to access external knowledge. */\nexport declare interface Retrieval {\n /** Optional. Deprecated. This option is no longer supported. */\n disableAttribution?: boolean;\n /** Set to use data source powered by Vertex AI Search. */\n vertexAiSearch?: VertexAISearch;\n /** Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService. */\n vertexRagStore?: VertexRagStore;\n}\n\n/** Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. */\nexport declare interface ToolCodeExecution {}\n\n/** Tool details of a tool that the model may use to generate a response. */\nexport declare interface Tool {\n /** List of function declarations that the tool supports. */\n functionDeclarations?: FunctionDeclaration[];\n /** Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. */\n retrieval?: Retrieval;\n /** Optional. Google Search tool type. Specialized retrieval tool\n that is powered by Google Search. */\n googleSearch?: GoogleSearch;\n /** Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. */\n googleSearchRetrieval?: GoogleSearchRetrieval;\n /** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services. */\n codeExecution?: ToolCodeExecution;\n}\n\n/** Function calling config. */\nexport declare interface FunctionCallingConfig {\n /** Optional. Function calling mode. */\n mode?: FunctionCallingConfigMode;\n /** Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided. */\n allowedFunctionNames?: string[];\n}\n\n/** Tool config.\n\n This config is shared for all tools provided in the request.\n */\nexport declare interface ToolConfig {\n /** Optional. Function calling config. */\n functionCallingConfig?: FunctionCallingConfig;\n}\n\n/** The configuration for the prebuilt speaker to use. */\nexport declare interface PrebuiltVoiceConfig {\n /** The name of the prebuilt voice to use.\n */\n voiceName?: string;\n}\n\n/** The configuration for the voice to use. */\nexport declare interface VoiceConfig {\n /** The configuration for the speaker to use.\n */\n prebuiltVoiceConfig?: PrebuiltVoiceConfig;\n}\n\n/** The speech generation configuration. */\nexport declare interface SpeechConfig {\n /** The configuration for the speaker to use.\n */\n voiceConfig?: VoiceConfig;\n}\n\n/** The thinking features configuration. */\nexport declare interface ThinkingConfig {\n /** Indicates whether to include thoughts in the response. If true, thoughts are returned only if the model supports thought and thoughts are available.\n */\n includeThoughts?: boolean;\n /** Indicates the thinking budget in tokens.\n */\n thinkingBudget?: number;\n}\n\n/** When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. */\nexport declare interface GenerationConfigRoutingConfigAutoRoutingMode {\n /** The model routing preference. */\n modelRoutingPreference?:\n | 'UNKNOWN'\n | 'PRIORITIZE_QUALITY'\n | 'BALANCED'\n | 'PRIORITIZE_COST';\n}\n\n/** When manual routing is set, the specified model will be used directly. */\nexport declare interface GenerationConfigRoutingConfigManualRoutingMode {\n /** The model name to use. Only the public LLM models are accepted. e.g. 'gemini-1.5-pro-001'. */\n modelName?: string;\n}\n\n/** The configuration for routing the request to a specific model. */\nexport declare interface GenerationConfigRoutingConfig {\n /** Automated routing. */\n autoMode?: GenerationConfigRoutingConfigAutoRoutingMode;\n /** Manual routing. */\n manualMode?: GenerationConfigRoutingConfigManualRoutingMode;\n}\n\n/** Optional model configuration parameters.\n\n For more information, see `Content generation parameters\n `_.\n */\nexport declare interface GenerateContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Instructions for the model to steer it toward better performance.\n For example, \"Answer as concisely as possible\" or \"Don't use technical\n terms in your response\".\n */\n systemInstruction?: ContentUnion;\n /** Value that controls the degree of randomness in token selection.\n Lower temperatures are good for prompts that require a less open-ended or\n creative response, while higher temperatures can lead to more diverse or\n creative results.\n */\n temperature?: number;\n /** Tokens are selected from the most to least probable until the sum\n of their probabilities equals this value. Use a lower value for less\n random responses and a higher value for more random responses.\n */\n topP?: number;\n /** For each token selection step, the ``top_k`` tokens with the\n highest probabilities are sampled. Then tokens are further filtered based\n on ``top_p`` with the final token selected using temperature sampling. Use\n a lower number for less random responses and a higher number for more\n random responses.\n */\n topK?: number;\n /** Number of response variations to return.\n */\n candidateCount?: number;\n /** Maximum number of tokens that can be generated in the response.\n */\n maxOutputTokens?: number;\n /** List of strings that tells the model to stop generating text if one\n of the strings is encountered in the response.\n */\n stopSequences?: string[];\n /** Whether to return the log probabilities of the tokens that were\n chosen by the model at each step.\n */\n responseLogprobs?: boolean;\n /** Number of top candidate tokens to return the log probabilities for\n at each generation step.\n */\n logprobs?: number;\n /** Positive values penalize tokens that already appear in the\n generated text, increasing the probability of generating more diverse\n content.\n */\n presencePenalty?: number;\n /** Positive values penalize tokens that repeatedly appear in the\n generated text, increasing the probability of generating more diverse\n content.\n */\n frequencyPenalty?: number;\n /** When ``seed`` is fixed to a specific number, the model makes a best\n effort to provide the same response for repeated requests. By default, a\n random number is used.\n */\n seed?: number;\n /** Output response media type of the generated candidate text.\n */\n responseMimeType?: string;\n /** Schema that the generated candidate text must adhere to.\n */\n responseSchema?: SchemaUnion;\n /** Configuration for model router requests.\n */\n routingConfig?: GenerationConfigRoutingConfig;\n /** Safety settings in the request to block unsafe content in the\n response.\n */\n safetySettings?: SafetySetting[];\n /** Code that enables the system to interact with external systems to\n perform an action outside of the knowledge and scope of the model.\n */\n tools?: ToolListUnion;\n /** Associates model output to a specific function call.\n */\n toolConfig?: ToolConfig;\n /** Labels with user-defined metadata to break down billed charges. */\n labels?: Record;\n /** Resource name of a context cache that can be used in subsequent\n requests.\n */\n cachedContent?: string;\n /** The requested modalities of the response. Represents the set of\n modalities that the model can return.\n */\n responseModalities?: string[];\n /** If specified, the media resolution specified will be used.\n */\n mediaResolution?: MediaResolution;\n /** The speech generation configuration.\n */\n speechConfig?: SpeechConfigUnion;\n /** If enabled, audio timestamp will be included in the request to the\n model.\n */\n audioTimestamp?: boolean;\n /** The thinking features configuration.\n */\n thinkingConfig?: ThinkingConfig;\n}\n\n/** Config for models.generate_content parameters. */\nexport declare interface GenerateContentParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Content of the request.\n */\n contents: ContentListUnion;\n /** Configuration that contains optional model parameters.\n */\n config?: GenerateContentConfig;\n}\n\n/** Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp */\nexport declare interface GoogleTypeDate {\n /** Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */\n day?: number;\n /** Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */\n month?: number;\n /** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */\n year?: number;\n}\n\n/** Source attributions for content. */\nexport declare interface Citation {\n /** Output only. End index into the content. */\n endIndex?: number;\n /** Output only. License of the attribution. */\n license?: string;\n /** Output only. Publication date of the attribution. */\n publicationDate?: GoogleTypeDate;\n /** Output only. Start index into the content. */\n startIndex?: number;\n /** Output only. Title of the attribution. */\n title?: string;\n /** Output only. Url reference of the attribution. */\n uri?: string;\n}\n\n/** Citation information when the model quotes another source. */\nexport declare interface CitationMetadata {\n /** Contains citation information when the model directly quotes, at\n length, from another source. Can include traditional websites and code\n repositories.\n */\n citations?: Citation[];\n}\n\n/** Chunk from context retrieved by the retrieval tools. */\nexport declare interface GroundingChunkRetrievedContext {\n /** Text of the attribution. */\n text?: string;\n /** Title of the attribution. */\n title?: string;\n /** URI reference of the attribution. */\n uri?: string;\n}\n\n/** Chunk from the web. */\nexport declare interface GroundingChunkWeb {\n /** Domain of the (original) URI. */\n domain?: string;\n /** Title of the chunk. */\n title?: string;\n /** URI reference of the chunk. */\n uri?: string;\n}\n\n/** Grounding chunk. */\nexport declare interface GroundingChunk {\n /** Grounding chunk from context retrieved by the retrieval tools. */\n retrievedContext?: GroundingChunkRetrievedContext;\n /** Grounding chunk from the web. */\n web?: GroundingChunkWeb;\n}\n\n/** Segment of the content. */\nexport declare interface Segment {\n /** Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero. */\n endIndex?: number;\n /** Output only. The index of a Part object within its parent Content object. */\n partIndex?: number;\n /** Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero. */\n startIndex?: number;\n /** Output only. The text corresponding to the segment from the response. */\n text?: string;\n}\n\n/** Grounding support. */\nexport declare interface GroundingSupport {\n /** Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the grounding_chunk_indices. */\n confidenceScores?: number[];\n /** A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim. */\n groundingChunkIndices?: number[];\n /** Segment of the content this support belongs to. */\n segment?: Segment;\n}\n\n/** Metadata related to retrieval in the grounding flow. */\nexport declare interface RetrievalMetadata {\n /** Optional. Score indicating how likely information from Google Search could help answer the prompt. The score is in the range `[0, 1]`, where 0 is the least likely and 1 is the most likely. This score is only populated when Google Search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger Google Search. */\n googleSearchDynamicRetrievalScore?: number;\n}\n\n/** Google search entry point. */\nexport declare interface SearchEntryPoint {\n /** Optional. Web content snippet that can be embedded in a web page or an app webview. */\n renderedContent?: string;\n /** Optional. Base64 encoded JSON representing array of tuple. */\n sdkBlob?: string;\n}\n\n/** Metadata returned to client when grounding is enabled. */\nexport declare interface GroundingMetadata {\n /** List of supporting references retrieved from specified grounding source. */\n groundingChunks?: GroundingChunk[];\n /** Optional. List of grounding support. */\n groundingSupports?: GroundingSupport[];\n /** Optional. Output only. Retrieval metadata. */\n retrievalMetadata?: RetrievalMetadata;\n /** Optional. Queries executed by the retrieval tools. */\n retrievalQueries?: string[];\n /** Optional. Google search entry for the following-up web searches. */\n searchEntryPoint?: SearchEntryPoint;\n /** Optional. Web search queries for the following-up web search. */\n webSearchQueries?: string[];\n}\n\n/** Candidate for the logprobs token and score. */\nexport declare interface LogprobsResultCandidate {\n /** The candidate's log probability. */\n logProbability?: number;\n /** The candidate's token string value. */\n token?: string;\n /** The candidate's token id value. */\n tokenId?: number;\n}\n\n/** Candidates with top log probabilities at each decoding step. */\nexport declare interface LogprobsResultTopCandidates {\n /** Sorted by log probability in descending order. */\n candidates?: LogprobsResultCandidate[];\n}\n\n/** Logprobs Result */\nexport declare interface LogprobsResult {\n /** Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates. */\n chosenCandidates?: LogprobsResultCandidate[];\n /** Length = total number of decoding steps. */\n topCandidates?: LogprobsResultTopCandidates[];\n}\n\n/** Safety rating corresponding to the generated content. */\nexport declare interface SafetyRating {\n /** Output only. Indicates whether the content was filtered out because of this rating. */\n blocked?: boolean;\n /** Output only. Harm category. */\n category?: HarmCategory;\n /** Output only. Harm probability levels in the content. */\n probability?: HarmProbability;\n /** Output only. Harm probability score. */\n probabilityScore?: number;\n /** Output only. Harm severity levels in the content. */\n severity?: HarmSeverity;\n /** Output only. Harm severity score. */\n severityScore?: number;\n}\n\n/** A response candidate generated from the model. */\nexport declare interface Candidate {\n /** Contains the multi-part content of the response.\n */\n content?: Content;\n /** Source attribution of the generated content.\n */\n citationMetadata?: CitationMetadata;\n /** Describes the reason the model stopped generating tokens.\n */\n finishMessage?: string;\n /** Number of tokens for this candidate.\n */\n tokenCount?: number;\n /** The reason why the model stopped generating tokens.\n If empty, the model has not stopped generating the tokens.\n */\n finishReason?: FinishReason;\n /** Output only. Average log probability score of the candidate. */\n avgLogprobs?: number;\n /** Output only. Metadata specifies sources used to ground generated content. */\n groundingMetadata?: GroundingMetadata;\n /** Output only. Index of the candidate. */\n index?: number;\n /** Output only. Log-likelihood scores for the response tokens and top tokens */\n logprobsResult?: LogprobsResult;\n /** Output only. List of ratings for the safety of a response candidate. There is at most one rating per category. */\n safetyRatings?: SafetyRating[];\n}\n\n/** Content filter results for a prompt sent in the request. */\nexport class GenerateContentResponsePromptFeedback {\n /** Output only. Blocked reason. */\n blockReason?: BlockedReason;\n /** Output only. A readable block reason message. */\n blockReasonMessage?: string;\n /** Output only. Safety ratings. */\n safetyRatings?: SafetyRating[];\n}\n\n/** Represents token counting info for a single modality. */\nexport declare interface ModalityTokenCount {\n /** The modality associated with this token count. */\n modality?: MediaModality;\n /** Number of tokens. */\n tokenCount?: number;\n}\n\n/** Usage metadata about response(s). */\nexport class GenerateContentResponseUsageMetadata {\n /** Output only. List of modalities of the cached content in the request input. */\n cacheTokensDetails?: ModalityTokenCount[];\n /** Output only. Number of tokens in the cached part in the input (the cached content). */\n cachedContentTokenCount?: number;\n /** Number of tokens in the response(s). */\n candidatesTokenCount?: number;\n /** Output only. List of modalities that were returned in the response. */\n candidatesTokensDetails?: ModalityTokenCount[];\n /** Number of tokens in the request. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */\n promptTokenCount?: number;\n /** Output only. List of modalities that were processed in the request input. */\n promptTokensDetails?: ModalityTokenCount[];\n /** Output only. Number of tokens present in thoughts output. */\n thoughtsTokenCount?: number;\n /** Output only. Number of tokens present in tool-use prompt(s). */\n toolUsePromptTokenCount?: number;\n /** Output only. List of modalities that were processed for tool-use request inputs. */\n toolUsePromptTokensDetails?: ModalityTokenCount[];\n /** Total token count for prompt, response candidates, and tool-use prompts (if present). */\n totalTokenCount?: number;\n /** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */\n trafficType?: TrafficType;\n}\n\n/** Response message for PredictionService.GenerateContent. */\nexport class GenerateContentResponse {\n /** Response variations returned by the model.\n */\n candidates?: Candidate[];\n /** Timestamp when the request is made to the server.\n */\n createTime?: string;\n /** Identifier for each response.\n */\n responseId?: string;\n /** Output only. The model version used to generate the response. */\n modelVersion?: string;\n /** Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations. */\n promptFeedback?: GenerateContentResponsePromptFeedback;\n /** Usage metadata about the response(s). */\n usageMetadata?: GenerateContentResponseUsageMetadata;\n /**\n * Returns the concatenation of all text parts from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the text from the first\n * one will be returned.\n * If there are non-text parts in the response, the concatenation of all text\n * parts will be returned, and a warning will be logged.\n * If there are thought parts in the response, the concatenation of all text\n * parts excluding the thought parts will be returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'Why is the sky blue?',\n * });\n *\n * console.debug(response.text);\n * ```\n */\n get text(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning text from the first one.',\n );\n }\n let text = '';\n let anyTextPartText = false;\n const nonTextParts = [];\n for (const part of this.candidates?.[0]?.content?.parts ?? []) {\n for (const [fieldName, fieldValue] of Object.entries(part)) {\n if (\n fieldName !== 'text' &&\n fieldName !== 'thought' &&\n (fieldValue !== null || fieldValue !== undefined)\n ) {\n nonTextParts.push(fieldName);\n }\n }\n if (typeof part.text === 'string') {\n if (typeof part.thought === 'boolean' && part.thought) {\n continue;\n }\n anyTextPartText = true;\n text += part.text;\n }\n }\n if (nonTextParts.length > 0) {\n console.warn(\n `there are non-text parts ${nonTextParts} in the response, returning concatenation of all text parts. Please refer to the non text parts for a full response from model.`,\n );\n }\n // part.text === '' is different from part.text is null\n return anyTextPartText ? text : undefined;\n }\n\n /**\n * Returns the function calls from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the function calls from\n * the first one will be returned.\n * If there are no function calls in the response, undefined will be returned.\n *\n * @example\n * ```ts\n * const controlLightFunctionDeclaration: FunctionDeclaration = {\n * name: 'controlLight',\n * parameters: {\n * type: Type.OBJECT,\n * description: 'Set the brightness and color temperature of a room light.',\n * properties: {\n * brightness: {\n * type: Type.NUMBER,\n * description:\n * 'Light level from 0 to 100. Zero is off and 100 is full brightness.',\n * },\n * colorTemperature: {\n * type: Type.STRING,\n * description:\n * 'Color temperature of the light fixture which can be `daylight`, `cool` or `warm`.',\n * },\n * },\n * required: ['brightness', 'colorTemperature'],\n * };\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents: 'Dim the lights so the room feels cozy and warm.',\n * config: {\n * tools: [{functionDeclarations: [controlLightFunctionDeclaration]}],\n * toolConfig: {\n * functionCallingConfig: {\n * mode: FunctionCallingConfigMode.ANY,\n * allowedFunctionNames: ['controlLight'],\n * },\n * },\n * },\n * });\n * console.debug(JSON.stringify(response.functionCalls));\n * ```\n */\n get functionCalls(): FunctionCall[] | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning function calls from the first one.',\n );\n }\n const functionCalls = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.functionCall)\n .map((part) => part.functionCall)\n .filter(\n (functionCall): functionCall is FunctionCall =>\n functionCall !== undefined,\n );\n if (functionCalls?.length === 0) {\n return undefined;\n }\n return functionCalls;\n }\n /**\n * Returns the first executable code from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the executable code from\n * the first one will be returned.\n * If there are no executable code in the response, undefined will be\n * returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.'\n * config: {\n * tools: [{codeExecution: {}}],\n * },\n * });\n *\n * console.debug(response.executableCode);\n * ```\n */\n get executableCode(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning executable code from the first one.',\n );\n }\n const executableCode = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.executableCode)\n .map((part) => part.executableCode)\n .filter(\n (executableCode): executableCode is ExecutableCode =>\n executableCode !== undefined,\n );\n if (executableCode?.length === 0) {\n return undefined;\n }\n\n return executableCode?.[0]?.code;\n }\n /**\n * Returns the first code execution result from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the code execution result from\n * the first one will be returned.\n * If there are no code execution result in the response, undefined will be returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.'\n * config: {\n * tools: [{codeExecution: {}}],\n * },\n * });\n *\n * console.debug(response.codeExecutionResult);\n * ```\n */\n get codeExecutionResult(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning code execution result from the first one.',\n );\n }\n const codeExecutionResult = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.codeExecutionResult)\n .map((part) => part.codeExecutionResult)\n .filter(\n (codeExecutionResult): codeExecutionResult is CodeExecutionResult =>\n codeExecutionResult !== undefined,\n );\n if (codeExecutionResult?.length === 0) {\n return undefined;\n }\n return codeExecutionResult?.[0]?.output;\n }\n}\n\nexport /** Optional parameters for the embed_content method. */\ndeclare interface EmbedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Type of task for which the embedding will be used.\n */\n taskType?: string;\n /** Title for the text. Only applicable when TaskType is\n `RETRIEVAL_DOCUMENT`.\n */\n title?: string;\n /** Reduced dimension for the output embedding. If set,\n excessive values in the output embedding are truncated from the end.\n Supported by newer models since 2024 only. You cannot set this value if\n using the earlier model (`models/embedding-001`).\n */\n outputDimensionality?: number;\n /** Vertex API only. The MIME type of the input.\n */\n mimeType?: string;\n /** Vertex API only. Whether to silently truncate inputs longer than\n the max sequence length. If this option is set to false, oversized inputs\n will lead to an INVALID_ARGUMENT error, similar to other text APIs.\n */\n autoTruncate?: boolean;\n}\n\n/** Parameters for the embed_content method. */\nexport declare interface EmbedContentParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** The content to embed. Only the `parts.text` fields will be counted.\n */\n contents: ContentListUnion;\n /** Configuration that contains optional parameters.\n */\n config?: EmbedContentConfig;\n}\n\n/** Statistics of the input text associated with the result of content embedding. */\nexport declare interface ContentEmbeddingStatistics {\n /** Vertex API only. If the input text was truncated due to having\n a length longer than the allowed maximum input.\n */\n truncated?: boolean;\n /** Vertex API only. Number of tokens of the input text.\n */\n tokenCount?: number;\n}\n\n/** The embedding generated from an input content. */\nexport declare interface ContentEmbedding {\n /** A list of floats representing an embedding.\n */\n values?: number[];\n /** Vertex API only. Statistics of the input text associated with this\n embedding.\n */\n statistics?: ContentEmbeddingStatistics;\n}\n\n/** Request-level metadata for the Vertex Embed Content API. */\nexport declare interface EmbedContentMetadata {\n /** Vertex API only. The total number of billable characters included\n in the request.\n */\n billableCharacterCount?: number;\n}\n\n/** Response for the embed_content method. */\nexport class EmbedContentResponse {\n /** The embeddings for each request, in the same order as provided in\n the batch request.\n */\n embeddings?: ContentEmbedding[];\n /** Vertex API only. Metadata about the request.\n */\n metadata?: EmbedContentMetadata;\n}\n\n/** The config for generating an images. */\nexport declare interface GenerateImagesConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Cloud Storage URI used to store the generated images.\n */\n outputGcsUri?: string;\n /** Description of what to discourage in the generated images.\n */\n negativePrompt?: string;\n /** Number of images to generate.\n */\n numberOfImages?: number;\n /** Aspect ratio of the generated images.\n */\n aspectRatio?: string;\n /** Controls how much the model adheres to the text prompt. Large\n values increase output and prompt alignment, but may compromise image\n quality.\n */\n guidanceScale?: number;\n /** Random seed for image generation. This is not available when\n ``add_watermark`` is set to true.\n */\n seed?: number;\n /** Filter level for safety filtering.\n */\n safetyFilterLevel?: SafetyFilterLevel;\n /** Allows generation of people by the model.\n */\n personGeneration?: PersonGeneration;\n /** Whether to report the safety scores of each generated image and\n the positive prompt in the response.\n */\n includeSafetyAttributes?: boolean;\n /** Whether to include the Responsible AI filter reason if the image\n is filtered out of the response.\n */\n includeRaiReason?: boolean;\n /** Language of the text in the prompt.\n */\n language?: ImagePromptLanguage;\n /** MIME type of the generated image.\n */\n outputMimeType?: string;\n /** Compression quality of the generated image (for ``image/jpeg``\n only).\n */\n outputCompressionQuality?: number;\n /** Whether to add a watermark to the generated images.\n */\n addWatermark?: boolean;\n /** Whether to use the prompt rewriting logic.\n */\n enhancePrompt?: boolean;\n}\n\n/** The parameters for generating images. */\nexport declare interface GenerateImagesParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Text prompt that typically describes the images to output.\n */\n prompt: string;\n /** Configuration for generating images.\n */\n config?: GenerateImagesConfig;\n}\n\n/** An image. */\nexport declare interface Image {\n /** The Cloud Storage URI of the image. ``Image`` can contain a value\n for this field or the ``image_bytes`` field but not both.\n */\n gcsUri?: string;\n /** The image bytes data. ``Image`` can contain a value for this field\n or the ``gcs_uri`` field but not both.\n */\n imageBytes?: string;\n /** The MIME type of the image. */\n mimeType?: string;\n}\n\n/** Safety attributes of a GeneratedImage or the user-provided prompt. */\nexport declare interface SafetyAttributes {\n /** List of RAI categories.\n */\n categories?: string[];\n /** List of scores of each categories.\n */\n scores?: number[];\n /** Internal use only.\n */\n contentType?: string;\n}\n\n/** An output image. */\nexport declare interface GeneratedImage {\n /** The output image data.\n */\n image?: Image;\n /** Responsible AI filter reason if the image is filtered out of the\n response.\n */\n raiFilteredReason?: string;\n /** Safety attributes of the image. Lists of RAI categories and their\n scores of each content.\n */\n safetyAttributes?: SafetyAttributes;\n /** The rewritten prompt used for the image generation if the prompt\n enhancer is enabled.\n */\n enhancedPrompt?: string;\n}\n\n/** The output images response. */\nexport class GenerateImagesResponse {\n /** List of generated images.\n */\n generatedImages?: GeneratedImage[];\n /** Safety attributes of the positive prompt. Only populated if\n ``include_safety_attributes`` is set to True.\n */\n positivePromptSafetyAttributes?: SafetyAttributes;\n}\n\n/** Optional parameters for models.get method. */\nexport declare interface GetModelConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\nexport declare interface GetModelParameters {\n model: string;\n /** Optional parameters for the request. */\n config?: GetModelConfig;\n}\n\n/** An endpoint where you deploy models. */\nexport declare interface Endpoint {\n /** Resource name of the endpoint. */\n name?: string;\n /** ID of the model that's deployed to the endpoint. */\n deployedModelId?: string;\n}\n\n/** A tuned machine learning model. */\nexport declare interface TunedModelInfo {\n /** ID of the base model that you want to tune. */\n baseModel?: string;\n /** Date and time when the base model was created. */\n createTime?: string;\n /** Date and time when the base model was last updated. */\n updateTime?: string;\n}\n\n/** A trained machine learning model. */\nexport declare interface Model {\n /** Resource name of the model. */\n name?: string;\n /** Display name of the model. */\n displayName?: string;\n /** Description of the model. */\n description?: string;\n /** Version ID of the model. A new version is committed when a new\n model version is uploaded or trained under an existing model ID. The\n version ID is an auto-incrementing decimal number in string\n representation. */\n version?: string;\n /** List of deployed models created from this base model. Note that a\n model could have been deployed to endpoints in different locations. */\n endpoints?: Endpoint[];\n /** Labels with user-defined metadata to organize your models. */\n labels?: Record;\n /** Information about the tuned model from the base model. */\n tunedModelInfo?: TunedModelInfo;\n /** The maximum number of input tokens that the model can handle. */\n inputTokenLimit?: number;\n /** The maximum number of output tokens that the model can generate. */\n outputTokenLimit?: number;\n /** List of actions that are supported by the model. */\n supportedActions?: string[];\n}\n\n/** Generation config. */\nexport declare interface GenerationConfig {\n /** Optional. If enabled, audio timestamp will be included in the request to the model. */\n audioTimestamp?: boolean;\n /** Optional. Number of candidates to generate. */\n candidateCount?: number;\n /** Optional. Frequency penalties. */\n frequencyPenalty?: number;\n /** Optional. Logit probabilities. */\n logprobs?: number;\n /** Optional. The maximum number of output tokens to generate per message. */\n maxOutputTokens?: number;\n /** Optional. If specified, the media resolution specified will be used. */\n mediaResolution?: MediaResolution;\n /** Optional. Positive penalties. */\n presencePenalty?: number;\n /** Optional. If true, export the logprobs results in response. */\n responseLogprobs?: boolean;\n /** Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature. */\n responseMimeType?: string;\n /** Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response. */\n responseSchema?: Schema;\n /** Optional. Routing configuration. */\n routingConfig?: GenerationConfigRoutingConfig;\n /** Optional. Seed. */\n seed?: number;\n /** Optional. Stop sequences. */\n stopSequences?: string[];\n /** Optional. Controls the randomness of predictions. */\n temperature?: number;\n /** Optional. If specified, top-k sampling will be used. */\n topK?: number;\n /** Optional. If specified, nucleus sampling will be used. */\n topP?: number;\n}\n\n/** Config for the count_tokens method. */\nexport declare interface CountTokensConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Instructions for the model to steer it toward better performance.\n */\n systemInstruction?: ContentUnion;\n /** Code that enables the system to interact with external systems to\n perform an action outside of the knowledge and scope of the model.\n */\n tools?: Tool[];\n /** Configuration that the model uses to generate the response. Not\n supported by the Gemini Developer API.\n */\n generationConfig?: GenerationConfig;\n}\n\n/** Parameters for counting tokens. */\nexport declare interface CountTokensParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Input content. */\n contents: ContentListUnion;\n /** Configuration for counting tokens. */\n config?: CountTokensConfig;\n}\n\n/** Response for counting tokens. */\nexport class CountTokensResponse {\n /** Total number of tokens. */\n totalTokens?: number;\n /** Number of tokens in the cached part of the prompt (the cached content). */\n cachedContentTokenCount?: number;\n}\n\n/** Optional parameters for computing tokens. */\nexport declare interface ComputeTokensConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for computing tokens. */\nexport declare interface ComputeTokensParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Input content. */\n contents: ContentListUnion;\n /** Optional parameters for the request.\n */\n config?: ComputeTokensConfig;\n}\n\n/** Tokens info with a list of tokens and the corresponding list of token ids. */\nexport declare interface TokensInfo {\n /** Optional. Optional fields for the role from the corresponding Content. */\n role?: string;\n /** A list of token ids from the input. */\n tokenIds?: string[];\n /** A list of tokens from the input. */\n tokens?: string[];\n}\n\n/** Response for computing tokens. */\nexport class ComputeTokensResponse {\n /** Lists of tokens info from the input. A ComputeTokensRequest could have multiple instances with a prompt in each instance. We also need to return lists of tokens info for the request with multiple instances. */\n tokensInfo?: TokensInfo[];\n}\n\n/** Configuration for generating videos. */\nexport declare interface GenerateVideosConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Number of output videos. */\n numberOfVideos?: number;\n /** The gcs bucket where to save the generated videos. */\n outputGcsUri?: string;\n /** Frames per second for video generation. */\n fps?: number;\n /** Duration of the clip for video generation in seconds. */\n durationSeconds?: number;\n /** The RNG seed. If RNG seed is exactly same for each request with unchanged inputs, the prediction results will be consistent. Otherwise, a random RNG seed will be used each time to produce a different result. */\n seed?: number;\n /** The aspect ratio for the generated video. 16:9 (landscape) and 9:16 (portrait) are supported. */\n aspectRatio?: string;\n /** The resolution for the generated video. 1280x720, 1920x1080 are supported. */\n resolution?: string;\n /** Whether allow to generate person videos, and restrict to specific ages. Supported values are: dont_allow, allow_adult. */\n personGeneration?: string;\n /** The pubsub topic where to publish the video generation progress. */\n pubsubTopic?: string;\n /** Optional field in addition to the text content. Negative prompts can be explicitly stated here to help generate the video. */\n negativePrompt?: string;\n /** Whether to use the prompt rewriting logic. */\n enhancePrompt?: boolean;\n}\n\n/** Class that represents the parameters for generating an image. */\nexport declare interface GenerateVideosParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** The text prompt for generating the videos. Optional for image to video use cases. */\n prompt?: string;\n /** The input image for generating the videos.\n Optional if prompt is provided. */\n image?: Image;\n /** Configuration for generating videos. */\n config?: GenerateVideosConfig;\n}\n\n/** A generated video. */\nexport declare interface Video {\n /** Path to another storage. */\n uri?: string;\n /** Video bytes. */\n videoBytes?: string;\n /** Video encoding, for example \"video/mp4\". */\n mimeType?: string;\n}\n\n/** A generated video. */\nexport declare interface GeneratedVideo {\n /** The output video */\n video?: Video;\n}\n\n/** Response with generated videos. */\nexport class GenerateVideosResponse {\n /** List of the generated videos */\n generatedVideos?: GeneratedVideo[];\n /** Returns if any videos were filtered due to RAI policies. */\n raiMediaFilteredCount?: number;\n /** Returns rai failure reasons if any. */\n raiMediaFilteredReasons?: string[];\n}\n\n/** A video generation operation. */\nexport declare interface GenerateVideosOperation {\n /** The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. */\n name?: string;\n /** Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. */\n metadata?: Record;\n /** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */\n done?: boolean;\n /** The error result of the operation in case of failure or cancellation. */\n error?: Record;\n /** The generated videos. */\n response?: GenerateVideosResponse;\n}\n\n/** Optional configuration for cached content creation. */\nexport declare interface CreateCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: \"3.5s\". */\n ttl?: string;\n /** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */\n expireTime?: string;\n /** The user-generated meaningful display name of the cached content.\n */\n displayName?: string;\n /** The content to cache.\n */\n contents?: ContentListUnion;\n /** Developer set system instruction.\n */\n systemInstruction?: ContentUnion;\n /** A list of `Tools` the model may use to generate the next response.\n */\n tools?: Tool[];\n /** Configuration for the tools to use. This config is shared for all tools.\n */\n toolConfig?: ToolConfig;\n}\n\n/** Parameters for caches.create method. */\nexport declare interface CreateCachedContentParameters {\n /** ID of the model to use. Example: gemini-1.5-flash */\n model: string;\n /** Configuration that contains optional parameters.\n */\n config?: CreateCachedContentConfig;\n}\n\n/** Metadata on the usage of the cached content. */\nexport declare interface CachedContentUsageMetadata {\n /** Duration of audio in seconds. */\n audioDurationSeconds?: number;\n /** Number of images. */\n imageCount?: number;\n /** Number of text characters. */\n textCount?: number;\n /** Total number of tokens that the cached content consumes. */\n totalTokenCount?: number;\n /** Duration of video in seconds. */\n videoDurationSeconds?: number;\n}\n\n/** A resource used in LLM queries for users to explicitly specify what to cache. */\nexport declare interface CachedContent {\n /** The server-generated resource name of the cached content. */\n name?: string;\n /** The user-generated meaningful display name of the cached content. */\n displayName?: string;\n /** The name of the publisher model to use for cached content. */\n model?: string;\n /** Creation time of the cache entry. */\n createTime?: string;\n /** When the cache entry was last updated in UTC time. */\n updateTime?: string;\n /** Expiration time of the cached content. */\n expireTime?: string;\n /** Metadata on the usage of the cached content. */\n usageMetadata?: CachedContentUsageMetadata;\n}\n\n/** Optional parameters for caches.get method. */\nexport declare interface GetCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for caches.get method. */\nexport declare interface GetCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Optional parameters for the request.\n */\n config?: GetCachedContentConfig;\n}\n\n/** Optional parameters for caches.delete method. */\nexport declare interface DeleteCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for caches.delete method. */\nexport declare interface DeleteCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Optional parameters for the request.\n */\n config?: DeleteCachedContentConfig;\n}\n\n/** Empty response for caches.delete method. */\nexport class DeleteCachedContentResponse {}\n\n/** Optional parameters for caches.update method. */\nexport declare interface UpdateCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: \"3.5s\". */\n ttl?: string;\n /** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */\n expireTime?: string;\n}\n\nexport declare interface UpdateCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Configuration that contains optional parameters.\n */\n config?: UpdateCachedContentConfig;\n}\n\n/** Config for caches.list method. */\nexport declare interface ListCachedContentsConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n pageSize?: number;\n pageToken?: string;\n}\n\n/** Parameters for caches.list method. */\nexport declare interface ListCachedContentsParameters {\n /** Configuration that contains optional parameters.\n */\n config?: ListCachedContentsConfig;\n}\n\nexport class ListCachedContentsResponse {\n nextPageToken?: string;\n /** List of cached contents.\n */\n cachedContents?: CachedContent[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface ListFilesConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n pageSize?: number;\n pageToken?: string;\n}\n\n/** Generates the parameters for the list method. */\nexport declare interface ListFilesParameters {\n /** Used to override the default configuration. */\n config?: ListFilesConfig;\n}\n\n/** Status of a File that uses a common error model. */\nexport declare interface FileStatus {\n /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */\n details?: Record[];\n /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */\n message?: string;\n /** The status code. 0 for OK, 1 for CANCELLED */\n code?: number;\n}\n\n/** A file uploaded to the API. */\nexport declare interface File {\n /** The `File` resource name. The ID (name excluding the \"files/\" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be generated. Example: `files/123-456` */\n name?: string;\n /** Optional. The human-readable display name for the `File`. The display name must be no more than 512 characters in length, including spaces. Example: 'Welcome Image' */\n displayName?: string;\n /** Output only. MIME type of the file. */\n mimeType?: string;\n /** Output only. Size of the file in bytes. */\n sizeBytes?: string;\n /** Output only. The timestamp of when the `File` was created. */\n createTime?: string;\n /** Output only. The timestamp of when the `File` will be deleted. Only set if the `File` is scheduled to expire. */\n expirationTime?: string;\n /** Output only. The timestamp of when the `File` was last updated. */\n updateTime?: string;\n /** Output only. SHA-256 hash of the uploaded bytes. The hash value is encoded in base64 format. */\n sha256Hash?: string;\n /** Output only. The URI of the `File`. */\n uri?: string;\n /** Output only. The URI of the `File`, only set for downloadable (generated) files. */\n downloadUri?: string;\n /** Output only. Processing state of the File. */\n state?: FileState;\n /** Output only. The source of the `File`. */\n source?: FileSource;\n /** Output only. Metadata for a video. */\n videoMetadata?: Record;\n /** Output only. Error status if File processing failed. */\n error?: FileStatus;\n}\n\n/** Response for the list files method. */\nexport class ListFilesResponse {\n /** A token to retrieve next page of results. */\n nextPageToken?: string;\n /** The list of files. */\n files?: File[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface CreateFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the private _create method. */\nexport declare interface CreateFileParameters {\n /** The file to be uploaded.\n mime_type: (Required) The MIME type of the file. Must be provided.\n name: (Optional) The name of the file in the destination (e.g.\n 'files/sample-image').\n display_name: (Optional) The display name of the file.\n */\n file: File;\n /** Used to override the default configuration. */\n config?: CreateFileConfig;\n}\n\n/** A wrapper class for the http response. */\nexport class HttpResponse {\n /** Used to retain the processed HTTP headers in the response. */\n headers?: Record;\n /**\n * The original http response.\n */\n responseInternal: Response;\n\n constructor(response: Response) {\n // Process the headers.\n const headers: Record = {};\n for (const pair of response.headers.entries()) {\n headers[pair[0]] = pair[1];\n }\n this.headers = headers;\n\n // Keep the original response.\n this.responseInternal = response;\n }\n\n json(): Promise {\n return this.responseInternal.json();\n }\n}\n\n/** Callbacks for the live API. */\nexport interface LiveCallbacks {\n /**\n * Called when the websocket connection is established.\n */\n onopen?: (() => void) | null;\n /**\n * Called when a message is received from the server.\n */\n onmessage: (e: LiveServerMessage) => void;\n /**\n * Called when an error occurs.\n */\n onerror?: ((e: ErrorEvent) => void) | null;\n /**\n * Called when the websocket connection is closed.\n */\n onclose?: ((e: CloseEvent) => void) | null;\n}\n\n/** Parameters for the upload file method. */\nexport interface UploadFileParameters {\n /** The string path to the file to be uploaded or a Blob object. */\n file: string | globalThis.Blob;\n /** Configuration that contains optional parameters. */\n config?: UploadFileConfig;\n}\n/** Response for the create file method. */\nexport class CreateFileResponse {\n /** Used to retain the full HTTP response. */\n sdkHttpResponse?: HttpResponse;\n}\n\n/** Used to override the default configuration. */\nexport declare interface GetFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the get method. */\nexport declare interface GetFileParameters {\n /** The name identifier for the file to retrieve. */\n name: string;\n /** Used to override the default configuration. */\n config?: GetFileConfig;\n}\n\n/** Used to override the default configuration. */\nexport declare interface DeleteFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the get method. */\nexport declare interface DeleteFileParameters {\n /** The name identifier for the file to be deleted. */\n name: string;\n /** Used to override the default configuration. */\n config?: DeleteFileConfig;\n}\n\n/** Response for the delete file method. */\nexport class DeleteFileResponse {}\n\nexport declare interface GetOperationConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for the GET method. */\nexport declare interface GetOperationParameters {\n /** The server-assigned name for the operation. */\n operationName: string;\n /** Used to override the default configuration. */\n config?: GetOperationConfig;\n}\n\nexport declare interface FetchPredictOperationConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for the fetchPredictOperation method. */\nexport declare interface FetchPredictOperationParameters {\n /** The server-assigned name for the operation. */\n operationName: string;\n resourceName: string;\n /** Used to override the default configuration. */\n config?: FetchPredictOperationConfig;\n}\n\nexport declare interface TestTableItem {\n /** The name of the test. This is used to derive the replay id. */\n name?: string;\n /** The parameters to the test. Use pydantic models. */\n parameters?: Record;\n /** Expects an exception for MLDev matching the string. */\n exceptionIfMldev?: string;\n /** Expects an exception for Vertex matching the string. */\n exceptionIfVertex?: string;\n /** Use if you don't want to use the default replay id which is derived from the test name. */\n overrideReplayId?: string;\n /** True if the parameters contain an unsupported union type. This test will be skipped for languages that do not support the union type. */\n hasUnion?: boolean;\n /** When set to a reason string, this test will be skipped in the API mode. Use this flag for tests that can not be reproduced with the real API. E.g. a test that deletes a resource. */\n skipInApiMode?: string;\n /** Keys to ignore when comparing the request and response. This is useful for tests that are not deterministic. */\n ignoreKeys?: string[];\n}\n\nexport declare interface TestTableFile {\n comment?: string;\n testMethod?: string;\n parameterNames?: string[];\n testTable?: TestTableItem[];\n}\n\n/** Represents a single request in a replay. */\nexport declare interface ReplayRequest {\n method?: string;\n url?: string;\n headers?: Record;\n bodySegments?: Record[];\n}\n\n/** Represents a single response in a replay. */\nexport class ReplayResponse {\n statusCode?: number;\n headers?: Record;\n bodySegments?: Record[];\n sdkResponseSegments?: Record[];\n}\n\n/** Represents a single interaction, request and response in a replay. */\nexport declare interface ReplayInteraction {\n request?: ReplayRequest;\n response?: ReplayResponse;\n}\n\n/** Represents a recorded session. */\nexport declare interface ReplayFile {\n replayId?: string;\n interactions?: ReplayInteraction[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface UploadFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The name of the file in the destination (e.g., 'files/sample-image'. If not provided one will be generated. */\n name?: string;\n /** mime_type: The MIME type of the file. If not provided, it will be inferred from the file extension. */\n mimeType?: string;\n /** Optional display name of the file. */\n displayName?: string;\n}\n\n/** Used to override the default configuration. */\nexport declare interface DownloadFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Configuration for upscaling an image.\n\n For more information on this configuration, refer to\n the `Imagen API reference documentation\n `_.\n */\nexport declare interface UpscaleImageConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Whether to include a reason for filtered-out images in the\n response. */\n includeRaiReason?: boolean;\n /** The image format that the output should be saved as. */\n outputMimeType?: string;\n /** The level of compression if the ``output_mime_type`` is\n ``image/jpeg``. */\n outputCompressionQuality?: number;\n}\n\n/** User-facing config UpscaleImageParameters. */\nexport declare interface UpscaleImageParameters {\n /** The model to use. */\n model: string;\n /** The input image to upscale. */\n image: Image;\n /** The factor to upscale the image (x2 or x4). */\n upscaleFactor: string;\n /** Configuration for upscaling. */\n config?: UpscaleImageConfig;\n}\n\n/** A raw reference image.\n\n A raw reference image represents the base image to edit, provided by the user.\n It can optionally be provided in addition to a mask reference image or\n a style reference image.\n */\nexport declare interface RawReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n}\n\n/** Configuration for a Mask reference image. */\nexport declare interface MaskReferenceConfig {\n /** Prompts the model to generate a mask instead of you needing to\n provide one (unless MASK_MODE_USER_PROVIDED is used). */\n maskMode?: MaskReferenceMode;\n /** A list of up to 5 class ids to use for semantic segmentation.\n Automatically creates an image mask based on specific objects. */\n segmentationClasses?: number[];\n /** Dilation percentage of the mask provided.\n Float between 0 and 1. */\n maskDilation?: number;\n}\n\n/** A mask reference image.\n\n This encapsulates either a mask image provided by the user and configs for\n the user provided mask, or only config parameters for the model to generate\n a mask.\n\n A mask image is an image whose non-zero values indicate where to edit the base\n image. If the user provides a mask image, the mask must be in the same\n dimensions as the raw image.\n */\nexport declare interface MaskReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the mask reference image. */\n config?: MaskReferenceConfig;\n}\n\n/** Configuration for a Control reference image. */\nexport declare interface ControlReferenceConfig {\n /** The type of control reference image to use. */\n controlType?: ControlReferenceType;\n /** Defaults to False. When set to True, the control image will be\n computed by the model based on the control type. When set to False,\n the control image must be provided by the user. */\n enableControlImageComputation?: boolean;\n}\n\n/** A control reference image.\n\n The image of the control reference image is either a control image provided\n by the user, or a regular image which the backend will use to generate a\n control image of. In the case of the latter, the\n enable_control_image_computation field in the config should be set to True.\n\n A control image is an image that represents a sketch image of areas for the\n model to fill in based on the prompt.\n */\nexport declare interface ControlReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the control reference image. */\n config?: ControlReferenceConfig;\n}\n\n/** Configuration for a Style reference image. */\nexport declare interface StyleReferenceConfig {\n /** A text description of the style to use for the generated image. */\n styleDescription?: string;\n}\n\n/** A style reference image.\n\n This encapsulates a style reference image provided by the user, and\n additionally optional config parameters for the style reference image.\n\n A raw reference image can also be provided as a destination for the style to\n be applied to.\n */\nexport declare interface StyleReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the style reference image. */\n config?: StyleReferenceConfig;\n}\n\n/** Configuration for a Subject reference image. */\nexport declare interface SubjectReferenceConfig {\n /** The subject type of a subject reference image. */\n subjectType?: SubjectReferenceType;\n /** Subject description for the image. */\n subjectDescription?: string;\n}\n\n/** A subject reference image.\n\n This encapsulates a subject reference image provided by the user, and\n additionally optional config parameters for the subject reference image.\n\n A raw reference image can also be provided as a destination for the subject to\n be applied to.\n */\nexport declare interface SubjectReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the subject reference image. */\n config?: SubjectReferenceConfig;\n}\n\n/** Sent in response to a `LiveGenerateContentSetup` message from the client. */\nexport declare interface LiveServerSetupComplete {}\n\n/** Incremental server update generated by the model in response to client messages.\n\n Content is generated as quickly as possible, and not in real time. Clients\n may choose to buffer and play it out in real time.\n */\nexport declare interface LiveServerContent {\n /** The content that the model has generated as part of the current conversation with the user. */\n modelTurn?: Content;\n /** If true, indicates that the model is done generating. Generation will only start in response to additional client messages. Can be set alongside `content`, indicating that the `content` is the last in the turn. */\n turnComplete?: boolean;\n /** If true, indicates that a client message has interrupted current model generation. If the client is playing out the content in realtime, this is a good signal to stop and empty the current queue. */\n interrupted?: boolean;\n /** If true, indicates that the model is done generating. When model is\n interrupted while generating there will be no generation_complete message\n in interrupted turn, it will go through interrupted > turn_complete.\n When model assumes realtime playback there will be delay between\n generation_complete and turn_complete that is caused by model\n waiting for playback to finish. If true, indicates that the model\n has finished generating all content. This is a signal to the client\n that it can stop sending messages. */\n generationComplete?: boolean;\n}\n\n/** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */\nexport declare interface LiveServerToolCall {\n /** The function call to be executed. */\n functionCalls?: FunctionCall[];\n}\n\n/** Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled.\n\n If there were side-effects to those tool calls, clients may attempt to undo\n the tool calls. This message occurs only in cases where the clients interrupt\n server turns.\n */\nexport declare interface LiveServerToolCallCancellation {\n /** The ids of the tool calls to be cancelled. */\n ids?: string[];\n}\n\n/** Usage metadata about response(s). */\nexport declare interface UsageMetadata {\n /** Number of tokens in the prompt. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */\n promptTokenCount?: number;\n /** Number of tokens in the cached part of the prompt (the cached content). */\n cachedContentTokenCount?: number;\n /** Total number of tokens across all the generated response candidates. */\n responseTokenCount?: number;\n /** Number of tokens present in tool-use prompt(s). */\n toolUsePromptTokenCount?: number;\n /** Number of tokens of thoughts for thinking models. */\n thoughtsTokenCount?: number;\n /** Total token count for prompt, response candidates, and tool-use prompts(if present). */\n totalTokenCount?: number;\n /** List of modalities that were processed in the request input. */\n promptTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were processed in the cache input. */\n cacheTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were returned in the response. */\n responseTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were processed in the tool-use prompt. */\n toolUsePromptTokensDetails?: ModalityTokenCount[];\n /** Traffic type. This shows whether a request consumes Pay-As-You-Go\n or Provisioned Throughput quota. */\n trafficType?: TrafficType;\n}\n\n/** Server will not be able to service client soon. */\nexport declare interface LiveServerGoAway {\n /** The remaining time before the connection will be terminated as ABORTED. The minimal time returned here is specified differently together with the rate limits for a given model. */\n timeLeft?: string;\n}\n\n/** Update of the session resumption state.\n\n Only sent if `session_resumption` was set in the connection config.\n */\nexport declare interface LiveServerSessionResumptionUpdate {\n /** New handle that represents state that can be resumed. Empty if `resumable`=false. */\n newHandle?: string;\n /** True if session can be resumed at this point. It might be not possible to resume session at some points. In that case we send update empty new_handle and resumable=false. Example of such case could be model executing function calls or just generating. Resuming session (using previous session token) in such state will result in some data loss. */\n resumable?: boolean;\n /** Index of last message sent by client that is included in state represented by this SessionResumptionToken. Only sent when `SessionResumptionConfig.transparent` is set.\n\nPresence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `SessionResmumptionTokenUpdate`. This field will enable them to limit buffering (avoid keeping all requests in RAM).\n\nNote: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames arelikely not needed. */\n lastConsumedClientMessageIndex?: string;\n}\n\n/** Response message for API call. */\nexport declare interface LiveServerMessage {\n /** Sent in response to a `LiveClientSetup` message from the client. */\n setupComplete?: LiveServerSetupComplete;\n /** Content generated by the model in response to client messages. */\n serverContent?: LiveServerContent;\n /** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */\n toolCall?: LiveServerToolCall;\n /** Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled. */\n toolCallCancellation?: LiveServerToolCallCancellation;\n /** Usage metadata about model response(s). */\n usageMetadata?: UsageMetadata;\n /** Server will disconnect soon. */\n goAway?: LiveServerGoAway;\n /** Update of the session resumption state. */\n sessionResumptionUpdate?: LiveServerSessionResumptionUpdate;\n}\n\n/** Configures automatic detection of activity. */\nexport declare interface AutomaticActivityDetection {\n /** If enabled, detected voice and text input count as activity. If disabled, the client must send activity signals. */\n disabled?: boolean;\n /** Determines how likely speech is to be detected. */\n startOfSpeechSensitivity?: StartSensitivity;\n /** Determines how likely detected speech is ended. */\n endOfSpeechSensitivity?: EndSensitivity;\n /** The required duration of detected speech before start-of-speech is committed. The lower this value the more sensitive the start-of-speech detection is and the shorter speech can be recognized. However, this also increases the probability of false positives. */\n prefixPaddingMs?: number;\n /** The required duration of detected non-speech (e.g. silence) before end-of-speech is committed. The larger this value, the longer speech gaps can be without interrupting the user's activity but this will increase the model's latency. */\n silenceDurationMs?: number;\n}\n\n/** Marks the end of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface RealtimeInputConfig {\n /** If not set, automatic activity detection is enabled by default. If automatic voice detection is disabled, the client must send activity signals. */\n automaticActivityDetection?: AutomaticActivityDetection;\n /** Defines what effect activity has. */\n activityHandling?: ActivityHandling;\n /** Defines which input is included in the user's turn. */\n turnCoverage?: TurnCoverage;\n}\n\n/** Configuration of session resumption mechanism.\n\n Included in `LiveConnectConfig.session_resumption`. If included server\n will send `LiveServerSessionResumptionUpdate` messages.\n */\nexport declare interface SessionResumptionConfig {\n /** Session resumption handle of previous session (session to restore).\n\nIf not present new session will be started. */\n handle?: string;\n /** If set the server will send `last_consumed_client_message_index` in the `session_resumption_update` messages to allow for transparent reconnections. */\n transparent?: boolean;\n}\n\n/** Context window will be truncated by keeping only suffix of it.\n\n Context window will always be cut at start of USER role turn. System\n instructions and `BidiGenerateContentSetup.prefix_turns` will not be\n subject to the sliding window mechanism, they will always stay at the\n beginning of context window.\n */\nexport declare interface SlidingWindow {\n /** Session reduction target -- how many tokens we should keep. Window shortening operation has some latency costs, so we should avoid running it on every turn. Should be < trigger_tokens. If not set, trigger_tokens/2 is assumed. */\n targetTokens?: string;\n}\n\n/** Enables context window compression -- mechanism managing model context window so it does not exceed given length. */\nexport declare interface ContextWindowCompressionConfig {\n /** Number of tokens (before running turn) that triggers context window compression mechanism. */\n triggerTokens?: string;\n /** Sliding window compression mechanism. */\n slidingWindow?: SlidingWindow;\n}\n\n/** Message contains configuration that will apply for the duration of the streaming session. */\nexport declare interface LiveClientSetup {\n /** \n The fully qualified name of the publisher model or tuned model endpoint to\n use.\n */\n model?: string;\n /** The generation configuration for the session.\n Note: only a subset of fields are supported.\n */\n generationConfig?: GenerationConfig;\n /** The user provided system instructions for the model.\n Note: only text should be used in parts and content in each part will be\n in a separate paragraph. */\n systemInstruction?: Content;\n /** A list of `Tools` the model may use to generate the next response.\n\n A `Tool` is a piece of code that enables the system to interact with\n external systems to perform an action, or set of actions, outside of\n knowledge and scope of the model. */\n tools?: ToolListUnion;\n /** Configures the realtime input behavior in BidiGenerateContent. */\n realtimeInputConfig?: RealtimeInputConfig;\n /** Configures session resumption mechanism.\n\n If included server will send SessionResumptionUpdate messages. */\n sessionResumption?: SessionResumptionConfig;\n /** Configures context window compression mechanism.\n\n If included, server will compress context window to fit into given length. */\n contextWindowCompression?: ContextWindowCompressionConfig;\n}\n\n/** Incremental update of the current conversation delivered from the client.\n\n All the content here will unconditionally be appended to the conversation\n history and used as part of the prompt to the model to generate content.\n\n A message here will interrupt any current model generation.\n */\nexport declare interface LiveClientContent {\n /** The content appended to the current conversation with the model.\n\n For single-turn queries, this is a single instance. For multi-turn\n queries, this is a repeated field that contains conversation history and\n latest request.\n */\n turns?: Content[];\n /** If true, indicates that the server content generation should start with\n the currently accumulated prompt. Otherwise, the server will await\n additional messages before starting generation. */\n turnComplete?: boolean;\n}\n\n/** Marks the start of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface ActivityStart {}\n\n/** Marks the end of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface ActivityEnd {}\n\n/** User input that is sent in real time.\n\n This is different from `LiveClientContent` in a few ways:\n\n - Can be sent continuously without interruption to model generation.\n - If there is a need to mix data interleaved across the\n `LiveClientContent` and the `LiveClientRealtimeInput`, server attempts to\n optimize for best response, but there are no guarantees.\n - End of turn is not explicitly specified, but is rather derived from user\n activity (for example, end of speech).\n - Even before the end of turn, the data is processed incrementally\n to optimize for a fast start of the response from the model.\n - Is always assumed to be the user's input (cannot be used to populate\n conversation history).\n */\nexport declare interface LiveClientRealtimeInput {\n /** Inlined bytes data for media input. */\n mediaChunks?: Blob[];\n /** Marks the start of user activity. */\n activityStart?: ActivityStart;\n /** Marks the end of user activity. */\n activityEnd?: ActivityEnd;\n}\n\n/** Client generated response to a `ToolCall` received from the server.\n\n Individual `FunctionResponse` objects are matched to the respective\n `FunctionCall` objects by the `id` field.\n\n Note that in the unary and server-streaming GenerateContent APIs function\n calling happens by exchanging the `Content` parts, while in the bidi\n GenerateContent APIs function calling happens over this dedicated set of\n messages.\n */\nexport class LiveClientToolResponse {\n /** The response to the function calls. */\n functionResponses?: FunctionResponse[];\n}\n\n/** Messages sent by the client in the API call. */\nexport declare interface LiveClientMessage {\n /** Message to be sent by the system when connecting to the API. SDK users should not send this message. */\n setup?: LiveClientSetup;\n /** Incremental update of the current conversation delivered from the client. */\n clientContent?: LiveClientContent;\n /** User input that is sent in real time. */\n realtimeInput?: LiveClientRealtimeInput;\n /** Response to a `ToolCallMessage` received from the server. */\n toolResponse?: LiveClientToolResponse;\n}\n\n/** The audio transcription configuration in Setup. */\nexport declare interface AudioTranscriptionConfig {}\n\n/** Session config for the API connection. */\nexport declare interface LiveConnectConfig {\n /** The generation configuration for the session. */\n generationConfig?: GenerationConfig;\n /** The requested modalities of the response. Represents the set of\n modalities that the model can return. Defaults to AUDIO if not specified.\n */\n responseModalities?: Modality[];\n /** The speech generation configuration.\n */\n speechConfig?: SpeechConfig;\n /** The user provided system instructions for the model.\n Note: only text should be used in parts and content in each part will be\n in a separate paragraph. */\n systemInstruction?: Content;\n /** A list of `Tools` the model may use to generate the next response.\n\n A `Tool` is a piece of code that enables the system to interact with\n external systems to perform an action, or set of actions, outside of\n knowledge and scope of the model. */\n tools?: ToolListUnion;\n /** Configures session resumption mechanism.\n\nIf included the server will send SessionResumptionUpdate messages. */\n sessionResumption?: SessionResumptionConfig;\n /** Configures the realtime input behavior in BidiGenerateContent. */\n realtimeInputConfig?: RealtimeInputConfig;\n /** Configures context window compression mechanism.\n\n If included, server will compress context window to fit into given length. */\n contextWindowCompression?: ContextWindowCompressionConfig;\n}\n\n/** Parameters for connecting to the live API. */\nexport declare interface LiveConnectParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** callbacks */\n callbacks: LiveCallbacks;\n /** Optional configuration parameters for the request.\n */\n config?: LiveConnectConfig;\n}\n\n/** Parameters for initializing a new chat session.\n\n These parameters are used when creating a chat session with the\n `chats.create()` method.\n */\nexport declare interface CreateChatParameters {\n /** The name of the model to use for the chat session.\n\n For example: 'gemini-2.0-flash', 'gemini-1.5-pro', etc. See gemini API\n docs to find the available models.\n */\n model: string;\n /** Config for the entire chat session.\n\n This config applies to all requests within the session\n unless overridden by a per-request `config` in `SendMessageParameters`.\n */\n config?: GenerateContentConfig;\n /** The initial conversation history for the chat session.\n\n This allows you to start the chat with a pre-existing history. The history\n must be a list of `Content` alternating between 'user' and 'model' roles.\n It should start with a 'user' message.\n */\n history?: Content[];\n}\n\n/** Parameters for sending a message within a chat session.\n\n These parameters are used with the `chat.sendMessage()` method.\n */\nexport declare interface SendMessageParameters {\n /** The message to send to the model.\n\n The SDK will combine all parts into a single 'user' content to send to\n the model.\n */\n message: PartListUnion;\n /** Config for this specific request.\n\n Please note that the per-request config does not change the chat level\n config, nor inherit from it. If you intend to use some values from the\n chat's default config, you must explicitly copy them into this per-request\n config.\n */\n config?: GenerateContentConfig;\n}\n\n/** Parameters for sending client content to the live API. */\nexport declare interface LiveSendClientContentParameters {\n /** Client content to send to the session. */\n turns?: ContentListUnion;\n /** If true, indicates that the server content generation should start with\n the currently accumulated prompt. Otherwise, the server will await\n additional messages before starting generation. */\n turnComplete?: boolean;\n}\n\n/** Parameters for sending realtime input to the live API. */\nexport declare interface LiveSendRealtimeInputParameters {\n /** Realtime input to send to the session. */\n media: Blob;\n /** Marks the start of user activity. */\n activityStart?: ActivityStart;\n /** Marks the end of user activity. */\n activityEnd?: ActivityEnd;\n}\n\n/** Parameters for sending tool responses to the live API. */\nexport class LiveSendToolResponseParameters {\n /** Tool responses to send to the session. */\n functionResponses: FunctionResponse[] | FunctionResponse = [];\n}\n\n/** Parameters for the get method of the operations module. */\nexport declare interface OperationGetParameters {\n /** The operation to be retrieved. */\n operation: GenerateVideosOperation;\n /** Used to override the default configuration. */\n config?: GetOperationConfig;\n}\n\nexport type PartUnion = Part | string;\n\nexport type PartListUnion = PartUnion[] | PartUnion;\n\nexport type ContentUnion = Content | PartUnion[] | PartUnion;\n\nexport type ContentListUnion = ContentUnion[] | ContentUnion;\n\nexport type SchemaUnion = Schema;\n\nexport type SpeechConfigUnion = SpeechConfig | string;\n\nexport type ToolListUnion = Tool[];\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_caches_converters';\nimport {PagedItem, Pager} from './pagers';\nimport * as types from './types';\n\nexport class Caches extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Lists cached content configurations.\n *\n * @param params - The parameters for the list request.\n * @return The paginated results of the list of cached contents.\n *\n * @example\n * ```ts\n * const cachedContents = await ai.caches.list({config: {'pageSize': 2}});\n * for (const cachedContent of cachedContents) {\n * console.log(cachedContent);\n * }\n * ```\n */\n list = async (\n params: types.ListCachedContentsParameters = {},\n ): Promise> => {\n return new Pager(\n PagedItem.PAGED_ITEM_CACHED_CONTENTS,\n (x: types.ListCachedContentsParameters) => this.listInternal(x),\n await this.listInternal(params),\n params,\n );\n };\n\n /**\n * Creates a cached contents resource.\n *\n * @remarks\n * Context caching is only supported for specific models. See [Gemini\n * Developer API reference] (https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac)\n * and [Vertex AI reference] (https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models)\n * for more information.\n *\n * @param params - The parameters for the create request.\n * @return The created cached content.\n *\n * @example\n * ```ts\n * const contents = ...; // Initialize the content to cache.\n * const response = await ai.caches.create({\n * model: 'gemini-1.5-flash',\n * config: {\n * 'contents': contents,\n * 'displayName': 'test cache',\n * 'systemInstruction': 'What is the sum of the two pdfs?',\n * 'ttl': '86400s',\n * }\n * });\n * ```\n */\n async create(\n params: types.CreateCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.createCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.createCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n /**\n * Gets cached content configurations.\n *\n * @param params - The parameters for the get request.\n * @return The cached content.\n *\n * @example\n * ```ts\n * await ai.caches.get({name: 'gemini-1.5-flash'});\n * ```\n */\n async get(\n params: types.GetCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.getCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n /**\n * Deletes cached content.\n *\n * @param params - The parameters for the delete request.\n * @return The empty response returned by the API.\n *\n * @example\n * ```ts\n * await ai.caches.delete({name: 'gemini-1.5-flash'});\n * ```\n */\n async delete(\n params: types.DeleteCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.deleteCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteCachedContentResponseFromVertex();\n const typedResp = new types.DeleteCachedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.deleteCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteCachedContentResponseFromMldev();\n const typedResp = new types.DeleteCachedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Updates cached content configurations.\n *\n * @param params - The parameters for the update request.\n * @return The updated cached content.\n *\n * @example\n * ```ts\n * const response = await ai.caches.update({\n * name: 'gemini-1.5-flash',\n * config: {'ttl': '7600s'}\n * });\n * ```\n */\n async update(\n params: types.UpdateCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.updateCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'PATCH',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.updateCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'PATCH',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n private async listInternal(\n params: types.ListCachedContentsParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.listCachedContentsParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listCachedContentsResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListCachedContentsResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.listCachedContentsParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listCachedContentsResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListCachedContentsResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ApiClient} from './_api_client';\nimport * as t from './_transformers';\nimport {Models} from './models';\nimport * as types from './types';\n\n/**\n * Returns true if the response is valid, false otherwise.\n */\nfunction isValidResponse(response: types.GenerateContentResponse): boolean {\n if (response.candidates == undefined || response.candidates.length === 0) {\n return false;\n }\n const content = response.candidates[0]?.content;\n if (content === undefined) {\n return false;\n }\n return isValidContent(content);\n}\n\nfunction isValidContent(content: types.Content): boolean {\n if (content.parts === undefined || content.parts.length === 0) {\n return false;\n }\n for (const part of content.parts) {\n if (part === undefined || Object.keys(part).length === 0) {\n return false;\n }\n if (part.text !== undefined && part.text === '') {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Validates the history contains the correct roles.\n *\n * @remarks\n * Expects the history to start with a user turn and then alternate between\n * user and model turns.\n *\n * @throws Error if the history does not start with a user turn.\n * @throws Error if the history contains an invalid role.\n */\nfunction validateHistory(history: types.Content[]) {\n // Empty history is valid.\n if (history.length === 0) {\n return;\n }\n if (history[0].role !== 'user') {\n throw new Error('History must start with a user turn.');\n }\n for (const content of history) {\n if (content.role !== 'user' && content.role !== 'model') {\n throw new Error(`Role must be user or model, but got ${content.role}.`);\n }\n }\n}\n\n/**\n * Extracts the curated (valid) history from a comprehensive history.\n *\n * @remarks\n * The model may sometimes generate invalid or empty contents(e.g., due to safty\n * filters or recitation). Extracting valid turns from the history\n * ensures that subsequent requests could be accpeted by the model.\n */\nfunction extractCuratedHistory(\n comprehensiveHistory: types.Content[],\n): types.Content[] {\n if (comprehensiveHistory === undefined || comprehensiveHistory.length === 0) {\n return [];\n }\n const curatedHistory: types.Content[] = [];\n const length = comprehensiveHistory.length;\n let i = 0;\n let userInput = comprehensiveHistory[0];\n while (i < length) {\n if (comprehensiveHistory[i].role === 'user') {\n userInput = comprehensiveHistory[i];\n i++;\n } else {\n const modelOutput: types.Content[] = [];\n let isValid = true;\n while (i < length && comprehensiveHistory[i].role === 'model') {\n modelOutput.push(comprehensiveHistory[i]);\n if (isValid && !isValidContent(comprehensiveHistory[i])) {\n isValid = false;\n }\n i++;\n }\n if (isValid) {\n curatedHistory.push(userInput);\n curatedHistory.push(...modelOutput);\n }\n }\n }\n return curatedHistory;\n}\n\n/**\n * A utility class to create a chat session.\n */\nexport class Chats {\n private readonly modelsModule: Models;\n private readonly apiClient: ApiClient;\n\n constructor(modelsModule: Models, apiClient: ApiClient) {\n this.modelsModule = modelsModule;\n this.apiClient = apiClient;\n }\n\n /**\n * Creates a new chat session.\n *\n * @remarks\n * The config in the params will be used for all requests within the chat\n * session unless overridden by a per-request `config` in\n * @see {@link types.SendMessageParameters#config}.\n *\n * @param params - Parameters for creating a chat session.\n * @returns A new chat session.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({\n * model: 'gemini-2.0-flash'\n * config: {\n * temperature: 0.5,\n * maxOutputTokens: 1024,\n * }\n * });\n * ```\n */\n create(params: types.CreateChatParameters) {\n return new Chat(\n this.apiClient,\n this.modelsModule,\n params.model,\n params.config,\n params.history,\n );\n }\n}\n\n/**\n * Chat session that enables sending messages to the model with previous\n * conversation context.\n *\n * @remarks\n * The session maintains all the turns between user and model.\n */\nexport class Chat {\n // A promise to represent the current state of the message being sent to the\n // model.\n private sendPromise: Promise = Promise.resolve();\n\n constructor(\n private readonly apiClient: ApiClient,\n private readonly modelsModule: Models,\n private readonly model: string,\n private readonly config: types.GenerateContentConfig = {},\n private history: types.Content[] = [],\n ) {\n validateHistory(history);\n }\n\n /**\n * Sends a message to the model and returns the response.\n *\n * @remarks\n * This method will wait for the previous message to be processed before\n * sending the next message.\n *\n * @see {@link Chat#sendMessageStream} for streaming method.\n * @param params - parameters for sending messages within a chat session.\n * @returns The model's response.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({model: 'gemini-2.0-flash'});\n * const response = await chat.sendMessage({\n * message: 'Why is the sky blue?'\n * });\n * console.log(response.text);\n * ```\n */\n async sendMessage(\n params: types.SendMessageParameters,\n ): Promise {\n await this.sendPromise;\n const inputContent = t.tContent(this.apiClient, params.message);\n const responsePromise = this.modelsModule.generateContent({\n model: this.model,\n contents: this.getHistory(true).concat(inputContent),\n config: params.config ?? this.config,\n });\n this.sendPromise = (async () => {\n const response = await responsePromise;\n const outputContent = response.candidates?.[0]?.content;\n const modelOutput = outputContent ? [outputContent] : [];\n this.recordHistory(inputContent, modelOutput);\n return;\n })();\n await this.sendPromise;\n return responsePromise;\n }\n\n /**\n * Sends a message to the model and returns the response in chunks.\n *\n * @remarks\n * This method will wait for the previous message to be processed before\n * sending the next message.\n *\n * @see {@link Chat#sendMessage} for non-streaming method.\n * @param params - parameters for sending the message.\n * @return The model's response.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({model: 'gemini-2.0-flash'});\n * const response = await chat.sendMessageStream({\n * message: 'Why is the sky blue?'\n * });\n * for await (const chunk of response) {\n * console.log(chunk.text);\n * }\n * ```\n */\n async sendMessageStream(\n params: types.SendMessageParameters,\n ): Promise> {\n await this.sendPromise;\n const inputContent = t.tContent(this.apiClient, params.message);\n const streamResponse = this.modelsModule.generateContentStream({\n model: this.model,\n contents: this.getHistory(true).concat(inputContent),\n config: params.config ?? this.config,\n });\n this.sendPromise = streamResponse.then(() => undefined);\n const response = await streamResponse;\n const result = this.processStreamResponse(response, inputContent);\n return result;\n }\n\n /**\n * Returns the chat history.\n *\n * @remarks\n * The history is a list of contents alternating between user and model.\n *\n * There are two types of history:\n * - The `curated history` contains only the valid turns between user and\n * model, which will be included in the subsequent requests sent to the model.\n * - The `comprehensive history` contains all turns, including invalid or\n * empty model outputs, providing a complete record of the history.\n *\n * The history is updated after receiving the response from the model,\n * for streaming response, it means receiving the last chunk of the response.\n *\n * The `comprehensive history` is returned by default. To get the `curated\n * history`, set the `curated` parameter to `true`.\n *\n * @param curated - whether to return the curated history or the comprehensive\n * history.\n * @return History contents alternating between user and model for the entire\n * chat session.\n */\n getHistory(curated: boolean = false): types.Content[] {\n return curated ? extractCuratedHistory(this.history) : this.history;\n }\n\n private async *processStreamResponse(\n streamResponse: AsyncGenerator,\n inputContent: types.Content,\n ) {\n const outputContent: types.Content[] = [];\n for await (const chunk of streamResponse) {\n if (isValidResponse(chunk)) {\n const content = chunk.candidates?.[0]?.content;\n if (content !== undefined) {\n outputContent.push(content);\n }\n }\n yield chunk;\n }\n this.recordHistory(inputContent, outputContent);\n }\n\n private recordHistory(\n userInput: types.Content,\n modelOutput: types.Content[],\n ) {\n let outputContents: types.Content[] = [];\n if (\n modelOutput.length > 0 &&\n modelOutput.every((content) => content.role === 'model')\n ) {\n outputContents = modelOutput;\n } else {\n // Appends an empty content when model returns empty response, so that the\n // history is always alternating between user and model.\n outputContents.push({\n role: 'model',\n parts: [],\n } as types.Content);\n }\n this.history.push(userInput);\n this.history.push(...outputContents);\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {Auth} from './_auth';\nimport * as common from './_common';\nimport {Uploader} from './_uploader';\nimport {File, HttpOptions, HttpResponse, UploadFileConfig} from './types';\n\nconst CONTENT_TYPE_HEADER = 'Content-Type';\nconst SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';\nconst USER_AGENT_HEADER = 'User-Agent';\nconst GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';\nexport const SDK_VERSION = '0.8.0'; // x-release-please-version\nconst LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;\nconst VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';\nconst GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';\nconst responseLineRE = /^data: (.*)(?:\\n\\n|\\r\\r|\\r\\n\\r\\n)/;\n\n/**\n * Client errors raised by the GenAI API.\n */\nexport class ClientError extends Error {\n constructor(message: string, stackTrace?: string) {\n if (stackTrace) {\n super(message, {cause: stackTrace});\n } else {\n super(message, {cause: new Error().stack});\n }\n this.message = message;\n this.name = 'ClientError';\n }\n}\n\n/**\n * Server errors raised by the GenAI API.\n */\nexport class ServerError extends Error {\n constructor(message: string, stackTrace?: string) {\n if (stackTrace) {\n super(message, {cause: stackTrace});\n } else {\n super(message, {cause: new Error().stack});\n }\n this.message = message;\n this.name = 'ServerError';\n }\n}\n\n/**\n * Options for initializing the ApiClient. The ApiClient uses the parameters\n * for authentication purposes as well as to infer if SDK should send the\n * request to Vertex AI or Gemini API.\n */\nexport interface ApiClientInitOptions {\n /**\n * The object used for adding authentication headers to API requests.\n */\n auth: Auth;\n /**\n * The uploader to use for uploading files. This field is required for\n * creating a client, will be set through the Node_client or Web_client.\n */\n uploader: Uploader;\n /**\n * Optional. The Google Cloud project ID for Vertex AI users.\n * It is not the numeric project name.\n * If not provided, SDK will try to resolve it from runtime environment.\n */\n project?: string;\n /**\n * Optional. The Google Cloud project location for Vertex AI users.\n * If not provided, SDK will try to resolve it from runtime environment.\n */\n location?: string;\n /**\n * The API Key. This is required for Gemini API users.\n */\n apiKey?: string;\n /**\n * Optional. Set to true if you intend to call Vertex AI endpoints.\n * If unset, default SDK behavior is to call Gemini API.\n */\n vertexai?: boolean;\n /**\n * Optional. The API version for the endpoint.\n * If unset, SDK will choose a default api version.\n */\n apiVersion?: string;\n /**\n * Optional. A set of customizable configuration for HTTP requests.\n */\n httpOptions?: HttpOptions;\n /**\n * Optional. An extra string to append at the end of the User-Agent header.\n *\n * This can be used to e.g specify the runtime and its version.\n */\n userAgentExtra?: string;\n}\n\n/**\n * Represents the necessary information to send a request to an API endpoint.\n * This interface defines the structure for constructing and executing HTTP\n * requests.\n */\nexport interface HttpRequest {\n /**\n * URL path from the modules, this path is appended to the base API URL to\n * form the complete request URL.\n *\n * If you wish to set full URL, use httpOptions.baseUrl instead. Example to\n * set full URL in the request:\n *\n * const request: HttpRequest = {\n * path: '',\n * httpOptions: {\n * baseUrl: 'https://',\n * apiVersion: '',\n * },\n * httpMethod: 'GET',\n * };\n *\n * The result URL will be: https://\n *\n */\n path: string;\n /**\n * Optional query parameters to be appended to the request URL.\n */\n queryParams?: Record;\n /**\n * Optional request body in json string or Blob format, GET request doesn't\n * need a request body.\n */\n body?: string | Blob;\n /**\n * The HTTP method to be used for the request.\n */\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE';\n /**\n * Optional set of customizable configuration for HTTP requests.\n */\n httpOptions?: HttpOptions;\n}\n\n/**\n * The ApiClient class is used to send requests to the Gemini API or Vertex AI\n * endpoints.\n */\nexport class ApiClient {\n readonly clientOptions: ApiClientInitOptions;\n\n constructor(opts: ApiClientInitOptions) {\n this.clientOptions = {\n ...opts,\n project: opts.project,\n location: opts.location,\n apiKey: opts.apiKey,\n vertexai: opts.vertexai,\n };\n\n const initHttpOptions: HttpOptions = {};\n\n if (this.clientOptions.vertexai) {\n initHttpOptions.apiVersion =\n this.clientOptions.apiVersion ?? VERTEX_AI_API_DEFAULT_VERSION;\n // Assume that proj/api key validation occurs before they are passed in.\n if (this.getProject() || this.getLocation()) {\n initHttpOptions.baseUrl = `https://${this.clientOptions.location}-aiplatform.googleapis.com/`;\n this.clientOptions.apiKey = undefined; // unset API key.\n } else {\n initHttpOptions.baseUrl = `https://aiplatform.googleapis.com/`;\n this.clientOptions.project = undefined; // unset project.\n this.clientOptions.location = undefined; // unset location.\n }\n } else {\n initHttpOptions.apiVersion =\n this.clientOptions.apiVersion ?? GOOGLE_AI_API_DEFAULT_VERSION;\n initHttpOptions.baseUrl = `https://generativelanguage.googleapis.com/`;\n }\n\n initHttpOptions.headers = this.getDefaultHeaders();\n\n this.clientOptions.httpOptions = initHttpOptions;\n\n if (opts.httpOptions) {\n this.clientOptions.httpOptions = this.patchHttpOptions(\n initHttpOptions,\n opts.httpOptions,\n );\n }\n }\n\n isVertexAI(): boolean {\n return this.clientOptions.vertexai ?? false;\n }\n\n getProject() {\n return this.clientOptions.project;\n }\n\n getLocation() {\n return this.clientOptions.location;\n }\n\n getApiVersion() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.apiVersion !== undefined\n ) {\n return this.clientOptions.httpOptions.apiVersion;\n }\n throw new Error('API version is not set.');\n }\n\n getBaseUrl() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.baseUrl !== undefined\n ) {\n return this.clientOptions.httpOptions.baseUrl;\n }\n throw new Error('Base URL is not set.');\n }\n\n getRequestUrl() {\n return this.getRequestUrlInternal(this.clientOptions.httpOptions);\n }\n\n getHeaders() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.headers !== undefined\n ) {\n return this.clientOptions.httpOptions.headers;\n } else {\n throw new Error('Headers are not set.');\n }\n }\n\n private getRequestUrlInternal(httpOptions?: HttpOptions) {\n if (\n !httpOptions ||\n httpOptions.baseUrl === undefined ||\n httpOptions.apiVersion === undefined\n ) {\n throw new Error('HTTP options are not correctly set.');\n }\n const baseUrl = httpOptions.baseUrl.endsWith('/')\n ? httpOptions.baseUrl.slice(0, -1)\n : httpOptions.baseUrl;\n const urlElement: Array = [baseUrl];\n if (httpOptions.apiVersion && httpOptions.apiVersion !== '') {\n urlElement.push(httpOptions.apiVersion);\n }\n return urlElement.join('/');\n }\n\n getBaseResourcePath() {\n return `projects/${this.clientOptions.project}/locations/${\n this.clientOptions.location\n }`;\n }\n\n getApiKey() {\n return this.clientOptions.apiKey;\n }\n\n getWebsocketBaseUrl() {\n const baseUrl = this.getBaseUrl();\n const urlParts = new URL(baseUrl);\n urlParts.protocol = 'wss';\n return urlParts.toString();\n }\n\n setBaseUrl(url: string) {\n if (this.clientOptions.httpOptions) {\n this.clientOptions.httpOptions.baseUrl = url;\n } else {\n throw new Error('HTTP options are not correctly set.');\n }\n }\n\n private constructUrl(\n path: string,\n httpOptions: HttpOptions,\n prependProjectLocation: boolean,\n ): URL {\n const urlElement: Array = [this.getRequestUrlInternal(httpOptions)];\n if (prependProjectLocation) {\n urlElement.push(this.getBaseResourcePath());\n }\n if (path !== '') {\n urlElement.push(path);\n }\n const url = new URL(`${urlElement.join('/')}`);\n\n return url;\n }\n\n private shouldPrependVertexProjectPath(request: HttpRequest): boolean {\n if (this.clientOptions.apiKey) {\n return false;\n }\n if (!this.clientOptions.vertexai) {\n return false;\n }\n if (request.path.startsWith('projects/')) {\n // Assume the path already starts with\n // `projects//location/`.\n return false;\n }\n if (\n request.httpMethod === 'GET' &&\n request.path.startsWith('publishers/google/models')\n ) {\n // These paths are used by Vertex's models.get and models.list\n // calls. For base models Vertex does not accept a project/location\n // prefix (for tuned model the prefix is required).\n return false;\n }\n return true;\n }\n\n async request(request: HttpRequest): Promise {\n let patchedHttpOptions = this.clientOptions.httpOptions!;\n if (request.httpOptions) {\n patchedHttpOptions = this.patchHttpOptions(\n this.clientOptions.httpOptions!,\n request.httpOptions,\n );\n }\n\n const prependProjectLocation = this.shouldPrependVertexProjectPath(request);\n const url = this.constructUrl(\n request.path,\n patchedHttpOptions,\n prependProjectLocation,\n );\n if (request.queryParams) {\n for (const [key, value] of Object.entries(request.queryParams)) {\n url.searchParams.append(key, String(value));\n }\n }\n let requestInit: RequestInit = {};\n if (request.httpMethod === 'GET') {\n if (request.body && request.body !== '{}') {\n throw new Error(\n 'Request body should be empty for GET request, but got non empty request body',\n );\n }\n } else {\n requestInit.body = request.body;\n }\n requestInit = await this.includeExtraHttpOptionsToRequestInit(\n requestInit,\n patchedHttpOptions,\n );\n return this.unaryApiCall(url, requestInit, request.httpMethod);\n }\n\n private patchHttpOptions(\n baseHttpOptions: HttpOptions,\n requestHttpOptions: HttpOptions,\n ): HttpOptions {\n const patchedHttpOptions = JSON.parse(\n JSON.stringify(baseHttpOptions),\n ) as HttpOptions;\n\n for (const [key, value] of Object.entries(requestHttpOptions)) {\n // Records compile to objects.\n if (typeof value === 'object') {\n // @ts-expect-error TS2345TS7053: Element implicitly has an 'any' type\n // because expression of type 'string' can't be used to index type\n // 'HttpOptions'.\n patchedHttpOptions[key] = {...patchedHttpOptions[key], ...value};\n } else if (value !== undefined) {\n // @ts-expect-error TS2345TS7053: Element implicitly has an 'any' type\n // because expression of type 'string' can't be used to index type\n // 'HttpOptions'.\n patchedHttpOptions[key] = value;\n }\n }\n return patchedHttpOptions;\n }\n\n async requestStream(\n request: HttpRequest,\n // TODO: b/407059430 - Replace with HttpResponse.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): Promise {\n let patchedHttpOptions = this.clientOptions.httpOptions!;\n if (request.httpOptions) {\n patchedHttpOptions = this.patchHttpOptions(\n this.clientOptions.httpOptions!,\n request.httpOptions,\n );\n }\n\n const prependProjectLocation = this.shouldPrependVertexProjectPath(request);\n const url = this.constructUrl(\n request.path,\n patchedHttpOptions,\n prependProjectLocation,\n );\n if (!url.searchParams.has('alt') || url.searchParams.get('alt') !== 'sse') {\n url.searchParams.set('alt', 'sse');\n }\n let requestInit: RequestInit = {};\n requestInit.body = request.body;\n requestInit = await this.includeExtraHttpOptionsToRequestInit(\n requestInit,\n patchedHttpOptions,\n );\n return this.streamApiCall(url, requestInit, request.httpMethod);\n }\n\n private async includeExtraHttpOptionsToRequestInit(\n requestInit: RequestInit,\n httpOptions: HttpOptions,\n ): Promise {\n if (httpOptions && httpOptions.timeout && httpOptions.timeout > 0) {\n const abortController = new AbortController();\n const signal = abortController.signal;\n setTimeout(() => abortController.abort(), httpOptions.timeout);\n requestInit.signal = signal;\n }\n requestInit.headers = await this.getHeadersInternal(httpOptions);\n return requestInit;\n }\n\n private async unaryApiCall(\n url: URL,\n requestInit: RequestInit,\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE',\n ): Promise {\n return this.apiCall(url.toString(), {\n ...requestInit,\n method: httpMethod,\n })\n .then(async (response) => {\n await throwErrorIfNotOK(response);\n return new HttpResponse(response);\n })\n .catch((e) => {\n if (e instanceof Error) {\n throw e;\n } else {\n throw new Error(JSON.stringify(e));\n }\n });\n }\n\n private async streamApiCall(\n url: URL,\n requestInit: RequestInit,\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE',\n // TODO: b/407059430 - Replace with HttpResponse.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): Promise> {\n return this.apiCall(url.toString(), {\n ...requestInit,\n method: httpMethod,\n })\n .then(async (response) => {\n await throwErrorIfNotOK(response);\n return this.processStreamResponse(response);\n })\n .catch((e) => {\n if (e instanceof Error) {\n throw e;\n } else {\n throw new Error(JSON.stringify(e));\n }\n });\n }\n\n async *processStreamResponse(\n response: Response,\n // TODO: b/407059430 - Replace with HttpResponse.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): AsyncGenerator {\n const reader = response?.body?.getReader();\n const decoder = new TextDecoder('utf-8');\n if (!reader) {\n throw new Error('Response body is empty');\n }\n\n try {\n let buffer = '';\n while (true) {\n const {done, value} = await reader.read();\n if (done) {\n if (buffer.trim().length > 0) {\n throw new Error('Incomplete JSON segment at the end');\n }\n break;\n }\n const chunkString = decoder.decode(value);\n buffer += chunkString;\n let match = buffer.match(responseLineRE);\n while (match) {\n const processedChunkString = match[1];\n try {\n const chunkData = JSON.parse(processedChunkString);\n yield chunkData;\n buffer = buffer.slice(match[0].length);\n match = buffer.match(responseLineRE);\n } catch (e) {\n throw new Error(\n `exception parsing stream chunk ${processedChunkString}. ${e}`,\n );\n }\n }\n }\n } finally {\n reader.releaseLock();\n }\n }\n private async apiCall(\n url: string,\n requestInit: RequestInit,\n ): Promise {\n return fetch(url, requestInit).catch((e) => {\n throw new Error(`exception ${e} sending request`);\n });\n }\n\n getDefaultHeaders(): Record {\n const headers: Record = {};\n\n const versionHeaderValue =\n LIBRARY_LABEL + ' ' + this.clientOptions.userAgentExtra;\n\n headers[USER_AGENT_HEADER] = versionHeaderValue;\n headers[GOOGLE_API_CLIENT_HEADER] = versionHeaderValue;\n headers[CONTENT_TYPE_HEADER] = 'application/json';\n\n return headers;\n }\n\n private async getHeadersInternal(\n httpOptions: HttpOptions | undefined,\n ): Promise {\n const headers = new Headers();\n if (httpOptions && httpOptions.headers) {\n for (const [key, value] of Object.entries(httpOptions.headers)) {\n headers.append(key, value);\n }\n // Append a timeout header if it is set, note that the timeout option is\n // in milliseconds but the header is in seconds.\n if (httpOptions.timeout && httpOptions.timeout > 0) {\n headers.append(\n SERVER_TIMEOUT_HEADER,\n String(Math.ceil(httpOptions.timeout / 1000)),\n );\n }\n }\n await this.clientOptions.auth.addAuthHeaders(headers);\n return headers;\n }\n\n /**\n * Uploads a file asynchronously using Gemini API only, this is not supported\n * in Vertex AI.\n *\n * @param file The string path to the file to be uploaded or a Blob object.\n * @param config Optional parameters specified in the `UploadFileConfig`\n * interface. @see {@link UploadFileConfig}\n * @return A promise that resolves to a `File` object.\n * @throws An error if called on a Vertex AI client.\n * @throws An error if the `mimeType` is not provided and can not be inferred,\n */\n async uploadFile(\n file: string | Blob,\n config?: UploadFileConfig,\n ): Promise {\n const fileToUpload: File = {};\n if (config != null) {\n fileToUpload.mimeType = config.mimeType;\n fileToUpload.name = config.name;\n fileToUpload.displayName = config.displayName;\n }\n\n if (fileToUpload.name && !fileToUpload.name.startsWith('files/')) {\n fileToUpload.name = `files/${fileToUpload.name}`;\n }\n\n const uploader = this.clientOptions.uploader;\n const fileStat = await uploader.stat(file);\n fileToUpload.sizeBytes = String(fileStat.size);\n const mimeType = config?.mimeType ?? fileStat.type;\n if (mimeType === undefined || mimeType === '') {\n throw new Error(\n 'Can not determine mimeType. Please provide mimeType in the config.',\n );\n }\n fileToUpload.mimeType = mimeType;\n\n const uploadUrl = await this.fetchUploadUrl(fileToUpload, config);\n return uploader.upload(file, uploadUrl, this);\n }\n\n private async fetchUploadUrl(\n file: File,\n config?: UploadFileConfig,\n ): Promise {\n let httpOptions: HttpOptions = {};\n if (config?.httpOptions) {\n httpOptions = config.httpOptions;\n } else {\n httpOptions = {\n apiVersion: '', // api-version is set in the path.\n headers: {\n 'Content-Type': 'application/json',\n 'X-Goog-Upload-Protocol': 'resumable',\n 'X-Goog-Upload-Command': 'start',\n 'X-Goog-Upload-Header-Content-Length': `${file.sizeBytes}`,\n 'X-Goog-Upload-Header-Content-Type': `${file.mimeType}`,\n },\n };\n }\n\n const body: Record = {\n 'file': file,\n };\n const httpResponse = await this.request({\n path: common.formatMap(\n 'upload/v1beta/files',\n body['_url'] as Record,\n ),\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions,\n });\n\n if (!httpResponse || !httpResponse?.headers) {\n throw new Error(\n 'Server did not return an HttpResponse or the returned HttpResponse did not have headers.',\n );\n }\n\n const uploadUrl: string | undefined =\n httpResponse?.headers?.['x-goog-upload-url'];\n if (uploadUrl === undefined) {\n throw new Error(\n 'Failed to get upload url. Server did not return the x-google-upload-url in the headers',\n );\n }\n return uploadUrl;\n }\n}\n\nasync function throwErrorIfNotOK(response: Response | undefined) {\n if (response === undefined) {\n throw new ServerError('response is undefined');\n }\n if (!response.ok) {\n const status: number = response.status;\n const statusText: string = response.statusText;\n let errorBody: Record;\n if (response.headers.get('content-type')?.includes('application/json')) {\n errorBody = await response.json();\n } else {\n errorBody = {\n error: {\n message: 'exception parsing response',\n code: response.status,\n status: response.statusText,\n },\n };\n }\n const errorMessage = `got status: ${status} ${statusText}. ${JSON.stringify(\n errorBody,\n )}`;\n if (status >= 400 && status < 500) {\n const clientError = new ClientError(errorMessage);\n throw clientError;\n } else if (status >= 500 && status < 600) {\n const serverError = new ServerError(errorMessage);\n throw serverError;\n }\n throw new Error(errorMessage);\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport function crossError(): Error {\n // TODO(b/399934880): this message needs a link to a help page explaining how to enable conditional exports\n return new Error(`This feature requires the web or Node specific @google/genai implementation, you can fix this by either:\n\n*Enabling conditional exports for your project [recommended]*\n\n*Using a platform specific import* - Make sure your code imports either '@google/genai/web' or '@google/genai/node' instead of '@google/genai'.\n`);\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {ApiClient} from '../_api_client';\nimport {FileStat, Uploader} from '../_uploader';\nimport {File, HttpResponse} from '../types';\n\nimport {crossError} from './_cross_error';\n\nexport const MAX_CHUNK_SIZE = 1024 * 1024 * 8; // bytes\nexport class CrossUploader implements Uploader {\n async upload(\n file: string | Blob,\n uploadUrl: string,\n apiClient: ApiClient,\n ): Promise {\n if (typeof file === 'string') {\n throw crossError();\n } else {\n return uploadBlob(file, uploadUrl, apiClient);\n }\n }\n\n async stat(file: string | Blob): Promise {\n if (typeof file === 'string') {\n throw crossError();\n } else {\n return getBlobStat(file);\n }\n }\n}\n\nexport async function uploadBlob(\n file: Blob,\n uploadUrl: string,\n apiClient: ApiClient,\n): Promise {\n let fileSize = 0;\n let offset = 0;\n let response: HttpResponse = new HttpResponse(new Response());\n let uploadCommand = 'upload';\n fileSize = file.size;\n while (offset < fileSize) {\n const chunkSize = Math.min(MAX_CHUNK_SIZE, fileSize - offset);\n const chunk = file.slice(offset, offset + chunkSize);\n if (offset + chunkSize >= fileSize) {\n uploadCommand += ', finalize';\n }\n response = await apiClient.request({\n path: '',\n body: chunk,\n httpMethod: 'POST',\n httpOptions: {\n apiVersion: '',\n baseUrl: uploadUrl,\n headers: {\n 'X-Goog-Upload-Command': uploadCommand,\n 'X-Goog-Upload-Offset': String(offset),\n 'Content-Length': String(chunkSize),\n },\n },\n });\n offset += chunkSize;\n // The `x-goog-upload-status` header field can be `active`, `final` and\n //`cancelled` in resposne.\n if (response?.headers?.['x-goog-upload-status'] !== 'active') {\n break;\n }\n // TODO(b/401391430) Investigate why the upload status is not finalized\n // even though all content has been uploaded.\n if (fileSize <= offset) {\n throw new Error(\n 'All content has been uploaded, but the upload status is not finalized.',\n );\n }\n }\n const responseJson = (await response?.json()) as Record<\n string,\n File | unknown\n >;\n if (response?.headers?.['x-goog-upload-status'] !== 'final') {\n throw new Error('Failed to upload file: Upload status is not finalized.');\n }\n return responseJson['file'] as File;\n}\n\nexport async function getBlobStat(file: Blob): Promise {\n const fileStat: FileStat = {size: file.size, type: file.type};\n return fileStat;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n WebSocketCallbacks,\n WebSocketFactory,\n WebSocket as Ws,\n} from '../_websocket';\nimport {crossError} from './_cross_error';\n\n// TODO((b/401271082): re-enable lint once CrossWebSocketFactory is implemented.\n/* eslint-disable @typescript-eslint/no-unused-vars */\nexport class CrossWebSocketFactory implements WebSocketFactory {\n create(\n url: string,\n headers: Record,\n callbacks: WebSocketCallbacks,\n ): Ws {\n throw crossError();\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function listFilesConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listFilesParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listFilesConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function fileStatusToMldev(\n apiClient: ApiClient,\n fromObject: types.FileStatus,\n): Record {\n const toObject: Record = {};\n\n const fromDetails = common.getValueByPath(fromObject, ['details']);\n if (fromDetails != null) {\n common.setValueByPath(toObject, ['details'], fromDetails);\n }\n\n const fromMessage = common.getValueByPath(fromObject, ['message']);\n if (fromMessage != null) {\n common.setValueByPath(toObject, ['message'], fromMessage);\n }\n\n const fromCode = common.getValueByPath(fromObject, ['code']);\n if (fromCode != null) {\n common.setValueByPath(toObject, ['code'], fromCode);\n }\n\n return toObject;\n}\n\nexport function fileToMldev(\n apiClient: ApiClient,\n fromObject: types.File,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n const fromSizeBytes = common.getValueByPath(fromObject, ['sizeBytes']);\n if (fromSizeBytes != null) {\n common.setValueByPath(toObject, ['sizeBytes'], fromSizeBytes);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromExpirationTime = common.getValueByPath(fromObject, [\n 'expirationTime',\n ]);\n if (fromExpirationTime != null) {\n common.setValueByPath(toObject, ['expirationTime'], fromExpirationTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromSha256Hash = common.getValueByPath(fromObject, ['sha256Hash']);\n if (fromSha256Hash != null) {\n common.setValueByPath(toObject, ['sha256Hash'], fromSha256Hash);\n }\n\n const fromUri = common.getValueByPath(fromObject, ['uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromDownloadUri = common.getValueByPath(fromObject, ['downloadUri']);\n if (fromDownloadUri != null) {\n common.setValueByPath(toObject, ['downloadUri'], fromDownloadUri);\n }\n\n const fromState = common.getValueByPath(fromObject, ['state']);\n if (fromState != null) {\n common.setValueByPath(toObject, ['state'], fromState);\n }\n\n const fromSource = common.getValueByPath(fromObject, ['source']);\n if (fromSource != null) {\n common.setValueByPath(toObject, ['source'], fromSource);\n }\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(\n toObject,\n ['error'],\n fileStatusToMldev(apiClient, fromError),\n );\n }\n\n return toObject;\n}\n\nexport function createFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromFile = common.getValueByPath(fromObject, ['file']);\n if (fromFile != null) {\n common.setValueByPath(toObject, ['file'], fileToMldev(apiClient, fromFile));\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function getFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'file'],\n t.tFileName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.DeleteFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'file'],\n t.tFileName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function fileStatusFromMldev(\n apiClient: ApiClient,\n fromObject: types.FileStatus,\n): Record {\n const toObject: Record = {};\n\n const fromDetails = common.getValueByPath(fromObject, ['details']);\n if (fromDetails != null) {\n common.setValueByPath(toObject, ['details'], fromDetails);\n }\n\n const fromMessage = common.getValueByPath(fromObject, ['message']);\n if (fromMessage != null) {\n common.setValueByPath(toObject, ['message'], fromMessage);\n }\n\n const fromCode = common.getValueByPath(fromObject, ['code']);\n if (fromCode != null) {\n common.setValueByPath(toObject, ['code'], fromCode);\n }\n\n return toObject;\n}\n\nexport function fileFromMldev(\n apiClient: ApiClient,\n fromObject: types.File,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n const fromSizeBytes = common.getValueByPath(fromObject, ['sizeBytes']);\n if (fromSizeBytes != null) {\n common.setValueByPath(toObject, ['sizeBytes'], fromSizeBytes);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromExpirationTime = common.getValueByPath(fromObject, [\n 'expirationTime',\n ]);\n if (fromExpirationTime != null) {\n common.setValueByPath(toObject, ['expirationTime'], fromExpirationTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromSha256Hash = common.getValueByPath(fromObject, ['sha256Hash']);\n if (fromSha256Hash != null) {\n common.setValueByPath(toObject, ['sha256Hash'], fromSha256Hash);\n }\n\n const fromUri = common.getValueByPath(fromObject, ['uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromDownloadUri = common.getValueByPath(fromObject, ['downloadUri']);\n if (fromDownloadUri != null) {\n common.setValueByPath(toObject, ['downloadUri'], fromDownloadUri);\n }\n\n const fromState = common.getValueByPath(fromObject, ['state']);\n if (fromState != null) {\n common.setValueByPath(toObject, ['state'], fromState);\n }\n\n const fromSource = common.getValueByPath(fromObject, ['source']);\n if (fromSource != null) {\n common.setValueByPath(toObject, ['source'], fromSource);\n }\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(\n toObject,\n ['error'],\n fileStatusFromMldev(apiClient, fromError),\n );\n }\n\n return toObject;\n}\n\nexport function listFilesResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromFiles = common.getValueByPath(fromObject, ['files']);\n if (fromFiles != null) {\n if (Array.isArray(fromFiles)) {\n common.setValueByPath(\n toObject,\n ['files'],\n fromFiles.map((item) => {\n return fileFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['files'], fromFiles);\n }\n }\n\n return toObject;\n}\n\nexport function createFileResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.CreateFileResponse,\n): Record {\n const toObject: Record = {};\n\n const fromHttpHeaders = common.getValueByPath(fromObject, ['httpHeaders']);\n if (fromHttpHeaders != null) {\n common.setValueByPath(toObject, ['httpHeaders'], fromHttpHeaders);\n }\n\n return toObject;\n}\n\nexport function deleteFileResponseFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_files_converters';\nimport {PagedItem, Pager} from './pagers';\nimport * as types from './types';\n\nexport class Files extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Lists all current project files from the service.\n *\n * @param params - The parameters for the list request\n * @return The paginated results of the list of files\n *\n * @example\n * The following code prints the names of all files from the service, the\n * size of each page is 10.\n *\n * ```ts\n * const listResponse = await ai.files.list({config: {'pageSize': 10}});\n * for await (const file of listResponse) {\n * console.log(file.name);\n * }\n * ```\n */\n list = async (\n params: types.ListFilesParameters = {},\n ): Promise> => {\n return new Pager(\n PagedItem.PAGED_ITEM_FILES,\n (x: types.ListFilesParameters) => this.listInternal(x),\n await this.listInternal(params),\n params,\n );\n };\n\n /**\n * Uploads a file asynchronously to the Gemini API.\n * This method is not available in Vertex AI.\n * Supported upload sources:\n * - Node.js: File path (string) or Blob object.\n * - Browser: Blob object (e.g., File).\n *\n * @remarks\n * The `mimeType` can be specified in the `config` parameter. If omitted:\n * - For file path (string) inputs, the `mimeType` will be inferred from the\n * file extension.\n * - For Blob object inputs, the `mimeType` will be set to the Blob's `type`\n * property.\n * Somex eamples for file extension to mimeType mapping:\n * .txt -> text/plain\n * .json -> application/json\n * .jpg -> image/jpeg\n * .png -> image/png\n * .mp3 -> audio/mpeg\n * .mp4 -> video/mp4\n *\n * This section can contain multiple paragraphs and code examples.\n *\n * @param params - Optional parameters specified in the\n * `types.UploadFileParameters` interface.\n * @see {@link types.UploadFileParameters#config} for the optional\n * config in the parameters.\n * @return A promise that resolves to a `types.File` object.\n * @throws An error if called on a Vertex AI client.\n * @throws An error if the `mimeType` is not provided and can not be inferred,\n * the `mimeType` can be provided in the `params.config` parameter.\n * @throws An error occurs if a suitable upload location cannot be established.\n *\n * @example\n * The following code uploads a file to Gemini API.\n *\n * ```ts\n * const file = await ai.files.upload({file: 'file.txt', config: {\n * mimeType: 'text/plain',\n * }});\n * console.log(file.name);\n * ```\n */\n async upload(params: types.UploadFileParameters): Promise {\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'Vertex AI does not support uploading files. You can share files through a GCS bucket.',\n );\n }\n\n return this.apiClient\n .uploadFile(params.file, params.config)\n .then((response) => {\n const file = converters.fileFromMldev(this.apiClient, response);\n return file as types.File;\n });\n }\n\n private async listInternal(\n params: types.ListFilesParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.listFilesParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap('files', body['_url'] as Record);\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listFilesResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListFilesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n private async createInternal(\n params: types.CreateFileParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.createFileParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'upload/v1beta/files',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.createFileResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.CreateFileResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Retrieves the file information from the service.\n *\n * @param params - The parameters for the get request\n * @return The Promise that resolves to the types.File object requested.\n *\n * @example\n * ```ts\n * const config: GetFileParameters = {\n * name: fileName,\n * };\n * file = await ai.files.get(config);\n * console.log(file.name);\n * ```\n */\n async get(params: types.GetFileParameters): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.getFileParametersToMldev(this.apiClient, params);\n path = common.formatMap(\n 'files/{file}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.fileFromMldev(this.apiClient, apiResponse);\n\n return resp as types.File;\n });\n }\n }\n\n /**\n * Deletes a remotely stored file.\n *\n * @param params - The parameters for the delete request.\n * @return The DeleteFileResponse, the response for the delete method.\n *\n * @example\n * The following code deletes an example file named \"files/mehozpxf877d\".\n *\n * ```ts\n * await ai.files.delete({name: file.name});\n * ```\n */\n async delete(\n params: types.DeleteFileParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.deleteFileParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'files/{file}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteFileResponseFromMldev();\n const typedResp = new types.DeleteFileResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function partToMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['videoMetadata']) !== undefined) {\n throw new Error('videoMetadata parameter is not supported in Gemini API.');\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToMldev(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['example']) !== undefined) {\n throw new Error('example parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['pattern']) !== undefined) {\n throw new Error('pattern parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['default']) !== undefined) {\n throw new Error('default parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxLength']) !== undefined) {\n throw new Error('maxLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minLength']) !== undefined) {\n throw new Error('minLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minProperties']) !== undefined) {\n throw new Error('minProperties parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxProperties']) !== undefined) {\n throw new Error('maxProperties parameter is not supported in Gemini API.');\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function safetySettingToMldev(\n apiClient: ApiClient,\n fromObject: types.SafetySetting,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['method']) !== undefined) {\n throw new Error('method parameter is not supported in Gemini API.');\n }\n\n const fromCategory = common.getValueByPath(fromObject, ['category']);\n if (fromCategory != null) {\n common.setValueByPath(toObject, ['category'], fromCategory);\n }\n\n const fromThreshold = common.getValueByPath(fromObject, ['threshold']);\n if (fromThreshold != null) {\n common.setValueByPath(toObject, ['threshold'], fromThreshold);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['response']) !== undefined) {\n throw new Error('response parameter is not supported in Gemini API.');\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToMldev(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToMldev(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n if (common.getValueByPath(fromObject, ['retrieval']) !== undefined) {\n throw new Error('retrieval parameter is not supported in Gemini API.');\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToMldev());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function prebuiltVoiceConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.PrebuiltVoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceName = common.getValueByPath(fromObject, ['voiceName']);\n if (fromVoiceName != null) {\n common.setValueByPath(toObject, ['voiceName'], fromVoiceName);\n }\n\n return toObject;\n}\n\nexport function voiceConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.VoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromPrebuiltVoiceConfig = common.getValueByPath(fromObject, [\n 'prebuiltVoiceConfig',\n ]);\n if (fromPrebuiltVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['prebuiltVoiceConfig'],\n prebuiltVoiceConfigToMldev(apiClient, fromPrebuiltVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function speechConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.SpeechConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceConfig = common.getValueByPath(fromObject, ['voiceConfig']);\n if (fromVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['voiceConfig'],\n voiceConfigToMldev(apiClient, fromVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function thinkingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ThinkingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromIncludeThoughts = common.getValueByPath(fromObject, [\n 'includeThoughts',\n ]);\n if (fromIncludeThoughts != null) {\n common.setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);\n }\n\n const fromThinkingBudget = common.getValueByPath(fromObject, [\n 'thinkingBudget',\n ]);\n if (fromThinkingBudget != null) {\n common.setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);\n }\n\n return toObject;\n}\n\nexport function generateContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTemperature = common.getValueByPath(fromObject, ['temperature']);\n if (fromTemperature != null) {\n common.setValueByPath(toObject, ['temperature'], fromTemperature);\n }\n\n const fromTopP = common.getValueByPath(fromObject, ['topP']);\n if (fromTopP != null) {\n common.setValueByPath(toObject, ['topP'], fromTopP);\n }\n\n const fromTopK = common.getValueByPath(fromObject, ['topK']);\n if (fromTopK != null) {\n common.setValueByPath(toObject, ['topK'], fromTopK);\n }\n\n const fromCandidateCount = common.getValueByPath(fromObject, [\n 'candidateCount',\n ]);\n if (fromCandidateCount != null) {\n common.setValueByPath(toObject, ['candidateCount'], fromCandidateCount);\n }\n\n const fromMaxOutputTokens = common.getValueByPath(fromObject, [\n 'maxOutputTokens',\n ]);\n if (fromMaxOutputTokens != null) {\n common.setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);\n }\n\n const fromStopSequences = common.getValueByPath(fromObject, [\n 'stopSequences',\n ]);\n if (fromStopSequences != null) {\n common.setValueByPath(toObject, ['stopSequences'], fromStopSequences);\n }\n\n const fromResponseLogprobs = common.getValueByPath(fromObject, [\n 'responseLogprobs',\n ]);\n if (fromResponseLogprobs != null) {\n common.setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);\n }\n\n const fromLogprobs = common.getValueByPath(fromObject, ['logprobs']);\n if (fromLogprobs != null) {\n common.setValueByPath(toObject, ['logprobs'], fromLogprobs);\n }\n\n const fromPresencePenalty = common.getValueByPath(fromObject, [\n 'presencePenalty',\n ]);\n if (fromPresencePenalty != null) {\n common.setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);\n }\n\n const fromFrequencyPenalty = common.getValueByPath(fromObject, [\n 'frequencyPenalty',\n ]);\n if (fromFrequencyPenalty != null) {\n common.setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (fromSeed != null) {\n common.setValueByPath(toObject, ['seed'], fromSeed);\n }\n\n const fromResponseMimeType = common.getValueByPath(fromObject, [\n 'responseMimeType',\n ]);\n if (fromResponseMimeType != null) {\n common.setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);\n }\n\n const fromResponseSchema = common.getValueByPath(fromObject, [\n 'responseSchema',\n ]);\n if (fromResponseSchema != null) {\n common.setValueByPath(\n toObject,\n ['responseSchema'],\n schemaToMldev(apiClient, t.tSchema(apiClient, fromResponseSchema)),\n );\n }\n\n if (common.getValueByPath(fromObject, ['routingConfig']) !== undefined) {\n throw new Error('routingConfig parameter is not supported in Gemini API.');\n }\n\n const fromSafetySettings = common.getValueByPath(fromObject, [\n 'safetySettings',\n ]);\n if (parentObject !== undefined && fromSafetySettings != null) {\n if (Array.isArray(fromSafetySettings)) {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings.map((item) => {\n return safetySettingToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings,\n );\n }\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToMldev(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToMldev(apiClient, fromToolConfig),\n );\n }\n\n if (common.getValueByPath(fromObject, ['labels']) !== undefined) {\n throw new Error('labels parameter is not supported in Gemini API.');\n }\n\n const fromCachedContent = common.getValueByPath(fromObject, [\n 'cachedContent',\n ]);\n if (parentObject !== undefined && fromCachedContent != null) {\n common.setValueByPath(\n parentObject,\n ['cachedContent'],\n t.tCachedContentName(apiClient, fromCachedContent),\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities != null) {\n common.setValueByPath(\n toObject,\n ['responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromMediaResolution = common.getValueByPath(fromObject, [\n 'mediaResolution',\n ]);\n if (fromMediaResolution != null) {\n common.setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig != null) {\n common.setValueByPath(\n toObject,\n ['speechConfig'],\n speechConfigToMldev(\n apiClient,\n t.tSpeechConfig(apiClient, fromSpeechConfig),\n ),\n );\n }\n\n if (common.getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {\n throw new Error('audioTimestamp parameter is not supported in Gemini API.');\n }\n\n const fromThinkingConfig = common.getValueByPath(fromObject, [\n 'thinkingConfig',\n ]);\n if (fromThinkingConfig != null) {\n common.setValueByPath(\n toObject,\n ['thinkingConfig'],\n thinkingConfigToMldev(apiClient, fromThinkingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function generateContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['generationConfig'],\n generateContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTaskType = common.getValueByPath(fromObject, ['taskType']);\n if (parentObject !== undefined && fromTaskType != null) {\n common.setValueByPath(\n parentObject,\n ['requests[]', 'taskType'],\n fromTaskType,\n );\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (parentObject !== undefined && fromTitle != null) {\n common.setValueByPath(parentObject, ['requests[]', 'title'], fromTitle);\n }\n\n const fromOutputDimensionality = common.getValueByPath(fromObject, [\n 'outputDimensionality',\n ]);\n if (parentObject !== undefined && fromOutputDimensionality != null) {\n common.setValueByPath(\n parentObject,\n ['requests[]', 'outputDimensionality'],\n fromOutputDimensionality,\n );\n }\n\n if (common.getValueByPath(fromObject, ['mimeType']) !== undefined) {\n throw new Error('mimeType parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['autoTruncate']) !== undefined) {\n throw new Error('autoTruncate parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function embedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n common.setValueByPath(\n toObject,\n ['requests[]', 'content'],\n t.tContentsForEmbed(apiClient, fromContents),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n embedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n const fromModelForEmbedContent = common.getValueByPath(fromObject, ['model']);\n if (fromModelForEmbedContent !== undefined) {\n common.setValueByPath(\n toObject,\n ['requests[]', 'model'],\n t.tModel(apiClient, fromModelForEmbedContent),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {\n throw new Error('outputGcsUri parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['negativePrompt']) !== undefined) {\n throw new Error('negativePrompt parameter is not supported in Gemini API.');\n }\n\n const fromNumberOfImages = common.getValueByPath(fromObject, [\n 'numberOfImages',\n ]);\n if (parentObject !== undefined && fromNumberOfImages != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfImages,\n );\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromGuidanceScale = common.getValueByPath(fromObject, [\n 'guidanceScale',\n ]);\n if (parentObject !== undefined && fromGuidanceScale != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'guidanceScale'],\n fromGuidanceScale,\n );\n }\n\n if (common.getValueByPath(fromObject, ['seed']) !== undefined) {\n throw new Error('seed parameter is not supported in Gemini API.');\n }\n\n const fromSafetyFilterLevel = common.getValueByPath(fromObject, [\n 'safetyFilterLevel',\n ]);\n if (parentObject !== undefined && fromSafetyFilterLevel != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'safetySetting'],\n fromSafetyFilterLevel,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromIncludeSafetyAttributes = common.getValueByPath(fromObject, [\n 'includeSafetyAttributes',\n ]);\n if (parentObject !== undefined && fromIncludeSafetyAttributes != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeSafetyAttributes'],\n fromIncludeSafetyAttributes,\n );\n }\n\n const fromIncludeRaiReason = common.getValueByPath(fromObject, [\n 'includeRaiReason',\n ]);\n if (parentObject !== undefined && fromIncludeRaiReason != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeRaiReason'],\n fromIncludeRaiReason,\n );\n }\n\n const fromLanguage = common.getValueByPath(fromObject, ['language']);\n if (parentObject !== undefined && fromLanguage != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'language'],\n fromLanguage,\n );\n }\n\n const fromOutputMimeType = common.getValueByPath(fromObject, [\n 'outputMimeType',\n ]);\n if (parentObject !== undefined && fromOutputMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'mimeType'],\n fromOutputMimeType,\n );\n }\n\n const fromOutputCompressionQuality = common.getValueByPath(fromObject, [\n 'outputCompressionQuality',\n ]);\n if (parentObject !== undefined && fromOutputCompressionQuality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'compressionQuality'],\n fromOutputCompressionQuality,\n );\n }\n\n if (common.getValueByPath(fromObject, ['addWatermark']) !== undefined) {\n throw new Error('addWatermark parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {\n throw new Error('enhancePrompt parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function generateImagesParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateImagesConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getModelParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetModelParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function countTokensConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensConfig,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['systemInstruction']) !== undefined) {\n throw new Error(\n 'systemInstruction parameter is not supported in Gemini API.',\n );\n }\n\n if (common.getValueByPath(fromObject, ['tools']) !== undefined) {\n throw new Error('tools parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['generationConfig']) !== undefined) {\n throw new Error(\n 'generationConfig parameter is not supported in Gemini API.',\n );\n }\n\n return toObject;\n}\n\nexport function countTokensParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n countTokensConfigToMldev(apiClient, fromConfig),\n );\n }\n\n return toObject;\n}\n\nexport function imageToMldev(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['gcsUri']) !== undefined) {\n throw new Error('gcsUri parameter is not supported in Gemini API.');\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, ['imageBytes']);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['bytesBase64Encoded'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generateVideosConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromNumberOfVideos = common.getValueByPath(fromObject, [\n 'numberOfVideos',\n ]);\n if (parentObject !== undefined && fromNumberOfVideos != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfVideos,\n );\n }\n\n if (common.getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {\n throw new Error('outputGcsUri parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['fps']) !== undefined) {\n throw new Error('fps parameter is not supported in Gemini API.');\n }\n\n const fromDurationSeconds = common.getValueByPath(fromObject, [\n 'durationSeconds',\n ]);\n if (parentObject !== undefined && fromDurationSeconds != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'durationSeconds'],\n fromDurationSeconds,\n );\n }\n\n if (common.getValueByPath(fromObject, ['seed']) !== undefined) {\n throw new Error('seed parameter is not supported in Gemini API.');\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n if (common.getValueByPath(fromObject, ['resolution']) !== undefined) {\n throw new Error('resolution parameter is not supported in Gemini API.');\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n if (common.getValueByPath(fromObject, ['pubsubTopic']) !== undefined) {\n throw new Error('pubsubTopic parameter is not supported in Gemini API.');\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n if (common.getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {\n throw new Error('enhancePrompt parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function generateVideosParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromImage = common.getValueByPath(fromObject, ['image']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['instances[0]', 'image'],\n imageToMldev(apiClient, fromImage),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateVideosConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partToVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToVertex(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n const fromExample = common.getValueByPath(fromObject, ['example']);\n if (fromExample != null) {\n common.setValueByPath(toObject, ['example'], fromExample);\n }\n\n const fromPattern = common.getValueByPath(fromObject, ['pattern']);\n if (fromPattern != null) {\n common.setValueByPath(toObject, ['pattern'], fromPattern);\n }\n\n const fromDefault = common.getValueByPath(fromObject, ['default']);\n if (fromDefault != null) {\n common.setValueByPath(toObject, ['default'], fromDefault);\n }\n\n const fromMaxLength = common.getValueByPath(fromObject, ['maxLength']);\n if (fromMaxLength != null) {\n common.setValueByPath(toObject, ['maxLength'], fromMaxLength);\n }\n\n const fromMinLength = common.getValueByPath(fromObject, ['minLength']);\n if (fromMinLength != null) {\n common.setValueByPath(toObject, ['minLength'], fromMinLength);\n }\n\n const fromMinProperties = common.getValueByPath(fromObject, [\n 'minProperties',\n ]);\n if (fromMinProperties != null) {\n common.setValueByPath(toObject, ['minProperties'], fromMinProperties);\n }\n\n const fromMaxProperties = common.getValueByPath(fromObject, [\n 'maxProperties',\n ]);\n if (fromMaxProperties != null) {\n common.setValueByPath(toObject, ['maxProperties'], fromMaxProperties);\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function safetySettingToVertex(\n apiClient: ApiClient,\n fromObject: types.SafetySetting,\n): Record {\n const toObject: Record = {};\n\n const fromMethod = common.getValueByPath(fromObject, ['method']);\n if (fromMethod != null) {\n common.setValueByPath(toObject, ['method'], fromMethod);\n }\n\n const fromCategory = common.getValueByPath(fromObject, ['category']);\n if (fromCategory != null) {\n common.setValueByPath(toObject, ['category'], fromCategory);\n }\n\n const fromThreshold = common.getValueByPath(fromObject, ['threshold']);\n if (fromThreshold != null) {\n common.setValueByPath(toObject, ['threshold'], fromThreshold);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n schemaToVertex(apiClient, fromResponse),\n );\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToVertex(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToVertex(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n const fromRetrieval = common.getValueByPath(fromObject, ['retrieval']);\n if (fromRetrieval != null) {\n common.setValueByPath(toObject, ['retrieval'], fromRetrieval);\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToVertex());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function prebuiltVoiceConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.PrebuiltVoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceName = common.getValueByPath(fromObject, ['voiceName']);\n if (fromVoiceName != null) {\n common.setValueByPath(toObject, ['voiceName'], fromVoiceName);\n }\n\n return toObject;\n}\n\nexport function voiceConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.VoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromPrebuiltVoiceConfig = common.getValueByPath(fromObject, [\n 'prebuiltVoiceConfig',\n ]);\n if (fromPrebuiltVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['prebuiltVoiceConfig'],\n prebuiltVoiceConfigToVertex(apiClient, fromPrebuiltVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function speechConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.SpeechConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceConfig = common.getValueByPath(fromObject, ['voiceConfig']);\n if (fromVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['voiceConfig'],\n voiceConfigToVertex(apiClient, fromVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function thinkingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ThinkingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromIncludeThoughts = common.getValueByPath(fromObject, [\n 'includeThoughts',\n ]);\n if (fromIncludeThoughts != null) {\n common.setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);\n }\n\n const fromThinkingBudget = common.getValueByPath(fromObject, [\n 'thinkingBudget',\n ]);\n if (fromThinkingBudget != null) {\n common.setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);\n }\n\n return toObject;\n}\n\nexport function generateContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTemperature = common.getValueByPath(fromObject, ['temperature']);\n if (fromTemperature != null) {\n common.setValueByPath(toObject, ['temperature'], fromTemperature);\n }\n\n const fromTopP = common.getValueByPath(fromObject, ['topP']);\n if (fromTopP != null) {\n common.setValueByPath(toObject, ['topP'], fromTopP);\n }\n\n const fromTopK = common.getValueByPath(fromObject, ['topK']);\n if (fromTopK != null) {\n common.setValueByPath(toObject, ['topK'], fromTopK);\n }\n\n const fromCandidateCount = common.getValueByPath(fromObject, [\n 'candidateCount',\n ]);\n if (fromCandidateCount != null) {\n common.setValueByPath(toObject, ['candidateCount'], fromCandidateCount);\n }\n\n const fromMaxOutputTokens = common.getValueByPath(fromObject, [\n 'maxOutputTokens',\n ]);\n if (fromMaxOutputTokens != null) {\n common.setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);\n }\n\n const fromStopSequences = common.getValueByPath(fromObject, [\n 'stopSequences',\n ]);\n if (fromStopSequences != null) {\n common.setValueByPath(toObject, ['stopSequences'], fromStopSequences);\n }\n\n const fromResponseLogprobs = common.getValueByPath(fromObject, [\n 'responseLogprobs',\n ]);\n if (fromResponseLogprobs != null) {\n common.setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);\n }\n\n const fromLogprobs = common.getValueByPath(fromObject, ['logprobs']);\n if (fromLogprobs != null) {\n common.setValueByPath(toObject, ['logprobs'], fromLogprobs);\n }\n\n const fromPresencePenalty = common.getValueByPath(fromObject, [\n 'presencePenalty',\n ]);\n if (fromPresencePenalty != null) {\n common.setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);\n }\n\n const fromFrequencyPenalty = common.getValueByPath(fromObject, [\n 'frequencyPenalty',\n ]);\n if (fromFrequencyPenalty != null) {\n common.setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (fromSeed != null) {\n common.setValueByPath(toObject, ['seed'], fromSeed);\n }\n\n const fromResponseMimeType = common.getValueByPath(fromObject, [\n 'responseMimeType',\n ]);\n if (fromResponseMimeType != null) {\n common.setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);\n }\n\n const fromResponseSchema = common.getValueByPath(fromObject, [\n 'responseSchema',\n ]);\n if (fromResponseSchema != null) {\n common.setValueByPath(\n toObject,\n ['responseSchema'],\n schemaToVertex(apiClient, t.tSchema(apiClient, fromResponseSchema)),\n );\n }\n\n const fromRoutingConfig = common.getValueByPath(fromObject, [\n 'routingConfig',\n ]);\n if (fromRoutingConfig != null) {\n common.setValueByPath(toObject, ['routingConfig'], fromRoutingConfig);\n }\n\n const fromSafetySettings = common.getValueByPath(fromObject, [\n 'safetySettings',\n ]);\n if (parentObject !== undefined && fromSafetySettings != null) {\n if (Array.isArray(fromSafetySettings)) {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings.map((item) => {\n return safetySettingToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings,\n );\n }\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToVertex(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToVertex(apiClient, fromToolConfig),\n );\n }\n\n const fromLabels = common.getValueByPath(fromObject, ['labels']);\n if (parentObject !== undefined && fromLabels != null) {\n common.setValueByPath(parentObject, ['labels'], fromLabels);\n }\n\n const fromCachedContent = common.getValueByPath(fromObject, [\n 'cachedContent',\n ]);\n if (parentObject !== undefined && fromCachedContent != null) {\n common.setValueByPath(\n parentObject,\n ['cachedContent'],\n t.tCachedContentName(apiClient, fromCachedContent),\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities != null) {\n common.setValueByPath(\n toObject,\n ['responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromMediaResolution = common.getValueByPath(fromObject, [\n 'mediaResolution',\n ]);\n if (fromMediaResolution != null) {\n common.setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig != null) {\n common.setValueByPath(\n toObject,\n ['speechConfig'],\n speechConfigToVertex(\n apiClient,\n t.tSpeechConfig(apiClient, fromSpeechConfig),\n ),\n );\n }\n\n const fromAudioTimestamp = common.getValueByPath(fromObject, [\n 'audioTimestamp',\n ]);\n if (fromAudioTimestamp != null) {\n common.setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp);\n }\n\n const fromThinkingConfig = common.getValueByPath(fromObject, [\n 'thinkingConfig',\n ]);\n if (fromThinkingConfig != null) {\n common.setValueByPath(\n toObject,\n ['thinkingConfig'],\n thinkingConfigToVertex(apiClient, fromThinkingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function generateContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['generationConfig'],\n generateContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTaskType = common.getValueByPath(fromObject, ['taskType']);\n if (parentObject !== undefined && fromTaskType != null) {\n common.setValueByPath(\n parentObject,\n ['instances[]', 'task_type'],\n fromTaskType,\n );\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (parentObject !== undefined && fromTitle != null) {\n common.setValueByPath(parentObject, ['instances[]', 'title'], fromTitle);\n }\n\n const fromOutputDimensionality = common.getValueByPath(fromObject, [\n 'outputDimensionality',\n ]);\n if (parentObject !== undefined && fromOutputDimensionality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputDimensionality'],\n fromOutputDimensionality,\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (parentObject !== undefined && fromMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['instances[]', 'mimeType'],\n fromMimeType,\n );\n }\n\n const fromAutoTruncate = common.getValueByPath(fromObject, ['autoTruncate']);\n if (parentObject !== undefined && fromAutoTruncate != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'autoTruncate'],\n fromAutoTruncate,\n );\n }\n\n return toObject;\n}\n\nexport function embedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n common.setValueByPath(\n toObject,\n ['instances[]', 'content'],\n t.tContentsForEmbed(apiClient, fromContents),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n embedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromOutputGcsUri = common.getValueByPath(fromObject, ['outputGcsUri']);\n if (parentObject !== undefined && fromOutputGcsUri != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'storageUri'],\n fromOutputGcsUri,\n );\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n const fromNumberOfImages = common.getValueByPath(fromObject, [\n 'numberOfImages',\n ]);\n if (parentObject !== undefined && fromNumberOfImages != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfImages,\n );\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromGuidanceScale = common.getValueByPath(fromObject, [\n 'guidanceScale',\n ]);\n if (parentObject !== undefined && fromGuidanceScale != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'guidanceScale'],\n fromGuidanceScale,\n );\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (parentObject !== undefined && fromSeed != null) {\n common.setValueByPath(parentObject, ['parameters', 'seed'], fromSeed);\n }\n\n const fromSafetyFilterLevel = common.getValueByPath(fromObject, [\n 'safetyFilterLevel',\n ]);\n if (parentObject !== undefined && fromSafetyFilterLevel != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'safetySetting'],\n fromSafetyFilterLevel,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromIncludeSafetyAttributes = common.getValueByPath(fromObject, [\n 'includeSafetyAttributes',\n ]);\n if (parentObject !== undefined && fromIncludeSafetyAttributes != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeSafetyAttributes'],\n fromIncludeSafetyAttributes,\n );\n }\n\n const fromIncludeRaiReason = common.getValueByPath(fromObject, [\n 'includeRaiReason',\n ]);\n if (parentObject !== undefined && fromIncludeRaiReason != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeRaiReason'],\n fromIncludeRaiReason,\n );\n }\n\n const fromLanguage = common.getValueByPath(fromObject, ['language']);\n if (parentObject !== undefined && fromLanguage != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'language'],\n fromLanguage,\n );\n }\n\n const fromOutputMimeType = common.getValueByPath(fromObject, [\n 'outputMimeType',\n ]);\n if (parentObject !== undefined && fromOutputMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'mimeType'],\n fromOutputMimeType,\n );\n }\n\n const fromOutputCompressionQuality = common.getValueByPath(fromObject, [\n 'outputCompressionQuality',\n ]);\n if (parentObject !== undefined && fromOutputCompressionQuality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'compressionQuality'],\n fromOutputCompressionQuality,\n );\n }\n\n const fromAddWatermark = common.getValueByPath(fromObject, ['addWatermark']);\n if (parentObject !== undefined && fromAddWatermark != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'addWatermark'],\n fromAddWatermark,\n );\n }\n\n const fromEnhancePrompt = common.getValueByPath(fromObject, [\n 'enhancePrompt',\n ]);\n if (parentObject !== undefined && fromEnhancePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'enhancePrompt'],\n fromEnhancePrompt,\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateImagesConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getModelParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetModelParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function countTokensConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (parentObject !== undefined && fromGenerationConfig != null) {\n common.setValueByPath(\n parentObject,\n ['generationConfig'],\n fromGenerationConfig,\n );\n }\n\n return toObject;\n}\n\nexport function countTokensParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n countTokensConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function computeTokensParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.ComputeTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function imageToVertex(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromGcsUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromGcsUri != null) {\n common.setValueByPath(toObject, ['gcsUri'], fromGcsUri);\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, ['imageBytes']);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['bytesBase64Encoded'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generateVideosConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromNumberOfVideos = common.getValueByPath(fromObject, [\n 'numberOfVideos',\n ]);\n if (parentObject !== undefined && fromNumberOfVideos != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfVideos,\n );\n }\n\n const fromOutputGcsUri = common.getValueByPath(fromObject, ['outputGcsUri']);\n if (parentObject !== undefined && fromOutputGcsUri != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'storageUri'],\n fromOutputGcsUri,\n );\n }\n\n const fromFps = common.getValueByPath(fromObject, ['fps']);\n if (parentObject !== undefined && fromFps != null) {\n common.setValueByPath(parentObject, ['parameters', 'fps'], fromFps);\n }\n\n const fromDurationSeconds = common.getValueByPath(fromObject, [\n 'durationSeconds',\n ]);\n if (parentObject !== undefined && fromDurationSeconds != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'durationSeconds'],\n fromDurationSeconds,\n );\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (parentObject !== undefined && fromSeed != null) {\n common.setValueByPath(parentObject, ['parameters', 'seed'], fromSeed);\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromResolution = common.getValueByPath(fromObject, ['resolution']);\n if (parentObject !== undefined && fromResolution != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'resolution'],\n fromResolution,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromPubsubTopic = common.getValueByPath(fromObject, ['pubsubTopic']);\n if (parentObject !== undefined && fromPubsubTopic != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'pubsubTopic'],\n fromPubsubTopic,\n );\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n const fromEnhancePrompt = common.getValueByPath(fromObject, [\n 'enhancePrompt',\n ]);\n if (parentObject !== undefined && fromEnhancePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'enhancePrompt'],\n fromEnhancePrompt,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromImage = common.getValueByPath(fromObject, ['image']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['instances[0]', 'image'],\n imageToVertex(apiClient, fromImage),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateVideosConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partFromMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentFromMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function citationMetadataFromMldev(\n apiClient: ApiClient,\n fromObject: types.CitationMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromCitations = common.getValueByPath(fromObject, ['citationSources']);\n if (fromCitations != null) {\n common.setValueByPath(toObject, ['citations'], fromCitations);\n }\n\n return toObject;\n}\n\nexport function candidateFromMldev(\n apiClient: ApiClient,\n fromObject: types.Candidate,\n): Record {\n const toObject: Record = {};\n\n const fromContent = common.getValueByPath(fromObject, ['content']);\n if (fromContent != null) {\n common.setValueByPath(\n toObject,\n ['content'],\n contentFromMldev(apiClient, fromContent),\n );\n }\n\n const fromCitationMetadata = common.getValueByPath(fromObject, [\n 'citationMetadata',\n ]);\n if (fromCitationMetadata != null) {\n common.setValueByPath(\n toObject,\n ['citationMetadata'],\n citationMetadataFromMldev(apiClient, fromCitationMetadata),\n );\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n const fromFinishReason = common.getValueByPath(fromObject, ['finishReason']);\n if (fromFinishReason != null) {\n common.setValueByPath(toObject, ['finishReason'], fromFinishReason);\n }\n\n const fromAvgLogprobs = common.getValueByPath(fromObject, ['avgLogprobs']);\n if (fromAvgLogprobs != null) {\n common.setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);\n }\n\n const fromGroundingMetadata = common.getValueByPath(fromObject, [\n 'groundingMetadata',\n ]);\n if (fromGroundingMetadata != null) {\n common.setValueByPath(\n toObject,\n ['groundingMetadata'],\n fromGroundingMetadata,\n );\n }\n\n const fromIndex = common.getValueByPath(fromObject, ['index']);\n if (fromIndex != null) {\n common.setValueByPath(toObject, ['index'], fromIndex);\n }\n\n const fromLogprobsResult = common.getValueByPath(fromObject, [\n 'logprobsResult',\n ]);\n if (fromLogprobsResult != null) {\n common.setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult);\n }\n\n const fromSafetyRatings = common.getValueByPath(fromObject, [\n 'safetyRatings',\n ]);\n if (fromSafetyRatings != null) {\n common.setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings);\n }\n\n return toObject;\n}\n\nexport function generateContentResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromCandidates = common.getValueByPath(fromObject, ['candidates']);\n if (fromCandidates != null) {\n if (Array.isArray(fromCandidates)) {\n common.setValueByPath(\n toObject,\n ['candidates'],\n fromCandidates.map((item) => {\n return candidateFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['candidates'], fromCandidates);\n }\n }\n\n const fromModelVersion = common.getValueByPath(fromObject, ['modelVersion']);\n if (fromModelVersion != null) {\n common.setValueByPath(toObject, ['modelVersion'], fromModelVersion);\n }\n\n const fromPromptFeedback = common.getValueByPath(fromObject, [\n 'promptFeedback',\n ]);\n if (fromPromptFeedback != null) {\n common.setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingStatisticsFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function contentEmbeddingFromMldev(\n apiClient: ApiClient,\n fromObject: types.ContentEmbedding,\n): Record {\n const toObject: Record = {};\n\n const fromValues = common.getValueByPath(fromObject, ['values']);\n if (fromValues != null) {\n common.setValueByPath(toObject, ['values'], fromValues);\n }\n\n return toObject;\n}\n\nexport function embedContentMetadataFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function embedContentResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromEmbeddings = common.getValueByPath(fromObject, ['embeddings']);\n if (fromEmbeddings != null) {\n if (Array.isArray(fromEmbeddings)) {\n common.setValueByPath(\n toObject,\n ['embeddings'],\n fromEmbeddings.map((item) => {\n return contentEmbeddingFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['embeddings'], fromEmbeddings);\n }\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(\n toObject,\n ['metadata'],\n embedContentMetadataFromMldev(),\n );\n }\n\n return toObject;\n}\n\nexport function imageFromMldev(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromImageBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['imageBytes'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function safetyAttributesFromMldev(\n apiClient: ApiClient,\n fromObject: types.SafetyAttributes,\n): Record {\n const toObject: Record = {};\n\n const fromCategories = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'categories',\n ]);\n if (fromCategories != null) {\n common.setValueByPath(toObject, ['categories'], fromCategories);\n }\n\n const fromScores = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'scores',\n ]);\n if (fromScores != null) {\n common.setValueByPath(toObject, ['scores'], fromScores);\n }\n\n const fromContentType = common.getValueByPath(fromObject, ['contentType']);\n if (fromContentType != null) {\n common.setValueByPath(toObject, ['contentType'], fromContentType);\n }\n\n return toObject;\n}\n\nexport function generatedImageFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedImage,\n): Record {\n const toObject: Record = {};\n\n const fromImage = common.getValueByPath(fromObject, ['_self']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['image'],\n imageFromMldev(apiClient, fromImage),\n );\n }\n\n const fromRaiFilteredReason = common.getValueByPath(fromObject, [\n 'raiFilteredReason',\n ]);\n if (fromRaiFilteredReason != null) {\n common.setValueByPath(\n toObject,\n ['raiFilteredReason'],\n fromRaiFilteredReason,\n );\n }\n\n const fromSafetyAttributes = common.getValueByPath(fromObject, ['_self']);\n if (fromSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['safetyAttributes'],\n safetyAttributesFromMldev(apiClient, fromSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedImages = common.getValueByPath(fromObject, [\n 'predictions',\n ]);\n if (fromGeneratedImages != null) {\n if (Array.isArray(fromGeneratedImages)) {\n common.setValueByPath(\n toObject,\n ['generatedImages'],\n fromGeneratedImages.map((item) => {\n return generatedImageFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedImages'], fromGeneratedImages);\n }\n }\n\n const fromPositivePromptSafetyAttributes = common.getValueByPath(fromObject, [\n 'positivePromptSafetyAttributes',\n ]);\n if (fromPositivePromptSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['positivePromptSafetyAttributes'],\n safetyAttributesFromMldev(apiClient, fromPositivePromptSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function endpointFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function tunedModelInfoFromMldev(\n apiClient: ApiClient,\n fromObject: types.TunedModelInfo,\n): Record {\n const toObject: Record = {};\n\n const fromBaseModel = common.getValueByPath(fromObject, ['baseModel']);\n if (fromBaseModel != null) {\n common.setValueByPath(toObject, ['baseModel'], fromBaseModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n return toObject;\n}\n\nexport function modelFromMldev(\n apiClient: ApiClient,\n fromObject: types.Model,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromVersion = common.getValueByPath(fromObject, ['version']);\n if (fromVersion != null) {\n common.setValueByPath(toObject, ['version'], fromVersion);\n }\n\n const fromTunedModelInfo = common.getValueByPath(fromObject, ['_self']);\n if (fromTunedModelInfo != null) {\n common.setValueByPath(\n toObject,\n ['tunedModelInfo'],\n tunedModelInfoFromMldev(apiClient, fromTunedModelInfo),\n );\n }\n\n const fromInputTokenLimit = common.getValueByPath(fromObject, [\n 'inputTokenLimit',\n ]);\n if (fromInputTokenLimit != null) {\n common.setValueByPath(toObject, ['inputTokenLimit'], fromInputTokenLimit);\n }\n\n const fromOutputTokenLimit = common.getValueByPath(fromObject, [\n 'outputTokenLimit',\n ]);\n if (fromOutputTokenLimit != null) {\n common.setValueByPath(toObject, ['outputTokenLimit'], fromOutputTokenLimit);\n }\n\n const fromSupportedActions = common.getValueByPath(fromObject, [\n 'supportedGenerationMethods',\n ]);\n if (fromSupportedActions != null) {\n common.setValueByPath(toObject, ['supportedActions'], fromSupportedActions);\n }\n\n return toObject;\n}\n\nexport function countTokensResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTotalTokens = common.getValueByPath(fromObject, ['totalTokens']);\n if (fromTotalTokens != null) {\n common.setValueByPath(toObject, ['totalTokens'], fromTotalTokens);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n return toObject;\n}\n\nexport function videoFromMldev(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['video', 'uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'video',\n 'encodedVideo',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['encoding']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromMldev(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, [\n 'generatedSamples',\n ]);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromMldev(apiClient, fromResponse),\n );\n }\n\n const fromResult = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResult != null) {\n common.setValueByPath(\n toObject,\n ['result'],\n generateVideosResponseFromMldev(apiClient, fromResult),\n );\n }\n\n return toObject;\n}\n\nexport function partFromVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentFromVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function citationMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.CitationMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromCitations = common.getValueByPath(fromObject, ['citations']);\n if (fromCitations != null) {\n common.setValueByPath(toObject, ['citations'], fromCitations);\n }\n\n return toObject;\n}\n\nexport function candidateFromVertex(\n apiClient: ApiClient,\n fromObject: types.Candidate,\n): Record {\n const toObject: Record = {};\n\n const fromContent = common.getValueByPath(fromObject, ['content']);\n if (fromContent != null) {\n common.setValueByPath(\n toObject,\n ['content'],\n contentFromVertex(apiClient, fromContent),\n );\n }\n\n const fromCitationMetadata = common.getValueByPath(fromObject, [\n 'citationMetadata',\n ]);\n if (fromCitationMetadata != null) {\n common.setValueByPath(\n toObject,\n ['citationMetadata'],\n citationMetadataFromVertex(apiClient, fromCitationMetadata),\n );\n }\n\n const fromFinishMessage = common.getValueByPath(fromObject, [\n 'finishMessage',\n ]);\n if (fromFinishMessage != null) {\n common.setValueByPath(toObject, ['finishMessage'], fromFinishMessage);\n }\n\n const fromFinishReason = common.getValueByPath(fromObject, ['finishReason']);\n if (fromFinishReason != null) {\n common.setValueByPath(toObject, ['finishReason'], fromFinishReason);\n }\n\n const fromAvgLogprobs = common.getValueByPath(fromObject, ['avgLogprobs']);\n if (fromAvgLogprobs != null) {\n common.setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);\n }\n\n const fromGroundingMetadata = common.getValueByPath(fromObject, [\n 'groundingMetadata',\n ]);\n if (fromGroundingMetadata != null) {\n common.setValueByPath(\n toObject,\n ['groundingMetadata'],\n fromGroundingMetadata,\n );\n }\n\n const fromIndex = common.getValueByPath(fromObject, ['index']);\n if (fromIndex != null) {\n common.setValueByPath(toObject, ['index'], fromIndex);\n }\n\n const fromLogprobsResult = common.getValueByPath(fromObject, [\n 'logprobsResult',\n ]);\n if (fromLogprobsResult != null) {\n common.setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult);\n }\n\n const fromSafetyRatings = common.getValueByPath(fromObject, [\n 'safetyRatings',\n ]);\n if (fromSafetyRatings != null) {\n common.setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings);\n }\n\n return toObject;\n}\n\nexport function generateContentResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromCandidates = common.getValueByPath(fromObject, ['candidates']);\n if (fromCandidates != null) {\n if (Array.isArray(fromCandidates)) {\n common.setValueByPath(\n toObject,\n ['candidates'],\n fromCandidates.map((item) => {\n return candidateFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['candidates'], fromCandidates);\n }\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromResponseId = common.getValueByPath(fromObject, ['responseId']);\n if (fromResponseId != null) {\n common.setValueByPath(toObject, ['responseId'], fromResponseId);\n }\n\n const fromModelVersion = common.getValueByPath(fromObject, ['modelVersion']);\n if (fromModelVersion != null) {\n common.setValueByPath(toObject, ['modelVersion'], fromModelVersion);\n }\n\n const fromPromptFeedback = common.getValueByPath(fromObject, [\n 'promptFeedback',\n ]);\n if (fromPromptFeedback != null) {\n common.setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingStatisticsFromVertex(\n apiClient: ApiClient,\n fromObject: types.ContentEmbeddingStatistics,\n): Record {\n const toObject: Record = {};\n\n const fromTruncated = common.getValueByPath(fromObject, ['truncated']);\n if (fromTruncated != null) {\n common.setValueByPath(toObject, ['truncated'], fromTruncated);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['token_count']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingFromVertex(\n apiClient: ApiClient,\n fromObject: types.ContentEmbedding,\n): Record {\n const toObject: Record = {};\n\n const fromValues = common.getValueByPath(fromObject, ['values']);\n if (fromValues != null) {\n common.setValueByPath(toObject, ['values'], fromValues);\n }\n\n const fromStatistics = common.getValueByPath(fromObject, ['statistics']);\n if (fromStatistics != null) {\n common.setValueByPath(\n toObject,\n ['statistics'],\n contentEmbeddingStatisticsFromVertex(apiClient, fromStatistics),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromBillableCharacterCount = common.getValueByPath(fromObject, [\n 'billableCharacterCount',\n ]);\n if (fromBillableCharacterCount != null) {\n common.setValueByPath(\n toObject,\n ['billableCharacterCount'],\n fromBillableCharacterCount,\n );\n }\n\n return toObject;\n}\n\nexport function embedContentResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromEmbeddings = common.getValueByPath(fromObject, [\n 'predictions[]',\n 'embeddings',\n ]);\n if (fromEmbeddings != null) {\n if (Array.isArray(fromEmbeddings)) {\n common.setValueByPath(\n toObject,\n ['embeddings'],\n fromEmbeddings.map((item) => {\n return contentEmbeddingFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['embeddings'], fromEmbeddings);\n }\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(\n toObject,\n ['metadata'],\n embedContentMetadataFromVertex(apiClient, fromMetadata),\n );\n }\n\n return toObject;\n}\n\nexport function imageFromVertex(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromGcsUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromGcsUri != null) {\n common.setValueByPath(toObject, ['gcsUri'], fromGcsUri);\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['imageBytes'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function safetyAttributesFromVertex(\n apiClient: ApiClient,\n fromObject: types.SafetyAttributes,\n): Record {\n const toObject: Record = {};\n\n const fromCategories = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'categories',\n ]);\n if (fromCategories != null) {\n common.setValueByPath(toObject, ['categories'], fromCategories);\n }\n\n const fromScores = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'scores',\n ]);\n if (fromScores != null) {\n common.setValueByPath(toObject, ['scores'], fromScores);\n }\n\n const fromContentType = common.getValueByPath(fromObject, ['contentType']);\n if (fromContentType != null) {\n common.setValueByPath(toObject, ['contentType'], fromContentType);\n }\n\n return toObject;\n}\n\nexport function generatedImageFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedImage,\n): Record {\n const toObject: Record = {};\n\n const fromImage = common.getValueByPath(fromObject, ['_self']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['image'],\n imageFromVertex(apiClient, fromImage),\n );\n }\n\n const fromRaiFilteredReason = common.getValueByPath(fromObject, [\n 'raiFilteredReason',\n ]);\n if (fromRaiFilteredReason != null) {\n common.setValueByPath(\n toObject,\n ['raiFilteredReason'],\n fromRaiFilteredReason,\n );\n }\n\n const fromSafetyAttributes = common.getValueByPath(fromObject, ['_self']);\n if (fromSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['safetyAttributes'],\n safetyAttributesFromVertex(apiClient, fromSafetyAttributes),\n );\n }\n\n const fromEnhancedPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromEnhancedPrompt != null) {\n common.setValueByPath(toObject, ['enhancedPrompt'], fromEnhancedPrompt);\n }\n\n return toObject;\n}\n\nexport function generateImagesResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedImages = common.getValueByPath(fromObject, [\n 'predictions',\n ]);\n if (fromGeneratedImages != null) {\n if (Array.isArray(fromGeneratedImages)) {\n common.setValueByPath(\n toObject,\n ['generatedImages'],\n fromGeneratedImages.map((item) => {\n return generatedImageFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedImages'], fromGeneratedImages);\n }\n }\n\n const fromPositivePromptSafetyAttributes = common.getValueByPath(fromObject, [\n 'positivePromptSafetyAttributes',\n ]);\n if (fromPositivePromptSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['positivePromptSafetyAttributes'],\n safetyAttributesFromVertex(apiClient, fromPositivePromptSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function endpointFromVertex(\n apiClient: ApiClient,\n fromObject: types.Endpoint,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['endpoint']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDeployedModelId = common.getValueByPath(fromObject, [\n 'deployedModelId',\n ]);\n if (fromDeployedModelId != null) {\n common.setValueByPath(toObject, ['deployedModelId'], fromDeployedModelId);\n }\n\n return toObject;\n}\n\nexport function tunedModelInfoFromVertex(\n apiClient: ApiClient,\n fromObject: types.TunedModelInfo,\n): Record {\n const toObject: Record = {};\n\n const fromBaseModel = common.getValueByPath(fromObject, [\n 'labels',\n 'google-vertex-llm-tuning-base-model-id',\n ]);\n if (fromBaseModel != null) {\n common.setValueByPath(toObject, ['baseModel'], fromBaseModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n return toObject;\n}\n\nexport function modelFromVertex(\n apiClient: ApiClient,\n fromObject: types.Model,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromVersion = common.getValueByPath(fromObject, ['versionId']);\n if (fromVersion != null) {\n common.setValueByPath(toObject, ['version'], fromVersion);\n }\n\n const fromEndpoints = common.getValueByPath(fromObject, ['deployedModels']);\n if (fromEndpoints != null) {\n if (Array.isArray(fromEndpoints)) {\n common.setValueByPath(\n toObject,\n ['endpoints'],\n fromEndpoints.map((item) => {\n return endpointFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['endpoints'], fromEndpoints);\n }\n }\n\n const fromLabels = common.getValueByPath(fromObject, ['labels']);\n if (fromLabels != null) {\n common.setValueByPath(toObject, ['labels'], fromLabels);\n }\n\n const fromTunedModelInfo = common.getValueByPath(fromObject, ['_self']);\n if (fromTunedModelInfo != null) {\n common.setValueByPath(\n toObject,\n ['tunedModelInfo'],\n tunedModelInfoFromVertex(apiClient, fromTunedModelInfo),\n );\n }\n\n return toObject;\n}\n\nexport function countTokensResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTotalTokens = common.getValueByPath(fromObject, ['totalTokens']);\n if (fromTotalTokens != null) {\n common.setValueByPath(toObject, ['totalTokens'], fromTotalTokens);\n }\n\n return toObject;\n}\n\nexport function computeTokensResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.ComputeTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTokensInfo = common.getValueByPath(fromObject, ['tokensInfo']);\n if (fromTokensInfo != null) {\n common.setValueByPath(toObject, ['tokensInfo'], fromTokensInfo);\n }\n\n return toObject;\n}\n\nexport function videoFromVertex(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromVertex(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, ['videos']);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromVertex(apiClient, fromResponse),\n );\n }\n\n const fromResult = common.getValueByPath(fromObject, ['response']);\n if (fromResult != null) {\n common.setValueByPath(\n toObject,\n ['result'],\n generateVideosResponseFromVertex(apiClient, fromResult),\n );\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as types from '../types';\nimport {\n contentFromMldev,\n contentFromVertex,\n contentToMldev,\n contentToVertex,\n toolToMldev,\n toolToVertex,\n} from './_models_converters';\n\n/**\n * Converters for live client.\n */\n\nexport function liveConnectParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveConnectParameters,\n): types.LiveClientMessage {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig !== undefined && fromConfig !== null) {\n common.setValueByPath(\n toObject,\n ['setup'],\n liveConnectConfigToMldev(apiClient, fromConfig),\n );\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel !== undefined) {\n common.setValueByPath(toObject, ['setup', 'model'], fromModel);\n }\n\n return toObject;\n}\n\nexport function liveConnectParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveConnectParameters,\n): types.LiveClientMessage {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig !== undefined && fromConfig !== null) {\n common.setValueByPath(\n toObject,\n ['setup'],\n liveConnectConfigToVertex(apiClient, fromConfig),\n );\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel !== undefined) {\n common.setValueByPath(toObject, ['setup', 'model'], fromModel);\n }\n\n return toObject;\n}\n\nexport function liveServerMessageFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerMessage,\n): types.LiveServerMessage {\n const toObject: Record = {};\n\n const fromSetupComplete = common.getValueByPath(fromObject, [\n 'setupComplete',\n ]);\n if (fromSetupComplete !== undefined) {\n common.setValueByPath(toObject, ['setupComplete'], fromSetupComplete);\n }\n\n const fromServerContent = common.getValueByPath(fromObject, [\n 'serverContent',\n ]);\n if (fromServerContent !== undefined && fromServerContent !== null) {\n common.setValueByPath(\n toObject,\n ['serverContent'],\n liveServerContentFromMldev(apiClient, fromServerContent),\n );\n }\n\n const fromToolCall = common.getValueByPath(fromObject, ['toolCall']);\n if (fromToolCall !== undefined && fromToolCall !== null) {\n common.setValueByPath(\n toObject,\n ['toolCall'],\n liveServerToolCallFromMldev(apiClient, fromToolCall),\n );\n }\n\n const fromToolCallCancellation = common.getValueByPath(fromObject, [\n 'toolCallCancellation',\n ]);\n if (\n fromToolCallCancellation !== undefined &&\n fromToolCallCancellation !== null\n ) {\n common.setValueByPath(\n toObject,\n ['toolCallCancellation'],\n liveServerToolCallCancellationFromMldev(\n apiClient,\n fromToolCallCancellation,\n ),\n );\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != undefined && fromUsageMetadata != null) {\n common.setValueByPath(\n toObject,\n ['usageMetadata'],\n usageMetadataFromMldev(apiClient, fromUsageMetadata),\n );\n }\n\n const fromGoAway = common.getValueByPath(fromObject, ['goAway']);\n if (fromGoAway !== undefined && fromGoAway !== null) {\n common.setValueByPath(\n toObject,\n ['goAway'],\n liveServerGoAwayFromMldev(fromGoAway),\n );\n }\n\n const fromSessionResumptionUpdate = common.getValueByPath(fromObject, [\n 'sessionResumptionUpdate',\n ]);\n if (\n fromSessionResumptionUpdate !== undefined &&\n fromSessionResumptionUpdate !== null\n ) {\n common.setValueByPath(\n toObject,\n ['sessionResumptionUpdate'],\n liveServerSessionResumptionUpdateFromMldev(fromSessionResumptionUpdate),\n );\n }\n\n return toObject;\n}\n\nexport function liveServerMessageFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerMessage,\n): types.LiveServerMessage {\n const toObject: Record = {};\n\n const fromSetupComplete = common.getValueByPath(fromObject, [\n 'setupComplete',\n ]);\n if (fromSetupComplete !== undefined) {\n common.setValueByPath(toObject, ['setupComplete'], fromSetupComplete);\n }\n\n const fromServerContent = common.getValueByPath(fromObject, [\n 'serverContent',\n ]);\n if (fromServerContent !== undefined && fromServerContent !== null) {\n common.setValueByPath(\n toObject,\n ['serverContent'],\n liveServerContentFromVertex(apiClient, fromServerContent),\n );\n }\n\n const fromToolCall = common.getValueByPath(fromObject, ['toolCall']);\n if (fromToolCall !== undefined && fromToolCall !== null) {\n common.setValueByPath(\n toObject,\n ['toolCall'],\n liveServerToolCallFromVertex(apiClient, fromToolCall),\n );\n }\n\n const fromToolCallCancellation = common.getValueByPath(fromObject, [\n 'toolCallCancellation',\n ]);\n if (\n fromToolCallCancellation !== undefined &&\n fromToolCallCancellation !== null\n ) {\n common.setValueByPath(\n toObject,\n ['toolCallCancellation'],\n liveServerToolCallCancellationFromVertex(\n apiClient,\n fromToolCallCancellation,\n ),\n );\n }\n\n const fromGoAway = common.getValueByPath(fromObject, ['goAway']);\n if (fromGoAway !== undefined && fromGoAway !== null) {\n common.setValueByPath(\n toObject,\n ['goAway'],\n liveServerGoAwayFromVertex(fromGoAway),\n );\n }\n\n const fromSessionResumptionUpdate = common.getValueByPath(fromObject, [\n 'sessionResumptionUpdate',\n ]);\n if (\n fromSessionResumptionUpdate !== undefined &&\n fromSessionResumptionUpdate !== null\n ) {\n common.setValueByPath(\n toObject,\n ['sessionResumptionUpdate'],\n liveServerSessionResumptionUpdateFromVertex(fromSessionResumptionUpdate),\n );\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != undefined && fromUsageMetadata != null) {\n common.setValueByPath(\n toObject,\n ['usageMetadata'],\n usageMetadataFromVertex(apiClient, fromUsageMetadata),\n );\n }\n\n return toObject;\n}\n\nfunction slidingWindowToMldev(\n fromObject: types.SlidingWindow,\n): types.SlidingWindow {\n const toObject: Record = {};\n\n const fromTargetTokens = common.getValueByPath(fromObject, ['targetTokens']);\n if (fromTargetTokens !== undefined && fromTargetTokens !== null) {\n common.setValueByPath(toObject, ['targetTokens'], fromTargetTokens);\n }\n\n return toObject;\n}\n\nfunction slidingWindowToVertex(\n fromObject: types.SlidingWindow,\n): types.SlidingWindow {\n const toObject: Record = {};\n\n const fromTargetTokens = common.getValueByPath(fromObject, ['targetTokens']);\n if (fromTargetTokens !== undefined && fromTargetTokens !== null) {\n common.setValueByPath(toObject, ['targetTokens'], fromTargetTokens);\n }\n\n return toObject;\n}\n\nfunction contextWindowCompressionToMldev(\n fromObject: types.ContextWindowCompressionConfig,\n): types.ContextWindowCompressionConfig {\n const toObject: Record = {};\n\n const fromTriggerTokens = common.getValueByPath(fromObject, [\n 'triggerTokens',\n ]);\n if (fromTriggerTokens !== undefined && fromTriggerTokens !== null) {\n common.setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);\n }\n\n const fromSlidingWindow = common.getValueByPath(fromObject, [\n 'slidingWindow',\n ]);\n if (fromSlidingWindow !== undefined && fromSlidingWindow !== null) {\n common.setValueByPath(\n toObject,\n ['slidingWindow'],\n slidingWindowToMldev(fromSlidingWindow),\n );\n }\n\n return toObject;\n}\n\nfunction contextWindowCompressionToVertex(\n fromObject: types.ContextWindowCompressionConfig,\n): types.ContextWindowCompressionConfig {\n const toObject: Record = {};\n\n const fromTriggerTokens = common.getValueByPath(fromObject, [\n 'triggerTokens',\n ]);\n if (fromTriggerTokens !== undefined && fromTriggerTokens !== null) {\n common.setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);\n }\n\n const fromSlidingWindow = common.getValueByPath(fromObject, [\n 'slidingWindow',\n ]);\n if (fromSlidingWindow !== undefined && fromSlidingWindow !== null) {\n common.setValueByPath(\n toObject,\n ['slidingWindow'],\n slidingWindowToVertex(fromSlidingWindow),\n );\n }\n\n return toObject;\n}\n\nfunction automaticActivityDetectionToMldev(\n fromObject: types.AutomaticActivityDetection,\n): types.AutomaticActivityDetection {\n const toObject: Record = {};\n\n const fromDisabled = common.getValueByPath(fromObject, ['disabled']);\n if (fromDisabled !== undefined && fromDisabled !== null) {\n common.setValueByPath(toObject, ['disabled'], fromDisabled);\n }\n\n const fromStartOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'startOfSpeechSensitivity',\n ]);\n if (\n fromStartOfSpeechSensitivity !== undefined &&\n fromStartOfSpeechSensitivity !== null\n ) {\n common.setValueByPath(\n toObject,\n ['startOfSpeechSensitivity'],\n fromStartOfSpeechSensitivity,\n );\n }\n\n const fromEndOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'endOfSpeechSensitivity',\n ]);\n if (\n fromEndOfSpeechSensitivity !== undefined &&\n fromEndOfSpeechSensitivity !== null\n ) {\n common.setValueByPath(\n toObject,\n ['endOfSpeechSensitivity'],\n fromEndOfSpeechSensitivity,\n );\n }\n\n const fromPrefixPaddingMs = common.getValueByPath(fromObject, [\n 'prefixPaddingMs',\n ]);\n if (fromPrefixPaddingMs !== undefined && fromPrefixPaddingMs !== null) {\n common.setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);\n }\n\n const fromSilenceDurationMs = common.getValueByPath(fromObject, [\n 'silenceDurationMs',\n ]);\n if (fromSilenceDurationMs !== undefined && fromSilenceDurationMs !== null) {\n common.setValueByPath(\n toObject,\n ['silenceDurationMs'],\n fromSilenceDurationMs,\n );\n }\n\n return toObject;\n}\n\nfunction automaticActivityDetectionToVertex(\n fromObject: types.AutomaticActivityDetection,\n): types.AutomaticActivityDetection {\n const toObject: Record = {};\n\n const fromDisabled = common.getValueByPath(fromObject, ['disabled']);\n if (fromDisabled !== undefined && fromDisabled !== null) {\n common.setValueByPath(toObject, ['disabled'], fromDisabled);\n }\n\n const fromStartOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'startOfSpeechSensitivity',\n ]);\n if (\n fromStartOfSpeechSensitivity !== undefined &&\n fromStartOfSpeechSensitivity !== null\n ) {\n common.setValueByPath(\n toObject,\n ['startOfSpeechSensitivity'],\n fromStartOfSpeechSensitivity,\n );\n }\n\n const fromEndOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'endOfSpeechSensitivity',\n ]);\n if (\n fromEndOfSpeechSensitivity !== undefined &&\n fromEndOfSpeechSensitivity !== null\n ) {\n common.setValueByPath(\n toObject,\n ['endOfSpeechSensitivity'],\n fromEndOfSpeechSensitivity,\n );\n }\n\n const fromPrefixPaddingMs = common.getValueByPath(fromObject, [\n 'prefixPaddingMs',\n ]);\n if (fromPrefixPaddingMs !== undefined && fromPrefixPaddingMs !== null) {\n common.setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);\n }\n\n const fromSilenceDurationMs = common.getValueByPath(fromObject, [\n 'silenceDurationMs',\n ]);\n if (fromSilenceDurationMs !== undefined && fromSilenceDurationMs !== null) {\n common.setValueByPath(\n toObject,\n ['silenceDurationMs'],\n fromSilenceDurationMs,\n );\n }\n\n return toObject;\n}\n\nfunction realtimeInputConfigToMldev(\n fromObject: types.RealtimeInputConfig,\n): types.RealtimeInputConfig {\n const toObject: Record = {};\n\n const fromAutomaticActivityDetection = common.getValueByPath(fromObject, [\n 'automaticActivityDetection',\n ]);\n if (\n fromAutomaticActivityDetection !== undefined &&\n fromAutomaticActivityDetection !== null\n ) {\n common.setValueByPath(\n toObject,\n ['automaticActivityDetection'],\n automaticActivityDetectionToMldev(fromAutomaticActivityDetection),\n );\n }\n\n const fromActivityHandling = common.getValueByPath(fromObject, [\n 'activityHandling',\n ]);\n if (fromActivityHandling !== undefined && fromActivityHandling !== null) {\n common.setValueByPath(toObject, ['activityHandling'], fromActivityHandling);\n }\n\n const fromTurnCoverage = common.getValueByPath(fromObject, ['turnCoverage']);\n if (fromTurnCoverage !== undefined && fromTurnCoverage !== null) {\n common.setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);\n }\n\n return toObject;\n}\n\nfunction realtimeInputConfigToVertex(\n fromObject: types.RealtimeInputConfig,\n): types.RealtimeInputConfig {\n const toObject: Record = {};\n\n const fromAutomaticActivityDetection = common.getValueByPath(fromObject, [\n 'automaticActivityDetection',\n ]);\n if (\n fromAutomaticActivityDetection !== undefined &&\n fromAutomaticActivityDetection !== null\n ) {\n common.setValueByPath(\n toObject,\n ['automaticActivityDetection'],\n automaticActivityDetectionToVertex(fromAutomaticActivityDetection),\n );\n }\n\n const fromActivityHandling = common.getValueByPath(fromObject, [\n 'activityHandling',\n ]);\n if (fromActivityHandling !== undefined && fromActivityHandling !== null) {\n common.setValueByPath(toObject, ['activityHandling'], fromActivityHandling);\n }\n\n const fromTurnCoverage = common.getValueByPath(fromObject, ['turnCoverage']);\n if (fromTurnCoverage !== undefined && fromTurnCoverage !== null) {\n common.setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);\n }\n\n return toObject;\n}\n\nfunction liveConnectConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveConnectConfig,\n): types.LiveClientSetup {\n const toObject: Record = {};\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (fromGenerationConfig !== undefined) {\n common.setValueByPath(toObject, ['generationConfig'], fromGenerationConfig);\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities !== undefined) {\n common.setValueByPath(\n toObject,\n ['generationConfig', 'responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig !== undefined) {\n common.setValueByPath(\n toObject,\n ['generationConfig', 'speechConfig'],\n fromSpeechConfig,\n );\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (fromSystemInstruction !== undefined && fromSystemInstruction !== null) {\n common.setValueByPath(\n toObject,\n ['systemInstruction'],\n contentToMldev(apiClient, fromSystemInstruction),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (\n fromTools !== undefined &&\n fromTools !== null &&\n Array.isArray(fromTools)\n ) {\n common.setValueByPath(\n toObject,\n ['tools'],\n fromTools.map((item: types.Tool) => {\n return toolToMldev(apiClient, item);\n }),\n );\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (fromSessionResumption !== undefined && fromSessionResumption !== null) {\n common.setValueByPath(\n toObject,\n ['sessionResumption'],\n liveClientSessionResumptionConfigToMldev(fromSessionResumption),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (\n fromContextWindowCompression !== undefined &&\n fromContextWindowCompression !== null\n ) {\n common.setValueByPath(\n toObject,\n ['contextWindowCompression'],\n contextWindowCompressionToMldev(fromContextWindowCompression),\n );\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (\n fromRealtimeInputConfig !== undefined &&\n fromRealtimeInputConfig !== null\n ) {\n common.setValueByPath(\n toObject,\n ['realtimeInputConfig'],\n realtimeInputConfigToMldev(fromRealtimeInputConfig),\n );\n }\n\n return toObject;\n}\n\nfunction liveConnectConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveConnectConfig,\n): types.LiveClientSetup {\n const toObject: Record = {};\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (fromGenerationConfig !== undefined) {\n common.setValueByPath(toObject, ['generationConfig'], fromGenerationConfig);\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities !== undefined) {\n common.setValueByPath(\n toObject,\n ['generationConfig', 'responseModalities'],\n fromResponseModalities,\n );\n } else {\n // Set default to AUDIO to align with MLDev API.\n common.setValueByPath(\n toObject,\n ['generationConfig', 'responseModalities'],\n ['AUDIO'],\n );\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig !== undefined) {\n common.setValueByPath(\n toObject,\n ['generationConfig', 'speechConfig'],\n fromSpeechConfig,\n );\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (fromSystemInstruction !== undefined && fromSystemInstruction !== null) {\n common.setValueByPath(\n toObject,\n ['systemInstruction'],\n contentToVertex(apiClient, fromSystemInstruction),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (\n fromTools !== undefined &&\n fromTools !== null &&\n Array.isArray(fromTools)\n ) {\n common.setValueByPath(\n toObject,\n ['tools'],\n fromTools.map((item: types.Tool) => {\n return toolToVertex(apiClient, item);\n }),\n );\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (fromSessionResumption !== undefined && fromSessionResumption !== null) {\n common.setValueByPath(\n toObject,\n ['sessionResumption'],\n liveClientSessionResumptionConfigToVertex(fromSessionResumption),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (\n fromContextWindowCompression !== undefined &&\n fromContextWindowCompression !== null\n ) {\n common.setValueByPath(\n toObject,\n ['contextWindowCompression'],\n contextWindowCompressionToVertex(fromContextWindowCompression),\n );\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (\n fromRealtimeInputConfig !== undefined &&\n fromRealtimeInputConfig !== null\n ) {\n common.setValueByPath(\n toObject,\n ['realtimeInputConfig'],\n realtimeInputConfigToVertex(fromRealtimeInputConfig),\n );\n }\n\n return toObject;\n}\n\nfunction liveServerContentFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerContent,\n): types.LiveServerContent {\n const toObject: Record = {};\n\n const fromModelTurn = common.getValueByPath(fromObject, ['modelTurn']);\n if (fromModelTurn !== undefined && fromModelTurn !== null) {\n common.setValueByPath(\n toObject,\n ['modelTurn'],\n contentFromMldev(apiClient, fromModelTurn),\n );\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete !== undefined) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n const fromInterrupted = common.getValueByPath(fromObject, ['interrupted']);\n if (fromInterrupted !== undefined) {\n common.setValueByPath(toObject, ['interrupted'], fromInterrupted);\n }\n\n const fromGenerationComplete = common.getValueByPath(fromObject, [\n 'generationComplete',\n ]);\n if (fromGenerationComplete != null) {\n common.setValueByPath(\n toObject,\n ['generationComplete'],\n fromGenerationComplete,\n );\n }\n\n return toObject;\n}\n\nfunction liveServerContentFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerContent,\n): types.LiveServerContent {\n const toObject: Record = {};\n\n const fromModelTurn = common.getValueByPath(fromObject, ['modelTurn']);\n if (fromModelTurn !== undefined && fromModelTurn !== null) {\n common.setValueByPath(\n toObject,\n ['modelTurn'],\n contentFromVertex(apiClient, fromModelTurn),\n );\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete !== undefined) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n const fromInterrupted = common.getValueByPath(fromObject, ['interrupted']);\n if (fromInterrupted !== undefined) {\n common.setValueByPath(toObject, ['interrupted'], fromInterrupted);\n }\n\n const fromGenerationComplete = common.getValueByPath(fromObject, [\n 'generationComplete',\n ]);\n if (fromGenerationComplete != null) {\n common.setValueByPath(\n toObject,\n ['generationComplete'],\n fromGenerationComplete,\n );\n }\n return toObject;\n}\n\nfunction functionCallFromMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCall,\n): types.FunctionCall {\n const toObject: Record = {};\n\n const fromId = common.getValueByPath(fromObject, ['id']);\n if (fromId !== undefined) {\n common.setValueByPath(toObject, ['id'], fromId);\n }\n\n const fromArgs = common.getValueByPath(fromObject, ['args']);\n if (fromArgs !== undefined) {\n common.setValueByPath(toObject, ['args'], fromArgs);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName !== undefined) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n return toObject;\n}\n\nfunction functionCallFromVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCall,\n): types.FunctionCall {\n const toObject: Record = {};\n\n const fromArgs = common.getValueByPath(fromObject, ['args']);\n if (fromArgs !== undefined) {\n common.setValueByPath(toObject, ['args'], fromArgs);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName !== undefined) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n return toObject;\n}\n\nfunction liveServerToolCallFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCall,\n): types.LiveServerToolCall {\n const toObject: Record = {};\n\n const fromFunctionCalls = common.getValueByPath(fromObject, [\n 'functionCalls',\n ]);\n if (\n fromFunctionCalls !== undefined &&\n fromFunctionCalls !== null &&\n Array.isArray(fromFunctionCalls)\n ) {\n common.setValueByPath(\n toObject,\n ['functionCalls'],\n fromFunctionCalls.map((item: types.FunctionCall) => {\n return functionCallFromMldev(apiClient, item);\n }),\n );\n }\n\n return toObject;\n}\n\nfunction liveServerToolCallFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCall,\n): types.LiveServerToolCall {\n const toObject: Record = {};\n\n const fromFunctionCalls = common.getValueByPath(fromObject, [\n 'functionCalls',\n ]);\n if (\n fromFunctionCalls !== undefined &&\n fromFunctionCalls !== null &&\n Array.isArray(fromFunctionCalls)\n ) {\n common.setValueByPath(\n toObject,\n ['functionCalls'],\n fromFunctionCalls.map((item: types.FunctionCall) => {\n return functionCallFromVertex(apiClient, item);\n }),\n );\n }\n\n return toObject;\n}\n\nfunction liveServerToolCallCancellationFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCallCancellation,\n): types.LiveServerToolCallCancellation {\n const toObject: Record = {};\n\n const fromIds = common.getValueByPath(fromObject, ['ids']);\n if (fromIds !== undefined) {\n common.setValueByPath(toObject, ['ids'], fromIds);\n }\n\n return toObject;\n}\n\nfunction liveServerToolCallCancellationFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCallCancellation,\n): types.LiveServerToolCallCancellation {\n const toObject: Record = {};\n\n const fromIds = common.getValueByPath(fromObject, ['ids']);\n if (fromIds !== undefined) {\n common.setValueByPath(toObject, ['ids'], fromIds);\n }\n\n return toObject;\n}\n\nfunction liveServerGoAwayFromMldev(\n fromObject: types.LiveServerGoAway,\n): types.LiveServerGoAway {\n const toObject: Record = {};\n\n const fromTimeLeft = common.getValueByPath(fromObject, ['timeLeft']);\n if (fromTimeLeft !== undefined) {\n common.setValueByPath(toObject, ['timeLeft'], fromTimeLeft);\n }\n\n return toObject;\n}\n\nfunction liveServerGoAwayFromVertex(\n fromObject: types.LiveServerGoAway,\n): types.LiveServerGoAway {\n const toObject: Record = {};\n\n const fromTimeLeft = common.getValueByPath(fromObject, ['timeLeft']);\n if (fromTimeLeft !== undefined) {\n common.setValueByPath(toObject, ['timeLeft'], fromTimeLeft);\n }\n\n return toObject;\n}\n\nfunction liveServerSessionResumptionUpdateFromMldev(\n fromObject: types.LiveServerSessionResumptionUpdate,\n): types.LiveServerSessionResumptionUpdate {\n const toObject: Record = {};\n\n const fromNewHandle = common.getValueByPath(fromObject, ['newHandle']);\n if (fromNewHandle !== undefined) {\n common.setValueByPath(toObject, ['newHandle'], fromNewHandle);\n }\n\n const fromResumable = common.getValueByPath(fromObject, ['resumable']);\n if (fromResumable !== undefined) {\n common.setValueByPath(toObject, ['resumable'], fromResumable);\n }\n\n const fromLastConsumedClientMessageIndex = common.getValueByPath(fromObject, [\n 'lastConsumedClientMessageIndex',\n ]);\n if (fromLastConsumedClientMessageIndex !== undefined) {\n common.setValueByPath(\n toObject,\n ['lastConsumedClientMessageIndex'],\n fromLastConsumedClientMessageIndex,\n );\n }\n\n return toObject;\n}\n\nfunction liveServerSessionResumptionUpdateFromVertex(\n fromObject: types.LiveServerSessionResumptionUpdate,\n): types.LiveServerSessionResumptionUpdate {\n const toObject: Record = {};\n\n const fromNewHandle = common.getValueByPath(fromObject, ['newHandle']);\n if (fromNewHandle !== undefined) {\n common.setValueByPath(toObject, ['newHandle'], fromNewHandle);\n }\n\n const fromResumable = common.getValueByPath(fromObject, ['resumable']);\n if (fromResumable !== undefined) {\n common.setValueByPath(toObject, ['resumable'], fromResumable);\n }\n\n const fromLastConsumedClientMessageIndex = common.getValueByPath(fromObject, [\n 'lastConsumedClientMessageIndex',\n ]);\n if (fromLastConsumedClientMessageIndex !== undefined) {\n common.setValueByPath(\n toObject,\n ['lastConsumedClientMessageIndex'],\n fromLastConsumedClientMessageIndex,\n );\n }\n\n return toObject;\n}\n\nfunction liveClientSessionResumptionConfigToMldev(\n fromObject: types.SessionResumptionConfig,\n): types.SessionResumptionConfig {\n const toObject: Record = {};\n\n const fromHandle = common.getValueByPath(fromObject, ['handle']);\n if (fromHandle !== undefined) {\n common.setValueByPath(toObject, ['handle'], fromHandle);\n }\n\n if (common.getValueByPath(fromObject, ['transparent']) !== undefined) {\n throw new Error('transparent parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nfunction liveClientSessionResumptionConfigToVertex(\n fromObject: types.SessionResumptionConfig,\n): types.SessionResumptionConfig {\n const toObject: Record = {};\n\n const fromHandle = common.getValueByPath(fromObject, ['handle']);\n if (fromHandle !== undefined) {\n common.setValueByPath(toObject, ['handle'], fromHandle);\n }\n\n const fromTransparent = common.getValueByPath(fromObject, ['transparent']);\n if (fromTransparent !== undefined) {\n common.setValueByPath(toObject, ['transparent'], fromTransparent);\n }\n\n return toObject;\n}\n\nexport function modalityTokenCountFromMldev(\n apiClient: ApiClient,\n fromObject: types.ModalityTokenCount,\n): types.ModalityTokenCount {\n const toObject: Record = {};\n\n const fromModality = common.getValueByPath(fromObject, ['modality']);\n if (fromModality != null) {\n common.setValueByPath(toObject, ['modality'], fromModality);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function usageMetadataFromMldev(\n apiClient: ApiClient,\n fromObject: types.UsageMetadata,\n): types.UsageMetadata {\n const toObject: Record = {};\n\n const fromPromptTokenCount = common.getValueByPath(fromObject, [\n 'promptTokenCount',\n ]);\n if (fromPromptTokenCount != null) {\n common.setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n const fromResponseTokenCount = common.getValueByPath(fromObject, [\n 'responseTokenCount',\n ]);\n if (fromResponseTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['responseTokenCount'],\n fromResponseTokenCount,\n );\n }\n\n const fromToolUsePromptTokenCount = common.getValueByPath(fromObject, [\n 'toolUsePromptTokenCount',\n ]);\n if (fromToolUsePromptTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokenCount'],\n fromToolUsePromptTokenCount,\n );\n }\n\n const fromThoughtsTokenCount = common.getValueByPath(fromObject, [\n 'thoughtsTokenCount',\n ]);\n if (fromThoughtsTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['thoughtsTokenCount'],\n fromThoughtsTokenCount,\n );\n }\n\n const fromTotalTokenCount = common.getValueByPath(fromObject, [\n 'totalTokenCount',\n ]);\n if (fromTotalTokenCount != null) {\n common.setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);\n }\n\n const fromPromptTokensDetails = common.getValueByPath(fromObject, [\n 'promptTokensDetails',\n ]);\n if (fromPromptTokensDetails != null) {\n if (Array.isArray(fromPromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails,\n );\n }\n }\n\n const fromCacheTokensDetails = common.getValueByPath(fromObject, [\n 'cacheTokensDetails',\n ]);\n if (fromCacheTokensDetails != null) {\n if (Array.isArray(fromCacheTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails,\n );\n }\n }\n\n const fromResponseTokensDetails = common.getValueByPath(fromObject, [\n 'responseTokensDetails',\n ]);\n if (fromResponseTokensDetails != null) {\n if (Array.isArray(fromResponseTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails,\n );\n }\n }\n\n const fromToolUsePromptTokensDetails = common.getValueByPath(fromObject, [\n 'toolUsePromptTokensDetails',\n ]);\n if (fromToolUsePromptTokensDetails != null) {\n if (Array.isArray(fromToolUsePromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails,\n );\n }\n }\n\n return toObject;\n}\n\nexport function modalityTokenCountFromVertex(\n apiClient: ApiClient,\n fromObject: types.ModalityTokenCount,\n): types.ModalityTokenCount {\n const toObject: Record = {};\n\n const fromModality = common.getValueByPath(fromObject, ['modality']);\n if (fromModality != null) {\n common.setValueByPath(toObject, ['modality'], fromModality);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function usageMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.UsageMetadata,\n): types.UsageMetadata {\n const toObject: Record = {};\n\n const fromPromptTokenCount = common.getValueByPath(fromObject, [\n 'promptTokenCount',\n ]);\n if (fromPromptTokenCount != null) {\n common.setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n const fromResponseTokenCount = common.getValueByPath(fromObject, [\n 'candidatesTokenCount',\n ]);\n if (fromResponseTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['responseTokenCount'],\n fromResponseTokenCount,\n );\n }\n\n const fromToolUsePromptTokenCount = common.getValueByPath(fromObject, [\n 'toolUsePromptTokenCount',\n ]);\n if (fromToolUsePromptTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokenCount'],\n fromToolUsePromptTokenCount,\n );\n }\n\n const fromThoughtsTokenCount = common.getValueByPath(fromObject, [\n 'thoughtsTokenCount',\n ]);\n if (fromThoughtsTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['thoughtsTokenCount'],\n fromThoughtsTokenCount,\n );\n }\n\n const fromTotalTokenCount = common.getValueByPath(fromObject, [\n 'totalTokenCount',\n ]);\n if (fromTotalTokenCount != null) {\n common.setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);\n }\n\n const fromPromptTokensDetails = common.getValueByPath(fromObject, [\n 'promptTokensDetails',\n ]);\n if (fromPromptTokensDetails != null) {\n if (Array.isArray(fromPromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails,\n );\n }\n }\n\n const fromCacheTokensDetails = common.getValueByPath(fromObject, [\n 'cacheTokensDetails',\n ]);\n if (fromCacheTokensDetails != null) {\n if (Array.isArray(fromCacheTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails,\n );\n }\n }\n\n const fromToolUsePromptTokensDetails = common.getValueByPath(fromObject, [\n 'toolUsePromptTokensDetails',\n ]);\n if (fromToolUsePromptTokensDetails != null) {\n if (Array.isArray(fromToolUsePromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails,\n );\n }\n }\n\n const fromResponseTokensDetails = common.getValueByPath(fromObject, [\n 'candidatesTokensDetails',\n ]);\n if (fromResponseTokensDetails != null) {\n if (Array.isArray(fromResponseTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails,\n );\n }\n }\n\n const fromTrafficType = common.getValueByPath(fromObject, ['trafficType']);\n if (fromTrafficType != null) {\n common.setValueByPath(toObject, ['trafficType'], fromTrafficType);\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Live client.\n *\n * @experimental\n */\n\nimport {ApiClient} from './_api_client';\nimport {Auth} from './_auth';\nimport * as t from './_transformers';\nimport {WebSocket, WebSocketCallbacks, WebSocketFactory} from './_websocket';\nimport * as converters from './converters/_live_converters';\nimport {contentToMldev, contentToVertex} from './converters/_models_converters';\nimport * as types from './types';\n\nconst FUNCTION_RESPONSE_REQUIRES_ID =\n 'FunctionResponse request must have an `id` field from the response of a ToolCall.FunctionalCalls in Google AI.';\n\n/**\n * Handles incoming messages from the WebSocket.\n *\n * @remarks\n * This function is responsible for parsing incoming messages, transforming them\n * into LiveServerMessages, and then calling the onmessage callback. Note that\n * the first message which is received from the server is a setupComplete\n * message.\n *\n * @param apiClient The ApiClient instance.\n * @param onmessage The user-provided onmessage callback (if any).\n * @param event The MessageEvent from the WebSocket.\n */\nasync function handleWebSocketMessage(\n apiClient: ApiClient,\n onmessage: (msg: types.LiveServerMessage) => void,\n event: MessageEvent,\n): Promise {\n let serverMessage: types.LiveServerMessage;\n let data: types.LiveServerMessage;\n if (event.data instanceof Blob) {\n data = JSON.parse(await event.data.text()) as types.LiveServerMessage;\n } else {\n data = JSON.parse(event.data) as types.LiveServerMessage;\n }\n if (apiClient.isVertexAI()) {\n serverMessage = converters.liveServerMessageFromVertex(apiClient, data);\n } else {\n serverMessage = converters.liveServerMessageFromMldev(apiClient, data);\n }\n\n onmessage(serverMessage);\n}\n\n/**\n Live class encapsulates the configuration for live interaction with the\n Generative Language API. It embeds ApiClient for general API settings.\n\n @experimental\n */\nexport class Live {\n constructor(\n private readonly apiClient: ApiClient,\n private readonly auth: Auth,\n private readonly webSocketFactory: WebSocketFactory,\n ) {}\n\n /**\n Establishes a connection to the specified model with the given\n configuration and returns a Session object representing that connection.\n\n @experimental\n\n @remarks\n If using the Gemini API, Live is currently only supported behind API\n version `v1alpha`. Ensure that the API version is set to `v1alpha` when\n initializing the SDK if relying on the Gemini API.\n\n @param params - The parameters for establishing a connection to the model.\n @return A live session.\n\n @example\n ```ts\n const session = await ai.live.connect({\n model: 'gemini-2.0-flash-exp',\n config: {\n responseModalities: [Modality.AUDIO],\n },\n callbacks: {\n onopen: () => {\n console.log('Connected to the socket.');\n },\n onmessage: (e: MessageEvent) => {\n console.log('Received message from the server: %s\\n', debug(e.data));\n },\n onerror: (e: ErrorEvent) => {\n console.log('Error occurred: %s\\n', debug(e.error));\n },\n onclose: (e: CloseEvent) => {\n console.log('Connection closed.');\n },\n },\n });\n ```\n */\n async connect(params: types.LiveConnectParameters): Promise {\n const websocketBaseUrl = this.apiClient.getWebsocketBaseUrl();\n const apiVersion = this.apiClient.getApiVersion();\n let url: string;\n const headers = mapToHeaders(this.apiClient.getDefaultHeaders());\n if (this.apiClient.isVertexAI()) {\n url = `${websocketBaseUrl}/ws/google.cloud.aiplatform.${\n apiVersion\n }.LlmBidiService/BidiGenerateContent`;\n await this.auth.addAuthHeaders(headers);\n } else {\n const apiKey = this.apiClient.getApiKey();\n url = `${websocketBaseUrl}/ws/google.ai.generativelanguage.${\n apiVersion\n }.GenerativeService.BidiGenerateContent?key=${apiKey}`;\n }\n\n let onopenResolve: (value: unknown) => void = () => {};\n const onopenPromise = new Promise((resolve: (value: unknown) => void) => {\n onopenResolve = resolve;\n });\n\n const callbacks: types.LiveCallbacks = params.callbacks;\n\n const onopenAwaitedCallback = function () {\n callbacks?.onopen?.();\n onopenResolve({});\n };\n\n const apiClient = this.apiClient;\n\n const websocketCallbacks: WebSocketCallbacks = {\n onopen: onopenAwaitedCallback,\n onmessage: (event: MessageEvent) => {\n void handleWebSocketMessage(apiClient, callbacks.onmessage, event);\n },\n onerror:\n callbacks?.onerror ??\n function (e: ErrorEvent) {\n void e;\n },\n onclose:\n callbacks?.onclose ??\n function (e: CloseEvent) {\n void e;\n },\n };\n\n const conn = this.webSocketFactory.create(\n url,\n headersToMap(headers),\n websocketCallbacks,\n );\n conn.connect();\n // Wait for the websocket to open before sending requests.\n await onopenPromise;\n\n let transformedModel = t.tModel(this.apiClient, params.model);\n if (\n this.apiClient.isVertexAI() &&\n transformedModel.startsWith('publishers/')\n ) {\n const project = this.apiClient.getProject();\n const location = this.apiClient.getLocation();\n transformedModel =\n `projects/${project}/locations/${location}/` + transformedModel;\n }\n\n let clientMessage: types.LiveClientMessage = {};\n const liveConnectParameters: types.LiveConnectParameters = {\n model: transformedModel,\n config: params.config,\n callbacks: params.callbacks,\n };\n if (this.apiClient.isVertexAI()) {\n clientMessage = converters.liveConnectParametersToVertex(\n this.apiClient,\n liveConnectParameters,\n );\n } else {\n clientMessage = converters.liveConnectParametersToMldev(\n this.apiClient,\n liveConnectParameters,\n );\n }\n conn.send(JSON.stringify(clientMessage));\n return new Session(conn, this.apiClient);\n }\n}\n\nconst defaultLiveSendClientContentParamerters: types.LiveSendClientContentParameters =\n {\n turnComplete: true,\n };\n\n/**\n Represents a connection to the API.\n\n @experimental\n */\nexport class Session {\n constructor(\n readonly conn: WebSocket,\n private readonly apiClient: ApiClient,\n ) {}\n\n private tLiveClientContent(\n apiClient: ApiClient,\n params: types.LiveSendClientContentParameters,\n ): types.LiveClientMessage {\n if (params.turns !== null && params.turns !== undefined) {\n let contents: types.Content[] = [];\n try {\n contents = t.tContents(\n apiClient,\n params.turns as types.ContentListUnion,\n );\n if (apiClient.isVertexAI()) {\n contents = contents.map((item) => contentToVertex(apiClient, item));\n } else {\n contents = contents.map((item) => contentToMldev(apiClient, item));\n }\n } catch {\n throw new Error(\n `Failed to parse client content \"turns\", type: '${typeof params.turns}'`,\n );\n }\n return {\n clientContent: {turns: contents, turnComplete: params.turnComplete},\n };\n }\n\n return {\n clientContent: {turnComplete: params.turnComplete},\n };\n }\n\n private tLiveClientRealtimeInput(\n apiClient: ApiClient,\n params: types.LiveSendRealtimeInputParameters,\n ): types.LiveClientMessage {\n let clientMessage: types.LiveClientMessage = {};\n if (!('media' in params) || !params.media) {\n throw new Error(\n `Failed to convert realtime input \"media\", type: '${typeof params.media}'`,\n );\n }\n\n // LiveClientRealtimeInput\n clientMessage = {\n realtimeInput: {\n mediaChunks: [params.media],\n activityStart: params.activityStart,\n activityEnd: params.activityEnd,\n },\n };\n return clientMessage;\n }\n\n private tLiveClienttToolResponse(\n apiClient: ApiClient,\n params: types.LiveSendToolResponseParameters,\n ): types.LiveClientMessage {\n let functionResponses: types.FunctionResponse[] = [];\n\n if (params.functionResponses == null) {\n throw new Error('functionResponses is required.');\n }\n\n if (!Array.isArray(params.functionResponses)) {\n functionResponses = [params.functionResponses];\n } else {\n functionResponses = params.functionResponses;\n }\n\n if (functionResponses.length === 0) {\n throw new Error('functionResponses is required.');\n }\n\n for (const functionResponse of functionResponses) {\n if (\n typeof functionResponse !== 'object' ||\n functionResponse === null ||\n !('name' in functionResponse) ||\n !('response' in functionResponse)\n ) {\n throw new Error(\n `Could not parse function response, type '${typeof functionResponse}'.`,\n );\n }\n if (!apiClient.isVertexAI() && !('id' in functionResponse)) {\n throw new Error(FUNCTION_RESPONSE_REQUIRES_ID);\n }\n }\n\n const clientMessage: types.LiveClientMessage = {\n toolResponse: {functionResponses: functionResponses},\n };\n return clientMessage;\n }\n\n /**\n Send a message over the established connection.\n\n @param params - Contains two **optional** properties, `turns` and\n `turnComplete`.\n\n - `turns` will be converted to a `Content[]`\n - `turnComplete: true` [default] indicates that you are done sending\n content and expect a response. If `turnComplete: false`, the server\n will wait for additional messages before starting generation.\n\n @experimental\n\n @remarks\n There are two ways to send messages to the live API:\n `sendClientContent` and `sendRealtimeInput`.\n\n `sendClientContent` messages are added to the model context **in order**.\n Having a conversation using `sendClientContent` messages is roughly\n equivalent to using the `Chat.sendMessageStream`, except that the state of\n the `chat` history is stored on the API server instead of locally.\n\n Because of `sendClientContent`'s order guarantee, the model cannot respons\n as quickly to `sendClientContent` messages as to `sendRealtimeInput`\n messages. This makes the biggest difference when sending objects that have\n significant preprocessing time (typically images).\n\n The `sendClientContent` message sends a `Content[]`\n which has more options than the `Blob` sent by `sendRealtimeInput`.\n\n So the main use-cases for `sendClientContent` over `sendRealtimeInput` are:\n\n - Sending anything that can't be represented as a `Blob` (text,\n `sendClientContent({turns=\"Hello?\"}`)).\n - Managing turns when not using audio input and voice activity detection.\n (`sendClientContent({turnComplete:true})` or the short form\n `sendClientContent()`)\n - Prefilling a conversation context\n ```\n sendClientContent({\n turns: [\n Content({role:user, parts:...}),\n Content({role:user, parts:...}),\n ...\n ]\n })\n ```\n @experimental\n */\n sendClientContent(params: types.LiveSendClientContentParameters) {\n params = {\n ...defaultLiveSendClientContentParamerters,\n ...params,\n };\n\n const clientMessage: types.LiveClientMessage = this.tLiveClientContent(\n this.apiClient,\n params,\n );\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Send a realtime message over the established connection.\n\n @param params - Contains one property, `media`.\n\n - `media` will be converted to a `Blob`\n\n @experimental\n\n @remarks\n Use `sendRealtimeInput` for realtime audio chunks and video frames (images).\n\n With `sendRealtimeInput` the api will respond to audio automatically\n based on voice activity detection (VAD).\n\n `sendRealtimeInput` is optimized for responsivness at the expense of\n deterministic ordering guarantees. Audio and video tokens are to the\n context when they become available.\n\n Note: The Call signature expects a `Blob` object, but only a subset\n of audio and image mimetypes are allowed.\n */\n sendRealtimeInput(params: types.LiveSendRealtimeInputParameters) {\n if (params.media == null) {\n throw new Error('Media is required.');\n }\n\n const clientMessage: types.LiveClientMessage =\n this.tLiveClientRealtimeInput(this.apiClient, params);\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Send a function response message over the established connection.\n\n @param params - Contains property `functionResponses`.\n\n - `functionResponses` will be converted to a `functionResponses[]`\n\n @remarks\n Use `sendFunctionResponse` to reply to `LiveServerToolCall` from the server.\n\n Use {@link types.LiveConnectConfig#tools} to configure the callable functions.\n\n @experimental\n */\n sendToolResponse(params: types.LiveSendToolResponseParameters) {\n if (params.functionResponses == null) {\n throw new Error('Tool response parameters are required.');\n }\n\n const clientMessage: types.LiveClientMessage =\n this.tLiveClienttToolResponse(this.apiClient, params);\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Terminates the WebSocket connection.\n\n @experimental\n\n @example\n ```ts\n const session = await ai.live.connect({\n model: 'gemini-2.0-flash-exp',\n config: {\n responseModalities: [Modality.AUDIO],\n }\n });\n\n session.close();\n ```\n */\n close() {\n this.conn.close();\n }\n}\n\n// Converts an headers object to a \"map\" object as expected by the WebSocket\n// constructor. We use this as the Auth interface works with Headers objects\n// while the WebSocket constructor takes a map.\nfunction headersToMap(headers: Headers): Record {\n const headerMap: Record = {};\n headers.forEach((value, key) => {\n headerMap[key] = value;\n });\n return headerMap;\n}\n\n// Converts a \"map\" object to a headers object. We use this as the Auth\n// interface works with Headers objects while the API client default headers\n// returns a map.\nfunction mapToHeaders(map: Record): Headers {\n const headers = new Headers();\n for (const [key, value] of Object.entries(map)) {\n headers.append(key, value);\n }\n return headers;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_models_converters';\nimport * as types from './types';\n\nexport class Models extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Makes an API request to generate content with a given model.\n *\n * For the `model` parameter, supported formats for Vertex AI API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The full resource name starts with 'projects/', for example:\n * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'\n * - The partial resource name with 'publishers/', for example:\n * 'publishers/google/models/gemini-2.0-flash' or\n * 'publishers/meta/models/llama-3.1-405b-instruct-maas'\n * - `/` separated publisher and model name, for example:\n * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas'\n *\n * For the `model` parameter, supported formats for Gemini API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The model name starts with 'models/', for example:\n * 'models/gemini-2.0-flash'\n * - For tuned models, the model name starts with 'tunedModels/',\n * for example:\n * 'tunedModels/1234567890123456789'\n *\n * Some models support multimodal input and output.\n *\n * @param params - The parameters for generating content.\n * @return The response from generating content.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents: 'why is the sky blue?',\n * config: {\n * candidateCount: 2,\n * }\n * });\n * console.log(response);\n * ```\n */\n generateContent = async (\n params: types.GenerateContentParameters,\n ): Promise => {\n return await this.generateContentInternal(params);\n };\n\n /**\n * Makes an API request to generate content with a given model and yields the\n * response in chunks.\n *\n * For the `model` parameter, supported formats for Vertex AI API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The full resource name starts with 'projects/', for example:\n * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'\n * - The partial resource name with 'publishers/', for example:\n * 'publishers/google/models/gemini-2.0-flash' or\n * 'publishers/meta/models/llama-3.1-405b-instruct-maas'\n * - `/` separated publisher and model name, for example:\n * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas'\n *\n * For the `model` parameter, supported formats for Gemini API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The model name starts with 'models/', for example:\n * 'models/gemini-2.0-flash'\n * - For tuned models, the model name starts with 'tunedModels/',\n * for example:\n * 'tunedModels/1234567890123456789'\n *\n * Some models support multimodal input and output.\n *\n * @param params - The parameters for generating content with streaming response.\n * @return The response from generating content.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContentStream({\n * model: 'gemini-2.0-flash',\n * contents: 'why is the sky blue?',\n * config: {\n * maxOutputTokens: 200,\n * }\n * });\n * for await (const chunk of response) {\n * console.log(chunk);\n * }\n * ```\n */\n generateContentStream = async (\n params: types.GenerateContentParameters,\n ): Promise> => {\n return await this.generateContentStreamInternal(params);\n };\n\n /**\n * Generates an image based on a text description and configuration.\n *\n * @param model - The model to use.\n * @param prompt - A text description of the image to generate.\n * @param [config] - The config for image generation.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await client.models.generateImages({\n * model: 'imagen-3.0-generate-002',\n * prompt: 'Robot holding a red skateboard',\n * config: {\n * numberOfImages: 1,\n * includeRaiReason: true,\n * },\n * });\n * console.log(response?.generatedImages?.[0]?.image?.imageBytes);\n * ```\n */\n generateImages = async (\n params: types.GenerateImagesParameters,\n ): Promise => {\n return await this.generateImagesInternal(params).then((apiResponse) => {\n let positivePromptSafetyAttributes;\n const generatedImages = [];\n\n if (apiResponse?.generatedImages) {\n for (const generatedImage of apiResponse.generatedImages) {\n if (\n generatedImage &&\n generatedImage?.safetyAttributes &&\n generatedImage?.safetyAttributes?.contentType === 'Positive Prompt'\n ) {\n positivePromptSafetyAttributes = generatedImage?.safetyAttributes;\n } else {\n generatedImages.push(generatedImage);\n }\n }\n }\n let response: types.GenerateImagesResponse;\n\n if (positivePromptSafetyAttributes) {\n response = {\n generatedImages: generatedImages,\n positivePromptSafetyAttributes: positivePromptSafetyAttributes,\n };\n } else {\n response = {\n generatedImages: generatedImages,\n };\n }\n return response;\n });\n };\n\n private async generateContentInternal(\n params: types.GenerateContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:generateContent',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateContentResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.generateContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:generateContent',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateContentResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n private async generateContentStreamInternal(\n params: types.GenerateContentParameters,\n ): Promise> {\n let response: Promise>;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:streamGenerateContent?alt=sse',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n const apiClient = this.apiClient;\n response = apiClient.requestStream({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n }) as Promise>;\n\n return response.then(async function* (\n apiResponse: AsyncGenerator,\n ) {\n for await (const chunk of apiResponse) {\n const resp = converters.generateContentResponseFromVertex(\n apiClient,\n chunk,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n yield typedResp;\n }\n });\n } else {\n const body = converters.generateContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:streamGenerateContent?alt=sse',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n const apiClient = this.apiClient;\n response = apiClient.requestStream({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n }) as Promise>;\n\n return response.then(async function* (\n apiResponse: AsyncGenerator,\n ) {\n for await (const chunk of apiResponse) {\n const resp = converters.generateContentResponseFromMldev(\n apiClient,\n chunk,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n yield typedResp;\n }\n });\n }\n }\n\n /**\n * Calculates embeddings for the given contents. Only text is supported.\n *\n * @param params - The parameters for embedding contents.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.embedContent({\n * model: 'text-embedding-004',\n * contents: [\n * 'What is your name?',\n * 'What is your favorite color?',\n * ],\n * config: {\n * outputDimensionality: 64,\n * },\n * });\n * console.log(response);\n * ```\n */\n async embedContent(\n params: types.EmbedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.embedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.embedContentResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.EmbedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.embedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:batchEmbedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.embedContentResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.EmbedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Generates an image based on a text description and configuration.\n *\n * @param params - The parameters for generating images.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateImages({\n * model: 'imagen-3.0-generate-002',\n * prompt: 'Robot holding a red skateboard',\n * config: {\n * numberOfImages: 1,\n * includeRaiReason: true,\n * },\n * });\n * console.log(response?.generatedImages?.[0]?.image?.imageBytes);\n * ```\n */\n private async generateImagesInternal(\n params: types.GenerateImagesParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateImagesParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateImagesResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateImagesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.generateImagesParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateImagesResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateImagesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Fetches information about a model by name.\n *\n * @example\n * ```ts\n * const modelInfo = await ai.models.get({model: 'gemini-2.0-flash'});\n * ```\n */\n async get(params: types.GetModelParameters): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getModelParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.modelFromVertex(this.apiClient, apiResponse);\n\n return resp as types.Model;\n });\n } else {\n const body = converters.getModelParametersToMldev(this.apiClient, params);\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.modelFromMldev(this.apiClient, apiResponse);\n\n return resp as types.Model;\n });\n }\n }\n\n /**\n * Counts the number of tokens in the given contents. Multimodal input is\n * supported for Gemini models.\n *\n * @param params - The parameters for counting tokens.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.countTokens({\n * model: 'gemini-2.0-flash',\n * contents: 'The quick brown fox jumps over the lazy dog.'\n * });\n * console.log(response);\n * ```\n */\n async countTokens(\n params: types.CountTokensParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.countTokensParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:countTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.countTokensResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.CountTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.countTokensParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:countTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.countTokensResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.CountTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Given a list of contents, returns a corresponding TokensInfo containing\n * the list of tokens and list of token ids.\n *\n * This method is not supported by the Gemini Developer API.\n *\n * @param params - The parameters for computing tokens.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.computeTokens({\n * model: 'gemini-2.0-flash',\n * contents: 'What is your name?'\n * });\n * console.log(response);\n * ```\n */\n async computeTokens(\n params: types.ComputeTokensParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.computeTokensParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:computeTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.computeTokensResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ComputeTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n throw new Error('This method is only supported by the Vertex AI.');\n }\n }\n\n /**\n * Generates videos based on a text description and configuration.\n *\n * @param params - The parameters for generating videos.\n * @return A Promise which allows you to track the progress and eventually retrieve the generated videos using the operations.get method.\n *\n * @example\n * ```ts\n * const operation = await ai.models.generateVideos({\n * model: 'veo-2.0-generate-001',\n * prompt: 'A neon hologram of a cat driving at top speed',\n * config: {\n * numberOfVideos: 1\n * });\n *\n * while (!operation.done) {\n * await new Promise(resolve => setTimeout(resolve, 10000));\n * operation = await ai.operations.getVideosOperation({operation: operation});\n * }\n *\n * console.log(operation.response?.generatedVideos?.[0]?.video?.uri);\n * ```\n */\n\n async generateVideos(\n params: types.GenerateVideosParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateVideosParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predictLongRunning',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n const body = converters.generateVideosParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predictLongRunning',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function getOperationParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'operationName'],\n fromOperationName,\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function getOperationParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'operationName'],\n fromOperationName,\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function fetchPredictOperationParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.FetchPredictOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(toObject, ['operationName'], fromOperationName);\n }\n\n const fromResourceName = common.getValueByPath(fromObject, ['resourceName']);\n if (fromResourceName != null) {\n common.setValueByPath(toObject, ['_url', 'resourceName'], fromResourceName);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function videoFromMldev(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['video', 'uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'video',\n 'encodedVideo',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['encoding']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromMldev(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, [\n 'generatedSamples',\n ]);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromMldev(apiClient, fromResponse),\n );\n }\n\n const fromResult = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResult != null) {\n common.setValueByPath(\n toObject,\n ['result'],\n generateVideosResponseFromMldev(apiClient, fromResult),\n );\n }\n\n return toObject;\n}\n\nexport function videoFromVertex(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromVertex(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, ['videos']);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromVertex(apiClient, fromResponse),\n );\n }\n\n const fromResult = common.getValueByPath(fromObject, ['response']);\n if (fromResult != null) {\n common.setValueByPath(\n toObject,\n ['result'],\n generateVideosResponseFromVertex(apiClient, fromResult),\n );\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_operations_converters';\nimport * as types from './types';\n\nexport class Operations extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Gets the status of a long-running operation.\n *\n * @param parameters The parameters for the get operation request.\n * @return The updated Operation object, with the latest status or result.\n */\n async getVideosOperation(\n parameters: types.OperationGetParameters,\n ): Promise {\n const operation = parameters.operation;\n const config = parameters.config;\n\n if (operation.name === undefined || operation.name === '') {\n throw new Error('Operation name is required.');\n }\n\n if (this.apiClient.isVertexAI()) {\n const resourceName = operation.name.split('/operations/')[0];\n var httpOptions: types.HttpOptions | undefined = undefined;\n\n if (config && 'httpOptions' in config) {\n httpOptions = config.httpOptions;\n }\n\n return this.fetchPredictVideosOperationInternal({\n operationName: operation.name,\n resourceName: resourceName,\n config: {httpOptions: httpOptions},\n });\n } else {\n return this.getVideosOperationInternal({\n operationName: operation.name,\n config: config,\n });\n }\n }\n\n private async getVideosOperationInternal(\n params: types.GetOperationParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getOperationParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{operationName}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n const body = converters.getOperationParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{operationName}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n }\n }\n\n private async fetchPredictVideosOperationInternal(\n params: types.FetchPredictOperationParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.fetchPredictOperationParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{resourceName}:fetchPredictOperation',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n throw new Error('This method is only supported by the Vertex AI.');\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {Auth} from '../_auth';\n\nexport const GOOGLE_API_KEY_HEADER = 'x-goog-api-key';\n// TODO(b/395122533): We need a secure client side authentication mechanism.\nexport class WebAuth implements Auth {\n constructor(private readonly apiKey: string) {}\n\n async addAuthHeaders(headers: Headers): Promise {\n if (headers.get(GOOGLE_API_KEY_HEADER) !== null) {\n return;\n }\n headers.append(GOOGLE_API_KEY_HEADER, this.apiKey);\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {GoogleAuthOptions} from 'google-auth-library';\n\nimport {ApiClient} from './_api_client';\nimport {Caches} from './caches';\nimport {Chats} from './chats';\nimport {crossError} from './cross/_cross_error';\nimport {CrossUploader} from './cross/_cross_uploader';\nimport {CrossWebSocketFactory} from './cross/_cross_websocket';\nimport {Files} from './files';\nimport {Live} from './live';\nimport {Models} from './models';\nimport {Operations} from './operations';\nimport {HttpOptions} from './types';\nimport {WebAuth} from './web/_web_auth';\n\nconst LANGUAGE_LABEL_PREFIX = 'gl-node/';\n\n/**\n * Google Gen AI SDK's configuration options.\n *\n * See {@link GoogleGenAI} for usage samples.\n */\nexport interface GoogleGenAIOptions {\n /**\n * Optional. Determines whether to use the Vertex AI or the Gemini API.\n *\n * @remarks\n * When true, the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI API} will used.\n * When false, the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API} will be used.\n *\n * If unset, default SDK behavior is to use the Gemini API service.\n */\n vertexai?: boolean;\n /**\n * Optional. The Google Cloud project ID for Vertex AI clients.\n *\n * @remarks\n * Only supported on Node runtimes, ignored on browser runtimes.\n */\n project?: string;\n /**\n * Optional. The Google Cloud project region for Vertex AI clients.\n *\n * @remarks\n * Only supported on Node runtimes, ignored on browser runtimes.\n *\n */\n location?: string;\n /**\n * The API Key, required for Gemini API clients.\n *\n * @remarks\n * Required on browser runtimes.\n */\n apiKey?: string;\n /**\n * Optional. The API version to use.\n *\n * @remarks\n * If unset, the default API version will be used.\n */\n apiVersion?: string;\n /**\n * Optional. Authentication options defined by the by google-auth-library for Vertex AI clients.\n *\n * @remarks\n * @see {@link https://github.com/googleapis/google-auth-library-nodejs/blob/v9.15.0/src/auth/googleauth.ts | GoogleAuthOptions interface in google-auth-library-nodejs}.\n *\n * Only supported on Node runtimes, ignored on browser runtimes.\n *\n */\n googleAuthOptions?: GoogleAuthOptions;\n /**\n * Optional. A set of customizable configuration for HTTP requests.\n */\n httpOptions?: HttpOptions;\n}\n\n/**\n * The Google GenAI SDK.\n *\n * @remarks\n * Provides access to the GenAI features through either the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API}\n * or the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI API}.\n *\n * The {@link GoogleGenAIOptions.vertexai} value determines which of the API services to use.\n *\n * When using the Gemini API, a {@link GoogleGenAIOptions.apiKey} must also be set,\n * when using Vertex AI {@link GoogleGenAIOptions.project} and {@link GoogleGenAIOptions.location} must also be set.\n *\n * @example\n * Initializing the SDK for using the Gemini API:\n * ```ts\n * import {GoogleGenAI} from '@google/genai';\n * const ai = new GoogleGenAI({apiKey: 'GEMINI_API_KEY'});\n * ```\n *\n * @example\n * Initializing the SDK for using the Vertex AI API:\n * ```ts\n * import {GoogleGenAI} from '@google/genai';\n * const ai = new GoogleGenAI({\n * vertexai: true,\n * project: 'PROJECT_ID',\n * location: 'PROJECT_LOCATION'\n * });\n * ```\n *\n */\nexport class GoogleGenAI {\n protected readonly apiClient: ApiClient;\n private readonly apiKey?: string;\n public readonly vertexai: boolean;\n private readonly apiVersion?: string;\n readonly models: Models;\n readonly live: Live;\n readonly chats: Chats;\n readonly caches: Caches;\n readonly files: Files;\n readonly operations: Operations;\n\n constructor(options: GoogleGenAIOptions) {\n if (options.apiKey == null) {\n throw new Error(\n `An API Key must be set when running in an unspecified environment.\\n + ${crossError().message}`,\n );\n }\n this.vertexai = options.vertexai ?? false;\n this.apiKey = options.apiKey;\n this.apiVersion = options.apiVersion;\n const auth = new WebAuth(this.apiKey);\n this.apiClient = new ApiClient({\n auth: auth,\n apiVersion: this.apiVersion,\n apiKey: this.apiKey,\n vertexai: this.vertexai,\n httpOptions: options.httpOptions,\n userAgentExtra: LANGUAGE_LABEL_PREFIX + 'cross',\n uploader: new CrossUploader(),\n });\n this.models = new Models(this.apiClient);\n this.live = new Live(this.apiClient, auth, new CrossWebSocketFactory());\n this.chats = new Chats(this.models, this.apiClient);\n this.caches = new Caches(this.apiClient);\n this.files = new Files(this.apiClient);\n this.operations = new Operations(this.apiClient);\n }\n}\n"],"names":["partToMldev","common.getValueByPath","common.setValueByPath","contentToMldev","functionDeclarationToMldev","googleSearchToMldev","dynamicRetrievalConfigToMldev","googleSearchRetrievalToMldev","toolToMldev","functionCallingConfigToMldev","toolConfigToMldev","t.tContents","t.tContent","t.tCachesModel","t.tCachedContentName","partToVertex","contentToVertex","schemaToVertex","functionDeclarationToVertex","googleSearchToVertex","dynamicRetrievalConfigToVertex","googleSearchRetrievalToVertex","toolToVertex","functionCallingConfigToVertex","toolConfigToVertex","PagedItem","Outcome","Language","Type","HarmCategory","HarmBlockMethod","HarmBlockThreshold","Mode","FinishReason","HarmProbability","HarmSeverity","BlockedReason","TrafficType","Modality","MediaResolution","DynamicRetrievalConfigMode","FunctionCallingConfigMode","SafetyFilterLevel","PersonGeneration","ImagePromptLanguage","FileState","FileSource","MaskReferenceMode","ControlReferenceType","SubjectReferenceType","MediaModality","StartSensitivity","EndSensitivity","ActivityHandling","TurnCoverage","converters.createCachedContentParametersToVertex","common.formatMap","converters.cachedContentFromVertex","converters.createCachedContentParametersToMldev","converters.cachedContentFromMldev","converters.getCachedContentParametersToVertex","converters.getCachedContentParametersToMldev","converters.deleteCachedContentParametersToVertex","converters.deleteCachedContentResponseFromVertex","types.DeleteCachedContentResponse","converters.deleteCachedContentParametersToMldev","converters.deleteCachedContentResponseFromMldev","converters.updateCachedContentParametersToVertex","converters.updateCachedContentParametersToMldev","converters.listCachedContentsParametersToVertex","converters.listCachedContentsResponseFromVertex","types.ListCachedContentsResponse","converters.listCachedContentsParametersToMldev","converters.listCachedContentsResponseFromMldev","t.tFileName","converters.fileFromMldev","converters.listFilesParametersToMldev","converters.listFilesResponseFromMldev","types.ListFilesResponse","converters.createFileParametersToMldev","converters.createFileResponseFromMldev","types.CreateFileResponse","converters.getFileParametersToMldev","converters.deleteFileParametersToMldev","converters.deleteFileResponseFromMldev","types.DeleteFileResponse","t.tSchema","t.tTools","t.tTool","t.tSpeechConfig","t.tModel","t.tContentsForEmbed","t.tBytes","videoFromMldev","generatedVideoFromMldev","generateVideosResponseFromMldev","generateVideosOperationFromMldev","videoFromVertex","generatedVideoFromVertex","generateVideosResponseFromVertex","generateVideosOperationFromVertex","converters.liveServerMessageFromVertex","converters.liveServerMessageFromMldev","converters.liveConnectParametersToVertex","converters.liveConnectParametersToMldev","converters.generateContentParametersToVertex","converters.generateContentResponseFromVertex","types.GenerateContentResponse","converters.generateContentParametersToMldev","converters.generateContentResponseFromMldev","converters.embedContentParametersToVertex","converters.embedContentResponseFromVertex","types.EmbedContentResponse","converters.embedContentParametersToMldev","converters.embedContentResponseFromMldev","converters.generateImagesParametersToVertex","converters.generateImagesResponseFromVertex","types.GenerateImagesResponse","converters.generateImagesParametersToMldev","converters.generateImagesResponseFromMldev","converters.getModelParametersToVertex","converters.modelFromVertex","converters.getModelParametersToMldev","converters.modelFromMldev","converters.countTokensParametersToVertex","converters.countTokensResponseFromVertex","types.CountTokensResponse","converters.countTokensParametersToMldev","converters.countTokensResponseFromMldev","converters.computeTokensParametersToVertex","converters.computeTokensResponseFromVertex","types.ComputeTokensResponse","converters.generateVideosParametersToVertex","converters.generateVideosOperationFromVertex","converters.generateVideosParametersToMldev","converters.generateVideosOperationFromMldev","converters.getOperationParametersToVertex","converters.getOperationParametersToMldev","converters.fetchPredictOperationParametersToVertex"],"mappings":";;AAAA;;;;AAIG;MAEU,UAAU,CAAA;AAAG;AAEV,SAAA,SAAS,CACvB,cAAsB,EACtB,QAAiC,EAAA;;IAGjC,MAAM,KAAK,GAAG,cAAc;;IAG5B,OAAO,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,GAAG,KAAI;AAClD,QAAA,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE;AACvD,YAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC;;AAE3B,YAAA,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE;AAClE;AAAM,aAAA;;AAEL,YAAA,MAAM,IAAI,KAAK,CAAC,QAAQ,GAAG,CAAA,wBAAA,CAA0B,CAAC;AACvD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AAI,SAAS,CAAC;AAC7B,YAAA,IAAI,EAAE,IAAI;YACV,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,cAAc,EAAE,qBAAqB,GAAG,OAAO;YAC/C,QAAQ,EAAE,IAAI,aAAa,EAAE;AAC9B,SAAA,CAAC;QACF,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;AACxC,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,qBAAqB,EAAE,CAAC;AACvE,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC;QACnD,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;QACtC,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC;;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} +\ No newline at end of file ++{"version":3,"file":"index.js","sources":["../src/_common.ts","../src/_transformers.ts","../src/converters/_caches_converters.ts","../src/pagers.ts","../src/types.ts","../src/caches.ts","../src/chats.ts","../src/_api_client.ts","../src/cross/_cross_error.ts","../src/cross/_cross_uploader.ts","../src/cross/_cross_websocket.ts","../src/converters/_files_converters.ts","../src/files.ts","../src/converters/_live_converters.ts","../src/converters/_models_converters.ts","../src/live.ts","../src/models.ts","../src/converters/_operations_converters.ts","../src/operations.ts","../src/web/_web_auth.ts","../src/client.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport class BaseModule {}\n\nexport function formatMap(\n templateString: string,\n valueMap: Record,\n): string {\n // Use a regular expression to find all placeholders in the template string\n const regex = /\\{([^}]+)\\}/g;\n\n // Replace each placeholder with its corresponding value from the valueMap\n return templateString.replace(regex, (match, key) => {\n if (Object.prototype.hasOwnProperty.call(valueMap, key)) {\n const value = valueMap[key];\n // Convert the value to a string if it's not a string already\n return value !== undefined && value !== null ? String(value) : '';\n } else {\n // Handle missing keys\n throw new Error(`Key '${key}' not found in valueMap.`);\n }\n });\n}\n\nexport function setValueByPath(\n data: Record,\n keys: string[],\n value: unknown,\n): void {\n for (let i = 0; i < keys.length - 1; i++) {\n const key = keys[i];\n\n if (key.endsWith('[]')) {\n const keyName = key.slice(0, -2);\n if (!(keyName in data)) {\n if (Array.isArray(value)) {\n data[keyName] = Array.from({length: value.length}, () => ({}));\n } else {\n throw new Error(`Value must be a list given an array path ${key}`);\n }\n }\n\n if (Array.isArray(data[keyName])) {\n const arrayData = data[keyName] as Array;\n\n if (Array.isArray(value)) {\n for (let j = 0; j < arrayData.length; j++) {\n const entry = arrayData[j] as Record;\n setValueByPath(entry, keys.slice(i + 1), value[j]);\n }\n } else {\n for (const d of arrayData) {\n setValueByPath(\n d as Record,\n keys.slice(i + 1),\n value,\n );\n }\n }\n }\n return;\n } else if (key.endsWith('[0]')) {\n const keyName = key.slice(0, -3);\n if (!(keyName in data)) {\n data[keyName] = [{}];\n }\n const arrayData = (data as Record)[keyName];\n setValueByPath(\n (arrayData as Array>)[0],\n keys.slice(i + 1),\n value,\n );\n return;\n }\n\n if (!data[key] || typeof data[key] !== 'object') {\n data[key] = {};\n }\n\n data = data[key] as Record;\n }\n\n const keyToSet = keys[keys.length - 1];\n const existingData = data[keyToSet];\n\n if (existingData !== undefined) {\n if (\n !value ||\n (typeof value === 'object' && Object.keys(value).length === 0)\n ) {\n return;\n }\n\n if (value === existingData) {\n return;\n }\n\n if (\n typeof existingData === 'object' &&\n typeof value === 'object' &&\n existingData !== null &&\n value !== null\n ) {\n Object.assign(existingData, value);\n } else {\n throw new Error(`Cannot set value for an existing key. Key: ${keyToSet}`);\n }\n } else {\n data[keyToSet] = value;\n }\n}\n\nexport function getValueByPath(data: unknown, keys: string[]): unknown {\n try {\n if (keys.length === 1 && keys[0] === '_self') {\n return data;\n }\n\n for (let i = 0; i < keys.length; i++) {\n if (typeof data !== 'object' || data === null) {\n return undefined;\n }\n\n const key = keys[i];\n if (key.endsWith('[]')) {\n const keyName = key.slice(0, -2);\n if (keyName in data) {\n const arrayData = (data as Record)[keyName];\n if (!Array.isArray(arrayData)) {\n return undefined;\n }\n return arrayData.map((d) => getValueByPath(d, keys.slice(i + 1)));\n } else {\n return undefined;\n }\n } else {\n data = (data as Record)[key];\n }\n }\n\n return data;\n } catch (error) {\n if (error instanceof TypeError) {\n return undefined;\n }\n throw error;\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ApiClient} from './_api_client';\nimport * as types from './types';\n\nexport function tModel(apiClient: ApiClient, model: string | unknown): string {\n if (!model || typeof model !== 'string') {\n throw new Error('model is required and must be a string');\n }\n\n if (apiClient.isVertexAI()) {\n if (\n model.startsWith('publishers/') ||\n model.startsWith('projects/') ||\n model.startsWith('models/')\n ) {\n return model;\n } else if (model.indexOf('/') >= 0) {\n const parts = model.split('/', 2);\n return `publishers/${parts[0]}/models/${parts[1]}`;\n } else {\n return `publishers/google/models/${model}`;\n }\n } else {\n if (model.startsWith('models/') || model.startsWith('tunedModels/')) {\n return model;\n } else {\n return `models/${model}`;\n }\n }\n}\n\nexport function tCachesModel(\n apiClient: ApiClient,\n model: string | unknown,\n): string {\n const transformedModel = tModel(apiClient, model as string);\n if (!transformedModel) {\n return '';\n }\n\n if (transformedModel.startsWith('publishers/') && apiClient.isVertexAI()) {\n // vertex caches only support model name start with projects.\n return `projects/${apiClient.getProject()}/locations/${apiClient.getLocation()}/${transformedModel}`;\n } else if (transformedModel.startsWith('models/') && apiClient.isVertexAI()) {\n return `projects/${apiClient.getProject()}/locations/${apiClient.getLocation()}/publishers/google/${transformedModel}`;\n } else {\n return transformedModel;\n }\n}\n\nexport function tPart(\n apiClient: ApiClient,\n origin?: types.PartUnion | null,\n): types.Part {\n if (origin === null || origin === undefined) {\n throw new Error('PartUnion is required');\n }\n if (typeof origin === 'object') {\n return origin;\n }\n if (typeof origin === 'string') {\n return {text: origin};\n }\n throw new Error(`Unsupported part type: ${typeof origin}`);\n}\n\nexport function tParts(\n apiClient: ApiClient,\n origin?: types.PartListUnion | null,\n): types.Part[] {\n if (\n origin === null ||\n origin === undefined ||\n (Array.isArray(origin) && origin.length === 0)\n ) {\n throw new Error('PartListUnion is required');\n }\n if (Array.isArray(origin)) {\n return origin.map((item) => tPart(apiClient, item as types.PartUnion)!);\n }\n return [tPart(apiClient, origin)!];\n}\n\nfunction _isContent(origin: unknown): boolean {\n return (\n origin !== null &&\n origin !== undefined &&\n typeof origin === 'object' &&\n 'parts' in origin &&\n Array.isArray(origin.parts)\n );\n}\n\nfunction _isFunctionCallPart(origin: unknown): boolean {\n return (\n origin !== null &&\n origin !== undefined &&\n typeof origin === 'object' &&\n 'functionCall' in origin\n );\n}\n\nfunction _isFunctionResponsePart(origin: unknown): boolean {\n return (\n origin !== null &&\n origin !== undefined &&\n typeof origin === 'object' &&\n 'functionResponse' in origin\n );\n}\n\nexport function tContent(\n apiClient: ApiClient,\n origin?: types.ContentUnion,\n): types.Content {\n if (origin === null || origin === undefined) {\n throw new Error('ContentUnion is required');\n }\n if (_isContent(origin)) {\n // _isContent is a utility function that checks if the\n // origin is a Content.\n return origin as types.Content;\n }\n\n return {\n role: 'user',\n parts: tParts(apiClient, origin as types.PartListUnion)!,\n };\n}\n\nexport function tContentsForEmbed(\n apiClient: ApiClient,\n origin: types.ContentListUnion,\n): types.ContentUnion[] {\n if (!origin) {\n return [];\n }\n if (apiClient.isVertexAI() && Array.isArray(origin)) {\n return origin.flatMap((item) => {\n const content = tContent(apiClient, item as types.ContentUnion);\n if (\n content.parts &&\n content.parts.length > 0 &&\n content.parts[0].text !== undefined\n ) {\n return [content.parts[0].text];\n }\n return [];\n });\n } else if (apiClient.isVertexAI()) {\n const content = tContent(apiClient, origin as types.ContentUnion);\n if (\n content.parts &&\n content.parts.length > 0 &&\n content.parts[0].text !== undefined\n ) {\n return [content.parts[0].text];\n }\n return [];\n }\n if (Array.isArray(origin)) {\n return origin.map(\n (item) => tContent(apiClient, item as types.ContentUnion)!,\n );\n }\n return [tContent(apiClient, origin as types.ContentUnion)!];\n}\n\nexport function tContents(\n apiClient: ApiClient,\n origin?: types.ContentListUnion,\n): types.Content[] {\n if (\n origin === null ||\n origin === undefined ||\n (Array.isArray(origin) && origin.length === 0)\n ) {\n throw new Error('contents are required');\n }\n if (!Array.isArray(origin)) {\n // If it's not an array, it's a single content or a single PartUnion.\n if (_isFunctionCallPart(origin) || _isFunctionResponsePart(origin)) {\n throw new Error(\n 'To specify functionCall or functionResponse parts, please wrap them in a Content object, specifying the role for them',\n );\n }\n return [tContent(apiClient, origin as types.ContentUnion)];\n }\n\n const result: types.Content[] = [];\n const accumulatedParts: types.PartUnion[] = [];\n const isContentArray = _isContent(origin[0]);\n\n for (const item of origin) {\n const isContent = _isContent(item);\n\n if (isContent != isContentArray) {\n throw new Error(\n 'Mixing Content and Parts is not supported, please group the parts into a the appropriate Content objects and specify the roles for them',\n );\n }\n\n if (isContent) {\n // `isContent` contains the result of _isContent, which is a utility\n // function that checks if the item is a Content.\n result.push(item as types.Content);\n } else if (_isFunctionCallPart(item) || _isFunctionResponsePart(item)) {\n throw new Error(\n 'To specify functionCall or functionResponse parts, please wrap them, and any other parts, in Content objects as appropriate, specifying the role for them',\n );\n } else {\n accumulatedParts.push(item as types.PartUnion);\n }\n }\n\n if (!isContentArray) {\n result.push({role: 'user', parts: tParts(apiClient, accumulatedParts)});\n }\n return result;\n}\n\nexport function processSchema(apiClient: ApiClient, schema: types.Schema) {\n if (!apiClient.isVertexAI()) {\n if ('default' in schema) {\n throw new Error(\n 'Default value is not supported in the response schema for the Gemini API.',\n );\n }\n }\n\n if ('anyOf' in schema) {\n if (schema['anyOf'] !== undefined) {\n for (const subSchema of schema['anyOf']) {\n processSchema(apiClient, subSchema);\n }\n }\n }\n\n if ('items' in schema) {\n if (schema['items'] !== undefined) {\n processSchema(apiClient, schema['items']);\n }\n }\n\n if ('properties' in schema) {\n if (schema['properties'] !== undefined) {\n for (const subSchema of Object.values(schema['properties'])) {\n processSchema(apiClient, subSchema);\n }\n }\n }\n}\n\nexport function tSchema(\n apiClient: ApiClient,\n schema: types.Schema,\n): types.Schema {\n processSchema(apiClient, schema);\n return schema;\n}\n\nexport function tSpeechConfig(\n apiClient: ApiClient,\n speechConfig: types.SpeechConfigUnion,\n): types.SpeechConfig {\n if (typeof speechConfig === 'object' && 'voiceConfig' in speechConfig) {\n return speechConfig;\n } else if (typeof speechConfig === 'string') {\n return {\n voiceConfig: {\n prebuiltVoiceConfig: {\n voiceName: speechConfig,\n },\n },\n };\n } else {\n throw new Error(`Unsupported speechConfig type: ${typeof speechConfig}`);\n }\n}\n\nexport function tTool(apiClient: ApiClient, tool: types.Tool): types.Tool {\n return tool;\n}\n\nexport function tTools(\n apiClient: ApiClient,\n tool: types.Tool[] | unknown,\n): types.Tool[] {\n if (!Array.isArray(tool)) {\n throw new Error('tool is required and must be an array of Tools');\n }\n return tool;\n}\n\n/**\n * Prepends resource name with project, location, resource_prefix if needed.\n *\n * @param client The API client.\n * @param resourceName The resource name.\n * @param resourcePrefix The resource prefix.\n * @param splitsAfterPrefix The number of splits after the prefix.\n * @returns The completed resource name.\n *\n * Examples:\n *\n * ```\n * resource_name = '123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = True\n * client.project = 'bar'\n * client.location = 'us-west1'\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns: 'projects/bar/locations/us-west1/cachedContents/123'\n * ```\n *\n * ```\n * resource_name = 'projects/foo/locations/us-central1/cachedContents/123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = True\n * client.project = 'bar'\n * client.location = 'us-west1'\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns: 'projects/foo/locations/us-central1/cachedContents/123'\n * ```\n *\n * ```\n * resource_name = '123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = False\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns 'cachedContents/123'\n * ```\n *\n * ```\n * resource_name = 'some/wrong/cachedContents/resource/name/123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = False\n * # client.vertexai = True\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * -> 'some/wrong/resource/name/123'\n * ```\n */\nfunction resourceName(\n client: ApiClient,\n resourceName: string,\n resourcePrefix: string,\n splitsAfterPrefix: number = 1,\n): string {\n const shouldAppendPrefix =\n !resourceName.startsWith(`${resourcePrefix}/`) &&\n resourceName.split('/').length === splitsAfterPrefix;\n if (client.isVertexAI()) {\n if (resourceName.startsWith('projects/')) {\n return resourceName;\n } else if (resourceName.startsWith('locations/')) {\n return `projects/${client.getProject()}/${resourceName}`;\n } else if (resourceName.startsWith(`${resourcePrefix}/`)) {\n return `projects/${client.getProject()}/locations/${client.getLocation()}/${resourceName}`;\n } else if (shouldAppendPrefix) {\n return `projects/${client.getProject()}/locations/${client.getLocation()}/${resourcePrefix}/${resourceName}`;\n } else {\n return resourceName;\n }\n }\n if (shouldAppendPrefix) {\n return `${resourcePrefix}/${resourceName}`;\n }\n return resourceName;\n}\n\nexport function tCachedContentName(\n apiClient: ApiClient,\n name: string | unknown,\n): string {\n if (typeof name !== 'string') {\n throw new Error('name must be a string');\n }\n return resourceName(apiClient, name, 'cachedContents');\n}\n\nexport function tTuningJobStatus(\n apiClient: ApiClient,\n status: string | unknown,\n): string {\n switch (status) {\n case 'STATE_UNSPECIFIED':\n return 'JOB_STATE_UNSPECIFIED';\n case 'CREATING':\n return 'JOB_STATE_RUNNING';\n case 'ACTIVE':\n return 'JOB_STATE_SUCCEEDED';\n case 'FAILED':\n return 'JOB_STATE_FAILED';\n default:\n return status as string;\n }\n}\n\nexport function tBytes(\n apiClient: ApiClient,\n fromImageBytes: string | unknown,\n): string {\n if (typeof fromImageBytes !== 'string') {\n throw new Error('fromImageBytes must be a string');\n }\n // TODO(b/389133914): Remove dummy bytes converter.\n return fromImageBytes;\n}\nexport function tFileName(\n apiClient: ApiClient,\n fromName: string | unknown,\n): string {\n if (typeof fromName !== 'string') {\n throw new Error('fromName must be a string');\n }\n // Remove the files/ prefx for MLdev urls to get the actual name of the file.\n if (fromName.startsWith('files/')) {\n return fromName.split('files/')[1];\n }\n return fromName;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function partToMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['videoMetadata']) !== undefined) {\n throw new Error('videoMetadata parameter is not supported in Gemini API.');\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToMldev(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['example']) !== undefined) {\n throw new Error('example parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['pattern']) !== undefined) {\n throw new Error('pattern parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['default']) !== undefined) {\n throw new Error('default parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxLength']) !== undefined) {\n throw new Error('maxLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minLength']) !== undefined) {\n throw new Error('minLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minProperties']) !== undefined) {\n throw new Error('minProperties parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxProperties']) !== undefined) {\n throw new Error('maxProperties parameter is not supported in Gemini API.');\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['response']) !== undefined) {\n throw new Error('response parameter is not supported in Gemini API.');\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToMldev(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToMldev(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n if (common.getValueByPath(fromObject, ['retrieval']) !== undefined) {\n throw new Error('retrieval parameter is not supported in Gemini API.');\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToMldev());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (parentObject !== undefined && fromDisplayName != null) {\n common.setValueByPath(parentObject, ['displayName'], fromDisplayName);\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (parentObject !== undefined && fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToMldev(apiClient, fromToolConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['model'],\n t.tCachesModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n createCachedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.DeleteCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n updateCachedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function listCachedContentsConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listCachedContentsParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listCachedContentsConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partToVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToVertex(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n const fromExample = common.getValueByPath(fromObject, ['example']);\n if (fromExample != null) {\n common.setValueByPath(toObject, ['example'], fromExample);\n }\n\n const fromPattern = common.getValueByPath(fromObject, ['pattern']);\n if (fromPattern != null) {\n common.setValueByPath(toObject, ['pattern'], fromPattern);\n }\n\n const fromDefault = common.getValueByPath(fromObject, ['default']);\n if (fromDefault != null) {\n common.setValueByPath(toObject, ['default'], fromDefault);\n }\n\n const fromMaxLength = common.getValueByPath(fromObject, ['maxLength']);\n if (fromMaxLength != null) {\n common.setValueByPath(toObject, ['maxLength'], fromMaxLength);\n }\n\n const fromMinLength = common.getValueByPath(fromObject, ['minLength']);\n if (fromMinLength != null) {\n common.setValueByPath(toObject, ['minLength'], fromMinLength);\n }\n\n const fromMinProperties = common.getValueByPath(fromObject, [\n 'minProperties',\n ]);\n if (fromMinProperties != null) {\n common.setValueByPath(toObject, ['minProperties'], fromMinProperties);\n }\n\n const fromMaxProperties = common.getValueByPath(fromObject, [\n 'maxProperties',\n ]);\n if (fromMaxProperties != null) {\n common.setValueByPath(toObject, ['maxProperties'], fromMaxProperties);\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n schemaToVertex(apiClient, fromResponse),\n );\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToVertex(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToVertex(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n const fromRetrieval = common.getValueByPath(fromObject, ['retrieval']);\n if (fromRetrieval != null) {\n common.setValueByPath(toObject, ['retrieval'], fromRetrieval);\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToVertex());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (parentObject !== undefined && fromDisplayName != null) {\n common.setValueByPath(parentObject, ['displayName'], fromDisplayName);\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (parentObject !== undefined && fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToVertex(apiClient, fromToolConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['model'],\n t.tCachesModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n createCachedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.DeleteCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n updateCachedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function listCachedContentsConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listCachedContentsParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listCachedContentsConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function cachedContentFromMldev(\n apiClient: ApiClient,\n fromObject: types.CachedContent,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (fromExpireTime != null) {\n common.setValueByPath(toObject, ['expireTime'], fromExpireTime);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentResponseFromMldev(): Record<\n string,\n unknown\n> {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function listCachedContentsResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromCachedContents = common.getValueByPath(fromObject, [\n 'cachedContents',\n ]);\n if (fromCachedContents != null) {\n if (Array.isArray(fromCachedContents)) {\n common.setValueByPath(\n toObject,\n ['cachedContents'],\n fromCachedContents.map((item) => {\n return cachedContentFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['cachedContents'], fromCachedContents);\n }\n }\n\n return toObject;\n}\n\nexport function cachedContentFromVertex(\n apiClient: ApiClient,\n fromObject: types.CachedContent,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (fromExpireTime != null) {\n common.setValueByPath(toObject, ['expireTime'], fromExpireTime);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentResponseFromVertex(): Record<\n string,\n unknown\n> {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function listCachedContentsResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromCachedContents = common.getValueByPath(fromObject, [\n 'cachedContents',\n ]);\n if (fromCachedContents != null) {\n if (Array.isArray(fromCachedContents)) {\n common.setValueByPath(\n toObject,\n ['cachedContents'],\n fromCachedContents.map((item) => {\n return cachedContentFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['cachedContents'], fromCachedContents);\n }\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Pagers for the GenAI List APIs.\n */\n\nexport enum PagedItem {\n PAGED_ITEM_BATCH_JOBS = 'batchJobs',\n PAGED_ITEM_MODELS = 'models',\n PAGED_ITEM_TUNING_JOBS = 'tuningJobs',\n PAGED_ITEM_FILES = 'files',\n PAGED_ITEM_CACHED_CONTENTS = 'cachedContents',\n}\n\ninterface PagedItemConfig {\n config?: {\n pageToken?: string;\n pageSize?: number;\n };\n}\n\ninterface PagedItemResponse {\n nextPageToken?: string;\n batchJobs?: T[];\n models?: T[];\n tuningJobs?: T[];\n files?: T[];\n cachedContents?: T[];\n}\n\n/**\n * Pager class for iterating through paginated results.\n */\nexport class Pager implements AsyncIterable {\n private nameInternal!: PagedItem;\n private pageInternal: T[] = [];\n private paramsInternal: PagedItemConfig = {};\n private pageInternalSize!: number;\n protected requestInternal!: (\n params: PagedItemConfig,\n ) => Promise>;\n protected idxInternal!: number;\n\n constructor(\n name: PagedItem,\n request: (params: PagedItemConfig) => Promise>,\n response: PagedItemResponse,\n params: PagedItemConfig,\n ) {\n this.requestInternal = request;\n this.init(name, response, params);\n }\n\n private init(\n name: PagedItem,\n response: PagedItemResponse,\n params: PagedItemConfig,\n ) {\n this.nameInternal = name;\n this.pageInternal = response[this.nameInternal] || [];\n this.idxInternal = 0;\n let requestParams: PagedItemConfig = {config: {}};\n if (!params) {\n requestParams = {config: {}};\n } else if (typeof params === 'object') {\n requestParams = {...params};\n } else {\n requestParams = params;\n }\n if (requestParams['config']) {\n requestParams['config']['pageToken'] = response['nextPageToken'];\n }\n this.paramsInternal = requestParams;\n this.pageInternalSize =\n requestParams['config']?.['pageSize'] ?? this.pageInternal.length;\n }\n\n private initNextPage(response: PagedItemResponse): void {\n this.init(this.nameInternal, response, this.paramsInternal);\n }\n\n /**\n * Returns the current page, which is a list of items.\n *\n * @remarks\n * The first page is retrieved when the pager is created. The returned list of\n * items could be a subset of the entire list.\n */\n get page(): T[] {\n return this.pageInternal;\n }\n\n /**\n * Returns the type of paged item (for example, ``batch_jobs``).\n */\n get name(): PagedItem {\n return this.nameInternal;\n }\n\n /**\n * Returns the length of the page fetched each time by this pager.\n *\n * @remarks\n * The number of items in the page is less than or equal to the page length.\n */\n get pageSize(): number {\n return this.pageInternalSize;\n }\n\n /**\n * Returns the parameters when making the API request for the next page.\n *\n * @remarks\n * Parameters contain a set of optional configs that can be\n * used to customize the API request. For example, the `pageToken` parameter\n * contains the token to request the next page.\n */\n get params(): PagedItemConfig {\n return this.paramsInternal;\n }\n\n /**\n * Returns the total number of items in the current page.\n */\n get pageLength(): number {\n return this.pageInternal.length;\n }\n\n /**\n * Returns the item at the given index.\n */\n getItem(index: number): T {\n return this.pageInternal[index];\n }\n\n /**\n * Returns an async iterator that support iterating through all items\n * retrieved from the API.\n *\n * @remarks\n * The iterator will automatically fetch the next page if there are more items\n * to fetch from the API.\n *\n * @example\n *\n * ```ts\n * const pager = await ai.files.list({config: {pageSize: 10}});\n * for await (const file of pager) {\n * console.log(file.name);\n * }\n * ```\n */\n [Symbol.asyncIterator](): AsyncIterator {\n return {\n next: async () => {\n if (this.idxInternal >= this.pageLength) {\n if (this.hasNextPage()) {\n await this.nextPage();\n } else {\n return {value: undefined, done: true};\n }\n }\n const item = this.getItem(this.idxInternal);\n this.idxInternal += 1;\n return {value: item, done: false};\n },\n return: async () => {\n return {value: undefined, done: true};\n },\n };\n }\n\n /**\n * Fetches the next page of items. This makes a new API request.\n *\n * @throws {Error} If there are no more pages to fetch.\n *\n * @example\n *\n * ```ts\n * const pager = await ai.files.list({config: {pageSize: 10}});\n * let page = pager.page;\n * while (true) {\n * for (const file of page) {\n * console.log(file.name);\n * }\n * if (!pager.hasNextPage()) {\n * break;\n * }\n * page = await pager.nextPage();\n * }\n * ```\n */\n async nextPage(): Promise {\n if (!this.hasNextPage()) {\n throw new Error('No more pages to fetch.');\n }\n const response = await this.requestInternal(this.params);\n this.initNextPage(response);\n return this.page;\n }\n\n /**\n * Returns true if there are more pages to fetch from the API.\n */\n hasNextPage(): boolean {\n if (this.params['config']?.['pageToken'] !== undefined) {\n return true;\n }\n return false;\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\n/** Required. Outcome of the code execution. */\nexport enum Outcome {\n OUTCOME_UNSPECIFIED = 'OUTCOME_UNSPECIFIED',\n OUTCOME_OK = 'OUTCOME_OK',\n OUTCOME_FAILED = 'OUTCOME_FAILED',\n OUTCOME_DEADLINE_EXCEEDED = 'OUTCOME_DEADLINE_EXCEEDED',\n}\n\n/** Required. Programming language of the `code`. */\nexport enum Language {\n LANGUAGE_UNSPECIFIED = 'LANGUAGE_UNSPECIFIED',\n PYTHON = 'PYTHON',\n}\n\n/** Optional. The type of the data. */\nexport enum Type {\n TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED',\n STRING = 'STRING',\n NUMBER = 'NUMBER',\n INTEGER = 'INTEGER',\n BOOLEAN = 'BOOLEAN',\n ARRAY = 'ARRAY',\n OBJECT = 'OBJECT',\n}\n\n/** Required. Harm category. */\nexport enum HarmCategory {\n HARM_CATEGORY_UNSPECIFIED = 'HARM_CATEGORY_UNSPECIFIED',\n HARM_CATEGORY_HATE_SPEECH = 'HARM_CATEGORY_HATE_SPEECH',\n HARM_CATEGORY_DANGEROUS_CONTENT = 'HARM_CATEGORY_DANGEROUS_CONTENT',\n HARM_CATEGORY_HARASSMENT = 'HARM_CATEGORY_HARASSMENT',\n HARM_CATEGORY_SEXUALLY_EXPLICIT = 'HARM_CATEGORY_SEXUALLY_EXPLICIT',\n HARM_CATEGORY_CIVIC_INTEGRITY = 'HARM_CATEGORY_CIVIC_INTEGRITY',\n}\n\n/** Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. */\nexport enum HarmBlockMethod {\n HARM_BLOCK_METHOD_UNSPECIFIED = 'HARM_BLOCK_METHOD_UNSPECIFIED',\n SEVERITY = 'SEVERITY',\n PROBABILITY = 'PROBABILITY',\n}\n\n/** Required. The harm block threshold. */\nexport enum HarmBlockThreshold {\n HARM_BLOCK_THRESHOLD_UNSPECIFIED = 'HARM_BLOCK_THRESHOLD_UNSPECIFIED',\n BLOCK_LOW_AND_ABOVE = 'BLOCK_LOW_AND_ABOVE',\n BLOCK_MEDIUM_AND_ABOVE = 'BLOCK_MEDIUM_AND_ABOVE',\n BLOCK_ONLY_HIGH = 'BLOCK_ONLY_HIGH',\n BLOCK_NONE = 'BLOCK_NONE',\n OFF = 'OFF',\n}\n\n/** The mode of the predictor to be used in dynamic retrieval. */\nexport enum Mode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n MODE_DYNAMIC = 'MODE_DYNAMIC',\n}\n\n/** Output only. The reason why the model stopped generating tokens.\n\n If empty, the model has not stopped generating the tokens.\n */\nexport enum FinishReason {\n FINISH_REASON_UNSPECIFIED = 'FINISH_REASON_UNSPECIFIED',\n STOP = 'STOP',\n MAX_TOKENS = 'MAX_TOKENS',\n SAFETY = 'SAFETY',\n RECITATION = 'RECITATION',\n OTHER = 'OTHER',\n BLOCKLIST = 'BLOCKLIST',\n PROHIBITED_CONTENT = 'PROHIBITED_CONTENT',\n SPII = 'SPII',\n MALFORMED_FUNCTION_CALL = 'MALFORMED_FUNCTION_CALL',\n IMAGE_SAFETY = 'IMAGE_SAFETY',\n}\n\n/** Output only. Harm probability levels in the content. */\nexport enum HarmProbability {\n HARM_PROBABILITY_UNSPECIFIED = 'HARM_PROBABILITY_UNSPECIFIED',\n NEGLIGIBLE = 'NEGLIGIBLE',\n LOW = 'LOW',\n MEDIUM = 'MEDIUM',\n HIGH = 'HIGH',\n}\n\n/** Output only. Harm severity levels in the content. */\nexport enum HarmSeverity {\n HARM_SEVERITY_UNSPECIFIED = 'HARM_SEVERITY_UNSPECIFIED',\n HARM_SEVERITY_NEGLIGIBLE = 'HARM_SEVERITY_NEGLIGIBLE',\n HARM_SEVERITY_LOW = 'HARM_SEVERITY_LOW',\n HARM_SEVERITY_MEDIUM = 'HARM_SEVERITY_MEDIUM',\n HARM_SEVERITY_HIGH = 'HARM_SEVERITY_HIGH',\n}\n\n/** Output only. Blocked reason. */\nexport enum BlockedReason {\n BLOCKED_REASON_UNSPECIFIED = 'BLOCKED_REASON_UNSPECIFIED',\n SAFETY = 'SAFETY',\n OTHER = 'OTHER',\n BLOCKLIST = 'BLOCKLIST',\n PROHIBITED_CONTENT = 'PROHIBITED_CONTENT',\n}\n\n/** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */\nexport enum TrafficType {\n TRAFFIC_TYPE_UNSPECIFIED = 'TRAFFIC_TYPE_UNSPECIFIED',\n ON_DEMAND = 'ON_DEMAND',\n PROVISIONED_THROUGHPUT = 'PROVISIONED_THROUGHPUT',\n}\n\n/** Server content modalities. */\nexport enum Modality {\n MODALITY_UNSPECIFIED = 'MODALITY_UNSPECIFIED',\n TEXT = 'TEXT',\n IMAGE = 'IMAGE',\n AUDIO = 'AUDIO',\n}\n\n/** The media resolution to use. */\nexport enum MediaResolution {\n MEDIA_RESOLUTION_UNSPECIFIED = 'MEDIA_RESOLUTION_UNSPECIFIED',\n MEDIA_RESOLUTION_LOW = 'MEDIA_RESOLUTION_LOW',\n MEDIA_RESOLUTION_MEDIUM = 'MEDIA_RESOLUTION_MEDIUM',\n MEDIA_RESOLUTION_HIGH = 'MEDIA_RESOLUTION_HIGH',\n}\n\n/** Options for feature selection preference. */\nexport enum FeatureSelectionPreference {\n FEATURE_SELECTION_PREFERENCE_UNSPECIFIED = 'FEATURE_SELECTION_PREFERENCE_UNSPECIFIED',\n PRIORITIZE_QUALITY = 'PRIORITIZE_QUALITY',\n BALANCED = 'BALANCED',\n PRIORITIZE_COST = 'PRIORITIZE_COST',\n}\n\n/** Config for the dynamic retrieval config mode. */\nexport enum DynamicRetrievalConfigMode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n MODE_DYNAMIC = 'MODE_DYNAMIC',\n}\n\n/** Config for the function calling config mode. */\nexport enum FunctionCallingConfigMode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n AUTO = 'AUTO',\n ANY = 'ANY',\n NONE = 'NONE',\n}\n\n/** Enum that controls the safety filter level for objectionable content. */\nexport enum SafetyFilterLevel {\n BLOCK_LOW_AND_ABOVE = 'BLOCK_LOW_AND_ABOVE',\n BLOCK_MEDIUM_AND_ABOVE = 'BLOCK_MEDIUM_AND_ABOVE',\n BLOCK_ONLY_HIGH = 'BLOCK_ONLY_HIGH',\n BLOCK_NONE = 'BLOCK_NONE',\n}\n\n/** Enum that controls the generation of people. */\nexport enum PersonGeneration {\n DONT_ALLOW = 'DONT_ALLOW',\n ALLOW_ADULT = 'ALLOW_ADULT',\n ALLOW_ALL = 'ALLOW_ALL',\n}\n\n/** Enum that specifies the language of the text in the prompt. */\nexport enum ImagePromptLanguage {\n auto = 'auto',\n en = 'en',\n ja = 'ja',\n ko = 'ko',\n hi = 'hi',\n}\n\n/** State for the lifecycle of a File. */\nexport enum FileState {\n STATE_UNSPECIFIED = 'STATE_UNSPECIFIED',\n PROCESSING = 'PROCESSING',\n ACTIVE = 'ACTIVE',\n FAILED = 'FAILED',\n}\n\n/** Source of the File. */\nexport enum FileSource {\n SOURCE_UNSPECIFIED = 'SOURCE_UNSPECIFIED',\n UPLOADED = 'UPLOADED',\n GENERATED = 'GENERATED',\n}\n\n/** Enum representing the mask mode of a mask reference image. */\nexport enum MaskReferenceMode {\n MASK_MODE_DEFAULT = 'MASK_MODE_DEFAULT',\n MASK_MODE_USER_PROVIDED = 'MASK_MODE_USER_PROVIDED',\n MASK_MODE_BACKGROUND = 'MASK_MODE_BACKGROUND',\n MASK_MODE_FOREGROUND = 'MASK_MODE_FOREGROUND',\n MASK_MODE_SEMANTIC = 'MASK_MODE_SEMANTIC',\n}\n\n/** Enum representing the control type of a control reference image. */\nexport enum ControlReferenceType {\n CONTROL_TYPE_DEFAULT = 'CONTROL_TYPE_DEFAULT',\n CONTROL_TYPE_CANNY = 'CONTROL_TYPE_CANNY',\n CONTROL_TYPE_SCRIBBLE = 'CONTROL_TYPE_SCRIBBLE',\n CONTROL_TYPE_FACE_MESH = 'CONTROL_TYPE_FACE_MESH',\n}\n\n/** Enum representing the subject type of a subject reference image. */\nexport enum SubjectReferenceType {\n SUBJECT_TYPE_DEFAULT = 'SUBJECT_TYPE_DEFAULT',\n SUBJECT_TYPE_PERSON = 'SUBJECT_TYPE_PERSON',\n SUBJECT_TYPE_ANIMAL = 'SUBJECT_TYPE_ANIMAL',\n SUBJECT_TYPE_PRODUCT = 'SUBJECT_TYPE_PRODUCT',\n}\n\n/** Server content modalities. */\nexport enum MediaModality {\n MODALITY_UNSPECIFIED = 'MODALITY_UNSPECIFIED',\n TEXT = 'TEXT',\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n AUDIO = 'AUDIO',\n DOCUMENT = 'DOCUMENT',\n}\n\n/** Start of speech sensitivity. */\nexport enum StartSensitivity {\n START_SENSITIVITY_UNSPECIFIED = 'START_SENSITIVITY_UNSPECIFIED',\n START_SENSITIVITY_HIGH = 'START_SENSITIVITY_HIGH',\n START_SENSITIVITY_LOW = 'START_SENSITIVITY_LOW',\n}\n\n/** End of speech sensitivity. */\nexport enum EndSensitivity {\n END_SENSITIVITY_UNSPECIFIED = 'END_SENSITIVITY_UNSPECIFIED',\n END_SENSITIVITY_HIGH = 'END_SENSITIVITY_HIGH',\n END_SENSITIVITY_LOW = 'END_SENSITIVITY_LOW',\n}\n\n/** The different ways of handling user activity. */\nexport enum ActivityHandling {\n ACTIVITY_HANDLING_UNSPECIFIED = 'ACTIVITY_HANDLING_UNSPECIFIED',\n START_OF_ACTIVITY_INTERRUPTS = 'START_OF_ACTIVITY_INTERRUPTS',\n NO_INTERRUPTION = 'NO_INTERRUPTION',\n}\n\n/** Options about which input is included in the user's turn. */\nexport enum TurnCoverage {\n TURN_COVERAGE_UNSPECIFIED = 'TURN_COVERAGE_UNSPECIFIED',\n TURN_INCLUDES_ONLY_ACTIVITY = 'TURN_INCLUDES_ONLY_ACTIVITY',\n TURN_INCLUDES_ALL_INPUT = 'TURN_INCLUDES_ALL_INPUT',\n}\n\n/** Metadata describes the input video content. */\nexport declare interface VideoMetadata {\n /** Optional. The end offset of the video. */\n endOffset?: string;\n /** Optional. The start offset of the video. */\n startOffset?: string;\n}\n\n/** Result of executing the [ExecutableCode]. Always follows a `part` containing the [ExecutableCode]. */\nexport declare interface CodeExecutionResult {\n /** Required. Outcome of the code execution. */\n outcome?: Outcome;\n /** Optional. Contains stdout when code execution is successful, stderr or other description otherwise. */\n output?: string;\n}\n\n/** Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the [FunctionDeclaration] tool and [FunctionCallingConfig] mode is set to [Mode.CODE]. */\nexport declare interface ExecutableCode {\n /** Required. The code to be executed. */\n code?: string;\n /** Required. Programming language of the `code`. */\n language?: Language;\n}\n\n/** URI based data. */\nexport declare interface FileData {\n /** Required. URI. */\n fileUri?: string;\n /** Required. The IANA standard MIME type of the source data. */\n mimeType?: string;\n}\n\n/** A function call. */\nexport declare interface FunctionCall {\n /** The unique id of the function call. If populated, the client to execute the\n `function_call` and return the response with the matching `id`. */\n id?: string;\n /** Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. */\n args?: Record;\n /** Required. The name of the function to call. Matches [FunctionDeclaration.name]. */\n name?: string;\n}\n\n/** A function response. */\nexport class FunctionResponse {\n /** The id of the function call this response is for. Populated by the client\n to match the corresponding function call `id`. */\n id?: string;\n /** Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. */\n name?: string;\n /** Required. The function response in JSON object format. Use \"output\" key to specify function output and \"error\" key to specify error details (if any). If \"output\" and \"error\" keys are not specified, then whole \"response\" is treated as function output. */\n response?: Record;\n}\n\n/** Content blob. */\nexport declare interface Blob {\n /** Required. Raw bytes. */\n data?: string;\n /** Required. The IANA standard MIME type of the source data. */\n mimeType?: string;\n}\n\n/** A datatype containing media content.\n\n Exactly one field within a Part should be set, representing the specific type\n of content being conveyed. Using multiple fields within the same `Part`\n instance is considered invalid.\n */\nexport declare interface Part {\n /** Metadata for a given video. */\n videoMetadata?: VideoMetadata;\n /** Indicates if the part is thought from the model. */\n thought?: boolean;\n /** Optional. Result of executing the [ExecutableCode]. */\n codeExecutionResult?: CodeExecutionResult;\n /** Optional. Code generated by the model that is meant to be executed. */\n executableCode?: ExecutableCode;\n /** Optional. URI based data. */\n fileData?: FileData;\n /** Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. */\n functionCall?: FunctionCall;\n /** Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. */\n functionResponse?: FunctionResponse;\n /** Optional. Inlined bytes data. */\n inlineData?: Blob;\n /** Optional. Text part (can be code). */\n text?: string;\n}\n/**\n * Creates a `Part` object from a `URI` string.\n */\nexport function createPartFromUri(uri: string, mimeType: string): Part {\n return {\n fileData: {\n fileUri: uri,\n mimeType: mimeType,\n },\n };\n}\n/**\n * Creates a `Part` object from a `text` string.\n */\nexport function createPartFromText(text: string): Part {\n return {\n text: text,\n };\n}\n/**\n * Creates a `Part` object from a `FunctionCall` object.\n */\nexport function createPartFromFunctionCall(\n name: string,\n args: Record,\n): Part {\n return {\n functionCall: {\n name: name,\n args: args,\n },\n };\n}\n/**\n * Creates a `Part` object from a `FunctionResponse` object.\n */\nexport function createPartFromFunctionResponse(\n id: string,\n name: string,\n response: Record,\n): Part {\n return {\n functionResponse: {\n id: id,\n name: name,\n response: response,\n },\n };\n}\n/**\n * Creates a `Part` object from a `base64` encoded `string`.\n */\nexport function createPartFromBase64(data: string, mimeType: string): Part {\n return {\n inlineData: {\n data: data,\n mimeType: mimeType,\n },\n };\n}\n/**\n * Creates a `Part` object from the `outcome` and `output` of a `CodeExecutionResult` object.\n */\nexport function createPartFromCodeExecutionResult(\n outcome: Outcome,\n output: string,\n): Part {\n return {\n codeExecutionResult: {\n outcome: outcome,\n output: output,\n },\n };\n}\n/**\n * Creates a `Part` object from the `code` and `language` of an `ExecutableCode` object.\n */\nexport function createPartFromExecutableCode(\n code: string,\n language: Language,\n): Part {\n return {\n executableCode: {\n code: code,\n language: language,\n },\n };\n}\n\n/** Contains the multi-part content of a message. */\nexport declare interface Content {\n /** List of parts that constitute a single message. Each part may have\n a different IANA MIME type. */\n parts?: Part[];\n /** Optional. The producer of the content. Must be either 'user' or\n 'model'. Useful to set for multi-turn conversations, otherwise can be\n empty. If role is not specified, SDK will determine the role. */\n role?: string;\n}\nfunction _isPart(obj: unknown): obj is Part {\n if (typeof obj === 'object' && obj !== null) {\n return (\n 'fileData' in obj ||\n 'text' in obj ||\n 'functionCall' in obj ||\n 'functionResponse' in obj ||\n 'inlineData' in obj ||\n 'videoMetadata' in obj ||\n 'codeExecutionResult' in obj ||\n 'executableCode' in obj\n );\n }\n return false;\n}\nfunction _toParts(partOrString: PartListUnion | string): Part[] {\n const parts: Part[] = [];\n if (typeof partOrString === 'string') {\n parts.push(createPartFromText(partOrString));\n } else if (_isPart(partOrString)) {\n parts.push(partOrString);\n } else if (Array.isArray(partOrString)) {\n if (partOrString.length === 0) {\n throw new Error('partOrString cannot be an empty array');\n }\n for (const part of partOrString) {\n if (typeof part === 'string') {\n parts.push(createPartFromText(part));\n } else if (_isPart(part)) {\n parts.push(part);\n } else {\n throw new Error('element in PartUnion must be a Part object or string');\n }\n }\n } else {\n throw new Error('partOrString must be a Part object, string, or array');\n }\n return parts;\n}\n/**\n * Creates a `Content` object with a user role from a `PartListUnion` object or `string`.\n */\nexport function createUserContent(\n partOrString: PartListUnion | string,\n): Content {\n return {\n role: 'user',\n parts: _toParts(partOrString),\n };\n}\n\n/**\n * Creates a `Content` object with a model role from a `PartListUnion` object or `string`.\n */\nexport function createModelContent(\n partOrString: PartListUnion | string,\n): Content {\n return {\n role: 'model',\n parts: _toParts(partOrString),\n };\n}\n/** HTTP options to be used in each of the requests. */\nexport declare interface HttpOptions {\n /** The base URL for the AI platform service endpoint. */\n baseUrl?: string;\n /** Specifies the version of the API to use. */\n apiVersion?: string;\n /** Additional HTTP headers to be sent with the request. */\n headers?: Record;\n /** Timeout for the request in milliseconds. */\n timeout?: number;\n /** Signal for the request. */\n signal?: AbortSignal;\n}\n\n/** Schema that defines the format of input and output data.\n\n Represents a select subset of an OpenAPI 3.0 schema object.\n */\nexport declare interface Schema {\n /** Optional. Example of the object. Will only populated when the object is the root. */\n example?: unknown;\n /** Optional. Pattern of the Type.STRING to restrict a string to a regular expression. */\n pattern?: string;\n /** Optional. Default value of the data. */\n default?: unknown;\n /** Optional. Maximum length of the Type.STRING */\n maxLength?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING */\n minLength?: string;\n /** Optional. Minimum number of the properties for Type.OBJECT. */\n minProperties?: string;\n /** Optional. Maximum number of the properties for Type.OBJECT. */\n maxProperties?: string;\n /** Optional. The value should be validated against any (one or more) of the subschemas in the list. */\n anyOf?: Schema[];\n /** Optional. The description of the data. */\n description?: string;\n /** Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:[\"EAST\", NORTH\", \"SOUTH\", \"WEST\"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:[\"101\", \"201\", \"301\"]} */\n enum?: string[];\n /** Optional. The format of the data. Supported formats: for NUMBER type: \"float\", \"double\" for INTEGER type: \"int32\", \"int64\" for STRING type: \"email\", \"byte\", etc */\n format?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. */\n items?: Schema;\n /** Optional. Maximum number of the elements for Type.ARRAY. */\n maxItems?: string;\n /** Optional. Maximum value of the Type.INTEGER and Type.NUMBER */\n maximum?: number;\n /** Optional. Minimum number of the elements for Type.ARRAY. */\n minItems?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER */\n minimum?: number;\n /** Optional. Indicates if the value may be null. */\n nullable?: boolean;\n /** Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. */\n properties?: Record;\n /** Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. */\n propertyOrdering?: string[];\n /** Optional. Required properties of Type.OBJECT. */\n required?: string[];\n /** Optional. The title of the Schema. */\n title?: string;\n /** Optional. The type of the data. */\n type?: Type;\n}\n\n/** Config for model selection. */\nexport declare interface ModelSelectionConfig {\n /** Options for feature selection preference. */\n featureSelectionPreference?: FeatureSelectionPreference;\n}\n\n/** Safety settings. */\nexport declare interface SafetySetting {\n /** Determines if the harm block method uses probability or probability\n and severity scores. */\n method?: HarmBlockMethod;\n /** Required. Harm category. */\n category?: HarmCategory;\n /** Required. The harm block threshold. */\n threshold?: HarmBlockThreshold;\n}\n\n/** Defines a function that the model can generate JSON inputs for.\n\n The inputs are based on `OpenAPI 3.0 specifications\n `_.\n */\nexport declare interface FunctionDeclaration {\n /** Describes the output from the function in the OpenAPI JSON Schema\n Object format. */\n response?: Schema;\n /** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */\n description?: string;\n /** Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. */\n name?: string;\n /** Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 */\n parameters?: Schema;\n}\n\n/** Tool to support Google Search in Model. Powered by Google. */\nexport declare interface GoogleSearch {}\n\n/** Describes the options to customize dynamic retrieval. */\nexport declare interface DynamicRetrievalConfig {\n /** The mode of the predictor to be used in dynamic retrieval. */\n mode?: DynamicRetrievalConfigMode;\n /** Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used. */\n dynamicThreshold?: number;\n}\n\n/** Tool to retrieve public web data for grounding, powered by Google. */\nexport declare interface GoogleSearchRetrieval {\n /** Specifies the dynamic retrieval configuration for the given source. */\n dynamicRetrievalConfig?: DynamicRetrievalConfig;\n}\n\n/** Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder */\nexport declare interface VertexAISearch {\n /** Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` */\n datastore?: string;\n /** Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` */\n engine?: string;\n}\n\n/** The definition of the Rag resource. */\nexport declare interface VertexRagStoreRagResource {\n /** Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` */\n ragCorpus?: string;\n /** Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field. */\n ragFileIds?: string[];\n}\n\n/** Config for filters. */\nexport declare interface RagRetrievalConfigFilter {\n /** Optional. String for metadata filtering. */\n metadataFilter?: string;\n /** Optional. Only returns contexts with vector distance smaller than the threshold. */\n vectorDistanceThreshold?: number;\n /** Optional. Only returns contexts with vector similarity larger than the threshold. */\n vectorSimilarityThreshold?: number;\n}\n\n/** Config for Hybrid Search. */\nexport declare interface RagRetrievalConfigHybridSearch {\n /** Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally. */\n alpha?: number;\n}\n\n/** Config for LlmRanker. */\nexport declare interface RagRetrievalConfigRankingLlmRanker {\n /** Optional. The model name used for ranking. Format: `gemini-1.5-pro` */\n modelName?: string;\n}\n\n/** Config for Rank Service. */\nexport declare interface RagRetrievalConfigRankingRankService {\n /** Optional. The model name of the rank service. Format: `semantic-ranker-512@latest` */\n modelName?: string;\n}\n\n/** Config for ranking and reranking. */\nexport declare interface RagRetrievalConfigRanking {\n /** Optional. Config for LlmRanker. */\n llmRanker?: RagRetrievalConfigRankingLlmRanker;\n /** Optional. Config for Rank Service. */\n rankService?: RagRetrievalConfigRankingRankService;\n}\n\n/** Specifies the context retrieval config. */\nexport declare interface RagRetrievalConfig {\n /** Optional. Config for filters. */\n filter?: RagRetrievalConfigFilter;\n /** Optional. Config for Hybrid Search. */\n hybridSearch?: RagRetrievalConfigHybridSearch;\n /** Optional. Config for ranking and reranking. */\n ranking?: RagRetrievalConfigRanking;\n /** Optional. The number of contexts to retrieve. */\n topK?: number;\n}\n\n/** Retrieve from Vertex RAG Store for grounding. */\nexport declare interface VertexRagStore {\n /** Optional. Deprecated. Please use rag_resources instead. */\n ragCorpora?: string[];\n /** Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. */\n ragResources?: VertexRagStoreRagResource[];\n /** Optional. The retrieval config for the Rag query. */\n ragRetrievalConfig?: RagRetrievalConfig;\n /** Optional. Number of top k results to return from the selected corpora. */\n similarityTopK?: number;\n /** Optional. Only return results with vector distance smaller than the threshold. */\n vectorDistanceThreshold?: number;\n}\n\n/** Defines a retrieval tool that model can call to access external knowledge. */\nexport declare interface Retrieval {\n /** Optional. Deprecated. This option is no longer supported. */\n disableAttribution?: boolean;\n /** Set to use data source powered by Vertex AI Search. */\n vertexAiSearch?: VertexAISearch;\n /** Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService. */\n vertexRagStore?: VertexRagStore;\n}\n\n/** Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. */\nexport declare interface ToolCodeExecution {}\n\n/** Tool details of a tool that the model may use to generate a response. */\nexport declare interface Tool {\n /** List of function declarations that the tool supports. */\n functionDeclarations?: FunctionDeclaration[];\n /** Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. */\n retrieval?: Retrieval;\n /** Optional. Google Search tool type. Specialized retrieval tool\n that is powered by Google Search. */\n googleSearch?: GoogleSearch;\n /** Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. */\n googleSearchRetrieval?: GoogleSearchRetrieval;\n /** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services. */\n codeExecution?: ToolCodeExecution;\n}\n\n/** Function calling config. */\nexport declare interface FunctionCallingConfig {\n /** Optional. Function calling mode. */\n mode?: FunctionCallingConfigMode;\n /** Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided. */\n allowedFunctionNames?: string[];\n}\n\n/** Tool config.\n\n This config is shared for all tools provided in the request.\n */\nexport declare interface ToolConfig {\n /** Optional. Function calling config. */\n functionCallingConfig?: FunctionCallingConfig;\n}\n\n/** The configuration for the prebuilt speaker to use. */\nexport declare interface PrebuiltVoiceConfig {\n /** The name of the prebuilt voice to use.\n */\n voiceName?: string;\n}\n\n/** The configuration for the voice to use. */\nexport declare interface VoiceConfig {\n /** The configuration for the speaker to use.\n */\n prebuiltVoiceConfig?: PrebuiltVoiceConfig;\n}\n\n/** The speech generation configuration. */\nexport declare interface SpeechConfig {\n /** The configuration for the speaker to use.\n */\n voiceConfig?: VoiceConfig;\n /** Language code (ISO 639. e.g. en-US) for the speech synthesization.\n Only available for Live API.\n */\n languageCode?: string;\n}\n\n/** The thinking features configuration. */\nexport declare interface ThinkingConfig {\n /** Indicates whether to include thoughts in the response. If true, thoughts are returned only if the model supports thought and thoughts are available.\n */\n includeThoughts?: boolean;\n /** Indicates the thinking budget in tokens.\n */\n thinkingBudget?: number;\n}\n\n/** When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. */\nexport declare interface GenerationConfigRoutingConfigAutoRoutingMode {\n /** The model routing preference. */\n modelRoutingPreference?:\n | 'UNKNOWN'\n | 'PRIORITIZE_QUALITY'\n | 'BALANCED'\n | 'PRIORITIZE_COST';\n}\n\n/** When manual routing is set, the specified model will be used directly. */\nexport declare interface GenerationConfigRoutingConfigManualRoutingMode {\n /** The model name to use. Only the public LLM models are accepted. e.g. 'gemini-1.5-pro-001'. */\n modelName?: string;\n}\n\n/** The configuration for routing the request to a specific model. */\nexport declare interface GenerationConfigRoutingConfig {\n /** Automated routing. */\n autoMode?: GenerationConfigRoutingConfigAutoRoutingMode;\n /** Manual routing. */\n manualMode?: GenerationConfigRoutingConfigManualRoutingMode;\n}\n\n/** Optional model configuration parameters.\n\n For more information, see `Content generation parameters\n `_.\n */\nexport declare interface GenerateContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Instructions for the model to steer it toward better performance.\n For example, \"Answer as concisely as possible\" or \"Don't use technical\n terms in your response\".\n */\n systemInstruction?: ContentUnion;\n /** Value that controls the degree of randomness in token selection.\n Lower temperatures are good for prompts that require a less open-ended or\n creative response, while higher temperatures can lead to more diverse or\n creative results.\n */\n temperature?: number;\n /** Tokens are selected from the most to least probable until the sum\n of their probabilities equals this value. Use a lower value for less\n random responses and a higher value for more random responses.\n */\n topP?: number;\n /** For each token selection step, the ``top_k`` tokens with the\n highest probabilities are sampled. Then tokens are further filtered based\n on ``top_p`` with the final token selected using temperature sampling. Use\n a lower number for less random responses and a higher number for more\n random responses.\n */\n topK?: number;\n /** Number of response variations to return.\n */\n candidateCount?: number;\n /** Maximum number of tokens that can be generated in the response.\n */\n maxOutputTokens?: number;\n /** List of strings that tells the model to stop generating text if one\n of the strings is encountered in the response.\n */\n stopSequences?: string[];\n /** Whether to return the log probabilities of the tokens that were\n chosen by the model at each step.\n */\n responseLogprobs?: boolean;\n /** Number of top candidate tokens to return the log probabilities for\n at each generation step.\n */\n logprobs?: number;\n /** Positive values penalize tokens that already appear in the\n generated text, increasing the probability of generating more diverse\n content.\n */\n presencePenalty?: number;\n /** Positive values penalize tokens that repeatedly appear in the\n generated text, increasing the probability of generating more diverse\n content.\n */\n frequencyPenalty?: number;\n /** When ``seed`` is fixed to a specific number, the model makes a best\n effort to provide the same response for repeated requests. By default, a\n random number is used.\n */\n seed?: number;\n /** Output response media type of the generated candidate text.\n */\n responseMimeType?: string;\n /** Schema that the generated candidate text must adhere to.\n */\n responseSchema?: SchemaUnion;\n /** Configuration for model router requests.\n */\n routingConfig?: GenerationConfigRoutingConfig;\n /** Configuration for model selection.\n */\n modelSelectionConfig?: ModelSelectionConfig;\n /** Safety settings in the request to block unsafe content in the\n response.\n */\n safetySettings?: SafetySetting[];\n /** Code that enables the system to interact with external systems to\n perform an action outside of the knowledge and scope of the model.\n */\n tools?: ToolListUnion;\n /** Associates model output to a specific function call.\n */\n toolConfig?: ToolConfig;\n /** Labels with user-defined metadata to break down billed charges. */\n labels?: Record;\n /** Resource name of a context cache that can be used in subsequent\n requests.\n */\n cachedContent?: string;\n /** The requested modalities of the response. Represents the set of\n modalities that the model can return.\n */\n responseModalities?: string[];\n /** If specified, the media resolution specified will be used.\n */\n mediaResolution?: MediaResolution;\n /** The speech generation configuration.\n */\n speechConfig?: SpeechConfigUnion;\n /** If enabled, audio timestamp will be included in the request to the\n model.\n */\n audioTimestamp?: boolean;\n /** The thinking features configuration.\n */\n thinkingConfig?: ThinkingConfig;\n}\n\n/** Config for models.generate_content parameters. */\nexport declare interface GenerateContentParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Content of the request.\n */\n contents: ContentListUnion;\n /** Configuration that contains optional model parameters.\n */\n config?: GenerateContentConfig;\n}\n\n/** Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp */\nexport declare interface GoogleTypeDate {\n /** Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */\n day?: number;\n /** Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */\n month?: number;\n /** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */\n year?: number;\n}\n\n/** Source attributions for content. */\nexport declare interface Citation {\n /** Output only. End index into the content. */\n endIndex?: number;\n /** Output only. License of the attribution. */\n license?: string;\n /** Output only. Publication date of the attribution. */\n publicationDate?: GoogleTypeDate;\n /** Output only. Start index into the content. */\n startIndex?: number;\n /** Output only. Title of the attribution. */\n title?: string;\n /** Output only. Url reference of the attribution. */\n uri?: string;\n}\n\n/** Citation information when the model quotes another source. */\nexport declare interface CitationMetadata {\n /** Contains citation information when the model directly quotes, at\n length, from another source. Can include traditional websites and code\n repositories.\n */\n citations?: Citation[];\n}\n\n/** Chunk from context retrieved by the retrieval tools. */\nexport declare interface GroundingChunkRetrievedContext {\n /** Text of the attribution. */\n text?: string;\n /** Title of the attribution. */\n title?: string;\n /** URI reference of the attribution. */\n uri?: string;\n}\n\n/** Chunk from the web. */\nexport declare interface GroundingChunkWeb {\n /** Domain of the (original) URI. */\n domain?: string;\n /** Title of the chunk. */\n title?: string;\n /** URI reference of the chunk. */\n uri?: string;\n}\n\n/** Grounding chunk. */\nexport declare interface GroundingChunk {\n /** Grounding chunk from context retrieved by the retrieval tools. */\n retrievedContext?: GroundingChunkRetrievedContext;\n /** Grounding chunk from the web. */\n web?: GroundingChunkWeb;\n}\n\n/** Segment of the content. */\nexport declare interface Segment {\n /** Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero. */\n endIndex?: number;\n /** Output only. The index of a Part object within its parent Content object. */\n partIndex?: number;\n /** Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero. */\n startIndex?: number;\n /** Output only. The text corresponding to the segment from the response. */\n text?: string;\n}\n\n/** Grounding support. */\nexport declare interface GroundingSupport {\n /** Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the grounding_chunk_indices. */\n confidenceScores?: number[];\n /** A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim. */\n groundingChunkIndices?: number[];\n /** Segment of the content this support belongs to. */\n segment?: Segment;\n}\n\n/** Metadata related to retrieval in the grounding flow. */\nexport declare interface RetrievalMetadata {\n /** Optional. Score indicating how likely information from Google Search could help answer the prompt. The score is in the range `[0, 1]`, where 0 is the least likely and 1 is the most likely. This score is only populated when Google Search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger Google Search. */\n googleSearchDynamicRetrievalScore?: number;\n}\n\n/** Google search entry point. */\nexport declare interface SearchEntryPoint {\n /** Optional. Web content snippet that can be embedded in a web page or an app webview. */\n renderedContent?: string;\n /** Optional. Base64 encoded JSON representing array of tuple. */\n sdkBlob?: string;\n}\n\n/** Metadata returned to client when grounding is enabled. */\nexport declare interface GroundingMetadata {\n /** List of supporting references retrieved from specified grounding source. */\n groundingChunks?: GroundingChunk[];\n /** Optional. List of grounding support. */\n groundingSupports?: GroundingSupport[];\n /** Optional. Output only. Retrieval metadata. */\n retrievalMetadata?: RetrievalMetadata;\n /** Optional. Queries executed by the retrieval tools. */\n retrievalQueries?: string[];\n /** Optional. Google search entry for the following-up web searches. */\n searchEntryPoint?: SearchEntryPoint;\n /** Optional. Web search queries for the following-up web search. */\n webSearchQueries?: string[];\n}\n\n/** Candidate for the logprobs token and score. */\nexport declare interface LogprobsResultCandidate {\n /** The candidate's log probability. */\n logProbability?: number;\n /** The candidate's token string value. */\n token?: string;\n /** The candidate's token id value. */\n tokenId?: number;\n}\n\n/** Candidates with top log probabilities at each decoding step. */\nexport declare interface LogprobsResultTopCandidates {\n /** Sorted by log probability in descending order. */\n candidates?: LogprobsResultCandidate[];\n}\n\n/** Logprobs Result */\nexport declare interface LogprobsResult {\n /** Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates. */\n chosenCandidates?: LogprobsResultCandidate[];\n /** Length = total number of decoding steps. */\n topCandidates?: LogprobsResultTopCandidates[];\n}\n\n/** Safety rating corresponding to the generated content. */\nexport declare interface SafetyRating {\n /** Output only. Indicates whether the content was filtered out because of this rating. */\n blocked?: boolean;\n /** Output only. Harm category. */\n category?: HarmCategory;\n /** Output only. Harm probability levels in the content. */\n probability?: HarmProbability;\n /** Output only. Harm probability score. */\n probabilityScore?: number;\n /** Output only. Harm severity levels in the content. */\n severity?: HarmSeverity;\n /** Output only. Harm severity score. */\n severityScore?: number;\n}\n\n/** A response candidate generated from the model. */\nexport declare interface Candidate {\n /** Contains the multi-part content of the response.\n */\n content?: Content;\n /** Source attribution of the generated content.\n */\n citationMetadata?: CitationMetadata;\n /** Describes the reason the model stopped generating tokens.\n */\n finishMessage?: string;\n /** Number of tokens for this candidate.\n */\n tokenCount?: number;\n /** The reason why the model stopped generating tokens.\n If empty, the model has not stopped generating the tokens.\n */\n finishReason?: FinishReason;\n /** Output only. Average log probability score of the candidate. */\n avgLogprobs?: number;\n /** Output only. Metadata specifies sources used to ground generated content. */\n groundingMetadata?: GroundingMetadata;\n /** Output only. Index of the candidate. */\n index?: number;\n /** Output only. Log-likelihood scores for the response tokens and top tokens */\n logprobsResult?: LogprobsResult;\n /** Output only. List of ratings for the safety of a response candidate. There is at most one rating per category. */\n safetyRatings?: SafetyRating[];\n}\n\n/** Content filter results for a prompt sent in the request. */\nexport class GenerateContentResponsePromptFeedback {\n /** Output only. Blocked reason. */\n blockReason?: BlockedReason;\n /** Output only. A readable block reason message. */\n blockReasonMessage?: string;\n /** Output only. Safety ratings. */\n safetyRatings?: SafetyRating[];\n}\n\n/** Represents token counting info for a single modality. */\nexport declare interface ModalityTokenCount {\n /** The modality associated with this token count. */\n modality?: MediaModality;\n /** Number of tokens. */\n tokenCount?: number;\n}\n\n/** Usage metadata about response(s). */\nexport class GenerateContentResponseUsageMetadata {\n /** Output only. List of modalities of the cached content in the request input. */\n cacheTokensDetails?: ModalityTokenCount[];\n /** Output only. Number of tokens in the cached part in the input (the cached content). */\n cachedContentTokenCount?: number;\n /** Number of tokens in the response(s). */\n candidatesTokenCount?: number;\n /** Output only. List of modalities that were returned in the response. */\n candidatesTokensDetails?: ModalityTokenCount[];\n /** Number of tokens in the request. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */\n promptTokenCount?: number;\n /** Output only. List of modalities that were processed in the request input. */\n promptTokensDetails?: ModalityTokenCount[];\n /** Output only. Number of tokens present in thoughts output. */\n thoughtsTokenCount?: number;\n /** Output only. Number of tokens present in tool-use prompt(s). */\n toolUsePromptTokenCount?: number;\n /** Output only. List of modalities that were processed for tool-use request inputs. */\n toolUsePromptTokensDetails?: ModalityTokenCount[];\n /** Total token count for prompt, response candidates, and tool-use prompts (if present). */\n totalTokenCount?: number;\n /** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */\n trafficType?: TrafficType;\n}\n\n/** Response message for PredictionService.GenerateContent. */\nexport class GenerateContentResponse {\n /** Response variations returned by the model.\n */\n candidates?: Candidate[];\n /** Timestamp when the request is made to the server.\n */\n createTime?: string;\n /** Identifier for each response.\n */\n responseId?: string;\n /** Output only. The model version used to generate the response. */\n modelVersion?: string;\n /** Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations. */\n promptFeedback?: GenerateContentResponsePromptFeedback;\n /** Usage metadata about the response(s). */\n usageMetadata?: GenerateContentResponseUsageMetadata;\n /**\n * Returns the concatenation of all text parts from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the text from the first\n * one will be returned.\n * If there are non-text parts in the response, the concatenation of all text\n * parts will be returned, and a warning will be logged.\n * If there are thought parts in the response, the concatenation of all text\n * parts excluding the thought parts will be returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'Why is the sky blue?',\n * });\n *\n * console.debug(response.text);\n * ```\n */\n get text(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning text from the first one.',\n );\n }\n let text = '';\n let anyTextPartText = false;\n const nonTextParts = [];\n for (const part of this.candidates?.[0]?.content?.parts ?? []) {\n for (const [fieldName, fieldValue] of Object.entries(part)) {\n if (\n fieldName !== 'text' &&\n fieldName !== 'thought' &&\n (fieldValue !== null || fieldValue !== undefined)\n ) {\n nonTextParts.push(fieldName);\n }\n }\n if (typeof part.text === 'string') {\n if (typeof part.thought === 'boolean' && part.thought) {\n continue;\n }\n anyTextPartText = true;\n text += part.text;\n }\n }\n if (nonTextParts.length > 0) {\n console.warn(\n `there are non-text parts ${nonTextParts} in the response, returning concatenation of all text parts. Please refer to the non text parts for a full response from model.`,\n );\n }\n // part.text === '' is different from part.text is null\n return anyTextPartText ? text : undefined;\n }\n\n /**\n * Returns the function calls from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the function calls from\n * the first one will be returned.\n * If there are no function calls in the response, undefined will be returned.\n *\n * @example\n * ```ts\n * const controlLightFunctionDeclaration: FunctionDeclaration = {\n * name: 'controlLight',\n * parameters: {\n * type: Type.OBJECT,\n * description: 'Set the brightness and color temperature of a room light.',\n * properties: {\n * brightness: {\n * type: Type.NUMBER,\n * description:\n * 'Light level from 0 to 100. Zero is off and 100 is full brightness.',\n * },\n * colorTemperature: {\n * type: Type.STRING,\n * description:\n * 'Color temperature of the light fixture which can be `daylight`, `cool` or `warm`.',\n * },\n * },\n * required: ['brightness', 'colorTemperature'],\n * };\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents: 'Dim the lights so the room feels cozy and warm.',\n * config: {\n * tools: [{functionDeclarations: [controlLightFunctionDeclaration]}],\n * toolConfig: {\n * functionCallingConfig: {\n * mode: FunctionCallingConfigMode.ANY,\n * allowedFunctionNames: ['controlLight'],\n * },\n * },\n * },\n * });\n * console.debug(JSON.stringify(response.functionCalls));\n * ```\n */\n get functionCalls(): FunctionCall[] | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning function calls from the first one.',\n );\n }\n const functionCalls = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.functionCall)\n .map((part) => part.functionCall)\n .filter(\n (functionCall): functionCall is FunctionCall =>\n functionCall !== undefined,\n );\n if (functionCalls?.length === 0) {\n return undefined;\n }\n return functionCalls;\n }\n /**\n * Returns the first executable code from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the executable code from\n * the first one will be returned.\n * If there are no executable code in the response, undefined will be\n * returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.'\n * config: {\n * tools: [{codeExecution: {}}],\n * },\n * });\n *\n * console.debug(response.executableCode);\n * ```\n */\n get executableCode(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning executable code from the first one.',\n );\n }\n const executableCode = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.executableCode)\n .map((part) => part.executableCode)\n .filter(\n (executableCode): executableCode is ExecutableCode =>\n executableCode !== undefined,\n );\n if (executableCode?.length === 0) {\n return undefined;\n }\n\n return executableCode?.[0]?.code;\n }\n /**\n * Returns the first code execution result from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the code execution result from\n * the first one will be returned.\n * If there are no code execution result in the response, undefined will be returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.'\n * config: {\n * tools: [{codeExecution: {}}],\n * },\n * });\n *\n * console.debug(response.codeExecutionResult);\n * ```\n */\n get codeExecutionResult(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning code execution result from the first one.',\n );\n }\n const codeExecutionResult = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.codeExecutionResult)\n .map((part) => part.codeExecutionResult)\n .filter(\n (codeExecutionResult): codeExecutionResult is CodeExecutionResult =>\n codeExecutionResult !== undefined,\n );\n if (codeExecutionResult?.length === 0) {\n return undefined;\n }\n return codeExecutionResult?.[0]?.output;\n }\n}\n\nexport /** Optional parameters for the embed_content method. */\ndeclare interface EmbedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Type of task for which the embedding will be used.\n */\n taskType?: string;\n /** Title for the text. Only applicable when TaskType is\n `RETRIEVAL_DOCUMENT`.\n */\n title?: string;\n /** Reduced dimension for the output embedding. If set,\n excessive values in the output embedding are truncated from the end.\n Supported by newer models since 2024 only. You cannot set this value if\n using the earlier model (`models/embedding-001`).\n */\n outputDimensionality?: number;\n /** Vertex API only. The MIME type of the input.\n */\n mimeType?: string;\n /** Vertex API only. Whether to silently truncate inputs longer than\n the max sequence length. If this option is set to false, oversized inputs\n will lead to an INVALID_ARGUMENT error, similar to other text APIs.\n */\n autoTruncate?: boolean;\n}\n\n/** Parameters for the embed_content method. */\nexport declare interface EmbedContentParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** The content to embed. Only the `parts.text` fields will be counted.\n */\n contents: ContentListUnion;\n /** Configuration that contains optional parameters.\n */\n config?: EmbedContentConfig;\n}\n\n/** Statistics of the input text associated with the result of content embedding. */\nexport declare interface ContentEmbeddingStatistics {\n /** Vertex API only. If the input text was truncated due to having\n a length longer than the allowed maximum input.\n */\n truncated?: boolean;\n /** Vertex API only. Number of tokens of the input text.\n */\n tokenCount?: number;\n}\n\n/** The embedding generated from an input content. */\nexport declare interface ContentEmbedding {\n /** A list of floats representing an embedding.\n */\n values?: number[];\n /** Vertex API only. Statistics of the input text associated with this\n embedding.\n */\n statistics?: ContentEmbeddingStatistics;\n}\n\n/** Request-level metadata for the Vertex Embed Content API. */\nexport declare interface EmbedContentMetadata {\n /** Vertex API only. The total number of billable characters included\n in the request.\n */\n billableCharacterCount?: number;\n}\n\n/** Response for the embed_content method. */\nexport class EmbedContentResponse {\n /** The embeddings for each request, in the same order as provided in\n the batch request.\n */\n embeddings?: ContentEmbedding[];\n /** Vertex API only. Metadata about the request.\n */\n metadata?: EmbedContentMetadata;\n}\n\n/** The config for generating an images. */\nexport declare interface GenerateImagesConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Cloud Storage URI used to store the generated images.\n */\n outputGcsUri?: string;\n /** Description of what to discourage in the generated images.\n */\n negativePrompt?: string;\n /** Number of images to generate.\n */\n numberOfImages?: number;\n /** Aspect ratio of the generated images.\n */\n aspectRatio?: string;\n /** Controls how much the model adheres to the text prompt. Large\n values increase output and prompt alignment, but may compromise image\n quality.\n */\n guidanceScale?: number;\n /** Random seed for image generation. This is not available when\n ``add_watermark`` is set to true.\n */\n seed?: number;\n /** Filter level for safety filtering.\n */\n safetyFilterLevel?: SafetyFilterLevel;\n /** Allows generation of people by the model.\n */\n personGeneration?: PersonGeneration;\n /** Whether to report the safety scores of each generated image and\n the positive prompt in the response.\n */\n includeSafetyAttributes?: boolean;\n /** Whether to include the Responsible AI filter reason if the image\n is filtered out of the response.\n */\n includeRaiReason?: boolean;\n /** Language of the text in the prompt.\n */\n language?: ImagePromptLanguage;\n /** MIME type of the generated image.\n */\n outputMimeType?: string;\n /** Compression quality of the generated image (for ``image/jpeg``\n only).\n */\n outputCompressionQuality?: number;\n /** Whether to add a watermark to the generated images.\n */\n addWatermark?: boolean;\n /** Whether to use the prompt rewriting logic.\n */\n enhancePrompt?: boolean;\n}\n\n/** The parameters for generating images. */\nexport declare interface GenerateImagesParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Text prompt that typically describes the images to output.\n */\n prompt: string;\n /** Configuration for generating images.\n */\n config?: GenerateImagesConfig;\n}\n\n/** An image. */\nexport declare interface Image {\n /** The Cloud Storage URI of the image. ``Image`` can contain a value\n for this field or the ``image_bytes`` field but not both.\n */\n gcsUri?: string;\n /** The image bytes data. ``Image`` can contain a value for this field\n or the ``gcs_uri`` field but not both.\n */\n imageBytes?: string;\n /** The MIME type of the image. */\n mimeType?: string;\n}\n\n/** Safety attributes of a GeneratedImage or the user-provided prompt. */\nexport declare interface SafetyAttributes {\n /** List of RAI categories.\n */\n categories?: string[];\n /** List of scores of each categories.\n */\n scores?: number[];\n /** Internal use only.\n */\n contentType?: string;\n}\n\n/** An output image. */\nexport declare interface GeneratedImage {\n /** The output image data.\n */\n image?: Image;\n /** Responsible AI filter reason if the image is filtered out of the\n response.\n */\n raiFilteredReason?: string;\n /** Safety attributes of the image. Lists of RAI categories and their\n scores of each content.\n */\n safetyAttributes?: SafetyAttributes;\n /** The rewritten prompt used for the image generation if the prompt\n enhancer is enabled.\n */\n enhancedPrompt?: string;\n}\n\n/** The output images response. */\nexport class GenerateImagesResponse {\n /** List of generated images.\n */\n generatedImages?: GeneratedImage[];\n /** Safety attributes of the positive prompt. Only populated if\n ``include_safety_attributes`` is set to True.\n */\n positivePromptSafetyAttributes?: SafetyAttributes;\n}\n\n/** Optional parameters for models.get method. */\nexport declare interface GetModelConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\nexport declare interface GetModelParameters {\n model: string;\n /** Optional parameters for the request. */\n config?: GetModelConfig;\n}\n\n/** An endpoint where you deploy models. */\nexport declare interface Endpoint {\n /** Resource name of the endpoint. */\n name?: string;\n /** ID of the model that's deployed to the endpoint. */\n deployedModelId?: string;\n}\n\n/** A tuned machine learning model. */\nexport declare interface TunedModelInfo {\n /** ID of the base model that you want to tune. */\n baseModel?: string;\n /** Date and time when the base model was created. */\n createTime?: string;\n /** Date and time when the base model was last updated. */\n updateTime?: string;\n}\n\n/** A trained machine learning model. */\nexport declare interface Model {\n /** Resource name of the model. */\n name?: string;\n /** Display name of the model. */\n displayName?: string;\n /** Description of the model. */\n description?: string;\n /** Version ID of the model. A new version is committed when a new\n model version is uploaded or trained under an existing model ID. The\n version ID is an auto-incrementing decimal number in string\n representation. */\n version?: string;\n /** List of deployed models created from this base model. Note that a\n model could have been deployed to endpoints in different locations. */\n endpoints?: Endpoint[];\n /** Labels with user-defined metadata to organize your models. */\n labels?: Record;\n /** Information about the tuned model from the base model. */\n tunedModelInfo?: TunedModelInfo;\n /** The maximum number of input tokens that the model can handle. */\n inputTokenLimit?: number;\n /** The maximum number of output tokens that the model can generate. */\n outputTokenLimit?: number;\n /** List of actions that are supported by the model. */\n supportedActions?: string[];\n}\n\n/** Generation config. */\nexport declare interface GenerationConfig {\n /** Optional. If enabled, audio timestamp will be included in the request to the model. */\n audioTimestamp?: boolean;\n /** Optional. Number of candidates to generate. */\n candidateCount?: number;\n /** Optional. Frequency penalties. */\n frequencyPenalty?: number;\n /** Optional. Logit probabilities. */\n logprobs?: number;\n /** Optional. The maximum number of output tokens to generate per message. */\n maxOutputTokens?: number;\n /** Optional. If specified, the media resolution specified will be used. */\n mediaResolution?: MediaResolution;\n /** Optional. Positive penalties. */\n presencePenalty?: number;\n /** Optional. If true, export the logprobs results in response. */\n responseLogprobs?: boolean;\n /** Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature. */\n responseMimeType?: string;\n /** Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response. */\n responseSchema?: Schema;\n /** Optional. Routing configuration. */\n routingConfig?: GenerationConfigRoutingConfig;\n /** Optional. Seed. */\n seed?: number;\n /** Optional. Stop sequences. */\n stopSequences?: string[];\n /** Optional. Controls the randomness of predictions. */\n temperature?: number;\n /** Optional. If specified, top-k sampling will be used. */\n topK?: number;\n /** Optional. If specified, nucleus sampling will be used. */\n topP?: number;\n}\n\n/** Config for the count_tokens method. */\nexport declare interface CountTokensConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Instructions for the model to steer it toward better performance.\n */\n systemInstruction?: ContentUnion;\n /** Code that enables the system to interact with external systems to\n perform an action outside of the knowledge and scope of the model.\n */\n tools?: Tool[];\n /** Configuration that the model uses to generate the response. Not\n supported by the Gemini Developer API.\n */\n generationConfig?: GenerationConfig;\n}\n\n/** Parameters for counting tokens. */\nexport declare interface CountTokensParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Input content. */\n contents: ContentListUnion;\n /** Configuration for counting tokens. */\n config?: CountTokensConfig;\n}\n\n/** Response for counting tokens. */\nexport class CountTokensResponse {\n /** Total number of tokens. */\n totalTokens?: number;\n /** Number of tokens in the cached part of the prompt (the cached content). */\n cachedContentTokenCount?: number;\n}\n\n/** Optional parameters for computing tokens. */\nexport declare interface ComputeTokensConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for computing tokens. */\nexport declare interface ComputeTokensParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Input content. */\n contents: ContentListUnion;\n /** Optional parameters for the request.\n */\n config?: ComputeTokensConfig;\n}\n\n/** Tokens info with a list of tokens and the corresponding list of token ids. */\nexport declare interface TokensInfo {\n /** Optional. Optional fields for the role from the corresponding Content. */\n role?: string;\n /** A list of token ids from the input. */\n tokenIds?: string[];\n /** A list of tokens from the input. */\n tokens?: string[];\n}\n\n/** Response for computing tokens. */\nexport class ComputeTokensResponse {\n /** Lists of tokens info from the input. A ComputeTokensRequest could have multiple instances with a prompt in each instance. We also need to return lists of tokens info for the request with multiple instances. */\n tokensInfo?: TokensInfo[];\n}\n\n/** Configuration for generating videos. */\nexport declare interface GenerateVideosConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Number of output videos. */\n numberOfVideos?: number;\n /** The gcs bucket where to save the generated videos. */\n outputGcsUri?: string;\n /** Frames per second for video generation. */\n fps?: number;\n /** Duration of the clip for video generation in seconds. */\n durationSeconds?: number;\n /** The RNG seed. If RNG seed is exactly same for each request with unchanged inputs, the prediction results will be consistent. Otherwise, a random RNG seed will be used each time to produce a different result. */\n seed?: number;\n /** The aspect ratio for the generated video. 16:9 (landscape) and 9:16 (portrait) are supported. */\n aspectRatio?: string;\n /** The resolution for the generated video. 1280x720, 1920x1080 are supported. */\n resolution?: string;\n /** Whether allow to generate person videos, and restrict to specific ages. Supported values are: dont_allow, allow_adult. */\n personGeneration?: string;\n /** The pubsub topic where to publish the video generation progress. */\n pubsubTopic?: string;\n /** Optional field in addition to the text content. Negative prompts can be explicitly stated here to help generate the video. */\n negativePrompt?: string;\n /** Whether to use the prompt rewriting logic. */\n enhancePrompt?: boolean;\n}\n\n/** Class that represents the parameters for generating an image. */\nexport declare interface GenerateVideosParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** The text prompt for generating the videos. Optional for image to video use cases. */\n prompt?: string;\n /** The input image for generating the videos.\n Optional if prompt is provided. */\n image?: Image;\n /** Configuration for generating videos. */\n config?: GenerateVideosConfig;\n}\n\n/** A generated video. */\nexport declare interface Video {\n /** Path to another storage. */\n uri?: string;\n /** Video bytes. */\n videoBytes?: string;\n /** Video encoding, for example \"video/mp4\". */\n mimeType?: string;\n}\n\n/** A generated video. */\nexport declare interface GeneratedVideo {\n /** The output video */\n video?: Video;\n}\n\n/** Response with generated videos. */\nexport class GenerateVideosResponse {\n /** List of the generated videos */\n generatedVideos?: GeneratedVideo[];\n /** Returns if any videos were filtered due to RAI policies. */\n raiMediaFilteredCount?: number;\n /** Returns rai failure reasons if any. */\n raiMediaFilteredReasons?: string[];\n}\n\n/** A video generation operation. */\nexport declare interface GenerateVideosOperation {\n /** The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. */\n name?: string;\n /** Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. */\n metadata?: Record;\n /** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */\n done?: boolean;\n /** The error result of the operation in case of failure or cancellation. */\n error?: Record;\n /** The generated videos. */\n response?: GenerateVideosResponse;\n}\n\n/** Optional configuration for cached content creation. */\nexport declare interface CreateCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: \"3.5s\". */\n ttl?: string;\n /** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */\n expireTime?: string;\n /** The user-generated meaningful display name of the cached content.\n */\n displayName?: string;\n /** The content to cache.\n */\n contents?: ContentListUnion;\n /** Developer set system instruction.\n */\n systemInstruction?: ContentUnion;\n /** A list of `Tools` the model may use to generate the next response.\n */\n tools?: Tool[];\n /** Configuration for the tools to use. This config is shared for all tools.\n */\n toolConfig?: ToolConfig;\n}\n\n/** Parameters for caches.create method. */\nexport declare interface CreateCachedContentParameters {\n /** ID of the model to use. Example: gemini-1.5-flash */\n model: string;\n /** Configuration that contains optional parameters.\n */\n config?: CreateCachedContentConfig;\n}\n\n/** Metadata on the usage of the cached content. */\nexport declare interface CachedContentUsageMetadata {\n /** Duration of audio in seconds. */\n audioDurationSeconds?: number;\n /** Number of images. */\n imageCount?: number;\n /** Number of text characters. */\n textCount?: number;\n /** Total number of tokens that the cached content consumes. */\n totalTokenCount?: number;\n /** Duration of video in seconds. */\n videoDurationSeconds?: number;\n}\n\n/** A resource used in LLM queries for users to explicitly specify what to cache. */\nexport declare interface CachedContent {\n /** The server-generated resource name of the cached content. */\n name?: string;\n /** The user-generated meaningful display name of the cached content. */\n displayName?: string;\n /** The name of the publisher model to use for cached content. */\n model?: string;\n /** Creation time of the cache entry. */\n createTime?: string;\n /** When the cache entry was last updated in UTC time. */\n updateTime?: string;\n /** Expiration time of the cached content. */\n expireTime?: string;\n /** Metadata on the usage of the cached content. */\n usageMetadata?: CachedContentUsageMetadata;\n}\n\n/** Optional parameters for caches.get method. */\nexport declare interface GetCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for caches.get method. */\nexport declare interface GetCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Optional parameters for the request.\n */\n config?: GetCachedContentConfig;\n}\n\n/** Optional parameters for caches.delete method. */\nexport declare interface DeleteCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for caches.delete method. */\nexport declare interface DeleteCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Optional parameters for the request.\n */\n config?: DeleteCachedContentConfig;\n}\n\n/** Empty response for caches.delete method. */\nexport class DeleteCachedContentResponse {}\n\n/** Optional parameters for caches.update method. */\nexport declare interface UpdateCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: \"3.5s\". */\n ttl?: string;\n /** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */\n expireTime?: string;\n}\n\nexport declare interface UpdateCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Configuration that contains optional parameters.\n */\n config?: UpdateCachedContentConfig;\n}\n\n/** Config for caches.list method. */\nexport declare interface ListCachedContentsConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n pageSize?: number;\n pageToken?: string;\n}\n\n/** Parameters for caches.list method. */\nexport declare interface ListCachedContentsParameters {\n /** Configuration that contains optional parameters.\n */\n config?: ListCachedContentsConfig;\n}\n\nexport class ListCachedContentsResponse {\n nextPageToken?: string;\n /** List of cached contents.\n */\n cachedContents?: CachedContent[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface ListFilesConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n pageSize?: number;\n pageToken?: string;\n}\n\n/** Generates the parameters for the list method. */\nexport declare interface ListFilesParameters {\n /** Used to override the default configuration. */\n config?: ListFilesConfig;\n}\n\n/** Status of a File that uses a common error model. */\nexport declare interface FileStatus {\n /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */\n details?: Record[];\n /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */\n message?: string;\n /** The status code. 0 for OK, 1 for CANCELLED */\n code?: number;\n}\n\n/** A file uploaded to the API. */\nexport declare interface File {\n /** The `File` resource name. The ID (name excluding the \"files/\" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be generated. Example: `files/123-456` */\n name?: string;\n /** Optional. The human-readable display name for the `File`. The display name must be no more than 512 characters in length, including spaces. Example: 'Welcome Image' */\n displayName?: string;\n /** Output only. MIME type of the file. */\n mimeType?: string;\n /** Output only. Size of the file in bytes. */\n sizeBytes?: string;\n /** Output only. The timestamp of when the `File` was created. */\n createTime?: string;\n /** Output only. The timestamp of when the `File` will be deleted. Only set if the `File` is scheduled to expire. */\n expirationTime?: string;\n /** Output only. The timestamp of when the `File` was last updated. */\n updateTime?: string;\n /** Output only. SHA-256 hash of the uploaded bytes. The hash value is encoded in base64 format. */\n sha256Hash?: string;\n /** Output only. The URI of the `File`. */\n uri?: string;\n /** Output only. The URI of the `File`, only set for downloadable (generated) files. */\n downloadUri?: string;\n /** Output only. Processing state of the File. */\n state?: FileState;\n /** Output only. The source of the `File`. */\n source?: FileSource;\n /** Output only. Metadata for a video. */\n videoMetadata?: Record;\n /** Output only. Error status if File processing failed. */\n error?: FileStatus;\n}\n\n/** Response for the list files method. */\nexport class ListFilesResponse {\n /** A token to retrieve next page of results. */\n nextPageToken?: string;\n /** The list of files. */\n files?: File[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface CreateFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the private _create method. */\nexport declare interface CreateFileParameters {\n /** The file to be uploaded.\n mime_type: (Required) The MIME type of the file. Must be provided.\n name: (Optional) The name of the file in the destination (e.g.\n 'files/sample-image').\n display_name: (Optional) The display name of the file.\n */\n file: File;\n /** Used to override the default configuration. */\n config?: CreateFileConfig;\n}\n\n/** A wrapper class for the http response. */\nexport class HttpResponse {\n /** Used to retain the processed HTTP headers in the response. */\n headers?: Record;\n /**\n * The original http response.\n */\n responseInternal: Response;\n\n constructor(response: Response) {\n // Process the headers.\n const headers: Record = {};\n for (const pair of response.headers.entries()) {\n headers[pair[0]] = pair[1];\n }\n this.headers = headers;\n\n // Keep the original response.\n this.responseInternal = response;\n }\n\n json(): Promise {\n return this.responseInternal.json();\n }\n}\n\n/** Callbacks for the live API. */\nexport interface LiveCallbacks {\n /**\n * Called when the websocket connection is established.\n */\n onopen?: (() => void) | null;\n /**\n * Called when a message is received from the server.\n */\n onmessage: (e: LiveServerMessage) => void;\n /**\n * Called when an error occurs.\n */\n onerror?: ((e: ErrorEvent) => void) | null;\n /**\n * Called when the websocket connection is closed.\n */\n onclose?: ((e: CloseEvent) => void) | null;\n}\n\n/** Parameters for the upload file method. */\nexport interface UploadFileParameters {\n /** The string path to the file to be uploaded or a Blob object. */\n file: string | globalThis.Blob;\n /** Configuration that contains optional parameters. */\n config?: UploadFileConfig;\n}\n/** Response for the create file method. */\nexport class CreateFileResponse {\n /** Used to retain the full HTTP response. */\n sdkHttpResponse?: HttpResponse;\n}\n\n/** Used to override the default configuration. */\nexport declare interface GetFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the get method. */\nexport declare interface GetFileParameters {\n /** The name identifier for the file to retrieve. */\n name: string;\n /** Used to override the default configuration. */\n config?: GetFileConfig;\n}\n\n/** Used to override the default configuration. */\nexport declare interface DeleteFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the get method. */\nexport declare interface DeleteFileParameters {\n /** The name identifier for the file to be deleted. */\n name: string;\n /** Used to override the default configuration. */\n config?: DeleteFileConfig;\n}\n\n/** Response for the delete file method. */\nexport class DeleteFileResponse {}\n\nexport declare interface GetOperationConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for the GET method. */\nexport declare interface GetOperationParameters {\n /** The server-assigned name for the operation. */\n operationName: string;\n /** Used to override the default configuration. */\n config?: GetOperationConfig;\n}\n\nexport declare interface FetchPredictOperationConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for the fetchPredictOperation method. */\nexport declare interface FetchPredictOperationParameters {\n /** The server-assigned name for the operation. */\n operationName: string;\n resourceName: string;\n /** Used to override the default configuration. */\n config?: FetchPredictOperationConfig;\n}\n\nexport declare interface TestTableItem {\n /** The name of the test. This is used to derive the replay id. */\n name?: string;\n /** The parameters to the test. Use pydantic models. */\n parameters?: Record;\n /** Expects an exception for MLDev matching the string. */\n exceptionIfMldev?: string;\n /** Expects an exception for Vertex matching the string. */\n exceptionIfVertex?: string;\n /** Use if you don't want to use the default replay id which is derived from the test name. */\n overrideReplayId?: string;\n /** True if the parameters contain an unsupported union type. This test will be skipped for languages that do not support the union type. */\n hasUnion?: boolean;\n /** When set to a reason string, this test will be skipped in the API mode. Use this flag for tests that can not be reproduced with the real API. E.g. a test that deletes a resource. */\n skipInApiMode?: string;\n /** Keys to ignore when comparing the request and response. This is useful for tests that are not deterministic. */\n ignoreKeys?: string[];\n}\n\nexport declare interface TestTableFile {\n comment?: string;\n testMethod?: string;\n parameterNames?: string[];\n testTable?: TestTableItem[];\n}\n\n/** Represents a single request in a replay. */\nexport declare interface ReplayRequest {\n method?: string;\n url?: string;\n headers?: Record;\n bodySegments?: Record[];\n}\n\n/** Represents a single response in a replay. */\nexport class ReplayResponse {\n statusCode?: number;\n headers?: Record;\n bodySegments?: Record[];\n sdkResponseSegments?: Record[];\n}\n\n/** Represents a single interaction, request and response in a replay. */\nexport declare interface ReplayInteraction {\n request?: ReplayRequest;\n response?: ReplayResponse;\n}\n\n/** Represents a recorded session. */\nexport declare interface ReplayFile {\n replayId?: string;\n interactions?: ReplayInteraction[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface UploadFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The name of the file in the destination (e.g., 'files/sample-image'. If not provided one will be generated. */\n name?: string;\n /** mime_type: The MIME type of the file. If not provided, it will be inferred from the file extension. */\n mimeType?: string;\n /** Optional display name of the file. */\n displayName?: string;\n}\n\n/** Used to override the default configuration. */\nexport declare interface DownloadFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Configuration for upscaling an image.\n\n For more information on this configuration, refer to\n the `Imagen API reference documentation\n `_.\n */\nexport declare interface UpscaleImageConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Whether to include a reason for filtered-out images in the\n response. */\n includeRaiReason?: boolean;\n /** The image format that the output should be saved as. */\n outputMimeType?: string;\n /** The level of compression if the ``output_mime_type`` is\n ``image/jpeg``. */\n outputCompressionQuality?: number;\n}\n\n/** User-facing config UpscaleImageParameters. */\nexport declare interface UpscaleImageParameters {\n /** The model to use. */\n model: string;\n /** The input image to upscale. */\n image: Image;\n /** The factor to upscale the image (x2 or x4). */\n upscaleFactor: string;\n /** Configuration for upscaling. */\n config?: UpscaleImageConfig;\n}\n\n/** A raw reference image.\n\n A raw reference image represents the base image to edit, provided by the user.\n It can optionally be provided in addition to a mask reference image or\n a style reference image.\n */\nexport declare interface RawReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n}\n\n/** Configuration for a Mask reference image. */\nexport declare interface MaskReferenceConfig {\n /** Prompts the model to generate a mask instead of you needing to\n provide one (unless MASK_MODE_USER_PROVIDED is used). */\n maskMode?: MaskReferenceMode;\n /** A list of up to 5 class ids to use for semantic segmentation.\n Automatically creates an image mask based on specific objects. */\n segmentationClasses?: number[];\n /** Dilation percentage of the mask provided.\n Float between 0 and 1. */\n maskDilation?: number;\n}\n\n/** A mask reference image.\n\n This encapsulates either a mask image provided by the user and configs for\n the user provided mask, or only config parameters for the model to generate\n a mask.\n\n A mask image is an image whose non-zero values indicate where to edit the base\n image. If the user provides a mask image, the mask must be in the same\n dimensions as the raw image.\n */\nexport declare interface MaskReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the mask reference image. */\n config?: MaskReferenceConfig;\n}\n\n/** Configuration for a Control reference image. */\nexport declare interface ControlReferenceConfig {\n /** The type of control reference image to use. */\n controlType?: ControlReferenceType;\n /** Defaults to False. When set to True, the control image will be\n computed by the model based on the control type. When set to False,\n the control image must be provided by the user. */\n enableControlImageComputation?: boolean;\n}\n\n/** A control reference image.\n\n The image of the control reference image is either a control image provided\n by the user, or a regular image which the backend will use to generate a\n control image of. In the case of the latter, the\n enable_control_image_computation field in the config should be set to True.\n\n A control image is an image that represents a sketch image of areas for the\n model to fill in based on the prompt.\n */\nexport declare interface ControlReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the control reference image. */\n config?: ControlReferenceConfig;\n}\n\n/** Configuration for a Style reference image. */\nexport declare interface StyleReferenceConfig {\n /** A text description of the style to use for the generated image. */\n styleDescription?: string;\n}\n\n/** A style reference image.\n\n This encapsulates a style reference image provided by the user, and\n additionally optional config parameters for the style reference image.\n\n A raw reference image can also be provided as a destination for the style to\n be applied to.\n */\nexport declare interface StyleReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the style reference image. */\n config?: StyleReferenceConfig;\n}\n\n/** Configuration for a Subject reference image. */\nexport declare interface SubjectReferenceConfig {\n /** The subject type of a subject reference image. */\n subjectType?: SubjectReferenceType;\n /** Subject description for the image. */\n subjectDescription?: string;\n}\n\n/** A subject reference image.\n\n This encapsulates a subject reference image provided by the user, and\n additionally optional config parameters for the subject reference image.\n\n A raw reference image can also be provided as a destination for the subject to\n be applied to.\n */\nexport declare interface SubjectReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the subject reference image. */\n config?: SubjectReferenceConfig;\n}\n\n/** Sent in response to a `LiveGenerateContentSetup` message from the client. */\nexport declare interface LiveServerSetupComplete {}\n\n/** Incremental server update generated by the model in response to client messages.\n\n Content is generated as quickly as possible, and not in real time. Clients\n may choose to buffer and play it out in real time.\n */\nexport declare interface LiveServerContent {\n /** The content that the model has generated as part of the current conversation with the user. */\n modelTurn?: Content;\n /** If true, indicates that the model is done generating. Generation will only start in response to additional client messages. Can be set alongside `content`, indicating that the `content` is the last in the turn. */\n turnComplete?: boolean;\n /** If true, indicates that a client message has interrupted current model generation. If the client is playing out the content in realtime, this is a good signal to stop and empty the current queue. */\n interrupted?: boolean;\n /** If true, indicates that the model is done generating. When model is\n interrupted while generating there will be no generation_complete message\n in interrupted turn, it will go through interrupted > turn_complete.\n When model assumes realtime playback there will be delay between\n generation_complete and turn_complete that is caused by model\n waiting for playback to finish. If true, indicates that the model\n has finished generating all content. This is a signal to the client\n that it can stop sending messages. */\n generationComplete?: boolean;\n}\n\n/** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */\nexport declare interface LiveServerToolCall {\n /** The function call to be executed. */\n functionCalls?: FunctionCall[];\n}\n\n/** Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled.\n\n If there were side-effects to those tool calls, clients may attempt to undo\n the tool calls. This message occurs only in cases where the clients interrupt\n server turns.\n */\nexport declare interface LiveServerToolCallCancellation {\n /** The ids of the tool calls to be cancelled. */\n ids?: string[];\n}\n\n/** Usage metadata about response(s). */\nexport declare interface UsageMetadata {\n /** Number of tokens in the prompt. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */\n promptTokenCount?: number;\n /** Number of tokens in the cached part of the prompt (the cached content). */\n cachedContentTokenCount?: number;\n /** Total number of tokens across all the generated response candidates. */\n responseTokenCount?: number;\n /** Number of tokens present in tool-use prompt(s). */\n toolUsePromptTokenCount?: number;\n /** Number of tokens of thoughts for thinking models. */\n thoughtsTokenCount?: number;\n /** Total token count for prompt, response candidates, and tool-use prompts(if present). */\n totalTokenCount?: number;\n /** List of modalities that were processed in the request input. */\n promptTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were processed in the cache input. */\n cacheTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were returned in the response. */\n responseTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were processed in the tool-use prompt. */\n toolUsePromptTokensDetails?: ModalityTokenCount[];\n /** Traffic type. This shows whether a request consumes Pay-As-You-Go\n or Provisioned Throughput quota. */\n trafficType?: TrafficType;\n}\n\n/** Server will not be able to service client soon. */\nexport declare interface LiveServerGoAway {\n /** The remaining time before the connection will be terminated as ABORTED. The minimal time returned here is specified differently together with the rate limits for a given model. */\n timeLeft?: string;\n}\n\n/** Update of the session resumption state.\n\n Only sent if `session_resumption` was set in the connection config.\n */\nexport declare interface LiveServerSessionResumptionUpdate {\n /** New handle that represents state that can be resumed. Empty if `resumable`=false. */\n newHandle?: string;\n /** True if session can be resumed at this point. It might be not possible to resume session at some points. In that case we send update empty new_handle and resumable=false. Example of such case could be model executing function calls or just generating. Resuming session (using previous session token) in such state will result in some data loss. */\n resumable?: boolean;\n /** Index of last message sent by client that is included in state represented by this SessionResumptionToken. Only sent when `SessionResumptionConfig.transparent` is set.\n\nPresence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `SessionResmumptionTokenUpdate`. This field will enable them to limit buffering (avoid keeping all requests in RAM).\n\nNote: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames arelikely not needed. */\n lastConsumedClientMessageIndex?: string;\n}\n\n/** Response message for API call. */\nexport declare interface LiveServerMessage {\n /** Sent in response to a `LiveClientSetup` message from the client. */\n setupComplete?: LiveServerSetupComplete;\n /** Content generated by the model in response to client messages. */\n serverContent?: LiveServerContent;\n /** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */\n toolCall?: LiveServerToolCall;\n /** Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled. */\n toolCallCancellation?: LiveServerToolCallCancellation;\n /** Usage metadata about model response(s). */\n usageMetadata?: UsageMetadata;\n /** Server will disconnect soon. */\n goAway?: LiveServerGoAway;\n /** Update of the session resumption state. */\n sessionResumptionUpdate?: LiveServerSessionResumptionUpdate;\n}\n\n/** Configures automatic detection of activity. */\nexport declare interface AutomaticActivityDetection {\n /** If enabled, detected voice and text input count as activity. If disabled, the client must send activity signals. */\n disabled?: boolean;\n /** Determines how likely speech is to be detected. */\n startOfSpeechSensitivity?: StartSensitivity;\n /** Determines how likely detected speech is ended. */\n endOfSpeechSensitivity?: EndSensitivity;\n /** The required duration of detected speech before start-of-speech is committed. The lower this value the more sensitive the start-of-speech detection is and the shorter speech can be recognized. However, this also increases the probability of false positives. */\n prefixPaddingMs?: number;\n /** The required duration of detected non-speech (e.g. silence) before end-of-speech is committed. The larger this value, the longer speech gaps can be without interrupting the user's activity but this will increase the model's latency. */\n silenceDurationMs?: number;\n}\n\n/** Marks the end of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface RealtimeInputConfig {\n /** If not set, automatic activity detection is enabled by default. If automatic voice detection is disabled, the client must send activity signals. */\n automaticActivityDetection?: AutomaticActivityDetection;\n /** Defines what effect activity has. */\n activityHandling?: ActivityHandling;\n /** Defines which input is included in the user's turn. */\n turnCoverage?: TurnCoverage;\n}\n\n/** Configuration of session resumption mechanism.\n\n Included in `LiveConnectConfig.session_resumption`. If included server\n will send `LiveServerSessionResumptionUpdate` messages.\n */\nexport declare interface SessionResumptionConfig {\n /** Session resumption handle of previous session (session to restore).\n\nIf not present new session will be started. */\n handle?: string;\n /** If set the server will send `last_consumed_client_message_index` in the `session_resumption_update` messages to allow for transparent reconnections. */\n transparent?: boolean;\n}\n\n/** Context window will be truncated by keeping only suffix of it.\n\n Context window will always be cut at start of USER role turn. System\n instructions and `BidiGenerateContentSetup.prefix_turns` will not be\n subject to the sliding window mechanism, they will always stay at the\n beginning of context window.\n */\nexport declare interface SlidingWindow {\n /** Session reduction target -- how many tokens we should keep. Window shortening operation has some latency costs, so we should avoid running it on every turn. Should be < trigger_tokens. If not set, trigger_tokens/2 is assumed. */\n targetTokens?: string;\n}\n\n/** Enables context window compression -- mechanism managing model context window so it does not exceed given length. */\nexport declare interface ContextWindowCompressionConfig {\n /** Number of tokens (before running turn) that triggers context window compression mechanism. */\n triggerTokens?: string;\n /** Sliding window compression mechanism. */\n slidingWindow?: SlidingWindow;\n}\n\n/** The audio transcription configuration in Setup. */\nexport declare interface AudioTranscriptionConfig {}\n\n/** Message contains configuration that will apply for the duration of the streaming session. */\nexport declare interface LiveClientSetup {\n /** \n The fully qualified name of the publisher model or tuned model endpoint to\n use.\n */\n model?: string;\n /** The generation configuration for the session.\n Note: only a subset of fields are supported.\n */\n generationConfig?: GenerationConfig;\n /** The user provided system instructions for the model.\n Note: only text should be used in parts and content in each part will be\n in a separate paragraph. */\n systemInstruction?: ContentUnion;\n /** A list of `Tools` the model may use to generate the next response.\n\n A `Tool` is a piece of code that enables the system to interact with\n external systems to perform an action, or set of actions, outside of\n knowledge and scope of the model. */\n tools?: ToolListUnion;\n /** Configures the realtime input behavior in BidiGenerateContent. */\n realtimeInputConfig?: RealtimeInputConfig;\n /** Configures session resumption mechanism.\n\n If included server will send SessionResumptionUpdate messages. */\n sessionResumption?: SessionResumptionConfig;\n /** Configures context window compression mechanism.\n\n If included, server will compress context window to fit into given length. */\n contextWindowCompression?: ContextWindowCompressionConfig;\n}\n\n/** Incremental update of the current conversation delivered from the client.\n\n All the content here will unconditionally be appended to the conversation\n history and used as part of the prompt to the model to generate content.\n\n A message here will interrupt any current model generation.\n */\nexport declare interface LiveClientContent {\n /** The content appended to the current conversation with the model.\n\n For single-turn queries, this is a single instance. For multi-turn\n queries, this is a repeated field that contains conversation history and\n latest request.\n */\n turns?: Content[];\n /** If true, indicates that the server content generation should start with\n the currently accumulated prompt. Otherwise, the server will await\n additional messages before starting generation. */\n turnComplete?: boolean;\n}\n\n/** Marks the start of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface ActivityStart {}\n\n/** Marks the end of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface ActivityEnd {}\n\n/** User input that is sent in real time.\n\n This is different from `LiveClientContent` in a few ways:\n\n - Can be sent continuously without interruption to model generation.\n - If there is a need to mix data interleaved across the\n `LiveClientContent` and the `LiveClientRealtimeInput`, server attempts to\n optimize for best response, but there are no guarantees.\n - End of turn is not explicitly specified, but is rather derived from user\n activity (for example, end of speech).\n - Even before the end of turn, the data is processed incrementally\n to optimize for a fast start of the response from the model.\n - Is always assumed to be the user's input (cannot be used to populate\n conversation history).\n */\nexport declare interface LiveClientRealtimeInput {\n /** Inlined bytes data for media input. */\n mediaChunks?: Blob[];\n /** Marks the start of user activity. */\n activityStart?: ActivityStart;\n /** Marks the end of user activity. */\n activityEnd?: ActivityEnd;\n}\n\n/** Client generated response to a `ToolCall` received from the server.\n\n Individual `FunctionResponse` objects are matched to the respective\n `FunctionCall` objects by the `id` field.\n\n Note that in the unary and server-streaming GenerateContent APIs function\n calling happens by exchanging the `Content` parts, while in the bidi\n GenerateContent APIs function calling happens over this dedicated set of\n messages.\n */\nexport class LiveClientToolResponse {\n /** The response to the function calls. */\n functionResponses?: FunctionResponse[];\n}\n\n/** Messages sent by the client in the API call. */\nexport declare interface LiveClientMessage {\n /** Message to be sent by the system when connecting to the API. SDK users should not send this message. */\n setup?: LiveClientSetup;\n /** Incremental update of the current conversation delivered from the client. */\n clientContent?: LiveClientContent;\n /** User input that is sent in real time. */\n realtimeInput?: LiveClientRealtimeInput;\n /** Response to a `ToolCallMessage` received from the server. */\n toolResponse?: LiveClientToolResponse;\n}\n\n/** Session config for the API connection. */\nexport declare interface LiveConnectConfig {\n /** The generation configuration for the session. */\n generationConfig?: GenerationConfig;\n /** The requested modalities of the response. Represents the set of\n modalities that the model can return. Defaults to AUDIO if not specified.\n */\n responseModalities?: Modality[];\n /** The speech generation configuration.\n */\n speechConfig?: SpeechConfig;\n /** The user provided system instructions for the model.\n Note: only text should be used in parts and content in each part will be\n in a separate paragraph. */\n systemInstruction?: ContentUnion;\n /** A list of `Tools` the model may use to generate the next response.\n\n A `Tool` is a piece of code that enables the system to interact with\n external systems to perform an action, or set of actions, outside of\n knowledge and scope of the model. */\n tools?: ToolListUnion;\n /** Configures session resumption mechanism.\n\nIf included the server will send SessionResumptionUpdate messages. */\n sessionResumption?: SessionResumptionConfig;\n /** Configures the realtime input behavior in BidiGenerateContent. */\n realtimeInputConfig?: RealtimeInputConfig;\n /** Configures context window compression mechanism.\n\n If included, server will compress context window to fit into given length. */\n contextWindowCompression?: ContextWindowCompressionConfig;\n}\n\n/** Parameters for connecting to the live API. */\nexport declare interface LiveConnectParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** callbacks */\n callbacks: LiveCallbacks;\n /** Optional configuration parameters for the request.\n */\n config?: LiveConnectConfig;\n}\n\n/** Parameters for initializing a new chat session.\n\n These parameters are used when creating a chat session with the\n `chats.create()` method.\n */\nexport declare interface CreateChatParameters {\n /** The name of the model to use for the chat session.\n\n For example: 'gemini-2.0-flash', 'gemini-1.5-pro', etc. See gemini API\n docs to find the available models.\n */\n model: string;\n /** Config for the entire chat session.\n\n This config applies to all requests within the session\n unless overridden by a per-request `config` in `SendMessageParameters`.\n */\n config?: GenerateContentConfig;\n /** The initial conversation history for the chat session.\n\n This allows you to start the chat with a pre-existing history. The history\n must be a list of `Content` alternating between 'user' and 'model' roles.\n It should start with a 'user' message.\n */\n history?: Content[];\n}\n\n/** Parameters for sending a message within a chat session.\n\n These parameters are used with the `chat.sendMessage()` method.\n */\nexport declare interface SendMessageParameters {\n /** The message to send to the model.\n\n The SDK will combine all parts into a single 'user' content to send to\n the model.\n */\n message: PartListUnion;\n /** Config for this specific request.\n\n Please note that the per-request config does not change the chat level\n config, nor inherit from it. If you intend to use some values from the\n chat's default config, you must explicitly copy them into this per-request\n config.\n */\n config?: GenerateContentConfig;\n}\n\n/** Parameters for sending client content to the live API. */\nexport declare interface LiveSendClientContentParameters {\n /** Client content to send to the session. */\n turns?: ContentListUnion;\n /** If true, indicates that the server content generation should start with\n the currently accumulated prompt. Otherwise, the server will await\n additional messages before starting generation. */\n turnComplete?: boolean;\n}\n\n/** Parameters for sending realtime input to the live API. */\nexport declare interface LiveSendRealtimeInputParameters {\n /** Realtime input to send to the session. */\n media: Blob;\n /** Marks the start of user activity. */\n activityStart?: ActivityStart;\n /** Marks the end of user activity. */\n activityEnd?: ActivityEnd;\n}\n\n/** Parameters for sending tool responses to the live API. */\nexport class LiveSendToolResponseParameters {\n /** Tool responses to send to the session. */\n functionResponses: FunctionResponse[] | FunctionResponse = [];\n}\n\n/** Parameters for the get method of the operations module. */\nexport declare interface OperationGetParameters {\n /** The operation to be retrieved. */\n operation: GenerateVideosOperation;\n /** Used to override the default configuration. */\n config?: GetOperationConfig;\n}\n\nexport type PartUnion = Part | string;\n\nexport type PartListUnion = PartUnion[] | PartUnion;\n\nexport type ContentUnion = Content | PartUnion[] | PartUnion;\n\nexport type ContentListUnion = Content | Content[] | PartUnion | PartUnion[];\n\nexport type SchemaUnion = Schema;\n\nexport type SpeechConfigUnion = SpeechConfig | string;\n\nexport type ToolListUnion = Tool[];\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_caches_converters';\nimport {PagedItem, Pager} from './pagers';\nimport * as types from './types';\n\nexport class Caches extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Lists cached content configurations.\n *\n * @param params - The parameters for the list request.\n * @return The paginated results of the list of cached contents.\n *\n * @example\n * ```ts\n * const cachedContents = await ai.caches.list({config: {'pageSize': 2}});\n * for (const cachedContent of cachedContents) {\n * console.log(cachedContent);\n * }\n * ```\n */\n list = async (\n params: types.ListCachedContentsParameters = {},\n ): Promise> => {\n return new Pager(\n PagedItem.PAGED_ITEM_CACHED_CONTENTS,\n (x: types.ListCachedContentsParameters) => this.listInternal(x),\n await this.listInternal(params),\n params,\n );\n };\n\n /**\n * Creates a cached contents resource.\n *\n * @remarks\n * Context caching is only supported for specific models. See [Gemini\n * Developer API reference](https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac)\n * and [Vertex AI reference](https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models)\n * for more information.\n *\n * @param params - The parameters for the create request.\n * @return The created cached content.\n *\n * @example\n * ```ts\n * const contents = ...; // Initialize the content to cache.\n * const response = await ai.caches.create({\n * model: 'gemini-1.5-flash',\n * config: {\n * 'contents': contents,\n * 'displayName': 'test cache',\n * 'systemInstruction': 'What is the sum of the two pdfs?',\n * 'ttl': '86400s',\n * }\n * });\n * ```\n */\n async create(\n params: types.CreateCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.createCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.createCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n /**\n * Gets cached content configurations.\n *\n * @param params - The parameters for the get request.\n * @return The cached content.\n *\n * @example\n * ```ts\n * await ai.caches.get({name: 'gemini-1.5-flash'});\n * ```\n */\n async get(\n params: types.GetCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.getCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n /**\n * Deletes cached content.\n *\n * @param params - The parameters for the delete request.\n * @return The empty response returned by the API.\n *\n * @example\n * ```ts\n * await ai.caches.delete({name: 'gemini-1.5-flash'});\n * ```\n */\n async delete(\n params: types.DeleteCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.deleteCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteCachedContentResponseFromVertex();\n const typedResp = new types.DeleteCachedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.deleteCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteCachedContentResponseFromMldev();\n const typedResp = new types.DeleteCachedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Updates cached content configurations.\n *\n * @param params - The parameters for the update request.\n * @return The updated cached content.\n *\n * @example\n * ```ts\n * const response = await ai.caches.update({\n * name: 'gemini-1.5-flash',\n * config: {'ttl': '7600s'}\n * });\n * ```\n */\n async update(\n params: types.UpdateCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.updateCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'PATCH',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.updateCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'PATCH',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n private async listInternal(\n params: types.ListCachedContentsParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.listCachedContentsParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listCachedContentsResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListCachedContentsResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.listCachedContentsParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listCachedContentsResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListCachedContentsResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ApiClient} from './_api_client';\nimport * as t from './_transformers';\nimport {Models} from './models';\nimport * as types from './types';\n\n/**\n * Returns true if the response is valid, false otherwise.\n */\nfunction isValidResponse(response: types.GenerateContentResponse): boolean {\n if (response.candidates == undefined || response.candidates.length === 0) {\n return false;\n }\n const content = response.candidates[0]?.content;\n if (content === undefined) {\n return false;\n }\n return isValidContent(content);\n}\n\nfunction isValidContent(content: types.Content): boolean {\n if (content.parts === undefined || content.parts.length === 0) {\n return false;\n }\n for (const part of content.parts) {\n if (part === undefined || Object.keys(part).length === 0) {\n return false;\n }\n if (part.text !== undefined && part.text === '') {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Validates the history contains the correct roles.\n *\n * @remarks\n * Expects the history to start with a user turn and then alternate between\n * user and model turns.\n *\n * @throws Error if the history does not start with a user turn.\n * @throws Error if the history contains an invalid role.\n */\nfunction validateHistory(history: types.Content[]) {\n // Empty history is valid.\n if (history.length === 0) {\n return;\n }\n if (history[0].role !== 'user') {\n throw new Error('History must start with a user turn.');\n }\n for (const content of history) {\n if (content.role !== 'user' && content.role !== 'model') {\n throw new Error(`Role must be user or model, but got ${content.role}.`);\n }\n }\n}\n\n/**\n * Extracts the curated (valid) history from a comprehensive history.\n *\n * @remarks\n * The model may sometimes generate invalid or empty contents(e.g., due to safty\n * filters or recitation). Extracting valid turns from the history\n * ensures that subsequent requests could be accpeted by the model.\n */\nfunction extractCuratedHistory(\n comprehensiveHistory: types.Content[],\n): types.Content[] {\n if (comprehensiveHistory === undefined || comprehensiveHistory.length === 0) {\n return [];\n }\n const curatedHistory: types.Content[] = [];\n const length = comprehensiveHistory.length;\n let i = 0;\n let userInput = comprehensiveHistory[0];\n while (i < length) {\n if (comprehensiveHistory[i].role === 'user') {\n userInput = comprehensiveHistory[i];\n i++;\n } else {\n const modelOutput: types.Content[] = [];\n let isValid = true;\n while (i < length && comprehensiveHistory[i].role === 'model') {\n modelOutput.push(comprehensiveHistory[i]);\n if (isValid && !isValidContent(comprehensiveHistory[i])) {\n isValid = false;\n }\n i++;\n }\n if (isValid) {\n curatedHistory.push(userInput);\n curatedHistory.push(...modelOutput);\n }\n }\n }\n return curatedHistory;\n}\n\n/**\n * A utility class to create a chat session.\n */\nexport class Chats {\n private readonly modelsModule: Models;\n private readonly apiClient: ApiClient;\n\n constructor(modelsModule: Models, apiClient: ApiClient) {\n this.modelsModule = modelsModule;\n this.apiClient = apiClient;\n }\n\n /**\n * Creates a new chat session.\n *\n * @remarks\n * The config in the params will be used for all requests within the chat\n * session unless overridden by a per-request `config` in\n * @see {@link types.SendMessageParameters#config}.\n *\n * @param params - Parameters for creating a chat session.\n * @returns A new chat session.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({\n * model: 'gemini-2.0-flash'\n * config: {\n * temperature: 0.5,\n * maxOutputTokens: 1024,\n * }\n * });\n * ```\n */\n create(params: types.CreateChatParameters) {\n return new Chat(\n this.apiClient,\n this.modelsModule,\n params.model,\n params.config,\n params.history,\n );\n }\n}\n\n/**\n * Chat session that enables sending messages to the model with previous\n * conversation context.\n *\n * @remarks\n * The session maintains all the turns between user and model.\n */\nexport class Chat {\n // A promise to represent the current state of the message being sent to the\n // model.\n private sendPromise: Promise = Promise.resolve();\n\n constructor(\n private readonly apiClient: ApiClient,\n private readonly modelsModule: Models,\n private readonly model: string,\n private readonly config: types.GenerateContentConfig = {},\n private history: types.Content[] = [],\n ) {\n validateHistory(history);\n }\n\n /**\n * Sends a message to the model and returns the response.\n *\n * @remarks\n * This method will wait for the previous message to be processed before\n * sending the next message.\n *\n * @see {@link Chat#sendMessageStream} for streaming method.\n * @param params - parameters for sending messages within a chat session.\n * @returns The model's response.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({model: 'gemini-2.0-flash'});\n * const response = await chat.sendMessage({\n * message: 'Why is the sky blue?'\n * });\n * console.log(response.text);\n * ```\n */\n async sendMessage(\n params: types.SendMessageParameters,\n ): Promise {\n await this.sendPromise;\n const inputContent = t.tContent(this.apiClient, params.message);\n const responsePromise = this.modelsModule.generateContent({\n model: this.model,\n contents: this.getHistory(true).concat(inputContent),\n config: params.config ?? this.config,\n });\n this.sendPromise = (async () => {\n const response = await responsePromise;\n const outputContent = response.candidates?.[0]?.content;\n const modelOutput = outputContent ? [outputContent] : [];\n this.recordHistory(inputContent, modelOutput);\n return;\n })();\n await this.sendPromise;\n return responsePromise;\n }\n\n /**\n * Sends a message to the model and returns the response in chunks.\n *\n * @remarks\n * This method will wait for the previous message to be processed before\n * sending the next message.\n *\n * @see {@link Chat#sendMessage} for non-streaming method.\n * @param params - parameters for sending the message.\n * @return The model's response.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({model: 'gemini-2.0-flash'});\n * const response = await chat.sendMessageStream({\n * message: 'Why is the sky blue?'\n * });\n * for await (const chunk of response) {\n * console.log(chunk.text);\n * }\n * ```\n */\n async sendMessageStream(\n params: types.SendMessageParameters,\n ): Promise> {\n await this.sendPromise;\n const inputContent = t.tContent(this.apiClient, params.message);\n const streamResponse = this.modelsModule.generateContentStream({\n model: this.model,\n contents: this.getHistory(true).concat(inputContent),\n config: params.config ?? this.config,\n });\n this.sendPromise = streamResponse.then(() => undefined);\n const response = await streamResponse;\n const result = this.processStreamResponse(response, inputContent);\n return result;\n }\n\n /**\n * Returns the chat history.\n *\n * @remarks\n * The history is a list of contents alternating between user and model.\n *\n * There are two types of history:\n * - The `curated history` contains only the valid turns between user and\n * model, which will be included in the subsequent requests sent to the model.\n * - The `comprehensive history` contains all turns, including invalid or\n * empty model outputs, providing a complete record of the history.\n *\n * The history is updated after receiving the response from the model,\n * for streaming response, it means receiving the last chunk of the response.\n *\n * The `comprehensive history` is returned by default. To get the `curated\n * history`, set the `curated` parameter to `true`.\n *\n * @param curated - whether to return the curated history or the comprehensive\n * history.\n * @return History contents alternating between user and model for the entire\n * chat session.\n */\n getHistory(curated: boolean = false): types.Content[] {\n return curated ? extractCuratedHistory(this.history) : this.history;\n }\n\n private async *processStreamResponse(\n streamResponse: AsyncGenerator,\n inputContent: types.Content,\n ) {\n const outputContent: types.Content[] = [];\n for await (const chunk of streamResponse) {\n if (isValidResponse(chunk)) {\n const content = chunk.candidates?.[0]?.content;\n if (content !== undefined) {\n outputContent.push(content);\n }\n }\n yield chunk;\n }\n this.recordHistory(inputContent, outputContent);\n }\n\n private recordHistory(\n userInput: types.Content,\n modelOutput: types.Content[],\n ) {\n let outputContents: types.Content[] = [];\n if (\n modelOutput.length > 0 &&\n modelOutput.every((content) => content.role === 'model')\n ) {\n outputContents = modelOutput;\n } else {\n // Appends an empty content when model returns empty response, so that the\n // history is always alternating between user and model.\n outputContents.push({\n role: 'model',\n parts: [],\n } as types.Content);\n }\n this.history.push(userInput);\n this.history.push(...outputContents);\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {Auth} from './_auth';\nimport * as common from './_common';\nimport {Uploader} from './_uploader';\nimport {File, HttpOptions, HttpResponse, UploadFileConfig} from './types';\n\nconst CONTENT_TYPE_HEADER = 'Content-Type';\nconst SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';\nconst USER_AGENT_HEADER = 'User-Agent';\nconst GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';\nexport const SDK_VERSION = '0.8.0'; // x-release-please-version\nconst LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;\nconst VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';\nconst GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';\nconst responseLineRE = /^data: (.*)(?:\\n\\n|\\r\\r|\\r\\n\\r\\n)/;\n\n/**\n * Client errors raised by the GenAI API.\n */\nexport class ClientError extends Error {\n constructor(message: string, stackTrace?: string) {\n if (stackTrace) {\n super(message, {cause: stackTrace});\n } else {\n super(message, {cause: new Error().stack});\n }\n this.message = message;\n this.name = 'ClientError';\n }\n}\n\n/**\n * Server errors raised by the GenAI API.\n */\nexport class ServerError extends Error {\n constructor(message: string, stackTrace?: string) {\n if (stackTrace) {\n super(message, {cause: stackTrace});\n } else {\n super(message, {cause: new Error().stack});\n }\n this.message = message;\n this.name = 'ServerError';\n }\n}\n\n/**\n * Options for initializing the ApiClient. The ApiClient uses the parameters\n * for authentication purposes as well as to infer if SDK should send the\n * request to Vertex AI or Gemini API.\n */\nexport interface ApiClientInitOptions {\n /**\n * The object used for adding authentication headers to API requests.\n */\n auth: Auth;\n /**\n * The uploader to use for uploading files. This field is required for\n * creating a client, will be set through the Node_client or Web_client.\n */\n uploader: Uploader;\n /**\n * Optional. The Google Cloud project ID for Vertex AI users.\n * It is not the numeric project name.\n * If not provided, SDK will try to resolve it from runtime environment.\n */\n project?: string;\n /**\n * Optional. The Google Cloud project location for Vertex AI users.\n * If not provided, SDK will try to resolve it from runtime environment.\n */\n location?: string;\n /**\n * The API Key. This is required for Gemini API users.\n */\n apiKey?: string;\n /**\n * Optional. Set to true if you intend to call Vertex AI endpoints.\n * If unset, default SDK behavior is to call Gemini API.\n */\n vertexai?: boolean;\n /**\n * Optional. The API version for the endpoint.\n * If unset, SDK will choose a default api version.\n */\n apiVersion?: string;\n /**\n * Optional. A set of customizable configuration for HTTP requests.\n */\n httpOptions?: HttpOptions;\n /**\n * Optional. An extra string to append at the end of the User-Agent header.\n *\n * This can be used to e.g specify the runtime and its version.\n */\n userAgentExtra?: string;\n}\n\n/**\n * Represents the necessary information to send a request to an API endpoint.\n * This interface defines the structure for constructing and executing HTTP\n * requests.\n */\nexport interface HttpRequest {\n /**\n * URL path from the modules, this path is appended to the base API URL to\n * form the complete request URL.\n *\n * If you wish to set full URL, use httpOptions.baseUrl instead. Example to\n * set full URL in the request:\n *\n * const request: HttpRequest = {\n * path: '',\n * httpOptions: {\n * baseUrl: 'https://',\n * apiVersion: '',\n * },\n * httpMethod: 'GET',\n * };\n *\n * The result URL will be: https://\n *\n */\n path: string;\n /**\n * Optional query parameters to be appended to the request URL.\n */\n queryParams?: Record;\n /**\n * Optional request body in json string or Blob format, GET request doesn't\n * need a request body.\n */\n body?: string | Blob;\n /**\n * The HTTP method to be used for the request.\n */\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE';\n /**\n * Optional set of customizable configuration for HTTP requests.\n */\n httpOptions?: HttpOptions;\n}\n\n/**\n * The ApiClient class is used to send requests to the Gemini API or Vertex AI\n * endpoints.\n */\nexport class ApiClient {\n readonly clientOptions: ApiClientInitOptions;\n\n constructor(opts: ApiClientInitOptions) {\n this.clientOptions = {\n ...opts,\n project: opts.project,\n location: opts.location,\n apiKey: opts.apiKey,\n vertexai: opts.vertexai,\n };\n\n const initHttpOptions: HttpOptions = {};\n\n if (this.clientOptions.vertexai) {\n initHttpOptions.apiVersion =\n this.clientOptions.apiVersion ?? VERTEX_AI_API_DEFAULT_VERSION;\n // Assume that proj/api key validation occurs before they are passed in.\n if (this.getProject() || this.getLocation()) {\n initHttpOptions.baseUrl = `https://${this.clientOptions.location}-aiplatform.googleapis.com/`;\n this.clientOptions.apiKey = undefined; // unset API key.\n } else {\n initHttpOptions.baseUrl = `https://aiplatform.googleapis.com/`;\n this.clientOptions.project = undefined; // unset project.\n this.clientOptions.location = undefined; // unset location.\n }\n } else {\n initHttpOptions.apiVersion =\n this.clientOptions.apiVersion ?? GOOGLE_AI_API_DEFAULT_VERSION;\n initHttpOptions.baseUrl = `https://generativelanguage.googleapis.com/`;\n }\n\n initHttpOptions.headers = this.getDefaultHeaders();\n\n this.clientOptions.httpOptions = initHttpOptions;\n\n if (opts.httpOptions) {\n this.clientOptions.httpOptions = this.patchHttpOptions(\n initHttpOptions,\n opts.httpOptions,\n );\n }\n }\n\n isVertexAI(): boolean {\n return this.clientOptions.vertexai ?? false;\n }\n\n getProject() {\n return this.clientOptions.project;\n }\n\n getLocation() {\n return this.clientOptions.location;\n }\n\n getApiVersion() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.apiVersion !== undefined\n ) {\n return this.clientOptions.httpOptions.apiVersion;\n }\n throw new Error('API version is not set.');\n }\n\n getBaseUrl() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.baseUrl !== undefined\n ) {\n return this.clientOptions.httpOptions.baseUrl;\n }\n throw new Error('Base URL is not set.');\n }\n\n getRequestUrl() {\n return this.getRequestUrlInternal(this.clientOptions.httpOptions);\n }\n\n getHeaders() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.headers !== undefined\n ) {\n return this.clientOptions.httpOptions.headers;\n } else {\n throw new Error('Headers are not set.');\n }\n }\n\n private getRequestUrlInternal(httpOptions?: HttpOptions) {\n if (\n !httpOptions ||\n httpOptions.baseUrl === undefined ||\n httpOptions.apiVersion === undefined\n ) {\n throw new Error('HTTP options are not correctly set.');\n }\n const baseUrl = httpOptions.baseUrl.endsWith('/')\n ? httpOptions.baseUrl.slice(0, -1)\n : httpOptions.baseUrl;\n const urlElement: Array = [baseUrl];\n if (httpOptions.apiVersion && httpOptions.apiVersion !== '') {\n urlElement.push(httpOptions.apiVersion);\n }\n return urlElement.join('/');\n }\n\n getBaseResourcePath() {\n return `projects/${this.clientOptions.project}/locations/${\n this.clientOptions.location\n }`;\n }\n\n getApiKey() {\n return this.clientOptions.apiKey;\n }\n\n getWebsocketBaseUrl() {\n const baseUrl = this.getBaseUrl();\n const urlParts = new URL(baseUrl);\n urlParts.protocol = 'wss';\n return urlParts.toString();\n }\n\n setBaseUrl(url: string) {\n if (this.clientOptions.httpOptions) {\n this.clientOptions.httpOptions.baseUrl = url;\n } else {\n throw new Error('HTTP options are not correctly set.');\n }\n }\n\n private constructUrl(\n path: string,\n httpOptions: HttpOptions,\n prependProjectLocation: boolean,\n ): URL {\n const urlElement: Array = [this.getRequestUrlInternal(httpOptions)];\n if (prependProjectLocation) {\n urlElement.push(this.getBaseResourcePath());\n }\n if (path !== '') {\n urlElement.push(path);\n }\n const url = new URL(`${urlElement.join('/')}`);\n\n return url;\n }\n\n private shouldPrependVertexProjectPath(request: HttpRequest): boolean {\n if (this.clientOptions.apiKey) {\n return false;\n }\n if (!this.clientOptions.vertexai) {\n return false;\n }\n if (request.path.startsWith('projects/')) {\n // Assume the path already starts with\n // `projects//location/`.\n return false;\n }\n if (\n request.httpMethod === 'GET' &&\n request.path.startsWith('publishers/google/models')\n ) {\n // These paths are used by Vertex's models.get and models.list\n // calls. For base models Vertex does not accept a project/location\n // prefix (for tuned model the prefix is required).\n return false;\n }\n return true;\n }\n\n async request(request: HttpRequest): Promise {\n let patchedHttpOptions = this.clientOptions.httpOptions!;\n if (request.httpOptions) {\n patchedHttpOptions = this.patchHttpOptions(\n this.clientOptions.httpOptions!,\n request.httpOptions,\n );\n }\n\n const prependProjectLocation = this.shouldPrependVertexProjectPath(request);\n const url = this.constructUrl(\n request.path,\n patchedHttpOptions,\n prependProjectLocation,\n );\n if (request.queryParams) {\n for (const [key, value] of Object.entries(request.queryParams)) {\n url.searchParams.append(key, String(value));\n }\n }\n let requestInit: RequestInit = {};\n if (request.httpMethod === 'GET') {\n if (request.body && request.body !== '{}') {\n throw new Error(\n 'Request body should be empty for GET request, but got non empty request body',\n );\n }\n } else {\n requestInit.body = request.body;\n }\n requestInit = await this.includeExtraHttpOptionsToRequestInit(\n requestInit,\n patchedHttpOptions,\n );\n return this.unaryApiCall(url, requestInit, request.httpMethod);\n }\n\n private patchHttpOptions(\n baseHttpOptions: HttpOptions,\n requestHttpOptions: HttpOptions,\n ): HttpOptions {\n const patchedHttpOptions = JSON.parse(\n JSON.stringify(baseHttpOptions),\n ) as HttpOptions;\n\n for (const [key, value] of Object.entries(requestHttpOptions)) {\n // Records compile to objects.\n if (typeof value === 'object') {\n // @ts-expect-error TS2345TS7053: Element implicitly has an 'any' type\n // because expression of type 'string' can't be used to index type\n // 'HttpOptions'.\n patchedHttpOptions[key] = {...patchedHttpOptions[key], ...value};\n } else if (value !== undefined) {\n // @ts-expect-error TS2345TS7053: Element implicitly has an 'any' type\n // because expression of type 'string' can't be used to index type\n // 'HttpOptions'.\n patchedHttpOptions[key] = value;\n }\n }\n return patchedHttpOptions;\n }\n\n async requestStream(\n request: HttpRequest,\n ): Promise> {\n let patchedHttpOptions = this.clientOptions.httpOptions!;\n if (request.httpOptions) {\n patchedHttpOptions = this.patchHttpOptions(\n this.clientOptions.httpOptions!,\n request.httpOptions,\n );\n }\n\n const prependProjectLocation = this.shouldPrependVertexProjectPath(request);\n const url = this.constructUrl(\n request.path,\n patchedHttpOptions,\n prependProjectLocation,\n );\n if (!url.searchParams.has('alt') || url.searchParams.get('alt') !== 'sse') {\n url.searchParams.set('alt', 'sse');\n }\n let requestInit: RequestInit = {};\n requestInit.body = request.body;\n requestInit = await this.includeExtraHttpOptionsToRequestInit(\n requestInit,\n patchedHttpOptions,\n );\n return this.streamApiCall(url, requestInit, request.httpMethod);\n }\n\n private async includeExtraHttpOptionsToRequestInit(\n requestInit: RequestInit,\n httpOptions: HttpOptions,\n ): Promise {\n if (httpOptions && (httpOptions.signal || httpOptions.timeout && httpOptions?.timeout >= 0)) {\n const abortController = new AbortController();\n const signal = abortController.signal;\n if (httpOptions.timeout && httpOptions.timeout >= 0) {\n setTimeout(() => abortController.abort(), httpOptions.timeout);\n }\n if (httpOptions.signal) {\n httpOptions.signal?.addEventListener('abort', () => {\n abortController.abort();\n });\n }\n requestInit.signal = signal;\n }\n requestInit.headers = await this.getHeadersInternal(httpOptions);\n return requestInit;\n }\n\n private async unaryApiCall(\n url: URL,\n requestInit: RequestInit,\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE',\n ): Promise {\n return this.apiCall(url.toString(), {\n ...requestInit,\n method: httpMethod,\n })\n .then(async (response) => {\n await throwErrorIfNotOK(response);\n return new HttpResponse(response);\n })\n .catch((e) => {\n if (e instanceof Error) {\n throw e;\n } else {\n throw new Error(JSON.stringify(e));\n }\n });\n }\n\n private async streamApiCall(\n url: URL,\n requestInit: RequestInit,\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE',\n ): Promise> {\n return this.apiCall(url.toString(), {\n ...requestInit,\n method: httpMethod,\n })\n .then(async (response) => {\n await throwErrorIfNotOK(response);\n return this.processStreamResponse(response);\n })\n .catch((e) => {\n if (e instanceof Error) {\n throw e;\n } else {\n throw new Error(JSON.stringify(e));\n }\n });\n }\n\n async *processStreamResponse(\n response: Response,\n ): AsyncGenerator {\n const reader = response?.body?.getReader();\n const decoder = new TextDecoder('utf-8');\n if (!reader) {\n throw new Error('Response body is empty');\n }\n\n try {\n let buffer = '';\n while (true) {\n const {done, value} = await reader.read();\n if (done) {\n if (buffer.trim().length > 0) {\n throw new Error('Incomplete JSON segment at the end');\n }\n break;\n }\n const chunkString = decoder.decode(value);\n buffer += chunkString;\n let match = buffer.match(responseLineRE);\n while (match) {\n const processedChunkString = match[1];\n try {\n const partialResponse = new Response(processedChunkString, {\n headers: response?.headers,\n status: response?.status,\n statusText: response?.statusText,\n });\n yield new HttpResponse(partialResponse);\n buffer = buffer.slice(match[0].length);\n match = buffer.match(responseLineRE);\n } catch (e) {\n throw new Error(\n `exception parsing stream chunk ${processedChunkString}. ${e}`,\n );\n }\n }\n }\n } finally {\n reader.releaseLock();\n }\n }\n private async apiCall(\n url: string,\n requestInit: RequestInit,\n ): Promise {\n return fetch(url, requestInit).catch((e) => {\n throw new Error(`exception ${e} sending request`);\n });\n }\n\n getDefaultHeaders(): Record {\n const headers: Record = {};\n\n const versionHeaderValue =\n LIBRARY_LABEL + ' ' + this.clientOptions.userAgentExtra;\n\n headers[USER_AGENT_HEADER] = versionHeaderValue;\n headers[GOOGLE_API_CLIENT_HEADER] = versionHeaderValue;\n headers[CONTENT_TYPE_HEADER] = 'application/json';\n\n return headers;\n }\n\n private async getHeadersInternal(\n httpOptions: HttpOptions | undefined,\n ): Promise {\n const headers = new Headers();\n if (httpOptions && httpOptions.headers) {\n for (const [key, value] of Object.entries(httpOptions.headers)) {\n headers.append(key, value);\n }\n // Append a timeout header if it is set, note that the timeout option is\n // in milliseconds but the header is in seconds.\n if (httpOptions.timeout && httpOptions.timeout > 0) {\n headers.append(\n SERVER_TIMEOUT_HEADER,\n String(Math.ceil(httpOptions.timeout / 1000)),\n );\n }\n }\n await this.clientOptions.auth.addAuthHeaders(headers);\n return headers;\n }\n\n /**\n * Uploads a file asynchronously using Gemini API only, this is not supported\n * in Vertex AI.\n *\n * @param file The string path to the file to be uploaded or a Blob object.\n * @param config Optional parameters specified in the `UploadFileConfig`\n * interface. @see {@link UploadFileConfig}\n * @return A promise that resolves to a `File` object.\n * @throws An error if called on a Vertex AI client.\n * @throws An error if the `mimeType` is not provided and can not be inferred,\n */\n async uploadFile(\n file: string | Blob,\n config?: UploadFileConfig,\n ): Promise {\n const fileToUpload: File = {};\n if (config != null) {\n fileToUpload.mimeType = config.mimeType;\n fileToUpload.name = config.name;\n fileToUpload.displayName = config.displayName;\n }\n\n if (fileToUpload.name && !fileToUpload.name.startsWith('files/')) {\n fileToUpload.name = `files/${fileToUpload.name}`;\n }\n\n const uploader = this.clientOptions.uploader;\n const fileStat = await uploader.stat(file);\n fileToUpload.sizeBytes = String(fileStat.size);\n const mimeType = config?.mimeType ?? fileStat.type;\n if (mimeType === undefined || mimeType === '') {\n throw new Error(\n 'Can not determine mimeType. Please provide mimeType in the config.',\n );\n }\n fileToUpload.mimeType = mimeType;\n\n const uploadUrl = await this.fetchUploadUrl(fileToUpload, config);\n return uploader.upload(file, uploadUrl, this);\n }\n\n private async fetchUploadUrl(\n file: File,\n config?: UploadFileConfig,\n ): Promise {\n let httpOptions: HttpOptions = {};\n if (config?.httpOptions) {\n httpOptions = config.httpOptions;\n } else {\n httpOptions = {\n apiVersion: '', // api-version is set in the path.\n headers: {\n 'Content-Type': 'application/json',\n 'X-Goog-Upload-Protocol': 'resumable',\n 'X-Goog-Upload-Command': 'start',\n 'X-Goog-Upload-Header-Content-Length': `${file.sizeBytes}`,\n 'X-Goog-Upload-Header-Content-Type': `${file.mimeType}`,\n },\n };\n }\n\n const body: Record = {\n 'file': file,\n };\n const httpResponse = await this.request({\n path: common.formatMap(\n 'upload/v1beta/files',\n body['_url'] as Record,\n ),\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions,\n });\n\n if (!httpResponse || !httpResponse?.headers) {\n throw new Error(\n 'Server did not return an HttpResponse or the returned HttpResponse did not have headers.',\n );\n }\n\n const uploadUrl: string | undefined =\n httpResponse?.headers?.['x-goog-upload-url'];\n if (uploadUrl === undefined) {\n throw new Error(\n 'Failed to get upload url. Server did not return the x-google-upload-url in the headers',\n );\n }\n return uploadUrl;\n }\n}\n\nasync function throwErrorIfNotOK(response: Response | undefined) {\n if (response === undefined) {\n throw new ServerError('response is undefined');\n }\n if (!response.ok) {\n const status: number = response.status;\n const statusText: string = response.statusText;\n let errorBody: Record;\n if (response.headers.get('content-type')?.includes('application/json')) {\n errorBody = await response.json();\n } else {\n errorBody = {\n error: {\n message: 'exception parsing response',\n code: response.status,\n status: response.statusText,\n },\n };\n }\n const errorMessage = `got status: ${status} ${statusText}. ${JSON.stringify(\n errorBody,\n )}`;\n if (status >= 400 && status < 500) {\n const clientError = new ClientError(errorMessage);\n throw clientError;\n } else if (status >= 500 && status < 600) {\n const serverError = new ServerError(errorMessage);\n throw serverError;\n }\n throw new Error(errorMessage);\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport function crossError(): Error {\n // TODO(b/399934880): this message needs a link to a help page explaining how to enable conditional exports\n return new Error(`This feature requires the web or Node specific @google/genai implementation, you can fix this by either:\n\n*Enabling conditional exports for your project [recommended]*\n\n*Using a platform specific import* - Make sure your code imports either '@google/genai/web' or '@google/genai/node' instead of '@google/genai'.\n`);\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {ApiClient} from '../_api_client';\nimport {FileStat, Uploader} from '../_uploader';\nimport {File, HttpResponse} from '../types';\n\nimport {crossError} from './_cross_error';\n\nexport const MAX_CHUNK_SIZE = 1024 * 1024 * 8; // bytes\nexport class CrossUploader implements Uploader {\n async upload(\n file: string | Blob,\n uploadUrl: string,\n apiClient: ApiClient,\n ): Promise {\n if (typeof file === 'string') {\n throw crossError();\n } else {\n return uploadBlob(file, uploadUrl, apiClient);\n }\n }\n\n async stat(file: string | Blob): Promise {\n if (typeof file === 'string') {\n throw crossError();\n } else {\n return getBlobStat(file);\n }\n }\n}\n\nexport async function uploadBlob(\n file: Blob,\n uploadUrl: string,\n apiClient: ApiClient,\n): Promise {\n let fileSize = 0;\n let offset = 0;\n let response: HttpResponse = new HttpResponse(new Response());\n let uploadCommand = 'upload';\n fileSize = file.size;\n while (offset < fileSize) {\n const chunkSize = Math.min(MAX_CHUNK_SIZE, fileSize - offset);\n const chunk = file.slice(offset, offset + chunkSize);\n if (offset + chunkSize >= fileSize) {\n uploadCommand += ', finalize';\n }\n response = await apiClient.request({\n path: '',\n body: chunk,\n httpMethod: 'POST',\n httpOptions: {\n apiVersion: '',\n baseUrl: uploadUrl,\n headers: {\n 'X-Goog-Upload-Command': uploadCommand,\n 'X-Goog-Upload-Offset': String(offset),\n 'Content-Length': String(chunkSize),\n },\n },\n });\n offset += chunkSize;\n // The `x-goog-upload-status` header field can be `active`, `final` and\n //`cancelled` in resposne.\n if (response?.headers?.['x-goog-upload-status'] !== 'active') {\n break;\n }\n // TODO(b/401391430) Investigate why the upload status is not finalized\n // even though all content has been uploaded.\n if (fileSize <= offset) {\n throw new Error(\n 'All content has been uploaded, but the upload status is not finalized.',\n );\n }\n }\n const responseJson = (await response?.json()) as Record<\n string,\n File | unknown\n >;\n if (response?.headers?.['x-goog-upload-status'] !== 'final') {\n throw new Error('Failed to upload file: Upload status is not finalized.');\n }\n return responseJson['file'] as File;\n}\n\nexport async function getBlobStat(file: Blob): Promise {\n const fileStat: FileStat = {size: file.size, type: file.type};\n return fileStat;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n WebSocketCallbacks,\n WebSocketFactory,\n WebSocket as Ws,\n} from '../_websocket';\nimport {crossError} from './_cross_error';\n\n// TODO((b/401271082): re-enable lint once CrossWebSocketFactory is implemented.\n/* eslint-disable @typescript-eslint/no-unused-vars */\nexport class CrossWebSocketFactory implements WebSocketFactory {\n create(\n url: string,\n headers: Record,\n callbacks: WebSocketCallbacks,\n ): Ws {\n throw crossError();\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function listFilesConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listFilesParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listFilesConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function fileStatusToMldev(\n apiClient: ApiClient,\n fromObject: types.FileStatus,\n): Record {\n const toObject: Record = {};\n\n const fromDetails = common.getValueByPath(fromObject, ['details']);\n if (fromDetails != null) {\n common.setValueByPath(toObject, ['details'], fromDetails);\n }\n\n const fromMessage = common.getValueByPath(fromObject, ['message']);\n if (fromMessage != null) {\n common.setValueByPath(toObject, ['message'], fromMessage);\n }\n\n const fromCode = common.getValueByPath(fromObject, ['code']);\n if (fromCode != null) {\n common.setValueByPath(toObject, ['code'], fromCode);\n }\n\n return toObject;\n}\n\nexport function fileToMldev(\n apiClient: ApiClient,\n fromObject: types.File,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n const fromSizeBytes = common.getValueByPath(fromObject, ['sizeBytes']);\n if (fromSizeBytes != null) {\n common.setValueByPath(toObject, ['sizeBytes'], fromSizeBytes);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromExpirationTime = common.getValueByPath(fromObject, [\n 'expirationTime',\n ]);\n if (fromExpirationTime != null) {\n common.setValueByPath(toObject, ['expirationTime'], fromExpirationTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromSha256Hash = common.getValueByPath(fromObject, ['sha256Hash']);\n if (fromSha256Hash != null) {\n common.setValueByPath(toObject, ['sha256Hash'], fromSha256Hash);\n }\n\n const fromUri = common.getValueByPath(fromObject, ['uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromDownloadUri = common.getValueByPath(fromObject, ['downloadUri']);\n if (fromDownloadUri != null) {\n common.setValueByPath(toObject, ['downloadUri'], fromDownloadUri);\n }\n\n const fromState = common.getValueByPath(fromObject, ['state']);\n if (fromState != null) {\n common.setValueByPath(toObject, ['state'], fromState);\n }\n\n const fromSource = common.getValueByPath(fromObject, ['source']);\n if (fromSource != null) {\n common.setValueByPath(toObject, ['source'], fromSource);\n }\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(\n toObject,\n ['error'],\n fileStatusToMldev(apiClient, fromError),\n );\n }\n\n return toObject;\n}\n\nexport function createFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromFile = common.getValueByPath(fromObject, ['file']);\n if (fromFile != null) {\n common.setValueByPath(toObject, ['file'], fileToMldev(apiClient, fromFile));\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function getFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'file'],\n t.tFileName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.DeleteFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'file'],\n t.tFileName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function fileStatusFromMldev(\n apiClient: ApiClient,\n fromObject: types.FileStatus,\n): Record {\n const toObject: Record = {};\n\n const fromDetails = common.getValueByPath(fromObject, ['details']);\n if (fromDetails != null) {\n common.setValueByPath(toObject, ['details'], fromDetails);\n }\n\n const fromMessage = common.getValueByPath(fromObject, ['message']);\n if (fromMessage != null) {\n common.setValueByPath(toObject, ['message'], fromMessage);\n }\n\n const fromCode = common.getValueByPath(fromObject, ['code']);\n if (fromCode != null) {\n common.setValueByPath(toObject, ['code'], fromCode);\n }\n\n return toObject;\n}\n\nexport function fileFromMldev(\n apiClient: ApiClient,\n fromObject: types.File,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n const fromSizeBytes = common.getValueByPath(fromObject, ['sizeBytes']);\n if (fromSizeBytes != null) {\n common.setValueByPath(toObject, ['sizeBytes'], fromSizeBytes);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromExpirationTime = common.getValueByPath(fromObject, [\n 'expirationTime',\n ]);\n if (fromExpirationTime != null) {\n common.setValueByPath(toObject, ['expirationTime'], fromExpirationTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromSha256Hash = common.getValueByPath(fromObject, ['sha256Hash']);\n if (fromSha256Hash != null) {\n common.setValueByPath(toObject, ['sha256Hash'], fromSha256Hash);\n }\n\n const fromUri = common.getValueByPath(fromObject, ['uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromDownloadUri = common.getValueByPath(fromObject, ['downloadUri']);\n if (fromDownloadUri != null) {\n common.setValueByPath(toObject, ['downloadUri'], fromDownloadUri);\n }\n\n const fromState = common.getValueByPath(fromObject, ['state']);\n if (fromState != null) {\n common.setValueByPath(toObject, ['state'], fromState);\n }\n\n const fromSource = common.getValueByPath(fromObject, ['source']);\n if (fromSource != null) {\n common.setValueByPath(toObject, ['source'], fromSource);\n }\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(\n toObject,\n ['error'],\n fileStatusFromMldev(apiClient, fromError),\n );\n }\n\n return toObject;\n}\n\nexport function listFilesResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromFiles = common.getValueByPath(fromObject, ['files']);\n if (fromFiles != null) {\n if (Array.isArray(fromFiles)) {\n common.setValueByPath(\n toObject,\n ['files'],\n fromFiles.map((item) => {\n return fileFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['files'], fromFiles);\n }\n }\n\n return toObject;\n}\n\nexport function createFileResponseFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function deleteFileResponseFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_files_converters';\nimport {PagedItem, Pager} from './pagers';\nimport * as types from './types';\n\nexport class Files extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Lists all current project files from the service.\n *\n * @param params - The parameters for the list request\n * @return The paginated results of the list of files\n *\n * @example\n * The following code prints the names of all files from the service, the\n * size of each page is 10.\n *\n * ```ts\n * const listResponse = await ai.files.list({config: {'pageSize': 10}});\n * for await (const file of listResponse) {\n * console.log(file.name);\n * }\n * ```\n */\n list = async (\n params: types.ListFilesParameters = {},\n ): Promise> => {\n return new Pager(\n PagedItem.PAGED_ITEM_FILES,\n (x: types.ListFilesParameters) => this.listInternal(x),\n await this.listInternal(params),\n params,\n );\n };\n\n /**\n * Uploads a file asynchronously to the Gemini API.\n * This method is not available in Vertex AI.\n * Supported upload sources:\n * - Node.js: File path (string) or Blob object.\n * - Browser: Blob object (e.g., File).\n *\n * @remarks\n * The `mimeType` can be specified in the `config` parameter. If omitted:\n * - For file path (string) inputs, the `mimeType` will be inferred from the\n * file extension.\n * - For Blob object inputs, the `mimeType` will be set to the Blob's `type`\n * property.\n * Somex eamples for file extension to mimeType mapping:\n * .txt -> text/plain\n * .json -> application/json\n * .jpg -> image/jpeg\n * .png -> image/png\n * .mp3 -> audio/mpeg\n * .mp4 -> video/mp4\n *\n * This section can contain multiple paragraphs and code examples.\n *\n * @param params - Optional parameters specified in the\n * `types.UploadFileParameters` interface.\n * @see {@link types.UploadFileParameters#config} for the optional\n * config in the parameters.\n * @return A promise that resolves to a `types.File` object.\n * @throws An error if called on a Vertex AI client.\n * @throws An error if the `mimeType` is not provided and can not be inferred,\n * the `mimeType` can be provided in the `params.config` parameter.\n * @throws An error occurs if a suitable upload location cannot be established.\n *\n * @example\n * The following code uploads a file to Gemini API.\n *\n * ```ts\n * const file = await ai.files.upload({file: 'file.txt', config: {\n * mimeType: 'text/plain',\n * }});\n * console.log(file.name);\n * ```\n */\n async upload(params: types.UploadFileParameters): Promise {\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'Vertex AI does not support uploading files. You can share files through a GCS bucket.',\n );\n }\n\n return this.apiClient\n .uploadFile(params.file, params.config)\n .then((response) => {\n const file = converters.fileFromMldev(this.apiClient, response);\n return file as types.File;\n });\n }\n\n private async listInternal(\n params: types.ListFilesParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.listFilesParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap('files', body['_url'] as Record);\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listFilesResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListFilesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n private async createInternal(\n params: types.CreateFileParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.createFileParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'upload/v1beta/files',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.createFileResponseFromMldev();\n const typedResp = new types.CreateFileResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Retrieves the file information from the service.\n *\n * @param params - The parameters for the get request\n * @return The Promise that resolves to the types.File object requested.\n *\n * @example\n * ```ts\n * const config: GetFileParameters = {\n * name: fileName,\n * };\n * file = await ai.files.get(config);\n * console.log(file.name);\n * ```\n */\n async get(params: types.GetFileParameters): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.getFileParametersToMldev(this.apiClient, params);\n path = common.formatMap(\n 'files/{file}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.fileFromMldev(this.apiClient, apiResponse);\n\n return resp as types.File;\n });\n }\n }\n\n /**\n * Deletes a remotely stored file.\n *\n * @param params - The parameters for the delete request.\n * @return The DeleteFileResponse, the response for the delete method.\n *\n * @example\n * The following code deletes an example file named \"files/mehozpxf877d\".\n *\n * ```ts\n * await ai.files.delete({name: file.name});\n * ```\n */\n async delete(\n params: types.DeleteFileParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.deleteFileParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'files/{file}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteFileResponseFromMldev();\n const typedResp = new types.DeleteFileResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function partToMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['videoMetadata']) !== undefined) {\n throw new Error('videoMetadata parameter is not supported in Gemini API.');\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function partToVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function contentToVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToMldev(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['example']) !== undefined) {\n throw new Error('example parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['pattern']) !== undefined) {\n throw new Error('pattern parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['default']) !== undefined) {\n throw new Error('default parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxLength']) !== undefined) {\n throw new Error('maxLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minLength']) !== undefined) {\n throw new Error('minLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minProperties']) !== undefined) {\n throw new Error('minProperties parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxProperties']) !== undefined) {\n throw new Error('maxProperties parameter is not supported in Gemini API.');\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function schemaToVertex(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n const fromExample = common.getValueByPath(fromObject, ['example']);\n if (fromExample != null) {\n common.setValueByPath(toObject, ['example'], fromExample);\n }\n\n const fromPattern = common.getValueByPath(fromObject, ['pattern']);\n if (fromPattern != null) {\n common.setValueByPath(toObject, ['pattern'], fromPattern);\n }\n\n const fromDefault = common.getValueByPath(fromObject, ['default']);\n if (fromDefault != null) {\n common.setValueByPath(toObject, ['default'], fromDefault);\n }\n\n const fromMaxLength = common.getValueByPath(fromObject, ['maxLength']);\n if (fromMaxLength != null) {\n common.setValueByPath(toObject, ['maxLength'], fromMaxLength);\n }\n\n const fromMinLength = common.getValueByPath(fromObject, ['minLength']);\n if (fromMinLength != null) {\n common.setValueByPath(toObject, ['minLength'], fromMinLength);\n }\n\n const fromMinProperties = common.getValueByPath(fromObject, [\n 'minProperties',\n ]);\n if (fromMinProperties != null) {\n common.setValueByPath(toObject, ['minProperties'], fromMinProperties);\n }\n\n const fromMaxProperties = common.getValueByPath(fromObject, [\n 'maxProperties',\n ]);\n if (fromMaxProperties != null) {\n common.setValueByPath(toObject, ['maxProperties'], fromMaxProperties);\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['response']) !== undefined) {\n throw new Error('response parameter is not supported in Gemini API.');\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n schemaToVertex(apiClient, fromResponse),\n );\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function googleSearchToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToMldev(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToVertex(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToMldev(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n if (common.getValueByPath(fromObject, ['retrieval']) !== undefined) {\n throw new Error('retrieval parameter is not supported in Gemini API.');\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToMldev());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function toolToVertex(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n const fromRetrieval = common.getValueByPath(fromObject, ['retrieval']);\n if (fromRetrieval != null) {\n common.setValueByPath(toObject, ['retrieval'], fromRetrieval);\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToVertex());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function sessionResumptionConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.SessionResumptionConfig,\n): Record {\n const toObject: Record = {};\n\n const fromHandle = common.getValueByPath(fromObject, ['handle']);\n if (fromHandle != null) {\n common.setValueByPath(toObject, ['handle'], fromHandle);\n }\n\n if (common.getValueByPath(fromObject, ['transparent']) !== undefined) {\n throw new Error('transparent parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function sessionResumptionConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.SessionResumptionConfig,\n): Record {\n const toObject: Record = {};\n\n const fromHandle = common.getValueByPath(fromObject, ['handle']);\n if (fromHandle != null) {\n common.setValueByPath(toObject, ['handle'], fromHandle);\n }\n\n const fromTransparent = common.getValueByPath(fromObject, ['transparent']);\n if (fromTransparent != null) {\n common.setValueByPath(toObject, ['transparent'], fromTransparent);\n }\n\n return toObject;\n}\n\nexport function audioTranscriptionConfigToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function audioTranscriptionConfigToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function automaticActivityDetectionToMldev(\n apiClient: ApiClient,\n fromObject: types.AutomaticActivityDetection,\n): Record {\n const toObject: Record = {};\n\n const fromDisabled = common.getValueByPath(fromObject, ['disabled']);\n if (fromDisabled != null) {\n common.setValueByPath(toObject, ['disabled'], fromDisabled);\n }\n\n const fromStartOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'startOfSpeechSensitivity',\n ]);\n if (fromStartOfSpeechSensitivity != null) {\n common.setValueByPath(\n toObject,\n ['startOfSpeechSensitivity'],\n fromStartOfSpeechSensitivity,\n );\n }\n\n const fromEndOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'endOfSpeechSensitivity',\n ]);\n if (fromEndOfSpeechSensitivity != null) {\n common.setValueByPath(\n toObject,\n ['endOfSpeechSensitivity'],\n fromEndOfSpeechSensitivity,\n );\n }\n\n const fromPrefixPaddingMs = common.getValueByPath(fromObject, [\n 'prefixPaddingMs',\n ]);\n if (fromPrefixPaddingMs != null) {\n common.setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);\n }\n\n const fromSilenceDurationMs = common.getValueByPath(fromObject, [\n 'silenceDurationMs',\n ]);\n if (fromSilenceDurationMs != null) {\n common.setValueByPath(\n toObject,\n ['silenceDurationMs'],\n fromSilenceDurationMs,\n );\n }\n\n return toObject;\n}\n\nexport function automaticActivityDetectionToVertex(\n apiClient: ApiClient,\n fromObject: types.AutomaticActivityDetection,\n): Record {\n const toObject: Record = {};\n\n const fromDisabled = common.getValueByPath(fromObject, ['disabled']);\n if (fromDisabled != null) {\n common.setValueByPath(toObject, ['disabled'], fromDisabled);\n }\n\n const fromStartOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'startOfSpeechSensitivity',\n ]);\n if (fromStartOfSpeechSensitivity != null) {\n common.setValueByPath(\n toObject,\n ['startOfSpeechSensitivity'],\n fromStartOfSpeechSensitivity,\n );\n }\n\n const fromEndOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'endOfSpeechSensitivity',\n ]);\n if (fromEndOfSpeechSensitivity != null) {\n common.setValueByPath(\n toObject,\n ['endOfSpeechSensitivity'],\n fromEndOfSpeechSensitivity,\n );\n }\n\n const fromPrefixPaddingMs = common.getValueByPath(fromObject, [\n 'prefixPaddingMs',\n ]);\n if (fromPrefixPaddingMs != null) {\n common.setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);\n }\n\n const fromSilenceDurationMs = common.getValueByPath(fromObject, [\n 'silenceDurationMs',\n ]);\n if (fromSilenceDurationMs != null) {\n common.setValueByPath(\n toObject,\n ['silenceDurationMs'],\n fromSilenceDurationMs,\n );\n }\n\n return toObject;\n}\n\nexport function realtimeInputConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.RealtimeInputConfig,\n): Record {\n const toObject: Record = {};\n\n const fromAutomaticActivityDetection = common.getValueByPath(fromObject, [\n 'automaticActivityDetection',\n ]);\n if (fromAutomaticActivityDetection != null) {\n common.setValueByPath(\n toObject,\n ['automaticActivityDetection'],\n automaticActivityDetectionToMldev(\n apiClient,\n fromAutomaticActivityDetection,\n ),\n );\n }\n\n const fromActivityHandling = common.getValueByPath(fromObject, [\n 'activityHandling',\n ]);\n if (fromActivityHandling != null) {\n common.setValueByPath(toObject, ['activityHandling'], fromActivityHandling);\n }\n\n const fromTurnCoverage = common.getValueByPath(fromObject, ['turnCoverage']);\n if (fromTurnCoverage != null) {\n common.setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);\n }\n\n return toObject;\n}\n\nexport function realtimeInputConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.RealtimeInputConfig,\n): Record {\n const toObject: Record = {};\n\n const fromAutomaticActivityDetection = common.getValueByPath(fromObject, [\n 'automaticActivityDetection',\n ]);\n if (fromAutomaticActivityDetection != null) {\n common.setValueByPath(\n toObject,\n ['automaticActivityDetection'],\n automaticActivityDetectionToVertex(\n apiClient,\n fromAutomaticActivityDetection,\n ),\n );\n }\n\n const fromActivityHandling = common.getValueByPath(fromObject, [\n 'activityHandling',\n ]);\n if (fromActivityHandling != null) {\n common.setValueByPath(toObject, ['activityHandling'], fromActivityHandling);\n }\n\n const fromTurnCoverage = common.getValueByPath(fromObject, ['turnCoverage']);\n if (fromTurnCoverage != null) {\n common.setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);\n }\n\n return toObject;\n}\n\nexport function slidingWindowToMldev(\n apiClient: ApiClient,\n fromObject: types.SlidingWindow,\n): Record {\n const toObject: Record = {};\n\n const fromTargetTokens = common.getValueByPath(fromObject, ['targetTokens']);\n if (fromTargetTokens != null) {\n common.setValueByPath(toObject, ['targetTokens'], fromTargetTokens);\n }\n\n return toObject;\n}\n\nexport function slidingWindowToVertex(\n apiClient: ApiClient,\n fromObject: types.SlidingWindow,\n): Record {\n const toObject: Record = {};\n\n const fromTargetTokens = common.getValueByPath(fromObject, ['targetTokens']);\n if (fromTargetTokens != null) {\n common.setValueByPath(toObject, ['targetTokens'], fromTargetTokens);\n }\n\n return toObject;\n}\n\nexport function contextWindowCompressionConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ContextWindowCompressionConfig,\n): Record {\n const toObject: Record = {};\n\n const fromTriggerTokens = common.getValueByPath(fromObject, [\n 'triggerTokens',\n ]);\n if (fromTriggerTokens != null) {\n common.setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);\n }\n\n const fromSlidingWindow = common.getValueByPath(fromObject, [\n 'slidingWindow',\n ]);\n if (fromSlidingWindow != null) {\n common.setValueByPath(\n toObject,\n ['slidingWindow'],\n slidingWindowToMldev(apiClient, fromSlidingWindow),\n );\n }\n\n return toObject;\n}\n\nexport function contextWindowCompressionConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ContextWindowCompressionConfig,\n): Record {\n const toObject: Record = {};\n\n const fromTriggerTokens = common.getValueByPath(fromObject, [\n 'triggerTokens',\n ]);\n if (fromTriggerTokens != null) {\n common.setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);\n }\n\n const fromSlidingWindow = common.getValueByPath(fromObject, [\n 'slidingWindow',\n ]);\n if (fromSlidingWindow != null) {\n common.setValueByPath(\n toObject,\n ['slidingWindow'],\n slidingWindowToVertex(apiClient, fromSlidingWindow),\n );\n }\n\n return toObject;\n}\n\nexport function liveConnectConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveConnectConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (parentObject !== undefined && fromGenerationConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig'],\n fromGenerationConfig,\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (parentObject !== undefined && fromResponseModalities != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig', 'responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (parentObject !== undefined && fromSpeechConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig', 'speechConfig'],\n fromSpeechConfig,\n );\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['setup', 'tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToMldev(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['setup', 'tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (parentObject !== undefined && fromSessionResumption != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'sessionResumption'],\n sessionResumptionConfigToMldev(apiClient, fromSessionResumption),\n );\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (parentObject !== undefined && fromRealtimeInputConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'realtimeInputConfig'],\n realtimeInputConfigToMldev(apiClient, fromRealtimeInputConfig),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (parentObject !== undefined && fromContextWindowCompression != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'contextWindowCompression'],\n contextWindowCompressionConfigToMldev(\n apiClient,\n fromContextWindowCompression,\n ),\n );\n }\n\n return toObject;\n}\n\nexport function liveConnectConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveConnectConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (parentObject !== undefined && fromGenerationConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig'],\n fromGenerationConfig,\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (parentObject !== undefined && fromResponseModalities != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig', 'responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (parentObject !== undefined && fromSpeechConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig', 'speechConfig'],\n fromSpeechConfig,\n );\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['setup', 'tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToVertex(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['setup', 'tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (parentObject !== undefined && fromSessionResumption != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'sessionResumption'],\n sessionResumptionConfigToVertex(apiClient, fromSessionResumption),\n );\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (parentObject !== undefined && fromRealtimeInputConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'realtimeInputConfig'],\n realtimeInputConfigToVertex(apiClient, fromRealtimeInputConfig),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (parentObject !== undefined && fromContextWindowCompression != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'contextWindowCompression'],\n contextWindowCompressionConfigToVertex(\n apiClient,\n fromContextWindowCompression,\n ),\n );\n }\n\n return toObject;\n}\n\nexport function liveConnectParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveConnectParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['setup', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n liveConnectConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function liveConnectParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveConnectParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['setup', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n liveConnectConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function liveClientSetupToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveClientSetup,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (fromGenerationConfig != null) {\n common.setValueByPath(toObject, ['generationConfig'], fromGenerationConfig);\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (fromSystemInstruction != null) {\n common.setValueByPath(\n toObject,\n ['systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n toObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToMldev(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (fromRealtimeInputConfig != null) {\n common.setValueByPath(\n toObject,\n ['realtimeInputConfig'],\n realtimeInputConfigToMldev(apiClient, fromRealtimeInputConfig),\n );\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (fromSessionResumption != null) {\n common.setValueByPath(\n toObject,\n ['sessionResumption'],\n sessionResumptionConfigToMldev(apiClient, fromSessionResumption),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (fromContextWindowCompression != null) {\n common.setValueByPath(\n toObject,\n ['contextWindowCompression'],\n contextWindowCompressionConfigToMldev(\n apiClient,\n fromContextWindowCompression,\n ),\n );\n }\n\n return toObject;\n}\n\nexport function liveClientSetupToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveClientSetup,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (fromGenerationConfig != null) {\n common.setValueByPath(toObject, ['generationConfig'], fromGenerationConfig);\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (fromSystemInstruction != null) {\n common.setValueByPath(\n toObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n toObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToVertex(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (fromRealtimeInputConfig != null) {\n common.setValueByPath(\n toObject,\n ['realtimeInputConfig'],\n realtimeInputConfigToVertex(apiClient, fromRealtimeInputConfig),\n );\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (fromSessionResumption != null) {\n common.setValueByPath(\n toObject,\n ['sessionResumption'],\n sessionResumptionConfigToVertex(apiClient, fromSessionResumption),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (fromContextWindowCompression != null) {\n common.setValueByPath(\n toObject,\n ['contextWindowCompression'],\n contextWindowCompressionConfigToVertex(\n apiClient,\n fromContextWindowCompression,\n ),\n );\n }\n\n return toObject;\n}\n\nexport function liveClientContentToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveClientContent,\n): Record {\n const toObject: Record = {};\n\n const fromTurns = common.getValueByPath(fromObject, ['turns']);\n if (fromTurns != null) {\n if (Array.isArray(fromTurns)) {\n common.setValueByPath(\n toObject,\n ['turns'],\n fromTurns.map((item) => {\n return contentToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['turns'], fromTurns);\n }\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete != null) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n return toObject;\n}\n\nexport function liveClientContentToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveClientContent,\n): Record {\n const toObject: Record = {};\n\n const fromTurns = common.getValueByPath(fromObject, ['turns']);\n if (fromTurns != null) {\n if (Array.isArray(fromTurns)) {\n common.setValueByPath(\n toObject,\n ['turns'],\n fromTurns.map((item) => {\n return contentToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['turns'], fromTurns);\n }\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete != null) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n return toObject;\n}\n\nexport function activityStartToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function activityStartToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function activityEndToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function activityEndToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function liveClientRealtimeInputToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveClientRealtimeInput,\n): Record {\n const toObject: Record = {};\n\n const fromMediaChunks = common.getValueByPath(fromObject, ['mediaChunks']);\n if (fromMediaChunks != null) {\n common.setValueByPath(toObject, ['mediaChunks'], fromMediaChunks);\n }\n\n const fromActivityStart = common.getValueByPath(fromObject, [\n 'activityStart',\n ]);\n if (fromActivityStart != null) {\n common.setValueByPath(toObject, ['activityStart'], activityStartToMldev());\n }\n\n const fromActivityEnd = common.getValueByPath(fromObject, ['activityEnd']);\n if (fromActivityEnd != null) {\n common.setValueByPath(toObject, ['activityEnd'], activityEndToMldev());\n }\n\n return toObject;\n}\n\nexport function liveClientRealtimeInputToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveClientRealtimeInput,\n): Record {\n const toObject: Record = {};\n\n const fromMediaChunks = common.getValueByPath(fromObject, ['mediaChunks']);\n if (fromMediaChunks != null) {\n common.setValueByPath(toObject, ['mediaChunks'], fromMediaChunks);\n }\n\n const fromActivityStart = common.getValueByPath(fromObject, [\n 'activityStart',\n ]);\n if (fromActivityStart != null) {\n common.setValueByPath(toObject, ['activityStart'], activityStartToVertex());\n }\n\n const fromActivityEnd = common.getValueByPath(fromObject, ['activityEnd']);\n if (fromActivityEnd != null) {\n common.setValueByPath(toObject, ['activityEnd'], activityEndToVertex());\n }\n\n return toObject;\n}\n\nexport function functionResponseToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionResponse,\n): Record {\n const toObject: Record = {};\n\n const fromId = common.getValueByPath(fromObject, ['id']);\n if (fromId != null) {\n common.setValueByPath(toObject, ['id'], fromId);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(toObject, ['response'], fromResponse);\n }\n\n return toObject;\n}\n\nexport function functionResponseToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionResponse,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['id']) !== undefined) {\n throw new Error('id parameter is not supported in Vertex AI.');\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(toObject, ['response'], fromResponse);\n }\n\n return toObject;\n}\n\nexport function liveClientToolResponseToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveClientToolResponse,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionResponses = common.getValueByPath(fromObject, [\n 'functionResponses',\n ]);\n if (fromFunctionResponses != null) {\n if (Array.isArray(fromFunctionResponses)) {\n common.setValueByPath(\n toObject,\n ['functionResponses'],\n fromFunctionResponses.map((item) => {\n return functionResponseToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionResponses'],\n fromFunctionResponses,\n );\n }\n }\n\n return toObject;\n}\n\nexport function liveClientToolResponseToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveClientToolResponse,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionResponses = common.getValueByPath(fromObject, [\n 'functionResponses',\n ]);\n if (fromFunctionResponses != null) {\n if (Array.isArray(fromFunctionResponses)) {\n common.setValueByPath(\n toObject,\n ['functionResponses'],\n fromFunctionResponses.map((item) => {\n return functionResponseToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionResponses'],\n fromFunctionResponses,\n );\n }\n }\n\n return toObject;\n}\n\nexport function liveClientMessageToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveClientMessage,\n): Record {\n const toObject: Record = {};\n\n const fromSetup = common.getValueByPath(fromObject, ['setup']);\n if (fromSetup != null) {\n common.setValueByPath(\n toObject,\n ['setup'],\n liveClientSetupToMldev(apiClient, fromSetup),\n );\n }\n\n const fromClientContent = common.getValueByPath(fromObject, [\n 'clientContent',\n ]);\n if (fromClientContent != null) {\n common.setValueByPath(\n toObject,\n ['clientContent'],\n liveClientContentToMldev(apiClient, fromClientContent),\n );\n }\n\n const fromRealtimeInput = common.getValueByPath(fromObject, [\n 'realtimeInput',\n ]);\n if (fromRealtimeInput != null) {\n common.setValueByPath(\n toObject,\n ['realtimeInput'],\n liveClientRealtimeInputToMldev(apiClient, fromRealtimeInput),\n );\n }\n\n const fromToolResponse = common.getValueByPath(fromObject, ['toolResponse']);\n if (fromToolResponse != null) {\n common.setValueByPath(\n toObject,\n ['toolResponse'],\n liveClientToolResponseToMldev(apiClient, fromToolResponse),\n );\n }\n\n return toObject;\n}\n\nexport function liveClientMessageToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveClientMessage,\n): Record {\n const toObject: Record = {};\n\n const fromSetup = common.getValueByPath(fromObject, ['setup']);\n if (fromSetup != null) {\n common.setValueByPath(\n toObject,\n ['setup'],\n liveClientSetupToVertex(apiClient, fromSetup),\n );\n }\n\n const fromClientContent = common.getValueByPath(fromObject, [\n 'clientContent',\n ]);\n if (fromClientContent != null) {\n common.setValueByPath(\n toObject,\n ['clientContent'],\n liveClientContentToVertex(apiClient, fromClientContent),\n );\n }\n\n const fromRealtimeInput = common.getValueByPath(fromObject, [\n 'realtimeInput',\n ]);\n if (fromRealtimeInput != null) {\n common.setValueByPath(\n toObject,\n ['realtimeInput'],\n liveClientRealtimeInputToVertex(apiClient, fromRealtimeInput),\n );\n }\n\n const fromToolResponse = common.getValueByPath(fromObject, ['toolResponse']);\n if (fromToolResponse != null) {\n common.setValueByPath(\n toObject,\n ['toolResponse'],\n liveClientToolResponseToVertex(apiClient, fromToolResponse),\n );\n }\n\n return toObject;\n}\n\nexport function liveServerSetupCompleteFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function liveServerSetupCompleteFromVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function partFromMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function partFromVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentFromMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function contentFromVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function transcriptionFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function transcriptionFromVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function liveServerContentFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerContent,\n): Record {\n const toObject: Record = {};\n\n const fromModelTurn = common.getValueByPath(fromObject, ['modelTurn']);\n if (fromModelTurn != null) {\n common.setValueByPath(\n toObject,\n ['modelTurn'],\n contentFromMldev(apiClient, fromModelTurn),\n );\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete != null) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n const fromInterrupted = common.getValueByPath(fromObject, ['interrupted']);\n if (fromInterrupted != null) {\n common.setValueByPath(toObject, ['interrupted'], fromInterrupted);\n }\n\n const fromGenerationComplete = common.getValueByPath(fromObject, [\n 'generationComplete',\n ]);\n if (fromGenerationComplete != null) {\n common.setValueByPath(\n toObject,\n ['generationComplete'],\n fromGenerationComplete,\n );\n }\n\n return toObject;\n}\n\nexport function liveServerContentFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerContent,\n): Record {\n const toObject: Record = {};\n\n const fromModelTurn = common.getValueByPath(fromObject, ['modelTurn']);\n if (fromModelTurn != null) {\n common.setValueByPath(\n toObject,\n ['modelTurn'],\n contentFromVertex(apiClient, fromModelTurn),\n );\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete != null) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n const fromInterrupted = common.getValueByPath(fromObject, ['interrupted']);\n if (fromInterrupted != null) {\n common.setValueByPath(toObject, ['interrupted'], fromInterrupted);\n }\n\n const fromGenerationComplete = common.getValueByPath(fromObject, [\n 'generationComplete',\n ]);\n if (fromGenerationComplete != null) {\n common.setValueByPath(\n toObject,\n ['generationComplete'],\n fromGenerationComplete,\n );\n }\n\n return toObject;\n}\n\nexport function functionCallFromMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCall,\n): Record {\n const toObject: Record = {};\n\n const fromId = common.getValueByPath(fromObject, ['id']);\n if (fromId != null) {\n common.setValueByPath(toObject, ['id'], fromId);\n }\n\n const fromArgs = common.getValueByPath(fromObject, ['args']);\n if (fromArgs != null) {\n common.setValueByPath(toObject, ['args'], fromArgs);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n return toObject;\n}\n\nexport function functionCallFromVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCall,\n): Record {\n const toObject: Record = {};\n\n const fromArgs = common.getValueByPath(fromObject, ['args']);\n if (fromArgs != null) {\n common.setValueByPath(toObject, ['args'], fromArgs);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n return toObject;\n}\n\nexport function liveServerToolCallFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCall,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCalls = common.getValueByPath(fromObject, [\n 'functionCalls',\n ]);\n if (fromFunctionCalls != null) {\n if (Array.isArray(fromFunctionCalls)) {\n common.setValueByPath(\n toObject,\n ['functionCalls'],\n fromFunctionCalls.map((item) => {\n return functionCallFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['functionCalls'], fromFunctionCalls);\n }\n }\n\n return toObject;\n}\n\nexport function liveServerToolCallFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCall,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCalls = common.getValueByPath(fromObject, [\n 'functionCalls',\n ]);\n if (fromFunctionCalls != null) {\n if (Array.isArray(fromFunctionCalls)) {\n common.setValueByPath(\n toObject,\n ['functionCalls'],\n fromFunctionCalls.map((item) => {\n return functionCallFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['functionCalls'], fromFunctionCalls);\n }\n }\n\n return toObject;\n}\n\nexport function liveServerToolCallCancellationFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCallCancellation,\n): Record {\n const toObject: Record = {};\n\n const fromIds = common.getValueByPath(fromObject, ['ids']);\n if (fromIds != null) {\n common.setValueByPath(toObject, ['ids'], fromIds);\n }\n\n return toObject;\n}\n\nexport function liveServerToolCallCancellationFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCallCancellation,\n): Record {\n const toObject: Record = {};\n\n const fromIds = common.getValueByPath(fromObject, ['ids']);\n if (fromIds != null) {\n common.setValueByPath(toObject, ['ids'], fromIds);\n }\n\n return toObject;\n}\n\nexport function modalityTokenCountFromMldev(\n apiClient: ApiClient,\n fromObject: types.ModalityTokenCount,\n): Record {\n const toObject: Record = {};\n\n const fromModality = common.getValueByPath(fromObject, ['modality']);\n if (fromModality != null) {\n common.setValueByPath(toObject, ['modality'], fromModality);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function modalityTokenCountFromVertex(\n apiClient: ApiClient,\n fromObject: types.ModalityTokenCount,\n): Record {\n const toObject: Record = {};\n\n const fromModality = common.getValueByPath(fromObject, ['modality']);\n if (fromModality != null) {\n common.setValueByPath(toObject, ['modality'], fromModality);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function usageMetadataFromMldev(\n apiClient: ApiClient,\n fromObject: types.UsageMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromPromptTokenCount = common.getValueByPath(fromObject, [\n 'promptTokenCount',\n ]);\n if (fromPromptTokenCount != null) {\n common.setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n const fromResponseTokenCount = common.getValueByPath(fromObject, [\n 'responseTokenCount',\n ]);\n if (fromResponseTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['responseTokenCount'],\n fromResponseTokenCount,\n );\n }\n\n const fromToolUsePromptTokenCount = common.getValueByPath(fromObject, [\n 'toolUsePromptTokenCount',\n ]);\n if (fromToolUsePromptTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokenCount'],\n fromToolUsePromptTokenCount,\n );\n }\n\n const fromThoughtsTokenCount = common.getValueByPath(fromObject, [\n 'thoughtsTokenCount',\n ]);\n if (fromThoughtsTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['thoughtsTokenCount'],\n fromThoughtsTokenCount,\n );\n }\n\n const fromTotalTokenCount = common.getValueByPath(fromObject, [\n 'totalTokenCount',\n ]);\n if (fromTotalTokenCount != null) {\n common.setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);\n }\n\n const fromPromptTokensDetails = common.getValueByPath(fromObject, [\n 'promptTokensDetails',\n ]);\n if (fromPromptTokensDetails != null) {\n if (Array.isArray(fromPromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails,\n );\n }\n }\n\n const fromCacheTokensDetails = common.getValueByPath(fromObject, [\n 'cacheTokensDetails',\n ]);\n if (fromCacheTokensDetails != null) {\n if (Array.isArray(fromCacheTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails,\n );\n }\n }\n\n const fromResponseTokensDetails = common.getValueByPath(fromObject, [\n 'responseTokensDetails',\n ]);\n if (fromResponseTokensDetails != null) {\n if (Array.isArray(fromResponseTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails,\n );\n }\n }\n\n const fromToolUsePromptTokensDetails = common.getValueByPath(fromObject, [\n 'toolUsePromptTokensDetails',\n ]);\n if (fromToolUsePromptTokensDetails != null) {\n if (Array.isArray(fromToolUsePromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails,\n );\n }\n }\n\n return toObject;\n}\n\nexport function usageMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.UsageMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromPromptTokenCount = common.getValueByPath(fromObject, [\n 'promptTokenCount',\n ]);\n if (fromPromptTokenCount != null) {\n common.setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n const fromResponseTokenCount = common.getValueByPath(fromObject, [\n 'candidatesTokenCount',\n ]);\n if (fromResponseTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['responseTokenCount'],\n fromResponseTokenCount,\n );\n }\n\n const fromToolUsePromptTokenCount = common.getValueByPath(fromObject, [\n 'toolUsePromptTokenCount',\n ]);\n if (fromToolUsePromptTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokenCount'],\n fromToolUsePromptTokenCount,\n );\n }\n\n const fromThoughtsTokenCount = common.getValueByPath(fromObject, [\n 'thoughtsTokenCount',\n ]);\n if (fromThoughtsTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['thoughtsTokenCount'],\n fromThoughtsTokenCount,\n );\n }\n\n const fromTotalTokenCount = common.getValueByPath(fromObject, [\n 'totalTokenCount',\n ]);\n if (fromTotalTokenCount != null) {\n common.setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);\n }\n\n const fromPromptTokensDetails = common.getValueByPath(fromObject, [\n 'promptTokensDetails',\n ]);\n if (fromPromptTokensDetails != null) {\n if (Array.isArray(fromPromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails,\n );\n }\n }\n\n const fromCacheTokensDetails = common.getValueByPath(fromObject, [\n 'cacheTokensDetails',\n ]);\n if (fromCacheTokensDetails != null) {\n if (Array.isArray(fromCacheTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails,\n );\n }\n }\n\n const fromResponseTokensDetails = common.getValueByPath(fromObject, [\n 'candidatesTokensDetails',\n ]);\n if (fromResponseTokensDetails != null) {\n if (Array.isArray(fromResponseTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails,\n );\n }\n }\n\n const fromToolUsePromptTokensDetails = common.getValueByPath(fromObject, [\n 'toolUsePromptTokensDetails',\n ]);\n if (fromToolUsePromptTokensDetails != null) {\n if (Array.isArray(fromToolUsePromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails,\n );\n }\n }\n\n const fromTrafficType = common.getValueByPath(fromObject, ['trafficType']);\n if (fromTrafficType != null) {\n common.setValueByPath(toObject, ['trafficType'], fromTrafficType);\n }\n\n return toObject;\n}\n\nexport function liveServerGoAwayFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerGoAway,\n): Record {\n const toObject: Record = {};\n\n const fromTimeLeft = common.getValueByPath(fromObject, ['timeLeft']);\n if (fromTimeLeft != null) {\n common.setValueByPath(toObject, ['timeLeft'], fromTimeLeft);\n }\n\n return toObject;\n}\n\nexport function liveServerGoAwayFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerGoAway,\n): Record {\n const toObject: Record = {};\n\n const fromTimeLeft = common.getValueByPath(fromObject, ['timeLeft']);\n if (fromTimeLeft != null) {\n common.setValueByPath(toObject, ['timeLeft'], fromTimeLeft);\n }\n\n return toObject;\n}\n\nexport function liveServerSessionResumptionUpdateFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerSessionResumptionUpdate,\n): Record {\n const toObject: Record = {};\n\n const fromNewHandle = common.getValueByPath(fromObject, ['newHandle']);\n if (fromNewHandle != null) {\n common.setValueByPath(toObject, ['newHandle'], fromNewHandle);\n }\n\n const fromResumable = common.getValueByPath(fromObject, ['resumable']);\n if (fromResumable != null) {\n common.setValueByPath(toObject, ['resumable'], fromResumable);\n }\n\n const fromLastConsumedClientMessageIndex = common.getValueByPath(fromObject, [\n 'lastConsumedClientMessageIndex',\n ]);\n if (fromLastConsumedClientMessageIndex != null) {\n common.setValueByPath(\n toObject,\n ['lastConsumedClientMessageIndex'],\n fromLastConsumedClientMessageIndex,\n );\n }\n\n return toObject;\n}\n\nexport function liveServerSessionResumptionUpdateFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerSessionResumptionUpdate,\n): Record {\n const toObject: Record = {};\n\n const fromNewHandle = common.getValueByPath(fromObject, ['newHandle']);\n if (fromNewHandle != null) {\n common.setValueByPath(toObject, ['newHandle'], fromNewHandle);\n }\n\n const fromResumable = common.getValueByPath(fromObject, ['resumable']);\n if (fromResumable != null) {\n common.setValueByPath(toObject, ['resumable'], fromResumable);\n }\n\n const fromLastConsumedClientMessageIndex = common.getValueByPath(fromObject, [\n 'lastConsumedClientMessageIndex',\n ]);\n if (fromLastConsumedClientMessageIndex != null) {\n common.setValueByPath(\n toObject,\n ['lastConsumedClientMessageIndex'],\n fromLastConsumedClientMessageIndex,\n );\n }\n\n return toObject;\n}\n\nexport function liveServerMessageFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerMessage,\n): Record {\n const toObject: Record = {};\n\n const fromSetupComplete = common.getValueByPath(fromObject, [\n 'setupComplete',\n ]);\n if (fromSetupComplete != null) {\n common.setValueByPath(\n toObject,\n ['setupComplete'],\n liveServerSetupCompleteFromMldev(),\n );\n }\n\n const fromServerContent = common.getValueByPath(fromObject, [\n 'serverContent',\n ]);\n if (fromServerContent != null) {\n common.setValueByPath(\n toObject,\n ['serverContent'],\n liveServerContentFromMldev(apiClient, fromServerContent),\n );\n }\n\n const fromToolCall = common.getValueByPath(fromObject, ['toolCall']);\n if (fromToolCall != null) {\n common.setValueByPath(\n toObject,\n ['toolCall'],\n liveServerToolCallFromMldev(apiClient, fromToolCall),\n );\n }\n\n const fromToolCallCancellation = common.getValueByPath(fromObject, [\n 'toolCallCancellation',\n ]);\n if (fromToolCallCancellation != null) {\n common.setValueByPath(\n toObject,\n ['toolCallCancellation'],\n liveServerToolCallCancellationFromMldev(\n apiClient,\n fromToolCallCancellation,\n ),\n );\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(\n toObject,\n ['usageMetadata'],\n usageMetadataFromMldev(apiClient, fromUsageMetadata),\n );\n }\n\n const fromGoAway = common.getValueByPath(fromObject, ['goAway']);\n if (fromGoAway != null) {\n common.setValueByPath(\n toObject,\n ['goAway'],\n liveServerGoAwayFromMldev(apiClient, fromGoAway),\n );\n }\n\n const fromSessionResumptionUpdate = common.getValueByPath(fromObject, [\n 'sessionResumptionUpdate',\n ]);\n if (fromSessionResumptionUpdate != null) {\n common.setValueByPath(\n toObject,\n ['sessionResumptionUpdate'],\n liveServerSessionResumptionUpdateFromMldev(\n apiClient,\n fromSessionResumptionUpdate,\n ),\n );\n }\n\n return toObject;\n}\n\nexport function liveServerMessageFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerMessage,\n): Record {\n const toObject: Record = {};\n\n const fromSetupComplete = common.getValueByPath(fromObject, [\n 'setupComplete',\n ]);\n if (fromSetupComplete != null) {\n common.setValueByPath(\n toObject,\n ['setupComplete'],\n liveServerSetupCompleteFromVertex(),\n );\n }\n\n const fromServerContent = common.getValueByPath(fromObject, [\n 'serverContent',\n ]);\n if (fromServerContent != null) {\n common.setValueByPath(\n toObject,\n ['serverContent'],\n liveServerContentFromVertex(apiClient, fromServerContent),\n );\n }\n\n const fromToolCall = common.getValueByPath(fromObject, ['toolCall']);\n if (fromToolCall != null) {\n common.setValueByPath(\n toObject,\n ['toolCall'],\n liveServerToolCallFromVertex(apiClient, fromToolCall),\n );\n }\n\n const fromToolCallCancellation = common.getValueByPath(fromObject, [\n 'toolCallCancellation',\n ]);\n if (fromToolCallCancellation != null) {\n common.setValueByPath(\n toObject,\n ['toolCallCancellation'],\n liveServerToolCallCancellationFromVertex(\n apiClient,\n fromToolCallCancellation,\n ),\n );\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(\n toObject,\n ['usageMetadata'],\n usageMetadataFromVertex(apiClient, fromUsageMetadata),\n );\n }\n\n const fromGoAway = common.getValueByPath(fromObject, ['goAway']);\n if (fromGoAway != null) {\n common.setValueByPath(\n toObject,\n ['goAway'],\n liveServerGoAwayFromVertex(apiClient, fromGoAway),\n );\n }\n\n const fromSessionResumptionUpdate = common.getValueByPath(fromObject, [\n 'sessionResumptionUpdate',\n ]);\n if (fromSessionResumptionUpdate != null) {\n common.setValueByPath(\n toObject,\n ['sessionResumptionUpdate'],\n liveServerSessionResumptionUpdateFromVertex(\n apiClient,\n fromSessionResumptionUpdate,\n ),\n );\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function partToMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['videoMetadata']) !== undefined) {\n throw new Error('videoMetadata parameter is not supported in Gemini API.');\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToMldev(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['example']) !== undefined) {\n throw new Error('example parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['pattern']) !== undefined) {\n throw new Error('pattern parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['default']) !== undefined) {\n throw new Error('default parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxLength']) !== undefined) {\n throw new Error('maxLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minLength']) !== undefined) {\n throw new Error('minLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minProperties']) !== undefined) {\n throw new Error('minProperties parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxProperties']) !== undefined) {\n throw new Error('maxProperties parameter is not supported in Gemini API.');\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function modelSelectionConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ModelSelectionConfig,\n): Record {\n const toObject: Record = {};\n\n if (\n common.getValueByPath(fromObject, ['featureSelectionPreference']) !==\n undefined\n ) {\n throw new Error(\n 'featureSelectionPreference parameter is not supported in Gemini API.',\n );\n }\n\n return toObject;\n}\n\nexport function safetySettingToMldev(\n apiClient: ApiClient,\n fromObject: types.SafetySetting,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['method']) !== undefined) {\n throw new Error('method parameter is not supported in Gemini API.');\n }\n\n const fromCategory = common.getValueByPath(fromObject, ['category']);\n if (fromCategory != null) {\n common.setValueByPath(toObject, ['category'], fromCategory);\n }\n\n const fromThreshold = common.getValueByPath(fromObject, ['threshold']);\n if (fromThreshold != null) {\n common.setValueByPath(toObject, ['threshold'], fromThreshold);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['response']) !== undefined) {\n throw new Error('response parameter is not supported in Gemini API.');\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToMldev(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToMldev(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n if (common.getValueByPath(fromObject, ['retrieval']) !== undefined) {\n throw new Error('retrieval parameter is not supported in Gemini API.');\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToMldev());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function prebuiltVoiceConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.PrebuiltVoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceName = common.getValueByPath(fromObject, ['voiceName']);\n if (fromVoiceName != null) {\n common.setValueByPath(toObject, ['voiceName'], fromVoiceName);\n }\n\n return toObject;\n}\n\nexport function voiceConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.VoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromPrebuiltVoiceConfig = common.getValueByPath(fromObject, [\n 'prebuiltVoiceConfig',\n ]);\n if (fromPrebuiltVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['prebuiltVoiceConfig'],\n prebuiltVoiceConfigToMldev(apiClient, fromPrebuiltVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function speechConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.SpeechConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceConfig = common.getValueByPath(fromObject, ['voiceConfig']);\n if (fromVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['voiceConfig'],\n voiceConfigToMldev(apiClient, fromVoiceConfig),\n );\n }\n\n const fromLanguageCode = common.getValueByPath(fromObject, ['languageCode']);\n if (fromLanguageCode != null) {\n common.setValueByPath(toObject, ['languageCode'], fromLanguageCode);\n }\n\n return toObject;\n}\n\nexport function thinkingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ThinkingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromIncludeThoughts = common.getValueByPath(fromObject, [\n 'includeThoughts',\n ]);\n if (fromIncludeThoughts != null) {\n common.setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);\n }\n\n const fromThinkingBudget = common.getValueByPath(fromObject, [\n 'thinkingBudget',\n ]);\n if (fromThinkingBudget != null) {\n common.setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);\n }\n\n return toObject;\n}\n\nexport function generateContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTemperature = common.getValueByPath(fromObject, ['temperature']);\n if (fromTemperature != null) {\n common.setValueByPath(toObject, ['temperature'], fromTemperature);\n }\n\n const fromTopP = common.getValueByPath(fromObject, ['topP']);\n if (fromTopP != null) {\n common.setValueByPath(toObject, ['topP'], fromTopP);\n }\n\n const fromTopK = common.getValueByPath(fromObject, ['topK']);\n if (fromTopK != null) {\n common.setValueByPath(toObject, ['topK'], fromTopK);\n }\n\n const fromCandidateCount = common.getValueByPath(fromObject, [\n 'candidateCount',\n ]);\n if (fromCandidateCount != null) {\n common.setValueByPath(toObject, ['candidateCount'], fromCandidateCount);\n }\n\n const fromMaxOutputTokens = common.getValueByPath(fromObject, [\n 'maxOutputTokens',\n ]);\n if (fromMaxOutputTokens != null) {\n common.setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);\n }\n\n const fromStopSequences = common.getValueByPath(fromObject, [\n 'stopSequences',\n ]);\n if (fromStopSequences != null) {\n common.setValueByPath(toObject, ['stopSequences'], fromStopSequences);\n }\n\n const fromResponseLogprobs = common.getValueByPath(fromObject, [\n 'responseLogprobs',\n ]);\n if (fromResponseLogprobs != null) {\n common.setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);\n }\n\n const fromLogprobs = common.getValueByPath(fromObject, ['logprobs']);\n if (fromLogprobs != null) {\n common.setValueByPath(toObject, ['logprobs'], fromLogprobs);\n }\n\n const fromPresencePenalty = common.getValueByPath(fromObject, [\n 'presencePenalty',\n ]);\n if (fromPresencePenalty != null) {\n common.setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);\n }\n\n const fromFrequencyPenalty = common.getValueByPath(fromObject, [\n 'frequencyPenalty',\n ]);\n if (fromFrequencyPenalty != null) {\n common.setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (fromSeed != null) {\n common.setValueByPath(toObject, ['seed'], fromSeed);\n }\n\n const fromResponseMimeType = common.getValueByPath(fromObject, [\n 'responseMimeType',\n ]);\n if (fromResponseMimeType != null) {\n common.setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);\n }\n\n const fromResponseSchema = common.getValueByPath(fromObject, [\n 'responseSchema',\n ]);\n if (fromResponseSchema != null) {\n common.setValueByPath(\n toObject,\n ['responseSchema'],\n schemaToMldev(apiClient, t.tSchema(apiClient, fromResponseSchema)),\n );\n }\n\n if (common.getValueByPath(fromObject, ['routingConfig']) !== undefined) {\n throw new Error('routingConfig parameter is not supported in Gemini API.');\n }\n\n if (\n common.getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined\n ) {\n throw new Error(\n 'modelSelectionConfig parameter is not supported in Gemini API.',\n );\n }\n\n const fromSafetySettings = common.getValueByPath(fromObject, [\n 'safetySettings',\n ]);\n if (parentObject !== undefined && fromSafetySettings != null) {\n if (Array.isArray(fromSafetySettings)) {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings.map((item) => {\n return safetySettingToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings,\n );\n }\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToMldev(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToMldev(apiClient, fromToolConfig),\n );\n }\n\n if (common.getValueByPath(fromObject, ['labels']) !== undefined) {\n throw new Error('labels parameter is not supported in Gemini API.');\n }\n\n const fromCachedContent = common.getValueByPath(fromObject, [\n 'cachedContent',\n ]);\n if (parentObject !== undefined && fromCachedContent != null) {\n common.setValueByPath(\n parentObject,\n ['cachedContent'],\n t.tCachedContentName(apiClient, fromCachedContent),\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities != null) {\n common.setValueByPath(\n toObject,\n ['responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromMediaResolution = common.getValueByPath(fromObject, [\n 'mediaResolution',\n ]);\n if (fromMediaResolution != null) {\n common.setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig != null) {\n common.setValueByPath(\n toObject,\n ['speechConfig'],\n speechConfigToMldev(\n apiClient,\n t.tSpeechConfig(apiClient, fromSpeechConfig),\n ),\n );\n }\n\n if (common.getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {\n throw new Error('audioTimestamp parameter is not supported in Gemini API.');\n }\n\n const fromThinkingConfig = common.getValueByPath(fromObject, [\n 'thinkingConfig',\n ]);\n if (fromThinkingConfig != null) {\n common.setValueByPath(\n toObject,\n ['thinkingConfig'],\n thinkingConfigToMldev(apiClient, fromThinkingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function generateContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['generationConfig'],\n generateContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTaskType = common.getValueByPath(fromObject, ['taskType']);\n if (parentObject !== undefined && fromTaskType != null) {\n common.setValueByPath(\n parentObject,\n ['requests[]', 'taskType'],\n fromTaskType,\n );\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (parentObject !== undefined && fromTitle != null) {\n common.setValueByPath(parentObject, ['requests[]', 'title'], fromTitle);\n }\n\n const fromOutputDimensionality = common.getValueByPath(fromObject, [\n 'outputDimensionality',\n ]);\n if (parentObject !== undefined && fromOutputDimensionality != null) {\n common.setValueByPath(\n parentObject,\n ['requests[]', 'outputDimensionality'],\n fromOutputDimensionality,\n );\n }\n\n if (common.getValueByPath(fromObject, ['mimeType']) !== undefined) {\n throw new Error('mimeType parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['autoTruncate']) !== undefined) {\n throw new Error('autoTruncate parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function embedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n common.setValueByPath(\n toObject,\n ['requests[]', 'content'],\n t.tContentsForEmbed(apiClient, fromContents),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n embedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n const fromModelForEmbedContent = common.getValueByPath(fromObject, ['model']);\n if (fromModelForEmbedContent !== undefined) {\n common.setValueByPath(\n toObject,\n ['requests[]', 'model'],\n t.tModel(apiClient, fromModelForEmbedContent),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {\n throw new Error('outputGcsUri parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['negativePrompt']) !== undefined) {\n throw new Error('negativePrompt parameter is not supported in Gemini API.');\n }\n\n const fromNumberOfImages = common.getValueByPath(fromObject, [\n 'numberOfImages',\n ]);\n if (parentObject !== undefined && fromNumberOfImages != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfImages,\n );\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromGuidanceScale = common.getValueByPath(fromObject, [\n 'guidanceScale',\n ]);\n if (parentObject !== undefined && fromGuidanceScale != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'guidanceScale'],\n fromGuidanceScale,\n );\n }\n\n if (common.getValueByPath(fromObject, ['seed']) !== undefined) {\n throw new Error('seed parameter is not supported in Gemini API.');\n }\n\n const fromSafetyFilterLevel = common.getValueByPath(fromObject, [\n 'safetyFilterLevel',\n ]);\n if (parentObject !== undefined && fromSafetyFilterLevel != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'safetySetting'],\n fromSafetyFilterLevel,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromIncludeSafetyAttributes = common.getValueByPath(fromObject, [\n 'includeSafetyAttributes',\n ]);\n if (parentObject !== undefined && fromIncludeSafetyAttributes != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeSafetyAttributes'],\n fromIncludeSafetyAttributes,\n );\n }\n\n const fromIncludeRaiReason = common.getValueByPath(fromObject, [\n 'includeRaiReason',\n ]);\n if (parentObject !== undefined && fromIncludeRaiReason != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeRaiReason'],\n fromIncludeRaiReason,\n );\n }\n\n const fromLanguage = common.getValueByPath(fromObject, ['language']);\n if (parentObject !== undefined && fromLanguage != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'language'],\n fromLanguage,\n );\n }\n\n const fromOutputMimeType = common.getValueByPath(fromObject, [\n 'outputMimeType',\n ]);\n if (parentObject !== undefined && fromOutputMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'mimeType'],\n fromOutputMimeType,\n );\n }\n\n const fromOutputCompressionQuality = common.getValueByPath(fromObject, [\n 'outputCompressionQuality',\n ]);\n if (parentObject !== undefined && fromOutputCompressionQuality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'compressionQuality'],\n fromOutputCompressionQuality,\n );\n }\n\n if (common.getValueByPath(fromObject, ['addWatermark']) !== undefined) {\n throw new Error('addWatermark parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {\n throw new Error('enhancePrompt parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function generateImagesParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateImagesConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getModelParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetModelParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function countTokensConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensConfig,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['systemInstruction']) !== undefined) {\n throw new Error(\n 'systemInstruction parameter is not supported in Gemini API.',\n );\n }\n\n if (common.getValueByPath(fromObject, ['tools']) !== undefined) {\n throw new Error('tools parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['generationConfig']) !== undefined) {\n throw new Error(\n 'generationConfig parameter is not supported in Gemini API.',\n );\n }\n\n return toObject;\n}\n\nexport function countTokensParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n countTokensConfigToMldev(apiClient, fromConfig),\n );\n }\n\n return toObject;\n}\n\nexport function imageToMldev(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['gcsUri']) !== undefined) {\n throw new Error('gcsUri parameter is not supported in Gemini API.');\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, ['imageBytes']);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['bytesBase64Encoded'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generateVideosConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromNumberOfVideos = common.getValueByPath(fromObject, [\n 'numberOfVideos',\n ]);\n if (parentObject !== undefined && fromNumberOfVideos != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfVideos,\n );\n }\n\n if (common.getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {\n throw new Error('outputGcsUri parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['fps']) !== undefined) {\n throw new Error('fps parameter is not supported in Gemini API.');\n }\n\n const fromDurationSeconds = common.getValueByPath(fromObject, [\n 'durationSeconds',\n ]);\n if (parentObject !== undefined && fromDurationSeconds != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'durationSeconds'],\n fromDurationSeconds,\n );\n }\n\n if (common.getValueByPath(fromObject, ['seed']) !== undefined) {\n throw new Error('seed parameter is not supported in Gemini API.');\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n if (common.getValueByPath(fromObject, ['resolution']) !== undefined) {\n throw new Error('resolution parameter is not supported in Gemini API.');\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n if (common.getValueByPath(fromObject, ['pubsubTopic']) !== undefined) {\n throw new Error('pubsubTopic parameter is not supported in Gemini API.');\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n if (common.getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {\n throw new Error('enhancePrompt parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function generateVideosParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromImage = common.getValueByPath(fromObject, ['image']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['instances[0]', 'image'],\n imageToMldev(apiClient, fromImage),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateVideosConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partToVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToVertex(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n const fromExample = common.getValueByPath(fromObject, ['example']);\n if (fromExample != null) {\n common.setValueByPath(toObject, ['example'], fromExample);\n }\n\n const fromPattern = common.getValueByPath(fromObject, ['pattern']);\n if (fromPattern != null) {\n common.setValueByPath(toObject, ['pattern'], fromPattern);\n }\n\n const fromDefault = common.getValueByPath(fromObject, ['default']);\n if (fromDefault != null) {\n common.setValueByPath(toObject, ['default'], fromDefault);\n }\n\n const fromMaxLength = common.getValueByPath(fromObject, ['maxLength']);\n if (fromMaxLength != null) {\n common.setValueByPath(toObject, ['maxLength'], fromMaxLength);\n }\n\n const fromMinLength = common.getValueByPath(fromObject, ['minLength']);\n if (fromMinLength != null) {\n common.setValueByPath(toObject, ['minLength'], fromMinLength);\n }\n\n const fromMinProperties = common.getValueByPath(fromObject, [\n 'minProperties',\n ]);\n if (fromMinProperties != null) {\n common.setValueByPath(toObject, ['minProperties'], fromMinProperties);\n }\n\n const fromMaxProperties = common.getValueByPath(fromObject, [\n 'maxProperties',\n ]);\n if (fromMaxProperties != null) {\n common.setValueByPath(toObject, ['maxProperties'], fromMaxProperties);\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function modelSelectionConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ModelSelectionConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFeatureSelectionPreference = common.getValueByPath(fromObject, [\n 'featureSelectionPreference',\n ]);\n if (fromFeatureSelectionPreference != null) {\n common.setValueByPath(\n toObject,\n ['featureSelectionPreference'],\n fromFeatureSelectionPreference,\n );\n }\n\n return toObject;\n}\n\nexport function safetySettingToVertex(\n apiClient: ApiClient,\n fromObject: types.SafetySetting,\n): Record {\n const toObject: Record = {};\n\n const fromMethod = common.getValueByPath(fromObject, ['method']);\n if (fromMethod != null) {\n common.setValueByPath(toObject, ['method'], fromMethod);\n }\n\n const fromCategory = common.getValueByPath(fromObject, ['category']);\n if (fromCategory != null) {\n common.setValueByPath(toObject, ['category'], fromCategory);\n }\n\n const fromThreshold = common.getValueByPath(fromObject, ['threshold']);\n if (fromThreshold != null) {\n common.setValueByPath(toObject, ['threshold'], fromThreshold);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n schemaToVertex(apiClient, fromResponse),\n );\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToVertex(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToVertex(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n const fromRetrieval = common.getValueByPath(fromObject, ['retrieval']);\n if (fromRetrieval != null) {\n common.setValueByPath(toObject, ['retrieval'], fromRetrieval);\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToVertex());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function prebuiltVoiceConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.PrebuiltVoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceName = common.getValueByPath(fromObject, ['voiceName']);\n if (fromVoiceName != null) {\n common.setValueByPath(toObject, ['voiceName'], fromVoiceName);\n }\n\n return toObject;\n}\n\nexport function voiceConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.VoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromPrebuiltVoiceConfig = common.getValueByPath(fromObject, [\n 'prebuiltVoiceConfig',\n ]);\n if (fromPrebuiltVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['prebuiltVoiceConfig'],\n prebuiltVoiceConfigToVertex(apiClient, fromPrebuiltVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function speechConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.SpeechConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceConfig = common.getValueByPath(fromObject, ['voiceConfig']);\n if (fromVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['voiceConfig'],\n voiceConfigToVertex(apiClient, fromVoiceConfig),\n );\n }\n\n const fromLanguageCode = common.getValueByPath(fromObject, ['languageCode']);\n if (fromLanguageCode != null) {\n common.setValueByPath(toObject, ['languageCode'], fromLanguageCode);\n }\n\n return toObject;\n}\n\nexport function thinkingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ThinkingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromIncludeThoughts = common.getValueByPath(fromObject, [\n 'includeThoughts',\n ]);\n if (fromIncludeThoughts != null) {\n common.setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);\n }\n\n const fromThinkingBudget = common.getValueByPath(fromObject, [\n 'thinkingBudget',\n ]);\n if (fromThinkingBudget != null) {\n common.setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);\n }\n\n return toObject;\n}\n\nexport function generateContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTemperature = common.getValueByPath(fromObject, ['temperature']);\n if (fromTemperature != null) {\n common.setValueByPath(toObject, ['temperature'], fromTemperature);\n }\n\n const fromTopP = common.getValueByPath(fromObject, ['topP']);\n if (fromTopP != null) {\n common.setValueByPath(toObject, ['topP'], fromTopP);\n }\n\n const fromTopK = common.getValueByPath(fromObject, ['topK']);\n if (fromTopK != null) {\n common.setValueByPath(toObject, ['topK'], fromTopK);\n }\n\n const fromCandidateCount = common.getValueByPath(fromObject, [\n 'candidateCount',\n ]);\n if (fromCandidateCount != null) {\n common.setValueByPath(toObject, ['candidateCount'], fromCandidateCount);\n }\n\n const fromMaxOutputTokens = common.getValueByPath(fromObject, [\n 'maxOutputTokens',\n ]);\n if (fromMaxOutputTokens != null) {\n common.setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);\n }\n\n const fromStopSequences = common.getValueByPath(fromObject, [\n 'stopSequences',\n ]);\n if (fromStopSequences != null) {\n common.setValueByPath(toObject, ['stopSequences'], fromStopSequences);\n }\n\n const fromResponseLogprobs = common.getValueByPath(fromObject, [\n 'responseLogprobs',\n ]);\n if (fromResponseLogprobs != null) {\n common.setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);\n }\n\n const fromLogprobs = common.getValueByPath(fromObject, ['logprobs']);\n if (fromLogprobs != null) {\n common.setValueByPath(toObject, ['logprobs'], fromLogprobs);\n }\n\n const fromPresencePenalty = common.getValueByPath(fromObject, [\n 'presencePenalty',\n ]);\n if (fromPresencePenalty != null) {\n common.setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);\n }\n\n const fromFrequencyPenalty = common.getValueByPath(fromObject, [\n 'frequencyPenalty',\n ]);\n if (fromFrequencyPenalty != null) {\n common.setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (fromSeed != null) {\n common.setValueByPath(toObject, ['seed'], fromSeed);\n }\n\n const fromResponseMimeType = common.getValueByPath(fromObject, [\n 'responseMimeType',\n ]);\n if (fromResponseMimeType != null) {\n common.setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);\n }\n\n const fromResponseSchema = common.getValueByPath(fromObject, [\n 'responseSchema',\n ]);\n if (fromResponseSchema != null) {\n common.setValueByPath(\n toObject,\n ['responseSchema'],\n schemaToVertex(apiClient, t.tSchema(apiClient, fromResponseSchema)),\n );\n }\n\n const fromRoutingConfig = common.getValueByPath(fromObject, [\n 'routingConfig',\n ]);\n if (fromRoutingConfig != null) {\n common.setValueByPath(toObject, ['routingConfig'], fromRoutingConfig);\n }\n\n const fromModelSelectionConfig = common.getValueByPath(fromObject, [\n 'modelSelectionConfig',\n ]);\n if (fromModelSelectionConfig != null) {\n common.setValueByPath(\n toObject,\n ['modelConfig'],\n modelSelectionConfigToVertex(apiClient, fromModelSelectionConfig),\n );\n }\n\n const fromSafetySettings = common.getValueByPath(fromObject, [\n 'safetySettings',\n ]);\n if (parentObject !== undefined && fromSafetySettings != null) {\n if (Array.isArray(fromSafetySettings)) {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings.map((item) => {\n return safetySettingToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings,\n );\n }\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToVertex(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToVertex(apiClient, fromToolConfig),\n );\n }\n\n const fromLabels = common.getValueByPath(fromObject, ['labels']);\n if (parentObject !== undefined && fromLabels != null) {\n common.setValueByPath(parentObject, ['labels'], fromLabels);\n }\n\n const fromCachedContent = common.getValueByPath(fromObject, [\n 'cachedContent',\n ]);\n if (parentObject !== undefined && fromCachedContent != null) {\n common.setValueByPath(\n parentObject,\n ['cachedContent'],\n t.tCachedContentName(apiClient, fromCachedContent),\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities != null) {\n common.setValueByPath(\n toObject,\n ['responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromMediaResolution = common.getValueByPath(fromObject, [\n 'mediaResolution',\n ]);\n if (fromMediaResolution != null) {\n common.setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig != null) {\n common.setValueByPath(\n toObject,\n ['speechConfig'],\n speechConfigToVertex(\n apiClient,\n t.tSpeechConfig(apiClient, fromSpeechConfig),\n ),\n );\n }\n\n const fromAudioTimestamp = common.getValueByPath(fromObject, [\n 'audioTimestamp',\n ]);\n if (fromAudioTimestamp != null) {\n common.setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp);\n }\n\n const fromThinkingConfig = common.getValueByPath(fromObject, [\n 'thinkingConfig',\n ]);\n if (fromThinkingConfig != null) {\n common.setValueByPath(\n toObject,\n ['thinkingConfig'],\n thinkingConfigToVertex(apiClient, fromThinkingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function generateContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['generationConfig'],\n generateContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTaskType = common.getValueByPath(fromObject, ['taskType']);\n if (parentObject !== undefined && fromTaskType != null) {\n common.setValueByPath(\n parentObject,\n ['instances[]', 'task_type'],\n fromTaskType,\n );\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (parentObject !== undefined && fromTitle != null) {\n common.setValueByPath(parentObject, ['instances[]', 'title'], fromTitle);\n }\n\n const fromOutputDimensionality = common.getValueByPath(fromObject, [\n 'outputDimensionality',\n ]);\n if (parentObject !== undefined && fromOutputDimensionality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputDimensionality'],\n fromOutputDimensionality,\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (parentObject !== undefined && fromMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['instances[]', 'mimeType'],\n fromMimeType,\n );\n }\n\n const fromAutoTruncate = common.getValueByPath(fromObject, ['autoTruncate']);\n if (parentObject !== undefined && fromAutoTruncate != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'autoTruncate'],\n fromAutoTruncate,\n );\n }\n\n return toObject;\n}\n\nexport function embedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n common.setValueByPath(\n toObject,\n ['instances[]', 'content'],\n t.tContentsForEmbed(apiClient, fromContents),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n embedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromOutputGcsUri = common.getValueByPath(fromObject, ['outputGcsUri']);\n if (parentObject !== undefined && fromOutputGcsUri != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'storageUri'],\n fromOutputGcsUri,\n );\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n const fromNumberOfImages = common.getValueByPath(fromObject, [\n 'numberOfImages',\n ]);\n if (parentObject !== undefined && fromNumberOfImages != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfImages,\n );\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromGuidanceScale = common.getValueByPath(fromObject, [\n 'guidanceScale',\n ]);\n if (parentObject !== undefined && fromGuidanceScale != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'guidanceScale'],\n fromGuidanceScale,\n );\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (parentObject !== undefined && fromSeed != null) {\n common.setValueByPath(parentObject, ['parameters', 'seed'], fromSeed);\n }\n\n const fromSafetyFilterLevel = common.getValueByPath(fromObject, [\n 'safetyFilterLevel',\n ]);\n if (parentObject !== undefined && fromSafetyFilterLevel != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'safetySetting'],\n fromSafetyFilterLevel,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromIncludeSafetyAttributes = common.getValueByPath(fromObject, [\n 'includeSafetyAttributes',\n ]);\n if (parentObject !== undefined && fromIncludeSafetyAttributes != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeSafetyAttributes'],\n fromIncludeSafetyAttributes,\n );\n }\n\n const fromIncludeRaiReason = common.getValueByPath(fromObject, [\n 'includeRaiReason',\n ]);\n if (parentObject !== undefined && fromIncludeRaiReason != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeRaiReason'],\n fromIncludeRaiReason,\n );\n }\n\n const fromLanguage = common.getValueByPath(fromObject, ['language']);\n if (parentObject !== undefined && fromLanguage != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'language'],\n fromLanguage,\n );\n }\n\n const fromOutputMimeType = common.getValueByPath(fromObject, [\n 'outputMimeType',\n ]);\n if (parentObject !== undefined && fromOutputMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'mimeType'],\n fromOutputMimeType,\n );\n }\n\n const fromOutputCompressionQuality = common.getValueByPath(fromObject, [\n 'outputCompressionQuality',\n ]);\n if (parentObject !== undefined && fromOutputCompressionQuality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'compressionQuality'],\n fromOutputCompressionQuality,\n );\n }\n\n const fromAddWatermark = common.getValueByPath(fromObject, ['addWatermark']);\n if (parentObject !== undefined && fromAddWatermark != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'addWatermark'],\n fromAddWatermark,\n );\n }\n\n const fromEnhancePrompt = common.getValueByPath(fromObject, [\n 'enhancePrompt',\n ]);\n if (parentObject !== undefined && fromEnhancePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'enhancePrompt'],\n fromEnhancePrompt,\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateImagesConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getModelParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetModelParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function countTokensConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (parentObject !== undefined && fromGenerationConfig != null) {\n common.setValueByPath(\n parentObject,\n ['generationConfig'],\n fromGenerationConfig,\n );\n }\n\n return toObject;\n}\n\nexport function countTokensParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n countTokensConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function computeTokensParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.ComputeTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function imageToVertex(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromGcsUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromGcsUri != null) {\n common.setValueByPath(toObject, ['gcsUri'], fromGcsUri);\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, ['imageBytes']);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['bytesBase64Encoded'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generateVideosConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromNumberOfVideos = common.getValueByPath(fromObject, [\n 'numberOfVideos',\n ]);\n if (parentObject !== undefined && fromNumberOfVideos != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfVideos,\n );\n }\n\n const fromOutputGcsUri = common.getValueByPath(fromObject, ['outputGcsUri']);\n if (parentObject !== undefined && fromOutputGcsUri != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'storageUri'],\n fromOutputGcsUri,\n );\n }\n\n const fromFps = common.getValueByPath(fromObject, ['fps']);\n if (parentObject !== undefined && fromFps != null) {\n common.setValueByPath(parentObject, ['parameters', 'fps'], fromFps);\n }\n\n const fromDurationSeconds = common.getValueByPath(fromObject, [\n 'durationSeconds',\n ]);\n if (parentObject !== undefined && fromDurationSeconds != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'durationSeconds'],\n fromDurationSeconds,\n );\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (parentObject !== undefined && fromSeed != null) {\n common.setValueByPath(parentObject, ['parameters', 'seed'], fromSeed);\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromResolution = common.getValueByPath(fromObject, ['resolution']);\n if (parentObject !== undefined && fromResolution != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'resolution'],\n fromResolution,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromPubsubTopic = common.getValueByPath(fromObject, ['pubsubTopic']);\n if (parentObject !== undefined && fromPubsubTopic != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'pubsubTopic'],\n fromPubsubTopic,\n );\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n const fromEnhancePrompt = common.getValueByPath(fromObject, [\n 'enhancePrompt',\n ]);\n if (parentObject !== undefined && fromEnhancePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'enhancePrompt'],\n fromEnhancePrompt,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromImage = common.getValueByPath(fromObject, ['image']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['instances[0]', 'image'],\n imageToVertex(apiClient, fromImage),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateVideosConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partFromMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentFromMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function citationMetadataFromMldev(\n apiClient: ApiClient,\n fromObject: types.CitationMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromCitations = common.getValueByPath(fromObject, ['citationSources']);\n if (fromCitations != null) {\n common.setValueByPath(toObject, ['citations'], fromCitations);\n }\n\n return toObject;\n}\n\nexport function candidateFromMldev(\n apiClient: ApiClient,\n fromObject: types.Candidate,\n): Record {\n const toObject: Record = {};\n\n const fromContent = common.getValueByPath(fromObject, ['content']);\n if (fromContent != null) {\n common.setValueByPath(\n toObject,\n ['content'],\n contentFromMldev(apiClient, fromContent),\n );\n }\n\n const fromCitationMetadata = common.getValueByPath(fromObject, [\n 'citationMetadata',\n ]);\n if (fromCitationMetadata != null) {\n common.setValueByPath(\n toObject,\n ['citationMetadata'],\n citationMetadataFromMldev(apiClient, fromCitationMetadata),\n );\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n const fromFinishReason = common.getValueByPath(fromObject, ['finishReason']);\n if (fromFinishReason != null) {\n common.setValueByPath(toObject, ['finishReason'], fromFinishReason);\n }\n\n const fromAvgLogprobs = common.getValueByPath(fromObject, ['avgLogprobs']);\n if (fromAvgLogprobs != null) {\n common.setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);\n }\n\n const fromGroundingMetadata = common.getValueByPath(fromObject, [\n 'groundingMetadata',\n ]);\n if (fromGroundingMetadata != null) {\n common.setValueByPath(\n toObject,\n ['groundingMetadata'],\n fromGroundingMetadata,\n );\n }\n\n const fromIndex = common.getValueByPath(fromObject, ['index']);\n if (fromIndex != null) {\n common.setValueByPath(toObject, ['index'], fromIndex);\n }\n\n const fromLogprobsResult = common.getValueByPath(fromObject, [\n 'logprobsResult',\n ]);\n if (fromLogprobsResult != null) {\n common.setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult);\n }\n\n const fromSafetyRatings = common.getValueByPath(fromObject, [\n 'safetyRatings',\n ]);\n if (fromSafetyRatings != null) {\n common.setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings);\n }\n\n return toObject;\n}\n\nexport function generateContentResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromCandidates = common.getValueByPath(fromObject, ['candidates']);\n if (fromCandidates != null) {\n if (Array.isArray(fromCandidates)) {\n common.setValueByPath(\n toObject,\n ['candidates'],\n fromCandidates.map((item) => {\n return candidateFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['candidates'], fromCandidates);\n }\n }\n\n const fromModelVersion = common.getValueByPath(fromObject, ['modelVersion']);\n if (fromModelVersion != null) {\n common.setValueByPath(toObject, ['modelVersion'], fromModelVersion);\n }\n\n const fromPromptFeedback = common.getValueByPath(fromObject, [\n 'promptFeedback',\n ]);\n if (fromPromptFeedback != null) {\n common.setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingStatisticsFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function contentEmbeddingFromMldev(\n apiClient: ApiClient,\n fromObject: types.ContentEmbedding,\n): Record {\n const toObject: Record = {};\n\n const fromValues = common.getValueByPath(fromObject, ['values']);\n if (fromValues != null) {\n common.setValueByPath(toObject, ['values'], fromValues);\n }\n\n return toObject;\n}\n\nexport function embedContentMetadataFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function embedContentResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromEmbeddings = common.getValueByPath(fromObject, ['embeddings']);\n if (fromEmbeddings != null) {\n if (Array.isArray(fromEmbeddings)) {\n common.setValueByPath(\n toObject,\n ['embeddings'],\n fromEmbeddings.map((item) => {\n return contentEmbeddingFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['embeddings'], fromEmbeddings);\n }\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(\n toObject,\n ['metadata'],\n embedContentMetadataFromMldev(),\n );\n }\n\n return toObject;\n}\n\nexport function imageFromMldev(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromImageBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['imageBytes'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function safetyAttributesFromMldev(\n apiClient: ApiClient,\n fromObject: types.SafetyAttributes,\n): Record {\n const toObject: Record = {};\n\n const fromCategories = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'categories',\n ]);\n if (fromCategories != null) {\n common.setValueByPath(toObject, ['categories'], fromCategories);\n }\n\n const fromScores = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'scores',\n ]);\n if (fromScores != null) {\n common.setValueByPath(toObject, ['scores'], fromScores);\n }\n\n const fromContentType = common.getValueByPath(fromObject, ['contentType']);\n if (fromContentType != null) {\n common.setValueByPath(toObject, ['contentType'], fromContentType);\n }\n\n return toObject;\n}\n\nexport function generatedImageFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedImage,\n): Record {\n const toObject: Record = {};\n\n const fromImage = common.getValueByPath(fromObject, ['_self']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['image'],\n imageFromMldev(apiClient, fromImage),\n );\n }\n\n const fromRaiFilteredReason = common.getValueByPath(fromObject, [\n 'raiFilteredReason',\n ]);\n if (fromRaiFilteredReason != null) {\n common.setValueByPath(\n toObject,\n ['raiFilteredReason'],\n fromRaiFilteredReason,\n );\n }\n\n const fromSafetyAttributes = common.getValueByPath(fromObject, ['_self']);\n if (fromSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['safetyAttributes'],\n safetyAttributesFromMldev(apiClient, fromSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedImages = common.getValueByPath(fromObject, [\n 'predictions',\n ]);\n if (fromGeneratedImages != null) {\n if (Array.isArray(fromGeneratedImages)) {\n common.setValueByPath(\n toObject,\n ['generatedImages'],\n fromGeneratedImages.map((item) => {\n return generatedImageFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedImages'], fromGeneratedImages);\n }\n }\n\n const fromPositivePromptSafetyAttributes = common.getValueByPath(fromObject, [\n 'positivePromptSafetyAttributes',\n ]);\n if (fromPositivePromptSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['positivePromptSafetyAttributes'],\n safetyAttributesFromMldev(apiClient, fromPositivePromptSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function endpointFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function tunedModelInfoFromMldev(\n apiClient: ApiClient,\n fromObject: types.TunedModelInfo,\n): Record {\n const toObject: Record = {};\n\n const fromBaseModel = common.getValueByPath(fromObject, ['baseModel']);\n if (fromBaseModel != null) {\n common.setValueByPath(toObject, ['baseModel'], fromBaseModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n return toObject;\n}\n\nexport function modelFromMldev(\n apiClient: ApiClient,\n fromObject: types.Model,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromVersion = common.getValueByPath(fromObject, ['version']);\n if (fromVersion != null) {\n common.setValueByPath(toObject, ['version'], fromVersion);\n }\n\n const fromTunedModelInfo = common.getValueByPath(fromObject, ['_self']);\n if (fromTunedModelInfo != null) {\n common.setValueByPath(\n toObject,\n ['tunedModelInfo'],\n tunedModelInfoFromMldev(apiClient, fromTunedModelInfo),\n );\n }\n\n const fromInputTokenLimit = common.getValueByPath(fromObject, [\n 'inputTokenLimit',\n ]);\n if (fromInputTokenLimit != null) {\n common.setValueByPath(toObject, ['inputTokenLimit'], fromInputTokenLimit);\n }\n\n const fromOutputTokenLimit = common.getValueByPath(fromObject, [\n 'outputTokenLimit',\n ]);\n if (fromOutputTokenLimit != null) {\n common.setValueByPath(toObject, ['outputTokenLimit'], fromOutputTokenLimit);\n }\n\n const fromSupportedActions = common.getValueByPath(fromObject, [\n 'supportedGenerationMethods',\n ]);\n if (fromSupportedActions != null) {\n common.setValueByPath(toObject, ['supportedActions'], fromSupportedActions);\n }\n\n return toObject;\n}\n\nexport function countTokensResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTotalTokens = common.getValueByPath(fromObject, ['totalTokens']);\n if (fromTotalTokens != null) {\n common.setValueByPath(toObject, ['totalTokens'], fromTotalTokens);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n return toObject;\n}\n\nexport function videoFromMldev(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['video', 'uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'video',\n 'encodedVideo',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['encoding']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromMldev(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, [\n 'generatedSamples',\n ]);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromMldev(apiClient, fromResponse),\n );\n }\n\n return toObject;\n}\n\nexport function partFromVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentFromVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function citationMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.CitationMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromCitations = common.getValueByPath(fromObject, ['citations']);\n if (fromCitations != null) {\n common.setValueByPath(toObject, ['citations'], fromCitations);\n }\n\n return toObject;\n}\n\nexport function candidateFromVertex(\n apiClient: ApiClient,\n fromObject: types.Candidate,\n): Record {\n const toObject: Record = {};\n\n const fromContent = common.getValueByPath(fromObject, ['content']);\n if (fromContent != null) {\n common.setValueByPath(\n toObject,\n ['content'],\n contentFromVertex(apiClient, fromContent),\n );\n }\n\n const fromCitationMetadata = common.getValueByPath(fromObject, [\n 'citationMetadata',\n ]);\n if (fromCitationMetadata != null) {\n common.setValueByPath(\n toObject,\n ['citationMetadata'],\n citationMetadataFromVertex(apiClient, fromCitationMetadata),\n );\n }\n\n const fromFinishMessage = common.getValueByPath(fromObject, [\n 'finishMessage',\n ]);\n if (fromFinishMessage != null) {\n common.setValueByPath(toObject, ['finishMessage'], fromFinishMessage);\n }\n\n const fromFinishReason = common.getValueByPath(fromObject, ['finishReason']);\n if (fromFinishReason != null) {\n common.setValueByPath(toObject, ['finishReason'], fromFinishReason);\n }\n\n const fromAvgLogprobs = common.getValueByPath(fromObject, ['avgLogprobs']);\n if (fromAvgLogprobs != null) {\n common.setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);\n }\n\n const fromGroundingMetadata = common.getValueByPath(fromObject, [\n 'groundingMetadata',\n ]);\n if (fromGroundingMetadata != null) {\n common.setValueByPath(\n toObject,\n ['groundingMetadata'],\n fromGroundingMetadata,\n );\n }\n\n const fromIndex = common.getValueByPath(fromObject, ['index']);\n if (fromIndex != null) {\n common.setValueByPath(toObject, ['index'], fromIndex);\n }\n\n const fromLogprobsResult = common.getValueByPath(fromObject, [\n 'logprobsResult',\n ]);\n if (fromLogprobsResult != null) {\n common.setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult);\n }\n\n const fromSafetyRatings = common.getValueByPath(fromObject, [\n 'safetyRatings',\n ]);\n if (fromSafetyRatings != null) {\n common.setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings);\n }\n\n return toObject;\n}\n\nexport function generateContentResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromCandidates = common.getValueByPath(fromObject, ['candidates']);\n if (fromCandidates != null) {\n if (Array.isArray(fromCandidates)) {\n common.setValueByPath(\n toObject,\n ['candidates'],\n fromCandidates.map((item) => {\n return candidateFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['candidates'], fromCandidates);\n }\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromResponseId = common.getValueByPath(fromObject, ['responseId']);\n if (fromResponseId != null) {\n common.setValueByPath(toObject, ['responseId'], fromResponseId);\n }\n\n const fromModelVersion = common.getValueByPath(fromObject, ['modelVersion']);\n if (fromModelVersion != null) {\n common.setValueByPath(toObject, ['modelVersion'], fromModelVersion);\n }\n\n const fromPromptFeedback = common.getValueByPath(fromObject, [\n 'promptFeedback',\n ]);\n if (fromPromptFeedback != null) {\n common.setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingStatisticsFromVertex(\n apiClient: ApiClient,\n fromObject: types.ContentEmbeddingStatistics,\n): Record {\n const toObject: Record = {};\n\n const fromTruncated = common.getValueByPath(fromObject, ['truncated']);\n if (fromTruncated != null) {\n common.setValueByPath(toObject, ['truncated'], fromTruncated);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['token_count']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingFromVertex(\n apiClient: ApiClient,\n fromObject: types.ContentEmbedding,\n): Record {\n const toObject: Record = {};\n\n const fromValues = common.getValueByPath(fromObject, ['values']);\n if (fromValues != null) {\n common.setValueByPath(toObject, ['values'], fromValues);\n }\n\n const fromStatistics = common.getValueByPath(fromObject, ['statistics']);\n if (fromStatistics != null) {\n common.setValueByPath(\n toObject,\n ['statistics'],\n contentEmbeddingStatisticsFromVertex(apiClient, fromStatistics),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromBillableCharacterCount = common.getValueByPath(fromObject, [\n 'billableCharacterCount',\n ]);\n if (fromBillableCharacterCount != null) {\n common.setValueByPath(\n toObject,\n ['billableCharacterCount'],\n fromBillableCharacterCount,\n );\n }\n\n return toObject;\n}\n\nexport function embedContentResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromEmbeddings = common.getValueByPath(fromObject, [\n 'predictions[]',\n 'embeddings',\n ]);\n if (fromEmbeddings != null) {\n if (Array.isArray(fromEmbeddings)) {\n common.setValueByPath(\n toObject,\n ['embeddings'],\n fromEmbeddings.map((item) => {\n return contentEmbeddingFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['embeddings'], fromEmbeddings);\n }\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(\n toObject,\n ['metadata'],\n embedContentMetadataFromVertex(apiClient, fromMetadata),\n );\n }\n\n return toObject;\n}\n\nexport function imageFromVertex(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromGcsUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromGcsUri != null) {\n common.setValueByPath(toObject, ['gcsUri'], fromGcsUri);\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['imageBytes'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function safetyAttributesFromVertex(\n apiClient: ApiClient,\n fromObject: types.SafetyAttributes,\n): Record {\n const toObject: Record = {};\n\n const fromCategories = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'categories',\n ]);\n if (fromCategories != null) {\n common.setValueByPath(toObject, ['categories'], fromCategories);\n }\n\n const fromScores = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'scores',\n ]);\n if (fromScores != null) {\n common.setValueByPath(toObject, ['scores'], fromScores);\n }\n\n const fromContentType = common.getValueByPath(fromObject, ['contentType']);\n if (fromContentType != null) {\n common.setValueByPath(toObject, ['contentType'], fromContentType);\n }\n\n return toObject;\n}\n\nexport function generatedImageFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedImage,\n): Record {\n const toObject: Record = {};\n\n const fromImage = common.getValueByPath(fromObject, ['_self']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['image'],\n imageFromVertex(apiClient, fromImage),\n );\n }\n\n const fromRaiFilteredReason = common.getValueByPath(fromObject, [\n 'raiFilteredReason',\n ]);\n if (fromRaiFilteredReason != null) {\n common.setValueByPath(\n toObject,\n ['raiFilteredReason'],\n fromRaiFilteredReason,\n );\n }\n\n const fromSafetyAttributes = common.getValueByPath(fromObject, ['_self']);\n if (fromSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['safetyAttributes'],\n safetyAttributesFromVertex(apiClient, fromSafetyAttributes),\n );\n }\n\n const fromEnhancedPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromEnhancedPrompt != null) {\n common.setValueByPath(toObject, ['enhancedPrompt'], fromEnhancedPrompt);\n }\n\n return toObject;\n}\n\nexport function generateImagesResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedImages = common.getValueByPath(fromObject, [\n 'predictions',\n ]);\n if (fromGeneratedImages != null) {\n if (Array.isArray(fromGeneratedImages)) {\n common.setValueByPath(\n toObject,\n ['generatedImages'],\n fromGeneratedImages.map((item) => {\n return generatedImageFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedImages'], fromGeneratedImages);\n }\n }\n\n const fromPositivePromptSafetyAttributes = common.getValueByPath(fromObject, [\n 'positivePromptSafetyAttributes',\n ]);\n if (fromPositivePromptSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['positivePromptSafetyAttributes'],\n safetyAttributesFromVertex(apiClient, fromPositivePromptSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function endpointFromVertex(\n apiClient: ApiClient,\n fromObject: types.Endpoint,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['endpoint']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDeployedModelId = common.getValueByPath(fromObject, [\n 'deployedModelId',\n ]);\n if (fromDeployedModelId != null) {\n common.setValueByPath(toObject, ['deployedModelId'], fromDeployedModelId);\n }\n\n return toObject;\n}\n\nexport function tunedModelInfoFromVertex(\n apiClient: ApiClient,\n fromObject: types.TunedModelInfo,\n): Record {\n const toObject: Record = {};\n\n const fromBaseModel = common.getValueByPath(fromObject, [\n 'labels',\n 'google-vertex-llm-tuning-base-model-id',\n ]);\n if (fromBaseModel != null) {\n common.setValueByPath(toObject, ['baseModel'], fromBaseModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n return toObject;\n}\n\nexport function modelFromVertex(\n apiClient: ApiClient,\n fromObject: types.Model,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromVersion = common.getValueByPath(fromObject, ['versionId']);\n if (fromVersion != null) {\n common.setValueByPath(toObject, ['version'], fromVersion);\n }\n\n const fromEndpoints = common.getValueByPath(fromObject, ['deployedModels']);\n if (fromEndpoints != null) {\n if (Array.isArray(fromEndpoints)) {\n common.setValueByPath(\n toObject,\n ['endpoints'],\n fromEndpoints.map((item) => {\n return endpointFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['endpoints'], fromEndpoints);\n }\n }\n\n const fromLabels = common.getValueByPath(fromObject, ['labels']);\n if (fromLabels != null) {\n common.setValueByPath(toObject, ['labels'], fromLabels);\n }\n\n const fromTunedModelInfo = common.getValueByPath(fromObject, ['_self']);\n if (fromTunedModelInfo != null) {\n common.setValueByPath(\n toObject,\n ['tunedModelInfo'],\n tunedModelInfoFromVertex(apiClient, fromTunedModelInfo),\n );\n }\n\n return toObject;\n}\n\nexport function countTokensResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTotalTokens = common.getValueByPath(fromObject, ['totalTokens']);\n if (fromTotalTokens != null) {\n common.setValueByPath(toObject, ['totalTokens'], fromTotalTokens);\n }\n\n return toObject;\n}\n\nexport function computeTokensResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.ComputeTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTokensInfo = common.getValueByPath(fromObject, ['tokensInfo']);\n if (fromTokensInfo != null) {\n common.setValueByPath(toObject, ['tokensInfo'], fromTokensInfo);\n }\n\n return toObject;\n}\n\nexport function videoFromVertex(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromVertex(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, ['videos']);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromVertex(apiClient, fromResponse),\n );\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Live client.\n *\n * @experimental\n */\n\nimport {ApiClient} from './_api_client';\nimport {Auth} from './_auth';\nimport * as t from './_transformers';\nimport {WebSocket, WebSocketCallbacks, WebSocketFactory} from './_websocket';\nimport * as converters from './converters/_live_converters';\nimport {contentToMldev, contentToVertex} from './converters/_models_converters';\nimport * as types from './types';\n\nconst FUNCTION_RESPONSE_REQUIRES_ID =\n 'FunctionResponse request must have an `id` field from the response of a ToolCall.FunctionalCalls in Google AI.';\n\n/**\n * Handles incoming messages from the WebSocket.\n *\n * @remarks\n * This function is responsible for parsing incoming messages, transforming them\n * into LiveServerMessages, and then calling the onmessage callback. Note that\n * the first message which is received from the server is a setupComplete\n * message.\n *\n * @param apiClient The ApiClient instance.\n * @param onmessage The user-provided onmessage callback (if any).\n * @param event The MessageEvent from the WebSocket.\n */\nasync function handleWebSocketMessage(\n apiClient: ApiClient,\n onmessage: (msg: types.LiveServerMessage) => void,\n event: MessageEvent,\n): Promise {\n let serverMessage: types.LiveServerMessage;\n let data: types.LiveServerMessage;\n if (event.data instanceof Blob) {\n data = JSON.parse(await event.data.text()) as types.LiveServerMessage;\n } else {\n data = JSON.parse(event.data) as types.LiveServerMessage;\n }\n if (apiClient.isVertexAI()) {\n serverMessage = converters.liveServerMessageFromVertex(apiClient, data);\n } else {\n serverMessage = converters.liveServerMessageFromMldev(apiClient, data);\n }\n\n onmessage(serverMessage);\n}\n\n/**\n Live class encapsulates the configuration for live interaction with the\n Generative Language API. It embeds ApiClient for general API settings.\n\n @experimental\n */\nexport class Live {\n constructor(\n private readonly apiClient: ApiClient,\n private readonly auth: Auth,\n private readonly webSocketFactory: WebSocketFactory,\n ) {}\n\n /**\n Establishes a connection to the specified model with the given\n configuration and returns a Session object representing that connection.\n\n @experimental\n\n @remarks\n\n @param params - The parameters for establishing a connection to the model.\n @return A live session.\n\n @example\n ```ts\n let model: string;\n if (GOOGLE_GENAI_USE_VERTEXAI) {\n model = 'gemini-2.0-flash-live-preview-04-09';\n } else {\n model = 'gemini-2.0-flash-live-001';\n }\n const session = await ai.live.connect({\n model: model,\n config: {\n responseModalities: [Modality.AUDIO],\n },\n callbacks: {\n onopen: () => {\n console.log('Connected to the socket.');\n },\n onmessage: (e: MessageEvent) => {\n console.log('Received message from the server: %s\\n', debug(e.data));\n },\n onerror: (e: ErrorEvent) => {\n console.log('Error occurred: %s\\n', debug(e.error));\n },\n onclose: (e: CloseEvent) => {\n console.log('Connection closed.');\n },\n },\n });\n ```\n */\n async connect(params: types.LiveConnectParameters): Promise {\n const websocketBaseUrl = this.apiClient.getWebsocketBaseUrl();\n const apiVersion = this.apiClient.getApiVersion();\n let url: string;\n const headers = mapToHeaders(this.apiClient.getDefaultHeaders());\n if (this.apiClient.isVertexAI()) {\n url = `${websocketBaseUrl}/ws/google.cloud.aiplatform.${\n apiVersion\n }.LlmBidiService/BidiGenerateContent`;\n await this.auth.addAuthHeaders(headers);\n } else {\n const apiKey = this.apiClient.getApiKey();\n url = `${websocketBaseUrl}/ws/google.ai.generativelanguage.${\n apiVersion\n }.GenerativeService.BidiGenerateContent?key=${apiKey}`;\n }\n\n let onopenResolve: (value: unknown) => void = () => {};\n const onopenPromise = new Promise((resolve: (value: unknown) => void) => {\n onopenResolve = resolve;\n });\n\n const callbacks: types.LiveCallbacks = params.callbacks;\n\n const onopenAwaitedCallback = function () {\n callbacks?.onopen?.();\n onopenResolve({});\n };\n\n const apiClient = this.apiClient;\n\n const websocketCallbacks: WebSocketCallbacks = {\n onopen: onopenAwaitedCallback,\n onmessage: (event: MessageEvent) => {\n void handleWebSocketMessage(apiClient, callbacks.onmessage, event);\n },\n onerror:\n callbacks?.onerror ??\n function (e: ErrorEvent) {\n void e;\n },\n onclose:\n callbacks?.onclose ??\n function (e: CloseEvent) {\n void e;\n },\n };\n\n const conn = this.webSocketFactory.create(\n url,\n headersToMap(headers),\n websocketCallbacks,\n );\n conn.connect();\n // Wait for the websocket to open before sending requests.\n await onopenPromise;\n\n let transformedModel = t.tModel(this.apiClient, params.model);\n if (\n this.apiClient.isVertexAI() &&\n transformedModel.startsWith('publishers/')\n ) {\n const project = this.apiClient.getProject();\n const location = this.apiClient.getLocation();\n transformedModel =\n `projects/${project}/locations/${location}/` + transformedModel;\n }\n\n let clientMessage: Record = {};\n\n if (\n this.apiClient.isVertexAI() &&\n params.config?.responseModalities === undefined\n ) {\n // Set default to AUDIO to align with MLDev API.\n if (params.config === undefined) {\n params.config = {responseModalities: [types.Modality.AUDIO]};\n } else {\n params.config.responseModalities = [types.Modality.AUDIO];\n }\n }\n const liveConnectParameters: types.LiveConnectParameters = {\n model: transformedModel,\n config: params.config,\n callbacks: params.callbacks,\n };\n if (this.apiClient.isVertexAI()) {\n clientMessage = converters.liveConnectParametersToVertex(\n this.apiClient,\n liveConnectParameters,\n );\n } else {\n clientMessage = converters.liveConnectParametersToMldev(\n this.apiClient,\n liveConnectParameters,\n );\n }\n delete clientMessage['config'];\n conn.send(JSON.stringify(clientMessage));\n return new Session(conn, this.apiClient);\n }\n}\n\nconst defaultLiveSendClientContentParamerters: types.LiveSendClientContentParameters =\n {\n turnComplete: true,\n };\n\n/**\n Represents a connection to the API.\n\n @experimental\n */\nexport class Session {\n constructor(\n readonly conn: WebSocket,\n private readonly apiClient: ApiClient,\n ) {}\n\n private tLiveClientContent(\n apiClient: ApiClient,\n params: types.LiveSendClientContentParameters,\n ): types.LiveClientMessage {\n if (params.turns !== null && params.turns !== undefined) {\n let contents: types.Content[] = [];\n try {\n contents = t.tContents(\n apiClient,\n params.turns as types.ContentListUnion,\n );\n if (apiClient.isVertexAI()) {\n contents = contents.map((item) => contentToVertex(apiClient, item));\n } else {\n contents = contents.map((item) => contentToMldev(apiClient, item));\n }\n } catch {\n throw new Error(\n `Failed to parse client content \"turns\", type: '${typeof params.turns}'`,\n );\n }\n return {\n clientContent: {turns: contents, turnComplete: params.turnComplete},\n };\n }\n\n return {\n clientContent: {turnComplete: params.turnComplete},\n };\n }\n\n private tLiveClientRealtimeInput(\n apiClient: ApiClient,\n params: types.LiveSendRealtimeInputParameters,\n ): types.LiveClientMessage {\n let clientMessage: types.LiveClientMessage = {};\n if (!('media' in params) || !params.media) {\n throw new Error(\n `Failed to convert realtime input \"media\", type: '${typeof params.media}'`,\n );\n }\n\n // LiveClientRealtimeInput\n clientMessage = {\n realtimeInput: {\n mediaChunks: [params.media],\n activityStart: params.activityStart,\n activityEnd: params.activityEnd,\n },\n };\n return clientMessage;\n }\n\n private tLiveClienttToolResponse(\n apiClient: ApiClient,\n params: types.LiveSendToolResponseParameters,\n ): types.LiveClientMessage {\n let functionResponses: types.FunctionResponse[] = [];\n\n if (params.functionResponses == null) {\n throw new Error('functionResponses is required.');\n }\n\n if (!Array.isArray(params.functionResponses)) {\n functionResponses = [params.functionResponses];\n } else {\n functionResponses = params.functionResponses;\n }\n\n if (functionResponses.length === 0) {\n throw new Error('functionResponses is required.');\n }\n\n for (const functionResponse of functionResponses) {\n if (\n typeof functionResponse !== 'object' ||\n functionResponse === null ||\n !('name' in functionResponse) ||\n !('response' in functionResponse)\n ) {\n throw new Error(\n `Could not parse function response, type '${typeof functionResponse}'.`,\n );\n }\n if (!apiClient.isVertexAI() && !('id' in functionResponse)) {\n throw new Error(FUNCTION_RESPONSE_REQUIRES_ID);\n }\n }\n\n const clientMessage: types.LiveClientMessage = {\n toolResponse: {functionResponses: functionResponses},\n };\n return clientMessage;\n }\n\n /**\n Send a message over the established connection.\n\n @param params - Contains two **optional** properties, `turns` and\n `turnComplete`.\n\n - `turns` will be converted to a `Content[]`\n - `turnComplete: true` [default] indicates that you are done sending\n content and expect a response. If `turnComplete: false`, the server\n will wait for additional messages before starting generation.\n\n @experimental\n\n @remarks\n There are two ways to send messages to the live API:\n `sendClientContent` and `sendRealtimeInput`.\n\n `sendClientContent` messages are added to the model context **in order**.\n Having a conversation using `sendClientContent` messages is roughly\n equivalent to using the `Chat.sendMessageStream`, except that the state of\n the `chat` history is stored on the API server instead of locally.\n\n Because of `sendClientContent`'s order guarantee, the model cannot respons\n as quickly to `sendClientContent` messages as to `sendRealtimeInput`\n messages. This makes the biggest difference when sending objects that have\n significant preprocessing time (typically images).\n\n The `sendClientContent` message sends a `Content[]`\n which has more options than the `Blob` sent by `sendRealtimeInput`.\n\n So the main use-cases for `sendClientContent` over `sendRealtimeInput` are:\n\n - Sending anything that can't be represented as a `Blob` (text,\n `sendClientContent({turns=\"Hello?\"}`)).\n - Managing turns when not using audio input and voice activity detection.\n (`sendClientContent({turnComplete:true})` or the short form\n `sendClientContent()`)\n - Prefilling a conversation context\n ```\n sendClientContent({\n turns: [\n Content({role:user, parts:...}),\n Content({role:user, parts:...}),\n ...\n ]\n })\n ```\n @experimental\n */\n sendClientContent(params: types.LiveSendClientContentParameters) {\n params = {\n ...defaultLiveSendClientContentParamerters,\n ...params,\n };\n\n const clientMessage: types.LiveClientMessage = this.tLiveClientContent(\n this.apiClient,\n params,\n );\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Send a realtime message over the established connection.\n\n @param params - Contains one property, `media`.\n\n - `media` will be converted to a `Blob`\n\n @experimental\n\n @remarks\n Use `sendRealtimeInput` for realtime audio chunks and video frames (images).\n\n With `sendRealtimeInput` the api will respond to audio automatically\n based on voice activity detection (VAD).\n\n `sendRealtimeInput` is optimized for responsivness at the expense of\n deterministic ordering guarantees. Audio and video tokens are to the\n context when they become available.\n\n Note: The Call signature expects a `Blob` object, but only a subset\n of audio and image mimetypes are allowed.\n */\n sendRealtimeInput(params: types.LiveSendRealtimeInputParameters) {\n if (params.media == null) {\n throw new Error('Media is required.');\n }\n\n const clientMessage: types.LiveClientMessage =\n this.tLiveClientRealtimeInput(this.apiClient, params);\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Send a function response message over the established connection.\n\n @param params - Contains property `functionResponses`.\n\n - `functionResponses` will be converted to a `functionResponses[]`\n\n @remarks\n Use `sendFunctionResponse` to reply to `LiveServerToolCall` from the server.\n\n Use {@link types.LiveConnectConfig#tools} to configure the callable functions.\n\n @experimental\n */\n sendToolResponse(params: types.LiveSendToolResponseParameters) {\n if (params.functionResponses == null) {\n throw new Error('Tool response parameters are required.');\n }\n\n const clientMessage: types.LiveClientMessage =\n this.tLiveClienttToolResponse(this.apiClient, params);\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Terminates the WebSocket connection.\n\n @experimental\n\n @example\n ```ts\n let model: string;\n if (GOOGLE_GENAI_USE_VERTEXAI) {\n model = 'gemini-2.0-flash-live-preview-04-09';\n } else {\n model = 'gemini-2.0-flash-live-001';\n }\n const session = await ai.live.connect({\n model: model,\n config: {\n responseModalities: [Modality.AUDIO],\n }\n });\n\n session.close();\n ```\n */\n close() {\n this.conn.close();\n }\n}\n\n// Converts an headers object to a \"map\" object as expected by the WebSocket\n// constructor. We use this as the Auth interface works with Headers objects\n// while the WebSocket constructor takes a map.\nfunction headersToMap(headers: Headers): Record {\n const headerMap: Record = {};\n headers.forEach((value, key) => {\n headerMap[key] = value;\n });\n return headerMap;\n}\n\n// Converts a \"map\" object to a headers object. We use this as the Auth\n// interface works with Headers objects while the API client default headers\n// returns a map.\nfunction mapToHeaders(map: Record): Headers {\n const headers = new Headers();\n for (const [key, value] of Object.entries(map)) {\n headers.append(key, value);\n }\n return headers;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_models_converters';\nimport * as types from './types';\n\nexport class Models extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Makes an API request to generate content with a given model.\n *\n * For the `model` parameter, supported formats for Vertex AI API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The full resource name starts with 'projects/', for example:\n * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'\n * - The partial resource name with 'publishers/', for example:\n * 'publishers/google/models/gemini-2.0-flash' or\n * 'publishers/meta/models/llama-3.1-405b-instruct-maas'\n * - `/` separated publisher and model name, for example:\n * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas'\n *\n * For the `model` parameter, supported formats for Gemini API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The model name starts with 'models/', for example:\n * 'models/gemini-2.0-flash'\n * - For tuned models, the model name starts with 'tunedModels/',\n * for example:\n * 'tunedModels/1234567890123456789'\n *\n * Some models support multimodal input and output.\n *\n * @param params - The parameters for generating content.\n * @return The response from generating content.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents: 'why is the sky blue?',\n * config: {\n * candidateCount: 2,\n * }\n * });\n * console.log(response);\n * ```\n */\n generateContent = async (\n params: types.GenerateContentParameters,\n ): Promise => {\n return await this.generateContentInternal(params);\n };\n\n /**\n * Makes an API request to generate content with a given model and yields the\n * response in chunks.\n *\n * For the `model` parameter, supported formats for Vertex AI API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The full resource name starts with 'projects/', for example:\n * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'\n * - The partial resource name with 'publishers/', for example:\n * 'publishers/google/models/gemini-2.0-flash' or\n * 'publishers/meta/models/llama-3.1-405b-instruct-maas'\n * - `/` separated publisher and model name, for example:\n * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas'\n *\n * For the `model` parameter, supported formats for Gemini API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The model name starts with 'models/', for example:\n * 'models/gemini-2.0-flash'\n * - For tuned models, the model name starts with 'tunedModels/',\n * for example:\n * 'tunedModels/1234567890123456789'\n *\n * Some models support multimodal input and output.\n *\n * @param params - The parameters for generating content with streaming response.\n * @return The response from generating content.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContentStream({\n * model: 'gemini-2.0-flash',\n * contents: 'why is the sky blue?',\n * config: {\n * maxOutputTokens: 200,\n * }\n * });\n * for await (const chunk of response) {\n * console.log(chunk);\n * }\n * ```\n */\n generateContentStream = async (\n params: types.GenerateContentParameters,\n ): Promise> => {\n return await this.generateContentStreamInternal(params);\n };\n\n /**\n * Generates an image based on a text description and configuration.\n *\n * @param model - The model to use.\n * @param prompt - A text description of the image to generate.\n * @param [config] - The config for image generation.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await client.models.generateImages({\n * model: 'imagen-3.0-generate-002',\n * prompt: 'Robot holding a red skateboard',\n * config: {\n * numberOfImages: 1,\n * includeRaiReason: true,\n * },\n * });\n * console.log(response?.generatedImages?.[0]?.image?.imageBytes);\n * ```\n */\n generateImages = async (\n params: types.GenerateImagesParameters,\n ): Promise => {\n return await this.generateImagesInternal(params).then((apiResponse) => {\n let positivePromptSafetyAttributes;\n const generatedImages = [];\n\n if (apiResponse?.generatedImages) {\n for (const generatedImage of apiResponse.generatedImages) {\n if (\n generatedImage &&\n generatedImage?.safetyAttributes &&\n generatedImage?.safetyAttributes?.contentType === 'Positive Prompt'\n ) {\n positivePromptSafetyAttributes = generatedImage?.safetyAttributes;\n } else {\n generatedImages.push(generatedImage);\n }\n }\n }\n let response: types.GenerateImagesResponse;\n\n if (positivePromptSafetyAttributes) {\n response = {\n generatedImages: generatedImages,\n positivePromptSafetyAttributes: positivePromptSafetyAttributes,\n };\n } else {\n response = {\n generatedImages: generatedImages,\n };\n }\n return response;\n });\n };\n\n private async generateContentInternal(\n params: types.GenerateContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:generateContent',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateContentResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.generateContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:generateContent',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateContentResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n private async generateContentStreamInternal(\n params: types.GenerateContentParameters,\n ): Promise> {\n let response: Promise>;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:streamGenerateContent?alt=sse',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n const apiClient = this.apiClient;\n response = apiClient.requestStream({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n }) as Promise>;\n\n return response.then(async function* (\n apiResponse: AsyncGenerator,\n ) {\n for await (const chunk of apiResponse) {\n const resp = converters.generateContentResponseFromVertex(\n apiClient,\n (await chunk.json()) as types.GenerateContentResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n yield typedResp;\n }\n });\n } else {\n const body = converters.generateContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:streamGenerateContent?alt=sse',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n const apiClient = this.apiClient;\n response = apiClient.requestStream({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n }) as Promise>;\n\n return response.then(async function* (\n apiResponse: AsyncGenerator,\n ) {\n for await (const chunk of apiResponse) {\n const resp = converters.generateContentResponseFromMldev(\n apiClient,\n (await chunk.json()) as types.GenerateContentResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n yield typedResp;\n }\n });\n }\n }\n\n /**\n * Calculates embeddings for the given contents. Only text is supported.\n *\n * @param params - The parameters for embedding contents.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.embedContent({\n * model: 'text-embedding-004',\n * contents: [\n * 'What is your name?',\n * 'What is your favorite color?',\n * ],\n * config: {\n * outputDimensionality: 64,\n * },\n * });\n * console.log(response);\n * ```\n */\n async embedContent(\n params: types.EmbedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.embedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.embedContentResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.EmbedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.embedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:batchEmbedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.embedContentResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.EmbedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Generates an image based on a text description and configuration.\n *\n * @param params - The parameters for generating images.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateImages({\n * model: 'imagen-3.0-generate-002',\n * prompt: 'Robot holding a red skateboard',\n * config: {\n * numberOfImages: 1,\n * includeRaiReason: true,\n * },\n * });\n * console.log(response?.generatedImages?.[0]?.image?.imageBytes);\n * ```\n */\n private async generateImagesInternal(\n params: types.GenerateImagesParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateImagesParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateImagesResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateImagesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.generateImagesParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateImagesResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateImagesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Fetches information about a model by name.\n *\n * @example\n * ```ts\n * const modelInfo = await ai.models.get({model: 'gemini-2.0-flash'});\n * ```\n */\n async get(params: types.GetModelParameters): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getModelParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.modelFromVertex(this.apiClient, apiResponse);\n\n return resp as types.Model;\n });\n } else {\n const body = converters.getModelParametersToMldev(this.apiClient, params);\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.modelFromMldev(this.apiClient, apiResponse);\n\n return resp as types.Model;\n });\n }\n }\n\n /**\n * Counts the number of tokens in the given contents. Multimodal input is\n * supported for Gemini models.\n *\n * @param params - The parameters for counting tokens.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.countTokens({\n * model: 'gemini-2.0-flash',\n * contents: 'The quick brown fox jumps over the lazy dog.'\n * });\n * console.log(response);\n * ```\n */\n async countTokens(\n params: types.CountTokensParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.countTokensParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:countTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.countTokensResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.CountTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.countTokensParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:countTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.countTokensResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.CountTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Given a list of contents, returns a corresponding TokensInfo containing\n * the list of tokens and list of token ids.\n *\n * This method is not supported by the Gemini Developer API.\n *\n * @param params - The parameters for computing tokens.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.computeTokens({\n * model: 'gemini-2.0-flash',\n * contents: 'What is your name?'\n * });\n * console.log(response);\n * ```\n */\n async computeTokens(\n params: types.ComputeTokensParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.computeTokensParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:computeTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.computeTokensResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ComputeTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n throw new Error('This method is only supported by the Vertex AI.');\n }\n }\n\n /**\n * Generates videos based on a text description and configuration.\n *\n * @param params - The parameters for generating videos.\n * @return A Promise which allows you to track the progress and eventually retrieve the generated videos using the operations.get method.\n *\n * @example\n * ```ts\n * const operation = await ai.models.generateVideos({\n * model: 'veo-2.0-generate-001',\n * prompt: 'A neon hologram of a cat driving at top speed',\n * config: {\n * numberOfVideos: 1\n * });\n *\n * while (!operation.done) {\n * await new Promise(resolve => setTimeout(resolve, 10000));\n * operation = await ai.operations.getVideosOperation({operation: operation});\n * }\n *\n * console.log(operation.response?.generatedVideos?.[0]?.video?.uri);\n * ```\n */\n\n async generateVideos(\n params: types.GenerateVideosParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateVideosParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predictLongRunning',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n const body = converters.generateVideosParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predictLongRunning',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function getOperationParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'operationName'],\n fromOperationName,\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function getOperationParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'operationName'],\n fromOperationName,\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function fetchPredictOperationParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.FetchPredictOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(toObject, ['operationName'], fromOperationName);\n }\n\n const fromResourceName = common.getValueByPath(fromObject, ['resourceName']);\n if (fromResourceName != null) {\n common.setValueByPath(toObject, ['_url', 'resourceName'], fromResourceName);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function videoFromMldev(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['video', 'uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'video',\n 'encodedVideo',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['encoding']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromMldev(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, [\n 'generatedSamples',\n ]);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromMldev(apiClient, fromResponse),\n );\n }\n\n return toObject;\n}\n\nexport function videoFromVertex(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromVertex(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, ['videos']);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromVertex(apiClient, fromResponse),\n );\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_operations_converters';\nimport * as types from './types';\n\nexport class Operations extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Gets the status of a long-running operation.\n *\n * @param parameters The parameters for the get operation request.\n * @return The updated Operation object, with the latest status or result.\n */\n async getVideosOperation(\n parameters: types.OperationGetParameters,\n ): Promise {\n const operation = parameters.operation;\n const config = parameters.config;\n\n if (operation.name === undefined || operation.name === '') {\n throw new Error('Operation name is required.');\n }\n\n if (this.apiClient.isVertexAI()) {\n const resourceName = operation.name.split('/operations/')[0];\n let httpOptions: types.HttpOptions | undefined = undefined;\n\n if (config && 'httpOptions' in config) {\n httpOptions = config.httpOptions;\n }\n\n return this.fetchPredictVideosOperationInternal({\n operationName: operation.name,\n resourceName: resourceName,\n config: {httpOptions: httpOptions},\n });\n } else {\n return this.getVideosOperationInternal({\n operationName: operation.name,\n config: config,\n });\n }\n }\n\n private async getVideosOperationInternal(\n params: types.GetOperationParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getOperationParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{operationName}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n const body = converters.getOperationParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{operationName}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n }\n }\n\n private async fetchPredictVideosOperationInternal(\n params: types.FetchPredictOperationParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.fetchPredictOperationParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{resourceName}:fetchPredictOperation',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n throw new Error('This method is only supported by the Vertex AI.');\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {Auth} from '../_auth';\n\nexport const GOOGLE_API_KEY_HEADER = 'x-goog-api-key';\n// TODO(b/395122533): We need a secure client side authentication mechanism.\nexport class WebAuth implements Auth {\n constructor(private readonly apiKey: string) {}\n\n async addAuthHeaders(headers: Headers): Promise {\n if (headers.get(GOOGLE_API_KEY_HEADER) !== null) {\n return;\n }\n headers.append(GOOGLE_API_KEY_HEADER, this.apiKey);\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {GoogleAuthOptions} from 'google-auth-library';\n\nimport {ApiClient} from './_api_client';\nimport {Caches} from './caches';\nimport {Chats} from './chats';\nimport {crossError} from './cross/_cross_error';\nimport {CrossUploader} from './cross/_cross_uploader';\nimport {CrossWebSocketFactory} from './cross/_cross_websocket';\nimport {Files} from './files';\nimport {Live} from './live';\nimport {Models} from './models';\nimport {Operations} from './operations';\nimport {HttpOptions} from './types';\nimport {WebAuth} from './web/_web_auth';\n\nconst LANGUAGE_LABEL_PREFIX = 'gl-node/';\n\n/**\n * Google Gen AI SDK's configuration options.\n *\n * See {@link GoogleGenAI} for usage samples.\n */\nexport interface GoogleGenAIOptions {\n /**\n * Optional. Determines whether to use the Vertex AI or the Gemini API.\n *\n * @remarks\n * When true, the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI API} will used.\n * When false, the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API} will be used.\n *\n * If unset, default SDK behavior is to use the Gemini API service.\n */\n vertexai?: boolean;\n /**\n * Optional. The Google Cloud project ID for Vertex AI clients.\n *\n * @remarks\n * Only supported on Node runtimes, ignored on browser runtimes.\n */\n project?: string;\n /**\n * Optional. The Google Cloud project region for Vertex AI clients.\n *\n * @remarks\n * Only supported on Node runtimes, ignored on browser runtimes.\n *\n */\n location?: string;\n /**\n * The API Key, required for Gemini API clients.\n *\n * @remarks\n * Required on browser runtimes.\n */\n apiKey?: string;\n /**\n * Optional. The API version to use.\n *\n * @remarks\n * If unset, the default API version will be used.\n */\n apiVersion?: string;\n /**\n * Optional. Authentication options defined by the by google-auth-library for Vertex AI clients.\n *\n * @remarks\n * @see {@link https://github.com/googleapis/google-auth-library-nodejs/blob/v9.15.0/src/auth/googleauth.ts | GoogleAuthOptions interface in google-auth-library-nodejs}.\n *\n * Only supported on Node runtimes, ignored on browser runtimes.\n *\n */\n googleAuthOptions?: GoogleAuthOptions;\n /**\n * Optional. A set of customizable configuration for HTTP requests.\n */\n httpOptions?: HttpOptions;\n}\n\n/**\n * The Google GenAI SDK.\n *\n * @remarks\n * Provides access to the GenAI features through either the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API}\n * or the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI API}.\n *\n * The {@link GoogleGenAIOptions.vertexai} value determines which of the API services to use.\n *\n * When using the Gemini API, a {@link GoogleGenAIOptions.apiKey} must also be set,\n * when using Vertex AI {@link GoogleGenAIOptions.project} and {@link GoogleGenAIOptions.location} must also be set.\n *\n * @example\n * Initializing the SDK for using the Gemini API:\n * ```ts\n * import {GoogleGenAI} from '@google/genai';\n * const ai = new GoogleGenAI({apiKey: 'GEMINI_API_KEY'});\n * ```\n *\n * @example\n * Initializing the SDK for using the Vertex AI API:\n * ```ts\n * import {GoogleGenAI} from '@google/genai';\n * const ai = new GoogleGenAI({\n * vertexai: true,\n * project: 'PROJECT_ID',\n * location: 'PROJECT_LOCATION'\n * });\n * ```\n *\n */\nexport class GoogleGenAI {\n protected readonly apiClient: ApiClient;\n private readonly apiKey?: string;\n public readonly vertexai: boolean;\n private readonly apiVersion?: string;\n readonly models: Models;\n readonly live: Live;\n readonly chats: Chats;\n readonly caches: Caches;\n readonly files: Files;\n readonly operations: Operations;\n\n constructor(options: GoogleGenAIOptions) {\n if (options.apiKey == null) {\n throw new Error(\n `An API Key must be set when running in an unspecified environment.\\n + ${crossError().message}`,\n );\n }\n this.vertexai = options.vertexai ?? false;\n this.apiKey = options.apiKey;\n this.apiVersion = options.apiVersion;\n const auth = new WebAuth(this.apiKey);\n this.apiClient = new ApiClient({\n auth: auth,\n apiVersion: this.apiVersion,\n apiKey: this.apiKey,\n vertexai: this.vertexai,\n httpOptions: options.httpOptions,\n userAgentExtra: LANGUAGE_LABEL_PREFIX + 'cross',\n uploader: new CrossUploader(),\n });\n this.models = new Models(this.apiClient);\n this.live = new Live(this.apiClient, auth, new CrossWebSocketFactory());\n this.chats = new Chats(this.models, this.apiClient);\n this.caches = new Caches(this.apiClient);\n this.files = new Files(this.apiClient);\n this.operations = new Operations(this.apiClient);\n }\n}\n"],"names":["partToMldev","common.getValueByPath","common.setValueByPath","contentToMldev","functionDeclarationToMldev","googleSearchToMldev","dynamicRetrievalConfigToMldev","googleSearchRetrievalToMldev","toolToMldev","functionCallingConfigToMldev","toolConfigToMldev","t.tContents","t.tContent","t.tCachesModel","t.tCachedContentName","partToVertex","contentToVertex","schemaToVertex","functionDeclarationToVertex","googleSearchToVertex","dynamicRetrievalConfigToVertex","googleSearchRetrievalToVertex","toolToVertex","functionCallingConfigToVertex","toolConfigToVertex","PagedItem","Outcome","Language","Type","HarmCategory","HarmBlockMethod","HarmBlockThreshold","Mode","FinishReason","HarmProbability","HarmSeverity","BlockedReason","TrafficType","Modality","MediaResolution","FeatureSelectionPreference","DynamicRetrievalConfigMode","FunctionCallingConfigMode","SafetyFilterLevel","PersonGeneration","ImagePromptLanguage","FileState","FileSource","MaskReferenceMode","ControlReferenceType","SubjectReferenceType","MediaModality","StartSensitivity","EndSensitivity","ActivityHandling","TurnCoverage","converters.createCachedContentParametersToVertex","common.formatMap","converters.cachedContentFromVertex","converters.createCachedContentParametersToMldev","converters.cachedContentFromMldev","converters.getCachedContentParametersToVertex","converters.getCachedContentParametersToMldev","converters.deleteCachedContentParametersToVertex","converters.deleteCachedContentResponseFromVertex","types.DeleteCachedContentResponse","converters.deleteCachedContentParametersToMldev","converters.deleteCachedContentResponseFromMldev","converters.updateCachedContentParametersToVertex","converters.updateCachedContentParametersToMldev","converters.listCachedContentsParametersToVertex","converters.listCachedContentsResponseFromVertex","types.ListCachedContentsResponse","converters.listCachedContentsParametersToMldev","converters.listCachedContentsResponseFromMldev","t.tFileName","converters.fileFromMldev","converters.listFilesParametersToMldev","converters.listFilesResponseFromMldev","types.ListFilesResponse","converters.createFileParametersToMldev","converters.createFileResponseFromMldev","types.CreateFileResponse","converters.getFileParametersToMldev","converters.deleteFileParametersToMldev","converters.deleteFileResponseFromMldev","types.DeleteFileResponse","t.tTools","t.tTool","t.tModel","partFromMldev","partFromVertex","contentFromMldev","contentFromVertex","t.tSchema","t.tSpeechConfig","t.tContentsForEmbed","t.tBytes","videoFromMldev","generatedVideoFromMldev","generateVideosResponseFromMldev","generateVideosOperationFromMldev","videoFromVertex","generatedVideoFromVertex","generateVideosResponseFromVertex","generateVideosOperationFromVertex","converters.liveServerMessageFromVertex","converters.liveServerMessageFromMldev","types.Modality","converters.liveConnectParametersToVertex","converters.liveConnectParametersToMldev","converters.generateContentParametersToVertex","converters.generateContentResponseFromVertex","types.GenerateContentResponse","converters.generateContentParametersToMldev","converters.generateContentResponseFromMldev","converters.embedContentParametersToVertex","converters.embedContentResponseFromVertex","types.EmbedContentResponse","converters.embedContentParametersToMldev","converters.embedContentResponseFromMldev","converters.generateImagesParametersToVertex","converters.generateImagesResponseFromVertex","types.GenerateImagesResponse","converters.generateImagesParametersToMldev","converters.generateImagesResponseFromMldev","converters.getModelParametersToVertex","converters.modelFromVertex","converters.getModelParametersToMldev","converters.modelFromMldev","converters.countTokensParametersToVertex","converters.countTokensResponseFromVertex","types.CountTokensResponse","converters.countTokensParametersToMldev","converters.countTokensResponseFromMldev","converters.computeTokensParametersToVertex","converters.computeTokensResponseFromVertex","types.ComputeTokensResponse","converters.generateVideosParametersToVertex","converters.generateVideosOperationFromVertex","converters.generateVideosParametersToMldev","converters.generateVideosOperationFromMldev","converters.getOperationParametersToVertex","converters.getOperationParametersToMldev","converters.fetchPredictOperationParametersToVertex"],"mappings":";;AAAA;;;;AAIG;MAEU,UAAU,CAAA;AAAG;AAEV,SAAA,SAAS,CACvB,cAAsB,EACtB,QAAiC,EAAA;;IAGjC,MAAM,KAAK,GAAG,cAAc;;IAG5B,OAAO,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,GAAG,KAAI;AAClD,QAAA,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE;AACvD,YAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC;;AAE3B,YAAA,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE;AAClE;AAAM,aAAA;;AAEL,YAAA,MAAM,IAAI,KAAK,CAAC,QAAQ,GAAG,CAAA,wBAAA,CAA0B,CAAC;AACvD;AACH,KAAC,CAAC;AACJ;SAEgB,cAAc,CAC5B,IAA6B,EAC7B,IAAc,EACd,KAAc,EAAA;AAEd,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;AACxC,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC;AAEnB,QAAA,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;YACtB,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;AAChC,YAAA,IAAI,EAAE,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,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,qBAAqB,EAAE,CAAC;AACvE,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC;QACnD,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;QACtC,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC;;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} +\ No newline at end of file +diff --git a/dist/index.mjs b/dist/index.mjs +index 2b0fcd9b2bcf28433efdf841f22be87c24a9a80e..c000d18872898529ed09f902b39c6e9b7faf39c9 100644 +--- a/dist/index.mjs ++++ b/dist/index.mjs +@@ -209,44 +209,25 @@ function _isFunctionCallPart(origin) { + typeof origin === 'object' && + 'functionCall' in origin); + } +-function _isUserPart(origin) { +- if (origin === null || origin === undefined) { +- return false; +- } +- if (_isFunctionCallPart(origin)) { +- return false; +- } +- return true; +-} +-function _areUserParts(origin) { +- if (origin === null || +- origin === undefined || +- (Array.isArray(origin) && origin.length === 0)) { +- return false; +- } +- return origin.every(_isUserPart); ++function _isFunctionResponsePart(origin) { ++ return (origin !== null && ++ origin !== undefined && ++ typeof origin === 'object' && ++ 'functionResponse' in origin); + } + function tContent(apiClient, origin) { + if (origin === null || origin === undefined) { + throw new Error('ContentUnion is required'); + } + if (_isContent(origin)) { +- // @ts-expect-error: _isContent is a utility function that checks if the ++ // _isContent is a utility function that checks if the + // origin is a Content. + return origin; + } +- if (_isUserPart(origin)) { +- return { +- role: 'user', +- parts: tParts(apiClient, origin), +- }; +- } +- else { +- return { +- role: 'model', +- parts: tParts(apiClient, origin), +- }; +- } ++ return { ++ role: 'user', ++ parts: tParts(apiClient, origin), ++ }; + } + function tContentsForEmbed(apiClient, origin) { + if (!origin) { +@@ -277,34 +258,6 @@ function tContentsForEmbed(apiClient, origin) { + } + return [tContent(apiClient, origin)]; + } +-function _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts) { +- if (accumulatedParts.length === 0) { +- return; +- } +- if (_areUserParts(accumulatedParts)) { +- result.push({ +- role: 'user', +- parts: tParts(apiClient, accumulatedParts), +- }); +- } +- else { +- result.push({ +- role: 'model', +- parts: tParts(apiClient, accumulatedParts), +- }); +- } +- accumulatedParts.length = 0; // clear the array inplace +-} +-function _handleCurrentPart(apiClient, result, accumulatedParts, currentPart) { +- if (_isUserPart(currentPart) === _areUserParts(accumulatedParts)) { +- accumulatedParts.push(currentPart); +- } +- else { +- _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts); +- accumulatedParts.length = 0; +- accumulatedParts.push(currentPart); +- } +-} + function tContents(apiClient, origin) { + if (origin === null || + origin === undefined || +@@ -312,35 +265,35 @@ function tContents(apiClient, origin) { + throw new Error('contents are required'); + } + if (!Array.isArray(origin)) { ++ // If it's not an array, it's a single content or a single PartUnion. ++ if (_isFunctionCallPart(origin) || _isFunctionResponsePart(origin)) { ++ throw new Error('To specify functionCall or functionResponse parts, please wrap them in a Content object, specifying the role for them'); ++ } + return [tContent(apiClient, origin)]; + } + const result = []; + const accumulatedParts = []; +- for (const content of origin) { +- if (_isContent(content)) { +- _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts); +- // @ts-expect-error: content is a Content here +- result.push(content); +- } +- else if (typeof content === 'string' || +- (typeof content === 'object' && !Array.isArray(content))) { +- // @ts-expect-error: content is a part here +- _handleCurrentPart(apiClient, result, accumulatedParts, content); +- } +- else if (Array.isArray(content)) { +- // if there're consecutive user parts before the list, +- // convert to UserContent and append to result +- _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts); +- result.push({ +- role: 'user', +- parts: tParts(apiClient, content), +- }); ++ const isContentArray = _isContent(origin[0]); ++ for (const item of origin) { ++ const isContent = _isContent(item); ++ if (isContent != isContentArray) { ++ throw new Error('Mixing Content and Parts is not supported, please group the parts into a the appropriate Content objects and specify the roles for them'); ++ } ++ if (isContent) { ++ // `isContent` contains the result of _isContent, which is a utility ++ // function that checks if the item is a Content. ++ result.push(item); ++ } ++ else if (_isFunctionCallPart(item) || _isFunctionResponsePart(item)) { ++ throw new Error('To specify functionCall or functionResponse parts, please wrap them, and any other parts, in Content objects as appropriate, specifying the role for them'); + } + else { +- throw new Error(`Unsupported content type: ${typeof content}`); ++ accumulatedParts.push(item); + } + } +- _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts); ++ if (!isContentArray) { ++ result.push({ role: 'user', parts: tParts(apiClient, accumulatedParts) }); ++ } + return result; + } + function processSchema(apiClient, schema) { +@@ -505,7 +458,7 @@ function tFileName(apiClient, fromName) { + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +-function partToMldev$1(apiClient, fromObject) { ++function partToMldev$2(apiClient, fromObject) { + const toObject = {}; + if (getValueByPath(fromObject, ['videoMetadata']) !== undefined) { + throw new Error('videoMetadata parameter is not supported in Gemini API.'); +@@ -550,13 +503,13 @@ function partToMldev$1(apiClient, fromObject) { + } + return toObject; + } +-function contentToMldev$1(apiClient, fromObject) { ++function contentToMldev$2(apiClient, fromObject) { + const toObject = {}; + const fromParts = getValueByPath(fromObject, ['parts']); + if (fromParts != null) { + if (Array.isArray(fromParts)) { + setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partToMldev$1(apiClient, item); ++ return partToMldev$2(apiClient, item); + })); + } + else { +@@ -569,7 +522,7 @@ function contentToMldev$1(apiClient, fromObject) { + } + return toObject; + } +-function functionDeclarationToMldev$1(apiClient, fromObject) { ++function functionDeclarationToMldev$2(apiClient, fromObject) { + const toObject = {}; + if (getValueByPath(fromObject, ['response']) !== undefined) { + throw new Error('response parameter is not supported in Gemini API.'); +@@ -588,11 +541,11 @@ function functionDeclarationToMldev$1(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchToMldev$1() { ++function googleSearchToMldev$2() { + const toObject = {}; + return toObject; + } +-function dynamicRetrievalConfigToMldev$1(apiClient, fromObject) { ++function dynamicRetrievalConfigToMldev$2(apiClient, fromObject) { + const toObject = {}; + const fromMode = getValueByPath(fromObject, ['mode']); + if (fromMode != null) { +@@ -606,17 +559,17 @@ function dynamicRetrievalConfigToMldev$1(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchRetrievalToMldev$1(apiClient, fromObject) { ++function googleSearchRetrievalToMldev$2(apiClient, fromObject) { + const toObject = {}; + const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ + 'dynamicRetrievalConfig', + ]); + if (fromDynamicRetrievalConfig != null) { +- setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev$1(apiClient, fromDynamicRetrievalConfig)); ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev$2(apiClient, fromDynamicRetrievalConfig)); + } + return toObject; + } +-function toolToMldev$1(apiClient, fromObject) { ++function toolToMldev$2(apiClient, fromObject) { + const toObject = {}; + const fromFunctionDeclarations = getValueByPath(fromObject, [ + 'functionDeclarations', +@@ -624,7 +577,7 @@ function toolToMldev$1(apiClient, fromObject) { + if (fromFunctionDeclarations != null) { + if (Array.isArray(fromFunctionDeclarations)) { + setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { +- return functionDeclarationToMldev$1(apiClient, item); ++ return functionDeclarationToMldev$2(apiClient, item); + })); + } + else { +@@ -636,13 +589,13 @@ function toolToMldev$1(apiClient, fromObject) { + } + const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); + if (fromGoogleSearch != null) { +- setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$1()); ++ setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$2()); + } + const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ + 'googleSearchRetrieval', + ]); + if (fromGoogleSearchRetrieval != null) { +- setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev$1(apiClient, fromGoogleSearchRetrieval)); ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev$2(apiClient, fromGoogleSearchRetrieval)); + } + const fromCodeExecution = getValueByPath(fromObject, [ + 'codeExecution', +@@ -694,7 +647,7 @@ function createCachedContentConfigToMldev(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromContents != null) { + if (Array.isArray(fromContents)) { + setValueByPath(parentObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToMldev$1(apiClient, item); ++ return contentToMldev$2(apiClient, item); + }))); + } + else { +@@ -705,13 +658,13 @@ function createCachedContentConfigToMldev(apiClient, fromObject, parentObject) { + 'systemInstruction', + ]); + if (parentObject !== undefined && fromSystemInstruction != null) { +- setValueByPath(parentObject, ['systemInstruction'], contentToMldev$1(apiClient, tContent(apiClient, fromSystemInstruction))); ++ setValueByPath(parentObject, ['systemInstruction'], contentToMldev$2(apiClient, tContent(apiClient, fromSystemInstruction))); + } + const fromTools = getValueByPath(fromObject, ['tools']); + if (parentObject !== undefined && fromTools != null) { + if (Array.isArray(fromTools)) { + setValueByPath(parentObject, ['tools'], fromTools.map((item) => { +- return toolToMldev$1(apiClient, item); ++ return toolToMldev$2(apiClient, item); + })); + } + else { +@@ -804,7 +757,7 @@ function listCachedContentsParametersToMldev(apiClient, fromObject) { + } + return toObject; + } +-function partToVertex$1(apiClient, fromObject) { ++function partToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromVideoMetadata = getValueByPath(fromObject, [ + 'videoMetadata', +@@ -852,13 +805,13 @@ function partToVertex$1(apiClient, fromObject) { + } + return toObject; + } +-function contentToVertex$1(apiClient, fromObject) { ++function contentToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromParts = getValueByPath(fromObject, ['parts']); + if (fromParts != null) { + if (Array.isArray(fromParts)) { + setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partToVertex$1(apiClient, item); ++ return partToVertex$2(apiClient, item); + })); + } + else { +@@ -871,7 +824,7 @@ function contentToVertex$1(apiClient, fromObject) { + } + return toObject; + } +-function schemaToVertex$1(apiClient, fromObject) { ++function schemaToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromExample = getValueByPath(fromObject, ['example']); + if (fromExample != null) { +@@ -969,11 +922,11 @@ function schemaToVertex$1(apiClient, fromObject) { + } + return toObject; + } +-function functionDeclarationToVertex$1(apiClient, fromObject) { ++function functionDeclarationToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromResponse = getValueByPath(fromObject, ['response']); + if (fromResponse != null) { +- setValueByPath(toObject, ['response'], schemaToVertex$1(apiClient, fromResponse)); ++ setValueByPath(toObject, ['response'], schemaToVertex$2(apiClient, fromResponse)); + } + const fromDescription = getValueByPath(fromObject, ['description']); + if (fromDescription != null) { +@@ -989,11 +942,11 @@ function functionDeclarationToVertex$1(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchToVertex$1() { ++function googleSearchToVertex$2() { + const toObject = {}; + return toObject; + } +-function dynamicRetrievalConfigToVertex$1(apiClient, fromObject) { ++function dynamicRetrievalConfigToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromMode = getValueByPath(fromObject, ['mode']); + if (fromMode != null) { +@@ -1007,17 +960,17 @@ function dynamicRetrievalConfigToVertex$1(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchRetrievalToVertex$1(apiClient, fromObject) { ++function googleSearchRetrievalToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ + 'dynamicRetrievalConfig', + ]); + if (fromDynamicRetrievalConfig != null) { +- setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$1(apiClient, fromDynamicRetrievalConfig)); ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$2(apiClient, fromDynamicRetrievalConfig)); + } + return toObject; + } +-function toolToVertex$1(apiClient, fromObject) { ++function toolToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromFunctionDeclarations = getValueByPath(fromObject, [ + 'functionDeclarations', +@@ -1025,7 +978,7 @@ function toolToVertex$1(apiClient, fromObject) { + if (fromFunctionDeclarations != null) { + if (Array.isArray(fromFunctionDeclarations)) { + setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { +- return functionDeclarationToVertex$1(apiClient, item); ++ return functionDeclarationToVertex$2(apiClient, item); + })); + } + else { +@@ -1038,13 +991,13 @@ function toolToVertex$1(apiClient, fromObject) { + } + const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); + if (fromGoogleSearch != null) { +- setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$1()); ++ setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$2()); + } + const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ + 'googleSearchRetrieval', + ]); + if (fromGoogleSearchRetrieval != null) { +- setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$1(apiClient, fromGoogleSearchRetrieval)); ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$2(apiClient, fromGoogleSearchRetrieval)); + } + const fromCodeExecution = getValueByPath(fromObject, [ + 'codeExecution', +@@ -1096,7 +1049,7 @@ function createCachedContentConfigToVertex(apiClient, fromObject, parentObject) + if (parentObject !== undefined && fromContents != null) { + if (Array.isArray(fromContents)) { + setValueByPath(parentObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToVertex$1(apiClient, item); ++ return contentToVertex$2(apiClient, item); + }))); + } + else { +@@ -1107,13 +1060,13 @@ function createCachedContentConfigToVertex(apiClient, fromObject, parentObject) + 'systemInstruction', + ]); + if (parentObject !== undefined && fromSystemInstruction != null) { +- setValueByPath(parentObject, ['systemInstruction'], contentToVertex$1(apiClient, tContent(apiClient, fromSystemInstruction))); ++ setValueByPath(parentObject, ['systemInstruction'], contentToVertex$2(apiClient, tContent(apiClient, fromSystemInstruction))); + } + const fromTools = getValueByPath(fromObject, ['tools']); + if (parentObject !== undefined && fromTools != null) { + if (Array.isArray(fromTools)) { + setValueByPath(parentObject, ['tools'], fromTools.map((item) => { +- return toolToVertex$1(apiClient, item); ++ return toolToVertex$2(apiClient, item); + })); + } + else { +@@ -1638,6 +1591,14 @@ var MediaResolution; + MediaResolution["MEDIA_RESOLUTION_MEDIUM"] = "MEDIA_RESOLUTION_MEDIUM"; + MediaResolution["MEDIA_RESOLUTION_HIGH"] = "MEDIA_RESOLUTION_HIGH"; + })(MediaResolution || (MediaResolution = {})); ++/** Options for feature selection preference. */ ++var FeatureSelectionPreference; ++(function (FeatureSelectionPreference) { ++ FeatureSelectionPreference["FEATURE_SELECTION_PREFERENCE_UNSPECIFIED"] = "FEATURE_SELECTION_PREFERENCE_UNSPECIFIED"; ++ FeatureSelectionPreference["PRIORITIZE_QUALITY"] = "PRIORITIZE_QUALITY"; ++ FeatureSelectionPreference["BALANCED"] = "BALANCED"; ++ FeatureSelectionPreference["PRIORITIZE_COST"] = "PRIORITIZE_COST"; ++})(FeatureSelectionPreference || (FeatureSelectionPreference = {})); + /** Config for the dynamic retrieval config mode. */ + var DynamicRetrievalConfigMode; + (function (DynamicRetrievalConfigMode) { +@@ -2188,8 +2149,8 @@ class Caches extends BaseModule { + * + * @remarks + * Context caching is only supported for specific models. See [Gemini +- * Developer API reference] (https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac) +- * and [Vertex AI reference] (https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models) ++ * Developer API reference](https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac) ++ * and [Vertex AI reference](https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models) + * for more information. + * + * @param params - The parameters for the create request. +@@ -3113,10 +3074,18 @@ class ApiClient { + return this.streamApiCall(url, requestInit, request.httpMethod); + } + async includeExtraHttpOptionsToRequestInit(requestInit, httpOptions) { +- if (httpOptions && httpOptions.timeout && httpOptions.timeout > 0) { ++ var _a; ++ if (httpOptions && (httpOptions.signal || httpOptions.timeout && (httpOptions === null || httpOptions === void 0 ? void 0 : httpOptions.timeout) >= 0)) { + const abortController = new AbortController(); + const signal = abortController.signal; +- setTimeout(() => abortController.abort(), httpOptions.timeout); ++ if (httpOptions.timeout && httpOptions.timeout >= 0) { ++ setTimeout(() => abortController.abort(), httpOptions.timeout); ++ } ++ if (httpOptions.signal) { ++ (_a = httpOptions.signal) === null || _a === void 0 ? void 0 : _a.addEventListener('abort', () => { ++ abortController.abort(); ++ }); ++ } + requestInit.signal = signal; + } + requestInit.headers = await this.getHeadersInternal(httpOptions); +@@ -3176,8 +3145,12 @@ class ApiClient { + while (match) { + const processedChunkString = match[1]; + try { +- const chunkData = JSON.parse(processedChunkString); +- yield yield __await(chunkData); ++ const partialResponse = new Response(processedChunkString, { ++ headers: response === null || response === void 0 ? void 0 : response.headers, ++ status: response === null || response === void 0 ? void 0 : response.status, ++ statusText: response === null || response === void 0 ? void 0 : response.statusText, ++ }); ++ yield yield __await(new HttpResponse(partialResponse)); + buffer = buffer.slice(match[0].length); + match = buffer.match(responseLineRE); + } +@@ -3663,12 +3636,8 @@ function listFilesResponseFromMldev(apiClient, fromObject) { + } + return toObject; + } +-function createFileResponseFromMldev(apiClient, fromObject) { ++function createFileResponseFromMldev() { + const toObject = {}; +- const fromHttpHeaders = getValueByPath(fromObject, ['httpHeaders']); +- if (fromHttpHeaders != null) { +- setValueByPath(toObject, ['httpHeaders'], fromHttpHeaders); +- } + return toObject; + } + function deleteFileResponseFromMldev() { +@@ -3820,8 +3789,8 @@ class Files extends BaseModule { + .then((httpResponse) => { + return httpResponse.json(); + }); +- return response.then((apiResponse) => { +- const resp = createFileResponseFromMldev(this.apiClient, apiResponse); ++ return response.then(() => { ++ const resp = createFileResponseFromMldev(); + const typedResp = new CreateFileResponse(); + Object.assign(typedResp, resp); + return typedResp; +@@ -3929,7 +3898,7 @@ class Files extends BaseModule { + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +-function partToMldev(apiClient, fromObject) { ++function partToMldev$1(apiClient, fromObject) { + const toObject = {}; + if (getValueByPath(fromObject, ['videoMetadata']) !== undefined) { + throw new Error('videoMetadata parameter is not supported in Gemini API.'); +@@ -3974,13 +3943,61 @@ function partToMldev(apiClient, fromObject) { + } + return toObject; + } +-function contentToMldev(apiClient, fromObject) { ++function partToVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromVideoMetadata = getValueByPath(fromObject, [ ++ 'videoMetadata', ++ ]); ++ if (fromVideoMetadata != null) { ++ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); ++ } ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); ++ } ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', ++ ]); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); ++ } ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', ++ ]); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); ++ } ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); ++ } ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); ++ } ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', ++ ]); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); ++ } ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); ++ } ++ const fromText = getValueByPath(fromObject, ['text']); ++ if (fromText != null) { ++ setValueByPath(toObject, ['text'], fromText); ++ } ++ return toObject; ++} ++function contentToMldev$1(apiClient, fromObject) { + const toObject = {}; + const fromParts = getValueByPath(fromObject, ['parts']); + if (fromParts != null) { + if (Array.isArray(fromParts)) { + setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partToMldev(apiClient, item); ++ return partToMldev$1(apiClient, item); + })); + } + else { +@@ -3993,28 +4010,58 @@ function contentToMldev(apiClient, fromObject) { + } + return toObject; + } +-function schemaToMldev(apiClient, fromObject) { ++function contentToVertex$1(apiClient, fromObject) { + const toObject = {}; +- if (getValueByPath(fromObject, ['example']) !== undefined) { +- throw new Error('example parameter is not supported in Gemini API.'); ++ const fromParts = getValueByPath(fromObject, ['parts']); ++ if (fromParts != null) { ++ if (Array.isArray(fromParts)) { ++ setValueByPath(toObject, ['parts'], fromParts.map((item) => { ++ return partToVertex$1(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['parts'], fromParts); ++ } + } +- if (getValueByPath(fromObject, ['pattern']) !== undefined) { +- throw new Error('pattern parameter is not supported in Gemini API.'); ++ const fromRole = getValueByPath(fromObject, ['role']); ++ if (fromRole != null) { ++ setValueByPath(toObject, ['role'], fromRole); + } +- if (getValueByPath(fromObject, ['default']) !== undefined) { +- throw new Error('default parameter is not supported in Gemini API.'); ++ return toObject; ++} ++function schemaToVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromExample = getValueByPath(fromObject, ['example']); ++ if (fromExample != null) { ++ setValueByPath(toObject, ['example'], fromExample); + } +- if (getValueByPath(fromObject, ['maxLength']) !== undefined) { +- throw new Error('maxLength parameter is not supported in Gemini API.'); ++ const fromPattern = getValueByPath(fromObject, ['pattern']); ++ if (fromPattern != null) { ++ setValueByPath(toObject, ['pattern'], fromPattern); + } +- if (getValueByPath(fromObject, ['minLength']) !== undefined) { +- throw new Error('minLength parameter is not supported in Gemini API.'); ++ const fromDefault = getValueByPath(fromObject, ['default']); ++ if (fromDefault != null) { ++ setValueByPath(toObject, ['default'], fromDefault); + } +- if (getValueByPath(fromObject, ['minProperties']) !== undefined) { +- throw new Error('minProperties parameter is not supported in Gemini API.'); ++ const fromMaxLength = getValueByPath(fromObject, ['maxLength']); ++ if (fromMaxLength != null) { ++ setValueByPath(toObject, ['maxLength'], fromMaxLength); + } +- if (getValueByPath(fromObject, ['maxProperties']) !== undefined) { +- throw new Error('maxProperties parameter is not supported in Gemini API.'); ++ const fromMinLength = getValueByPath(fromObject, ['minLength']); ++ if (fromMinLength != null) { ++ setValueByPath(toObject, ['minLength'], fromMinLength); ++ } ++ const fromMinProperties = getValueByPath(fromObject, [ ++ 'minProperties', ++ ]); ++ if (fromMinProperties != null) { ++ setValueByPath(toObject, ['minProperties'], fromMinProperties); ++ } ++ const fromMaxProperties = getValueByPath(fromObject, [ ++ 'maxProperties', ++ ]); ++ if (fromMaxProperties != null) { ++ setValueByPath(toObject, ['maxProperties'], fromMaxProperties); + } + const fromAnyOf = getValueByPath(fromObject, ['anyOf']); + if (fromAnyOf != null) { +@@ -4080,25 +4127,30 @@ function schemaToMldev(apiClient, fromObject) { + } + return toObject; + } +-function safetySettingToMldev(apiClient, fromObject) { ++function functionDeclarationToMldev$1(apiClient, fromObject) { + const toObject = {}; +- if (getValueByPath(fromObject, ['method']) !== undefined) { +- throw new Error('method parameter is not supported in Gemini API.'); ++ if (getValueByPath(fromObject, ['response']) !== undefined) { ++ throw new Error('response parameter is not supported in Gemini API.'); + } +- const fromCategory = getValueByPath(fromObject, ['category']); +- if (fromCategory != null) { +- setValueByPath(toObject, ['category'], fromCategory); ++ const fromDescription = getValueByPath(fromObject, ['description']); ++ if (fromDescription != null) { ++ setValueByPath(toObject, ['description'], fromDescription); + } +- const fromThreshold = getValueByPath(fromObject, ['threshold']); +- if (fromThreshold != null) { +- setValueByPath(toObject, ['threshold'], fromThreshold); ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); ++ } ++ const fromParameters = getValueByPath(fromObject, ['parameters']); ++ if (fromParameters != null) { ++ setValueByPath(toObject, ['parameters'], fromParameters); + } + return toObject; + } +-function functionDeclarationToMldev(apiClient, fromObject) { ++function functionDeclarationToVertex$1(apiClient, fromObject) { + const toObject = {}; +- if (getValueByPath(fromObject, ['response']) !== undefined) { +- throw new Error('response parameter is not supported in Gemini API.'); ++ const fromResponse = getValueByPath(fromObject, ['response']); ++ if (fromResponse != null) { ++ setValueByPath(toObject, ['response'], schemaToVertex$1(apiClient, fromResponse)); + } + const fromDescription = getValueByPath(fromObject, ['description']); + if (fromDescription != null) { +@@ -4114,11 +4166,15 @@ function functionDeclarationToMldev(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchToMldev() { ++function googleSearchToMldev$1() { + const toObject = {}; + return toObject; + } +-function dynamicRetrievalConfigToMldev(apiClient, fromObject) { ++function googleSearchToVertex$1() { ++ const toObject = {}; ++ return toObject; ++} ++function dynamicRetrievalConfigToMldev$1(apiClient, fromObject) { + const toObject = {}; + const fromMode = getValueByPath(fromObject, ['mode']); + if (fromMode != null) { +@@ -4132,17 +4188,41 @@ function dynamicRetrievalConfigToMldev(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchRetrievalToMldev(apiClient, fromObject) { ++function dynamicRetrievalConfigToVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromMode = getValueByPath(fromObject, ['mode']); ++ if (fromMode != null) { ++ setValueByPath(toObject, ['mode'], fromMode); ++ } ++ const fromDynamicThreshold = getValueByPath(fromObject, [ ++ 'dynamicThreshold', ++ ]); ++ if (fromDynamicThreshold != null) { ++ setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold); ++ } ++ return toObject; ++} ++function googleSearchRetrievalToMldev$1(apiClient, fromObject) { + const toObject = {}; + const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ + 'dynamicRetrievalConfig', + ]); + if (fromDynamicRetrievalConfig != null) { +- setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig)); ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev$1(apiClient, fromDynamicRetrievalConfig)); + } + return toObject; + } +-function toolToMldev(apiClient, fromObject) { ++function googleSearchRetrievalToVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ ++ 'dynamicRetrievalConfig', ++ ]); ++ if (fromDynamicRetrievalConfig != null) { ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$1(apiClient, fromDynamicRetrievalConfig)); ++ } ++ return toObject; ++} ++function toolToMldev$1(apiClient, fromObject) { + const toObject = {}; + const fromFunctionDeclarations = getValueByPath(fromObject, [ + 'functionDeclarations', +@@ -4150,7 +4230,7 @@ function toolToMldev(apiClient, fromObject) { + if (fromFunctionDeclarations != null) { + if (Array.isArray(fromFunctionDeclarations)) { + setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { +- return functionDeclarationToMldev(apiClient, item); ++ return functionDeclarationToMldev$1(apiClient, item); + })); + } + else { +@@ -4162,13 +4242,13 @@ function toolToMldev(apiClient, fromObject) { + } + const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); + if (fromGoogleSearch != null) { +- setValueByPath(toObject, ['googleSearch'], googleSearchToMldev()); ++ setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$1()); + } + const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ + 'googleSearchRetrieval', + ]); + if (fromGoogleSearchRetrieval != null) { +- setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval)); ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev$1(apiClient, fromGoogleSearchRetrieval)); + } + const fromCodeExecution = getValueByPath(fromObject, [ + 'codeExecution', +@@ -4178,547 +4258,1002 @@ function toolToMldev(apiClient, fromObject) { + } + return toObject; + } +-function functionCallingConfigToMldev(apiClient, fromObject) { ++function toolToVertex$1(apiClient, fromObject) { + const toObject = {}; +- const fromMode = getValueByPath(fromObject, ['mode']); +- if (fromMode != null) { +- setValueByPath(toObject, ['mode'], fromMode); ++ const fromFunctionDeclarations = getValueByPath(fromObject, [ ++ 'functionDeclarations', ++ ]); ++ if (fromFunctionDeclarations != null) { ++ if (Array.isArray(fromFunctionDeclarations)) { ++ setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { ++ return functionDeclarationToVertex$1(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations); ++ } + } +- const fromAllowedFunctionNames = getValueByPath(fromObject, [ +- 'allowedFunctionNames', ++ const fromRetrieval = getValueByPath(fromObject, ['retrieval']); ++ if (fromRetrieval != null) { ++ setValueByPath(toObject, ['retrieval'], fromRetrieval); ++ } ++ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); ++ if (fromGoogleSearch != null) { ++ setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$1()); ++ } ++ const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ ++ 'googleSearchRetrieval', + ]); +- if (fromAllowedFunctionNames != null) { +- setValueByPath(toObject, ['allowedFunctionNames'], fromAllowedFunctionNames); ++ if (fromGoogleSearchRetrieval != null) { ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$1(apiClient, fromGoogleSearchRetrieval)); ++ } ++ const fromCodeExecution = getValueByPath(fromObject, [ ++ 'codeExecution', ++ ]); ++ if (fromCodeExecution != null) { ++ setValueByPath(toObject, ['codeExecution'], fromCodeExecution); + } + return toObject; + } +-function toolConfigToMldev(apiClient, fromObject) { ++function sessionResumptionConfigToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromFunctionCallingConfig = getValueByPath(fromObject, [ +- 'functionCallingConfig', +- ]); +- if (fromFunctionCallingConfig != null) { +- setValueByPath(toObject, ['functionCallingConfig'], functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig)); ++ const fromHandle = getValueByPath(fromObject, ['handle']); ++ if (fromHandle != null) { ++ setValueByPath(toObject, ['handle'], fromHandle); ++ } ++ if (getValueByPath(fromObject, ['transparent']) !== undefined) { ++ throw new Error('transparent parameter is not supported in Gemini API.'); + } + return toObject; + } +-function prebuiltVoiceConfigToMldev(apiClient, fromObject) { ++function sessionResumptionConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromVoiceName = getValueByPath(fromObject, ['voiceName']); +- if (fromVoiceName != null) { +- setValueByPath(toObject, ['voiceName'], fromVoiceName); ++ const fromHandle = getValueByPath(fromObject, ['handle']); ++ if (fromHandle != null) { ++ setValueByPath(toObject, ['handle'], fromHandle); ++ } ++ const fromTransparent = getValueByPath(fromObject, ['transparent']); ++ if (fromTransparent != null) { ++ setValueByPath(toObject, ['transparent'], fromTransparent); + } + return toObject; + } +-function voiceConfigToMldev(apiClient, fromObject) { ++function automaticActivityDetectionToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [ +- 'prebuiltVoiceConfig', ++ const fromDisabled = getValueByPath(fromObject, ['disabled']); ++ if (fromDisabled != null) { ++ setValueByPath(toObject, ['disabled'], fromDisabled); ++ } ++ const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [ ++ 'startOfSpeechSensitivity', + ]); +- if (fromPrebuiltVoiceConfig != null) { +- setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToMldev(apiClient, fromPrebuiltVoiceConfig)); ++ if (fromStartOfSpeechSensitivity != null) { ++ setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity); ++ } ++ const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [ ++ 'endOfSpeechSensitivity', ++ ]); ++ if (fromEndOfSpeechSensitivity != null) { ++ setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity); ++ } ++ const fromPrefixPaddingMs = getValueByPath(fromObject, [ ++ 'prefixPaddingMs', ++ ]); ++ if (fromPrefixPaddingMs != null) { ++ setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs); ++ } ++ const fromSilenceDurationMs = getValueByPath(fromObject, [ ++ 'silenceDurationMs', ++ ]); ++ if (fromSilenceDurationMs != null) { ++ setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs); + } + return toObject; + } +-function speechConfigToMldev(apiClient, fromObject) { ++function automaticActivityDetectionToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']); +- if (fromVoiceConfig != null) { +- setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev(apiClient, fromVoiceConfig)); ++ const fromDisabled = getValueByPath(fromObject, ['disabled']); ++ if (fromDisabled != null) { ++ setValueByPath(toObject, ['disabled'], fromDisabled); ++ } ++ const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [ ++ 'startOfSpeechSensitivity', ++ ]); ++ if (fromStartOfSpeechSensitivity != null) { ++ setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity); ++ } ++ const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [ ++ 'endOfSpeechSensitivity', ++ ]); ++ if (fromEndOfSpeechSensitivity != null) { ++ setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity); ++ } ++ const fromPrefixPaddingMs = getValueByPath(fromObject, [ ++ 'prefixPaddingMs', ++ ]); ++ if (fromPrefixPaddingMs != null) { ++ setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs); ++ } ++ const fromSilenceDurationMs = getValueByPath(fromObject, [ ++ 'silenceDurationMs', ++ ]); ++ if (fromSilenceDurationMs != null) { ++ setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs); + } + return toObject; + } +-function thinkingConfigToMldev(apiClient, fromObject) { ++function realtimeInputConfigToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromIncludeThoughts = getValueByPath(fromObject, [ +- 'includeThoughts', ++ const fromAutomaticActivityDetection = getValueByPath(fromObject, [ ++ 'automaticActivityDetection', + ]); +- if (fromIncludeThoughts != null) { +- setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts); ++ if (fromAutomaticActivityDetection != null) { ++ setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToMldev(apiClient, fromAutomaticActivityDetection)); + } +- const fromThinkingBudget = getValueByPath(fromObject, [ +- 'thinkingBudget', ++ const fromActivityHandling = getValueByPath(fromObject, [ ++ 'activityHandling', + ]); +- if (fromThinkingBudget != null) { +- setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget); ++ if (fromActivityHandling != null) { ++ setValueByPath(toObject, ['activityHandling'], fromActivityHandling); ++ } ++ const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']); ++ if (fromTurnCoverage != null) { ++ setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage); + } + return toObject; + } +-function generateContentConfigToMldev(apiClient, fromObject, parentObject) { ++function realtimeInputConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromSystemInstruction = getValueByPath(fromObject, [ +- 'systemInstruction', ++ const fromAutomaticActivityDetection = getValueByPath(fromObject, [ ++ 'automaticActivityDetection', + ]); +- if (parentObject !== undefined && fromSystemInstruction != null) { +- setValueByPath(parentObject, ['systemInstruction'], contentToMldev(apiClient, tContent(apiClient, fromSystemInstruction))); +- } +- const fromTemperature = getValueByPath(fromObject, ['temperature']); +- if (fromTemperature != null) { +- setValueByPath(toObject, ['temperature'], fromTemperature); ++ if (fromAutomaticActivityDetection != null) { ++ setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToVertex(apiClient, fromAutomaticActivityDetection)); + } +- const fromTopP = getValueByPath(fromObject, ['topP']); +- if (fromTopP != null) { +- setValueByPath(toObject, ['topP'], fromTopP); ++ const fromActivityHandling = getValueByPath(fromObject, [ ++ 'activityHandling', ++ ]); ++ if (fromActivityHandling != null) { ++ setValueByPath(toObject, ['activityHandling'], fromActivityHandling); + } +- const fromTopK = getValueByPath(fromObject, ['topK']); +- if (fromTopK != null) { +- setValueByPath(toObject, ['topK'], fromTopK); ++ const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']); ++ if (fromTurnCoverage != null) { ++ setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage); + } +- const fromCandidateCount = getValueByPath(fromObject, [ +- 'candidateCount', +- ]); +- if (fromCandidateCount != null) { +- setValueByPath(toObject, ['candidateCount'], fromCandidateCount); ++ return toObject; ++} ++function slidingWindowToMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']); ++ if (fromTargetTokens != null) { ++ setValueByPath(toObject, ['targetTokens'], fromTargetTokens); + } +- const fromMaxOutputTokens = getValueByPath(fromObject, [ +- 'maxOutputTokens', +- ]); +- if (fromMaxOutputTokens != null) { +- setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens); ++ return toObject; ++} ++function slidingWindowToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']); ++ if (fromTargetTokens != null) { ++ setValueByPath(toObject, ['targetTokens'], fromTargetTokens); + } +- const fromStopSequences = getValueByPath(fromObject, [ +- 'stopSequences', ++ return toObject; ++} ++function contextWindowCompressionConfigToMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTriggerTokens = getValueByPath(fromObject, [ ++ 'triggerTokens', + ]); +- if (fromStopSequences != null) { +- setValueByPath(toObject, ['stopSequences'], fromStopSequences); ++ if (fromTriggerTokens != null) { ++ setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens); + } +- const fromResponseLogprobs = getValueByPath(fromObject, [ +- 'responseLogprobs', ++ const fromSlidingWindow = getValueByPath(fromObject, [ ++ 'slidingWindow', + ]); +- if (fromResponseLogprobs != null) { +- setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs); +- } +- const fromLogprobs = getValueByPath(fromObject, ['logprobs']); +- if (fromLogprobs != null) { +- setValueByPath(toObject, ['logprobs'], fromLogprobs); ++ if (fromSlidingWindow != null) { ++ setValueByPath(toObject, ['slidingWindow'], slidingWindowToMldev(apiClient, fromSlidingWindow)); + } +- const fromPresencePenalty = getValueByPath(fromObject, [ +- 'presencePenalty', ++ return toObject; ++} ++function contextWindowCompressionConfigToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTriggerTokens = getValueByPath(fromObject, [ ++ 'triggerTokens', + ]); +- if (fromPresencePenalty != null) { +- setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty); ++ if (fromTriggerTokens != null) { ++ setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens); + } +- const fromFrequencyPenalty = getValueByPath(fromObject, [ +- 'frequencyPenalty', ++ const fromSlidingWindow = getValueByPath(fromObject, [ ++ 'slidingWindow', + ]); +- if (fromFrequencyPenalty != null) { +- setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty); +- } +- const fromSeed = getValueByPath(fromObject, ['seed']); +- if (fromSeed != null) { +- setValueByPath(toObject, ['seed'], fromSeed); ++ if (fromSlidingWindow != null) { ++ setValueByPath(toObject, ['slidingWindow'], slidingWindowToVertex(apiClient, fromSlidingWindow)); + } +- const fromResponseMimeType = getValueByPath(fromObject, [ +- 'responseMimeType', ++ return toObject; ++} ++function liveConnectConfigToMldev(apiClient, fromObject, parentObject) { ++ const toObject = {}; ++ const fromGenerationConfig = getValueByPath(fromObject, [ ++ 'generationConfig', + ]); +- if (fromResponseMimeType != null) { +- setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType); ++ if (parentObject !== undefined && fromGenerationConfig != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig); + } +- const fromResponseSchema = getValueByPath(fromObject, [ +- 'responseSchema', ++ const fromResponseModalities = getValueByPath(fromObject, [ ++ 'responseModalities', + ]); +- if (fromResponseSchema != null) { +- setValueByPath(toObject, ['responseSchema'], schemaToMldev(apiClient, tSchema(apiClient, fromResponseSchema))); ++ if (parentObject !== undefined && fromResponseModalities != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities); + } +- if (getValueByPath(fromObject, ['routingConfig']) !== undefined) { +- throw new Error('routingConfig parameter is not supported in Gemini API.'); ++ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); ++ if (parentObject !== undefined && fromSpeechConfig != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], fromSpeechConfig); + } +- const fromSafetySettings = getValueByPath(fromObject, [ +- 'safetySettings', ++ const fromSystemInstruction = getValueByPath(fromObject, [ ++ 'systemInstruction', + ]); +- if (parentObject !== undefined && fromSafetySettings != null) { +- if (Array.isArray(fromSafetySettings)) { +- setValueByPath(parentObject, ['safetySettings'], fromSafetySettings.map((item) => { +- return safetySettingToMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(parentObject, ['safetySettings'], fromSafetySettings); +- } ++ if (parentObject !== undefined && fromSystemInstruction != null) { ++ setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToMldev$1(apiClient, tContent(apiClient, fromSystemInstruction))); + } + const fromTools = getValueByPath(fromObject, ['tools']); + if (parentObject !== undefined && fromTools != null) { + if (Array.isArray(fromTools)) { +- setValueByPath(parentObject, ['tools'], tTools(apiClient, tTools(apiClient, fromTools).map((item) => { +- return toolToMldev(apiClient, tTool(apiClient, item)); ++ setValueByPath(parentObject, ['setup', 'tools'], tTools(apiClient, tTools(apiClient, fromTools).map((item) => { ++ return toolToMldev$1(apiClient, tTool(apiClient, item)); + }))); + } + else { +- setValueByPath(parentObject, ['tools'], tTools(apiClient, fromTools)); ++ setValueByPath(parentObject, ['setup', 'tools'], tTools(apiClient, fromTools)); + } + } +- const fromToolConfig = getValueByPath(fromObject, ['toolConfig']); +- if (parentObject !== undefined && fromToolConfig != null) { +- setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev(apiClient, fromToolConfig)); ++ const fromSessionResumption = getValueByPath(fromObject, [ ++ 'sessionResumption', ++ ]); ++ if (parentObject !== undefined && fromSessionResumption != null) { ++ setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToMldev(apiClient, fromSessionResumption)); + } +- if (getValueByPath(fromObject, ['labels']) !== undefined) { +- throw new Error('labels parameter is not supported in Gemini API.'); ++ const fromRealtimeInputConfig = getValueByPath(fromObject, [ ++ 'realtimeInputConfig', ++ ]); ++ if (parentObject !== undefined && fromRealtimeInputConfig != null) { ++ setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToMldev(apiClient, fromRealtimeInputConfig)); + } +- const fromCachedContent = getValueByPath(fromObject, [ +- 'cachedContent', ++ const fromContextWindowCompression = getValueByPath(fromObject, [ ++ 'contextWindowCompression', + ]); +- if (parentObject !== undefined && fromCachedContent != null) { +- setValueByPath(parentObject, ['cachedContent'], tCachedContentName(apiClient, fromCachedContent)); ++ if (parentObject !== undefined && fromContextWindowCompression != null) { ++ setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToMldev(apiClient, fromContextWindowCompression)); + } +- const fromResponseModalities = getValueByPath(fromObject, [ +- 'responseModalities', ++ return toObject; ++} ++function liveConnectConfigToVertex(apiClient, fromObject, parentObject) { ++ const toObject = {}; ++ const fromGenerationConfig = getValueByPath(fromObject, [ ++ 'generationConfig', + ]); +- if (fromResponseModalities != null) { +- setValueByPath(toObject, ['responseModalities'], fromResponseModalities); ++ if (parentObject !== undefined && fromGenerationConfig != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig); + } +- const fromMediaResolution = getValueByPath(fromObject, [ +- 'mediaResolution', ++ const fromResponseModalities = getValueByPath(fromObject, [ ++ 'responseModalities', + ]); +- if (fromMediaResolution != null) { +- setValueByPath(toObject, ['mediaResolution'], fromMediaResolution); ++ if (parentObject !== undefined && fromResponseModalities != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities); + } + const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); +- if (fromSpeechConfig != null) { +- setValueByPath(toObject, ['speechConfig'], speechConfigToMldev(apiClient, tSpeechConfig(apiClient, fromSpeechConfig))); ++ if (parentObject !== undefined && fromSpeechConfig != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], fromSpeechConfig); + } +- if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) { +- throw new Error('audioTimestamp parameter is not supported in Gemini API.'); +- } +- const fromThinkingConfig = getValueByPath(fromObject, [ +- 'thinkingConfig', ++ const fromSystemInstruction = getValueByPath(fromObject, [ ++ 'systemInstruction', + ]); +- if (fromThinkingConfig != null) { +- setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev(apiClient, fromThinkingConfig)); +- } +- return toObject; +-} +-function generateContentParametersToMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); ++ if (parentObject !== undefined && fromSystemInstruction != null) { ++ setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToVertex$1(apiClient, tContent(apiClient, fromSystemInstruction))); + } +- const fromContents = getValueByPath(fromObject, ['contents']); +- if (fromContents != null) { +- if (Array.isArray(fromContents)) { +- setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToMldev(apiClient, item); ++ const fromTools = getValueByPath(fromObject, ['tools']); ++ if (parentObject !== undefined && fromTools != null) { ++ if (Array.isArray(fromTools)) { ++ setValueByPath(parentObject, ['setup', 'tools'], tTools(apiClient, tTools(apiClient, fromTools).map((item) => { ++ return toolToVertex$1(apiClient, tTool(apiClient, item)); + }))); + } + else { +- setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); ++ setValueByPath(parentObject, ['setup', 'tools'], tTools(apiClient, fromTools)); + } + } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['generationConfig'], generateContentConfigToMldev(apiClient, fromConfig, toObject)); +- } +- return toObject; +-} +-function embedContentConfigToMldev(apiClient, fromObject, parentObject) { +- const toObject = {}; +- const fromTaskType = getValueByPath(fromObject, ['taskType']); +- if (parentObject !== undefined && fromTaskType != null) { +- setValueByPath(parentObject, ['requests[]', 'taskType'], fromTaskType); ++ const fromSessionResumption = getValueByPath(fromObject, [ ++ 'sessionResumption', ++ ]); ++ if (parentObject !== undefined && fromSessionResumption != null) { ++ setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToVertex(apiClient, fromSessionResumption)); + } +- const fromTitle = getValueByPath(fromObject, ['title']); +- if (parentObject !== undefined && fromTitle != null) { +- setValueByPath(parentObject, ['requests[]', 'title'], fromTitle); ++ const fromRealtimeInputConfig = getValueByPath(fromObject, [ ++ 'realtimeInputConfig', ++ ]); ++ if (parentObject !== undefined && fromRealtimeInputConfig != null) { ++ setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToVertex(apiClient, fromRealtimeInputConfig)); + } +- const fromOutputDimensionality = getValueByPath(fromObject, [ +- 'outputDimensionality', ++ const fromContextWindowCompression = getValueByPath(fromObject, [ ++ 'contextWindowCompression', + ]); +- if (parentObject !== undefined && fromOutputDimensionality != null) { +- setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality); ++ if (parentObject !== undefined && fromContextWindowCompression != null) { ++ setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToVertex(apiClient, fromContextWindowCompression)); + } +- if (getValueByPath(fromObject, ['mimeType']) !== undefined) { +- throw new Error('mimeType parameter is not supported in Gemini API.'); ++ return toObject; ++} ++function liveConnectParametersToMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel)); + } +- if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) { +- throw new Error('autoTruncate parameter is not supported in Gemini API.'); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], liveConnectConfigToMldev(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function embedContentParametersToMldev(apiClient, fromObject) { ++function liveConnectParametersToVertex(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); +- } +- const fromContents = getValueByPath(fromObject, ['contents']); +- if (fromContents != null) { +- setValueByPath(toObject, ['requests[]', 'content'], tContentsForEmbed(apiClient, fromContents)); ++ setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel)); + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['config'], embedContentConfigToMldev(apiClient, fromConfig, toObject)); +- } +- const fromModelForEmbedContent = getValueByPath(fromObject, ['model']); +- if (fromModelForEmbedContent !== undefined) { +- setValueByPath(toObject, ['requests[]', 'model'], tModel(apiClient, fromModelForEmbedContent)); ++ setValueByPath(toObject, ['config'], liveConnectConfigToVertex(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function generateImagesConfigToMldev(apiClient, fromObject, parentObject) { ++function liveServerSetupCompleteFromMldev() { + const toObject = {}; +- if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) { +- throw new Error('outputGcsUri parameter is not supported in Gemini API.'); ++ return toObject; ++} ++function liveServerSetupCompleteFromVertex() { ++ const toObject = {}; ++ return toObject; ++} ++function partFromMldev$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); + } +- if (getValueByPath(fromObject, ['negativePrompt']) !== undefined) { +- throw new Error('negativePrompt parameter is not supported in Gemini API.'); ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', ++ ]); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); + } +- const fromNumberOfImages = getValueByPath(fromObject, [ +- 'numberOfImages', ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', + ]); +- if (parentObject !== undefined && fromNumberOfImages != null) { +- setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfImages); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); + } +- const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']); +- if (parentObject !== undefined && fromAspectRatio != null) { +- setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio); ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); + } +- const fromGuidanceScale = getValueByPath(fromObject, [ +- 'guidanceScale', ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); ++ } ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', + ]); +- if (parentObject !== undefined && fromGuidanceScale != null) { +- setValueByPath(parentObject, ['parameters', 'guidanceScale'], fromGuidanceScale); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); + } +- if (getValueByPath(fromObject, ['seed']) !== undefined) { +- throw new Error('seed parameter is not supported in Gemini API.'); ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); + } +- const fromSafetyFilterLevel = getValueByPath(fromObject, [ +- 'safetyFilterLevel', +- ]); +- if (parentObject !== undefined && fromSafetyFilterLevel != null) { +- setValueByPath(parentObject, ['parameters', 'safetySetting'], fromSafetyFilterLevel); ++ const fromText = getValueByPath(fromObject, ['text']); ++ if (fromText != null) { ++ setValueByPath(toObject, ['text'], fromText); + } +- const fromPersonGeneration = getValueByPath(fromObject, [ +- 'personGeneration', ++ return toObject; ++} ++function partFromVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromVideoMetadata = getValueByPath(fromObject, [ ++ 'videoMetadata', + ]); +- if (parentObject !== undefined && fromPersonGeneration != null) { +- setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration); ++ if (fromVideoMetadata != null) { ++ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); + } +- const fromIncludeSafetyAttributes = getValueByPath(fromObject, [ +- 'includeSafetyAttributes', ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); ++ } ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', + ]); +- if (parentObject !== undefined && fromIncludeSafetyAttributes != null) { +- setValueByPath(parentObject, ['parameters', 'includeSafetyAttributes'], fromIncludeSafetyAttributes); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); + } +- const fromIncludeRaiReason = getValueByPath(fromObject, [ +- 'includeRaiReason', ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', + ]); +- if (parentObject !== undefined && fromIncludeRaiReason != null) { +- setValueByPath(parentObject, ['parameters', 'includeRaiReason'], fromIncludeRaiReason); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); + } +- const fromLanguage = getValueByPath(fromObject, ['language']); +- if (parentObject !== undefined && fromLanguage != null) { +- setValueByPath(parentObject, ['parameters', 'language'], fromLanguage); ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); + } +- const fromOutputMimeType = getValueByPath(fromObject, [ +- 'outputMimeType', +- ]); +- if (parentObject !== undefined && fromOutputMimeType != null) { +- setValueByPath(parentObject, ['parameters', 'outputOptions', 'mimeType'], fromOutputMimeType); ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); + } +- const fromOutputCompressionQuality = getValueByPath(fromObject, [ +- 'outputCompressionQuality', ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', + ]); +- if (parentObject !== undefined && fromOutputCompressionQuality != null) { +- setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); + } +- if (getValueByPath(fromObject, ['addWatermark']) !== undefined) { +- throw new Error('addWatermark parameter is not supported in Gemini API.'); ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); + } +- if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) { +- throw new Error('enhancePrompt parameter is not supported in Gemini API.'); ++ const fromText = getValueByPath(fromObject, ['text']); ++ if (fromText != null) { ++ setValueByPath(toObject, ['text'], fromText); + } + return toObject; + } +-function generateImagesParametersToMldev(apiClient, fromObject) { ++function contentFromMldev$1(apiClient, fromObject) { + const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); +- } +- const fromPrompt = getValueByPath(fromObject, ['prompt']); +- if (fromPrompt != null) { +- setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt); ++ const fromParts = getValueByPath(fromObject, ['parts']); ++ if (fromParts != null) { ++ if (Array.isArray(fromParts)) { ++ setValueByPath(toObject, ['parts'], fromParts.map((item) => { ++ return partFromMldev$1(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['parts'], fromParts); ++ } + } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['config'], generateImagesConfigToMldev(apiClient, fromConfig, toObject)); ++ const fromRole = getValueByPath(fromObject, ['role']); ++ if (fromRole != null) { ++ setValueByPath(toObject, ['role'], fromRole); + } + return toObject; + } +-function getModelParametersToMldev(apiClient, fromObject) { ++function contentFromVertex$1(apiClient, fromObject) { + const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'name'], tModel(apiClient, fromModel)); ++ const fromParts = getValueByPath(fromObject, ['parts']); ++ if (fromParts != null) { ++ if (Array.isArray(fromParts)) { ++ setValueByPath(toObject, ['parts'], fromParts.map((item) => { ++ return partFromVertex$1(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['parts'], fromParts); ++ } + } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['config'], fromConfig); ++ const fromRole = getValueByPath(fromObject, ['role']); ++ if (fromRole != null) { ++ setValueByPath(toObject, ['role'], fromRole); + } + return toObject; + } +-function countTokensConfigToMldev(apiClient, fromObject) { ++function liveServerContentFromMldev(apiClient, fromObject) { + const toObject = {}; +- if (getValueByPath(fromObject, ['systemInstruction']) !== undefined) { +- throw new Error('systemInstruction parameter is not supported in Gemini API.'); ++ const fromModelTurn = getValueByPath(fromObject, ['modelTurn']); ++ if (fromModelTurn != null) { ++ setValueByPath(toObject, ['modelTurn'], contentFromMldev$1(apiClient, fromModelTurn)); + } +- if (getValueByPath(fromObject, ['tools']) !== undefined) { +- throw new Error('tools parameter is not supported in Gemini API.'); ++ const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']); ++ if (fromTurnComplete != null) { ++ setValueByPath(toObject, ['turnComplete'], fromTurnComplete); + } +- if (getValueByPath(fromObject, ['generationConfig']) !== undefined) { +- throw new Error('generationConfig parameter is not supported in Gemini API.'); ++ const fromInterrupted = getValueByPath(fromObject, ['interrupted']); ++ if (fromInterrupted != null) { ++ setValueByPath(toObject, ['interrupted'], fromInterrupted); ++ } ++ const fromGenerationComplete = getValueByPath(fromObject, [ ++ 'generationComplete', ++ ]); ++ if (fromGenerationComplete != null) { ++ setValueByPath(toObject, ['generationComplete'], fromGenerationComplete); + } + return toObject; + } +-function countTokensParametersToMldev(apiClient, fromObject) { ++function liveServerContentFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); ++ const fromModelTurn = getValueByPath(fromObject, ['modelTurn']); ++ if (fromModelTurn != null) { ++ setValueByPath(toObject, ['modelTurn'], contentFromVertex$1(apiClient, fromModelTurn)); + } +- const fromContents = getValueByPath(fromObject, ['contents']); +- if (fromContents != null) { +- if (Array.isArray(fromContents)) { +- setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToMldev(apiClient, item); +- }))); +- } +- else { +- setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); +- } ++ const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']); ++ if (fromTurnComplete != null) { ++ setValueByPath(toObject, ['turnComplete'], fromTurnComplete); + } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['config'], countTokensConfigToMldev(apiClient, fromConfig)); ++ const fromInterrupted = getValueByPath(fromObject, ['interrupted']); ++ if (fromInterrupted != null) { ++ setValueByPath(toObject, ['interrupted'], fromInterrupted); ++ } ++ const fromGenerationComplete = getValueByPath(fromObject, [ ++ 'generationComplete', ++ ]); ++ if (fromGenerationComplete != null) { ++ setValueByPath(toObject, ['generationComplete'], fromGenerationComplete); + } + return toObject; + } +-function imageToMldev(apiClient, fromObject) { ++function functionCallFromMldev(apiClient, fromObject) { + const toObject = {}; +- if (getValueByPath(fromObject, ['gcsUri']) !== undefined) { +- throw new Error('gcsUri parameter is not supported in Gemini API.'); ++ const fromId = getValueByPath(fromObject, ['id']); ++ if (fromId != null) { ++ setValueByPath(toObject, ['id'], fromId); + } +- const fromImageBytes = getValueByPath(fromObject, ['imageBytes']); +- if (fromImageBytes != null) { +- setValueByPath(toObject, ['bytesBase64Encoded'], tBytes(apiClient, fromImageBytes)); ++ const fromArgs = getValueByPath(fromObject, ['args']); ++ if (fromArgs != null) { ++ setValueByPath(toObject, ['args'], fromArgs); + } +- const fromMimeType = getValueByPath(fromObject, ['mimeType']); +- if (fromMimeType != null) { +- setValueByPath(toObject, ['mimeType'], fromMimeType); ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); + } + return toObject; + } +-function generateVideosConfigToMldev(apiClient, fromObject, parentObject) { ++function functionCallFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromNumberOfVideos = getValueByPath(fromObject, [ +- 'numberOfVideos', +- ]); +- if (parentObject !== undefined && fromNumberOfVideos != null) { +- setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfVideos); +- } +- if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) { +- throw new Error('outputGcsUri parameter is not supported in Gemini API.'); ++ const fromArgs = getValueByPath(fromObject, ['args']); ++ if (fromArgs != null) { ++ setValueByPath(toObject, ['args'], fromArgs); + } +- if (getValueByPath(fromObject, ['fps']) !== undefined) { +- throw new Error('fps parameter is not supported in Gemini API.'); ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); + } +- const fromDurationSeconds = getValueByPath(fromObject, [ +- 'durationSeconds', ++ return toObject; ++} ++function liveServerToolCallFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromFunctionCalls = getValueByPath(fromObject, [ ++ 'functionCalls', + ]); +- if (parentObject !== undefined && fromDurationSeconds != null) { +- setValueByPath(parentObject, ['parameters', 'durationSeconds'], fromDurationSeconds); +- } +- if (getValueByPath(fromObject, ['seed']) !== undefined) { +- throw new Error('seed parameter is not supported in Gemini API.'); +- } +- const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']); +- if (parentObject !== undefined && fromAspectRatio != null) { +- setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio); +- } +- if (getValueByPath(fromObject, ['resolution']) !== undefined) { +- throw new Error('resolution parameter is not supported in Gemini API.'); ++ if (fromFunctionCalls != null) { ++ if (Array.isArray(fromFunctionCalls)) { ++ setValueByPath(toObject, ['functionCalls'], fromFunctionCalls.map((item) => { ++ return functionCallFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['functionCalls'], fromFunctionCalls); ++ } + } +- const fromPersonGeneration = getValueByPath(fromObject, [ +- 'personGeneration', ++ return toObject; ++} ++function liveServerToolCallFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromFunctionCalls = getValueByPath(fromObject, [ ++ 'functionCalls', + ]); +- if (parentObject !== undefined && fromPersonGeneration != null) { +- setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration); +- } +- if (getValueByPath(fromObject, ['pubsubTopic']) !== undefined) { +- throw new Error('pubsubTopic parameter is not supported in Gemini API.'); ++ if (fromFunctionCalls != null) { ++ if (Array.isArray(fromFunctionCalls)) { ++ setValueByPath(toObject, ['functionCalls'], fromFunctionCalls.map((item) => { ++ return functionCallFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['functionCalls'], fromFunctionCalls); ++ } + } +- const fromNegativePrompt = getValueByPath(fromObject, [ +- 'negativePrompt', +- ]); +- if (parentObject !== undefined && fromNegativePrompt != null) { +- setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt); ++ return toObject; ++} ++function liveServerToolCallCancellationFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromIds = getValueByPath(fromObject, ['ids']); ++ if (fromIds != null) { ++ setValueByPath(toObject, ['ids'], fromIds); + } +- if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) { +- throw new Error('enhancePrompt parameter is not supported in Gemini API.'); ++ return toObject; ++} ++function liveServerToolCallCancellationFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromIds = getValueByPath(fromObject, ['ids']); ++ if (fromIds != null) { ++ setValueByPath(toObject, ['ids'], fromIds); + } + return toObject; + } +-function generateVideosParametersToMldev(apiClient, fromObject) { ++function modalityTokenCountFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); ++ const fromModality = getValueByPath(fromObject, ['modality']); ++ if (fromModality != null) { ++ setValueByPath(toObject, ['modality'], fromModality); + } +- const fromPrompt = getValueByPath(fromObject, ['prompt']); +- if (fromPrompt != null) { +- setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt); ++ const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); ++ if (fromTokenCount != null) { ++ setValueByPath(toObject, ['tokenCount'], fromTokenCount); + } +- const fromImage = getValueByPath(fromObject, ['image']); +- if (fromImage != null) { +- setValueByPath(toObject, ['instances[0]', 'image'], imageToMldev(apiClient, fromImage)); ++ return toObject; ++} ++function modalityTokenCountFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromModality = getValueByPath(fromObject, ['modality']); ++ if (fromModality != null) { ++ setValueByPath(toObject, ['modality'], fromModality); + } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['config'], generateVideosConfigToMldev(apiClient, fromConfig, toObject)); ++ const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); ++ if (fromTokenCount != null) { ++ setValueByPath(toObject, ['tokenCount'], fromTokenCount); + } + return toObject; + } +-function partToVertex(apiClient, fromObject) { ++function usageMetadataFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromVideoMetadata = getValueByPath(fromObject, [ +- 'videoMetadata', ++ const fromPromptTokenCount = getValueByPath(fromObject, [ ++ 'promptTokenCount', + ]); +- if (fromVideoMetadata != null) { +- setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); ++ if (fromPromptTokenCount != null) { ++ setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount); + } +- const fromThought = getValueByPath(fromObject, ['thought']); +- if (fromThought != null) { +- setValueByPath(toObject, ['thought'], fromThought); ++ const fromCachedContentTokenCount = getValueByPath(fromObject, [ ++ 'cachedContentTokenCount', ++ ]); ++ if (fromCachedContentTokenCount != null) { ++ setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); + } +- const fromCodeExecutionResult = getValueByPath(fromObject, [ +- 'codeExecutionResult', ++ const fromResponseTokenCount = getValueByPath(fromObject, [ ++ 'responseTokenCount', + ]); +- if (fromCodeExecutionResult != null) { +- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); ++ if (fromResponseTokenCount != null) { ++ setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount); + } +- const fromExecutableCode = getValueByPath(fromObject, [ +- 'executableCode', ++ const fromToolUsePromptTokenCount = getValueByPath(fromObject, [ ++ 'toolUsePromptTokenCount', + ]); +- if (fromExecutableCode != null) { +- setValueByPath(toObject, ['executableCode'], fromExecutableCode); ++ if (fromToolUsePromptTokenCount != null) { ++ setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount); + } +- const fromFileData = getValueByPath(fromObject, ['fileData']); +- if (fromFileData != null) { +- setValueByPath(toObject, ['fileData'], fromFileData); ++ const fromThoughtsTokenCount = getValueByPath(fromObject, [ ++ 'thoughtsTokenCount', ++ ]); ++ if (fromThoughtsTokenCount != null) { ++ setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount); + } +- const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); +- if (fromFunctionCall != null) { +- setValueByPath(toObject, ['functionCall'], fromFunctionCall); ++ const fromTotalTokenCount = getValueByPath(fromObject, [ ++ 'totalTokenCount', ++ ]); ++ if (fromTotalTokenCount != null) { ++ setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount); + } +- const fromFunctionResponse = getValueByPath(fromObject, [ +- 'functionResponse', ++ const fromPromptTokensDetails = getValueByPath(fromObject, [ ++ 'promptTokensDetails', + ]); +- if (fromFunctionResponse != null) { +- setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); ++ if (fromPromptTokensDetails != null) { ++ if (Array.isArray(fromPromptTokensDetails)) { ++ setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails.map((item) => { ++ return modalityTokenCountFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails); ++ } + } +- const fromInlineData = getValueByPath(fromObject, ['inlineData']); +- if (fromInlineData != null) { +- setValueByPath(toObject, ['inlineData'], fromInlineData); ++ const fromCacheTokensDetails = getValueByPath(fromObject, [ ++ 'cacheTokensDetails', ++ ]); ++ if (fromCacheTokensDetails != null) { ++ if (Array.isArray(fromCacheTokensDetails)) { ++ setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails.map((item) => { ++ return modalityTokenCountFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails); ++ } ++ } ++ const fromResponseTokensDetails = getValueByPath(fromObject, [ ++ 'responseTokensDetails', ++ ]); ++ if (fromResponseTokensDetails != null) { ++ if (Array.isArray(fromResponseTokensDetails)) { ++ setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails.map((item) => { ++ return modalityTokenCountFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails); ++ } ++ } ++ const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [ ++ 'toolUsePromptTokensDetails', ++ ]); ++ if (fromToolUsePromptTokensDetails != null) { ++ if (Array.isArray(fromToolUsePromptTokensDetails)) { ++ setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails.map((item) => { ++ return modalityTokenCountFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails); ++ } ++ } ++ return toObject; ++} ++function usageMetadataFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromPromptTokenCount = getValueByPath(fromObject, [ ++ 'promptTokenCount', ++ ]); ++ if (fromPromptTokenCount != null) { ++ setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount); ++ } ++ const fromCachedContentTokenCount = getValueByPath(fromObject, [ ++ 'cachedContentTokenCount', ++ ]); ++ if (fromCachedContentTokenCount != null) { ++ setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); ++ } ++ const fromResponseTokenCount = getValueByPath(fromObject, [ ++ 'candidatesTokenCount', ++ ]); ++ if (fromResponseTokenCount != null) { ++ setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount); ++ } ++ const fromToolUsePromptTokenCount = getValueByPath(fromObject, [ ++ 'toolUsePromptTokenCount', ++ ]); ++ if (fromToolUsePromptTokenCount != null) { ++ setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount); ++ } ++ const fromThoughtsTokenCount = getValueByPath(fromObject, [ ++ 'thoughtsTokenCount', ++ ]); ++ if (fromThoughtsTokenCount != null) { ++ setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount); ++ } ++ const fromTotalTokenCount = getValueByPath(fromObject, [ ++ 'totalTokenCount', ++ ]); ++ if (fromTotalTokenCount != null) { ++ setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount); ++ } ++ const fromPromptTokensDetails = getValueByPath(fromObject, [ ++ 'promptTokensDetails', ++ ]); ++ if (fromPromptTokensDetails != null) { ++ if (Array.isArray(fromPromptTokensDetails)) { ++ setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails.map((item) => { ++ return modalityTokenCountFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails); ++ } ++ } ++ const fromCacheTokensDetails = getValueByPath(fromObject, [ ++ 'cacheTokensDetails', ++ ]); ++ if (fromCacheTokensDetails != null) { ++ if (Array.isArray(fromCacheTokensDetails)) { ++ setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails.map((item) => { ++ return modalityTokenCountFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails); ++ } ++ } ++ const fromResponseTokensDetails = getValueByPath(fromObject, [ ++ 'candidatesTokensDetails', ++ ]); ++ if (fromResponseTokensDetails != null) { ++ if (Array.isArray(fromResponseTokensDetails)) { ++ setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails.map((item) => { ++ return modalityTokenCountFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails); ++ } ++ } ++ const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [ ++ 'toolUsePromptTokensDetails', ++ ]); ++ if (fromToolUsePromptTokensDetails != null) { ++ if (Array.isArray(fromToolUsePromptTokensDetails)) { ++ setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails.map((item) => { ++ return modalityTokenCountFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails); ++ } ++ } ++ const fromTrafficType = getValueByPath(fromObject, ['trafficType']); ++ if (fromTrafficType != null) { ++ setValueByPath(toObject, ['trafficType'], fromTrafficType); ++ } ++ return toObject; ++} ++function liveServerGoAwayFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']); ++ if (fromTimeLeft != null) { ++ setValueByPath(toObject, ['timeLeft'], fromTimeLeft); ++ } ++ return toObject; ++} ++function liveServerGoAwayFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']); ++ if (fromTimeLeft != null) { ++ setValueByPath(toObject, ['timeLeft'], fromTimeLeft); ++ } ++ return toObject; ++} ++function liveServerSessionResumptionUpdateFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromNewHandle = getValueByPath(fromObject, ['newHandle']); ++ if (fromNewHandle != null) { ++ setValueByPath(toObject, ['newHandle'], fromNewHandle); ++ } ++ const fromResumable = getValueByPath(fromObject, ['resumable']); ++ if (fromResumable != null) { ++ setValueByPath(toObject, ['resumable'], fromResumable); ++ } ++ const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [ ++ 'lastConsumedClientMessageIndex', ++ ]); ++ if (fromLastConsumedClientMessageIndex != null) { ++ setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex); ++ } ++ return toObject; ++} ++function liveServerSessionResumptionUpdateFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromNewHandle = getValueByPath(fromObject, ['newHandle']); ++ if (fromNewHandle != null) { ++ setValueByPath(toObject, ['newHandle'], fromNewHandle); ++ } ++ const fromResumable = getValueByPath(fromObject, ['resumable']); ++ if (fromResumable != null) { ++ setValueByPath(toObject, ['resumable'], fromResumable); ++ } ++ const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [ ++ 'lastConsumedClientMessageIndex', ++ ]); ++ if (fromLastConsumedClientMessageIndex != null) { ++ setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex); ++ } ++ return toObject; ++} ++function liveServerMessageFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromSetupComplete = getValueByPath(fromObject, [ ++ 'setupComplete', ++ ]); ++ if (fromSetupComplete != null) { ++ setValueByPath(toObject, ['setupComplete'], liveServerSetupCompleteFromMldev()); ++ } ++ const fromServerContent = getValueByPath(fromObject, [ ++ 'serverContent', ++ ]); ++ if (fromServerContent != null) { ++ setValueByPath(toObject, ['serverContent'], liveServerContentFromMldev(apiClient, fromServerContent)); ++ } ++ const fromToolCall = getValueByPath(fromObject, ['toolCall']); ++ if (fromToolCall != null) { ++ setValueByPath(toObject, ['toolCall'], liveServerToolCallFromMldev(apiClient, fromToolCall)); ++ } ++ const fromToolCallCancellation = getValueByPath(fromObject, [ ++ 'toolCallCancellation', ++ ]); ++ if (fromToolCallCancellation != null) { ++ setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromMldev(apiClient, fromToolCallCancellation)); ++ } ++ const fromUsageMetadata = getValueByPath(fromObject, [ ++ 'usageMetadata', ++ ]); ++ if (fromUsageMetadata != null) { ++ setValueByPath(toObject, ['usageMetadata'], usageMetadataFromMldev(apiClient, fromUsageMetadata)); ++ } ++ const fromGoAway = getValueByPath(fromObject, ['goAway']); ++ if (fromGoAway != null) { ++ setValueByPath(toObject, ['goAway'], liveServerGoAwayFromMldev(apiClient, fromGoAway)); ++ } ++ const fromSessionResumptionUpdate = getValueByPath(fromObject, [ ++ 'sessionResumptionUpdate', ++ ]); ++ if (fromSessionResumptionUpdate != null) { ++ setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromMldev(apiClient, fromSessionResumptionUpdate)); ++ } ++ return toObject; ++} ++function liveServerMessageFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromSetupComplete = getValueByPath(fromObject, [ ++ 'setupComplete', ++ ]); ++ if (fromSetupComplete != null) { ++ setValueByPath(toObject, ['setupComplete'], liveServerSetupCompleteFromVertex()); ++ } ++ const fromServerContent = getValueByPath(fromObject, [ ++ 'serverContent', ++ ]); ++ if (fromServerContent != null) { ++ setValueByPath(toObject, ['serverContent'], liveServerContentFromVertex(apiClient, fromServerContent)); ++ } ++ const fromToolCall = getValueByPath(fromObject, ['toolCall']); ++ if (fromToolCall != null) { ++ setValueByPath(toObject, ['toolCall'], liveServerToolCallFromVertex(apiClient, fromToolCall)); ++ } ++ const fromToolCallCancellation = getValueByPath(fromObject, [ ++ 'toolCallCancellation', ++ ]); ++ if (fromToolCallCancellation != null) { ++ setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromVertex(apiClient, fromToolCallCancellation)); ++ } ++ const fromUsageMetadata = getValueByPath(fromObject, [ ++ 'usageMetadata', ++ ]); ++ if (fromUsageMetadata != null) { ++ setValueByPath(toObject, ['usageMetadata'], usageMetadataFromVertex(apiClient, fromUsageMetadata)); ++ } ++ const fromGoAway = getValueByPath(fromObject, ['goAway']); ++ if (fromGoAway != null) { ++ setValueByPath(toObject, ['goAway'], liveServerGoAwayFromVertex(apiClient, fromGoAway)); ++ } ++ const fromSessionResumptionUpdate = getValueByPath(fromObject, [ ++ 'sessionResumptionUpdate', ++ ]); ++ if (fromSessionResumptionUpdate != null) { ++ setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromVertex(apiClient, fromSessionResumptionUpdate)); ++ } ++ return toObject; ++} ++ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++function partToMldev(apiClient, fromObject) { ++ const toObject = {}; ++ if (getValueByPath(fromObject, ['videoMetadata']) !== undefined) { ++ throw new Error('videoMetadata parameter is not supported in Gemini API.'); ++ } ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); ++ } ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', ++ ]); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); ++ } ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', ++ ]); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); ++ } ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); ++ } ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); ++ } ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', ++ ]); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); ++ } ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); + } + const fromText = getValueByPath(fromObject, ['text']); + if (fromText != null) { +@@ -4726,13 +5261,13 @@ function partToVertex(apiClient, fromObject) { + } + return toObject; + } +-function contentToVertex(apiClient, fromObject) { ++function contentToMldev(apiClient, fromObject) { + const toObject = {}; + const fromParts = getValueByPath(fromObject, ['parts']); + if (fromParts != null) { + if (Array.isArray(fromParts)) { + setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partToVertex(apiClient, item); ++ return partToMldev(apiClient, item); + })); + } + else { +@@ -4745,39 +5280,28 @@ function contentToVertex(apiClient, fromObject) { + } + return toObject; + } +-function schemaToVertex(apiClient, fromObject) { ++function schemaToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromExample = getValueByPath(fromObject, ['example']); +- if (fromExample != null) { +- setValueByPath(toObject, ['example'], fromExample); ++ if (getValueByPath(fromObject, ['example']) !== undefined) { ++ throw new Error('example parameter is not supported in Gemini API.'); + } +- const fromPattern = getValueByPath(fromObject, ['pattern']); +- if (fromPattern != null) { +- setValueByPath(toObject, ['pattern'], fromPattern); ++ if (getValueByPath(fromObject, ['pattern']) !== undefined) { ++ throw new Error('pattern parameter is not supported in Gemini API.'); + } +- const fromDefault = getValueByPath(fromObject, ['default']); +- if (fromDefault != null) { +- setValueByPath(toObject, ['default'], fromDefault); ++ if (getValueByPath(fromObject, ['default']) !== undefined) { ++ throw new Error('default parameter is not supported in Gemini API.'); + } +- const fromMaxLength = getValueByPath(fromObject, ['maxLength']); +- if (fromMaxLength != null) { +- setValueByPath(toObject, ['maxLength'], fromMaxLength); ++ if (getValueByPath(fromObject, ['maxLength']) !== undefined) { ++ throw new Error('maxLength parameter is not supported in Gemini API.'); + } +- const fromMinLength = getValueByPath(fromObject, ['minLength']); +- if (fromMinLength != null) { +- setValueByPath(toObject, ['minLength'], fromMinLength); ++ if (getValueByPath(fromObject, ['minLength']) !== undefined) { ++ throw new Error('minLength parameter is not supported in Gemini API.'); + } +- const fromMinProperties = getValueByPath(fromObject, [ +- 'minProperties', +- ]); +- if (fromMinProperties != null) { +- setValueByPath(toObject, ['minProperties'], fromMinProperties); ++ if (getValueByPath(fromObject, ['minProperties']) !== undefined) { ++ throw new Error('minProperties parameter is not supported in Gemini API.'); + } +- const fromMaxProperties = getValueByPath(fromObject, [ +- 'maxProperties', +- ]); +- if (fromMaxProperties != null) { +- setValueByPath(toObject, ['maxProperties'], fromMaxProperties); ++ if (getValueByPath(fromObject, ['maxProperties']) !== undefined) { ++ throw new Error('maxProperties parameter is not supported in Gemini API.'); + } + const fromAnyOf = getValueByPath(fromObject, ['anyOf']); + if (fromAnyOf != null) { +@@ -4843,11 +5367,10 @@ function schemaToVertex(apiClient, fromObject) { + } + return toObject; + } +-function safetySettingToVertex(apiClient, fromObject) { ++function safetySettingToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromMethod = getValueByPath(fromObject, ['method']); +- if (fromMethod != null) { +- setValueByPath(toObject, ['method'], fromMethod); ++ if (getValueByPath(fromObject, ['method']) !== undefined) { ++ throw new Error('method parameter is not supported in Gemini API.'); + } + const fromCategory = getValueByPath(fromObject, ['category']); + if (fromCategory != null) { +@@ -4859,11 +5382,10 @@ function safetySettingToVertex(apiClient, fromObject) { + } + return toObject; + } +-function functionDeclarationToVertex(apiClient, fromObject) { ++function functionDeclarationToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromResponse = getValueByPath(fromObject, ['response']); +- if (fromResponse != null) { +- setValueByPath(toObject, ['response'], schemaToVertex(apiClient, fromResponse)); ++ if (getValueByPath(fromObject, ['response']) !== undefined) { ++ throw new Error('response parameter is not supported in Gemini API.'); + } + const fromDescription = getValueByPath(fromObject, ['description']); + if (fromDescription != null) { +@@ -4879,11 +5401,11 @@ function functionDeclarationToVertex(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchToVertex() { ++function googleSearchToMldev() { + const toObject = {}; + return toObject; + } +-function dynamicRetrievalConfigToVertex(apiClient, fromObject) { ++function dynamicRetrievalConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromMode = getValueByPath(fromObject, ['mode']); + if (fromMode != null) { +@@ -4897,17 +5419,17 @@ function dynamicRetrievalConfigToVertex(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchRetrievalToVertex(apiClient, fromObject) { ++function googleSearchRetrievalToMldev(apiClient, fromObject) { + const toObject = {}; + const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ + 'dynamicRetrievalConfig', + ]); + if (fromDynamicRetrievalConfig != null) { +- setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig)); ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig)); + } + return toObject; + } +-function toolToVertex(apiClient, fromObject) { ++function toolToMldev(apiClient, fromObject) { + const toObject = {}; + const fromFunctionDeclarations = getValueByPath(fromObject, [ + 'functionDeclarations', +@@ -4915,26 +5437,25 @@ function toolToVertex(apiClient, fromObject) { + if (fromFunctionDeclarations != null) { + if (Array.isArray(fromFunctionDeclarations)) { + setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { +- return functionDeclarationToVertex(apiClient, item); ++ return functionDeclarationToMldev(apiClient, item); + })); + } + else { + setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations); + } + } +- const fromRetrieval = getValueByPath(fromObject, ['retrieval']); +- if (fromRetrieval != null) { +- setValueByPath(toObject, ['retrieval'], fromRetrieval); ++ if (getValueByPath(fromObject, ['retrieval']) !== undefined) { ++ throw new Error('retrieval parameter is not supported in Gemini API.'); + } + const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); + if (fromGoogleSearch != null) { +- setValueByPath(toObject, ['googleSearch'], googleSearchToVertex()); ++ setValueByPath(toObject, ['googleSearch'], googleSearchToMldev()); + } + const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ + 'googleSearchRetrieval', + ]); + if (fromGoogleSearchRetrieval != null) { +- setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval)); ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval)); + } + const fromCodeExecution = getValueByPath(fromObject, [ + 'codeExecution', +@@ -4944,7 +5465,7 @@ function toolToVertex(apiClient, fromObject) { + } + return toObject; + } +-function functionCallingConfigToVertex(apiClient, fromObject) { ++function functionCallingConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromMode = getValueByPath(fromObject, ['mode']); + if (fromMode != null) { +@@ -4958,17 +5479,17 @@ function functionCallingConfigToVertex(apiClient, fromObject) { + } + return toObject; + } +-function toolConfigToVertex(apiClient, fromObject) { ++function toolConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromFunctionCallingConfig = getValueByPath(fromObject, [ + 'functionCallingConfig', + ]); + if (fromFunctionCallingConfig != null) { +- setValueByPath(toObject, ['functionCallingConfig'], functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig)); ++ setValueByPath(toObject, ['functionCallingConfig'], functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig)); + } + return toObject; + } +-function prebuiltVoiceConfigToVertex(apiClient, fromObject) { ++function prebuiltVoiceConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromVoiceName = getValueByPath(fromObject, ['voiceName']); + if (fromVoiceName != null) { +@@ -4976,25 +5497,29 @@ function prebuiltVoiceConfigToVertex(apiClient, fromObject) { + } + return toObject; + } +-function voiceConfigToVertex(apiClient, fromObject) { ++function voiceConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [ + 'prebuiltVoiceConfig', + ]); + if (fromPrebuiltVoiceConfig != null) { +- setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToVertex(apiClient, fromPrebuiltVoiceConfig)); ++ setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToMldev(apiClient, fromPrebuiltVoiceConfig)); + } + return toObject; + } +-function speechConfigToVertex(apiClient, fromObject) { ++function speechConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']); + if (fromVoiceConfig != null) { +- setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(apiClient, fromVoiceConfig)); ++ setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev(apiClient, fromVoiceConfig)); ++ } ++ const fromLanguageCode = getValueByPath(fromObject, ['languageCode']); ++ if (fromLanguageCode != null) { ++ setValueByPath(toObject, ['languageCode'], fromLanguageCode); + } + return toObject; + } +-function thinkingConfigToVertex(apiClient, fromObject) { ++function thinkingConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromIncludeThoughts = getValueByPath(fromObject, [ + 'includeThoughts', +@@ -5010,13 +5535,13 @@ function thinkingConfigToVertex(apiClient, fromObject) { + } + return toObject; + } +-function generateContentConfigToVertex(apiClient, fromObject, parentObject) { ++function generateContentConfigToMldev(apiClient, fromObject, parentObject) { + const toObject = {}; + const fromSystemInstruction = getValueByPath(fromObject, [ + 'systemInstruction', + ]); + if (parentObject !== undefined && fromSystemInstruction != null) { +- setValueByPath(parentObject, ['systemInstruction'], contentToVertex(apiClient, tContent(apiClient, fromSystemInstruction))); ++ setValueByPath(parentObject, ['systemInstruction'], contentToMldev(apiClient, tContent(apiClient, fromSystemInstruction))); + } + const fromTemperature = getValueByPath(fromObject, ['temperature']); + if (fromTemperature != null) { +@@ -5084,13 +5609,13 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + 'responseSchema', + ]); + if (fromResponseSchema != null) { +- setValueByPath(toObject, ['responseSchema'], schemaToVertex(apiClient, tSchema(apiClient, fromResponseSchema))); ++ setValueByPath(toObject, ['responseSchema'], schemaToMldev(apiClient, tSchema(apiClient, fromResponseSchema))); + } +- const fromRoutingConfig = getValueByPath(fromObject, [ +- 'routingConfig', +- ]); +- if (fromRoutingConfig != null) { +- setValueByPath(toObject, ['routingConfig'], fromRoutingConfig); ++ if (getValueByPath(fromObject, ['routingConfig']) !== undefined) { ++ throw new Error('routingConfig parameter is not supported in Gemini API.'); ++ } ++ if (getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined) { ++ throw new Error('modelSelectionConfig parameter is not supported in Gemini API.'); + } + const fromSafetySettings = getValueByPath(fromObject, [ + 'safetySettings', +@@ -5098,7 +5623,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromSafetySettings != null) { + if (Array.isArray(fromSafetySettings)) { + setValueByPath(parentObject, ['safetySettings'], fromSafetySettings.map((item) => { +- return safetySettingToVertex(apiClient, item); ++ return safetySettingToMldev(apiClient, item); + })); + } + else { +@@ -5109,7 +5634,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromTools != null) { + if (Array.isArray(fromTools)) { + setValueByPath(parentObject, ['tools'], tTools(apiClient, tTools(apiClient, fromTools).map((item) => { +- return toolToVertex(apiClient, tTool(apiClient, item)); ++ return toolToMldev(apiClient, tTool(apiClient, item)); + }))); + } + else { +@@ -5118,11 +5643,10 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + } + const fromToolConfig = getValueByPath(fromObject, ['toolConfig']); + if (parentObject !== undefined && fromToolConfig != null) { +- setValueByPath(parentObject, ['toolConfig'], toolConfigToVertex(apiClient, fromToolConfig)); ++ setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev(apiClient, fromToolConfig)); + } +- const fromLabels = getValueByPath(fromObject, ['labels']); +- if (parentObject !== undefined && fromLabels != null) { +- setValueByPath(parentObject, ['labels'], fromLabels); ++ if (getValueByPath(fromObject, ['labels']) !== undefined) { ++ throw new Error('labels parameter is not supported in Gemini API.'); + } + const fromCachedContent = getValueByPath(fromObject, [ + 'cachedContent', +@@ -5144,23 +5668,20 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + } + const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); + if (fromSpeechConfig != null) { +- setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(apiClient, tSpeechConfig(apiClient, fromSpeechConfig))); ++ setValueByPath(toObject, ['speechConfig'], speechConfigToMldev(apiClient, tSpeechConfig(apiClient, fromSpeechConfig))); + } +- const fromAudioTimestamp = getValueByPath(fromObject, [ +- 'audioTimestamp', +- ]); +- if (fromAudioTimestamp != null) { +- setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp); ++ if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) { ++ throw new Error('audioTimestamp parameter is not supported in Gemini API.'); + } + const fromThinkingConfig = getValueByPath(fromObject, [ + 'thinkingConfig', + ]); + if (fromThinkingConfig != null) { +- setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToVertex(apiClient, fromThinkingConfig)); ++ setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev(apiClient, fromThinkingConfig)); + } + return toObject; + } +-function generateContentParametersToVertex(apiClient, fromObject) { ++function generateContentParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -5170,7 +5691,7 @@ function generateContentParametersToVertex(apiClient, fromObject) { + if (fromContents != null) { + if (Array.isArray(fromContents)) { + setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToVertex(apiClient, item); ++ return contentToMldev(apiClient, item); + }))); + } + else { +@@ -5179,37 +5700,35 @@ function generateContentParametersToVertex(apiClient, fromObject) { + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['generationConfig'], generateContentConfigToVertex(apiClient, fromConfig, toObject)); ++ setValueByPath(toObject, ['generationConfig'], generateContentConfigToMldev(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function embedContentConfigToVertex(apiClient, fromObject, parentObject) { ++function embedContentConfigToMldev(apiClient, fromObject, parentObject) { + const toObject = {}; + const fromTaskType = getValueByPath(fromObject, ['taskType']); + if (parentObject !== undefined && fromTaskType != null) { +- setValueByPath(parentObject, ['instances[]', 'task_type'], fromTaskType); ++ setValueByPath(parentObject, ['requests[]', 'taskType'], fromTaskType); + } + const fromTitle = getValueByPath(fromObject, ['title']); + if (parentObject !== undefined && fromTitle != null) { +- setValueByPath(parentObject, ['instances[]', 'title'], fromTitle); ++ setValueByPath(parentObject, ['requests[]', 'title'], fromTitle); + } + const fromOutputDimensionality = getValueByPath(fromObject, [ + 'outputDimensionality', + ]); + if (parentObject !== undefined && fromOutputDimensionality != null) { +- setValueByPath(parentObject, ['parameters', 'outputDimensionality'], fromOutputDimensionality); ++ setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality); + } +- const fromMimeType = getValueByPath(fromObject, ['mimeType']); +- if (parentObject !== undefined && fromMimeType != null) { +- setValueByPath(parentObject, ['instances[]', 'mimeType'], fromMimeType); ++ if (getValueByPath(fromObject, ['mimeType']) !== undefined) { ++ throw new Error('mimeType parameter is not supported in Gemini API.'); + } +- const fromAutoTruncate = getValueByPath(fromObject, ['autoTruncate']); +- if (parentObject !== undefined && fromAutoTruncate != null) { +- setValueByPath(parentObject, ['parameters', 'autoTruncate'], fromAutoTruncate); ++ if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) { ++ throw new Error('autoTruncate parameter is not supported in Gemini API.'); + } + return toObject; + } +-function embedContentParametersToVertex(apiClient, fromObject) { ++function embedContentParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -5217,25 +5736,25 @@ function embedContentParametersToVertex(apiClient, fromObject) { + } + const fromContents = getValueByPath(fromObject, ['contents']); + if (fromContents != null) { +- setValueByPath(toObject, ['instances[]', 'content'], tContentsForEmbed(apiClient, fromContents)); ++ setValueByPath(toObject, ['requests[]', 'content'], tContentsForEmbed(apiClient, fromContents)); + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['config'], embedContentConfigToVertex(apiClient, fromConfig, toObject)); ++ setValueByPath(toObject, ['config'], embedContentConfigToMldev(apiClient, fromConfig, toObject)); ++ } ++ const fromModelForEmbedContent = getValueByPath(fromObject, ['model']); ++ if (fromModelForEmbedContent !== undefined) { ++ setValueByPath(toObject, ['requests[]', 'model'], tModel(apiClient, fromModelForEmbedContent)); + } + return toObject; + } +-function generateImagesConfigToVertex(apiClient, fromObject, parentObject) { ++function generateImagesConfigToMldev(apiClient, fromObject, parentObject) { + const toObject = {}; +- const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']); +- if (parentObject !== undefined && fromOutputGcsUri != null) { +- setValueByPath(parentObject, ['parameters', 'storageUri'], fromOutputGcsUri); ++ if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) { ++ throw new Error('outputGcsUri parameter is not supported in Gemini API.'); + } +- const fromNegativePrompt = getValueByPath(fromObject, [ +- 'negativePrompt', +- ]); +- if (parentObject !== undefined && fromNegativePrompt != null) { +- setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt); ++ if (getValueByPath(fromObject, ['negativePrompt']) !== undefined) { ++ throw new Error('negativePrompt parameter is not supported in Gemini API.'); + } + const fromNumberOfImages = getValueByPath(fromObject, [ + 'numberOfImages', +@@ -5253,9 +5772,8 @@ function generateImagesConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromGuidanceScale != null) { + setValueByPath(parentObject, ['parameters', 'guidanceScale'], fromGuidanceScale); + } +- const fromSeed = getValueByPath(fromObject, ['seed']); +- if (parentObject !== undefined && fromSeed != null) { +- setValueByPath(parentObject, ['parameters', 'seed'], fromSeed); ++ if (getValueByPath(fromObject, ['seed']) !== undefined) { ++ throw new Error('seed parameter is not supported in Gemini API.'); + } + const fromSafetyFilterLevel = getValueByPath(fromObject, [ + 'safetyFilterLevel', +@@ -5297,19 +5815,15 @@ function generateImagesConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromOutputCompressionQuality != null) { + setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality); + } +- const fromAddWatermark = getValueByPath(fromObject, ['addWatermark']); +- if (parentObject !== undefined && fromAddWatermark != null) { +- setValueByPath(parentObject, ['parameters', 'addWatermark'], fromAddWatermark); ++ if (getValueByPath(fromObject, ['addWatermark']) !== undefined) { ++ throw new Error('addWatermark parameter is not supported in Gemini API.'); + } +- const fromEnhancePrompt = getValueByPath(fromObject, [ +- 'enhancePrompt', +- ]); +- if (parentObject !== undefined && fromEnhancePrompt != null) { +- setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt); ++ if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) { ++ throw new Error('enhancePrompt parameter is not supported in Gemini API.'); + } + return toObject; + } +-function generateImagesParametersToVertex(apiClient, fromObject) { ++function generateImagesParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -5321,11 +5835,11 @@ function generateImagesParametersToVertex(apiClient, fromObject) { + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['config'], generateImagesConfigToVertex(apiClient, fromConfig, toObject)); ++ setValueByPath(toObject, ['config'], generateImagesConfigToMldev(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function getModelParametersToVertex(apiClient, fromObject) { ++function getModelParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -5337,57 +5851,20 @@ function getModelParametersToVertex(apiClient, fromObject) { + } + return toObject; + } +-function countTokensConfigToVertex(apiClient, fromObject, parentObject) { +- const toObject = {}; +- const fromSystemInstruction = getValueByPath(fromObject, [ +- 'systemInstruction', +- ]); +- if (parentObject !== undefined && fromSystemInstruction != null) { +- setValueByPath(parentObject, ['systemInstruction'], contentToVertex(apiClient, tContent(apiClient, fromSystemInstruction))); +- } +- const fromTools = getValueByPath(fromObject, ['tools']); +- if (parentObject !== undefined && fromTools != null) { +- if (Array.isArray(fromTools)) { +- setValueByPath(parentObject, ['tools'], fromTools.map((item) => { +- return toolToVertex(apiClient, item); +- })); +- } +- else { +- setValueByPath(parentObject, ['tools'], fromTools); +- } +- } +- const fromGenerationConfig = getValueByPath(fromObject, [ +- 'generationConfig', +- ]); +- if (parentObject !== undefined && fromGenerationConfig != null) { +- setValueByPath(parentObject, ['generationConfig'], fromGenerationConfig); +- } +- return toObject; +-} +-function countTokensParametersToVertex(apiClient, fromObject) { ++function countTokensConfigToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); +- } +- const fromContents = getValueByPath(fromObject, ['contents']); +- if (fromContents != null) { +- if (Array.isArray(fromContents)) { +- setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToVertex(apiClient, item); +- }))); +- } +- else { +- setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); +- } ++ if (getValueByPath(fromObject, ['systemInstruction']) !== undefined) { ++ throw new Error('systemInstruction parameter is not supported in Gemini API.'); + } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['config'], countTokensConfigToVertex(apiClient, fromConfig, toObject)); ++ if (getValueByPath(fromObject, ['tools']) !== undefined) { ++ throw new Error('tools parameter is not supported in Gemini API.'); ++ } ++ if (getValueByPath(fromObject, ['generationConfig']) !== undefined) { ++ throw new Error('generationConfig parameter is not supported in Gemini API.'); + } + return toObject; + } +-function computeTokensParametersToVertex(apiClient, fromObject) { ++function countTokensParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -5397,7 +5874,7 @@ function computeTokensParametersToVertex(apiClient, fromObject) { + if (fromContents != null) { + if (Array.isArray(fromContents)) { + setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToVertex(apiClient, item); ++ return contentToMldev(apiClient, item); + }))); + } + else { +@@ -5406,15 +5883,14 @@ function computeTokensParametersToVertex(apiClient, fromObject) { + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['config'], fromConfig); ++ setValueByPath(toObject, ['config'], countTokensConfigToMldev(apiClient, fromConfig)); + } + return toObject; + } +-function imageToVertex(apiClient, fromObject) { ++function imageToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromGcsUri = getValueByPath(fromObject, ['gcsUri']); +- if (fromGcsUri != null) { +- setValueByPath(toObject, ['gcsUri'], fromGcsUri); ++ if (getValueByPath(fromObject, ['gcsUri']) !== undefined) { ++ throw new Error('gcsUri parameter is not supported in Gemini API.'); + } + const fromImageBytes = getValueByPath(fromObject, ['imageBytes']); + if (fromImageBytes != null) { +@@ -5426,7 +5902,7 @@ function imageToVertex(apiClient, fromObject) { + } + return toObject; + } +-function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { ++function generateVideosConfigToMldev(apiClient, fromObject, parentObject) { + const toObject = {}; + const fromNumberOfVideos = getValueByPath(fromObject, [ + 'numberOfVideos', +@@ -5434,13 +5910,11 @@ function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromNumberOfVideos != null) { + setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfVideos); + } +- const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']); +- if (parentObject !== undefined && fromOutputGcsUri != null) { +- setValueByPath(parentObject, ['parameters', 'storageUri'], fromOutputGcsUri); ++ if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) { ++ throw new Error('outputGcsUri parameter is not supported in Gemini API.'); + } +- const fromFps = getValueByPath(fromObject, ['fps']); +- if (parentObject !== undefined && fromFps != null) { +- setValueByPath(parentObject, ['parameters', 'fps'], fromFps); ++ if (getValueByPath(fromObject, ['fps']) !== undefined) { ++ throw new Error('fps parameter is not supported in Gemini API.'); + } + const fromDurationSeconds = getValueByPath(fromObject, [ + 'durationSeconds', +@@ -5448,17 +5922,15 @@ function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromDurationSeconds != null) { + setValueByPath(parentObject, ['parameters', 'durationSeconds'], fromDurationSeconds); + } +- const fromSeed = getValueByPath(fromObject, ['seed']); +- if (parentObject !== undefined && fromSeed != null) { +- setValueByPath(parentObject, ['parameters', 'seed'], fromSeed); ++ if (getValueByPath(fromObject, ['seed']) !== undefined) { ++ throw new Error('seed parameter is not supported in Gemini API.'); + } + const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']); + if (parentObject !== undefined && fromAspectRatio != null) { + setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio); + } +- const fromResolution = getValueByPath(fromObject, ['resolution']); +- if (parentObject !== undefined && fromResolution != null) { +- setValueByPath(parentObject, ['parameters', 'resolution'], fromResolution); ++ if (getValueByPath(fromObject, ['resolution']) !== undefined) { ++ throw new Error('resolution parameter is not supported in Gemini API.'); + } + const fromPersonGeneration = getValueByPath(fromObject, [ + 'personGeneration', +@@ -5466,9 +5938,8 @@ function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromPersonGeneration != null) { + setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration); + } +- const fromPubsubTopic = getValueByPath(fromObject, ['pubsubTopic']); +- if (parentObject !== undefined && fromPubsubTopic != null) { +- setValueByPath(parentObject, ['parameters', 'pubsubTopic'], fromPubsubTopic); ++ if (getValueByPath(fromObject, ['pubsubTopic']) !== undefined) { ++ throw new Error('pubsubTopic parameter is not supported in Gemini API.'); + } + const fromNegativePrompt = getValueByPath(fromObject, [ + 'negativePrompt', +@@ -5476,15 +5947,12 @@ function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromNegativePrompt != null) { + setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt); + } +- const fromEnhancePrompt = getValueByPath(fromObject, [ +- 'enhancePrompt', +- ]); +- if (parentObject !== undefined && fromEnhancePrompt != null) { +- setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt); ++ if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) { ++ throw new Error('enhancePrompt parameter is not supported in Gemini API.'); + } + return toObject; + } +-function generateVideosParametersToVertex(apiClient, fromObject) { ++function generateVideosParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -5496,16 +5964,22 @@ function generateVideosParametersToVertex(apiClient, fromObject) { + } + const fromImage = getValueByPath(fromObject, ['image']); + if (fromImage != null) { +- setValueByPath(toObject, ['instances[0]', 'image'], imageToVertex(apiClient, fromImage)); ++ setValueByPath(toObject, ['instances[0]', 'image'], imageToMldev(apiClient, fromImage)); + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['config'], generateVideosConfigToVertex(apiClient, fromConfig, toObject)); ++ setValueByPath(toObject, ['config'], generateVideosConfigToMldev(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function partFromMldev(apiClient, fromObject) { ++function partToVertex(apiClient, fromObject) { + const toObject = {}; ++ const fromVideoMetadata = getValueByPath(fromObject, [ ++ 'videoMetadata', ++ ]); ++ if (fromVideoMetadata != null) { ++ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); ++ } + const fromThought = getValueByPath(fromObject, ['thought']); + if (fromThought != null) { + setValueByPath(toObject, ['thought'], fromThought); +@@ -5546,13 +6020,13 @@ function partFromMldev(apiClient, fromObject) { + } + return toObject; + } +-function contentFromMldev(apiClient, fromObject) { ++function contentToVertex(apiClient, fromObject) { + const toObject = {}; + const fromParts = getValueByPath(fromObject, ['parts']); + if (fromParts != null) { + if (Array.isArray(fromParts)) { + setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partFromMldev(apiClient, item); ++ return partToVertex(apiClient, item); + })); + } + else { +@@ -5565,1628 +6039,1663 @@ function contentFromMldev(apiClient, fromObject) { + } + return toObject; + } +-function citationMetadataFromMldev(apiClient, fromObject) { ++function schemaToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromCitations = getValueByPath(fromObject, ['citationSources']); +- if (fromCitations != null) { +- setValueByPath(toObject, ['citations'], fromCitations); ++ const fromExample = getValueByPath(fromObject, ['example']); ++ if (fromExample != null) { ++ setValueByPath(toObject, ['example'], fromExample); + } +- return toObject; +-} +-function candidateFromMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromContent = getValueByPath(fromObject, ['content']); +- if (fromContent != null) { +- setValueByPath(toObject, ['content'], contentFromMldev(apiClient, fromContent)); ++ const fromPattern = getValueByPath(fromObject, ['pattern']); ++ if (fromPattern != null) { ++ setValueByPath(toObject, ['pattern'], fromPattern); + } +- const fromCitationMetadata = getValueByPath(fromObject, [ +- 'citationMetadata', +- ]); +- if (fromCitationMetadata != null) { +- setValueByPath(toObject, ['citationMetadata'], citationMetadataFromMldev(apiClient, fromCitationMetadata)); ++ const fromDefault = getValueByPath(fromObject, ['default']); ++ if (fromDefault != null) { ++ setValueByPath(toObject, ['default'], fromDefault); + } +- const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); +- if (fromTokenCount != null) { +- setValueByPath(toObject, ['tokenCount'], fromTokenCount); ++ const fromMaxLength = getValueByPath(fromObject, ['maxLength']); ++ if (fromMaxLength != null) { ++ setValueByPath(toObject, ['maxLength'], fromMaxLength); + } +- const fromFinishReason = getValueByPath(fromObject, ['finishReason']); +- if (fromFinishReason != null) { +- setValueByPath(toObject, ['finishReason'], fromFinishReason); ++ const fromMinLength = getValueByPath(fromObject, ['minLength']); ++ if (fromMinLength != null) { ++ setValueByPath(toObject, ['minLength'], fromMinLength); + } +- const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']); +- if (fromAvgLogprobs != null) { +- setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs); ++ const fromMinProperties = getValueByPath(fromObject, [ ++ 'minProperties', ++ ]); ++ if (fromMinProperties != null) { ++ setValueByPath(toObject, ['minProperties'], fromMinProperties); + } +- const fromGroundingMetadata = getValueByPath(fromObject, [ +- 'groundingMetadata', ++ const fromMaxProperties = getValueByPath(fromObject, [ ++ 'maxProperties', + ]); +- if (fromGroundingMetadata != null) { +- setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata); ++ if (fromMaxProperties != null) { ++ setValueByPath(toObject, ['maxProperties'], fromMaxProperties); + } +- const fromIndex = getValueByPath(fromObject, ['index']); +- if (fromIndex != null) { +- setValueByPath(toObject, ['index'], fromIndex); ++ const fromAnyOf = getValueByPath(fromObject, ['anyOf']); ++ if (fromAnyOf != null) { ++ setValueByPath(toObject, ['anyOf'], fromAnyOf); + } +- const fromLogprobsResult = getValueByPath(fromObject, [ +- 'logprobsResult', +- ]); +- if (fromLogprobsResult != null) { +- setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult); ++ const fromDescription = getValueByPath(fromObject, ['description']); ++ if (fromDescription != null) { ++ setValueByPath(toObject, ['description'], fromDescription); + } +- const fromSafetyRatings = getValueByPath(fromObject, [ +- 'safetyRatings', +- ]); +- if (fromSafetyRatings != null) { +- setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings); ++ const fromEnum = getValueByPath(fromObject, ['enum']); ++ if (fromEnum != null) { ++ setValueByPath(toObject, ['enum'], fromEnum); + } +- return toObject; +-} +-function generateContentResponseFromMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromCandidates = getValueByPath(fromObject, ['candidates']); +- if (fromCandidates != null) { +- if (Array.isArray(fromCandidates)) { +- setValueByPath(toObject, ['candidates'], fromCandidates.map((item) => { +- return candidateFromMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['candidates'], fromCandidates); +- } ++ const fromFormat = getValueByPath(fromObject, ['format']); ++ if (fromFormat != null) { ++ setValueByPath(toObject, ['format'], fromFormat); + } +- const fromModelVersion = getValueByPath(fromObject, ['modelVersion']); +- if (fromModelVersion != null) { +- setValueByPath(toObject, ['modelVersion'], fromModelVersion); ++ const fromItems = getValueByPath(fromObject, ['items']); ++ if (fromItems != null) { ++ setValueByPath(toObject, ['items'], fromItems); + } +- const fromPromptFeedback = getValueByPath(fromObject, [ +- 'promptFeedback', +- ]); +- if (fromPromptFeedback != null) { +- setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback); ++ const fromMaxItems = getValueByPath(fromObject, ['maxItems']); ++ if (fromMaxItems != null) { ++ setValueByPath(toObject, ['maxItems'], fromMaxItems); + } +- const fromUsageMetadata = getValueByPath(fromObject, [ +- 'usageMetadata', ++ const fromMaximum = getValueByPath(fromObject, ['maximum']); ++ if (fromMaximum != null) { ++ setValueByPath(toObject, ['maximum'], fromMaximum); ++ } ++ const fromMinItems = getValueByPath(fromObject, ['minItems']); ++ if (fromMinItems != null) { ++ setValueByPath(toObject, ['minItems'], fromMinItems); ++ } ++ const fromMinimum = getValueByPath(fromObject, ['minimum']); ++ if (fromMinimum != null) { ++ setValueByPath(toObject, ['minimum'], fromMinimum); ++ } ++ const fromNullable = getValueByPath(fromObject, ['nullable']); ++ if (fromNullable != null) { ++ setValueByPath(toObject, ['nullable'], fromNullable); ++ } ++ const fromProperties = getValueByPath(fromObject, ['properties']); ++ if (fromProperties != null) { ++ setValueByPath(toObject, ['properties'], fromProperties); ++ } ++ const fromPropertyOrdering = getValueByPath(fromObject, [ ++ 'propertyOrdering', + ]); +- if (fromUsageMetadata != null) { +- setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata); ++ if (fromPropertyOrdering != null) { ++ setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering); ++ } ++ const fromRequired = getValueByPath(fromObject, ['required']); ++ if (fromRequired != null) { ++ setValueByPath(toObject, ['required'], fromRequired); ++ } ++ const fromTitle = getValueByPath(fromObject, ['title']); ++ if (fromTitle != null) { ++ setValueByPath(toObject, ['title'], fromTitle); ++ } ++ const fromType = getValueByPath(fromObject, ['type']); ++ if (fromType != null) { ++ setValueByPath(toObject, ['type'], fromType); + } + return toObject; + } +-function contentEmbeddingFromMldev(apiClient, fromObject) { ++function modelSelectionConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromValues = getValueByPath(fromObject, ['values']); +- if (fromValues != null) { +- setValueByPath(toObject, ['values'], fromValues); ++ const fromFeatureSelectionPreference = getValueByPath(fromObject, [ ++ 'featureSelectionPreference', ++ ]); ++ if (fromFeatureSelectionPreference != null) { ++ setValueByPath(toObject, ['featureSelectionPreference'], fromFeatureSelectionPreference); + } + return toObject; + } +-function embedContentMetadataFromMldev() { ++function safetySettingToVertex(apiClient, fromObject) { + const toObject = {}; ++ const fromMethod = getValueByPath(fromObject, ['method']); ++ if (fromMethod != null) { ++ setValueByPath(toObject, ['method'], fromMethod); ++ } ++ const fromCategory = getValueByPath(fromObject, ['category']); ++ if (fromCategory != null) { ++ setValueByPath(toObject, ['category'], fromCategory); ++ } ++ const fromThreshold = getValueByPath(fromObject, ['threshold']); ++ if (fromThreshold != null) { ++ setValueByPath(toObject, ['threshold'], fromThreshold); ++ } + return toObject; + } +-function embedContentResponseFromMldev(apiClient, fromObject) { ++function functionDeclarationToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromEmbeddings = getValueByPath(fromObject, ['embeddings']); +- if (fromEmbeddings != null) { +- if (Array.isArray(fromEmbeddings)) { +- setValueByPath(toObject, ['embeddings'], fromEmbeddings.map((item) => { +- return contentEmbeddingFromMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['embeddings'], fromEmbeddings); +- } ++ const fromResponse = getValueByPath(fromObject, ['response']); ++ if (fromResponse != null) { ++ setValueByPath(toObject, ['response'], schemaToVertex(apiClient, fromResponse)); + } +- const fromMetadata = getValueByPath(fromObject, ['metadata']); +- if (fromMetadata != null) { +- setValueByPath(toObject, ['metadata'], embedContentMetadataFromMldev()); ++ const fromDescription = getValueByPath(fromObject, ['description']); ++ if (fromDescription != null) { ++ setValueByPath(toObject, ['description'], fromDescription); ++ } ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); ++ } ++ const fromParameters = getValueByPath(fromObject, ['parameters']); ++ if (fromParameters != null) { ++ setValueByPath(toObject, ['parameters'], fromParameters); + } + return toObject; + } +-function imageFromMldev(apiClient, fromObject) { ++function googleSearchToVertex() { + const toObject = {}; +- const fromImageBytes = getValueByPath(fromObject, [ +- 'bytesBase64Encoded', +- ]); +- if (fromImageBytes != null) { +- setValueByPath(toObject, ['imageBytes'], tBytes(apiClient, fromImageBytes)); +- } +- const fromMimeType = getValueByPath(fromObject, ['mimeType']); +- if (fromMimeType != null) { +- setValueByPath(toObject, ['mimeType'], fromMimeType); +- } + return toObject; + } +-function safetyAttributesFromMldev(apiClient, fromObject) { ++function dynamicRetrievalConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromCategories = getValueByPath(fromObject, [ +- 'safetyAttributes', +- 'categories', +- ]); +- if (fromCategories != null) { +- setValueByPath(toObject, ['categories'], fromCategories); ++ const fromMode = getValueByPath(fromObject, ['mode']); ++ if (fromMode != null) { ++ setValueByPath(toObject, ['mode'], fromMode); + } +- const fromScores = getValueByPath(fromObject, [ +- 'safetyAttributes', +- 'scores', ++ const fromDynamicThreshold = getValueByPath(fromObject, [ ++ 'dynamicThreshold', + ]); +- if (fromScores != null) { +- setValueByPath(toObject, ['scores'], fromScores); +- } +- const fromContentType = getValueByPath(fromObject, ['contentType']); +- if (fromContentType != null) { +- setValueByPath(toObject, ['contentType'], fromContentType); ++ if (fromDynamicThreshold != null) { ++ setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold); + } + return toObject; + } +-function generatedImageFromMldev(apiClient, fromObject) { ++function googleSearchRetrievalToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromImage = getValueByPath(fromObject, ['_self']); +- if (fromImage != null) { +- setValueByPath(toObject, ['image'], imageFromMldev(apiClient, fromImage)); +- } +- const fromRaiFilteredReason = getValueByPath(fromObject, [ +- 'raiFilteredReason', ++ const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ ++ 'dynamicRetrievalConfig', + ]); +- if (fromRaiFilteredReason != null) { +- setValueByPath(toObject, ['raiFilteredReason'], fromRaiFilteredReason); +- } +- const fromSafetyAttributes = getValueByPath(fromObject, ['_self']); +- if (fromSafetyAttributes != null) { +- setValueByPath(toObject, ['safetyAttributes'], safetyAttributesFromMldev(apiClient, fromSafetyAttributes)); ++ if (fromDynamicRetrievalConfig != null) { ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig)); + } + return toObject; + } +-function generateImagesResponseFromMldev(apiClient, fromObject) { ++function toolToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromGeneratedImages = getValueByPath(fromObject, [ +- 'predictions', ++ const fromFunctionDeclarations = getValueByPath(fromObject, [ ++ 'functionDeclarations', + ]); +- if (fromGeneratedImages != null) { +- if (Array.isArray(fromGeneratedImages)) { +- setValueByPath(toObject, ['generatedImages'], fromGeneratedImages.map((item) => { +- return generatedImageFromMldev(apiClient, item); ++ if (fromFunctionDeclarations != null) { ++ if (Array.isArray(fromFunctionDeclarations)) { ++ setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { ++ return functionDeclarationToVertex(apiClient, item); + })); + } + else { +- setValueByPath(toObject, ['generatedImages'], fromGeneratedImages); ++ setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations); + } + } +- const fromPositivePromptSafetyAttributes = getValueByPath(fromObject, [ +- 'positivePromptSafetyAttributes', +- ]); +- if (fromPositivePromptSafetyAttributes != null) { +- setValueByPath(toObject, ['positivePromptSafetyAttributes'], safetyAttributesFromMldev(apiClient, fromPositivePromptSafetyAttributes)); ++ const fromRetrieval = getValueByPath(fromObject, ['retrieval']); ++ if (fromRetrieval != null) { ++ setValueByPath(toObject, ['retrieval'], fromRetrieval); + } +- return toObject; +-} +-function tunedModelInfoFromMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromBaseModel = getValueByPath(fromObject, ['baseModel']); +- if (fromBaseModel != null) { +- setValueByPath(toObject, ['baseModel'], fromBaseModel); ++ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); ++ if (fromGoogleSearch != null) { ++ setValueByPath(toObject, ['googleSearch'], googleSearchToVertex()); + } +- const fromCreateTime = getValueByPath(fromObject, ['createTime']); +- if (fromCreateTime != null) { +- setValueByPath(toObject, ['createTime'], fromCreateTime); ++ const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ ++ 'googleSearchRetrieval', ++ ]); ++ if (fromGoogleSearchRetrieval != null) { ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval)); + } +- const fromUpdateTime = getValueByPath(fromObject, ['updateTime']); +- if (fromUpdateTime != null) { +- setValueByPath(toObject, ['updateTime'], fromUpdateTime); ++ const fromCodeExecution = getValueByPath(fromObject, [ ++ 'codeExecution', ++ ]); ++ if (fromCodeExecution != null) { ++ setValueByPath(toObject, ['codeExecution'], fromCodeExecution); + } + return toObject; + } +-function modelFromMldev(apiClient, fromObject) { ++function functionCallingConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName != null) { +- setValueByPath(toObject, ['name'], fromName); +- } +- const fromDisplayName = getValueByPath(fromObject, ['displayName']); +- if (fromDisplayName != null) { +- setValueByPath(toObject, ['displayName'], fromDisplayName); +- } +- const fromDescription = getValueByPath(fromObject, ['description']); +- if (fromDescription != null) { +- setValueByPath(toObject, ['description'], fromDescription); +- } +- const fromVersion = getValueByPath(fromObject, ['version']); +- if (fromVersion != null) { +- setValueByPath(toObject, ['version'], fromVersion); +- } +- const fromTunedModelInfo = getValueByPath(fromObject, ['_self']); +- if (fromTunedModelInfo != null) { +- setValueByPath(toObject, ['tunedModelInfo'], tunedModelInfoFromMldev(apiClient, fromTunedModelInfo)); +- } +- const fromInputTokenLimit = getValueByPath(fromObject, [ +- 'inputTokenLimit', +- ]); +- if (fromInputTokenLimit != null) { +- setValueByPath(toObject, ['inputTokenLimit'], fromInputTokenLimit); ++ const fromMode = getValueByPath(fromObject, ['mode']); ++ if (fromMode != null) { ++ setValueByPath(toObject, ['mode'], fromMode); + } +- const fromOutputTokenLimit = getValueByPath(fromObject, [ +- 'outputTokenLimit', ++ const fromAllowedFunctionNames = getValueByPath(fromObject, [ ++ 'allowedFunctionNames', + ]); +- if (fromOutputTokenLimit != null) { +- setValueByPath(toObject, ['outputTokenLimit'], fromOutputTokenLimit); ++ if (fromAllowedFunctionNames != null) { ++ setValueByPath(toObject, ['allowedFunctionNames'], fromAllowedFunctionNames); + } +- const fromSupportedActions = getValueByPath(fromObject, [ +- 'supportedGenerationMethods', ++ return toObject; ++} ++function toolConfigToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromFunctionCallingConfig = getValueByPath(fromObject, [ ++ 'functionCallingConfig', + ]); +- if (fromSupportedActions != null) { +- setValueByPath(toObject, ['supportedActions'], fromSupportedActions); ++ if (fromFunctionCallingConfig != null) { ++ setValueByPath(toObject, ['functionCallingConfig'], functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig)); + } + return toObject; + } +-function countTokensResponseFromMldev(apiClient, fromObject) { ++function prebuiltVoiceConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromTotalTokens = getValueByPath(fromObject, ['totalTokens']); +- if (fromTotalTokens != null) { +- setValueByPath(toObject, ['totalTokens'], fromTotalTokens); ++ const fromVoiceName = getValueByPath(fromObject, ['voiceName']); ++ if (fromVoiceName != null) { ++ setValueByPath(toObject, ['voiceName'], fromVoiceName); + } +- const fromCachedContentTokenCount = getValueByPath(fromObject, [ +- 'cachedContentTokenCount', ++ return toObject; ++} ++function voiceConfigToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [ ++ 'prebuiltVoiceConfig', + ]); +- if (fromCachedContentTokenCount != null) { +- setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); ++ if (fromPrebuiltVoiceConfig != null) { ++ setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToVertex(apiClient, fromPrebuiltVoiceConfig)); + } + return toObject; + } +-function videoFromMldev$1(apiClient, fromObject) { ++function speechConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromUri = getValueByPath(fromObject, ['video', 'uri']); +- if (fromUri != null) { +- setValueByPath(toObject, ['uri'], fromUri); +- } +- const fromVideoBytes = getValueByPath(fromObject, [ +- 'video', +- 'encodedVideo', +- ]); +- if (fromVideoBytes != null) { +- setValueByPath(toObject, ['videoBytes'], tBytes(apiClient, fromVideoBytes)); ++ const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']); ++ if (fromVoiceConfig != null) { ++ setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(apiClient, fromVoiceConfig)); + } +- const fromMimeType = getValueByPath(fromObject, ['encoding']); +- if (fromMimeType != null) { +- setValueByPath(toObject, ['mimeType'], fromMimeType); ++ const fromLanguageCode = getValueByPath(fromObject, ['languageCode']); ++ if (fromLanguageCode != null) { ++ setValueByPath(toObject, ['languageCode'], fromLanguageCode); + } + return toObject; + } +-function generatedVideoFromMldev$1(apiClient, fromObject) { ++function thinkingConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromVideo = getValueByPath(fromObject, ['_self']); +- if (fromVideo != null) { +- setValueByPath(toObject, ['video'], videoFromMldev$1(apiClient, fromVideo)); ++ const fromIncludeThoughts = getValueByPath(fromObject, [ ++ 'includeThoughts', ++ ]); ++ if (fromIncludeThoughts != null) { ++ setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts); ++ } ++ const fromThinkingBudget = getValueByPath(fromObject, [ ++ 'thinkingBudget', ++ ]); ++ if (fromThinkingBudget != null) { ++ setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget); + } + return toObject; + } +-function generateVideosResponseFromMldev$1(apiClient, fromObject) { ++function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + const toObject = {}; +- const fromGeneratedVideos = getValueByPath(fromObject, [ +- 'generatedSamples', ++ const fromSystemInstruction = getValueByPath(fromObject, [ ++ 'systemInstruction', ++ ]); ++ if (parentObject !== undefined && fromSystemInstruction != null) { ++ setValueByPath(parentObject, ['systemInstruction'], contentToVertex(apiClient, tContent(apiClient, fromSystemInstruction))); ++ } ++ const fromTemperature = getValueByPath(fromObject, ['temperature']); ++ if (fromTemperature != null) { ++ setValueByPath(toObject, ['temperature'], fromTemperature); ++ } ++ const fromTopP = getValueByPath(fromObject, ['topP']); ++ if (fromTopP != null) { ++ setValueByPath(toObject, ['topP'], fromTopP); ++ } ++ const fromTopK = getValueByPath(fromObject, ['topK']); ++ if (fromTopK != null) { ++ setValueByPath(toObject, ['topK'], fromTopK); ++ } ++ const fromCandidateCount = getValueByPath(fromObject, [ ++ 'candidateCount', ++ ]); ++ if (fromCandidateCount != null) { ++ setValueByPath(toObject, ['candidateCount'], fromCandidateCount); ++ } ++ const fromMaxOutputTokens = getValueByPath(fromObject, [ ++ 'maxOutputTokens', ++ ]); ++ if (fromMaxOutputTokens != null) { ++ setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens); ++ } ++ const fromStopSequences = getValueByPath(fromObject, [ ++ 'stopSequences', + ]); +- if (fromGeneratedVideos != null) { +- if (Array.isArray(fromGeneratedVideos)) { +- setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos.map((item) => { +- return generatedVideoFromMldev$1(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos); +- } ++ if (fromStopSequences != null) { ++ setValueByPath(toObject, ['stopSequences'], fromStopSequences); + } +- const fromRaiMediaFilteredCount = getValueByPath(fromObject, [ +- 'raiMediaFilteredCount', ++ const fromResponseLogprobs = getValueByPath(fromObject, [ ++ 'responseLogprobs', + ]); +- if (fromRaiMediaFilteredCount != null) { +- setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount); ++ if (fromResponseLogprobs != null) { ++ setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs); + } +- const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [ +- 'raiMediaFilteredReasons', ++ const fromLogprobs = getValueByPath(fromObject, ['logprobs']); ++ if (fromLogprobs != null) { ++ setValueByPath(toObject, ['logprobs'], fromLogprobs); ++ } ++ const fromPresencePenalty = getValueByPath(fromObject, [ ++ 'presencePenalty', + ]); +- if (fromRaiMediaFilteredReasons != null) { +- setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons); ++ if (fromPresencePenalty != null) { ++ setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty); + } +- return toObject; +-} +-function generateVideosOperationFromMldev$1(apiClient, fromObject) { +- const toObject = {}; +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName != null) { +- setValueByPath(toObject, ['name'], fromName); ++ const fromFrequencyPenalty = getValueByPath(fromObject, [ ++ 'frequencyPenalty', ++ ]); ++ if (fromFrequencyPenalty != null) { ++ setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty); + } +- const fromMetadata = getValueByPath(fromObject, ['metadata']); +- if (fromMetadata != null) { +- setValueByPath(toObject, ['metadata'], fromMetadata); ++ const fromSeed = getValueByPath(fromObject, ['seed']); ++ if (fromSeed != null) { ++ setValueByPath(toObject, ['seed'], fromSeed); + } +- const fromDone = getValueByPath(fromObject, ['done']); +- if (fromDone != null) { +- setValueByPath(toObject, ['done'], fromDone); ++ const fromResponseMimeType = getValueByPath(fromObject, [ ++ 'responseMimeType', ++ ]); ++ if (fromResponseMimeType != null) { ++ setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType); + } +- const fromError = getValueByPath(fromObject, ['error']); +- if (fromError != null) { +- setValueByPath(toObject, ['error'], fromError); ++ const fromResponseSchema = getValueByPath(fromObject, [ ++ 'responseSchema', ++ ]); ++ if (fromResponseSchema != null) { ++ setValueByPath(toObject, ['responseSchema'], schemaToVertex(apiClient, tSchema(apiClient, fromResponseSchema))); + } +- const fromResponse = getValueByPath(fromObject, [ +- 'response', +- 'generateVideoResponse', ++ const fromRoutingConfig = getValueByPath(fromObject, [ ++ 'routingConfig', + ]); +- if (fromResponse != null) { +- setValueByPath(toObject, ['response'], generateVideosResponseFromMldev$1(apiClient, fromResponse)); ++ if (fromRoutingConfig != null) { ++ setValueByPath(toObject, ['routingConfig'], fromRoutingConfig); + } +- const fromResult = getValueByPath(fromObject, [ +- 'response', +- 'generateVideoResponse', ++ const fromModelSelectionConfig = getValueByPath(fromObject, [ ++ 'modelSelectionConfig', + ]); +- if (fromResult != null) { +- setValueByPath(toObject, ['result'], generateVideosResponseFromMldev$1(apiClient, fromResult)); ++ if (fromModelSelectionConfig != null) { ++ setValueByPath(toObject, ['modelConfig'], modelSelectionConfigToVertex(apiClient, fromModelSelectionConfig)); + } +- return toObject; +-} +-function partFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromVideoMetadata = getValueByPath(fromObject, [ +- 'videoMetadata', ++ const fromSafetySettings = getValueByPath(fromObject, [ ++ 'safetySettings', + ]); +- if (fromVideoMetadata != null) { +- setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); ++ if (parentObject !== undefined && fromSafetySettings != null) { ++ if (Array.isArray(fromSafetySettings)) { ++ setValueByPath(parentObject, ['safetySettings'], fromSafetySettings.map((item) => { ++ return safetySettingToVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(parentObject, ['safetySettings'], fromSafetySettings); ++ } + } +- const fromThought = getValueByPath(fromObject, ['thought']); +- if (fromThought != null) { +- setValueByPath(toObject, ['thought'], fromThought); ++ const fromTools = getValueByPath(fromObject, ['tools']); ++ if (parentObject !== undefined && fromTools != null) { ++ if (Array.isArray(fromTools)) { ++ setValueByPath(parentObject, ['tools'], tTools(apiClient, tTools(apiClient, fromTools).map((item) => { ++ return toolToVertex(apiClient, tTool(apiClient, item)); ++ }))); ++ } ++ else { ++ setValueByPath(parentObject, ['tools'], tTools(apiClient, fromTools)); ++ } + } +- const fromCodeExecutionResult = getValueByPath(fromObject, [ +- 'codeExecutionResult', ++ const fromToolConfig = getValueByPath(fromObject, ['toolConfig']); ++ if (parentObject !== undefined && fromToolConfig != null) { ++ setValueByPath(parentObject, ['toolConfig'], toolConfigToVertex(apiClient, fromToolConfig)); ++ } ++ const fromLabels = getValueByPath(fromObject, ['labels']); ++ if (parentObject !== undefined && fromLabels != null) { ++ setValueByPath(parentObject, ['labels'], fromLabels); ++ } ++ const fromCachedContent = getValueByPath(fromObject, [ ++ 'cachedContent', + ]); +- if (fromCodeExecutionResult != null) { +- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); ++ if (parentObject !== undefined && fromCachedContent != null) { ++ setValueByPath(parentObject, ['cachedContent'], tCachedContentName(apiClient, fromCachedContent)); + } +- const fromExecutableCode = getValueByPath(fromObject, [ +- 'executableCode', ++ const fromResponseModalities = getValueByPath(fromObject, [ ++ 'responseModalities', + ]); +- if (fromExecutableCode != null) { +- setValueByPath(toObject, ['executableCode'], fromExecutableCode); ++ if (fromResponseModalities != null) { ++ setValueByPath(toObject, ['responseModalities'], fromResponseModalities); + } +- const fromFileData = getValueByPath(fromObject, ['fileData']); +- if (fromFileData != null) { +- setValueByPath(toObject, ['fileData'], fromFileData); ++ const fromMediaResolution = getValueByPath(fromObject, [ ++ 'mediaResolution', ++ ]); ++ if (fromMediaResolution != null) { ++ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution); + } +- const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); +- if (fromFunctionCall != null) { +- setValueByPath(toObject, ['functionCall'], fromFunctionCall); ++ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); ++ if (fromSpeechConfig != null) { ++ setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(apiClient, tSpeechConfig(apiClient, fromSpeechConfig))); + } +- const fromFunctionResponse = getValueByPath(fromObject, [ +- 'functionResponse', ++ const fromAudioTimestamp = getValueByPath(fromObject, [ ++ 'audioTimestamp', + ]); +- if (fromFunctionResponse != null) { +- setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); +- } +- const fromInlineData = getValueByPath(fromObject, ['inlineData']); +- if (fromInlineData != null) { +- setValueByPath(toObject, ['inlineData'], fromInlineData); ++ if (fromAudioTimestamp != null) { ++ setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp); + } +- const fromText = getValueByPath(fromObject, ['text']); +- if (fromText != null) { +- setValueByPath(toObject, ['text'], fromText); ++ const fromThinkingConfig = getValueByPath(fromObject, [ ++ 'thinkingConfig', ++ ]); ++ if (fromThinkingConfig != null) { ++ setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToVertex(apiClient, fromThinkingConfig)); + } + return toObject; + } +-function contentFromVertex(apiClient, fromObject) { ++function generateContentParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromParts = getValueByPath(fromObject, ['parts']); +- if (fromParts != null) { +- if (Array.isArray(fromParts)) { +- setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partFromVertex(apiClient, item); +- })); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); ++ } ++ const fromContents = getValueByPath(fromObject, ['contents']); ++ if (fromContents != null) { ++ if (Array.isArray(fromContents)) { ++ setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { ++ return contentToVertex(apiClient, item); ++ }))); + } + else { +- setValueByPath(toObject, ['parts'], fromParts); ++ setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); + } + } +- const fromRole = getValueByPath(fromObject, ['role']); +- if (fromRole != null) { +- setValueByPath(toObject, ['role'], fromRole); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['generationConfig'], generateContentConfigToVertex(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function citationMetadataFromVertex(apiClient, fromObject) { ++function embedContentConfigToVertex(apiClient, fromObject, parentObject) { + const toObject = {}; +- const fromCitations = getValueByPath(fromObject, ['citations']); +- if (fromCitations != null) { +- setValueByPath(toObject, ['citations'], fromCitations); ++ const fromTaskType = getValueByPath(fromObject, ['taskType']); ++ if (parentObject !== undefined && fromTaskType != null) { ++ setValueByPath(parentObject, ['instances[]', 'task_type'], fromTaskType); ++ } ++ const fromTitle = getValueByPath(fromObject, ['title']); ++ if (parentObject !== undefined && fromTitle != null) { ++ setValueByPath(parentObject, ['instances[]', 'title'], fromTitle); ++ } ++ const fromOutputDimensionality = getValueByPath(fromObject, [ ++ 'outputDimensionality', ++ ]); ++ if (parentObject !== undefined && fromOutputDimensionality != null) { ++ setValueByPath(parentObject, ['parameters', 'outputDimensionality'], fromOutputDimensionality); ++ } ++ const fromMimeType = getValueByPath(fromObject, ['mimeType']); ++ if (parentObject !== undefined && fromMimeType != null) { ++ setValueByPath(parentObject, ['instances[]', 'mimeType'], fromMimeType); ++ } ++ const fromAutoTruncate = getValueByPath(fromObject, ['autoTruncate']); ++ if (parentObject !== undefined && fromAutoTruncate != null) { ++ setValueByPath(parentObject, ['parameters', 'autoTruncate'], fromAutoTruncate); + } + return toObject; + } +-function candidateFromVertex(apiClient, fromObject) { ++function embedContentParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromContent = getValueByPath(fromObject, ['content']); +- if (fromContent != null) { +- setValueByPath(toObject, ['content'], contentFromVertex(apiClient, fromContent)); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); + } +- const fromCitationMetadata = getValueByPath(fromObject, [ +- 'citationMetadata', +- ]); +- if (fromCitationMetadata != null) { +- setValueByPath(toObject, ['citationMetadata'], citationMetadataFromVertex(apiClient, fromCitationMetadata)); ++ const fromContents = getValueByPath(fromObject, ['contents']); ++ if (fromContents != null) { ++ setValueByPath(toObject, ['instances[]', 'content'], tContentsForEmbed(apiClient, fromContents)); + } +- const fromFinishMessage = getValueByPath(fromObject, [ +- 'finishMessage', ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], embedContentConfigToVertex(apiClient, fromConfig, toObject)); ++ } ++ return toObject; ++} ++function generateImagesConfigToVertex(apiClient, fromObject, parentObject) { ++ const toObject = {}; ++ const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']); ++ if (parentObject !== undefined && fromOutputGcsUri != null) { ++ setValueByPath(parentObject, ['parameters', 'storageUri'], fromOutputGcsUri); ++ } ++ const fromNegativePrompt = getValueByPath(fromObject, [ ++ 'negativePrompt', + ]); +- if (fromFinishMessage != null) { +- setValueByPath(toObject, ['finishMessage'], fromFinishMessage); ++ if (parentObject !== undefined && fromNegativePrompt != null) { ++ setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt); + } +- const fromFinishReason = getValueByPath(fromObject, ['finishReason']); +- if (fromFinishReason != null) { +- setValueByPath(toObject, ['finishReason'], fromFinishReason); ++ const fromNumberOfImages = getValueByPath(fromObject, [ ++ 'numberOfImages', ++ ]); ++ if (parentObject !== undefined && fromNumberOfImages != null) { ++ setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfImages); + } +- const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']); +- if (fromAvgLogprobs != null) { +- setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs); ++ const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']); ++ if (parentObject !== undefined && fromAspectRatio != null) { ++ setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio); + } +- const fromGroundingMetadata = getValueByPath(fromObject, [ +- 'groundingMetadata', ++ const fromGuidanceScale = getValueByPath(fromObject, [ ++ 'guidanceScale', + ]); +- if (fromGroundingMetadata != null) { +- setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata); ++ if (parentObject !== undefined && fromGuidanceScale != null) { ++ setValueByPath(parentObject, ['parameters', 'guidanceScale'], fromGuidanceScale); + } +- const fromIndex = getValueByPath(fromObject, ['index']); +- if (fromIndex != null) { +- setValueByPath(toObject, ['index'], fromIndex); ++ const fromSeed = getValueByPath(fromObject, ['seed']); ++ if (parentObject !== undefined && fromSeed != null) { ++ setValueByPath(parentObject, ['parameters', 'seed'], fromSeed); + } +- const fromLogprobsResult = getValueByPath(fromObject, [ +- 'logprobsResult', ++ const fromSafetyFilterLevel = getValueByPath(fromObject, [ ++ 'safetyFilterLevel', + ]); +- if (fromLogprobsResult != null) { +- setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult); ++ if (parentObject !== undefined && fromSafetyFilterLevel != null) { ++ setValueByPath(parentObject, ['parameters', 'safetySetting'], fromSafetyFilterLevel); + } +- const fromSafetyRatings = getValueByPath(fromObject, [ +- 'safetyRatings', ++ const fromPersonGeneration = getValueByPath(fromObject, [ ++ 'personGeneration', + ]); +- if (fromSafetyRatings != null) { +- setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings); ++ if (parentObject !== undefined && fromPersonGeneration != null) { ++ setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration); + } +- return toObject; +-} +-function generateContentResponseFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromCandidates = getValueByPath(fromObject, ['candidates']); +- if (fromCandidates != null) { +- if (Array.isArray(fromCandidates)) { +- setValueByPath(toObject, ['candidates'], fromCandidates.map((item) => { +- return candidateFromVertex(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['candidates'], fromCandidates); +- } ++ const fromIncludeSafetyAttributes = getValueByPath(fromObject, [ ++ 'includeSafetyAttributes', ++ ]); ++ if (parentObject !== undefined && fromIncludeSafetyAttributes != null) { ++ setValueByPath(parentObject, ['parameters', 'includeSafetyAttributes'], fromIncludeSafetyAttributes); + } +- const fromCreateTime = getValueByPath(fromObject, ['createTime']); +- if (fromCreateTime != null) { +- setValueByPath(toObject, ['createTime'], fromCreateTime); ++ const fromIncludeRaiReason = getValueByPath(fromObject, [ ++ 'includeRaiReason', ++ ]); ++ if (parentObject !== undefined && fromIncludeRaiReason != null) { ++ setValueByPath(parentObject, ['parameters', 'includeRaiReason'], fromIncludeRaiReason); + } +- const fromResponseId = getValueByPath(fromObject, ['responseId']); +- if (fromResponseId != null) { +- setValueByPath(toObject, ['responseId'], fromResponseId); ++ const fromLanguage = getValueByPath(fromObject, ['language']); ++ if (parentObject !== undefined && fromLanguage != null) { ++ setValueByPath(parentObject, ['parameters', 'language'], fromLanguage); + } +- const fromModelVersion = getValueByPath(fromObject, ['modelVersion']); +- if (fromModelVersion != null) { +- setValueByPath(toObject, ['modelVersion'], fromModelVersion); ++ const fromOutputMimeType = getValueByPath(fromObject, [ ++ 'outputMimeType', ++ ]); ++ if (parentObject !== undefined && fromOutputMimeType != null) { ++ setValueByPath(parentObject, ['parameters', 'outputOptions', 'mimeType'], fromOutputMimeType); + } +- const fromPromptFeedback = getValueByPath(fromObject, [ +- 'promptFeedback', ++ const fromOutputCompressionQuality = getValueByPath(fromObject, [ ++ 'outputCompressionQuality', + ]); +- if (fromPromptFeedback != null) { +- setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback); ++ if (parentObject !== undefined && fromOutputCompressionQuality != null) { ++ setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality); + } +- const fromUsageMetadata = getValueByPath(fromObject, [ +- 'usageMetadata', ++ const fromAddWatermark = getValueByPath(fromObject, ['addWatermark']); ++ if (parentObject !== undefined && fromAddWatermark != null) { ++ setValueByPath(parentObject, ['parameters', 'addWatermark'], fromAddWatermark); ++ } ++ const fromEnhancePrompt = getValueByPath(fromObject, [ ++ 'enhancePrompt', + ]); +- if (fromUsageMetadata != null) { +- setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata); ++ if (parentObject !== undefined && fromEnhancePrompt != null) { ++ setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt); + } + return toObject; + } +-function contentEmbeddingStatisticsFromVertex(apiClient, fromObject) { ++function generateImagesParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromTruncated = getValueByPath(fromObject, ['truncated']); +- if (fromTruncated != null) { +- setValueByPath(toObject, ['truncated'], fromTruncated); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); + } +- const fromTokenCount = getValueByPath(fromObject, ['token_count']); +- if (fromTokenCount != null) { +- setValueByPath(toObject, ['tokenCount'], fromTokenCount); ++ const fromPrompt = getValueByPath(fromObject, ['prompt']); ++ if (fromPrompt != null) { ++ setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt); ++ } ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], generateImagesConfigToVertex(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function contentEmbeddingFromVertex(apiClient, fromObject) { ++function getModelParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromValues = getValueByPath(fromObject, ['values']); +- if (fromValues != null) { +- setValueByPath(toObject, ['values'], fromValues); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'name'], tModel(apiClient, fromModel)); + } +- const fromStatistics = getValueByPath(fromObject, ['statistics']); +- if (fromStatistics != null) { +- setValueByPath(toObject, ['statistics'], contentEmbeddingStatisticsFromVertex(apiClient, fromStatistics)); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], fromConfig); + } + return toObject; + } +-function embedContentMetadataFromVertex(apiClient, fromObject) { ++function countTokensConfigToVertex(apiClient, fromObject, parentObject) { + const toObject = {}; +- const fromBillableCharacterCount = getValueByPath(fromObject, [ +- 'billableCharacterCount', ++ const fromSystemInstruction = getValueByPath(fromObject, [ ++ 'systemInstruction', + ]); +- if (fromBillableCharacterCount != null) { +- setValueByPath(toObject, ['billableCharacterCount'], fromBillableCharacterCount); ++ if (parentObject !== undefined && fromSystemInstruction != null) { ++ setValueByPath(parentObject, ['systemInstruction'], contentToVertex(apiClient, tContent(apiClient, fromSystemInstruction))); + } +- return toObject; +-} +-function embedContentResponseFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromEmbeddings = getValueByPath(fromObject, [ +- 'predictions[]', +- 'embeddings', +- ]); +- if (fromEmbeddings != null) { +- if (Array.isArray(fromEmbeddings)) { +- setValueByPath(toObject, ['embeddings'], fromEmbeddings.map((item) => { +- return contentEmbeddingFromVertex(apiClient, item); ++ const fromTools = getValueByPath(fromObject, ['tools']); ++ if (parentObject !== undefined && fromTools != null) { ++ if (Array.isArray(fromTools)) { ++ setValueByPath(parentObject, ['tools'], fromTools.map((item) => { ++ return toolToVertex(apiClient, item); + })); + } + else { +- setValueByPath(toObject, ['embeddings'], fromEmbeddings); ++ setValueByPath(parentObject, ['tools'], fromTools); + } + } +- const fromMetadata = getValueByPath(fromObject, ['metadata']); +- if (fromMetadata != null) { +- setValueByPath(toObject, ['metadata'], embedContentMetadataFromVertex(apiClient, fromMetadata)); +- } +- return toObject; +-} +-function imageFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromGcsUri = getValueByPath(fromObject, ['gcsUri']); +- if (fromGcsUri != null) { +- setValueByPath(toObject, ['gcsUri'], fromGcsUri); +- } +- const fromImageBytes = getValueByPath(fromObject, [ +- 'bytesBase64Encoded', +- ]); +- if (fromImageBytes != null) { +- setValueByPath(toObject, ['imageBytes'], tBytes(apiClient, fromImageBytes)); +- } +- const fromMimeType = getValueByPath(fromObject, ['mimeType']); +- if (fromMimeType != null) { +- setValueByPath(toObject, ['mimeType'], fromMimeType); +- } +- return toObject; +-} +-function safetyAttributesFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromCategories = getValueByPath(fromObject, [ +- 'safetyAttributes', +- 'categories', +- ]); +- if (fromCategories != null) { +- setValueByPath(toObject, ['categories'], fromCategories); +- } +- const fromScores = getValueByPath(fromObject, [ +- 'safetyAttributes', +- 'scores', ++ const fromGenerationConfig = getValueByPath(fromObject, [ ++ 'generationConfig', + ]); +- if (fromScores != null) { +- setValueByPath(toObject, ['scores'], fromScores); +- } +- const fromContentType = getValueByPath(fromObject, ['contentType']); +- if (fromContentType != null) { +- setValueByPath(toObject, ['contentType'], fromContentType); ++ if (parentObject !== undefined && fromGenerationConfig != null) { ++ setValueByPath(parentObject, ['generationConfig'], fromGenerationConfig); + } + return toObject; + } +-function generatedImageFromVertex(apiClient, fromObject) { ++function countTokensParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromImage = getValueByPath(fromObject, ['_self']); +- if (fromImage != null) { +- setValueByPath(toObject, ['image'], imageFromVertex(apiClient, fromImage)); +- } +- const fromRaiFilteredReason = getValueByPath(fromObject, [ +- 'raiFilteredReason', +- ]); +- if (fromRaiFilteredReason != null) { +- setValueByPath(toObject, ['raiFilteredReason'], fromRaiFilteredReason); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); + } +- const fromSafetyAttributes = getValueByPath(fromObject, ['_self']); +- if (fromSafetyAttributes != null) { +- setValueByPath(toObject, ['safetyAttributes'], safetyAttributesFromVertex(apiClient, fromSafetyAttributes)); ++ const fromContents = getValueByPath(fromObject, ['contents']); ++ if (fromContents != null) { ++ if (Array.isArray(fromContents)) { ++ setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { ++ return contentToVertex(apiClient, item); ++ }))); ++ } ++ else { ++ setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); ++ } + } +- const fromEnhancedPrompt = getValueByPath(fromObject, ['prompt']); +- if (fromEnhancedPrompt != null) { +- setValueByPath(toObject, ['enhancedPrompt'], fromEnhancedPrompt); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], countTokensConfigToVertex(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function generateImagesResponseFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromGeneratedImages = getValueByPath(fromObject, [ +- 'predictions', +- ]); +- if (fromGeneratedImages != null) { +- if (Array.isArray(fromGeneratedImages)) { +- setValueByPath(toObject, ['generatedImages'], fromGeneratedImages.map((item) => { +- return generatedImageFromVertex(apiClient, item); +- })); ++function computeTokensParametersToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); ++ } ++ const fromContents = getValueByPath(fromObject, ['contents']); ++ if (fromContents != null) { ++ if (Array.isArray(fromContents)) { ++ setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { ++ return contentToVertex(apiClient, item); ++ }))); + } + else { +- setValueByPath(toObject, ['generatedImages'], fromGeneratedImages); ++ setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); + } + } +- const fromPositivePromptSafetyAttributes = getValueByPath(fromObject, [ +- 'positivePromptSafetyAttributes', +- ]); +- if (fromPositivePromptSafetyAttributes != null) { +- setValueByPath(toObject, ['positivePromptSafetyAttributes'], safetyAttributesFromVertex(apiClient, fromPositivePromptSafetyAttributes)); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], fromConfig); + } + return toObject; + } +-function endpointFromVertex(apiClient, fromObject) { ++function imageToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromName = getValueByPath(fromObject, ['endpoint']); +- if (fromName != null) { +- setValueByPath(toObject, ['name'], fromName); ++ const fromGcsUri = getValueByPath(fromObject, ['gcsUri']); ++ if (fromGcsUri != null) { ++ setValueByPath(toObject, ['gcsUri'], fromGcsUri); + } +- const fromDeployedModelId = getValueByPath(fromObject, [ +- 'deployedModelId', +- ]); +- if (fromDeployedModelId != null) { +- setValueByPath(toObject, ['deployedModelId'], fromDeployedModelId); ++ const fromImageBytes = getValueByPath(fromObject, ['imageBytes']); ++ if (fromImageBytes != null) { ++ setValueByPath(toObject, ['bytesBase64Encoded'], tBytes(apiClient, fromImageBytes)); ++ } ++ const fromMimeType = getValueByPath(fromObject, ['mimeType']); ++ if (fromMimeType != null) { ++ setValueByPath(toObject, ['mimeType'], fromMimeType); + } + return toObject; + } +-function tunedModelInfoFromVertex(apiClient, fromObject) { ++function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { + const toObject = {}; +- const fromBaseModel = getValueByPath(fromObject, [ +- 'labels', +- 'google-vertex-llm-tuning-base-model-id', ++ const fromNumberOfVideos = getValueByPath(fromObject, [ ++ 'numberOfVideos', + ]); +- if (fromBaseModel != null) { +- setValueByPath(toObject, ['baseModel'], fromBaseModel); +- } +- const fromCreateTime = getValueByPath(fromObject, ['createTime']); +- if (fromCreateTime != null) { +- setValueByPath(toObject, ['createTime'], fromCreateTime); ++ if (parentObject !== undefined && fromNumberOfVideos != null) { ++ setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfVideos); + } +- const fromUpdateTime = getValueByPath(fromObject, ['updateTime']); +- if (fromUpdateTime != null) { +- setValueByPath(toObject, ['updateTime'], fromUpdateTime); ++ const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']); ++ if (parentObject !== undefined && fromOutputGcsUri != null) { ++ setValueByPath(parentObject, ['parameters', 'storageUri'], fromOutputGcsUri); + } +- return toObject; +-} +-function modelFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName != null) { +- setValueByPath(toObject, ['name'], fromName); ++ const fromFps = getValueByPath(fromObject, ['fps']); ++ if (parentObject !== undefined && fromFps != null) { ++ setValueByPath(parentObject, ['parameters', 'fps'], fromFps); + } +- const fromDisplayName = getValueByPath(fromObject, ['displayName']); +- if (fromDisplayName != null) { +- setValueByPath(toObject, ['displayName'], fromDisplayName); ++ const fromDurationSeconds = getValueByPath(fromObject, [ ++ 'durationSeconds', ++ ]); ++ if (parentObject !== undefined && fromDurationSeconds != null) { ++ setValueByPath(parentObject, ['parameters', 'durationSeconds'], fromDurationSeconds); + } +- const fromDescription = getValueByPath(fromObject, ['description']); +- if (fromDescription != null) { +- setValueByPath(toObject, ['description'], fromDescription); ++ const fromSeed = getValueByPath(fromObject, ['seed']); ++ if (parentObject !== undefined && fromSeed != null) { ++ setValueByPath(parentObject, ['parameters', 'seed'], fromSeed); + } +- const fromVersion = getValueByPath(fromObject, ['versionId']); +- if (fromVersion != null) { +- setValueByPath(toObject, ['version'], fromVersion); ++ const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']); ++ if (parentObject !== undefined && fromAspectRatio != null) { ++ setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio); + } +- const fromEndpoints = getValueByPath(fromObject, ['deployedModels']); +- if (fromEndpoints != null) { +- if (Array.isArray(fromEndpoints)) { +- setValueByPath(toObject, ['endpoints'], fromEndpoints.map((item) => { +- return endpointFromVertex(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['endpoints'], fromEndpoints); +- } ++ const fromResolution = getValueByPath(fromObject, ['resolution']); ++ if (parentObject !== undefined && fromResolution != null) { ++ setValueByPath(parentObject, ['parameters', 'resolution'], fromResolution); + } +- const fromLabels = getValueByPath(fromObject, ['labels']); +- if (fromLabels != null) { +- setValueByPath(toObject, ['labels'], fromLabels); ++ const fromPersonGeneration = getValueByPath(fromObject, [ ++ 'personGeneration', ++ ]); ++ if (parentObject !== undefined && fromPersonGeneration != null) { ++ setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration); + } +- const fromTunedModelInfo = getValueByPath(fromObject, ['_self']); +- if (fromTunedModelInfo != null) { +- setValueByPath(toObject, ['tunedModelInfo'], tunedModelInfoFromVertex(apiClient, fromTunedModelInfo)); ++ const fromPubsubTopic = getValueByPath(fromObject, ['pubsubTopic']); ++ if (parentObject !== undefined && fromPubsubTopic != null) { ++ setValueByPath(parentObject, ['parameters', 'pubsubTopic'], fromPubsubTopic); + } +- return toObject; +-} +-function countTokensResponseFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromTotalTokens = getValueByPath(fromObject, ['totalTokens']); +- if (fromTotalTokens != null) { +- setValueByPath(toObject, ['totalTokens'], fromTotalTokens); ++ const fromNegativePrompt = getValueByPath(fromObject, [ ++ 'negativePrompt', ++ ]); ++ if (parentObject !== undefined && fromNegativePrompt != null) { ++ setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt); + } +- return toObject; +-} +-function computeTokensResponseFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromTokensInfo = getValueByPath(fromObject, ['tokensInfo']); +- if (fromTokensInfo != null) { +- setValueByPath(toObject, ['tokensInfo'], fromTokensInfo); ++ const fromEnhancePrompt = getValueByPath(fromObject, [ ++ 'enhancePrompt', ++ ]); ++ if (parentObject !== undefined && fromEnhancePrompt != null) { ++ setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt); + } + return toObject; + } +-function videoFromVertex$1(apiClient, fromObject) { ++function generateVideosParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromUri = getValueByPath(fromObject, ['gcsUri']); +- if (fromUri != null) { +- setValueByPath(toObject, ['uri'], fromUri); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); + } +- const fromVideoBytes = getValueByPath(fromObject, [ +- 'bytesBase64Encoded', +- ]); +- if (fromVideoBytes != null) { +- setValueByPath(toObject, ['videoBytes'], tBytes(apiClient, fromVideoBytes)); ++ const fromPrompt = getValueByPath(fromObject, ['prompt']); ++ if (fromPrompt != null) { ++ setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt); + } +- const fromMimeType = getValueByPath(fromObject, ['mimeType']); +- if (fromMimeType != null) { +- setValueByPath(toObject, ['mimeType'], fromMimeType); ++ const fromImage = getValueByPath(fromObject, ['image']); ++ if (fromImage != null) { ++ setValueByPath(toObject, ['instances[0]', 'image'], imageToVertex(apiClient, fromImage)); + } +- return toObject; +-} +-function generatedVideoFromVertex$1(apiClient, fromObject) { +- const toObject = {}; +- const fromVideo = getValueByPath(fromObject, ['_self']); +- if (fromVideo != null) { +- setValueByPath(toObject, ['video'], videoFromVertex$1(apiClient, fromVideo)); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], generateVideosConfigToVertex(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function generateVideosResponseFromVertex$1(apiClient, fromObject) { ++function partFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromGeneratedVideos = getValueByPath(fromObject, ['videos']); +- if (fromGeneratedVideos != null) { +- if (Array.isArray(fromGeneratedVideos)) { +- setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos.map((item) => { +- return generatedVideoFromVertex$1(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos); +- } ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); + } +- const fromRaiMediaFilteredCount = getValueByPath(fromObject, [ +- 'raiMediaFilteredCount', ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', + ]); +- if (fromRaiMediaFilteredCount != null) { +- setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); + } +- const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [ +- 'raiMediaFilteredReasons', ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', + ]); +- if (fromRaiMediaFilteredReasons != null) { +- setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons); +- } +- return toObject; +-} +-function generateVideosOperationFromVertex$1(apiClient, fromObject) { +- const toObject = {}; +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName != null) { +- setValueByPath(toObject, ['name'], fromName); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); + } +- const fromMetadata = getValueByPath(fromObject, ['metadata']); +- if (fromMetadata != null) { +- setValueByPath(toObject, ['metadata'], fromMetadata); ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); + } +- const fromDone = getValueByPath(fromObject, ['done']); +- if (fromDone != null) { +- setValueByPath(toObject, ['done'], fromDone); ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); + } +- const fromError = getValueByPath(fromObject, ['error']); +- if (fromError != null) { +- setValueByPath(toObject, ['error'], fromError); ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', ++ ]); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); + } +- const fromResponse = getValueByPath(fromObject, ['response']); +- if (fromResponse != null) { +- setValueByPath(toObject, ['response'], generateVideosResponseFromVertex$1(apiClient, fromResponse)); ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); + } +- const fromResult = getValueByPath(fromObject, ['response']); +- if (fromResult != null) { +- setValueByPath(toObject, ['result'], generateVideosResponseFromVertex$1(apiClient, fromResult)); ++ const fromText = getValueByPath(fromObject, ['text']); ++ if (fromText != null) { ++ setValueByPath(toObject, ['text'], fromText); + } + return toObject; + } +- +-/** +- * @license +- * Copyright 2025 Google LLC +- * SPDX-License-Identifier: Apache-2.0 +- */ +-/** +- * Converters for live client. +- */ +-function liveConnectParametersToMldev(apiClient, fromObject) { ++function contentFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig !== undefined && fromConfig !== null) { +- setValueByPath(toObject, ['setup'], liveConnectConfigToMldev(apiClient, fromConfig)); ++ const fromParts = getValueByPath(fromObject, ['parts']); ++ if (fromParts != null) { ++ if (Array.isArray(fromParts)) { ++ setValueByPath(toObject, ['parts'], fromParts.map((item) => { ++ return partFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['parts'], fromParts); ++ } + } +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel !== undefined) { +- setValueByPath(toObject, ['setup', 'model'], fromModel); ++ const fromRole = getValueByPath(fromObject, ['role']); ++ if (fromRole != null) { ++ setValueByPath(toObject, ['role'], fromRole); + } + return toObject; + } +-function liveConnectParametersToVertex(apiClient, fromObject) { ++function citationMetadataFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig !== undefined && fromConfig !== null) { +- setValueByPath(toObject, ['setup'], liveConnectConfigToVertex(apiClient, fromConfig)); +- } +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel !== undefined) { +- setValueByPath(toObject, ['setup', 'model'], fromModel); ++ const fromCitations = getValueByPath(fromObject, ['citationSources']); ++ if (fromCitations != null) { ++ setValueByPath(toObject, ['citations'], fromCitations); + } + return toObject; + } +-function liveServerMessageFromMldev(apiClient, fromObject) { ++function candidateFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromSetupComplete = getValueByPath(fromObject, [ +- 'setupComplete', +- ]); +- if (fromSetupComplete !== undefined) { +- setValueByPath(toObject, ['setupComplete'], fromSetupComplete); ++ const fromContent = getValueByPath(fromObject, ['content']); ++ if (fromContent != null) { ++ setValueByPath(toObject, ['content'], contentFromMldev(apiClient, fromContent)); + } +- const fromServerContent = getValueByPath(fromObject, [ +- 'serverContent', ++ const fromCitationMetadata = getValueByPath(fromObject, [ ++ 'citationMetadata', + ]); +- if (fromServerContent !== undefined && fromServerContent !== null) { +- setValueByPath(toObject, ['serverContent'], liveServerContentFromMldev(apiClient, fromServerContent)); ++ if (fromCitationMetadata != null) { ++ setValueByPath(toObject, ['citationMetadata'], citationMetadataFromMldev(apiClient, fromCitationMetadata)); + } +- const fromToolCall = getValueByPath(fromObject, ['toolCall']); +- if (fromToolCall !== undefined && fromToolCall !== null) { +- setValueByPath(toObject, ['toolCall'], liveServerToolCallFromMldev(apiClient, fromToolCall)); ++ const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); ++ if (fromTokenCount != null) { ++ setValueByPath(toObject, ['tokenCount'], fromTokenCount); + } +- const fromToolCallCancellation = getValueByPath(fromObject, [ +- 'toolCallCancellation', +- ]); +- if (fromToolCallCancellation !== undefined && +- fromToolCallCancellation !== null) { +- setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromMldev(apiClient, fromToolCallCancellation)); ++ const fromFinishReason = getValueByPath(fromObject, ['finishReason']); ++ if (fromFinishReason != null) { ++ setValueByPath(toObject, ['finishReason'], fromFinishReason); + } +- const fromUsageMetadata = getValueByPath(fromObject, [ +- 'usageMetadata', ++ const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']); ++ if (fromAvgLogprobs != null) { ++ setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs); ++ } ++ const fromGroundingMetadata = getValueByPath(fromObject, [ ++ 'groundingMetadata', + ]); +- if (fromUsageMetadata != undefined && fromUsageMetadata != null) { +- setValueByPath(toObject, ['usageMetadata'], usageMetadataFromMldev(apiClient, fromUsageMetadata)); ++ if (fromGroundingMetadata != null) { ++ setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata); + } +- const fromGoAway = getValueByPath(fromObject, ['goAway']); +- if (fromGoAway !== undefined && fromGoAway !== null) { +- setValueByPath(toObject, ['goAway'], liveServerGoAwayFromMldev(fromGoAway)); ++ const fromIndex = getValueByPath(fromObject, ['index']); ++ if (fromIndex != null) { ++ setValueByPath(toObject, ['index'], fromIndex); + } +- const fromSessionResumptionUpdate = getValueByPath(fromObject, [ +- 'sessionResumptionUpdate', ++ const fromLogprobsResult = getValueByPath(fromObject, [ ++ 'logprobsResult', ++ ]); ++ if (fromLogprobsResult != null) { ++ setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult); ++ } ++ const fromSafetyRatings = getValueByPath(fromObject, [ ++ 'safetyRatings', + ]); +- if (fromSessionResumptionUpdate !== undefined && +- fromSessionResumptionUpdate !== null) { +- setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromMldev(fromSessionResumptionUpdate)); ++ if (fromSafetyRatings != null) { ++ setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings); + } + return toObject; + } +-function liveServerMessageFromVertex(apiClient, fromObject) { ++function generateContentResponseFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromSetupComplete = getValueByPath(fromObject, [ +- 'setupComplete', +- ]); +- if (fromSetupComplete !== undefined) { +- setValueByPath(toObject, ['setupComplete'], fromSetupComplete); +- } +- const fromServerContent = getValueByPath(fromObject, [ +- 'serverContent', +- ]); +- if (fromServerContent !== undefined && fromServerContent !== null) { +- setValueByPath(toObject, ['serverContent'], liveServerContentFromVertex(apiClient, fromServerContent)); +- } +- const fromToolCall = getValueByPath(fromObject, ['toolCall']); +- if (fromToolCall !== undefined && fromToolCall !== null) { +- setValueByPath(toObject, ['toolCall'], liveServerToolCallFromVertex(apiClient, fromToolCall)); +- } +- const fromToolCallCancellation = getValueByPath(fromObject, [ +- 'toolCallCancellation', +- ]); +- if (fromToolCallCancellation !== undefined && +- fromToolCallCancellation !== null) { +- setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromVertex(apiClient, fromToolCallCancellation)); ++ const fromCandidates = getValueByPath(fromObject, ['candidates']); ++ if (fromCandidates != null) { ++ if (Array.isArray(fromCandidates)) { ++ setValueByPath(toObject, ['candidates'], fromCandidates.map((item) => { ++ return candidateFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['candidates'], fromCandidates); ++ } + } +- const fromGoAway = getValueByPath(fromObject, ['goAway']); +- if (fromGoAway !== undefined && fromGoAway !== null) { +- setValueByPath(toObject, ['goAway'], liveServerGoAwayFromVertex(fromGoAway)); ++ const fromModelVersion = getValueByPath(fromObject, ['modelVersion']); ++ if (fromModelVersion != null) { ++ setValueByPath(toObject, ['modelVersion'], fromModelVersion); + } +- const fromSessionResumptionUpdate = getValueByPath(fromObject, [ +- 'sessionResumptionUpdate', ++ const fromPromptFeedback = getValueByPath(fromObject, [ ++ 'promptFeedback', + ]); +- if (fromSessionResumptionUpdate !== undefined && +- fromSessionResumptionUpdate !== null) { +- setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromVertex(fromSessionResumptionUpdate)); ++ if (fromPromptFeedback != null) { ++ setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback); + } + const fromUsageMetadata = getValueByPath(fromObject, [ + 'usageMetadata', + ]); +- if (fromUsageMetadata != undefined && fromUsageMetadata != null) { +- setValueByPath(toObject, ['usageMetadata'], usageMetadataFromVertex(apiClient, fromUsageMetadata)); ++ if (fromUsageMetadata != null) { ++ setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata); + } + return toObject; + } +-function slidingWindowToMldev(fromObject) { ++function contentEmbeddingFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']); +- if (fromTargetTokens !== undefined && fromTargetTokens !== null) { +- setValueByPath(toObject, ['targetTokens'], fromTargetTokens); ++ const fromValues = getValueByPath(fromObject, ['values']); ++ if (fromValues != null) { ++ setValueByPath(toObject, ['values'], fromValues); + } + return toObject; + } +-function slidingWindowToVertex(fromObject) { ++function embedContentMetadataFromMldev() { + const toObject = {}; +- const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']); +- if (fromTargetTokens !== undefined && fromTargetTokens !== null) { +- setValueByPath(toObject, ['targetTokens'], fromTargetTokens); ++ return toObject; ++} ++function embedContentResponseFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromEmbeddings = getValueByPath(fromObject, ['embeddings']); ++ if (fromEmbeddings != null) { ++ if (Array.isArray(fromEmbeddings)) { ++ setValueByPath(toObject, ['embeddings'], fromEmbeddings.map((item) => { ++ return contentEmbeddingFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['embeddings'], fromEmbeddings); ++ } ++ } ++ const fromMetadata = getValueByPath(fromObject, ['metadata']); ++ if (fromMetadata != null) { ++ setValueByPath(toObject, ['metadata'], embedContentMetadataFromMldev()); + } + return toObject; + } +-function contextWindowCompressionToMldev(fromObject) { ++function imageFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromTriggerTokens = getValueByPath(fromObject, [ +- 'triggerTokens', ++ const fromImageBytes = getValueByPath(fromObject, [ ++ 'bytesBase64Encoded', + ]); +- if (fromTriggerTokens !== undefined && fromTriggerTokens !== null) { +- setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens); ++ if (fromImageBytes != null) { ++ setValueByPath(toObject, ['imageBytes'], tBytes(apiClient, fromImageBytes)); + } +- const fromSlidingWindow = getValueByPath(fromObject, [ +- 'slidingWindow', +- ]); +- if (fromSlidingWindow !== undefined && fromSlidingWindow !== null) { +- setValueByPath(toObject, ['slidingWindow'], slidingWindowToMldev(fromSlidingWindow)); ++ const fromMimeType = getValueByPath(fromObject, ['mimeType']); ++ if (fromMimeType != null) { ++ setValueByPath(toObject, ['mimeType'], fromMimeType); + } + return toObject; + } +-function contextWindowCompressionToVertex(fromObject) { ++function safetyAttributesFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromTriggerTokens = getValueByPath(fromObject, [ +- 'triggerTokens', ++ const fromCategories = getValueByPath(fromObject, [ ++ 'safetyAttributes', ++ 'categories', + ]); +- if (fromTriggerTokens !== undefined && fromTriggerTokens !== null) { +- setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens); ++ if (fromCategories != null) { ++ setValueByPath(toObject, ['categories'], fromCategories); + } +- const fromSlidingWindow = getValueByPath(fromObject, [ +- 'slidingWindow', ++ const fromScores = getValueByPath(fromObject, [ ++ 'safetyAttributes', ++ 'scores', + ]); +- if (fromSlidingWindow !== undefined && fromSlidingWindow !== null) { +- setValueByPath(toObject, ['slidingWindow'], slidingWindowToVertex(fromSlidingWindow)); ++ if (fromScores != null) { ++ setValueByPath(toObject, ['scores'], fromScores); ++ } ++ const fromContentType = getValueByPath(fromObject, ['contentType']); ++ if (fromContentType != null) { ++ setValueByPath(toObject, ['contentType'], fromContentType); + } + return toObject; + } +-function automaticActivityDetectionToMldev(fromObject) { ++function generatedImageFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromDisabled = getValueByPath(fromObject, ['disabled']); +- if (fromDisabled !== undefined && fromDisabled !== null) { +- setValueByPath(toObject, ['disabled'], fromDisabled); ++ const fromImage = getValueByPath(fromObject, ['_self']); ++ if (fromImage != null) { ++ setValueByPath(toObject, ['image'], imageFromMldev(apiClient, fromImage)); + } +- const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [ +- 'startOfSpeechSensitivity', ++ const fromRaiFilteredReason = getValueByPath(fromObject, [ ++ 'raiFilteredReason', + ]); +- if (fromStartOfSpeechSensitivity !== undefined && +- fromStartOfSpeechSensitivity !== null) { +- setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity); ++ if (fromRaiFilteredReason != null) { ++ setValueByPath(toObject, ['raiFilteredReason'], fromRaiFilteredReason); + } +- const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [ +- 'endOfSpeechSensitivity', +- ]); +- if (fromEndOfSpeechSensitivity !== undefined && +- fromEndOfSpeechSensitivity !== null) { +- setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity); ++ const fromSafetyAttributes = getValueByPath(fromObject, ['_self']); ++ if (fromSafetyAttributes != null) { ++ setValueByPath(toObject, ['safetyAttributes'], safetyAttributesFromMldev(apiClient, fromSafetyAttributes)); + } +- const fromPrefixPaddingMs = getValueByPath(fromObject, [ +- 'prefixPaddingMs', ++ return toObject; ++} ++function generateImagesResponseFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromGeneratedImages = getValueByPath(fromObject, [ ++ 'predictions', + ]); +- if (fromPrefixPaddingMs !== undefined && fromPrefixPaddingMs !== null) { +- setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs); ++ if (fromGeneratedImages != null) { ++ if (Array.isArray(fromGeneratedImages)) { ++ setValueByPath(toObject, ['generatedImages'], fromGeneratedImages.map((item) => { ++ return generatedImageFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['generatedImages'], fromGeneratedImages); ++ } + } +- const fromSilenceDurationMs = getValueByPath(fromObject, [ +- 'silenceDurationMs', ++ const fromPositivePromptSafetyAttributes = getValueByPath(fromObject, [ ++ 'positivePromptSafetyAttributes', + ]); +- if (fromSilenceDurationMs !== undefined && fromSilenceDurationMs !== null) { +- setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs); ++ if (fromPositivePromptSafetyAttributes != null) { ++ setValueByPath(toObject, ['positivePromptSafetyAttributes'], safetyAttributesFromMldev(apiClient, fromPositivePromptSafetyAttributes)); + } + return toObject; + } +-function automaticActivityDetectionToVertex(fromObject) { ++function tunedModelInfoFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromDisabled = getValueByPath(fromObject, ['disabled']); +- if (fromDisabled !== undefined && fromDisabled !== null) { +- setValueByPath(toObject, ['disabled'], fromDisabled); ++ const fromBaseModel = getValueByPath(fromObject, ['baseModel']); ++ if (fromBaseModel != null) { ++ setValueByPath(toObject, ['baseModel'], fromBaseModel); + } +- const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [ +- 'startOfSpeechSensitivity', +- ]); +- if (fromStartOfSpeechSensitivity !== undefined && +- fromStartOfSpeechSensitivity !== null) { +- setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity); ++ const fromCreateTime = getValueByPath(fromObject, ['createTime']); ++ if (fromCreateTime != null) { ++ setValueByPath(toObject, ['createTime'], fromCreateTime); ++ } ++ const fromUpdateTime = getValueByPath(fromObject, ['updateTime']); ++ if (fromUpdateTime != null) { ++ setValueByPath(toObject, ['updateTime'], fromUpdateTime); ++ } ++ return toObject; ++} ++function modelFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); ++ } ++ const fromDisplayName = getValueByPath(fromObject, ['displayName']); ++ if (fromDisplayName != null) { ++ setValueByPath(toObject, ['displayName'], fromDisplayName); ++ } ++ const fromDescription = getValueByPath(fromObject, ['description']); ++ if (fromDescription != null) { ++ setValueByPath(toObject, ['description'], fromDescription); ++ } ++ const fromVersion = getValueByPath(fromObject, ['version']); ++ if (fromVersion != null) { ++ setValueByPath(toObject, ['version'], fromVersion); + } +- const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [ +- 'endOfSpeechSensitivity', ++ const fromTunedModelInfo = getValueByPath(fromObject, ['_self']); ++ if (fromTunedModelInfo != null) { ++ setValueByPath(toObject, ['tunedModelInfo'], tunedModelInfoFromMldev(apiClient, fromTunedModelInfo)); ++ } ++ const fromInputTokenLimit = getValueByPath(fromObject, [ ++ 'inputTokenLimit', + ]); +- if (fromEndOfSpeechSensitivity !== undefined && +- fromEndOfSpeechSensitivity !== null) { +- setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity); ++ if (fromInputTokenLimit != null) { ++ setValueByPath(toObject, ['inputTokenLimit'], fromInputTokenLimit); + } +- const fromPrefixPaddingMs = getValueByPath(fromObject, [ +- 'prefixPaddingMs', ++ const fromOutputTokenLimit = getValueByPath(fromObject, [ ++ 'outputTokenLimit', + ]); +- if (fromPrefixPaddingMs !== undefined && fromPrefixPaddingMs !== null) { +- setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs); ++ if (fromOutputTokenLimit != null) { ++ setValueByPath(toObject, ['outputTokenLimit'], fromOutputTokenLimit); + } +- const fromSilenceDurationMs = getValueByPath(fromObject, [ +- 'silenceDurationMs', ++ const fromSupportedActions = getValueByPath(fromObject, [ ++ 'supportedGenerationMethods', + ]); +- if (fromSilenceDurationMs !== undefined && fromSilenceDurationMs !== null) { +- setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs); ++ if (fromSupportedActions != null) { ++ setValueByPath(toObject, ['supportedActions'], fromSupportedActions); + } + return toObject; + } +-function realtimeInputConfigToMldev(fromObject) { ++function countTokensResponseFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromAutomaticActivityDetection = getValueByPath(fromObject, [ +- 'automaticActivityDetection', +- ]); +- if (fromAutomaticActivityDetection !== undefined && +- fromAutomaticActivityDetection !== null) { +- setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToMldev(fromAutomaticActivityDetection)); ++ const fromTotalTokens = getValueByPath(fromObject, ['totalTokens']); ++ if (fromTotalTokens != null) { ++ setValueByPath(toObject, ['totalTokens'], fromTotalTokens); + } +- const fromActivityHandling = getValueByPath(fromObject, [ +- 'activityHandling', ++ const fromCachedContentTokenCount = getValueByPath(fromObject, [ ++ 'cachedContentTokenCount', + ]); +- if (fromActivityHandling !== undefined && fromActivityHandling !== null) { +- setValueByPath(toObject, ['activityHandling'], fromActivityHandling); +- } +- const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']); +- if (fromTurnCoverage !== undefined && fromTurnCoverage !== null) { +- setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage); ++ if (fromCachedContentTokenCount != null) { ++ setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); + } + return toObject; + } +-function realtimeInputConfigToVertex(fromObject) { ++function videoFromMldev$1(apiClient, fromObject) { + const toObject = {}; +- const fromAutomaticActivityDetection = getValueByPath(fromObject, [ +- 'automaticActivityDetection', +- ]); +- if (fromAutomaticActivityDetection !== undefined && +- fromAutomaticActivityDetection !== null) { +- setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToVertex(fromAutomaticActivityDetection)); ++ const fromUri = getValueByPath(fromObject, ['video', 'uri']); ++ if (fromUri != null) { ++ setValueByPath(toObject, ['uri'], fromUri); + } +- const fromActivityHandling = getValueByPath(fromObject, [ +- 'activityHandling', ++ const fromVideoBytes = getValueByPath(fromObject, [ ++ 'video', ++ 'encodedVideo', + ]); +- if (fromActivityHandling !== undefined && fromActivityHandling !== null) { +- setValueByPath(toObject, ['activityHandling'], fromActivityHandling); ++ if (fromVideoBytes != null) { ++ setValueByPath(toObject, ['videoBytes'], tBytes(apiClient, fromVideoBytes)); + } +- const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']); +- if (fromTurnCoverage !== undefined && fromTurnCoverage !== null) { +- setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage); ++ const fromMimeType = getValueByPath(fromObject, ['encoding']); ++ if (fromMimeType != null) { ++ setValueByPath(toObject, ['mimeType'], fromMimeType); + } + return toObject; + } +-function liveConnectConfigToMldev(apiClient, fromObject) { ++function generatedVideoFromMldev$1(apiClient, fromObject) { + const toObject = {}; +- const fromGenerationConfig = getValueByPath(fromObject, [ +- 'generationConfig', +- ]); +- if (fromGenerationConfig !== undefined) { +- setValueByPath(toObject, ['generationConfig'], fromGenerationConfig); ++ const fromVideo = getValueByPath(fromObject, ['_self']); ++ if (fromVideo != null) { ++ setValueByPath(toObject, ['video'], videoFromMldev$1(apiClient, fromVideo)); + } +- const fromResponseModalities = getValueByPath(fromObject, [ +- 'responseModalities', ++ return toObject; ++} ++function generateVideosResponseFromMldev$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromGeneratedVideos = getValueByPath(fromObject, [ ++ 'generatedSamples', + ]); +- if (fromResponseModalities !== undefined) { +- setValueByPath(toObject, ['generationConfig', 'responseModalities'], fromResponseModalities); ++ if (fromGeneratedVideos != null) { ++ if (Array.isArray(fromGeneratedVideos)) { ++ setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos.map((item) => { ++ return generatedVideoFromMldev$1(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos); ++ } + } +- const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); +- if (fromSpeechConfig !== undefined) { +- setValueByPath(toObject, ['generationConfig', 'speechConfig'], fromSpeechConfig); ++ const fromRaiMediaFilteredCount = getValueByPath(fromObject, [ ++ 'raiMediaFilteredCount', ++ ]); ++ if (fromRaiMediaFilteredCount != null) { ++ setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount); + } +- const fromSystemInstruction = getValueByPath(fromObject, [ +- 'systemInstruction', ++ const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [ ++ 'raiMediaFilteredReasons', + ]); +- if (fromSystemInstruction !== undefined && fromSystemInstruction !== null) { +- setValueByPath(toObject, ['systemInstruction'], contentToMldev(apiClient, fromSystemInstruction)); ++ if (fromRaiMediaFilteredReasons != null) { ++ setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons); + } +- const fromTools = getValueByPath(fromObject, ['tools']); +- if (fromTools !== undefined && +- fromTools !== null && +- Array.isArray(fromTools)) { +- setValueByPath(toObject, ['tools'], fromTools.map((item) => { +- return toolToMldev(apiClient, item); +- })); ++ return toObject; ++} ++function generateVideosOperationFromMldev$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); + } +- const fromSessionResumption = getValueByPath(fromObject, [ +- 'sessionResumption', +- ]); +- if (fromSessionResumption !== undefined && fromSessionResumption !== null) { +- setValueByPath(toObject, ['sessionResumption'], liveClientSessionResumptionConfigToMldev(fromSessionResumption)); ++ const fromMetadata = getValueByPath(fromObject, ['metadata']); ++ if (fromMetadata != null) { ++ setValueByPath(toObject, ['metadata'], fromMetadata); + } +- const fromContextWindowCompression = getValueByPath(fromObject, [ +- 'contextWindowCompression', +- ]); +- if (fromContextWindowCompression !== undefined && +- fromContextWindowCompression !== null) { +- setValueByPath(toObject, ['contextWindowCompression'], contextWindowCompressionToMldev(fromContextWindowCompression)); ++ const fromDone = getValueByPath(fromObject, ['done']); ++ if (fromDone != null) { ++ setValueByPath(toObject, ['done'], fromDone); + } +- const fromRealtimeInputConfig = getValueByPath(fromObject, [ +- 'realtimeInputConfig', ++ const fromError = getValueByPath(fromObject, ['error']); ++ if (fromError != null) { ++ setValueByPath(toObject, ['error'], fromError); ++ } ++ const fromResponse = getValueByPath(fromObject, [ ++ 'response', ++ 'generateVideoResponse', + ]); +- if (fromRealtimeInputConfig !== undefined && +- fromRealtimeInputConfig !== null) { +- setValueByPath(toObject, ['realtimeInputConfig'], realtimeInputConfigToMldev(fromRealtimeInputConfig)); ++ if (fromResponse != null) { ++ setValueByPath(toObject, ['response'], generateVideosResponseFromMldev$1(apiClient, fromResponse)); + } + return toObject; + } +-function liveConnectConfigToVertex(apiClient, fromObject) { ++function partFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromGenerationConfig = getValueByPath(fromObject, [ +- 'generationConfig', +- ]); +- if (fromGenerationConfig !== undefined) { +- setValueByPath(toObject, ['generationConfig'], fromGenerationConfig); +- } +- const fromResponseModalities = getValueByPath(fromObject, [ +- 'responseModalities', ++ const fromVideoMetadata = getValueByPath(fromObject, [ ++ 'videoMetadata', + ]); +- if (fromResponseModalities !== undefined) { +- setValueByPath(toObject, ['generationConfig', 'responseModalities'], fromResponseModalities); ++ if (fromVideoMetadata != null) { ++ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); + } +- else { +- // Set default to AUDIO to align with MLDev API. +- setValueByPath(toObject, ['generationConfig', 'responseModalities'], ['AUDIO']); ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); + } +- const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); +- if (fromSpeechConfig !== undefined) { +- setValueByPath(toObject, ['generationConfig', 'speechConfig'], fromSpeechConfig); ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', ++ ]); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); + } +- const fromSystemInstruction = getValueByPath(fromObject, [ +- 'systemInstruction', ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', + ]); +- if (fromSystemInstruction !== undefined && fromSystemInstruction !== null) { +- setValueByPath(toObject, ['systemInstruction'], contentToVertex(apiClient, fromSystemInstruction)); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); + } +- const fromTools = getValueByPath(fromObject, ['tools']); +- if (fromTools !== undefined && +- fromTools !== null && +- Array.isArray(fromTools)) { +- setValueByPath(toObject, ['tools'], fromTools.map((item) => { +- return toolToVertex(apiClient, item); +- })); ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); + } +- const fromSessionResumption = getValueByPath(fromObject, [ +- 'sessionResumption', +- ]); +- if (fromSessionResumption !== undefined && fromSessionResumption !== null) { +- setValueByPath(toObject, ['sessionResumption'], liveClientSessionResumptionConfigToVertex(fromSessionResumption)); ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); + } +- const fromContextWindowCompression = getValueByPath(fromObject, [ +- 'contextWindowCompression', ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', + ]); +- if (fromContextWindowCompression !== undefined && +- fromContextWindowCompression !== null) { +- setValueByPath(toObject, ['contextWindowCompression'], contextWindowCompressionToVertex(fromContextWindowCompression)); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); + } +- const fromRealtimeInputConfig = getValueByPath(fromObject, [ +- 'realtimeInputConfig', +- ]); +- if (fromRealtimeInputConfig !== undefined && +- fromRealtimeInputConfig !== null) { +- setValueByPath(toObject, ['realtimeInputConfig'], realtimeInputConfigToVertex(fromRealtimeInputConfig)); ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); ++ } ++ const fromText = getValueByPath(fromObject, ['text']); ++ if (fromText != null) { ++ setValueByPath(toObject, ['text'], fromText); + } + return toObject; + } +-function liveServerContentFromMldev(apiClient, fromObject) { ++function contentFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromModelTurn = getValueByPath(fromObject, ['modelTurn']); +- if (fromModelTurn !== undefined && fromModelTurn !== null) { +- setValueByPath(toObject, ['modelTurn'], contentFromMldev(apiClient, fromModelTurn)); +- } +- const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']); +- if (fromTurnComplete !== undefined) { +- setValueByPath(toObject, ['turnComplete'], fromTurnComplete); ++ const fromParts = getValueByPath(fromObject, ['parts']); ++ if (fromParts != null) { ++ if (Array.isArray(fromParts)) { ++ setValueByPath(toObject, ['parts'], fromParts.map((item) => { ++ return partFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['parts'], fromParts); ++ } + } +- const fromInterrupted = getValueByPath(fromObject, ['interrupted']); +- if (fromInterrupted !== undefined) { +- setValueByPath(toObject, ['interrupted'], fromInterrupted); ++ const fromRole = getValueByPath(fromObject, ['role']); ++ if (fromRole != null) { ++ setValueByPath(toObject, ['role'], fromRole); + } +- const fromGenerationComplete = getValueByPath(fromObject, [ +- 'generationComplete', +- ]); +- if (fromGenerationComplete != null) { +- setValueByPath(toObject, ['generationComplete'], fromGenerationComplete); ++ return toObject; ++} ++function citationMetadataFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromCitations = getValueByPath(fromObject, ['citations']); ++ if (fromCitations != null) { ++ setValueByPath(toObject, ['citations'], fromCitations); + } + return toObject; + } +-function liveServerContentFromVertex(apiClient, fromObject) { ++function candidateFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromModelTurn = getValueByPath(fromObject, ['modelTurn']); +- if (fromModelTurn !== undefined && fromModelTurn !== null) { +- setValueByPath(toObject, ['modelTurn'], contentFromVertex(apiClient, fromModelTurn)); ++ const fromContent = getValueByPath(fromObject, ['content']); ++ if (fromContent != null) { ++ setValueByPath(toObject, ['content'], contentFromVertex(apiClient, fromContent)); + } +- const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']); +- if (fromTurnComplete !== undefined) { +- setValueByPath(toObject, ['turnComplete'], fromTurnComplete); ++ const fromCitationMetadata = getValueByPath(fromObject, [ ++ 'citationMetadata', ++ ]); ++ if (fromCitationMetadata != null) { ++ setValueByPath(toObject, ['citationMetadata'], citationMetadataFromVertex(apiClient, fromCitationMetadata)); + } +- const fromInterrupted = getValueByPath(fromObject, ['interrupted']); +- if (fromInterrupted !== undefined) { +- setValueByPath(toObject, ['interrupted'], fromInterrupted); ++ const fromFinishMessage = getValueByPath(fromObject, [ ++ 'finishMessage', ++ ]); ++ if (fromFinishMessage != null) { ++ setValueByPath(toObject, ['finishMessage'], fromFinishMessage); ++ } ++ const fromFinishReason = getValueByPath(fromObject, ['finishReason']); ++ if (fromFinishReason != null) { ++ setValueByPath(toObject, ['finishReason'], fromFinishReason); ++ } ++ const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']); ++ if (fromAvgLogprobs != null) { ++ setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs); ++ } ++ const fromGroundingMetadata = getValueByPath(fromObject, [ ++ 'groundingMetadata', ++ ]); ++ if (fromGroundingMetadata != null) { ++ setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata); ++ } ++ const fromIndex = getValueByPath(fromObject, ['index']); ++ if (fromIndex != null) { ++ setValueByPath(toObject, ['index'], fromIndex); ++ } ++ const fromLogprobsResult = getValueByPath(fromObject, [ ++ 'logprobsResult', ++ ]); ++ if (fromLogprobsResult != null) { ++ setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult); + } +- const fromGenerationComplete = getValueByPath(fromObject, [ +- 'generationComplete', ++ const fromSafetyRatings = getValueByPath(fromObject, [ ++ 'safetyRatings', + ]); +- if (fromGenerationComplete != null) { +- setValueByPath(toObject, ['generationComplete'], fromGenerationComplete); ++ if (fromSafetyRatings != null) { ++ setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings); + } + return toObject; + } +-function functionCallFromMldev(apiClient, fromObject) { ++function generateContentResponseFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromId = getValueByPath(fromObject, ['id']); +- if (fromId !== undefined) { +- setValueByPath(toObject, ['id'], fromId); +- } +- const fromArgs = getValueByPath(fromObject, ['args']); +- if (fromArgs !== undefined) { +- setValueByPath(toObject, ['args'], fromArgs); ++ const fromCandidates = getValueByPath(fromObject, ['candidates']); ++ if (fromCandidates != null) { ++ if (Array.isArray(fromCandidates)) { ++ setValueByPath(toObject, ['candidates'], fromCandidates.map((item) => { ++ return candidateFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['candidates'], fromCandidates); ++ } + } +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName !== undefined) { +- setValueByPath(toObject, ['name'], fromName); ++ const fromCreateTime = getValueByPath(fromObject, ['createTime']); ++ if (fromCreateTime != null) { ++ setValueByPath(toObject, ['createTime'], fromCreateTime); + } +- return toObject; +-} +-function functionCallFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromArgs = getValueByPath(fromObject, ['args']); +- if (fromArgs !== undefined) { +- setValueByPath(toObject, ['args'], fromArgs); ++ const fromResponseId = getValueByPath(fromObject, ['responseId']); ++ if (fromResponseId != null) { ++ setValueByPath(toObject, ['responseId'], fromResponseId); + } +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName !== undefined) { +- setValueByPath(toObject, ['name'], fromName); ++ const fromModelVersion = getValueByPath(fromObject, ['modelVersion']); ++ if (fromModelVersion != null) { ++ setValueByPath(toObject, ['modelVersion'], fromModelVersion); + } +- return toObject; +-} +-function liveServerToolCallFromMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromFunctionCalls = getValueByPath(fromObject, [ +- 'functionCalls', ++ const fromPromptFeedback = getValueByPath(fromObject, [ ++ 'promptFeedback', + ]); +- if (fromFunctionCalls !== undefined && +- fromFunctionCalls !== null && +- Array.isArray(fromFunctionCalls)) { +- setValueByPath(toObject, ['functionCalls'], fromFunctionCalls.map((item) => { +- return functionCallFromMldev(apiClient, item); +- })); ++ if (fromPromptFeedback != null) { ++ setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback); + } +- return toObject; +-} +-function liveServerToolCallFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromFunctionCalls = getValueByPath(fromObject, [ +- 'functionCalls', ++ const fromUsageMetadata = getValueByPath(fromObject, [ ++ 'usageMetadata', + ]); +- if (fromFunctionCalls !== undefined && +- fromFunctionCalls !== null && +- Array.isArray(fromFunctionCalls)) { +- setValueByPath(toObject, ['functionCalls'], fromFunctionCalls.map((item) => { +- return functionCallFromVertex(apiClient, item); +- })); ++ if (fromUsageMetadata != null) { ++ setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata); + } + return toObject; + } +-function liveServerToolCallCancellationFromMldev(apiClient, fromObject) { ++function contentEmbeddingStatisticsFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromIds = getValueByPath(fromObject, ['ids']); +- if (fromIds !== undefined) { +- setValueByPath(toObject, ['ids'], fromIds); ++ const fromTruncated = getValueByPath(fromObject, ['truncated']); ++ if (fromTruncated != null) { ++ setValueByPath(toObject, ['truncated'], fromTruncated); + } +- return toObject; +-} +-function liveServerToolCallCancellationFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromIds = getValueByPath(fromObject, ['ids']); +- if (fromIds !== undefined) { +- setValueByPath(toObject, ['ids'], fromIds); ++ const fromTokenCount = getValueByPath(fromObject, ['token_count']); ++ if (fromTokenCount != null) { ++ setValueByPath(toObject, ['tokenCount'], fromTokenCount); + } + return toObject; + } +-function liveServerGoAwayFromMldev(fromObject) { ++function contentEmbeddingFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']); +- if (fromTimeLeft !== undefined) { +- setValueByPath(toObject, ['timeLeft'], fromTimeLeft); ++ const fromValues = getValueByPath(fromObject, ['values']); ++ if (fromValues != null) { ++ setValueByPath(toObject, ['values'], fromValues); + } +- return toObject; +-} +-function liveServerGoAwayFromVertex(fromObject) { +- const toObject = {}; +- const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']); +- if (fromTimeLeft !== undefined) { +- setValueByPath(toObject, ['timeLeft'], fromTimeLeft); ++ const fromStatistics = getValueByPath(fromObject, ['statistics']); ++ if (fromStatistics != null) { ++ setValueByPath(toObject, ['statistics'], contentEmbeddingStatisticsFromVertex(apiClient, fromStatistics)); + } + return toObject; + } +-function liveServerSessionResumptionUpdateFromMldev(fromObject) { ++function embedContentMetadataFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromNewHandle = getValueByPath(fromObject, ['newHandle']); +- if (fromNewHandle !== undefined) { +- setValueByPath(toObject, ['newHandle'], fromNewHandle); +- } +- const fromResumable = getValueByPath(fromObject, ['resumable']); +- if (fromResumable !== undefined) { +- setValueByPath(toObject, ['resumable'], fromResumable); +- } +- const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [ +- 'lastConsumedClientMessageIndex', ++ const fromBillableCharacterCount = getValueByPath(fromObject, [ ++ 'billableCharacterCount', + ]); +- if (fromLastConsumedClientMessageIndex !== undefined) { +- setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex); ++ if (fromBillableCharacterCount != null) { ++ setValueByPath(toObject, ['billableCharacterCount'], fromBillableCharacterCount); + } + return toObject; + } +-function liveServerSessionResumptionUpdateFromVertex(fromObject) { ++function embedContentResponseFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromNewHandle = getValueByPath(fromObject, ['newHandle']); +- if (fromNewHandle !== undefined) { +- setValueByPath(toObject, ['newHandle'], fromNewHandle); +- } +- const fromResumable = getValueByPath(fromObject, ['resumable']); +- if (fromResumable !== undefined) { +- setValueByPath(toObject, ['resumable'], fromResumable); +- } +- const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [ +- 'lastConsumedClientMessageIndex', ++ const fromEmbeddings = getValueByPath(fromObject, [ ++ 'predictions[]', ++ 'embeddings', + ]); +- if (fromLastConsumedClientMessageIndex !== undefined) { +- setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex); +- } +- return toObject; +-} +-function liveClientSessionResumptionConfigToMldev(fromObject) { +- const toObject = {}; +- const fromHandle = getValueByPath(fromObject, ['handle']); +- if (fromHandle !== undefined) { +- setValueByPath(toObject, ['handle'], fromHandle); ++ if (fromEmbeddings != null) { ++ if (Array.isArray(fromEmbeddings)) { ++ setValueByPath(toObject, ['embeddings'], fromEmbeddings.map((item) => { ++ return contentEmbeddingFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['embeddings'], fromEmbeddings); ++ } + } +- if (getValueByPath(fromObject, ['transparent']) !== undefined) { +- throw new Error('transparent parameter is not supported in Gemini API.'); ++ const fromMetadata = getValueByPath(fromObject, ['metadata']); ++ if (fromMetadata != null) { ++ setValueByPath(toObject, ['metadata'], embedContentMetadataFromVertex(apiClient, fromMetadata)); + } + return toObject; + } +-function liveClientSessionResumptionConfigToVertex(fromObject) { ++function imageFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromHandle = getValueByPath(fromObject, ['handle']); +- if (fromHandle !== undefined) { +- setValueByPath(toObject, ['handle'], fromHandle); +- } +- const fromTransparent = getValueByPath(fromObject, ['transparent']); +- if (fromTransparent !== undefined) { +- setValueByPath(toObject, ['transparent'], fromTransparent); ++ const fromGcsUri = getValueByPath(fromObject, ['gcsUri']); ++ if (fromGcsUri != null) { ++ setValueByPath(toObject, ['gcsUri'], fromGcsUri); + } +- return toObject; +-} +-function modalityTokenCountFromMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromModality = getValueByPath(fromObject, ['modality']); +- if (fromModality != null) { +- setValueByPath(toObject, ['modality'], fromModality); ++ const fromImageBytes = getValueByPath(fromObject, [ ++ 'bytesBase64Encoded', ++ ]); ++ if (fromImageBytes != null) { ++ setValueByPath(toObject, ['imageBytes'], tBytes(apiClient, fromImageBytes)); + } +- const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); +- if (fromTokenCount != null) { +- setValueByPath(toObject, ['tokenCount'], fromTokenCount); ++ const fromMimeType = getValueByPath(fromObject, ['mimeType']); ++ if (fromMimeType != null) { ++ setValueByPath(toObject, ['mimeType'], fromMimeType); + } + return toObject; + } +-function usageMetadataFromMldev(apiClient, fromObject) { ++function safetyAttributesFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromPromptTokenCount = getValueByPath(fromObject, [ +- 'promptTokenCount', +- ]); +- if (fromPromptTokenCount != null) { +- setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount); +- } +- const fromCachedContentTokenCount = getValueByPath(fromObject, [ +- 'cachedContentTokenCount', ++ const fromCategories = getValueByPath(fromObject, [ ++ 'safetyAttributes', ++ 'categories', + ]); +- if (fromCachedContentTokenCount != null) { +- setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); ++ if (fromCategories != null) { ++ setValueByPath(toObject, ['categories'], fromCategories); + } +- const fromResponseTokenCount = getValueByPath(fromObject, [ +- 'responseTokenCount', ++ const fromScores = getValueByPath(fromObject, [ ++ 'safetyAttributes', ++ 'scores', + ]); +- if (fromResponseTokenCount != null) { +- setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount); ++ if (fromScores != null) { ++ setValueByPath(toObject, ['scores'], fromScores); + } +- const fromToolUsePromptTokenCount = getValueByPath(fromObject, [ +- 'toolUsePromptTokenCount', +- ]); +- if (fromToolUsePromptTokenCount != null) { +- setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount); ++ const fromContentType = getValueByPath(fromObject, ['contentType']); ++ if (fromContentType != null) { ++ setValueByPath(toObject, ['contentType'], fromContentType); + } +- const fromThoughtsTokenCount = getValueByPath(fromObject, [ +- 'thoughtsTokenCount', +- ]); +- if (fromThoughtsTokenCount != null) { +- setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount); ++ return toObject; ++} ++function generatedImageFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromImage = getValueByPath(fromObject, ['_self']); ++ if (fromImage != null) { ++ setValueByPath(toObject, ['image'], imageFromVertex(apiClient, fromImage)); + } +- const fromTotalTokenCount = getValueByPath(fromObject, [ +- 'totalTokenCount', ++ const fromRaiFilteredReason = getValueByPath(fromObject, [ ++ 'raiFilteredReason', + ]); +- if (fromTotalTokenCount != null) { +- setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount); ++ if (fromRaiFilteredReason != null) { ++ setValueByPath(toObject, ['raiFilteredReason'], fromRaiFilteredReason); + } +- const fromPromptTokensDetails = getValueByPath(fromObject, [ +- 'promptTokensDetails', +- ]); +- if (fromPromptTokensDetails != null) { +- if (Array.isArray(fromPromptTokensDetails)) { +- setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails.map((item) => { +- return modalityTokenCountFromMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails); +- } ++ const fromSafetyAttributes = getValueByPath(fromObject, ['_self']); ++ if (fromSafetyAttributes != null) { ++ setValueByPath(toObject, ['safetyAttributes'], safetyAttributesFromVertex(apiClient, fromSafetyAttributes)); + } +- const fromCacheTokensDetails = getValueByPath(fromObject, [ +- 'cacheTokensDetails', +- ]); +- if (fromCacheTokensDetails != null) { +- if (Array.isArray(fromCacheTokensDetails)) { +- setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails.map((item) => { +- return modalityTokenCountFromMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails); +- } ++ const fromEnhancedPrompt = getValueByPath(fromObject, ['prompt']); ++ if (fromEnhancedPrompt != null) { ++ setValueByPath(toObject, ['enhancedPrompt'], fromEnhancedPrompt); + } +- const fromResponseTokensDetails = getValueByPath(fromObject, [ +- 'responseTokensDetails', ++ return toObject; ++} ++function generateImagesResponseFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromGeneratedImages = getValueByPath(fromObject, [ ++ 'predictions', + ]); +- if (fromResponseTokensDetails != null) { +- if (Array.isArray(fromResponseTokensDetails)) { +- setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails.map((item) => { +- return modalityTokenCountFromMldev(apiClient, item); ++ if (fromGeneratedImages != null) { ++ if (Array.isArray(fromGeneratedImages)) { ++ setValueByPath(toObject, ['generatedImages'], fromGeneratedImages.map((item) => { ++ return generatedImageFromVertex(apiClient, item); + })); + } + else { +- setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails); ++ setValueByPath(toObject, ['generatedImages'], fromGeneratedImages); + } + } +- const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [ +- 'toolUsePromptTokensDetails', ++ const fromPositivePromptSafetyAttributes = getValueByPath(fromObject, [ ++ 'positivePromptSafetyAttributes', + ]); +- if (fromToolUsePromptTokensDetails != null) { +- if (Array.isArray(fromToolUsePromptTokensDetails)) { +- setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails.map((item) => { +- return modalityTokenCountFromMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails); +- } ++ if (fromPositivePromptSafetyAttributes != null) { ++ setValueByPath(toObject, ['positivePromptSafetyAttributes'], safetyAttributesFromVertex(apiClient, fromPositivePromptSafetyAttributes)); + } + return toObject; + } +-function modalityTokenCountFromVertex(apiClient, fromObject) { ++function endpointFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromModality = getValueByPath(fromObject, ['modality']); +- if (fromModality != null) { +- setValueByPath(toObject, ['modality'], fromModality); ++ const fromName = getValueByPath(fromObject, ['endpoint']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); + } +- const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); +- if (fromTokenCount != null) { +- setValueByPath(toObject, ['tokenCount'], fromTokenCount); ++ const fromDeployedModelId = getValueByPath(fromObject, [ ++ 'deployedModelId', ++ ]); ++ if (fromDeployedModelId != null) { ++ setValueByPath(toObject, ['deployedModelId'], fromDeployedModelId); + } + return toObject; + } +-function usageMetadataFromVertex(apiClient, fromObject) { ++function tunedModelInfoFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromPromptTokenCount = getValueByPath(fromObject, [ +- 'promptTokenCount', ++ const fromBaseModel = getValueByPath(fromObject, [ ++ 'labels', ++ 'google-vertex-llm-tuning-base-model-id', + ]); +- if (fromPromptTokenCount != null) { +- setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount); ++ if (fromBaseModel != null) { ++ setValueByPath(toObject, ['baseModel'], fromBaseModel); + } +- const fromCachedContentTokenCount = getValueByPath(fromObject, [ +- 'cachedContentTokenCount', +- ]); +- if (fromCachedContentTokenCount != null) { +- setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); ++ const fromCreateTime = getValueByPath(fromObject, ['createTime']); ++ if (fromCreateTime != null) { ++ setValueByPath(toObject, ['createTime'], fromCreateTime); + } +- const fromResponseTokenCount = getValueByPath(fromObject, [ +- 'candidatesTokenCount', +- ]); +- if (fromResponseTokenCount != null) { +- setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount); ++ const fromUpdateTime = getValueByPath(fromObject, ['updateTime']); ++ if (fromUpdateTime != null) { ++ setValueByPath(toObject, ['updateTime'], fromUpdateTime); + } +- const fromToolUsePromptTokenCount = getValueByPath(fromObject, [ +- 'toolUsePromptTokenCount', +- ]); +- if (fromToolUsePromptTokenCount != null) { +- setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount); ++ return toObject; ++} ++function modelFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); + } +- const fromThoughtsTokenCount = getValueByPath(fromObject, [ +- 'thoughtsTokenCount', +- ]); +- if (fromThoughtsTokenCount != null) { +- setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount); ++ const fromDisplayName = getValueByPath(fromObject, ['displayName']); ++ if (fromDisplayName != null) { ++ setValueByPath(toObject, ['displayName'], fromDisplayName); + } +- const fromTotalTokenCount = getValueByPath(fromObject, [ +- 'totalTokenCount', +- ]); +- if (fromTotalTokenCount != null) { +- setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount); ++ const fromDescription = getValueByPath(fromObject, ['description']); ++ if (fromDescription != null) { ++ setValueByPath(toObject, ['description'], fromDescription); + } +- const fromPromptTokensDetails = getValueByPath(fromObject, [ +- 'promptTokensDetails', +- ]); +- if (fromPromptTokensDetails != null) { +- if (Array.isArray(fromPromptTokensDetails)) { +- setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails.map((item) => { +- return modalityTokenCountFromVertex(apiClient, item); ++ const fromVersion = getValueByPath(fromObject, ['versionId']); ++ if (fromVersion != null) { ++ setValueByPath(toObject, ['version'], fromVersion); ++ } ++ const fromEndpoints = getValueByPath(fromObject, ['deployedModels']); ++ if (fromEndpoints != null) { ++ if (Array.isArray(fromEndpoints)) { ++ setValueByPath(toObject, ['endpoints'], fromEndpoints.map((item) => { ++ return endpointFromVertex(apiClient, item); + })); + } + else { +- setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails); ++ setValueByPath(toObject, ['endpoints'], fromEndpoints); + } + } +- const fromCacheTokensDetails = getValueByPath(fromObject, [ +- 'cacheTokensDetails', ++ const fromLabels = getValueByPath(fromObject, ['labels']); ++ if (fromLabels != null) { ++ setValueByPath(toObject, ['labels'], fromLabels); ++ } ++ const fromTunedModelInfo = getValueByPath(fromObject, ['_self']); ++ if (fromTunedModelInfo != null) { ++ setValueByPath(toObject, ['tunedModelInfo'], tunedModelInfoFromVertex(apiClient, fromTunedModelInfo)); ++ } ++ return toObject; ++} ++function countTokensResponseFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTotalTokens = getValueByPath(fromObject, ['totalTokens']); ++ if (fromTotalTokens != null) { ++ setValueByPath(toObject, ['totalTokens'], fromTotalTokens); ++ } ++ return toObject; ++} ++function computeTokensResponseFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTokensInfo = getValueByPath(fromObject, ['tokensInfo']); ++ if (fromTokensInfo != null) { ++ setValueByPath(toObject, ['tokensInfo'], fromTokensInfo); ++ } ++ return toObject; ++} ++function videoFromVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromUri = getValueByPath(fromObject, ['gcsUri']); ++ if (fromUri != null) { ++ setValueByPath(toObject, ['uri'], fromUri); ++ } ++ const fromVideoBytes = getValueByPath(fromObject, [ ++ 'bytesBase64Encoded', + ]); +- if (fromCacheTokensDetails != null) { +- if (Array.isArray(fromCacheTokensDetails)) { +- setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails.map((item) => { +- return modalityTokenCountFromVertex(apiClient, item); ++ if (fromVideoBytes != null) { ++ setValueByPath(toObject, ['videoBytes'], tBytes(apiClient, fromVideoBytes)); ++ } ++ const fromMimeType = getValueByPath(fromObject, ['mimeType']); ++ if (fromMimeType != null) { ++ setValueByPath(toObject, ['mimeType'], fromMimeType); ++ } ++ return toObject; ++} ++function generatedVideoFromVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromVideo = getValueByPath(fromObject, ['_self']); ++ if (fromVideo != null) { ++ setValueByPath(toObject, ['video'], videoFromVertex$1(apiClient, fromVideo)); ++ } ++ return toObject; ++} ++function generateVideosResponseFromVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromGeneratedVideos = getValueByPath(fromObject, ['videos']); ++ if (fromGeneratedVideos != null) { ++ if (Array.isArray(fromGeneratedVideos)) { ++ setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos.map((item) => { ++ return generatedVideoFromVertex$1(apiClient, item); + })); + } + else { +- setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails); ++ setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos); + } + } +- const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [ +- 'toolUsePromptTokensDetails', ++ const fromRaiMediaFilteredCount = getValueByPath(fromObject, [ ++ 'raiMediaFilteredCount', + ]); +- if (fromToolUsePromptTokensDetails != null) { +- if (Array.isArray(fromToolUsePromptTokensDetails)) { +- setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails.map((item) => { +- return modalityTokenCountFromVertex(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails); +- } ++ if (fromRaiMediaFilteredCount != null) { ++ setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount); + } +- const fromResponseTokensDetails = getValueByPath(fromObject, [ +- 'candidatesTokensDetails', ++ const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [ ++ 'raiMediaFilteredReasons', + ]); +- if (fromResponseTokensDetails != null) { +- if (Array.isArray(fromResponseTokensDetails)) { +- setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails.map((item) => { +- return modalityTokenCountFromVertex(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails); +- } ++ if (fromRaiMediaFilteredReasons != null) { ++ setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons); + } +- const fromTrafficType = getValueByPath(fromObject, ['trafficType']); +- if (fromTrafficType != null) { +- setValueByPath(toObject, ['trafficType'], fromTrafficType); ++ return toObject; ++} ++function generateVideosOperationFromVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); ++ } ++ const fromMetadata = getValueByPath(fromObject, ['metadata']); ++ if (fromMetadata != null) { ++ setValueByPath(toObject, ['metadata'], fromMetadata); ++ } ++ const fromDone = getValueByPath(fromObject, ['done']); ++ if (fromDone != null) { ++ setValueByPath(toObject, ['done'], fromDone); ++ } ++ const fromError = getValueByPath(fromObject, ['error']); ++ if (fromError != null) { ++ setValueByPath(toObject, ['error'], fromError); ++ } ++ const fromResponse = getValueByPath(fromObject, ['response']); ++ if (fromResponse != null) { ++ setValueByPath(toObject, ['response'], generateVideosResponseFromVertex$1(apiClient, fromResponse)); + } + return toObject; + } +@@ -7246,17 +7755,20 @@ class Live { + @experimental + + @remarks +- If using the Gemini API, Live is currently only supported behind API +- version `v1alpha`. Ensure that the API version is set to `v1alpha` when +- initializing the SDK if relying on the Gemini API. + + @param params - The parameters for establishing a connection to the model. + @return A live session. + + @example + ```ts ++ let model: string; ++ if (GOOGLE_GENAI_USE_VERTEXAI) { ++ model = 'gemini-2.0-flash-live-preview-04-09'; ++ } else { ++ model = 'gemini-2.0-flash-live-001'; ++ } + const session = await ai.live.connect({ +- model: 'gemini-2.0-flash-exp', ++ model: model, + config: { + responseModalities: [Modality.AUDIO], + }, +@@ -7278,7 +7790,7 @@ class Live { + ``` + */ + async connect(params) { +- var _a, _b; ++ var _a, _b, _c; + const websocketBaseUrl = this.apiClient.getWebsocketBaseUrl(); + const apiVersion = this.apiClient.getApiVersion(); + let url; +@@ -7325,6 +7837,16 @@ class Live { + `projects/${project}/locations/${location}/` + transformedModel; + } + let clientMessage = {}; ++ if (this.apiClient.isVertexAI() && ++ ((_c = params.config) === null || _c === void 0 ? void 0 : _c.responseModalities) === undefined) { ++ // Set default to AUDIO to align with MLDev API. ++ if (params.config === undefined) { ++ params.config = { responseModalities: [Modality.AUDIO] }; ++ } ++ else { ++ params.config.responseModalities = [Modality.AUDIO]; ++ } ++ } + const liveConnectParameters = { + model: transformedModel, + config: params.config, +@@ -7336,6 +7858,7 @@ class Live { + else { + clientMessage = liveConnectParametersToMldev(this.apiClient, liveConnectParameters); + } ++ delete clientMessage['config']; + conn.send(JSON.stringify(clientMessage)); + return new Session(conn, this.apiClient); + } +@@ -7532,8 +8055,14 @@ class Session { + + @example + ```ts ++ let model: string; ++ if (GOOGLE_GENAI_USE_VERTEXAI) { ++ model = 'gemini-2.0-flash-live-preview-04-09'; ++ } else { ++ model = 'gemini-2.0-flash-live-001'; ++ } + const session = await ai.live.connect({ +- model: 'gemini-2.0-flash-exp', ++ model: model, + config: { + responseModalities: [Modality.AUDIO], + } +@@ -7799,7 +8328,7 @@ class Models extends BaseModule { + _c = apiResponse_1_1.value; + _d = false; + const chunk = _c; +- const resp = generateContentResponseFromVertex(apiClient, chunk); ++ const resp = generateContentResponseFromVertex(apiClient, (yield __await(chunk.json()))); + const typedResp = new GenerateContentResponse(); + Object.assign(typedResp, resp); + yield yield __await(typedResp); +@@ -7838,7 +8367,7 @@ class Models extends BaseModule { + _c = apiResponse_2_1.value; + _d = false; + const chunk = _c; +- const resp = generateContentResponseFromMldev(apiClient, chunk); ++ const resp = generateContentResponseFromMldev(apiClient, (yield __await(chunk.json()))); + const typedResp = new GenerateContentResponse(); + Object.assign(typedResp, resp); + yield yield __await(typedResp); +@@ -8400,13 +8929,6 @@ function generateVideosOperationFromMldev(apiClient, fromObject) { + if (fromResponse != null) { + setValueByPath(toObject, ['response'], generateVideosResponseFromMldev(apiClient, fromResponse)); + } +- const fromResult = getValueByPath(fromObject, [ +- 'response', +- 'generateVideoResponse', +- ]); +- if (fromResult != null) { +- setValueByPath(toObject, ['result'], generateVideosResponseFromMldev(apiClient, fromResult)); +- } + return toObject; + } + function videoFromVertex(apiClient, fromObject) { +@@ -8484,10 +9006,6 @@ function generateVideosOperationFromVertex(apiClient, fromObject) { + if (fromResponse != null) { + setValueByPath(toObject, ['response'], generateVideosResponseFromVertex(apiClient, fromResponse)); + } +- const fromResult = getValueByPath(fromObject, ['response']); +- if (fromResult != null) { +- setValueByPath(toObject, ['result'], generateVideosResponseFromVertex(apiClient, fromResult)); +- } + return toObject; + } + +@@ -8515,7 +9033,7 @@ class Operations extends BaseModule { + } + if (this.apiClient.isVertexAI()) { + const resourceName = operation.name.split('/operations/')[0]; +- var httpOptions = undefined; ++ let httpOptions = undefined; + if (config && 'httpOptions' in config) { + httpOptions = config.httpOptions; + } +@@ -8702,5 +9220,5 @@ class GoogleGenAI { + } + } + +-export { ActivityHandling, BlockedReason, Caches, Chat, Chats, ComputeTokensResponse, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DynamicRetrievalConfigMode, EmbedContentResponse, EndSensitivity, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpResponse, ImagePromptLanguage, Language, ListCachedContentsResponse, ListFilesResponse, Live, LiveClientToolResponse, LiveSendToolResponseParameters, MaskReferenceMode, MediaModality, MediaResolution, Modality, Mode, Models, Operations, Outcome, PagedItem, Pager, PersonGeneration, ReplayResponse, SafetyFilterLevel, Session, StartSensitivity, SubjectReferenceType, TrafficType, TurnCoverage, Type, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent }; ++export { ActivityHandling, BlockedReason, Caches, Chat, Chats, ComputeTokensResponse, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DynamicRetrievalConfigMode, EmbedContentResponse, EndSensitivity, FeatureSelectionPreference, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpResponse, ImagePromptLanguage, Language, ListCachedContentsResponse, ListFilesResponse, Live, LiveClientToolResponse, LiveSendToolResponseParameters, MaskReferenceMode, MediaModality, MediaResolution, Modality, Mode, Models, Operations, Outcome, PagedItem, Pager, PersonGeneration, ReplayResponse, SafetyFilterLevel, Session, StartSensitivity, SubjectReferenceType, TrafficType, TurnCoverage, Type, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent }; + //# sourceMappingURL=index.mjs.map +diff --git a/dist/index.mjs.map b/dist/index.mjs.map +index 32333e3076550314e4ec7165844ce2b375bdaf87..9ff7b8a597037ad654ea02a3afbce36c7babc411 100644 +--- a/dist/index.mjs.map ++++ b/dist/index.mjs.map +@@ -1 +1 @@ +-{"version":3,"file":"index.mjs","sources":["../src/_common.ts","../src/_transformers.ts","../src/converters/_caches_converters.ts","../src/pagers.ts","../src/types.ts","../src/caches.ts","../src/chats.ts","../src/_api_client.ts","../src/cross/_cross_error.ts","../src/cross/_cross_uploader.ts","../src/cross/_cross_websocket.ts","../src/converters/_files_converters.ts","../src/files.ts","../src/converters/_models_converters.ts","../src/converters/_live_converters.ts","../src/live.ts","../src/models.ts","../src/converters/_operations_converters.ts","../src/operations.ts","../src/web/_web_auth.ts","../src/client.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport class BaseModule {}\n\nexport function formatMap(\n templateString: string,\n valueMap: Record,\n): string {\n // Use a regular expression to find all placeholders in the template string\n const regex = /\\{([^}]+)\\}/g;\n\n // Replace each placeholder with its corresponding value from the valueMap\n return templateString.replace(regex, (match, key) => {\n if (Object.prototype.hasOwnProperty.call(valueMap, key)) {\n const value = valueMap[key];\n // Convert the value to a string if it's not a string already\n return value !== undefined && value !== null ? String(value) : '';\n } else {\n // Handle missing keys\n throw new Error(`Key '${key}' not found in valueMap.`);\n }\n });\n}\n\nexport function setValueByPath(\n data: Record,\n keys: string[],\n value: unknown,\n): void {\n for (let i = 0; i < keys.length - 1; i++) {\n const key = keys[i];\n\n if (key.endsWith('[]')) {\n const keyName = key.slice(0, -2);\n if (!(keyName in data)) {\n if (Array.isArray(value)) {\n data[keyName] = Array.from({length: value.length}, () => ({}));\n } else {\n throw new Error(`Value must be a list given an array path ${key}`);\n }\n }\n\n if (Array.isArray(data[keyName])) {\n const arrayData = data[keyName] as Array;\n\n if (Array.isArray(value)) {\n for (let j = 0; j < arrayData.length; j++) {\n const entry = arrayData[j] as Record;\n setValueByPath(entry, keys.slice(i + 1), value[j]);\n }\n } else {\n for (const d of arrayData) {\n setValueByPath(\n d as Record,\n keys.slice(i + 1),\n value,\n );\n }\n }\n }\n return;\n } else if (key.endsWith('[0]')) {\n const keyName = key.slice(0, -3);\n if (!(keyName in data)) {\n data[keyName] = [{}];\n }\n const arrayData = (data as Record)[keyName];\n setValueByPath(\n (arrayData as Array>)[0],\n keys.slice(i + 1),\n value,\n );\n return;\n }\n\n if (!data[key] || typeof data[key] !== 'object') {\n data[key] = {};\n }\n\n data = data[key] as Record;\n }\n\n const keyToSet = keys[keys.length - 1];\n const existingData = data[keyToSet];\n\n if (existingData !== undefined) {\n if (\n !value ||\n (typeof value === 'object' && Object.keys(value).length === 0)\n ) {\n return;\n }\n\n if (value === existingData) {\n return;\n }\n\n if (\n typeof existingData === 'object' &&\n typeof value === 'object' &&\n existingData !== null &&\n value !== null\n ) {\n Object.assign(existingData, value);\n } else {\n throw new Error(`Cannot set value for an existing key. Key: ${keyToSet}`);\n }\n } else {\n data[keyToSet] = value;\n }\n}\n\nexport function getValueByPath(data: unknown, keys: string[]): unknown {\n try {\n if (keys.length === 1 && keys[0] === '_self') {\n return data;\n }\n\n for (let i = 0; i < keys.length; i++) {\n if (typeof data !== 'object' || data === null) {\n return undefined;\n }\n\n const key = keys[i];\n if (key.endsWith('[]')) {\n const keyName = key.slice(0, -2);\n if (keyName in data) {\n const arrayData = (data as Record)[keyName];\n if (!Array.isArray(arrayData)) {\n return undefined;\n }\n return arrayData.map((d) => getValueByPath(d, keys.slice(i + 1)));\n } else {\n return undefined;\n }\n } else {\n data = (data as Record)[key];\n }\n }\n\n return data;\n } catch (error) {\n if (error instanceof TypeError) {\n return undefined;\n }\n throw error;\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ApiClient} from './_api_client';\nimport * as types from './types';\n\nexport function tModel(apiClient: ApiClient, model: string | unknown): string {\n if (!model || typeof model !== 'string') {\n throw new Error('model is required and must be a string');\n }\n\n if (apiClient.isVertexAI()) {\n if (\n model.startsWith('publishers/') ||\n model.startsWith('projects/') ||\n model.startsWith('models/')\n ) {\n return model;\n } else if (model.indexOf('/') >= 0) {\n const parts = model.split('/', 2);\n return `publishers/${parts[0]}/models/${parts[1]}`;\n } else {\n return `publishers/google/models/${model}`;\n }\n } else {\n if (model.startsWith('models/') || model.startsWith('tunedModels/')) {\n return model;\n } else {\n return `models/${model}`;\n }\n }\n}\n\nexport function tCachesModel(\n apiClient: ApiClient,\n model: string | unknown,\n): string {\n const transformedModel = tModel(apiClient, model as string);\n if (!transformedModel) {\n return '';\n }\n\n if (transformedModel.startsWith('publishers/') && apiClient.isVertexAI()) {\n // vertex caches only support model name start with projects.\n return `projects/${apiClient.getProject()}/locations/${apiClient.getLocation()}/${transformedModel}`;\n } else if (transformedModel.startsWith('models/') && apiClient.isVertexAI()) {\n return `projects/${apiClient.getProject()}/locations/${apiClient.getLocation()}/publishers/google/${transformedModel}`;\n } else {\n return transformedModel;\n }\n}\n\nexport function tPart(\n apiClient: ApiClient,\n origin?: types.PartUnion | null,\n): types.Part {\n if (origin === null || origin === undefined) {\n throw new Error('PartUnion is required');\n }\n if (typeof origin === 'object') {\n return origin;\n }\n if (typeof origin === 'string') {\n return {text: origin};\n }\n throw new Error(`Unsupported part type: ${typeof origin}`);\n}\n\nexport function tParts(\n apiClient: ApiClient,\n origin?: types.PartListUnion | null,\n): types.Part[] {\n if (\n origin === null ||\n origin === undefined ||\n (Array.isArray(origin) && origin.length === 0)\n ) {\n throw new Error('PartListUnion is required');\n }\n if (Array.isArray(origin)) {\n return origin.map((item) => tPart(apiClient, item as types.PartUnion)!);\n }\n return [tPart(apiClient, origin)!];\n}\n\nfunction _isContent(origin: unknown): boolean {\n return (\n origin !== null &&\n origin !== undefined &&\n typeof origin === 'object' &&\n 'parts' in origin &&\n Array.isArray(origin.parts)\n );\n}\n\nfunction _isFunctionCallPart(origin: unknown): boolean {\n return (\n origin !== null &&\n origin !== undefined &&\n typeof origin === 'object' &&\n 'functionCall' in origin\n );\n}\n\nfunction _isUserPart(origin: unknown): boolean {\n if (origin === null || origin === undefined) {\n return false;\n }\n if (_isFunctionCallPart(origin)) {\n return false;\n }\n return true;\n}\n\nfunction _areUserParts(origin: types.PartListUnion[]): boolean {\n if (\n origin === null ||\n origin === undefined ||\n (Array.isArray(origin) && origin.length === 0)\n ) {\n return false;\n }\n return origin.every(_isUserPart);\n}\n\nexport function tContent(\n apiClient: ApiClient,\n origin?: types.ContentUnion,\n): types.Content {\n if (origin === null || origin === undefined) {\n throw new Error('ContentUnion is required');\n }\n if (_isContent(origin)) {\n // @ts-expect-error: _isContent is a utility function that checks if the\n // origin is a Content.\n return origin;\n }\n\n if (_isUserPart(origin)) {\n return {\n role: 'user',\n parts: tParts(apiClient, origin as types.PartListUnion)!,\n };\n } else {\n return {\n role: 'model',\n parts: tParts(apiClient, origin as types.PartListUnion)!,\n };\n }\n}\n\nexport function tContentsForEmbed(\n apiClient: ApiClient,\n origin: types.ContentListUnion,\n): types.ContentUnion[] {\n if (!origin) {\n return [];\n }\n if (apiClient.isVertexAI() && Array.isArray(origin)) {\n return origin.flatMap((item) => {\n const content = tContent(apiClient, item as types.ContentUnion);\n if (\n content.parts &&\n content.parts.length > 0 &&\n content.parts[0].text !== undefined\n ) {\n return [content.parts[0].text];\n }\n return [];\n });\n } else if (apiClient.isVertexAI()) {\n const content = tContent(apiClient, origin as types.ContentUnion);\n if (\n content.parts &&\n content.parts.length > 0 &&\n content.parts[0].text !== undefined\n ) {\n return [content.parts[0].text];\n }\n return [];\n }\n if (Array.isArray(origin)) {\n return origin.map(\n (item) => tContent(apiClient, item as types.ContentUnion)!,\n );\n }\n return [tContent(apiClient, origin as types.ContentUnion)!];\n}\n\nfunction _appendAccumulatedPartsAsContent(\n apiClient: ApiClient,\n result: types.Content[],\n accumulatedParts: types.PartUnion[],\n) {\n if (accumulatedParts.length === 0) {\n return;\n }\n if (_areUserParts(accumulatedParts)) {\n result.push({\n role: 'user',\n parts: tParts(apiClient, accumulatedParts),\n });\n } else {\n result.push({\n role: 'model',\n parts: tParts(apiClient, accumulatedParts),\n });\n }\n accumulatedParts.length = 0; // clear the array inplace\n}\n\nfunction _handleCurrentPart(\n apiClient: ApiClient,\n result: types.Content[],\n accumulatedParts: types.PartUnion[],\n currentPart: types.PartUnion,\n) {\n if (_isUserPart(currentPart) === _areUserParts(accumulatedParts)) {\n accumulatedParts.push(currentPart);\n } else {\n _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts);\n accumulatedParts.length = 0;\n accumulatedParts.push(currentPart);\n }\n}\n\nexport function tContents(\n apiClient: ApiClient,\n origin?: types.ContentListUnion,\n): types.Content[] {\n if (\n origin === null ||\n origin === undefined ||\n (Array.isArray(origin) && origin.length === 0)\n ) {\n throw new Error('contents are required');\n }\n if (!Array.isArray(origin)) {\n return [tContent(apiClient, origin)];\n }\n\n const result: types.Content[] = [];\n const accumulatedParts: types.PartUnion[] = [];\n\n for (const content of origin) {\n if (_isContent(content)) {\n _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts);\n // @ts-expect-error: content is a Content here\n result.push(content);\n } else if (\n typeof content === 'string' ||\n (typeof content === 'object' && !Array.isArray(content))\n ) {\n // @ts-expect-error: content is a part here\n _handleCurrentPart(apiClient, result, accumulatedParts, content);\n } else if (Array.isArray(content)) {\n // if there're consecutive user parts before the list,\n // convert to UserContent and append to result\n _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts);\n result.push({\n role: 'user',\n parts: tParts(apiClient, content),\n });\n } else {\n throw new Error(`Unsupported content type: ${typeof content}`);\n }\n }\n _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts);\n\n return result;\n}\n\nexport function processSchema(apiClient: ApiClient, schema: types.Schema) {\n if (!apiClient.isVertexAI()) {\n if ('default' in schema) {\n throw new Error(\n 'Default value is not supported in the response schema for the Gemini API.',\n );\n }\n }\n\n if ('anyOf' in schema) {\n if (schema['anyOf'] !== undefined) {\n for (const subSchema of schema['anyOf']) {\n processSchema(apiClient, subSchema);\n }\n }\n }\n\n if ('items' in schema) {\n if (schema['items'] !== undefined) {\n processSchema(apiClient, schema['items']);\n }\n }\n\n if ('properties' in schema) {\n if (schema['properties'] !== undefined) {\n for (const subSchema of Object.values(schema['properties'])) {\n processSchema(apiClient, subSchema);\n }\n }\n }\n}\n\nexport function tSchema(\n apiClient: ApiClient,\n schema: types.Schema,\n): types.Schema {\n processSchema(apiClient, schema);\n return schema;\n}\n\nexport function tSpeechConfig(\n apiClient: ApiClient,\n speechConfig: types.SpeechConfigUnion,\n): types.SpeechConfig {\n if (typeof speechConfig === 'object' && 'voiceConfig' in speechConfig) {\n return speechConfig;\n } else if (typeof speechConfig === 'string') {\n return {\n voiceConfig: {\n prebuiltVoiceConfig: {\n voiceName: speechConfig,\n },\n },\n };\n } else {\n throw new Error(`Unsupported speechConfig type: ${typeof speechConfig}`);\n }\n}\n\nexport function tTool(apiClient: ApiClient, tool: types.Tool): types.Tool {\n return tool;\n}\n\nexport function tTools(\n apiClient: ApiClient,\n tool: types.Tool[] | unknown,\n): types.Tool[] {\n if (!Array.isArray(tool)) {\n throw new Error('tool is required and must be an array of Tools');\n }\n return tool;\n}\n\n/**\n * Prepends resource name with project, location, resource_prefix if needed.\n *\n * @param client The API client.\n * @param resourceName The resource name.\n * @param resourcePrefix The resource prefix.\n * @param splitsAfterPrefix The number of splits after the prefix.\n * @returns The completed resource name.\n *\n * Examples:\n *\n * ```\n * resource_name = '123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = True\n * client.project = 'bar'\n * client.location = 'us-west1'\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns: 'projects/bar/locations/us-west1/cachedContents/123'\n * ```\n *\n * ```\n * resource_name = 'projects/foo/locations/us-central1/cachedContents/123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = True\n * client.project = 'bar'\n * client.location = 'us-west1'\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns: 'projects/foo/locations/us-central1/cachedContents/123'\n * ```\n *\n * ```\n * resource_name = '123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = False\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns 'cachedContents/123'\n * ```\n *\n * ```\n * resource_name = 'some/wrong/cachedContents/resource/name/123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = False\n * # client.vertexai = True\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * -> 'some/wrong/resource/name/123'\n * ```\n */\nfunction resourceName(\n client: ApiClient,\n resourceName: string,\n resourcePrefix: string,\n splitsAfterPrefix: number = 1,\n): string {\n const shouldAppendPrefix =\n !resourceName.startsWith(`${resourcePrefix}/`) &&\n resourceName.split('/').length === splitsAfterPrefix;\n if (client.isVertexAI()) {\n if (resourceName.startsWith('projects/')) {\n return resourceName;\n } else if (resourceName.startsWith('locations/')) {\n return `projects/${client.getProject()}/${resourceName}`;\n } else if (resourceName.startsWith(`${resourcePrefix}/`)) {\n return `projects/${client.getProject()}/locations/${client.getLocation()}/${resourceName}`;\n } else if (shouldAppendPrefix) {\n return `projects/${client.getProject()}/locations/${client.getLocation()}/${resourcePrefix}/${resourceName}`;\n } else {\n return resourceName;\n }\n }\n if (shouldAppendPrefix) {\n return `${resourcePrefix}/${resourceName}`;\n }\n return resourceName;\n}\n\nexport function tCachedContentName(\n apiClient: ApiClient,\n name: string | unknown,\n): string {\n if (typeof name !== 'string') {\n throw new Error('name must be a string');\n }\n return resourceName(apiClient, name, 'cachedContents');\n}\n\nexport function tTuningJobStatus(\n apiClient: ApiClient,\n status: string | unknown,\n): string {\n switch (status) {\n case 'STATE_UNSPECIFIED':\n return 'JOB_STATE_UNSPECIFIED';\n case 'CREATING':\n return 'JOB_STATE_RUNNING';\n case 'ACTIVE':\n return 'JOB_STATE_SUCCEEDED';\n case 'FAILED':\n return 'JOB_STATE_FAILED';\n default:\n return status as string;\n }\n}\n\nexport function tBytes(\n apiClient: ApiClient,\n fromImageBytes: string | unknown,\n): string {\n if (typeof fromImageBytes !== 'string') {\n throw new Error('fromImageBytes must be a string');\n }\n // TODO(b/389133914): Remove dummy bytes converter.\n return fromImageBytes;\n}\nexport function tFileName(\n apiClient: ApiClient,\n fromName: string | unknown,\n): string {\n if (typeof fromName !== 'string') {\n throw new Error('fromName must be a string');\n }\n // Remove the files/ prefx for MLdev urls to get the actual name of the file.\n if (fromName.startsWith('files/')) {\n return fromName.split('files/')[1];\n }\n return fromName;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function partToMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['videoMetadata']) !== undefined) {\n throw new Error('videoMetadata parameter is not supported in Gemini API.');\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToMldev(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['example']) !== undefined) {\n throw new Error('example parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['pattern']) !== undefined) {\n throw new Error('pattern parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['default']) !== undefined) {\n throw new Error('default parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxLength']) !== undefined) {\n throw new Error('maxLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minLength']) !== undefined) {\n throw new Error('minLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minProperties']) !== undefined) {\n throw new Error('minProperties parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxProperties']) !== undefined) {\n throw new Error('maxProperties parameter is not supported in Gemini API.');\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['response']) !== undefined) {\n throw new Error('response parameter is not supported in Gemini API.');\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToMldev(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToMldev(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n if (common.getValueByPath(fromObject, ['retrieval']) !== undefined) {\n throw new Error('retrieval parameter is not supported in Gemini API.');\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToMldev());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (parentObject !== undefined && fromDisplayName != null) {\n common.setValueByPath(parentObject, ['displayName'], fromDisplayName);\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (parentObject !== undefined && fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToMldev(apiClient, fromToolConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['model'],\n t.tCachesModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n createCachedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.DeleteCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n updateCachedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function listCachedContentsConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listCachedContentsParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listCachedContentsConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partToVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToVertex(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n const fromExample = common.getValueByPath(fromObject, ['example']);\n if (fromExample != null) {\n common.setValueByPath(toObject, ['example'], fromExample);\n }\n\n const fromPattern = common.getValueByPath(fromObject, ['pattern']);\n if (fromPattern != null) {\n common.setValueByPath(toObject, ['pattern'], fromPattern);\n }\n\n const fromDefault = common.getValueByPath(fromObject, ['default']);\n if (fromDefault != null) {\n common.setValueByPath(toObject, ['default'], fromDefault);\n }\n\n const fromMaxLength = common.getValueByPath(fromObject, ['maxLength']);\n if (fromMaxLength != null) {\n common.setValueByPath(toObject, ['maxLength'], fromMaxLength);\n }\n\n const fromMinLength = common.getValueByPath(fromObject, ['minLength']);\n if (fromMinLength != null) {\n common.setValueByPath(toObject, ['minLength'], fromMinLength);\n }\n\n const fromMinProperties = common.getValueByPath(fromObject, [\n 'minProperties',\n ]);\n if (fromMinProperties != null) {\n common.setValueByPath(toObject, ['minProperties'], fromMinProperties);\n }\n\n const fromMaxProperties = common.getValueByPath(fromObject, [\n 'maxProperties',\n ]);\n if (fromMaxProperties != null) {\n common.setValueByPath(toObject, ['maxProperties'], fromMaxProperties);\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n schemaToVertex(apiClient, fromResponse),\n );\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToVertex(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToVertex(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n const fromRetrieval = common.getValueByPath(fromObject, ['retrieval']);\n if (fromRetrieval != null) {\n common.setValueByPath(toObject, ['retrieval'], fromRetrieval);\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToVertex());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (parentObject !== undefined && fromDisplayName != null) {\n common.setValueByPath(parentObject, ['displayName'], fromDisplayName);\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (parentObject !== undefined && fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToVertex(apiClient, fromToolConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['model'],\n t.tCachesModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n createCachedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.DeleteCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n updateCachedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function listCachedContentsConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listCachedContentsParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listCachedContentsConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function cachedContentFromMldev(\n apiClient: ApiClient,\n fromObject: types.CachedContent,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (fromExpireTime != null) {\n common.setValueByPath(toObject, ['expireTime'], fromExpireTime);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentResponseFromMldev(): Record<\n string,\n unknown\n> {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function listCachedContentsResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromCachedContents = common.getValueByPath(fromObject, [\n 'cachedContents',\n ]);\n if (fromCachedContents != null) {\n if (Array.isArray(fromCachedContents)) {\n common.setValueByPath(\n toObject,\n ['cachedContents'],\n fromCachedContents.map((item) => {\n return cachedContentFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['cachedContents'], fromCachedContents);\n }\n }\n\n return toObject;\n}\n\nexport function cachedContentFromVertex(\n apiClient: ApiClient,\n fromObject: types.CachedContent,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (fromExpireTime != null) {\n common.setValueByPath(toObject, ['expireTime'], fromExpireTime);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentResponseFromVertex(): Record<\n string,\n unknown\n> {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function listCachedContentsResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromCachedContents = common.getValueByPath(fromObject, [\n 'cachedContents',\n ]);\n if (fromCachedContents != null) {\n if (Array.isArray(fromCachedContents)) {\n common.setValueByPath(\n toObject,\n ['cachedContents'],\n fromCachedContents.map((item) => {\n return cachedContentFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['cachedContents'], fromCachedContents);\n }\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Pagers for the GenAI List APIs.\n */\n\nexport enum PagedItem {\n PAGED_ITEM_BATCH_JOBS = 'batchJobs',\n PAGED_ITEM_MODELS = 'models',\n PAGED_ITEM_TUNING_JOBS = 'tuningJobs',\n PAGED_ITEM_FILES = 'files',\n PAGED_ITEM_CACHED_CONTENTS = 'cachedContents',\n}\n\ninterface PagedItemConfig {\n config?: {\n pageToken?: string;\n pageSize?: number;\n };\n}\n\ninterface PagedItemResponse {\n nextPageToken?: string;\n batchJobs?: T[];\n models?: T[];\n tuningJobs?: T[];\n files?: T[];\n cachedContents?: T[];\n}\n\n/**\n * Pager class for iterating through paginated results.\n */\nexport class Pager implements AsyncIterable {\n private nameInternal!: PagedItem;\n private pageInternal: T[] = [];\n private paramsInternal: PagedItemConfig = {};\n private pageInternalSize!: number;\n protected requestInternal!: (\n params: PagedItemConfig,\n ) => Promise>;\n protected idxInternal!: number;\n\n constructor(\n name: PagedItem,\n request: (params: PagedItemConfig) => Promise>,\n response: PagedItemResponse,\n params: PagedItemConfig,\n ) {\n this.requestInternal = request;\n this.init(name, response, params);\n }\n\n private init(\n name: PagedItem,\n response: PagedItemResponse,\n params: PagedItemConfig,\n ) {\n this.nameInternal = name;\n this.pageInternal = response[this.nameInternal] || [];\n this.idxInternal = 0;\n let requestParams: PagedItemConfig = {config: {}};\n if (!params) {\n requestParams = {config: {}};\n } else if (typeof params === 'object') {\n requestParams = {...params};\n } else {\n requestParams = params;\n }\n if (requestParams['config']) {\n requestParams['config']['pageToken'] = response['nextPageToken'];\n }\n this.paramsInternal = requestParams;\n this.pageInternalSize =\n requestParams['config']?.['pageSize'] ?? this.pageInternal.length;\n }\n\n private initNextPage(response: PagedItemResponse): void {\n this.init(this.nameInternal, response, this.paramsInternal);\n }\n\n /**\n * Returns the current page, which is a list of items.\n *\n * @remarks\n * The first page is retrieved when the pager is created. The returned list of\n * items could be a subset of the entire list.\n */\n get page(): T[] {\n return this.pageInternal;\n }\n\n /**\n * Returns the type of paged item (for example, ``batch_jobs``).\n */\n get name(): PagedItem {\n return this.nameInternal;\n }\n\n /**\n * Returns the length of the page fetched each time by this pager.\n *\n * @remarks\n * The number of items in the page is less than or equal to the page length.\n */\n get pageSize(): number {\n return this.pageInternalSize;\n }\n\n /**\n * Returns the parameters when making the API request for the next page.\n *\n * @remarks\n * Parameters contain a set of optional configs that can be\n * used to customize the API request. For example, the `pageToken` parameter\n * contains the token to request the next page.\n */\n get params(): PagedItemConfig {\n return this.paramsInternal;\n }\n\n /**\n * Returns the total number of items in the current page.\n */\n get pageLength(): number {\n return this.pageInternal.length;\n }\n\n /**\n * Returns the item at the given index.\n */\n getItem(index: number): T {\n return this.pageInternal[index];\n }\n\n /**\n * Returns an async iterator that support iterating through all items\n * retrieved from the API.\n *\n * @remarks\n * The iterator will automatically fetch the next page if there are more items\n * to fetch from the API.\n *\n * @example\n *\n * ```ts\n * const pager = await ai.files.list({config: {pageSize: 10}});\n * for await (const file of pager) {\n * console.log(file.name);\n * }\n * ```\n */\n [Symbol.asyncIterator](): AsyncIterator {\n return {\n next: async () => {\n if (this.idxInternal >= this.pageLength) {\n if (this.hasNextPage()) {\n await this.nextPage();\n } else {\n return {value: undefined, done: true};\n }\n }\n const item = this.getItem(this.idxInternal);\n this.idxInternal += 1;\n return {value: item, done: false};\n },\n return: async () => {\n return {value: undefined, done: true};\n },\n };\n }\n\n /**\n * Fetches the next page of items. This makes a new API request.\n *\n * @throws {Error} If there are no more pages to fetch.\n *\n * @example\n *\n * ```ts\n * const pager = await ai.files.list({config: {pageSize: 10}});\n * let page = pager.page;\n * while (true) {\n * for (const file of page) {\n * console.log(file.name);\n * }\n * if (!pager.hasNextPage()) {\n * break;\n * }\n * page = await pager.nextPage();\n * }\n * ```\n */\n async nextPage(): Promise {\n if (!this.hasNextPage()) {\n throw new Error('No more pages to fetch.');\n }\n const response = await this.requestInternal(this.params);\n this.initNextPage(response);\n return this.page;\n }\n\n /**\n * Returns true if there are more pages to fetch from the API.\n */\n hasNextPage(): boolean {\n if (this.params['config']?.['pageToken'] !== undefined) {\n return true;\n }\n return false;\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\n/** Required. Outcome of the code execution. */\nexport enum Outcome {\n OUTCOME_UNSPECIFIED = 'OUTCOME_UNSPECIFIED',\n OUTCOME_OK = 'OUTCOME_OK',\n OUTCOME_FAILED = 'OUTCOME_FAILED',\n OUTCOME_DEADLINE_EXCEEDED = 'OUTCOME_DEADLINE_EXCEEDED',\n}\n\n/** Required. Programming language of the `code`. */\nexport enum Language {\n LANGUAGE_UNSPECIFIED = 'LANGUAGE_UNSPECIFIED',\n PYTHON = 'PYTHON',\n}\n\n/** Optional. The type of the data. */\nexport enum Type {\n TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED',\n STRING = 'STRING',\n NUMBER = 'NUMBER',\n INTEGER = 'INTEGER',\n BOOLEAN = 'BOOLEAN',\n ARRAY = 'ARRAY',\n OBJECT = 'OBJECT',\n}\n\n/** Required. Harm category. */\nexport enum HarmCategory {\n HARM_CATEGORY_UNSPECIFIED = 'HARM_CATEGORY_UNSPECIFIED',\n HARM_CATEGORY_HATE_SPEECH = 'HARM_CATEGORY_HATE_SPEECH',\n HARM_CATEGORY_DANGEROUS_CONTENT = 'HARM_CATEGORY_DANGEROUS_CONTENT',\n HARM_CATEGORY_HARASSMENT = 'HARM_CATEGORY_HARASSMENT',\n HARM_CATEGORY_SEXUALLY_EXPLICIT = 'HARM_CATEGORY_SEXUALLY_EXPLICIT',\n HARM_CATEGORY_CIVIC_INTEGRITY = 'HARM_CATEGORY_CIVIC_INTEGRITY',\n}\n\n/** Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. */\nexport enum HarmBlockMethod {\n HARM_BLOCK_METHOD_UNSPECIFIED = 'HARM_BLOCK_METHOD_UNSPECIFIED',\n SEVERITY = 'SEVERITY',\n PROBABILITY = 'PROBABILITY',\n}\n\n/** Required. The harm block threshold. */\nexport enum HarmBlockThreshold {\n HARM_BLOCK_THRESHOLD_UNSPECIFIED = 'HARM_BLOCK_THRESHOLD_UNSPECIFIED',\n BLOCK_LOW_AND_ABOVE = 'BLOCK_LOW_AND_ABOVE',\n BLOCK_MEDIUM_AND_ABOVE = 'BLOCK_MEDIUM_AND_ABOVE',\n BLOCK_ONLY_HIGH = 'BLOCK_ONLY_HIGH',\n BLOCK_NONE = 'BLOCK_NONE',\n OFF = 'OFF',\n}\n\n/** The mode of the predictor to be used in dynamic retrieval. */\nexport enum Mode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n MODE_DYNAMIC = 'MODE_DYNAMIC',\n}\n\n/** Output only. The reason why the model stopped generating tokens.\n\n If empty, the model has not stopped generating the tokens.\n */\nexport enum FinishReason {\n FINISH_REASON_UNSPECIFIED = 'FINISH_REASON_UNSPECIFIED',\n STOP = 'STOP',\n MAX_TOKENS = 'MAX_TOKENS',\n SAFETY = 'SAFETY',\n RECITATION = 'RECITATION',\n OTHER = 'OTHER',\n BLOCKLIST = 'BLOCKLIST',\n PROHIBITED_CONTENT = 'PROHIBITED_CONTENT',\n SPII = 'SPII',\n MALFORMED_FUNCTION_CALL = 'MALFORMED_FUNCTION_CALL',\n IMAGE_SAFETY = 'IMAGE_SAFETY',\n}\n\n/** Output only. Harm probability levels in the content. */\nexport enum HarmProbability {\n HARM_PROBABILITY_UNSPECIFIED = 'HARM_PROBABILITY_UNSPECIFIED',\n NEGLIGIBLE = 'NEGLIGIBLE',\n LOW = 'LOW',\n MEDIUM = 'MEDIUM',\n HIGH = 'HIGH',\n}\n\n/** Output only. Harm severity levels in the content. */\nexport enum HarmSeverity {\n HARM_SEVERITY_UNSPECIFIED = 'HARM_SEVERITY_UNSPECIFIED',\n HARM_SEVERITY_NEGLIGIBLE = 'HARM_SEVERITY_NEGLIGIBLE',\n HARM_SEVERITY_LOW = 'HARM_SEVERITY_LOW',\n HARM_SEVERITY_MEDIUM = 'HARM_SEVERITY_MEDIUM',\n HARM_SEVERITY_HIGH = 'HARM_SEVERITY_HIGH',\n}\n\n/** Output only. Blocked reason. */\nexport enum BlockedReason {\n BLOCKED_REASON_UNSPECIFIED = 'BLOCKED_REASON_UNSPECIFIED',\n SAFETY = 'SAFETY',\n OTHER = 'OTHER',\n BLOCKLIST = 'BLOCKLIST',\n PROHIBITED_CONTENT = 'PROHIBITED_CONTENT',\n}\n\n/** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */\nexport enum TrafficType {\n TRAFFIC_TYPE_UNSPECIFIED = 'TRAFFIC_TYPE_UNSPECIFIED',\n ON_DEMAND = 'ON_DEMAND',\n PROVISIONED_THROUGHPUT = 'PROVISIONED_THROUGHPUT',\n}\n\n/** Server content modalities. */\nexport enum Modality {\n MODALITY_UNSPECIFIED = 'MODALITY_UNSPECIFIED',\n TEXT = 'TEXT',\n IMAGE = 'IMAGE',\n AUDIO = 'AUDIO',\n}\n\n/** The media resolution to use. */\nexport enum MediaResolution {\n MEDIA_RESOLUTION_UNSPECIFIED = 'MEDIA_RESOLUTION_UNSPECIFIED',\n MEDIA_RESOLUTION_LOW = 'MEDIA_RESOLUTION_LOW',\n MEDIA_RESOLUTION_MEDIUM = 'MEDIA_RESOLUTION_MEDIUM',\n MEDIA_RESOLUTION_HIGH = 'MEDIA_RESOLUTION_HIGH',\n}\n\n/** Config for the dynamic retrieval config mode. */\nexport enum DynamicRetrievalConfigMode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n MODE_DYNAMIC = 'MODE_DYNAMIC',\n}\n\n/** Config for the function calling config mode. */\nexport enum FunctionCallingConfigMode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n AUTO = 'AUTO',\n ANY = 'ANY',\n NONE = 'NONE',\n}\n\n/** Enum that controls the safety filter level for objectionable content. */\nexport enum SafetyFilterLevel {\n BLOCK_LOW_AND_ABOVE = 'BLOCK_LOW_AND_ABOVE',\n BLOCK_MEDIUM_AND_ABOVE = 'BLOCK_MEDIUM_AND_ABOVE',\n BLOCK_ONLY_HIGH = 'BLOCK_ONLY_HIGH',\n BLOCK_NONE = 'BLOCK_NONE',\n}\n\n/** Enum that controls the generation of people. */\nexport enum PersonGeneration {\n DONT_ALLOW = 'DONT_ALLOW',\n ALLOW_ADULT = 'ALLOW_ADULT',\n ALLOW_ALL = 'ALLOW_ALL',\n}\n\n/** Enum that specifies the language of the text in the prompt. */\nexport enum ImagePromptLanguage {\n auto = 'auto',\n en = 'en',\n ja = 'ja',\n ko = 'ko',\n hi = 'hi',\n}\n\n/** State for the lifecycle of a File. */\nexport enum FileState {\n STATE_UNSPECIFIED = 'STATE_UNSPECIFIED',\n PROCESSING = 'PROCESSING',\n ACTIVE = 'ACTIVE',\n FAILED = 'FAILED',\n}\n\n/** Source of the File. */\nexport enum FileSource {\n SOURCE_UNSPECIFIED = 'SOURCE_UNSPECIFIED',\n UPLOADED = 'UPLOADED',\n GENERATED = 'GENERATED',\n}\n\n/** Enum representing the mask mode of a mask reference image. */\nexport enum MaskReferenceMode {\n MASK_MODE_DEFAULT = 'MASK_MODE_DEFAULT',\n MASK_MODE_USER_PROVIDED = 'MASK_MODE_USER_PROVIDED',\n MASK_MODE_BACKGROUND = 'MASK_MODE_BACKGROUND',\n MASK_MODE_FOREGROUND = 'MASK_MODE_FOREGROUND',\n MASK_MODE_SEMANTIC = 'MASK_MODE_SEMANTIC',\n}\n\n/** Enum representing the control type of a control reference image. */\nexport enum ControlReferenceType {\n CONTROL_TYPE_DEFAULT = 'CONTROL_TYPE_DEFAULT',\n CONTROL_TYPE_CANNY = 'CONTROL_TYPE_CANNY',\n CONTROL_TYPE_SCRIBBLE = 'CONTROL_TYPE_SCRIBBLE',\n CONTROL_TYPE_FACE_MESH = 'CONTROL_TYPE_FACE_MESH',\n}\n\n/** Enum representing the subject type of a subject reference image. */\nexport enum SubjectReferenceType {\n SUBJECT_TYPE_DEFAULT = 'SUBJECT_TYPE_DEFAULT',\n SUBJECT_TYPE_PERSON = 'SUBJECT_TYPE_PERSON',\n SUBJECT_TYPE_ANIMAL = 'SUBJECT_TYPE_ANIMAL',\n SUBJECT_TYPE_PRODUCT = 'SUBJECT_TYPE_PRODUCT',\n}\n\n/** Server content modalities. */\nexport enum MediaModality {\n MODALITY_UNSPECIFIED = 'MODALITY_UNSPECIFIED',\n TEXT = 'TEXT',\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n AUDIO = 'AUDIO',\n DOCUMENT = 'DOCUMENT',\n}\n\n/** Start of speech sensitivity. */\nexport enum StartSensitivity {\n START_SENSITIVITY_UNSPECIFIED = 'START_SENSITIVITY_UNSPECIFIED',\n START_SENSITIVITY_HIGH = 'START_SENSITIVITY_HIGH',\n START_SENSITIVITY_LOW = 'START_SENSITIVITY_LOW',\n}\n\n/** End of speech sensitivity. */\nexport enum EndSensitivity {\n END_SENSITIVITY_UNSPECIFIED = 'END_SENSITIVITY_UNSPECIFIED',\n END_SENSITIVITY_HIGH = 'END_SENSITIVITY_HIGH',\n END_SENSITIVITY_LOW = 'END_SENSITIVITY_LOW',\n}\n\n/** The different ways of handling user activity. */\nexport enum ActivityHandling {\n ACTIVITY_HANDLING_UNSPECIFIED = 'ACTIVITY_HANDLING_UNSPECIFIED',\n START_OF_ACTIVITY_INTERRUPTS = 'START_OF_ACTIVITY_INTERRUPTS',\n NO_INTERRUPTION = 'NO_INTERRUPTION',\n}\n\n/** Options about which input is included in the user's turn. */\nexport enum TurnCoverage {\n TURN_COVERAGE_UNSPECIFIED = 'TURN_COVERAGE_UNSPECIFIED',\n TURN_INCLUDES_ONLY_ACTIVITY = 'TURN_INCLUDES_ONLY_ACTIVITY',\n TURN_INCLUDES_ALL_INPUT = 'TURN_INCLUDES_ALL_INPUT',\n}\n\n/** Metadata describes the input video content. */\nexport declare interface VideoMetadata {\n /** Optional. The end offset of the video. */\n endOffset?: string;\n /** Optional. The start offset of the video. */\n startOffset?: string;\n}\n\n/** Result of executing the [ExecutableCode]. Always follows a `part` containing the [ExecutableCode]. */\nexport declare interface CodeExecutionResult {\n /** Required. Outcome of the code execution. */\n outcome?: Outcome;\n /** Optional. Contains stdout when code execution is successful, stderr or other description otherwise. */\n output?: string;\n}\n\n/** Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the [FunctionDeclaration] tool and [FunctionCallingConfig] mode is set to [Mode.CODE]. */\nexport declare interface ExecutableCode {\n /** Required. The code to be executed. */\n code?: string;\n /** Required. Programming language of the `code`. */\n language?: Language;\n}\n\n/** URI based data. */\nexport declare interface FileData {\n /** Required. URI. */\n fileUri?: string;\n /** Required. The IANA standard MIME type of the source data. */\n mimeType?: string;\n}\n\n/** A function call. */\nexport declare interface FunctionCall {\n /** The unique id of the function call. If populated, the client to execute the\n `function_call` and return the response with the matching `id`. */\n id?: string;\n /** Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. */\n args?: Record;\n /** Required. The name of the function to call. Matches [FunctionDeclaration.name]. */\n name?: string;\n}\n\n/** A function response. */\nexport class FunctionResponse {\n /** The id of the function call this response is for. Populated by the client\n to match the corresponding function call `id`. */\n id?: string;\n /** Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. */\n name?: string;\n /** Required. The function response in JSON object format. Use \"output\" key to specify function output and \"error\" key to specify error details (if any). If \"output\" and \"error\" keys are not specified, then whole \"response\" is treated as function output. */\n response?: Record;\n}\n\n/** Content blob. */\nexport declare interface Blob {\n /** Required. Raw bytes. */\n data?: string;\n /** Required. The IANA standard MIME type of the source data. */\n mimeType?: string;\n}\n\n/** A datatype containing media content.\n\n Exactly one field within a Part should be set, representing the specific type\n of content being conveyed. Using multiple fields within the same `Part`\n instance is considered invalid.\n */\nexport declare interface Part {\n /** Metadata for a given video. */\n videoMetadata?: VideoMetadata;\n /** Indicates if the part is thought from the model. */\n thought?: boolean;\n /** Optional. Result of executing the [ExecutableCode]. */\n codeExecutionResult?: CodeExecutionResult;\n /** Optional. Code generated by the model that is meant to be executed. */\n executableCode?: ExecutableCode;\n /** Optional. URI based data. */\n fileData?: FileData;\n /** Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. */\n functionCall?: FunctionCall;\n /** Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. */\n functionResponse?: FunctionResponse;\n /** Optional. Inlined bytes data. */\n inlineData?: Blob;\n /** Optional. Text part (can be code). */\n text?: string;\n}\n/**\n * Creates a `Part` object from a `URI` string.\n */\nexport function createPartFromUri(uri: string, mimeType: string): Part {\n return {\n fileData: {\n fileUri: uri,\n mimeType: mimeType,\n },\n };\n}\n/**\n * Creates a `Part` object from a `text` string.\n */\nexport function createPartFromText(text: string): Part {\n return {\n text: text,\n };\n}\n/**\n * Creates a `Part` object from a `FunctionCall` object.\n */\nexport function createPartFromFunctionCall(\n name: string,\n args: Record,\n): Part {\n return {\n functionCall: {\n name: name,\n args: args,\n },\n };\n}\n/**\n * Creates a `Part` object from a `FunctionResponse` object.\n */\nexport function createPartFromFunctionResponse(\n id: string,\n name: string,\n response: Record,\n): Part {\n return {\n functionResponse: {\n id: id,\n name: name,\n response: response,\n },\n };\n}\n/**\n * Creates a `Part` object from a `base64` encoded `string`.\n */\nexport function createPartFromBase64(data: string, mimeType: string): Part {\n return {\n inlineData: {\n data: data,\n mimeType: mimeType,\n },\n };\n}\n/**\n * Creates a `Part` object from the `outcome` and `output` of a `CodeExecutionResult` object.\n */\nexport function createPartFromCodeExecutionResult(\n outcome: Outcome,\n output: string,\n): Part {\n return {\n codeExecutionResult: {\n outcome: outcome,\n output: output,\n },\n };\n}\n/**\n * Creates a `Part` object from the `code` and `language` of an `ExecutableCode` object.\n */\nexport function createPartFromExecutableCode(\n code: string,\n language: Language,\n): Part {\n return {\n executableCode: {\n code: code,\n language: language,\n },\n };\n}\n\n/** Contains the multi-part content of a message. */\nexport declare interface Content {\n /** List of parts that constitute a single message. Each part may have\n a different IANA MIME type. */\n parts?: Part[];\n /** Optional. The producer of the content. Must be either 'user' or\n 'model'. Useful to set for multi-turn conversations, otherwise can be\n empty. If role is not specified, SDK will determine the role. */\n role?: string;\n}\nfunction _isPart(obj: unknown): obj is Part {\n if (typeof obj === 'object' && obj !== null) {\n return (\n 'fileData' in obj ||\n 'text' in obj ||\n 'functionCall' in obj ||\n 'functionResponse' in obj ||\n 'inlineData' in obj ||\n 'videoMetadata' in obj ||\n 'codeExecutionResult' in obj ||\n 'executableCode' in obj\n );\n }\n return false;\n}\nfunction _toParts(partOrString: PartListUnion | string): Part[] {\n const parts: Part[] = [];\n if (typeof partOrString === 'string') {\n parts.push(createPartFromText(partOrString));\n } else if (_isPart(partOrString)) {\n parts.push(partOrString);\n } else if (Array.isArray(partOrString)) {\n if (partOrString.length === 0) {\n throw new Error('partOrString cannot be an empty array');\n }\n for (const part of partOrString) {\n if (typeof part === 'string') {\n parts.push(createPartFromText(part));\n } else if (_isPart(part)) {\n parts.push(part);\n } else {\n throw new Error('element in PartUnion must be a Part object or string');\n }\n }\n } else {\n throw new Error('partOrString must be a Part object, string, or array');\n }\n return parts;\n}\n/**\n * Creates a `Content` object with a user role from a `PartListUnion` object or `string`.\n */\nexport function createUserContent(\n partOrString: PartListUnion | string,\n): Content {\n return {\n role: 'user',\n parts: _toParts(partOrString),\n };\n}\n\n/**\n * Creates a `Content` object with a model role from a `PartListUnion` object or `string`.\n */\nexport function createModelContent(\n partOrString: PartListUnion | string,\n): Content {\n return {\n role: 'model',\n parts: _toParts(partOrString),\n };\n}\n/** HTTP options to be used in each of the requests. */\nexport declare interface HttpOptions {\n /** The base URL for the AI platform service endpoint. */\n baseUrl?: string;\n /** Specifies the version of the API to use. */\n apiVersion?: string;\n /** Additional HTTP headers to be sent with the request. */\n headers?: Record;\n /** Timeout for the request in milliseconds. */\n timeout?: number;\n}\n\n/** Schema that defines the format of input and output data.\n\n Represents a select subset of an OpenAPI 3.0 schema object.\n */\nexport declare interface Schema {\n /** Optional. Example of the object. Will only populated when the object is the root. */\n example?: unknown;\n /** Optional. Pattern of the Type.STRING to restrict a string to a regular expression. */\n pattern?: string;\n /** Optional. Default value of the data. */\n default?: unknown;\n /** Optional. Maximum length of the Type.STRING */\n maxLength?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING */\n minLength?: string;\n /** Optional. Minimum number of the properties for Type.OBJECT. */\n minProperties?: string;\n /** Optional. Maximum number of the properties for Type.OBJECT. */\n maxProperties?: string;\n /** Optional. The value should be validated against any (one or more) of the subschemas in the list. */\n anyOf?: Schema[];\n /** Optional. The description of the data. */\n description?: string;\n /** Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:[\"EAST\", NORTH\", \"SOUTH\", \"WEST\"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:[\"101\", \"201\", \"301\"]} */\n enum?: string[];\n /** Optional. The format of the data. Supported formats: for NUMBER type: \"float\", \"double\" for INTEGER type: \"int32\", \"int64\" for STRING type: \"email\", \"byte\", etc */\n format?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. */\n items?: Schema;\n /** Optional. Maximum number of the elements for Type.ARRAY. */\n maxItems?: string;\n /** Optional. Maximum value of the Type.INTEGER and Type.NUMBER */\n maximum?: number;\n /** Optional. Minimum number of the elements for Type.ARRAY. */\n minItems?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER */\n minimum?: number;\n /** Optional. Indicates if the value may be null. */\n nullable?: boolean;\n /** Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. */\n properties?: Record;\n /** Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. */\n propertyOrdering?: string[];\n /** Optional. Required properties of Type.OBJECT. */\n required?: string[];\n /** Optional. The title of the Schema. */\n title?: string;\n /** Optional. The type of the data. */\n type?: Type;\n}\n\n/** Safety settings. */\nexport declare interface SafetySetting {\n /** Determines if the harm block method uses probability or probability\n and severity scores. */\n method?: HarmBlockMethod;\n /** Required. Harm category. */\n category?: HarmCategory;\n /** Required. The harm block threshold. */\n threshold?: HarmBlockThreshold;\n}\n\n/** Defines a function that the model can generate JSON inputs for.\n\n The inputs are based on `OpenAPI 3.0 specifications\n `_.\n */\nexport declare interface FunctionDeclaration {\n /** Describes the output from the function in the OpenAPI JSON Schema\n Object format. */\n response?: Schema;\n /** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */\n description?: string;\n /** Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. */\n name?: string;\n /** Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 */\n parameters?: Schema;\n}\n\n/** Tool to support Google Search in Model. Powered by Google. */\nexport declare interface GoogleSearch {}\n\n/** Describes the options to customize dynamic retrieval. */\nexport declare interface DynamicRetrievalConfig {\n /** The mode of the predictor to be used in dynamic retrieval. */\n mode?: DynamicRetrievalConfigMode;\n /** Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used. */\n dynamicThreshold?: number;\n}\n\n/** Tool to retrieve public web data for grounding, powered by Google. */\nexport declare interface GoogleSearchRetrieval {\n /** Specifies the dynamic retrieval configuration for the given source. */\n dynamicRetrievalConfig?: DynamicRetrievalConfig;\n}\n\n/** Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder */\nexport declare interface VertexAISearch {\n /** Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` */\n datastore?: string;\n /** Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` */\n engine?: string;\n}\n\n/** The definition of the Rag resource. */\nexport declare interface VertexRagStoreRagResource {\n /** Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` */\n ragCorpus?: string;\n /** Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field. */\n ragFileIds?: string[];\n}\n\n/** Retrieve from Vertex RAG Store for grounding. */\nexport declare interface VertexRagStore {\n /** Optional. Deprecated. Please use rag_resources instead. */\n ragCorpora?: string[];\n /** Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. */\n ragResources?: VertexRagStoreRagResource[];\n /** Optional. Number of top k results to return from the selected corpora. */\n similarityTopK?: number;\n /** Optional. Only return results with vector distance smaller than the threshold. */\n vectorDistanceThreshold?: number;\n}\n\n/** Defines a retrieval tool that model can call to access external knowledge. */\nexport declare interface Retrieval {\n /** Optional. Deprecated. This option is no longer supported. */\n disableAttribution?: boolean;\n /** Set to use data source powered by Vertex AI Search. */\n vertexAiSearch?: VertexAISearch;\n /** Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService. */\n vertexRagStore?: VertexRagStore;\n}\n\n/** Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. */\nexport declare interface ToolCodeExecution {}\n\n/** Tool details of a tool that the model may use to generate a response. */\nexport declare interface Tool {\n /** List of function declarations that the tool supports. */\n functionDeclarations?: FunctionDeclaration[];\n /** Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. */\n retrieval?: Retrieval;\n /** Optional. Google Search tool type. Specialized retrieval tool\n that is powered by Google Search. */\n googleSearch?: GoogleSearch;\n /** Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. */\n googleSearchRetrieval?: GoogleSearchRetrieval;\n /** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services. */\n codeExecution?: ToolCodeExecution;\n}\n\n/** Function calling config. */\nexport declare interface FunctionCallingConfig {\n /** Optional. Function calling mode. */\n mode?: FunctionCallingConfigMode;\n /** Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided. */\n allowedFunctionNames?: string[];\n}\n\n/** Tool config.\n\n This config is shared for all tools provided in the request.\n */\nexport declare interface ToolConfig {\n /** Optional. Function calling config. */\n functionCallingConfig?: FunctionCallingConfig;\n}\n\n/** The configuration for the prebuilt speaker to use. */\nexport declare interface PrebuiltVoiceConfig {\n /** The name of the prebuilt voice to use.\n */\n voiceName?: string;\n}\n\n/** The configuration for the voice to use. */\nexport declare interface VoiceConfig {\n /** The configuration for the speaker to use.\n */\n prebuiltVoiceConfig?: PrebuiltVoiceConfig;\n}\n\n/** The speech generation configuration. */\nexport declare interface SpeechConfig {\n /** The configuration for the speaker to use.\n */\n voiceConfig?: VoiceConfig;\n}\n\n/** The thinking features configuration. */\nexport declare interface ThinkingConfig {\n /** Indicates whether to include thoughts in the response. If true, thoughts are returned only if the model supports thought and thoughts are available.\n */\n includeThoughts?: boolean;\n /** Indicates the thinking budget in tokens.\n */\n thinkingBudget?: number;\n}\n\n/** When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. */\nexport declare interface GenerationConfigRoutingConfigAutoRoutingMode {\n /** The model routing preference. */\n modelRoutingPreference?:\n | 'UNKNOWN'\n | 'PRIORITIZE_QUALITY'\n | 'BALANCED'\n | 'PRIORITIZE_COST';\n}\n\n/** When manual routing is set, the specified model will be used directly. */\nexport declare interface GenerationConfigRoutingConfigManualRoutingMode {\n /** The model name to use. Only the public LLM models are accepted. e.g. 'gemini-1.5-pro-001'. */\n modelName?: string;\n}\n\n/** The configuration for routing the request to a specific model. */\nexport declare interface GenerationConfigRoutingConfig {\n /** Automated routing. */\n autoMode?: GenerationConfigRoutingConfigAutoRoutingMode;\n /** Manual routing. */\n manualMode?: GenerationConfigRoutingConfigManualRoutingMode;\n}\n\n/** Optional model configuration parameters.\n\n For more information, see `Content generation parameters\n `_.\n */\nexport declare interface GenerateContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Instructions for the model to steer it toward better performance.\n For example, \"Answer as concisely as possible\" or \"Don't use technical\n terms in your response\".\n */\n systemInstruction?: ContentUnion;\n /** Value that controls the degree of randomness in token selection.\n Lower temperatures are good for prompts that require a less open-ended or\n creative response, while higher temperatures can lead to more diverse or\n creative results.\n */\n temperature?: number;\n /** Tokens are selected from the most to least probable until the sum\n of their probabilities equals this value. Use a lower value for less\n random responses and a higher value for more random responses.\n */\n topP?: number;\n /** For each token selection step, the ``top_k`` tokens with the\n highest probabilities are sampled. Then tokens are further filtered based\n on ``top_p`` with the final token selected using temperature sampling. Use\n a lower number for less random responses and a higher number for more\n random responses.\n */\n topK?: number;\n /** Number of response variations to return.\n */\n candidateCount?: number;\n /** Maximum number of tokens that can be generated in the response.\n */\n maxOutputTokens?: number;\n /** List of strings that tells the model to stop generating text if one\n of the strings is encountered in the response.\n */\n stopSequences?: string[];\n /** Whether to return the log probabilities of the tokens that were\n chosen by the model at each step.\n */\n responseLogprobs?: boolean;\n /** Number of top candidate tokens to return the log probabilities for\n at each generation step.\n */\n logprobs?: number;\n /** Positive values penalize tokens that already appear in the\n generated text, increasing the probability of generating more diverse\n content.\n */\n presencePenalty?: number;\n /** Positive values penalize tokens that repeatedly appear in the\n generated text, increasing the probability of generating more diverse\n content.\n */\n frequencyPenalty?: number;\n /** When ``seed`` is fixed to a specific number, the model makes a best\n effort to provide the same response for repeated requests. By default, a\n random number is used.\n */\n seed?: number;\n /** Output response media type of the generated candidate text.\n */\n responseMimeType?: string;\n /** Schema that the generated candidate text must adhere to.\n */\n responseSchema?: SchemaUnion;\n /** Configuration for model router requests.\n */\n routingConfig?: GenerationConfigRoutingConfig;\n /** Safety settings in the request to block unsafe content in the\n response.\n */\n safetySettings?: SafetySetting[];\n /** Code that enables the system to interact with external systems to\n perform an action outside of the knowledge and scope of the model.\n */\n tools?: ToolListUnion;\n /** Associates model output to a specific function call.\n */\n toolConfig?: ToolConfig;\n /** Labels with user-defined metadata to break down billed charges. */\n labels?: Record;\n /** Resource name of a context cache that can be used in subsequent\n requests.\n */\n cachedContent?: string;\n /** The requested modalities of the response. Represents the set of\n modalities that the model can return.\n */\n responseModalities?: string[];\n /** If specified, the media resolution specified will be used.\n */\n mediaResolution?: MediaResolution;\n /** The speech generation configuration.\n */\n speechConfig?: SpeechConfigUnion;\n /** If enabled, audio timestamp will be included in the request to the\n model.\n */\n audioTimestamp?: boolean;\n /** The thinking features configuration.\n */\n thinkingConfig?: ThinkingConfig;\n}\n\n/** Config for models.generate_content parameters. */\nexport declare interface GenerateContentParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Content of the request.\n */\n contents: ContentListUnion;\n /** Configuration that contains optional model parameters.\n */\n config?: GenerateContentConfig;\n}\n\n/** Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp */\nexport declare interface GoogleTypeDate {\n /** Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */\n day?: number;\n /** Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */\n month?: number;\n /** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */\n year?: number;\n}\n\n/** Source attributions for content. */\nexport declare interface Citation {\n /** Output only. End index into the content. */\n endIndex?: number;\n /** Output only. License of the attribution. */\n license?: string;\n /** Output only. Publication date of the attribution. */\n publicationDate?: GoogleTypeDate;\n /** Output only. Start index into the content. */\n startIndex?: number;\n /** Output only. Title of the attribution. */\n title?: string;\n /** Output only. Url reference of the attribution. */\n uri?: string;\n}\n\n/** Citation information when the model quotes another source. */\nexport declare interface CitationMetadata {\n /** Contains citation information when the model directly quotes, at\n length, from another source. Can include traditional websites and code\n repositories.\n */\n citations?: Citation[];\n}\n\n/** Chunk from context retrieved by the retrieval tools. */\nexport declare interface GroundingChunkRetrievedContext {\n /** Text of the attribution. */\n text?: string;\n /** Title of the attribution. */\n title?: string;\n /** URI reference of the attribution. */\n uri?: string;\n}\n\n/** Chunk from the web. */\nexport declare interface GroundingChunkWeb {\n /** Domain of the (original) URI. */\n domain?: string;\n /** Title of the chunk. */\n title?: string;\n /** URI reference of the chunk. */\n uri?: string;\n}\n\n/** Grounding chunk. */\nexport declare interface GroundingChunk {\n /** Grounding chunk from context retrieved by the retrieval tools. */\n retrievedContext?: GroundingChunkRetrievedContext;\n /** Grounding chunk from the web. */\n web?: GroundingChunkWeb;\n}\n\n/** Segment of the content. */\nexport declare interface Segment {\n /** Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero. */\n endIndex?: number;\n /** Output only. The index of a Part object within its parent Content object. */\n partIndex?: number;\n /** Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero. */\n startIndex?: number;\n /** Output only. The text corresponding to the segment from the response. */\n text?: string;\n}\n\n/** Grounding support. */\nexport declare interface GroundingSupport {\n /** Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the grounding_chunk_indices. */\n confidenceScores?: number[];\n /** A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim. */\n groundingChunkIndices?: number[];\n /** Segment of the content this support belongs to. */\n segment?: Segment;\n}\n\n/** Metadata related to retrieval in the grounding flow. */\nexport declare interface RetrievalMetadata {\n /** Optional. Score indicating how likely information from Google Search could help answer the prompt. The score is in the range `[0, 1]`, where 0 is the least likely and 1 is the most likely. This score is only populated when Google Search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger Google Search. */\n googleSearchDynamicRetrievalScore?: number;\n}\n\n/** Google search entry point. */\nexport declare interface SearchEntryPoint {\n /** Optional. Web content snippet that can be embedded in a web page or an app webview. */\n renderedContent?: string;\n /** Optional. Base64 encoded JSON representing array of tuple. */\n sdkBlob?: string;\n}\n\n/** Metadata returned to client when grounding is enabled. */\nexport declare interface GroundingMetadata {\n /** List of supporting references retrieved from specified grounding source. */\n groundingChunks?: GroundingChunk[];\n /** Optional. List of grounding support. */\n groundingSupports?: GroundingSupport[];\n /** Optional. Output only. Retrieval metadata. */\n retrievalMetadata?: RetrievalMetadata;\n /** Optional. Queries executed by the retrieval tools. */\n retrievalQueries?: string[];\n /** Optional. Google search entry for the following-up web searches. */\n searchEntryPoint?: SearchEntryPoint;\n /** Optional. Web search queries for the following-up web search. */\n webSearchQueries?: string[];\n}\n\n/** Candidate for the logprobs token and score. */\nexport declare interface LogprobsResultCandidate {\n /** The candidate's log probability. */\n logProbability?: number;\n /** The candidate's token string value. */\n token?: string;\n /** The candidate's token id value. */\n tokenId?: number;\n}\n\n/** Candidates with top log probabilities at each decoding step. */\nexport declare interface LogprobsResultTopCandidates {\n /** Sorted by log probability in descending order. */\n candidates?: LogprobsResultCandidate[];\n}\n\n/** Logprobs Result */\nexport declare interface LogprobsResult {\n /** Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates. */\n chosenCandidates?: LogprobsResultCandidate[];\n /** Length = total number of decoding steps. */\n topCandidates?: LogprobsResultTopCandidates[];\n}\n\n/** Safety rating corresponding to the generated content. */\nexport declare interface SafetyRating {\n /** Output only. Indicates whether the content was filtered out because of this rating. */\n blocked?: boolean;\n /** Output only. Harm category. */\n category?: HarmCategory;\n /** Output only. Harm probability levels in the content. */\n probability?: HarmProbability;\n /** Output only. Harm probability score. */\n probabilityScore?: number;\n /** Output only. Harm severity levels in the content. */\n severity?: HarmSeverity;\n /** Output only. Harm severity score. */\n severityScore?: number;\n}\n\n/** A response candidate generated from the model. */\nexport declare interface Candidate {\n /** Contains the multi-part content of the response.\n */\n content?: Content;\n /** Source attribution of the generated content.\n */\n citationMetadata?: CitationMetadata;\n /** Describes the reason the model stopped generating tokens.\n */\n finishMessage?: string;\n /** Number of tokens for this candidate.\n */\n tokenCount?: number;\n /** The reason why the model stopped generating tokens.\n If empty, the model has not stopped generating the tokens.\n */\n finishReason?: FinishReason;\n /** Output only. Average log probability score of the candidate. */\n avgLogprobs?: number;\n /** Output only. Metadata specifies sources used to ground generated content. */\n groundingMetadata?: GroundingMetadata;\n /** Output only. Index of the candidate. */\n index?: number;\n /** Output only. Log-likelihood scores for the response tokens and top tokens */\n logprobsResult?: LogprobsResult;\n /** Output only. List of ratings for the safety of a response candidate. There is at most one rating per category. */\n safetyRatings?: SafetyRating[];\n}\n\n/** Content filter results for a prompt sent in the request. */\nexport class GenerateContentResponsePromptFeedback {\n /** Output only. Blocked reason. */\n blockReason?: BlockedReason;\n /** Output only. A readable block reason message. */\n blockReasonMessage?: string;\n /** Output only. Safety ratings. */\n safetyRatings?: SafetyRating[];\n}\n\n/** Represents token counting info for a single modality. */\nexport declare interface ModalityTokenCount {\n /** The modality associated with this token count. */\n modality?: MediaModality;\n /** Number of tokens. */\n tokenCount?: number;\n}\n\n/** Usage metadata about response(s). */\nexport class GenerateContentResponseUsageMetadata {\n /** Output only. List of modalities of the cached content in the request input. */\n cacheTokensDetails?: ModalityTokenCount[];\n /** Output only. Number of tokens in the cached part in the input (the cached content). */\n cachedContentTokenCount?: number;\n /** Number of tokens in the response(s). */\n candidatesTokenCount?: number;\n /** Output only. List of modalities that were returned in the response. */\n candidatesTokensDetails?: ModalityTokenCount[];\n /** Number of tokens in the request. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */\n promptTokenCount?: number;\n /** Output only. List of modalities that were processed in the request input. */\n promptTokensDetails?: ModalityTokenCount[];\n /** Output only. Number of tokens present in thoughts output. */\n thoughtsTokenCount?: number;\n /** Output only. Number of tokens present in tool-use prompt(s). */\n toolUsePromptTokenCount?: number;\n /** Output only. List of modalities that were processed for tool-use request inputs. */\n toolUsePromptTokensDetails?: ModalityTokenCount[];\n /** Total token count for prompt, response candidates, and tool-use prompts (if present). */\n totalTokenCount?: number;\n /** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */\n trafficType?: TrafficType;\n}\n\n/** Response message for PredictionService.GenerateContent. */\nexport class GenerateContentResponse {\n /** Response variations returned by the model.\n */\n candidates?: Candidate[];\n /** Timestamp when the request is made to the server.\n */\n createTime?: string;\n /** Identifier for each response.\n */\n responseId?: string;\n /** Output only. The model version used to generate the response. */\n modelVersion?: string;\n /** Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations. */\n promptFeedback?: GenerateContentResponsePromptFeedback;\n /** Usage metadata about the response(s). */\n usageMetadata?: GenerateContentResponseUsageMetadata;\n /**\n * Returns the concatenation of all text parts from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the text from the first\n * one will be returned.\n * If there are non-text parts in the response, the concatenation of all text\n * parts will be returned, and a warning will be logged.\n * If there are thought parts in the response, the concatenation of all text\n * parts excluding the thought parts will be returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'Why is the sky blue?',\n * });\n *\n * console.debug(response.text);\n * ```\n */\n get text(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning text from the first one.',\n );\n }\n let text = '';\n let anyTextPartText = false;\n const nonTextParts = [];\n for (const part of this.candidates?.[0]?.content?.parts ?? []) {\n for (const [fieldName, fieldValue] of Object.entries(part)) {\n if (\n fieldName !== 'text' &&\n fieldName !== 'thought' &&\n (fieldValue !== null || fieldValue !== undefined)\n ) {\n nonTextParts.push(fieldName);\n }\n }\n if (typeof part.text === 'string') {\n if (typeof part.thought === 'boolean' && part.thought) {\n continue;\n }\n anyTextPartText = true;\n text += part.text;\n }\n }\n if (nonTextParts.length > 0) {\n console.warn(\n `there are non-text parts ${nonTextParts} in the response, returning concatenation of all text parts. Please refer to the non text parts for a full response from model.`,\n );\n }\n // part.text === '' is different from part.text is null\n return anyTextPartText ? text : undefined;\n }\n\n /**\n * Returns the function calls from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the function calls from\n * the first one will be returned.\n * If there are no function calls in the response, undefined will be returned.\n *\n * @example\n * ```ts\n * const controlLightFunctionDeclaration: FunctionDeclaration = {\n * name: 'controlLight',\n * parameters: {\n * type: Type.OBJECT,\n * description: 'Set the brightness and color temperature of a room light.',\n * properties: {\n * brightness: {\n * type: Type.NUMBER,\n * description:\n * 'Light level from 0 to 100. Zero is off and 100 is full brightness.',\n * },\n * colorTemperature: {\n * type: Type.STRING,\n * description:\n * 'Color temperature of the light fixture which can be `daylight`, `cool` or `warm`.',\n * },\n * },\n * required: ['brightness', 'colorTemperature'],\n * };\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents: 'Dim the lights so the room feels cozy and warm.',\n * config: {\n * tools: [{functionDeclarations: [controlLightFunctionDeclaration]}],\n * toolConfig: {\n * functionCallingConfig: {\n * mode: FunctionCallingConfigMode.ANY,\n * allowedFunctionNames: ['controlLight'],\n * },\n * },\n * },\n * });\n * console.debug(JSON.stringify(response.functionCalls));\n * ```\n */\n get functionCalls(): FunctionCall[] | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning function calls from the first one.',\n );\n }\n const functionCalls = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.functionCall)\n .map((part) => part.functionCall)\n .filter(\n (functionCall): functionCall is FunctionCall =>\n functionCall !== undefined,\n );\n if (functionCalls?.length === 0) {\n return undefined;\n }\n return functionCalls;\n }\n /**\n * Returns the first executable code from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the executable code from\n * the first one will be returned.\n * If there are no executable code in the response, undefined will be\n * returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.'\n * config: {\n * tools: [{codeExecution: {}}],\n * },\n * });\n *\n * console.debug(response.executableCode);\n * ```\n */\n get executableCode(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning executable code from the first one.',\n );\n }\n const executableCode = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.executableCode)\n .map((part) => part.executableCode)\n .filter(\n (executableCode): executableCode is ExecutableCode =>\n executableCode !== undefined,\n );\n if (executableCode?.length === 0) {\n return undefined;\n }\n\n return executableCode?.[0]?.code;\n }\n /**\n * Returns the first code execution result from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the code execution result from\n * the first one will be returned.\n * If there are no code execution result in the response, undefined will be returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.'\n * config: {\n * tools: [{codeExecution: {}}],\n * },\n * });\n *\n * console.debug(response.codeExecutionResult);\n * ```\n */\n get codeExecutionResult(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning code execution result from the first one.',\n );\n }\n const codeExecutionResult = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.codeExecutionResult)\n .map((part) => part.codeExecutionResult)\n .filter(\n (codeExecutionResult): codeExecutionResult is CodeExecutionResult =>\n codeExecutionResult !== undefined,\n );\n if (codeExecutionResult?.length === 0) {\n return undefined;\n }\n return codeExecutionResult?.[0]?.output;\n }\n}\n\nexport /** Optional parameters for the embed_content method. */\ndeclare interface EmbedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Type of task for which the embedding will be used.\n */\n taskType?: string;\n /** Title for the text. Only applicable when TaskType is\n `RETRIEVAL_DOCUMENT`.\n */\n title?: string;\n /** Reduced dimension for the output embedding. If set,\n excessive values in the output embedding are truncated from the end.\n Supported by newer models since 2024 only. You cannot set this value if\n using the earlier model (`models/embedding-001`).\n */\n outputDimensionality?: number;\n /** Vertex API only. The MIME type of the input.\n */\n mimeType?: string;\n /** Vertex API only. Whether to silently truncate inputs longer than\n the max sequence length. If this option is set to false, oversized inputs\n will lead to an INVALID_ARGUMENT error, similar to other text APIs.\n */\n autoTruncate?: boolean;\n}\n\n/** Parameters for the embed_content method. */\nexport declare interface EmbedContentParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** The content to embed. Only the `parts.text` fields will be counted.\n */\n contents: ContentListUnion;\n /** Configuration that contains optional parameters.\n */\n config?: EmbedContentConfig;\n}\n\n/** Statistics of the input text associated with the result of content embedding. */\nexport declare interface ContentEmbeddingStatistics {\n /** Vertex API only. If the input text was truncated due to having\n a length longer than the allowed maximum input.\n */\n truncated?: boolean;\n /** Vertex API only. Number of tokens of the input text.\n */\n tokenCount?: number;\n}\n\n/** The embedding generated from an input content. */\nexport declare interface ContentEmbedding {\n /** A list of floats representing an embedding.\n */\n values?: number[];\n /** Vertex API only. Statistics of the input text associated with this\n embedding.\n */\n statistics?: ContentEmbeddingStatistics;\n}\n\n/** Request-level metadata for the Vertex Embed Content API. */\nexport declare interface EmbedContentMetadata {\n /** Vertex API only. The total number of billable characters included\n in the request.\n */\n billableCharacterCount?: number;\n}\n\n/** Response for the embed_content method. */\nexport class EmbedContentResponse {\n /** The embeddings for each request, in the same order as provided in\n the batch request.\n */\n embeddings?: ContentEmbedding[];\n /** Vertex API only. Metadata about the request.\n */\n metadata?: EmbedContentMetadata;\n}\n\n/** The config for generating an images. */\nexport declare interface GenerateImagesConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Cloud Storage URI used to store the generated images.\n */\n outputGcsUri?: string;\n /** Description of what to discourage in the generated images.\n */\n negativePrompt?: string;\n /** Number of images to generate.\n */\n numberOfImages?: number;\n /** Aspect ratio of the generated images.\n */\n aspectRatio?: string;\n /** Controls how much the model adheres to the text prompt. Large\n values increase output and prompt alignment, but may compromise image\n quality.\n */\n guidanceScale?: number;\n /** Random seed for image generation. This is not available when\n ``add_watermark`` is set to true.\n */\n seed?: number;\n /** Filter level for safety filtering.\n */\n safetyFilterLevel?: SafetyFilterLevel;\n /** Allows generation of people by the model.\n */\n personGeneration?: PersonGeneration;\n /** Whether to report the safety scores of each generated image and\n the positive prompt in the response.\n */\n includeSafetyAttributes?: boolean;\n /** Whether to include the Responsible AI filter reason if the image\n is filtered out of the response.\n */\n includeRaiReason?: boolean;\n /** Language of the text in the prompt.\n */\n language?: ImagePromptLanguage;\n /** MIME type of the generated image.\n */\n outputMimeType?: string;\n /** Compression quality of the generated image (for ``image/jpeg``\n only).\n */\n outputCompressionQuality?: number;\n /** Whether to add a watermark to the generated images.\n */\n addWatermark?: boolean;\n /** Whether to use the prompt rewriting logic.\n */\n enhancePrompt?: boolean;\n}\n\n/** The parameters for generating images. */\nexport declare interface GenerateImagesParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Text prompt that typically describes the images to output.\n */\n prompt: string;\n /** Configuration for generating images.\n */\n config?: GenerateImagesConfig;\n}\n\n/** An image. */\nexport declare interface Image {\n /** The Cloud Storage URI of the image. ``Image`` can contain a value\n for this field or the ``image_bytes`` field but not both.\n */\n gcsUri?: string;\n /** The image bytes data. ``Image`` can contain a value for this field\n or the ``gcs_uri`` field but not both.\n */\n imageBytes?: string;\n /** The MIME type of the image. */\n mimeType?: string;\n}\n\n/** Safety attributes of a GeneratedImage or the user-provided prompt. */\nexport declare interface SafetyAttributes {\n /** List of RAI categories.\n */\n categories?: string[];\n /** List of scores of each categories.\n */\n scores?: number[];\n /** Internal use only.\n */\n contentType?: string;\n}\n\n/** An output image. */\nexport declare interface GeneratedImage {\n /** The output image data.\n */\n image?: Image;\n /** Responsible AI filter reason if the image is filtered out of the\n response.\n */\n raiFilteredReason?: string;\n /** Safety attributes of the image. Lists of RAI categories and their\n scores of each content.\n */\n safetyAttributes?: SafetyAttributes;\n /** The rewritten prompt used for the image generation if the prompt\n enhancer is enabled.\n */\n enhancedPrompt?: string;\n}\n\n/** The output images response. */\nexport class GenerateImagesResponse {\n /** List of generated images.\n */\n generatedImages?: GeneratedImage[];\n /** Safety attributes of the positive prompt. Only populated if\n ``include_safety_attributes`` is set to True.\n */\n positivePromptSafetyAttributes?: SafetyAttributes;\n}\n\n/** Optional parameters for models.get method. */\nexport declare interface GetModelConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\nexport declare interface GetModelParameters {\n model: string;\n /** Optional parameters for the request. */\n config?: GetModelConfig;\n}\n\n/** An endpoint where you deploy models. */\nexport declare interface Endpoint {\n /** Resource name of the endpoint. */\n name?: string;\n /** ID of the model that's deployed to the endpoint. */\n deployedModelId?: string;\n}\n\n/** A tuned machine learning model. */\nexport declare interface TunedModelInfo {\n /** ID of the base model that you want to tune. */\n baseModel?: string;\n /** Date and time when the base model was created. */\n createTime?: string;\n /** Date and time when the base model was last updated. */\n updateTime?: string;\n}\n\n/** A trained machine learning model. */\nexport declare interface Model {\n /** Resource name of the model. */\n name?: string;\n /** Display name of the model. */\n displayName?: string;\n /** Description of the model. */\n description?: string;\n /** Version ID of the model. A new version is committed when a new\n model version is uploaded or trained under an existing model ID. The\n version ID is an auto-incrementing decimal number in string\n representation. */\n version?: string;\n /** List of deployed models created from this base model. Note that a\n model could have been deployed to endpoints in different locations. */\n endpoints?: Endpoint[];\n /** Labels with user-defined metadata to organize your models. */\n labels?: Record;\n /** Information about the tuned model from the base model. */\n tunedModelInfo?: TunedModelInfo;\n /** The maximum number of input tokens that the model can handle. */\n inputTokenLimit?: number;\n /** The maximum number of output tokens that the model can generate. */\n outputTokenLimit?: number;\n /** List of actions that are supported by the model. */\n supportedActions?: string[];\n}\n\n/** Generation config. */\nexport declare interface GenerationConfig {\n /** Optional. If enabled, audio timestamp will be included in the request to the model. */\n audioTimestamp?: boolean;\n /** Optional. Number of candidates to generate. */\n candidateCount?: number;\n /** Optional. Frequency penalties. */\n frequencyPenalty?: number;\n /** Optional. Logit probabilities. */\n logprobs?: number;\n /** Optional. The maximum number of output tokens to generate per message. */\n maxOutputTokens?: number;\n /** Optional. If specified, the media resolution specified will be used. */\n mediaResolution?: MediaResolution;\n /** Optional. Positive penalties. */\n presencePenalty?: number;\n /** Optional. If true, export the logprobs results in response. */\n responseLogprobs?: boolean;\n /** Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature. */\n responseMimeType?: string;\n /** Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response. */\n responseSchema?: Schema;\n /** Optional. Routing configuration. */\n routingConfig?: GenerationConfigRoutingConfig;\n /** Optional. Seed. */\n seed?: number;\n /** Optional. Stop sequences. */\n stopSequences?: string[];\n /** Optional. Controls the randomness of predictions. */\n temperature?: number;\n /** Optional. If specified, top-k sampling will be used. */\n topK?: number;\n /** Optional. If specified, nucleus sampling will be used. */\n topP?: number;\n}\n\n/** Config for the count_tokens method. */\nexport declare interface CountTokensConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Instructions for the model to steer it toward better performance.\n */\n systemInstruction?: ContentUnion;\n /** Code that enables the system to interact with external systems to\n perform an action outside of the knowledge and scope of the model.\n */\n tools?: Tool[];\n /** Configuration that the model uses to generate the response. Not\n supported by the Gemini Developer API.\n */\n generationConfig?: GenerationConfig;\n}\n\n/** Parameters for counting tokens. */\nexport declare interface CountTokensParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Input content. */\n contents: ContentListUnion;\n /** Configuration for counting tokens. */\n config?: CountTokensConfig;\n}\n\n/** Response for counting tokens. */\nexport class CountTokensResponse {\n /** Total number of tokens. */\n totalTokens?: number;\n /** Number of tokens in the cached part of the prompt (the cached content). */\n cachedContentTokenCount?: number;\n}\n\n/** Optional parameters for computing tokens. */\nexport declare interface ComputeTokensConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for computing tokens. */\nexport declare interface ComputeTokensParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Input content. */\n contents: ContentListUnion;\n /** Optional parameters for the request.\n */\n config?: ComputeTokensConfig;\n}\n\n/** Tokens info with a list of tokens and the corresponding list of token ids. */\nexport declare interface TokensInfo {\n /** Optional. Optional fields for the role from the corresponding Content. */\n role?: string;\n /** A list of token ids from the input. */\n tokenIds?: string[];\n /** A list of tokens from the input. */\n tokens?: string[];\n}\n\n/** Response for computing tokens. */\nexport class ComputeTokensResponse {\n /** Lists of tokens info from the input. A ComputeTokensRequest could have multiple instances with a prompt in each instance. We also need to return lists of tokens info for the request with multiple instances. */\n tokensInfo?: TokensInfo[];\n}\n\n/** Configuration for generating videos. */\nexport declare interface GenerateVideosConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Number of output videos. */\n numberOfVideos?: number;\n /** The gcs bucket where to save the generated videos. */\n outputGcsUri?: string;\n /** Frames per second for video generation. */\n fps?: number;\n /** Duration of the clip for video generation in seconds. */\n durationSeconds?: number;\n /** The RNG seed. If RNG seed is exactly same for each request with unchanged inputs, the prediction results will be consistent. Otherwise, a random RNG seed will be used each time to produce a different result. */\n seed?: number;\n /** The aspect ratio for the generated video. 16:9 (landscape) and 9:16 (portrait) are supported. */\n aspectRatio?: string;\n /** The resolution for the generated video. 1280x720, 1920x1080 are supported. */\n resolution?: string;\n /** Whether allow to generate person videos, and restrict to specific ages. Supported values are: dont_allow, allow_adult. */\n personGeneration?: string;\n /** The pubsub topic where to publish the video generation progress. */\n pubsubTopic?: string;\n /** Optional field in addition to the text content. Negative prompts can be explicitly stated here to help generate the video. */\n negativePrompt?: string;\n /** Whether to use the prompt rewriting logic. */\n enhancePrompt?: boolean;\n}\n\n/** Class that represents the parameters for generating an image. */\nexport declare interface GenerateVideosParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** The text prompt for generating the videos. Optional for image to video use cases. */\n prompt?: string;\n /** The input image for generating the videos.\n Optional if prompt is provided. */\n image?: Image;\n /** Configuration for generating videos. */\n config?: GenerateVideosConfig;\n}\n\n/** A generated video. */\nexport declare interface Video {\n /** Path to another storage. */\n uri?: string;\n /** Video bytes. */\n videoBytes?: string;\n /** Video encoding, for example \"video/mp4\". */\n mimeType?: string;\n}\n\n/** A generated video. */\nexport declare interface GeneratedVideo {\n /** The output video */\n video?: Video;\n}\n\n/** Response with generated videos. */\nexport class GenerateVideosResponse {\n /** List of the generated videos */\n generatedVideos?: GeneratedVideo[];\n /** Returns if any videos were filtered due to RAI policies. */\n raiMediaFilteredCount?: number;\n /** Returns rai failure reasons if any. */\n raiMediaFilteredReasons?: string[];\n}\n\n/** A video generation operation. */\nexport declare interface GenerateVideosOperation {\n /** The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. */\n name?: string;\n /** Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. */\n metadata?: Record;\n /** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */\n done?: boolean;\n /** The error result of the operation in case of failure or cancellation. */\n error?: Record;\n /** The generated videos. */\n response?: GenerateVideosResponse;\n}\n\n/** Optional configuration for cached content creation. */\nexport declare interface CreateCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: \"3.5s\". */\n ttl?: string;\n /** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */\n expireTime?: string;\n /** The user-generated meaningful display name of the cached content.\n */\n displayName?: string;\n /** The content to cache.\n */\n contents?: ContentListUnion;\n /** Developer set system instruction.\n */\n systemInstruction?: ContentUnion;\n /** A list of `Tools` the model may use to generate the next response.\n */\n tools?: Tool[];\n /** Configuration for the tools to use. This config is shared for all tools.\n */\n toolConfig?: ToolConfig;\n}\n\n/** Parameters for caches.create method. */\nexport declare interface CreateCachedContentParameters {\n /** ID of the model to use. Example: gemini-1.5-flash */\n model: string;\n /** Configuration that contains optional parameters.\n */\n config?: CreateCachedContentConfig;\n}\n\n/** Metadata on the usage of the cached content. */\nexport declare interface CachedContentUsageMetadata {\n /** Duration of audio in seconds. */\n audioDurationSeconds?: number;\n /** Number of images. */\n imageCount?: number;\n /** Number of text characters. */\n textCount?: number;\n /** Total number of tokens that the cached content consumes. */\n totalTokenCount?: number;\n /** Duration of video in seconds. */\n videoDurationSeconds?: number;\n}\n\n/** A resource used in LLM queries for users to explicitly specify what to cache. */\nexport declare interface CachedContent {\n /** The server-generated resource name of the cached content. */\n name?: string;\n /** The user-generated meaningful display name of the cached content. */\n displayName?: string;\n /** The name of the publisher model to use for cached content. */\n model?: string;\n /** Creation time of the cache entry. */\n createTime?: string;\n /** When the cache entry was last updated in UTC time. */\n updateTime?: string;\n /** Expiration time of the cached content. */\n expireTime?: string;\n /** Metadata on the usage of the cached content. */\n usageMetadata?: CachedContentUsageMetadata;\n}\n\n/** Optional parameters for caches.get method. */\nexport declare interface GetCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for caches.get method. */\nexport declare interface GetCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Optional parameters for the request.\n */\n config?: GetCachedContentConfig;\n}\n\n/** Optional parameters for caches.delete method. */\nexport declare interface DeleteCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for caches.delete method. */\nexport declare interface DeleteCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Optional parameters for the request.\n */\n config?: DeleteCachedContentConfig;\n}\n\n/** Empty response for caches.delete method. */\nexport class DeleteCachedContentResponse {}\n\n/** Optional parameters for caches.update method. */\nexport declare interface UpdateCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: \"3.5s\". */\n ttl?: string;\n /** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */\n expireTime?: string;\n}\n\nexport declare interface UpdateCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Configuration that contains optional parameters.\n */\n config?: UpdateCachedContentConfig;\n}\n\n/** Config for caches.list method. */\nexport declare interface ListCachedContentsConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n pageSize?: number;\n pageToken?: string;\n}\n\n/** Parameters for caches.list method. */\nexport declare interface ListCachedContentsParameters {\n /** Configuration that contains optional parameters.\n */\n config?: ListCachedContentsConfig;\n}\n\nexport class ListCachedContentsResponse {\n nextPageToken?: string;\n /** List of cached contents.\n */\n cachedContents?: CachedContent[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface ListFilesConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n pageSize?: number;\n pageToken?: string;\n}\n\n/** Generates the parameters for the list method. */\nexport declare interface ListFilesParameters {\n /** Used to override the default configuration. */\n config?: ListFilesConfig;\n}\n\n/** Status of a File that uses a common error model. */\nexport declare interface FileStatus {\n /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */\n details?: Record[];\n /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */\n message?: string;\n /** The status code. 0 for OK, 1 for CANCELLED */\n code?: number;\n}\n\n/** A file uploaded to the API. */\nexport declare interface File {\n /** The `File` resource name. The ID (name excluding the \"files/\" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be generated. Example: `files/123-456` */\n name?: string;\n /** Optional. The human-readable display name for the `File`. The display name must be no more than 512 characters in length, including spaces. Example: 'Welcome Image' */\n displayName?: string;\n /** Output only. MIME type of the file. */\n mimeType?: string;\n /** Output only. Size of the file in bytes. */\n sizeBytes?: string;\n /** Output only. The timestamp of when the `File` was created. */\n createTime?: string;\n /** Output only. The timestamp of when the `File` will be deleted. Only set if the `File` is scheduled to expire. */\n expirationTime?: string;\n /** Output only. The timestamp of when the `File` was last updated. */\n updateTime?: string;\n /** Output only. SHA-256 hash of the uploaded bytes. The hash value is encoded in base64 format. */\n sha256Hash?: string;\n /** Output only. The URI of the `File`. */\n uri?: string;\n /** Output only. The URI of the `File`, only set for downloadable (generated) files. */\n downloadUri?: string;\n /** Output only. Processing state of the File. */\n state?: FileState;\n /** Output only. The source of the `File`. */\n source?: FileSource;\n /** Output only. Metadata for a video. */\n videoMetadata?: Record;\n /** Output only. Error status if File processing failed. */\n error?: FileStatus;\n}\n\n/** Response for the list files method. */\nexport class ListFilesResponse {\n /** A token to retrieve next page of results. */\n nextPageToken?: string;\n /** The list of files. */\n files?: File[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface CreateFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the private _create method. */\nexport declare interface CreateFileParameters {\n /** The file to be uploaded.\n mime_type: (Required) The MIME type of the file. Must be provided.\n name: (Optional) The name of the file in the destination (e.g.\n 'files/sample-image').\n display_name: (Optional) The display name of the file.\n */\n file: File;\n /** Used to override the default configuration. */\n config?: CreateFileConfig;\n}\n\n/** A wrapper class for the http response. */\nexport class HttpResponse {\n /** Used to retain the processed HTTP headers in the response. */\n headers?: Record;\n /**\n * The original http response.\n */\n responseInternal: Response;\n\n constructor(response: Response) {\n // Process the headers.\n const headers: Record = {};\n for (const pair of response.headers.entries()) {\n headers[pair[0]] = pair[1];\n }\n this.headers = headers;\n\n // Keep the original response.\n this.responseInternal = response;\n }\n\n json(): Promise {\n return this.responseInternal.json();\n }\n}\n\n/** Callbacks for the live API. */\nexport interface LiveCallbacks {\n /**\n * Called when the websocket connection is established.\n */\n onopen?: (() => void) | null;\n /**\n * Called when a message is received from the server.\n */\n onmessage: (e: LiveServerMessage) => void;\n /**\n * Called when an error occurs.\n */\n onerror?: ((e: ErrorEvent) => void) | null;\n /**\n * Called when the websocket connection is closed.\n */\n onclose?: ((e: CloseEvent) => void) | null;\n}\n\n/** Parameters for the upload file method. */\nexport interface UploadFileParameters {\n /** The string path to the file to be uploaded or a Blob object. */\n file: string | globalThis.Blob;\n /** Configuration that contains optional parameters. */\n config?: UploadFileConfig;\n}\n/** Response for the create file method. */\nexport class CreateFileResponse {\n /** Used to retain the full HTTP response. */\n sdkHttpResponse?: HttpResponse;\n}\n\n/** Used to override the default configuration. */\nexport declare interface GetFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the get method. */\nexport declare interface GetFileParameters {\n /** The name identifier for the file to retrieve. */\n name: string;\n /** Used to override the default configuration. */\n config?: GetFileConfig;\n}\n\n/** Used to override the default configuration. */\nexport declare interface DeleteFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the get method. */\nexport declare interface DeleteFileParameters {\n /** The name identifier for the file to be deleted. */\n name: string;\n /** Used to override the default configuration. */\n config?: DeleteFileConfig;\n}\n\n/** Response for the delete file method. */\nexport class DeleteFileResponse {}\n\nexport declare interface GetOperationConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for the GET method. */\nexport declare interface GetOperationParameters {\n /** The server-assigned name for the operation. */\n operationName: string;\n /** Used to override the default configuration. */\n config?: GetOperationConfig;\n}\n\nexport declare interface FetchPredictOperationConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for the fetchPredictOperation method. */\nexport declare interface FetchPredictOperationParameters {\n /** The server-assigned name for the operation. */\n operationName: string;\n resourceName: string;\n /** Used to override the default configuration. */\n config?: FetchPredictOperationConfig;\n}\n\nexport declare interface TestTableItem {\n /** The name of the test. This is used to derive the replay id. */\n name?: string;\n /** The parameters to the test. Use pydantic models. */\n parameters?: Record;\n /** Expects an exception for MLDev matching the string. */\n exceptionIfMldev?: string;\n /** Expects an exception for Vertex matching the string. */\n exceptionIfVertex?: string;\n /** Use if you don't want to use the default replay id which is derived from the test name. */\n overrideReplayId?: string;\n /** True if the parameters contain an unsupported union type. This test will be skipped for languages that do not support the union type. */\n hasUnion?: boolean;\n /** When set to a reason string, this test will be skipped in the API mode. Use this flag for tests that can not be reproduced with the real API. E.g. a test that deletes a resource. */\n skipInApiMode?: string;\n /** Keys to ignore when comparing the request and response. This is useful for tests that are not deterministic. */\n ignoreKeys?: string[];\n}\n\nexport declare interface TestTableFile {\n comment?: string;\n testMethod?: string;\n parameterNames?: string[];\n testTable?: TestTableItem[];\n}\n\n/** Represents a single request in a replay. */\nexport declare interface ReplayRequest {\n method?: string;\n url?: string;\n headers?: Record;\n bodySegments?: Record[];\n}\n\n/** Represents a single response in a replay. */\nexport class ReplayResponse {\n statusCode?: number;\n headers?: Record;\n bodySegments?: Record[];\n sdkResponseSegments?: Record[];\n}\n\n/** Represents a single interaction, request and response in a replay. */\nexport declare interface ReplayInteraction {\n request?: ReplayRequest;\n response?: ReplayResponse;\n}\n\n/** Represents a recorded session. */\nexport declare interface ReplayFile {\n replayId?: string;\n interactions?: ReplayInteraction[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface UploadFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The name of the file in the destination (e.g., 'files/sample-image'. If not provided one will be generated. */\n name?: string;\n /** mime_type: The MIME type of the file. If not provided, it will be inferred from the file extension. */\n mimeType?: string;\n /** Optional display name of the file. */\n displayName?: string;\n}\n\n/** Used to override the default configuration. */\nexport declare interface DownloadFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Configuration for upscaling an image.\n\n For more information on this configuration, refer to\n the `Imagen API reference documentation\n `_.\n */\nexport declare interface UpscaleImageConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Whether to include a reason for filtered-out images in the\n response. */\n includeRaiReason?: boolean;\n /** The image format that the output should be saved as. */\n outputMimeType?: string;\n /** The level of compression if the ``output_mime_type`` is\n ``image/jpeg``. */\n outputCompressionQuality?: number;\n}\n\n/** User-facing config UpscaleImageParameters. */\nexport declare interface UpscaleImageParameters {\n /** The model to use. */\n model: string;\n /** The input image to upscale. */\n image: Image;\n /** The factor to upscale the image (x2 or x4). */\n upscaleFactor: string;\n /** Configuration for upscaling. */\n config?: UpscaleImageConfig;\n}\n\n/** A raw reference image.\n\n A raw reference image represents the base image to edit, provided by the user.\n It can optionally be provided in addition to a mask reference image or\n a style reference image.\n */\nexport declare interface RawReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n}\n\n/** Configuration for a Mask reference image. */\nexport declare interface MaskReferenceConfig {\n /** Prompts the model to generate a mask instead of you needing to\n provide one (unless MASK_MODE_USER_PROVIDED is used). */\n maskMode?: MaskReferenceMode;\n /** A list of up to 5 class ids to use for semantic segmentation.\n Automatically creates an image mask based on specific objects. */\n segmentationClasses?: number[];\n /** Dilation percentage of the mask provided.\n Float between 0 and 1. */\n maskDilation?: number;\n}\n\n/** A mask reference image.\n\n This encapsulates either a mask image provided by the user and configs for\n the user provided mask, or only config parameters for the model to generate\n a mask.\n\n A mask image is an image whose non-zero values indicate where to edit the base\n image. If the user provides a mask image, the mask must be in the same\n dimensions as the raw image.\n */\nexport declare interface MaskReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the mask reference image. */\n config?: MaskReferenceConfig;\n}\n\n/** Configuration for a Control reference image. */\nexport declare interface ControlReferenceConfig {\n /** The type of control reference image to use. */\n controlType?: ControlReferenceType;\n /** Defaults to False. When set to True, the control image will be\n computed by the model based on the control type. When set to False,\n the control image must be provided by the user. */\n enableControlImageComputation?: boolean;\n}\n\n/** A control reference image.\n\n The image of the control reference image is either a control image provided\n by the user, or a regular image which the backend will use to generate a\n control image of. In the case of the latter, the\n enable_control_image_computation field in the config should be set to True.\n\n A control image is an image that represents a sketch image of areas for the\n model to fill in based on the prompt.\n */\nexport declare interface ControlReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the control reference image. */\n config?: ControlReferenceConfig;\n}\n\n/** Configuration for a Style reference image. */\nexport declare interface StyleReferenceConfig {\n /** A text description of the style to use for the generated image. */\n styleDescription?: string;\n}\n\n/** A style reference image.\n\n This encapsulates a style reference image provided by the user, and\n additionally optional config parameters for the style reference image.\n\n A raw reference image can also be provided as a destination for the style to\n be applied to.\n */\nexport declare interface StyleReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the style reference image. */\n config?: StyleReferenceConfig;\n}\n\n/** Configuration for a Subject reference image. */\nexport declare interface SubjectReferenceConfig {\n /** The subject type of a subject reference image. */\n subjectType?: SubjectReferenceType;\n /** Subject description for the image. */\n subjectDescription?: string;\n}\n\n/** A subject reference image.\n\n This encapsulates a subject reference image provided by the user, and\n additionally optional config parameters for the subject reference image.\n\n A raw reference image can also be provided as a destination for the subject to\n be applied to.\n */\nexport declare interface SubjectReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the subject reference image. */\n config?: SubjectReferenceConfig;\n}\n\n/** Sent in response to a `LiveGenerateContentSetup` message from the client. */\nexport declare interface LiveServerSetupComplete {}\n\n/** Incremental server update generated by the model in response to client messages.\n\n Content is generated as quickly as possible, and not in real time. Clients\n may choose to buffer and play it out in real time.\n */\nexport declare interface LiveServerContent {\n /** The content that the model has generated as part of the current conversation with the user. */\n modelTurn?: Content;\n /** If true, indicates that the model is done generating. Generation will only start in response to additional client messages. Can be set alongside `content`, indicating that the `content` is the last in the turn. */\n turnComplete?: boolean;\n /** If true, indicates that a client message has interrupted current model generation. If the client is playing out the content in realtime, this is a good signal to stop and empty the current queue. */\n interrupted?: boolean;\n /** If true, indicates that the model is done generating. When model is\n interrupted while generating there will be no generation_complete message\n in interrupted turn, it will go through interrupted > turn_complete.\n When model assumes realtime playback there will be delay between\n generation_complete and turn_complete that is caused by model\n waiting for playback to finish. If true, indicates that the model\n has finished generating all content. This is a signal to the client\n that it can stop sending messages. */\n generationComplete?: boolean;\n}\n\n/** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */\nexport declare interface LiveServerToolCall {\n /** The function call to be executed. */\n functionCalls?: FunctionCall[];\n}\n\n/** Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled.\n\n If there were side-effects to those tool calls, clients may attempt to undo\n the tool calls. This message occurs only in cases where the clients interrupt\n server turns.\n */\nexport declare interface LiveServerToolCallCancellation {\n /** The ids of the tool calls to be cancelled. */\n ids?: string[];\n}\n\n/** Usage metadata about response(s). */\nexport declare interface UsageMetadata {\n /** Number of tokens in the prompt. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */\n promptTokenCount?: number;\n /** Number of tokens in the cached part of the prompt (the cached content). */\n cachedContentTokenCount?: number;\n /** Total number of tokens across all the generated response candidates. */\n responseTokenCount?: number;\n /** Number of tokens present in tool-use prompt(s). */\n toolUsePromptTokenCount?: number;\n /** Number of tokens of thoughts for thinking models. */\n thoughtsTokenCount?: number;\n /** Total token count for prompt, response candidates, and tool-use prompts(if present). */\n totalTokenCount?: number;\n /** List of modalities that were processed in the request input. */\n promptTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were processed in the cache input. */\n cacheTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were returned in the response. */\n responseTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were processed in the tool-use prompt. */\n toolUsePromptTokensDetails?: ModalityTokenCount[];\n /** Traffic type. This shows whether a request consumes Pay-As-You-Go\n or Provisioned Throughput quota. */\n trafficType?: TrafficType;\n}\n\n/** Server will not be able to service client soon. */\nexport declare interface LiveServerGoAway {\n /** The remaining time before the connection will be terminated as ABORTED. The minimal time returned here is specified differently together with the rate limits for a given model. */\n timeLeft?: string;\n}\n\n/** Update of the session resumption state.\n\n Only sent if `session_resumption` was set in the connection config.\n */\nexport declare interface LiveServerSessionResumptionUpdate {\n /** New handle that represents state that can be resumed. Empty if `resumable`=false. */\n newHandle?: string;\n /** True if session can be resumed at this point. It might be not possible to resume session at some points. In that case we send update empty new_handle and resumable=false. Example of such case could be model executing function calls or just generating. Resuming session (using previous session token) in such state will result in some data loss. */\n resumable?: boolean;\n /** Index of last message sent by client that is included in state represented by this SessionResumptionToken. Only sent when `SessionResumptionConfig.transparent` is set.\n\nPresence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `SessionResmumptionTokenUpdate`. This field will enable them to limit buffering (avoid keeping all requests in RAM).\n\nNote: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames arelikely not needed. */\n lastConsumedClientMessageIndex?: string;\n}\n\n/** Response message for API call. */\nexport declare interface LiveServerMessage {\n /** Sent in response to a `LiveClientSetup` message from the client. */\n setupComplete?: LiveServerSetupComplete;\n /** Content generated by the model in response to client messages. */\n serverContent?: LiveServerContent;\n /** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */\n toolCall?: LiveServerToolCall;\n /** Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled. */\n toolCallCancellation?: LiveServerToolCallCancellation;\n /** Usage metadata about model response(s). */\n usageMetadata?: UsageMetadata;\n /** Server will disconnect soon. */\n goAway?: LiveServerGoAway;\n /** Update of the session resumption state. */\n sessionResumptionUpdate?: LiveServerSessionResumptionUpdate;\n}\n\n/** Configures automatic detection of activity. */\nexport declare interface AutomaticActivityDetection {\n /** If enabled, detected voice and text input count as activity. If disabled, the client must send activity signals. */\n disabled?: boolean;\n /** Determines how likely speech is to be detected. */\n startOfSpeechSensitivity?: StartSensitivity;\n /** Determines how likely detected speech is ended. */\n endOfSpeechSensitivity?: EndSensitivity;\n /** The required duration of detected speech before start-of-speech is committed. The lower this value the more sensitive the start-of-speech detection is and the shorter speech can be recognized. However, this also increases the probability of false positives. */\n prefixPaddingMs?: number;\n /** The required duration of detected non-speech (e.g. silence) before end-of-speech is committed. The larger this value, the longer speech gaps can be without interrupting the user's activity but this will increase the model's latency. */\n silenceDurationMs?: number;\n}\n\n/** Marks the end of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface RealtimeInputConfig {\n /** If not set, automatic activity detection is enabled by default. If automatic voice detection is disabled, the client must send activity signals. */\n automaticActivityDetection?: AutomaticActivityDetection;\n /** Defines what effect activity has. */\n activityHandling?: ActivityHandling;\n /** Defines which input is included in the user's turn. */\n turnCoverage?: TurnCoverage;\n}\n\n/** Configuration of session resumption mechanism.\n\n Included in `LiveConnectConfig.session_resumption`. If included server\n will send `LiveServerSessionResumptionUpdate` messages.\n */\nexport declare interface SessionResumptionConfig {\n /** Session resumption handle of previous session (session to restore).\n\nIf not present new session will be started. */\n handle?: string;\n /** If set the server will send `last_consumed_client_message_index` in the `session_resumption_update` messages to allow for transparent reconnections. */\n transparent?: boolean;\n}\n\n/** Context window will be truncated by keeping only suffix of it.\n\n Context window will always be cut at start of USER role turn. System\n instructions and `BidiGenerateContentSetup.prefix_turns` will not be\n subject to the sliding window mechanism, they will always stay at the\n beginning of context window.\n */\nexport declare interface SlidingWindow {\n /** Session reduction target -- how many tokens we should keep. Window shortening operation has some latency costs, so we should avoid running it on every turn. Should be < trigger_tokens. If not set, trigger_tokens/2 is assumed. */\n targetTokens?: string;\n}\n\n/** Enables context window compression -- mechanism managing model context window so it does not exceed given length. */\nexport declare interface ContextWindowCompressionConfig {\n /** Number of tokens (before running turn) that triggers context window compression mechanism. */\n triggerTokens?: string;\n /** Sliding window compression mechanism. */\n slidingWindow?: SlidingWindow;\n}\n\n/** Message contains configuration that will apply for the duration of the streaming session. */\nexport declare interface LiveClientSetup {\n /** \n The fully qualified name of the publisher model or tuned model endpoint to\n use.\n */\n model?: string;\n /** The generation configuration for the session.\n Note: only a subset of fields are supported.\n */\n generationConfig?: GenerationConfig;\n /** The user provided system instructions for the model.\n Note: only text should be used in parts and content in each part will be\n in a separate paragraph. */\n systemInstruction?: Content;\n /** A list of `Tools` the model may use to generate the next response.\n\n A `Tool` is a piece of code that enables the system to interact with\n external systems to perform an action, or set of actions, outside of\n knowledge and scope of the model. */\n tools?: ToolListUnion;\n /** Configures the realtime input behavior in BidiGenerateContent. */\n realtimeInputConfig?: RealtimeInputConfig;\n /** Configures session resumption mechanism.\n\n If included server will send SessionResumptionUpdate messages. */\n sessionResumption?: SessionResumptionConfig;\n /** Configures context window compression mechanism.\n\n If included, server will compress context window to fit into given length. */\n contextWindowCompression?: ContextWindowCompressionConfig;\n}\n\n/** Incremental update of the current conversation delivered from the client.\n\n All the content here will unconditionally be appended to the conversation\n history and used as part of the prompt to the model to generate content.\n\n A message here will interrupt any current model generation.\n */\nexport declare interface LiveClientContent {\n /** The content appended to the current conversation with the model.\n\n For single-turn queries, this is a single instance. For multi-turn\n queries, this is a repeated field that contains conversation history and\n latest request.\n */\n turns?: Content[];\n /** If true, indicates that the server content generation should start with\n the currently accumulated prompt. Otherwise, the server will await\n additional messages before starting generation. */\n turnComplete?: boolean;\n}\n\n/** Marks the start of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface ActivityStart {}\n\n/** Marks the end of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface ActivityEnd {}\n\n/** User input that is sent in real time.\n\n This is different from `LiveClientContent` in a few ways:\n\n - Can be sent continuously without interruption to model generation.\n - If there is a need to mix data interleaved across the\n `LiveClientContent` and the `LiveClientRealtimeInput`, server attempts to\n optimize for best response, but there are no guarantees.\n - End of turn is not explicitly specified, but is rather derived from user\n activity (for example, end of speech).\n - Even before the end of turn, the data is processed incrementally\n to optimize for a fast start of the response from the model.\n - Is always assumed to be the user's input (cannot be used to populate\n conversation history).\n */\nexport declare interface LiveClientRealtimeInput {\n /** Inlined bytes data for media input. */\n mediaChunks?: Blob[];\n /** Marks the start of user activity. */\n activityStart?: ActivityStart;\n /** Marks the end of user activity. */\n activityEnd?: ActivityEnd;\n}\n\n/** Client generated response to a `ToolCall` received from the server.\n\n Individual `FunctionResponse` objects are matched to the respective\n `FunctionCall` objects by the `id` field.\n\n Note that in the unary and server-streaming GenerateContent APIs function\n calling happens by exchanging the `Content` parts, while in the bidi\n GenerateContent APIs function calling happens over this dedicated set of\n messages.\n */\nexport class LiveClientToolResponse {\n /** The response to the function calls. */\n functionResponses?: FunctionResponse[];\n}\n\n/** Messages sent by the client in the API call. */\nexport declare interface LiveClientMessage {\n /** Message to be sent by the system when connecting to the API. SDK users should not send this message. */\n setup?: LiveClientSetup;\n /** Incremental update of the current conversation delivered from the client. */\n clientContent?: LiveClientContent;\n /** User input that is sent in real time. */\n realtimeInput?: LiveClientRealtimeInput;\n /** Response to a `ToolCallMessage` received from the server. */\n toolResponse?: LiveClientToolResponse;\n}\n\n/** The audio transcription configuration in Setup. */\nexport declare interface AudioTranscriptionConfig {}\n\n/** Session config for the API connection. */\nexport declare interface LiveConnectConfig {\n /** The generation configuration for the session. */\n generationConfig?: GenerationConfig;\n /** The requested modalities of the response. Represents the set of\n modalities that the model can return. Defaults to AUDIO if not specified.\n */\n responseModalities?: Modality[];\n /** The speech generation configuration.\n */\n speechConfig?: SpeechConfig;\n /** The user provided system instructions for the model.\n Note: only text should be used in parts and content in each part will be\n in a separate paragraph. */\n systemInstruction?: Content;\n /** A list of `Tools` the model may use to generate the next response.\n\n A `Tool` is a piece of code that enables the system to interact with\n external systems to perform an action, or set of actions, outside of\n knowledge and scope of the model. */\n tools?: ToolListUnion;\n /** Configures session resumption mechanism.\n\nIf included the server will send SessionResumptionUpdate messages. */\n sessionResumption?: SessionResumptionConfig;\n /** Configures the realtime input behavior in BidiGenerateContent. */\n realtimeInputConfig?: RealtimeInputConfig;\n /** Configures context window compression mechanism.\n\n If included, server will compress context window to fit into given length. */\n contextWindowCompression?: ContextWindowCompressionConfig;\n}\n\n/** Parameters for connecting to the live API. */\nexport declare interface LiveConnectParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** callbacks */\n callbacks: LiveCallbacks;\n /** Optional configuration parameters for the request.\n */\n config?: LiveConnectConfig;\n}\n\n/** Parameters for initializing a new chat session.\n\n These parameters are used when creating a chat session with the\n `chats.create()` method.\n */\nexport declare interface CreateChatParameters {\n /** The name of the model to use for the chat session.\n\n For example: 'gemini-2.0-flash', 'gemini-1.5-pro', etc. See gemini API\n docs to find the available models.\n */\n model: string;\n /** Config for the entire chat session.\n\n This config applies to all requests within the session\n unless overridden by a per-request `config` in `SendMessageParameters`.\n */\n config?: GenerateContentConfig;\n /** The initial conversation history for the chat session.\n\n This allows you to start the chat with a pre-existing history. The history\n must be a list of `Content` alternating between 'user' and 'model' roles.\n It should start with a 'user' message.\n */\n history?: Content[];\n}\n\n/** Parameters for sending a message within a chat session.\n\n These parameters are used with the `chat.sendMessage()` method.\n */\nexport declare interface SendMessageParameters {\n /** The message to send to the model.\n\n The SDK will combine all parts into a single 'user' content to send to\n the model.\n */\n message: PartListUnion;\n /** Config for this specific request.\n\n Please note that the per-request config does not change the chat level\n config, nor inherit from it. If you intend to use some values from the\n chat's default config, you must explicitly copy them into this per-request\n config.\n */\n config?: GenerateContentConfig;\n}\n\n/** Parameters for sending client content to the live API. */\nexport declare interface LiveSendClientContentParameters {\n /** Client content to send to the session. */\n turns?: ContentListUnion;\n /** If true, indicates that the server content generation should start with\n the currently accumulated prompt. Otherwise, the server will await\n additional messages before starting generation. */\n turnComplete?: boolean;\n}\n\n/** Parameters for sending realtime input to the live API. */\nexport declare interface LiveSendRealtimeInputParameters {\n /** Realtime input to send to the session. */\n media: Blob;\n /** Marks the start of user activity. */\n activityStart?: ActivityStart;\n /** Marks the end of user activity. */\n activityEnd?: ActivityEnd;\n}\n\n/** Parameters for sending tool responses to the live API. */\nexport class LiveSendToolResponseParameters {\n /** Tool responses to send to the session. */\n functionResponses: FunctionResponse[] | FunctionResponse = [];\n}\n\n/** Parameters for the get method of the operations module. */\nexport declare interface OperationGetParameters {\n /** The operation to be retrieved. */\n operation: GenerateVideosOperation;\n /** Used to override the default configuration. */\n config?: GetOperationConfig;\n}\n\nexport type PartUnion = Part | string;\n\nexport type PartListUnion = PartUnion[] | PartUnion;\n\nexport type ContentUnion = Content | PartUnion[] | PartUnion;\n\nexport type ContentListUnion = ContentUnion[] | ContentUnion;\n\nexport type SchemaUnion = Schema;\n\nexport type SpeechConfigUnion = SpeechConfig | string;\n\nexport type ToolListUnion = Tool[];\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_caches_converters';\nimport {PagedItem, Pager} from './pagers';\nimport * as types from './types';\n\nexport class Caches extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Lists cached content configurations.\n *\n * @param params - The parameters for the list request.\n * @return The paginated results of the list of cached contents.\n *\n * @example\n * ```ts\n * const cachedContents = await ai.caches.list({config: {'pageSize': 2}});\n * for (const cachedContent of cachedContents) {\n * console.log(cachedContent);\n * }\n * ```\n */\n list = async (\n params: types.ListCachedContentsParameters = {},\n ): Promise> => {\n return new Pager(\n PagedItem.PAGED_ITEM_CACHED_CONTENTS,\n (x: types.ListCachedContentsParameters) => this.listInternal(x),\n await this.listInternal(params),\n params,\n );\n };\n\n /**\n * Creates a cached contents resource.\n *\n * @remarks\n * Context caching is only supported for specific models. See [Gemini\n * Developer API reference] (https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac)\n * and [Vertex AI reference] (https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models)\n * for more information.\n *\n * @param params - The parameters for the create request.\n * @return The created cached content.\n *\n * @example\n * ```ts\n * const contents = ...; // Initialize the content to cache.\n * const response = await ai.caches.create({\n * model: 'gemini-1.5-flash',\n * config: {\n * 'contents': contents,\n * 'displayName': 'test cache',\n * 'systemInstruction': 'What is the sum of the two pdfs?',\n * 'ttl': '86400s',\n * }\n * });\n * ```\n */\n async create(\n params: types.CreateCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.createCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.createCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n /**\n * Gets cached content configurations.\n *\n * @param params - The parameters for the get request.\n * @return The cached content.\n *\n * @example\n * ```ts\n * await ai.caches.get({name: 'gemini-1.5-flash'});\n * ```\n */\n async get(\n params: types.GetCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.getCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n /**\n * Deletes cached content.\n *\n * @param params - The parameters for the delete request.\n * @return The empty response returned by the API.\n *\n * @example\n * ```ts\n * await ai.caches.delete({name: 'gemini-1.5-flash'});\n * ```\n */\n async delete(\n params: types.DeleteCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.deleteCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteCachedContentResponseFromVertex();\n const typedResp = new types.DeleteCachedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.deleteCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteCachedContentResponseFromMldev();\n const typedResp = new types.DeleteCachedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Updates cached content configurations.\n *\n * @param params - The parameters for the update request.\n * @return The updated cached content.\n *\n * @example\n * ```ts\n * const response = await ai.caches.update({\n * name: 'gemini-1.5-flash',\n * config: {'ttl': '7600s'}\n * });\n * ```\n */\n async update(\n params: types.UpdateCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.updateCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'PATCH',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.updateCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'PATCH',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n private async listInternal(\n params: types.ListCachedContentsParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.listCachedContentsParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listCachedContentsResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListCachedContentsResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.listCachedContentsParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listCachedContentsResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListCachedContentsResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ApiClient} from './_api_client';\nimport * as t from './_transformers';\nimport {Models} from './models';\nimport * as types from './types';\n\n/**\n * Returns true if the response is valid, false otherwise.\n */\nfunction isValidResponse(response: types.GenerateContentResponse): boolean {\n if (response.candidates == undefined || response.candidates.length === 0) {\n return false;\n }\n const content = response.candidates[0]?.content;\n if (content === undefined) {\n return false;\n }\n return isValidContent(content);\n}\n\nfunction isValidContent(content: types.Content): boolean {\n if (content.parts === undefined || content.parts.length === 0) {\n return false;\n }\n for (const part of content.parts) {\n if (part === undefined || Object.keys(part).length === 0) {\n return false;\n }\n if (part.text !== undefined && part.text === '') {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Validates the history contains the correct roles.\n *\n * @remarks\n * Expects the history to start with a user turn and then alternate between\n * user and model turns.\n *\n * @throws Error if the history does not start with a user turn.\n * @throws Error if the history contains an invalid role.\n */\nfunction validateHistory(history: types.Content[]) {\n // Empty history is valid.\n if (history.length === 0) {\n return;\n }\n if (history[0].role !== 'user') {\n throw new Error('History must start with a user turn.');\n }\n for (const content of history) {\n if (content.role !== 'user' && content.role !== 'model') {\n throw new Error(`Role must be user or model, but got ${content.role}.`);\n }\n }\n}\n\n/**\n * Extracts the curated (valid) history from a comprehensive history.\n *\n * @remarks\n * The model may sometimes generate invalid or empty contents(e.g., due to safty\n * filters or recitation). Extracting valid turns from the history\n * ensures that subsequent requests could be accpeted by the model.\n */\nfunction extractCuratedHistory(\n comprehensiveHistory: types.Content[],\n): types.Content[] {\n if (comprehensiveHistory === undefined || comprehensiveHistory.length === 0) {\n return [];\n }\n const curatedHistory: types.Content[] = [];\n const length = comprehensiveHistory.length;\n let i = 0;\n let userInput = comprehensiveHistory[0];\n while (i < length) {\n if (comprehensiveHistory[i].role === 'user') {\n userInput = comprehensiveHistory[i];\n i++;\n } else {\n const modelOutput: types.Content[] = [];\n let isValid = true;\n while (i < length && comprehensiveHistory[i].role === 'model') {\n modelOutput.push(comprehensiveHistory[i]);\n if (isValid && !isValidContent(comprehensiveHistory[i])) {\n isValid = false;\n }\n i++;\n }\n if (isValid) {\n curatedHistory.push(userInput);\n curatedHistory.push(...modelOutput);\n }\n }\n }\n return curatedHistory;\n}\n\n/**\n * A utility class to create a chat session.\n */\nexport class Chats {\n private readonly modelsModule: Models;\n private readonly apiClient: ApiClient;\n\n constructor(modelsModule: Models, apiClient: ApiClient) {\n this.modelsModule = modelsModule;\n this.apiClient = apiClient;\n }\n\n /**\n * Creates a new chat session.\n *\n * @remarks\n * The config in the params will be used for all requests within the chat\n * session unless overridden by a per-request `config` in\n * @see {@link types.SendMessageParameters#config}.\n *\n * @param params - Parameters for creating a chat session.\n * @returns A new chat session.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({\n * model: 'gemini-2.0-flash'\n * config: {\n * temperature: 0.5,\n * maxOutputTokens: 1024,\n * }\n * });\n * ```\n */\n create(params: types.CreateChatParameters) {\n return new Chat(\n this.apiClient,\n this.modelsModule,\n params.model,\n params.config,\n params.history,\n );\n }\n}\n\n/**\n * Chat session that enables sending messages to the model with previous\n * conversation context.\n *\n * @remarks\n * The session maintains all the turns between user and model.\n */\nexport class Chat {\n // A promise to represent the current state of the message being sent to the\n // model.\n private sendPromise: Promise = Promise.resolve();\n\n constructor(\n private readonly apiClient: ApiClient,\n private readonly modelsModule: Models,\n private readonly model: string,\n private readonly config: types.GenerateContentConfig = {},\n private history: types.Content[] = [],\n ) {\n validateHistory(history);\n }\n\n /**\n * Sends a message to the model and returns the response.\n *\n * @remarks\n * This method will wait for the previous message to be processed before\n * sending the next message.\n *\n * @see {@link Chat#sendMessageStream} for streaming method.\n * @param params - parameters for sending messages within a chat session.\n * @returns The model's response.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({model: 'gemini-2.0-flash'});\n * const response = await chat.sendMessage({\n * message: 'Why is the sky blue?'\n * });\n * console.log(response.text);\n * ```\n */\n async sendMessage(\n params: types.SendMessageParameters,\n ): Promise {\n await this.sendPromise;\n const inputContent = t.tContent(this.apiClient, params.message);\n const responsePromise = this.modelsModule.generateContent({\n model: this.model,\n contents: this.getHistory(true).concat(inputContent),\n config: params.config ?? this.config,\n });\n this.sendPromise = (async () => {\n const response = await responsePromise;\n const outputContent = response.candidates?.[0]?.content;\n const modelOutput = outputContent ? [outputContent] : [];\n this.recordHistory(inputContent, modelOutput);\n return;\n })();\n await this.sendPromise;\n return responsePromise;\n }\n\n /**\n * Sends a message to the model and returns the response in chunks.\n *\n * @remarks\n * This method will wait for the previous message to be processed before\n * sending the next message.\n *\n * @see {@link Chat#sendMessage} for non-streaming method.\n * @param params - parameters for sending the message.\n * @return The model's response.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({model: 'gemini-2.0-flash'});\n * const response = await chat.sendMessageStream({\n * message: 'Why is the sky blue?'\n * });\n * for await (const chunk of response) {\n * console.log(chunk.text);\n * }\n * ```\n */\n async sendMessageStream(\n params: types.SendMessageParameters,\n ): Promise> {\n await this.sendPromise;\n const inputContent = t.tContent(this.apiClient, params.message);\n const streamResponse = this.modelsModule.generateContentStream({\n model: this.model,\n contents: this.getHistory(true).concat(inputContent),\n config: params.config ?? this.config,\n });\n this.sendPromise = streamResponse.then(() => undefined);\n const response = await streamResponse;\n const result = this.processStreamResponse(response, inputContent);\n return result;\n }\n\n /**\n * Returns the chat history.\n *\n * @remarks\n * The history is a list of contents alternating between user and model.\n *\n * There are two types of history:\n * - The `curated history` contains only the valid turns between user and\n * model, which will be included in the subsequent requests sent to the model.\n * - The `comprehensive history` contains all turns, including invalid or\n * empty model outputs, providing a complete record of the history.\n *\n * The history is updated after receiving the response from the model,\n * for streaming response, it means receiving the last chunk of the response.\n *\n * The `comprehensive history` is returned by default. To get the `curated\n * history`, set the `curated` parameter to `true`.\n *\n * @param curated - whether to return the curated history or the comprehensive\n * history.\n * @return History contents alternating between user and model for the entire\n * chat session.\n */\n getHistory(curated: boolean = false): types.Content[] {\n return curated ? extractCuratedHistory(this.history) : this.history;\n }\n\n private async *processStreamResponse(\n streamResponse: AsyncGenerator,\n inputContent: types.Content,\n ) {\n const outputContent: types.Content[] = [];\n for await (const chunk of streamResponse) {\n if (isValidResponse(chunk)) {\n const content = chunk.candidates?.[0]?.content;\n if (content !== undefined) {\n outputContent.push(content);\n }\n }\n yield chunk;\n }\n this.recordHistory(inputContent, outputContent);\n }\n\n private recordHistory(\n userInput: types.Content,\n modelOutput: types.Content[],\n ) {\n let outputContents: types.Content[] = [];\n if (\n modelOutput.length > 0 &&\n modelOutput.every((content) => content.role === 'model')\n ) {\n outputContents = modelOutput;\n } else {\n // Appends an empty content when model returns empty response, so that the\n // history is always alternating between user and model.\n outputContents.push({\n role: 'model',\n parts: [],\n } as types.Content);\n }\n this.history.push(userInput);\n this.history.push(...outputContents);\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {Auth} from './_auth';\nimport * as common from './_common';\nimport {Uploader} from './_uploader';\nimport {File, HttpOptions, HttpResponse, UploadFileConfig} from './types';\n\nconst CONTENT_TYPE_HEADER = 'Content-Type';\nconst SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';\nconst USER_AGENT_HEADER = 'User-Agent';\nconst GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';\nexport const SDK_VERSION = '0.8.0'; // x-release-please-version\nconst LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;\nconst VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';\nconst GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';\nconst responseLineRE = /^data: (.*)(?:\\n\\n|\\r\\r|\\r\\n\\r\\n)/;\n\n/**\n * Client errors raised by the GenAI API.\n */\nexport class ClientError extends Error {\n constructor(message: string, stackTrace?: string) {\n if (stackTrace) {\n super(message, {cause: stackTrace});\n } else {\n super(message, {cause: new Error().stack});\n }\n this.message = message;\n this.name = 'ClientError';\n }\n}\n\n/**\n * Server errors raised by the GenAI API.\n */\nexport class ServerError extends Error {\n constructor(message: string, stackTrace?: string) {\n if (stackTrace) {\n super(message, {cause: stackTrace});\n } else {\n super(message, {cause: new Error().stack});\n }\n this.message = message;\n this.name = 'ServerError';\n }\n}\n\n/**\n * Options for initializing the ApiClient. The ApiClient uses the parameters\n * for authentication purposes as well as to infer if SDK should send the\n * request to Vertex AI or Gemini API.\n */\nexport interface ApiClientInitOptions {\n /**\n * The object used for adding authentication headers to API requests.\n */\n auth: Auth;\n /**\n * The uploader to use for uploading files. This field is required for\n * creating a client, will be set through the Node_client or Web_client.\n */\n uploader: Uploader;\n /**\n * Optional. The Google Cloud project ID for Vertex AI users.\n * It is not the numeric project name.\n * If not provided, SDK will try to resolve it from runtime environment.\n */\n project?: string;\n /**\n * Optional. The Google Cloud project location for Vertex AI users.\n * If not provided, SDK will try to resolve it from runtime environment.\n */\n location?: string;\n /**\n * The API Key. This is required for Gemini API users.\n */\n apiKey?: string;\n /**\n * Optional. Set to true if you intend to call Vertex AI endpoints.\n * If unset, default SDK behavior is to call Gemini API.\n */\n vertexai?: boolean;\n /**\n * Optional. The API version for the endpoint.\n * If unset, SDK will choose a default api version.\n */\n apiVersion?: string;\n /**\n * Optional. A set of customizable configuration for HTTP requests.\n */\n httpOptions?: HttpOptions;\n /**\n * Optional. An extra string to append at the end of the User-Agent header.\n *\n * This can be used to e.g specify the runtime and its version.\n */\n userAgentExtra?: string;\n}\n\n/**\n * Represents the necessary information to send a request to an API endpoint.\n * This interface defines the structure for constructing and executing HTTP\n * requests.\n */\nexport interface HttpRequest {\n /**\n * URL path from the modules, this path is appended to the base API URL to\n * form the complete request URL.\n *\n * If you wish to set full URL, use httpOptions.baseUrl instead. Example to\n * set full URL in the request:\n *\n * const request: HttpRequest = {\n * path: '',\n * httpOptions: {\n * baseUrl: 'https://',\n * apiVersion: '',\n * },\n * httpMethod: 'GET',\n * };\n *\n * The result URL will be: https://\n *\n */\n path: string;\n /**\n * Optional query parameters to be appended to the request URL.\n */\n queryParams?: Record;\n /**\n * Optional request body in json string or Blob format, GET request doesn't\n * need a request body.\n */\n body?: string | Blob;\n /**\n * The HTTP method to be used for the request.\n */\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE';\n /**\n * Optional set of customizable configuration for HTTP requests.\n */\n httpOptions?: HttpOptions;\n}\n\n/**\n * The ApiClient class is used to send requests to the Gemini API or Vertex AI\n * endpoints.\n */\nexport class ApiClient {\n readonly clientOptions: ApiClientInitOptions;\n\n constructor(opts: ApiClientInitOptions) {\n this.clientOptions = {\n ...opts,\n project: opts.project,\n location: opts.location,\n apiKey: opts.apiKey,\n vertexai: opts.vertexai,\n };\n\n const initHttpOptions: HttpOptions = {};\n\n if (this.clientOptions.vertexai) {\n initHttpOptions.apiVersion =\n this.clientOptions.apiVersion ?? VERTEX_AI_API_DEFAULT_VERSION;\n // Assume that proj/api key validation occurs before they are passed in.\n if (this.getProject() || this.getLocation()) {\n initHttpOptions.baseUrl = `https://${this.clientOptions.location}-aiplatform.googleapis.com/`;\n this.clientOptions.apiKey = undefined; // unset API key.\n } else {\n initHttpOptions.baseUrl = `https://aiplatform.googleapis.com/`;\n this.clientOptions.project = undefined; // unset project.\n this.clientOptions.location = undefined; // unset location.\n }\n } else {\n initHttpOptions.apiVersion =\n this.clientOptions.apiVersion ?? GOOGLE_AI_API_DEFAULT_VERSION;\n initHttpOptions.baseUrl = `https://generativelanguage.googleapis.com/`;\n }\n\n initHttpOptions.headers = this.getDefaultHeaders();\n\n this.clientOptions.httpOptions = initHttpOptions;\n\n if (opts.httpOptions) {\n this.clientOptions.httpOptions = this.patchHttpOptions(\n initHttpOptions,\n opts.httpOptions,\n );\n }\n }\n\n isVertexAI(): boolean {\n return this.clientOptions.vertexai ?? false;\n }\n\n getProject() {\n return this.clientOptions.project;\n }\n\n getLocation() {\n return this.clientOptions.location;\n }\n\n getApiVersion() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.apiVersion !== undefined\n ) {\n return this.clientOptions.httpOptions.apiVersion;\n }\n throw new Error('API version is not set.');\n }\n\n getBaseUrl() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.baseUrl !== undefined\n ) {\n return this.clientOptions.httpOptions.baseUrl;\n }\n throw new Error('Base URL is not set.');\n }\n\n getRequestUrl() {\n return this.getRequestUrlInternal(this.clientOptions.httpOptions);\n }\n\n getHeaders() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.headers !== undefined\n ) {\n return this.clientOptions.httpOptions.headers;\n } else {\n throw new Error('Headers are not set.');\n }\n }\n\n private getRequestUrlInternal(httpOptions?: HttpOptions) {\n if (\n !httpOptions ||\n httpOptions.baseUrl === undefined ||\n httpOptions.apiVersion === undefined\n ) {\n throw new Error('HTTP options are not correctly set.');\n }\n const baseUrl = httpOptions.baseUrl.endsWith('/')\n ? httpOptions.baseUrl.slice(0, -1)\n : httpOptions.baseUrl;\n const urlElement: Array = [baseUrl];\n if (httpOptions.apiVersion && httpOptions.apiVersion !== '') {\n urlElement.push(httpOptions.apiVersion);\n }\n return urlElement.join('/');\n }\n\n getBaseResourcePath() {\n return `projects/${this.clientOptions.project}/locations/${\n this.clientOptions.location\n }`;\n }\n\n getApiKey() {\n return this.clientOptions.apiKey;\n }\n\n getWebsocketBaseUrl() {\n const baseUrl = this.getBaseUrl();\n const urlParts = new URL(baseUrl);\n urlParts.protocol = 'wss';\n return urlParts.toString();\n }\n\n setBaseUrl(url: string) {\n if (this.clientOptions.httpOptions) {\n this.clientOptions.httpOptions.baseUrl = url;\n } else {\n throw new Error('HTTP options are not correctly set.');\n }\n }\n\n private constructUrl(\n path: string,\n httpOptions: HttpOptions,\n prependProjectLocation: boolean,\n ): URL {\n const urlElement: Array = [this.getRequestUrlInternal(httpOptions)];\n if (prependProjectLocation) {\n urlElement.push(this.getBaseResourcePath());\n }\n if (path !== '') {\n urlElement.push(path);\n }\n const url = new URL(`${urlElement.join('/')}`);\n\n return url;\n }\n\n private shouldPrependVertexProjectPath(request: HttpRequest): boolean {\n if (this.clientOptions.apiKey) {\n return false;\n }\n if (!this.clientOptions.vertexai) {\n return false;\n }\n if (request.path.startsWith('projects/')) {\n // Assume the path already starts with\n // `projects//location/`.\n return false;\n }\n if (\n request.httpMethod === 'GET' &&\n request.path.startsWith('publishers/google/models')\n ) {\n // These paths are used by Vertex's models.get and models.list\n // calls. For base models Vertex does not accept a project/location\n // prefix (for tuned model the prefix is required).\n return false;\n }\n return true;\n }\n\n async request(request: HttpRequest): Promise {\n let patchedHttpOptions = this.clientOptions.httpOptions!;\n if (request.httpOptions) {\n patchedHttpOptions = this.patchHttpOptions(\n this.clientOptions.httpOptions!,\n request.httpOptions,\n );\n }\n\n const prependProjectLocation = this.shouldPrependVertexProjectPath(request);\n const url = this.constructUrl(\n request.path,\n patchedHttpOptions,\n prependProjectLocation,\n );\n if (request.queryParams) {\n for (const [key, value] of Object.entries(request.queryParams)) {\n url.searchParams.append(key, String(value));\n }\n }\n let requestInit: RequestInit = {};\n if (request.httpMethod === 'GET') {\n if (request.body && request.body !== '{}') {\n throw new Error(\n 'Request body should be empty for GET request, but got non empty request body',\n );\n }\n } else {\n requestInit.body = request.body;\n }\n requestInit = await this.includeExtraHttpOptionsToRequestInit(\n requestInit,\n patchedHttpOptions,\n );\n return this.unaryApiCall(url, requestInit, request.httpMethod);\n }\n\n private patchHttpOptions(\n baseHttpOptions: HttpOptions,\n requestHttpOptions: HttpOptions,\n ): HttpOptions {\n const patchedHttpOptions = JSON.parse(\n JSON.stringify(baseHttpOptions),\n ) as HttpOptions;\n\n for (const [key, value] of Object.entries(requestHttpOptions)) {\n // Records compile to objects.\n if (typeof value === 'object') {\n // @ts-expect-error TS2345TS7053: Element implicitly has an 'any' type\n // because expression of type 'string' can't be used to index type\n // 'HttpOptions'.\n patchedHttpOptions[key] = {...patchedHttpOptions[key], ...value};\n } else if (value !== undefined) {\n // @ts-expect-error TS2345TS7053: Element implicitly has an 'any' type\n // because expression of type 'string' can't be used to index type\n // 'HttpOptions'.\n patchedHttpOptions[key] = value;\n }\n }\n return patchedHttpOptions;\n }\n\n async requestStream(\n request: HttpRequest,\n // TODO: b/407059430 - Replace with HttpResponse.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): Promise {\n let patchedHttpOptions = this.clientOptions.httpOptions!;\n if (request.httpOptions) {\n patchedHttpOptions = this.patchHttpOptions(\n this.clientOptions.httpOptions!,\n request.httpOptions,\n );\n }\n\n const prependProjectLocation = this.shouldPrependVertexProjectPath(request);\n const url = this.constructUrl(\n request.path,\n patchedHttpOptions,\n prependProjectLocation,\n );\n if (!url.searchParams.has('alt') || url.searchParams.get('alt') !== 'sse') {\n url.searchParams.set('alt', 'sse');\n }\n let requestInit: RequestInit = {};\n requestInit.body = request.body;\n requestInit = await this.includeExtraHttpOptionsToRequestInit(\n requestInit,\n patchedHttpOptions,\n );\n return this.streamApiCall(url, requestInit, request.httpMethod);\n }\n\n private async includeExtraHttpOptionsToRequestInit(\n requestInit: RequestInit,\n httpOptions: HttpOptions,\n ): Promise {\n if (httpOptions && httpOptions.timeout && httpOptions.timeout > 0) {\n const abortController = new AbortController();\n const signal = abortController.signal;\n setTimeout(() => abortController.abort(), httpOptions.timeout);\n requestInit.signal = signal;\n }\n requestInit.headers = await this.getHeadersInternal(httpOptions);\n return requestInit;\n }\n\n private async unaryApiCall(\n url: URL,\n requestInit: RequestInit,\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE',\n ): Promise {\n return this.apiCall(url.toString(), {\n ...requestInit,\n method: httpMethod,\n })\n .then(async (response) => {\n await throwErrorIfNotOK(response);\n return new HttpResponse(response);\n })\n .catch((e) => {\n if (e instanceof Error) {\n throw e;\n } else {\n throw new Error(JSON.stringify(e));\n }\n });\n }\n\n private async streamApiCall(\n url: URL,\n requestInit: RequestInit,\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE',\n // TODO: b/407059430 - Replace with HttpResponse.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): Promise> {\n return this.apiCall(url.toString(), {\n ...requestInit,\n method: httpMethod,\n })\n .then(async (response) => {\n await throwErrorIfNotOK(response);\n return this.processStreamResponse(response);\n })\n .catch((e) => {\n if (e instanceof Error) {\n throw e;\n } else {\n throw new Error(JSON.stringify(e));\n }\n });\n }\n\n async *processStreamResponse(\n response: Response,\n // TODO: b/407059430 - Replace with HttpResponse.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): AsyncGenerator {\n const reader = response?.body?.getReader();\n const decoder = new TextDecoder('utf-8');\n if (!reader) {\n throw new Error('Response body is empty');\n }\n\n try {\n let buffer = '';\n while (true) {\n const {done, value} = await reader.read();\n if (done) {\n if (buffer.trim().length > 0) {\n throw new Error('Incomplete JSON segment at the end');\n }\n break;\n }\n const chunkString = decoder.decode(value);\n buffer += chunkString;\n let match = buffer.match(responseLineRE);\n while (match) {\n const processedChunkString = match[1];\n try {\n const chunkData = JSON.parse(processedChunkString);\n yield chunkData;\n buffer = buffer.slice(match[0].length);\n match = buffer.match(responseLineRE);\n } catch (e) {\n throw new Error(\n `exception parsing stream chunk ${processedChunkString}. ${e}`,\n );\n }\n }\n }\n } finally {\n reader.releaseLock();\n }\n }\n private async apiCall(\n url: string,\n requestInit: RequestInit,\n ): Promise {\n return fetch(url, requestInit).catch((e) => {\n throw new Error(`exception ${e} sending request`);\n });\n }\n\n getDefaultHeaders(): Record {\n const headers: Record = {};\n\n const versionHeaderValue =\n LIBRARY_LABEL + ' ' + this.clientOptions.userAgentExtra;\n\n headers[USER_AGENT_HEADER] = versionHeaderValue;\n headers[GOOGLE_API_CLIENT_HEADER] = versionHeaderValue;\n headers[CONTENT_TYPE_HEADER] = 'application/json';\n\n return headers;\n }\n\n private async getHeadersInternal(\n httpOptions: HttpOptions | undefined,\n ): Promise {\n const headers = new Headers();\n if (httpOptions && httpOptions.headers) {\n for (const [key, value] of Object.entries(httpOptions.headers)) {\n headers.append(key, value);\n }\n // Append a timeout header if it is set, note that the timeout option is\n // in milliseconds but the header is in seconds.\n if (httpOptions.timeout && httpOptions.timeout > 0) {\n headers.append(\n SERVER_TIMEOUT_HEADER,\n String(Math.ceil(httpOptions.timeout / 1000)),\n );\n }\n }\n await this.clientOptions.auth.addAuthHeaders(headers);\n return headers;\n }\n\n /**\n * Uploads a file asynchronously using Gemini API only, this is not supported\n * in Vertex AI.\n *\n * @param file The string path to the file to be uploaded or a Blob object.\n * @param config Optional parameters specified in the `UploadFileConfig`\n * interface. @see {@link UploadFileConfig}\n * @return A promise that resolves to a `File` object.\n * @throws An error if called on a Vertex AI client.\n * @throws An error if the `mimeType` is not provided and can not be inferred,\n */\n async uploadFile(\n file: string | Blob,\n config?: UploadFileConfig,\n ): Promise {\n const fileToUpload: File = {};\n if (config != null) {\n fileToUpload.mimeType = config.mimeType;\n fileToUpload.name = config.name;\n fileToUpload.displayName = config.displayName;\n }\n\n if (fileToUpload.name && !fileToUpload.name.startsWith('files/')) {\n fileToUpload.name = `files/${fileToUpload.name}`;\n }\n\n const uploader = this.clientOptions.uploader;\n const fileStat = await uploader.stat(file);\n fileToUpload.sizeBytes = String(fileStat.size);\n const mimeType = config?.mimeType ?? fileStat.type;\n if (mimeType === undefined || mimeType === '') {\n throw new Error(\n 'Can not determine mimeType. Please provide mimeType in the config.',\n );\n }\n fileToUpload.mimeType = mimeType;\n\n const uploadUrl = await this.fetchUploadUrl(fileToUpload, config);\n return uploader.upload(file, uploadUrl, this);\n }\n\n private async fetchUploadUrl(\n file: File,\n config?: UploadFileConfig,\n ): Promise {\n let httpOptions: HttpOptions = {};\n if (config?.httpOptions) {\n httpOptions = config.httpOptions;\n } else {\n httpOptions = {\n apiVersion: '', // api-version is set in the path.\n headers: {\n 'Content-Type': 'application/json',\n 'X-Goog-Upload-Protocol': 'resumable',\n 'X-Goog-Upload-Command': 'start',\n 'X-Goog-Upload-Header-Content-Length': `${file.sizeBytes}`,\n 'X-Goog-Upload-Header-Content-Type': `${file.mimeType}`,\n },\n };\n }\n\n const body: Record = {\n 'file': file,\n };\n const httpResponse = await this.request({\n path: common.formatMap(\n 'upload/v1beta/files',\n body['_url'] as Record,\n ),\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions,\n });\n\n if (!httpResponse || !httpResponse?.headers) {\n throw new Error(\n 'Server did not return an HttpResponse or the returned HttpResponse did not have headers.',\n );\n }\n\n const uploadUrl: string | undefined =\n httpResponse?.headers?.['x-goog-upload-url'];\n if (uploadUrl === undefined) {\n throw new Error(\n 'Failed to get upload url. Server did not return the x-google-upload-url in the headers',\n );\n }\n return uploadUrl;\n }\n}\n\nasync function throwErrorIfNotOK(response: Response | undefined) {\n if (response === undefined) {\n throw new ServerError('response is undefined');\n }\n if (!response.ok) {\n const status: number = response.status;\n const statusText: string = response.statusText;\n let errorBody: Record;\n if (response.headers.get('content-type')?.includes('application/json')) {\n errorBody = await response.json();\n } else {\n errorBody = {\n error: {\n message: 'exception parsing response',\n code: response.status,\n status: response.statusText,\n },\n };\n }\n const errorMessage = `got status: ${status} ${statusText}. ${JSON.stringify(\n errorBody,\n )}`;\n if (status >= 400 && status < 500) {\n const clientError = new ClientError(errorMessage);\n throw clientError;\n } else if (status >= 500 && status < 600) {\n const serverError = new ServerError(errorMessage);\n throw serverError;\n }\n throw new Error(errorMessage);\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport function crossError(): Error {\n // TODO(b/399934880): this message needs a link to a help page explaining how to enable conditional exports\n return new Error(`This feature requires the web or Node specific @google/genai implementation, you can fix this by either:\n\n*Enabling conditional exports for your project [recommended]*\n\n*Using a platform specific import* - Make sure your code imports either '@google/genai/web' or '@google/genai/node' instead of '@google/genai'.\n`);\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {ApiClient} from '../_api_client';\nimport {FileStat, Uploader} from '../_uploader';\nimport {File, HttpResponse} from '../types';\n\nimport {crossError} from './_cross_error';\n\nexport const MAX_CHUNK_SIZE = 1024 * 1024 * 8; // bytes\nexport class CrossUploader implements Uploader {\n async upload(\n file: string | Blob,\n uploadUrl: string,\n apiClient: ApiClient,\n ): Promise {\n if (typeof file === 'string') {\n throw crossError();\n } else {\n return uploadBlob(file, uploadUrl, apiClient);\n }\n }\n\n async stat(file: string | Blob): Promise {\n if (typeof file === 'string') {\n throw crossError();\n } else {\n return getBlobStat(file);\n }\n }\n}\n\nexport async function uploadBlob(\n file: Blob,\n uploadUrl: string,\n apiClient: ApiClient,\n): Promise {\n let fileSize = 0;\n let offset = 0;\n let response: HttpResponse = new HttpResponse(new Response());\n let uploadCommand = 'upload';\n fileSize = file.size;\n while (offset < fileSize) {\n const chunkSize = Math.min(MAX_CHUNK_SIZE, fileSize - offset);\n const chunk = file.slice(offset, offset + chunkSize);\n if (offset + chunkSize >= fileSize) {\n uploadCommand += ', finalize';\n }\n response = await apiClient.request({\n path: '',\n body: chunk,\n httpMethod: 'POST',\n httpOptions: {\n apiVersion: '',\n baseUrl: uploadUrl,\n headers: {\n 'X-Goog-Upload-Command': uploadCommand,\n 'X-Goog-Upload-Offset': String(offset),\n 'Content-Length': String(chunkSize),\n },\n },\n });\n offset += chunkSize;\n // The `x-goog-upload-status` header field can be `active`, `final` and\n //`cancelled` in resposne.\n if (response?.headers?.['x-goog-upload-status'] !== 'active') {\n break;\n }\n // TODO(b/401391430) Investigate why the upload status is not finalized\n // even though all content has been uploaded.\n if (fileSize <= offset) {\n throw new Error(\n 'All content has been uploaded, but the upload status is not finalized.',\n );\n }\n }\n const responseJson = (await response?.json()) as Record<\n string,\n File | unknown\n >;\n if (response?.headers?.['x-goog-upload-status'] !== 'final') {\n throw new Error('Failed to upload file: Upload status is not finalized.');\n }\n return responseJson['file'] as File;\n}\n\nexport async function getBlobStat(file: Blob): Promise {\n const fileStat: FileStat = {size: file.size, type: file.type};\n return fileStat;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n WebSocketCallbacks,\n WebSocketFactory,\n WebSocket as Ws,\n} from '../_websocket';\nimport {crossError} from './_cross_error';\n\n// TODO((b/401271082): re-enable lint once CrossWebSocketFactory is implemented.\n/* eslint-disable @typescript-eslint/no-unused-vars */\nexport class CrossWebSocketFactory implements WebSocketFactory {\n create(\n url: string,\n headers: Record,\n callbacks: WebSocketCallbacks,\n ): Ws {\n throw crossError();\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function listFilesConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listFilesParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listFilesConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function fileStatusToMldev(\n apiClient: ApiClient,\n fromObject: types.FileStatus,\n): Record {\n const toObject: Record = {};\n\n const fromDetails = common.getValueByPath(fromObject, ['details']);\n if (fromDetails != null) {\n common.setValueByPath(toObject, ['details'], fromDetails);\n }\n\n const fromMessage = common.getValueByPath(fromObject, ['message']);\n if (fromMessage != null) {\n common.setValueByPath(toObject, ['message'], fromMessage);\n }\n\n const fromCode = common.getValueByPath(fromObject, ['code']);\n if (fromCode != null) {\n common.setValueByPath(toObject, ['code'], fromCode);\n }\n\n return toObject;\n}\n\nexport function fileToMldev(\n apiClient: ApiClient,\n fromObject: types.File,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n const fromSizeBytes = common.getValueByPath(fromObject, ['sizeBytes']);\n if (fromSizeBytes != null) {\n common.setValueByPath(toObject, ['sizeBytes'], fromSizeBytes);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromExpirationTime = common.getValueByPath(fromObject, [\n 'expirationTime',\n ]);\n if (fromExpirationTime != null) {\n common.setValueByPath(toObject, ['expirationTime'], fromExpirationTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromSha256Hash = common.getValueByPath(fromObject, ['sha256Hash']);\n if (fromSha256Hash != null) {\n common.setValueByPath(toObject, ['sha256Hash'], fromSha256Hash);\n }\n\n const fromUri = common.getValueByPath(fromObject, ['uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromDownloadUri = common.getValueByPath(fromObject, ['downloadUri']);\n if (fromDownloadUri != null) {\n common.setValueByPath(toObject, ['downloadUri'], fromDownloadUri);\n }\n\n const fromState = common.getValueByPath(fromObject, ['state']);\n if (fromState != null) {\n common.setValueByPath(toObject, ['state'], fromState);\n }\n\n const fromSource = common.getValueByPath(fromObject, ['source']);\n if (fromSource != null) {\n common.setValueByPath(toObject, ['source'], fromSource);\n }\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(\n toObject,\n ['error'],\n fileStatusToMldev(apiClient, fromError),\n );\n }\n\n return toObject;\n}\n\nexport function createFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromFile = common.getValueByPath(fromObject, ['file']);\n if (fromFile != null) {\n common.setValueByPath(toObject, ['file'], fileToMldev(apiClient, fromFile));\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function getFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'file'],\n t.tFileName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.DeleteFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'file'],\n t.tFileName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function fileStatusFromMldev(\n apiClient: ApiClient,\n fromObject: types.FileStatus,\n): Record {\n const toObject: Record = {};\n\n const fromDetails = common.getValueByPath(fromObject, ['details']);\n if (fromDetails != null) {\n common.setValueByPath(toObject, ['details'], fromDetails);\n }\n\n const fromMessage = common.getValueByPath(fromObject, ['message']);\n if (fromMessage != null) {\n common.setValueByPath(toObject, ['message'], fromMessage);\n }\n\n const fromCode = common.getValueByPath(fromObject, ['code']);\n if (fromCode != null) {\n common.setValueByPath(toObject, ['code'], fromCode);\n }\n\n return toObject;\n}\n\nexport function fileFromMldev(\n apiClient: ApiClient,\n fromObject: types.File,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n const fromSizeBytes = common.getValueByPath(fromObject, ['sizeBytes']);\n if (fromSizeBytes != null) {\n common.setValueByPath(toObject, ['sizeBytes'], fromSizeBytes);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromExpirationTime = common.getValueByPath(fromObject, [\n 'expirationTime',\n ]);\n if (fromExpirationTime != null) {\n common.setValueByPath(toObject, ['expirationTime'], fromExpirationTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromSha256Hash = common.getValueByPath(fromObject, ['sha256Hash']);\n if (fromSha256Hash != null) {\n common.setValueByPath(toObject, ['sha256Hash'], fromSha256Hash);\n }\n\n const fromUri = common.getValueByPath(fromObject, ['uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromDownloadUri = common.getValueByPath(fromObject, ['downloadUri']);\n if (fromDownloadUri != null) {\n common.setValueByPath(toObject, ['downloadUri'], fromDownloadUri);\n }\n\n const fromState = common.getValueByPath(fromObject, ['state']);\n if (fromState != null) {\n common.setValueByPath(toObject, ['state'], fromState);\n }\n\n const fromSource = common.getValueByPath(fromObject, ['source']);\n if (fromSource != null) {\n common.setValueByPath(toObject, ['source'], fromSource);\n }\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(\n toObject,\n ['error'],\n fileStatusFromMldev(apiClient, fromError),\n );\n }\n\n return toObject;\n}\n\nexport function listFilesResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromFiles = common.getValueByPath(fromObject, ['files']);\n if (fromFiles != null) {\n if (Array.isArray(fromFiles)) {\n common.setValueByPath(\n toObject,\n ['files'],\n fromFiles.map((item) => {\n return fileFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['files'], fromFiles);\n }\n }\n\n return toObject;\n}\n\nexport function createFileResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.CreateFileResponse,\n): Record {\n const toObject: Record = {};\n\n const fromHttpHeaders = common.getValueByPath(fromObject, ['httpHeaders']);\n if (fromHttpHeaders != null) {\n common.setValueByPath(toObject, ['httpHeaders'], fromHttpHeaders);\n }\n\n return toObject;\n}\n\nexport function deleteFileResponseFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_files_converters';\nimport {PagedItem, Pager} from './pagers';\nimport * as types from './types';\n\nexport class Files extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Lists all current project files from the service.\n *\n * @param params - The parameters for the list request\n * @return The paginated results of the list of files\n *\n * @example\n * The following code prints the names of all files from the service, the\n * size of each page is 10.\n *\n * ```ts\n * const listResponse = await ai.files.list({config: {'pageSize': 10}});\n * for await (const file of listResponse) {\n * console.log(file.name);\n * }\n * ```\n */\n list = async (\n params: types.ListFilesParameters = {},\n ): Promise> => {\n return new Pager(\n PagedItem.PAGED_ITEM_FILES,\n (x: types.ListFilesParameters) => this.listInternal(x),\n await this.listInternal(params),\n params,\n );\n };\n\n /**\n * Uploads a file asynchronously to the Gemini API.\n * This method is not available in Vertex AI.\n * Supported upload sources:\n * - Node.js: File path (string) or Blob object.\n * - Browser: Blob object (e.g., File).\n *\n * @remarks\n * The `mimeType` can be specified in the `config` parameter. If omitted:\n * - For file path (string) inputs, the `mimeType` will be inferred from the\n * file extension.\n * - For Blob object inputs, the `mimeType` will be set to the Blob's `type`\n * property.\n * Somex eamples for file extension to mimeType mapping:\n * .txt -> text/plain\n * .json -> application/json\n * .jpg -> image/jpeg\n * .png -> image/png\n * .mp3 -> audio/mpeg\n * .mp4 -> video/mp4\n *\n * This section can contain multiple paragraphs and code examples.\n *\n * @param params - Optional parameters specified in the\n * `types.UploadFileParameters` interface.\n * @see {@link types.UploadFileParameters#config} for the optional\n * config in the parameters.\n * @return A promise that resolves to a `types.File` object.\n * @throws An error if called on a Vertex AI client.\n * @throws An error if the `mimeType` is not provided and can not be inferred,\n * the `mimeType` can be provided in the `params.config` parameter.\n * @throws An error occurs if a suitable upload location cannot be established.\n *\n * @example\n * The following code uploads a file to Gemini API.\n *\n * ```ts\n * const file = await ai.files.upload({file: 'file.txt', config: {\n * mimeType: 'text/plain',\n * }});\n * console.log(file.name);\n * ```\n */\n async upload(params: types.UploadFileParameters): Promise {\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'Vertex AI does not support uploading files. You can share files through a GCS bucket.',\n );\n }\n\n return this.apiClient\n .uploadFile(params.file, params.config)\n .then((response) => {\n const file = converters.fileFromMldev(this.apiClient, response);\n return file as types.File;\n });\n }\n\n private async listInternal(\n params: types.ListFilesParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.listFilesParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap('files', body['_url'] as Record);\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listFilesResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListFilesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n private async createInternal(\n params: types.CreateFileParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.createFileParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'upload/v1beta/files',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.createFileResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.CreateFileResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Retrieves the file information from the service.\n *\n * @param params - The parameters for the get request\n * @return The Promise that resolves to the types.File object requested.\n *\n * @example\n * ```ts\n * const config: GetFileParameters = {\n * name: fileName,\n * };\n * file = await ai.files.get(config);\n * console.log(file.name);\n * ```\n */\n async get(params: types.GetFileParameters): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.getFileParametersToMldev(this.apiClient, params);\n path = common.formatMap(\n 'files/{file}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.fileFromMldev(this.apiClient, apiResponse);\n\n return resp as types.File;\n });\n }\n }\n\n /**\n * Deletes a remotely stored file.\n *\n * @param params - The parameters for the delete request.\n * @return The DeleteFileResponse, the response for the delete method.\n *\n * @example\n * The following code deletes an example file named \"files/mehozpxf877d\".\n *\n * ```ts\n * await ai.files.delete({name: file.name});\n * ```\n */\n async delete(\n params: types.DeleteFileParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.deleteFileParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'files/{file}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteFileResponseFromMldev();\n const typedResp = new types.DeleteFileResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function partToMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['videoMetadata']) !== undefined) {\n throw new Error('videoMetadata parameter is not supported in Gemini API.');\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToMldev(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['example']) !== undefined) {\n throw new Error('example parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['pattern']) !== undefined) {\n throw new Error('pattern parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['default']) !== undefined) {\n throw new Error('default parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxLength']) !== undefined) {\n throw new Error('maxLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minLength']) !== undefined) {\n throw new Error('minLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minProperties']) !== undefined) {\n throw new Error('minProperties parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxProperties']) !== undefined) {\n throw new Error('maxProperties parameter is not supported in Gemini API.');\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function safetySettingToMldev(\n apiClient: ApiClient,\n fromObject: types.SafetySetting,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['method']) !== undefined) {\n throw new Error('method parameter is not supported in Gemini API.');\n }\n\n const fromCategory = common.getValueByPath(fromObject, ['category']);\n if (fromCategory != null) {\n common.setValueByPath(toObject, ['category'], fromCategory);\n }\n\n const fromThreshold = common.getValueByPath(fromObject, ['threshold']);\n if (fromThreshold != null) {\n common.setValueByPath(toObject, ['threshold'], fromThreshold);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['response']) !== undefined) {\n throw new Error('response parameter is not supported in Gemini API.');\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToMldev(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToMldev(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n if (common.getValueByPath(fromObject, ['retrieval']) !== undefined) {\n throw new Error('retrieval parameter is not supported in Gemini API.');\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToMldev());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function prebuiltVoiceConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.PrebuiltVoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceName = common.getValueByPath(fromObject, ['voiceName']);\n if (fromVoiceName != null) {\n common.setValueByPath(toObject, ['voiceName'], fromVoiceName);\n }\n\n return toObject;\n}\n\nexport function voiceConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.VoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromPrebuiltVoiceConfig = common.getValueByPath(fromObject, [\n 'prebuiltVoiceConfig',\n ]);\n if (fromPrebuiltVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['prebuiltVoiceConfig'],\n prebuiltVoiceConfigToMldev(apiClient, fromPrebuiltVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function speechConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.SpeechConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceConfig = common.getValueByPath(fromObject, ['voiceConfig']);\n if (fromVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['voiceConfig'],\n voiceConfigToMldev(apiClient, fromVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function thinkingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ThinkingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromIncludeThoughts = common.getValueByPath(fromObject, [\n 'includeThoughts',\n ]);\n if (fromIncludeThoughts != null) {\n common.setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);\n }\n\n const fromThinkingBudget = common.getValueByPath(fromObject, [\n 'thinkingBudget',\n ]);\n if (fromThinkingBudget != null) {\n common.setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);\n }\n\n return toObject;\n}\n\nexport function generateContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTemperature = common.getValueByPath(fromObject, ['temperature']);\n if (fromTemperature != null) {\n common.setValueByPath(toObject, ['temperature'], fromTemperature);\n }\n\n const fromTopP = common.getValueByPath(fromObject, ['topP']);\n if (fromTopP != null) {\n common.setValueByPath(toObject, ['topP'], fromTopP);\n }\n\n const fromTopK = common.getValueByPath(fromObject, ['topK']);\n if (fromTopK != null) {\n common.setValueByPath(toObject, ['topK'], fromTopK);\n }\n\n const fromCandidateCount = common.getValueByPath(fromObject, [\n 'candidateCount',\n ]);\n if (fromCandidateCount != null) {\n common.setValueByPath(toObject, ['candidateCount'], fromCandidateCount);\n }\n\n const fromMaxOutputTokens = common.getValueByPath(fromObject, [\n 'maxOutputTokens',\n ]);\n if (fromMaxOutputTokens != null) {\n common.setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);\n }\n\n const fromStopSequences = common.getValueByPath(fromObject, [\n 'stopSequences',\n ]);\n if (fromStopSequences != null) {\n common.setValueByPath(toObject, ['stopSequences'], fromStopSequences);\n }\n\n const fromResponseLogprobs = common.getValueByPath(fromObject, [\n 'responseLogprobs',\n ]);\n if (fromResponseLogprobs != null) {\n common.setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);\n }\n\n const fromLogprobs = common.getValueByPath(fromObject, ['logprobs']);\n if (fromLogprobs != null) {\n common.setValueByPath(toObject, ['logprobs'], fromLogprobs);\n }\n\n const fromPresencePenalty = common.getValueByPath(fromObject, [\n 'presencePenalty',\n ]);\n if (fromPresencePenalty != null) {\n common.setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);\n }\n\n const fromFrequencyPenalty = common.getValueByPath(fromObject, [\n 'frequencyPenalty',\n ]);\n if (fromFrequencyPenalty != null) {\n common.setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (fromSeed != null) {\n common.setValueByPath(toObject, ['seed'], fromSeed);\n }\n\n const fromResponseMimeType = common.getValueByPath(fromObject, [\n 'responseMimeType',\n ]);\n if (fromResponseMimeType != null) {\n common.setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);\n }\n\n const fromResponseSchema = common.getValueByPath(fromObject, [\n 'responseSchema',\n ]);\n if (fromResponseSchema != null) {\n common.setValueByPath(\n toObject,\n ['responseSchema'],\n schemaToMldev(apiClient, t.tSchema(apiClient, fromResponseSchema)),\n );\n }\n\n if (common.getValueByPath(fromObject, ['routingConfig']) !== undefined) {\n throw new Error('routingConfig parameter is not supported in Gemini API.');\n }\n\n const fromSafetySettings = common.getValueByPath(fromObject, [\n 'safetySettings',\n ]);\n if (parentObject !== undefined && fromSafetySettings != null) {\n if (Array.isArray(fromSafetySettings)) {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings.map((item) => {\n return safetySettingToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings,\n );\n }\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToMldev(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToMldev(apiClient, fromToolConfig),\n );\n }\n\n if (common.getValueByPath(fromObject, ['labels']) !== undefined) {\n throw new Error('labels parameter is not supported in Gemini API.');\n }\n\n const fromCachedContent = common.getValueByPath(fromObject, [\n 'cachedContent',\n ]);\n if (parentObject !== undefined && fromCachedContent != null) {\n common.setValueByPath(\n parentObject,\n ['cachedContent'],\n t.tCachedContentName(apiClient, fromCachedContent),\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities != null) {\n common.setValueByPath(\n toObject,\n ['responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromMediaResolution = common.getValueByPath(fromObject, [\n 'mediaResolution',\n ]);\n if (fromMediaResolution != null) {\n common.setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig != null) {\n common.setValueByPath(\n toObject,\n ['speechConfig'],\n speechConfigToMldev(\n apiClient,\n t.tSpeechConfig(apiClient, fromSpeechConfig),\n ),\n );\n }\n\n if (common.getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {\n throw new Error('audioTimestamp parameter is not supported in Gemini API.');\n }\n\n const fromThinkingConfig = common.getValueByPath(fromObject, [\n 'thinkingConfig',\n ]);\n if (fromThinkingConfig != null) {\n common.setValueByPath(\n toObject,\n ['thinkingConfig'],\n thinkingConfigToMldev(apiClient, fromThinkingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function generateContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['generationConfig'],\n generateContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTaskType = common.getValueByPath(fromObject, ['taskType']);\n if (parentObject !== undefined && fromTaskType != null) {\n common.setValueByPath(\n parentObject,\n ['requests[]', 'taskType'],\n fromTaskType,\n );\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (parentObject !== undefined && fromTitle != null) {\n common.setValueByPath(parentObject, ['requests[]', 'title'], fromTitle);\n }\n\n const fromOutputDimensionality = common.getValueByPath(fromObject, [\n 'outputDimensionality',\n ]);\n if (parentObject !== undefined && fromOutputDimensionality != null) {\n common.setValueByPath(\n parentObject,\n ['requests[]', 'outputDimensionality'],\n fromOutputDimensionality,\n );\n }\n\n if (common.getValueByPath(fromObject, ['mimeType']) !== undefined) {\n throw new Error('mimeType parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['autoTruncate']) !== undefined) {\n throw new Error('autoTruncate parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function embedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n common.setValueByPath(\n toObject,\n ['requests[]', 'content'],\n t.tContentsForEmbed(apiClient, fromContents),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n embedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n const fromModelForEmbedContent = common.getValueByPath(fromObject, ['model']);\n if (fromModelForEmbedContent !== undefined) {\n common.setValueByPath(\n toObject,\n ['requests[]', 'model'],\n t.tModel(apiClient, fromModelForEmbedContent),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {\n throw new Error('outputGcsUri parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['negativePrompt']) !== undefined) {\n throw new Error('negativePrompt parameter is not supported in Gemini API.');\n }\n\n const fromNumberOfImages = common.getValueByPath(fromObject, [\n 'numberOfImages',\n ]);\n if (parentObject !== undefined && fromNumberOfImages != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfImages,\n );\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromGuidanceScale = common.getValueByPath(fromObject, [\n 'guidanceScale',\n ]);\n if (parentObject !== undefined && fromGuidanceScale != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'guidanceScale'],\n fromGuidanceScale,\n );\n }\n\n if (common.getValueByPath(fromObject, ['seed']) !== undefined) {\n throw new Error('seed parameter is not supported in Gemini API.');\n }\n\n const fromSafetyFilterLevel = common.getValueByPath(fromObject, [\n 'safetyFilterLevel',\n ]);\n if (parentObject !== undefined && fromSafetyFilterLevel != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'safetySetting'],\n fromSafetyFilterLevel,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromIncludeSafetyAttributes = common.getValueByPath(fromObject, [\n 'includeSafetyAttributes',\n ]);\n if (parentObject !== undefined && fromIncludeSafetyAttributes != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeSafetyAttributes'],\n fromIncludeSafetyAttributes,\n );\n }\n\n const fromIncludeRaiReason = common.getValueByPath(fromObject, [\n 'includeRaiReason',\n ]);\n if (parentObject !== undefined && fromIncludeRaiReason != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeRaiReason'],\n fromIncludeRaiReason,\n );\n }\n\n const fromLanguage = common.getValueByPath(fromObject, ['language']);\n if (parentObject !== undefined && fromLanguage != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'language'],\n fromLanguage,\n );\n }\n\n const fromOutputMimeType = common.getValueByPath(fromObject, [\n 'outputMimeType',\n ]);\n if (parentObject !== undefined && fromOutputMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'mimeType'],\n fromOutputMimeType,\n );\n }\n\n const fromOutputCompressionQuality = common.getValueByPath(fromObject, [\n 'outputCompressionQuality',\n ]);\n if (parentObject !== undefined && fromOutputCompressionQuality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'compressionQuality'],\n fromOutputCompressionQuality,\n );\n }\n\n if (common.getValueByPath(fromObject, ['addWatermark']) !== undefined) {\n throw new Error('addWatermark parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {\n throw new Error('enhancePrompt parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function generateImagesParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateImagesConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getModelParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetModelParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function countTokensConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensConfig,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['systemInstruction']) !== undefined) {\n throw new Error(\n 'systemInstruction parameter is not supported in Gemini API.',\n );\n }\n\n if (common.getValueByPath(fromObject, ['tools']) !== undefined) {\n throw new Error('tools parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['generationConfig']) !== undefined) {\n throw new Error(\n 'generationConfig parameter is not supported in Gemini API.',\n );\n }\n\n return toObject;\n}\n\nexport function countTokensParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n countTokensConfigToMldev(apiClient, fromConfig),\n );\n }\n\n return toObject;\n}\n\nexport function imageToMldev(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['gcsUri']) !== undefined) {\n throw new Error('gcsUri parameter is not supported in Gemini API.');\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, ['imageBytes']);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['bytesBase64Encoded'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generateVideosConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromNumberOfVideos = common.getValueByPath(fromObject, [\n 'numberOfVideos',\n ]);\n if (parentObject !== undefined && fromNumberOfVideos != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfVideos,\n );\n }\n\n if (common.getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {\n throw new Error('outputGcsUri parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['fps']) !== undefined) {\n throw new Error('fps parameter is not supported in Gemini API.');\n }\n\n const fromDurationSeconds = common.getValueByPath(fromObject, [\n 'durationSeconds',\n ]);\n if (parentObject !== undefined && fromDurationSeconds != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'durationSeconds'],\n fromDurationSeconds,\n );\n }\n\n if (common.getValueByPath(fromObject, ['seed']) !== undefined) {\n throw new Error('seed parameter is not supported in Gemini API.');\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n if (common.getValueByPath(fromObject, ['resolution']) !== undefined) {\n throw new Error('resolution parameter is not supported in Gemini API.');\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n if (common.getValueByPath(fromObject, ['pubsubTopic']) !== undefined) {\n throw new Error('pubsubTopic parameter is not supported in Gemini API.');\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n if (common.getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {\n throw new Error('enhancePrompt parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function generateVideosParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromImage = common.getValueByPath(fromObject, ['image']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['instances[0]', 'image'],\n imageToMldev(apiClient, fromImage),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateVideosConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partToVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToVertex(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n const fromExample = common.getValueByPath(fromObject, ['example']);\n if (fromExample != null) {\n common.setValueByPath(toObject, ['example'], fromExample);\n }\n\n const fromPattern = common.getValueByPath(fromObject, ['pattern']);\n if (fromPattern != null) {\n common.setValueByPath(toObject, ['pattern'], fromPattern);\n }\n\n const fromDefault = common.getValueByPath(fromObject, ['default']);\n if (fromDefault != null) {\n common.setValueByPath(toObject, ['default'], fromDefault);\n }\n\n const fromMaxLength = common.getValueByPath(fromObject, ['maxLength']);\n if (fromMaxLength != null) {\n common.setValueByPath(toObject, ['maxLength'], fromMaxLength);\n }\n\n const fromMinLength = common.getValueByPath(fromObject, ['minLength']);\n if (fromMinLength != null) {\n common.setValueByPath(toObject, ['minLength'], fromMinLength);\n }\n\n const fromMinProperties = common.getValueByPath(fromObject, [\n 'minProperties',\n ]);\n if (fromMinProperties != null) {\n common.setValueByPath(toObject, ['minProperties'], fromMinProperties);\n }\n\n const fromMaxProperties = common.getValueByPath(fromObject, [\n 'maxProperties',\n ]);\n if (fromMaxProperties != null) {\n common.setValueByPath(toObject, ['maxProperties'], fromMaxProperties);\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function safetySettingToVertex(\n apiClient: ApiClient,\n fromObject: types.SafetySetting,\n): Record {\n const toObject: Record = {};\n\n const fromMethod = common.getValueByPath(fromObject, ['method']);\n if (fromMethod != null) {\n common.setValueByPath(toObject, ['method'], fromMethod);\n }\n\n const fromCategory = common.getValueByPath(fromObject, ['category']);\n if (fromCategory != null) {\n common.setValueByPath(toObject, ['category'], fromCategory);\n }\n\n const fromThreshold = common.getValueByPath(fromObject, ['threshold']);\n if (fromThreshold != null) {\n common.setValueByPath(toObject, ['threshold'], fromThreshold);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n schemaToVertex(apiClient, fromResponse),\n );\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToVertex(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToVertex(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n const fromRetrieval = common.getValueByPath(fromObject, ['retrieval']);\n if (fromRetrieval != null) {\n common.setValueByPath(toObject, ['retrieval'], fromRetrieval);\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToVertex());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function prebuiltVoiceConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.PrebuiltVoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceName = common.getValueByPath(fromObject, ['voiceName']);\n if (fromVoiceName != null) {\n common.setValueByPath(toObject, ['voiceName'], fromVoiceName);\n }\n\n return toObject;\n}\n\nexport function voiceConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.VoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromPrebuiltVoiceConfig = common.getValueByPath(fromObject, [\n 'prebuiltVoiceConfig',\n ]);\n if (fromPrebuiltVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['prebuiltVoiceConfig'],\n prebuiltVoiceConfigToVertex(apiClient, fromPrebuiltVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function speechConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.SpeechConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceConfig = common.getValueByPath(fromObject, ['voiceConfig']);\n if (fromVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['voiceConfig'],\n voiceConfigToVertex(apiClient, fromVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function thinkingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ThinkingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromIncludeThoughts = common.getValueByPath(fromObject, [\n 'includeThoughts',\n ]);\n if (fromIncludeThoughts != null) {\n common.setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);\n }\n\n const fromThinkingBudget = common.getValueByPath(fromObject, [\n 'thinkingBudget',\n ]);\n if (fromThinkingBudget != null) {\n common.setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);\n }\n\n return toObject;\n}\n\nexport function generateContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTemperature = common.getValueByPath(fromObject, ['temperature']);\n if (fromTemperature != null) {\n common.setValueByPath(toObject, ['temperature'], fromTemperature);\n }\n\n const fromTopP = common.getValueByPath(fromObject, ['topP']);\n if (fromTopP != null) {\n common.setValueByPath(toObject, ['topP'], fromTopP);\n }\n\n const fromTopK = common.getValueByPath(fromObject, ['topK']);\n if (fromTopK != null) {\n common.setValueByPath(toObject, ['topK'], fromTopK);\n }\n\n const fromCandidateCount = common.getValueByPath(fromObject, [\n 'candidateCount',\n ]);\n if (fromCandidateCount != null) {\n common.setValueByPath(toObject, ['candidateCount'], fromCandidateCount);\n }\n\n const fromMaxOutputTokens = common.getValueByPath(fromObject, [\n 'maxOutputTokens',\n ]);\n if (fromMaxOutputTokens != null) {\n common.setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);\n }\n\n const fromStopSequences = common.getValueByPath(fromObject, [\n 'stopSequences',\n ]);\n if (fromStopSequences != null) {\n common.setValueByPath(toObject, ['stopSequences'], fromStopSequences);\n }\n\n const fromResponseLogprobs = common.getValueByPath(fromObject, [\n 'responseLogprobs',\n ]);\n if (fromResponseLogprobs != null) {\n common.setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);\n }\n\n const fromLogprobs = common.getValueByPath(fromObject, ['logprobs']);\n if (fromLogprobs != null) {\n common.setValueByPath(toObject, ['logprobs'], fromLogprobs);\n }\n\n const fromPresencePenalty = common.getValueByPath(fromObject, [\n 'presencePenalty',\n ]);\n if (fromPresencePenalty != null) {\n common.setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);\n }\n\n const fromFrequencyPenalty = common.getValueByPath(fromObject, [\n 'frequencyPenalty',\n ]);\n if (fromFrequencyPenalty != null) {\n common.setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (fromSeed != null) {\n common.setValueByPath(toObject, ['seed'], fromSeed);\n }\n\n const fromResponseMimeType = common.getValueByPath(fromObject, [\n 'responseMimeType',\n ]);\n if (fromResponseMimeType != null) {\n common.setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);\n }\n\n const fromResponseSchema = common.getValueByPath(fromObject, [\n 'responseSchema',\n ]);\n if (fromResponseSchema != null) {\n common.setValueByPath(\n toObject,\n ['responseSchema'],\n schemaToVertex(apiClient, t.tSchema(apiClient, fromResponseSchema)),\n );\n }\n\n const fromRoutingConfig = common.getValueByPath(fromObject, [\n 'routingConfig',\n ]);\n if (fromRoutingConfig != null) {\n common.setValueByPath(toObject, ['routingConfig'], fromRoutingConfig);\n }\n\n const fromSafetySettings = common.getValueByPath(fromObject, [\n 'safetySettings',\n ]);\n if (parentObject !== undefined && fromSafetySettings != null) {\n if (Array.isArray(fromSafetySettings)) {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings.map((item) => {\n return safetySettingToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings,\n );\n }\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToVertex(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToVertex(apiClient, fromToolConfig),\n );\n }\n\n const fromLabels = common.getValueByPath(fromObject, ['labels']);\n if (parentObject !== undefined && fromLabels != null) {\n common.setValueByPath(parentObject, ['labels'], fromLabels);\n }\n\n const fromCachedContent = common.getValueByPath(fromObject, [\n 'cachedContent',\n ]);\n if (parentObject !== undefined && fromCachedContent != null) {\n common.setValueByPath(\n parentObject,\n ['cachedContent'],\n t.tCachedContentName(apiClient, fromCachedContent),\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities != null) {\n common.setValueByPath(\n toObject,\n ['responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromMediaResolution = common.getValueByPath(fromObject, [\n 'mediaResolution',\n ]);\n if (fromMediaResolution != null) {\n common.setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig != null) {\n common.setValueByPath(\n toObject,\n ['speechConfig'],\n speechConfigToVertex(\n apiClient,\n t.tSpeechConfig(apiClient, fromSpeechConfig),\n ),\n );\n }\n\n const fromAudioTimestamp = common.getValueByPath(fromObject, [\n 'audioTimestamp',\n ]);\n if (fromAudioTimestamp != null) {\n common.setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp);\n }\n\n const fromThinkingConfig = common.getValueByPath(fromObject, [\n 'thinkingConfig',\n ]);\n if (fromThinkingConfig != null) {\n common.setValueByPath(\n toObject,\n ['thinkingConfig'],\n thinkingConfigToVertex(apiClient, fromThinkingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function generateContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['generationConfig'],\n generateContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTaskType = common.getValueByPath(fromObject, ['taskType']);\n if (parentObject !== undefined && fromTaskType != null) {\n common.setValueByPath(\n parentObject,\n ['instances[]', 'task_type'],\n fromTaskType,\n );\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (parentObject !== undefined && fromTitle != null) {\n common.setValueByPath(parentObject, ['instances[]', 'title'], fromTitle);\n }\n\n const fromOutputDimensionality = common.getValueByPath(fromObject, [\n 'outputDimensionality',\n ]);\n if (parentObject !== undefined && fromOutputDimensionality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputDimensionality'],\n fromOutputDimensionality,\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (parentObject !== undefined && fromMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['instances[]', 'mimeType'],\n fromMimeType,\n );\n }\n\n const fromAutoTruncate = common.getValueByPath(fromObject, ['autoTruncate']);\n if (parentObject !== undefined && fromAutoTruncate != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'autoTruncate'],\n fromAutoTruncate,\n );\n }\n\n return toObject;\n}\n\nexport function embedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n common.setValueByPath(\n toObject,\n ['instances[]', 'content'],\n t.tContentsForEmbed(apiClient, fromContents),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n embedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromOutputGcsUri = common.getValueByPath(fromObject, ['outputGcsUri']);\n if (parentObject !== undefined && fromOutputGcsUri != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'storageUri'],\n fromOutputGcsUri,\n );\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n const fromNumberOfImages = common.getValueByPath(fromObject, [\n 'numberOfImages',\n ]);\n if (parentObject !== undefined && fromNumberOfImages != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfImages,\n );\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromGuidanceScale = common.getValueByPath(fromObject, [\n 'guidanceScale',\n ]);\n if (parentObject !== undefined && fromGuidanceScale != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'guidanceScale'],\n fromGuidanceScale,\n );\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (parentObject !== undefined && fromSeed != null) {\n common.setValueByPath(parentObject, ['parameters', 'seed'], fromSeed);\n }\n\n const fromSafetyFilterLevel = common.getValueByPath(fromObject, [\n 'safetyFilterLevel',\n ]);\n if (parentObject !== undefined && fromSafetyFilterLevel != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'safetySetting'],\n fromSafetyFilterLevel,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromIncludeSafetyAttributes = common.getValueByPath(fromObject, [\n 'includeSafetyAttributes',\n ]);\n if (parentObject !== undefined && fromIncludeSafetyAttributes != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeSafetyAttributes'],\n fromIncludeSafetyAttributes,\n );\n }\n\n const fromIncludeRaiReason = common.getValueByPath(fromObject, [\n 'includeRaiReason',\n ]);\n if (parentObject !== undefined && fromIncludeRaiReason != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeRaiReason'],\n fromIncludeRaiReason,\n );\n }\n\n const fromLanguage = common.getValueByPath(fromObject, ['language']);\n if (parentObject !== undefined && fromLanguage != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'language'],\n fromLanguage,\n );\n }\n\n const fromOutputMimeType = common.getValueByPath(fromObject, [\n 'outputMimeType',\n ]);\n if (parentObject !== undefined && fromOutputMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'mimeType'],\n fromOutputMimeType,\n );\n }\n\n const fromOutputCompressionQuality = common.getValueByPath(fromObject, [\n 'outputCompressionQuality',\n ]);\n if (parentObject !== undefined && fromOutputCompressionQuality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'compressionQuality'],\n fromOutputCompressionQuality,\n );\n }\n\n const fromAddWatermark = common.getValueByPath(fromObject, ['addWatermark']);\n if (parentObject !== undefined && fromAddWatermark != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'addWatermark'],\n fromAddWatermark,\n );\n }\n\n const fromEnhancePrompt = common.getValueByPath(fromObject, [\n 'enhancePrompt',\n ]);\n if (parentObject !== undefined && fromEnhancePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'enhancePrompt'],\n fromEnhancePrompt,\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateImagesConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getModelParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetModelParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function countTokensConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (parentObject !== undefined && fromGenerationConfig != null) {\n common.setValueByPath(\n parentObject,\n ['generationConfig'],\n fromGenerationConfig,\n );\n }\n\n return toObject;\n}\n\nexport function countTokensParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n countTokensConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function computeTokensParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.ComputeTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function imageToVertex(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromGcsUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromGcsUri != null) {\n common.setValueByPath(toObject, ['gcsUri'], fromGcsUri);\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, ['imageBytes']);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['bytesBase64Encoded'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generateVideosConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromNumberOfVideos = common.getValueByPath(fromObject, [\n 'numberOfVideos',\n ]);\n if (parentObject !== undefined && fromNumberOfVideos != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfVideos,\n );\n }\n\n const fromOutputGcsUri = common.getValueByPath(fromObject, ['outputGcsUri']);\n if (parentObject !== undefined && fromOutputGcsUri != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'storageUri'],\n fromOutputGcsUri,\n );\n }\n\n const fromFps = common.getValueByPath(fromObject, ['fps']);\n if (parentObject !== undefined && fromFps != null) {\n common.setValueByPath(parentObject, ['parameters', 'fps'], fromFps);\n }\n\n const fromDurationSeconds = common.getValueByPath(fromObject, [\n 'durationSeconds',\n ]);\n if (parentObject !== undefined && fromDurationSeconds != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'durationSeconds'],\n fromDurationSeconds,\n );\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (parentObject !== undefined && fromSeed != null) {\n common.setValueByPath(parentObject, ['parameters', 'seed'], fromSeed);\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromResolution = common.getValueByPath(fromObject, ['resolution']);\n if (parentObject !== undefined && fromResolution != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'resolution'],\n fromResolution,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromPubsubTopic = common.getValueByPath(fromObject, ['pubsubTopic']);\n if (parentObject !== undefined && fromPubsubTopic != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'pubsubTopic'],\n fromPubsubTopic,\n );\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n const fromEnhancePrompt = common.getValueByPath(fromObject, [\n 'enhancePrompt',\n ]);\n if (parentObject !== undefined && fromEnhancePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'enhancePrompt'],\n fromEnhancePrompt,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromImage = common.getValueByPath(fromObject, ['image']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['instances[0]', 'image'],\n imageToVertex(apiClient, fromImage),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateVideosConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partFromMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentFromMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function citationMetadataFromMldev(\n apiClient: ApiClient,\n fromObject: types.CitationMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromCitations = common.getValueByPath(fromObject, ['citationSources']);\n if (fromCitations != null) {\n common.setValueByPath(toObject, ['citations'], fromCitations);\n }\n\n return toObject;\n}\n\nexport function candidateFromMldev(\n apiClient: ApiClient,\n fromObject: types.Candidate,\n): Record {\n const toObject: Record = {};\n\n const fromContent = common.getValueByPath(fromObject, ['content']);\n if (fromContent != null) {\n common.setValueByPath(\n toObject,\n ['content'],\n contentFromMldev(apiClient, fromContent),\n );\n }\n\n const fromCitationMetadata = common.getValueByPath(fromObject, [\n 'citationMetadata',\n ]);\n if (fromCitationMetadata != null) {\n common.setValueByPath(\n toObject,\n ['citationMetadata'],\n citationMetadataFromMldev(apiClient, fromCitationMetadata),\n );\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n const fromFinishReason = common.getValueByPath(fromObject, ['finishReason']);\n if (fromFinishReason != null) {\n common.setValueByPath(toObject, ['finishReason'], fromFinishReason);\n }\n\n const fromAvgLogprobs = common.getValueByPath(fromObject, ['avgLogprobs']);\n if (fromAvgLogprobs != null) {\n common.setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);\n }\n\n const fromGroundingMetadata = common.getValueByPath(fromObject, [\n 'groundingMetadata',\n ]);\n if (fromGroundingMetadata != null) {\n common.setValueByPath(\n toObject,\n ['groundingMetadata'],\n fromGroundingMetadata,\n );\n }\n\n const fromIndex = common.getValueByPath(fromObject, ['index']);\n if (fromIndex != null) {\n common.setValueByPath(toObject, ['index'], fromIndex);\n }\n\n const fromLogprobsResult = common.getValueByPath(fromObject, [\n 'logprobsResult',\n ]);\n if (fromLogprobsResult != null) {\n common.setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult);\n }\n\n const fromSafetyRatings = common.getValueByPath(fromObject, [\n 'safetyRatings',\n ]);\n if (fromSafetyRatings != null) {\n common.setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings);\n }\n\n return toObject;\n}\n\nexport function generateContentResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromCandidates = common.getValueByPath(fromObject, ['candidates']);\n if (fromCandidates != null) {\n if (Array.isArray(fromCandidates)) {\n common.setValueByPath(\n toObject,\n ['candidates'],\n fromCandidates.map((item) => {\n return candidateFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['candidates'], fromCandidates);\n }\n }\n\n const fromModelVersion = common.getValueByPath(fromObject, ['modelVersion']);\n if (fromModelVersion != null) {\n common.setValueByPath(toObject, ['modelVersion'], fromModelVersion);\n }\n\n const fromPromptFeedback = common.getValueByPath(fromObject, [\n 'promptFeedback',\n ]);\n if (fromPromptFeedback != null) {\n common.setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingStatisticsFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function contentEmbeddingFromMldev(\n apiClient: ApiClient,\n fromObject: types.ContentEmbedding,\n): Record {\n const toObject: Record = {};\n\n const fromValues = common.getValueByPath(fromObject, ['values']);\n if (fromValues != null) {\n common.setValueByPath(toObject, ['values'], fromValues);\n }\n\n return toObject;\n}\n\nexport function embedContentMetadataFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function embedContentResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromEmbeddings = common.getValueByPath(fromObject, ['embeddings']);\n if (fromEmbeddings != null) {\n if (Array.isArray(fromEmbeddings)) {\n common.setValueByPath(\n toObject,\n ['embeddings'],\n fromEmbeddings.map((item) => {\n return contentEmbeddingFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['embeddings'], fromEmbeddings);\n }\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(\n toObject,\n ['metadata'],\n embedContentMetadataFromMldev(),\n );\n }\n\n return toObject;\n}\n\nexport function imageFromMldev(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromImageBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['imageBytes'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function safetyAttributesFromMldev(\n apiClient: ApiClient,\n fromObject: types.SafetyAttributes,\n): Record {\n const toObject: Record = {};\n\n const fromCategories = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'categories',\n ]);\n if (fromCategories != null) {\n common.setValueByPath(toObject, ['categories'], fromCategories);\n }\n\n const fromScores = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'scores',\n ]);\n if (fromScores != null) {\n common.setValueByPath(toObject, ['scores'], fromScores);\n }\n\n const fromContentType = common.getValueByPath(fromObject, ['contentType']);\n if (fromContentType != null) {\n common.setValueByPath(toObject, ['contentType'], fromContentType);\n }\n\n return toObject;\n}\n\nexport function generatedImageFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedImage,\n): Record {\n const toObject: Record = {};\n\n const fromImage = common.getValueByPath(fromObject, ['_self']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['image'],\n imageFromMldev(apiClient, fromImage),\n );\n }\n\n const fromRaiFilteredReason = common.getValueByPath(fromObject, [\n 'raiFilteredReason',\n ]);\n if (fromRaiFilteredReason != null) {\n common.setValueByPath(\n toObject,\n ['raiFilteredReason'],\n fromRaiFilteredReason,\n );\n }\n\n const fromSafetyAttributes = common.getValueByPath(fromObject, ['_self']);\n if (fromSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['safetyAttributes'],\n safetyAttributesFromMldev(apiClient, fromSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedImages = common.getValueByPath(fromObject, [\n 'predictions',\n ]);\n if (fromGeneratedImages != null) {\n if (Array.isArray(fromGeneratedImages)) {\n common.setValueByPath(\n toObject,\n ['generatedImages'],\n fromGeneratedImages.map((item) => {\n return generatedImageFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedImages'], fromGeneratedImages);\n }\n }\n\n const fromPositivePromptSafetyAttributes = common.getValueByPath(fromObject, [\n 'positivePromptSafetyAttributes',\n ]);\n if (fromPositivePromptSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['positivePromptSafetyAttributes'],\n safetyAttributesFromMldev(apiClient, fromPositivePromptSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function endpointFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function tunedModelInfoFromMldev(\n apiClient: ApiClient,\n fromObject: types.TunedModelInfo,\n): Record {\n const toObject: Record = {};\n\n const fromBaseModel = common.getValueByPath(fromObject, ['baseModel']);\n if (fromBaseModel != null) {\n common.setValueByPath(toObject, ['baseModel'], fromBaseModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n return toObject;\n}\n\nexport function modelFromMldev(\n apiClient: ApiClient,\n fromObject: types.Model,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromVersion = common.getValueByPath(fromObject, ['version']);\n if (fromVersion != null) {\n common.setValueByPath(toObject, ['version'], fromVersion);\n }\n\n const fromTunedModelInfo = common.getValueByPath(fromObject, ['_self']);\n if (fromTunedModelInfo != null) {\n common.setValueByPath(\n toObject,\n ['tunedModelInfo'],\n tunedModelInfoFromMldev(apiClient, fromTunedModelInfo),\n );\n }\n\n const fromInputTokenLimit = common.getValueByPath(fromObject, [\n 'inputTokenLimit',\n ]);\n if (fromInputTokenLimit != null) {\n common.setValueByPath(toObject, ['inputTokenLimit'], fromInputTokenLimit);\n }\n\n const fromOutputTokenLimit = common.getValueByPath(fromObject, [\n 'outputTokenLimit',\n ]);\n if (fromOutputTokenLimit != null) {\n common.setValueByPath(toObject, ['outputTokenLimit'], fromOutputTokenLimit);\n }\n\n const fromSupportedActions = common.getValueByPath(fromObject, [\n 'supportedGenerationMethods',\n ]);\n if (fromSupportedActions != null) {\n common.setValueByPath(toObject, ['supportedActions'], fromSupportedActions);\n }\n\n return toObject;\n}\n\nexport function countTokensResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTotalTokens = common.getValueByPath(fromObject, ['totalTokens']);\n if (fromTotalTokens != null) {\n common.setValueByPath(toObject, ['totalTokens'], fromTotalTokens);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n return toObject;\n}\n\nexport function videoFromMldev(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['video', 'uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'video',\n 'encodedVideo',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['encoding']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromMldev(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, [\n 'generatedSamples',\n ]);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromMldev(apiClient, fromResponse),\n );\n }\n\n const fromResult = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResult != null) {\n common.setValueByPath(\n toObject,\n ['result'],\n generateVideosResponseFromMldev(apiClient, fromResult),\n );\n }\n\n return toObject;\n}\n\nexport function partFromVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentFromVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function citationMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.CitationMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromCitations = common.getValueByPath(fromObject, ['citations']);\n if (fromCitations != null) {\n common.setValueByPath(toObject, ['citations'], fromCitations);\n }\n\n return toObject;\n}\n\nexport function candidateFromVertex(\n apiClient: ApiClient,\n fromObject: types.Candidate,\n): Record {\n const toObject: Record = {};\n\n const fromContent = common.getValueByPath(fromObject, ['content']);\n if (fromContent != null) {\n common.setValueByPath(\n toObject,\n ['content'],\n contentFromVertex(apiClient, fromContent),\n );\n }\n\n const fromCitationMetadata = common.getValueByPath(fromObject, [\n 'citationMetadata',\n ]);\n if (fromCitationMetadata != null) {\n common.setValueByPath(\n toObject,\n ['citationMetadata'],\n citationMetadataFromVertex(apiClient, fromCitationMetadata),\n );\n }\n\n const fromFinishMessage = common.getValueByPath(fromObject, [\n 'finishMessage',\n ]);\n if (fromFinishMessage != null) {\n common.setValueByPath(toObject, ['finishMessage'], fromFinishMessage);\n }\n\n const fromFinishReason = common.getValueByPath(fromObject, ['finishReason']);\n if (fromFinishReason != null) {\n common.setValueByPath(toObject, ['finishReason'], fromFinishReason);\n }\n\n const fromAvgLogprobs = common.getValueByPath(fromObject, ['avgLogprobs']);\n if (fromAvgLogprobs != null) {\n common.setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);\n }\n\n const fromGroundingMetadata = common.getValueByPath(fromObject, [\n 'groundingMetadata',\n ]);\n if (fromGroundingMetadata != null) {\n common.setValueByPath(\n toObject,\n ['groundingMetadata'],\n fromGroundingMetadata,\n );\n }\n\n const fromIndex = common.getValueByPath(fromObject, ['index']);\n if (fromIndex != null) {\n common.setValueByPath(toObject, ['index'], fromIndex);\n }\n\n const fromLogprobsResult = common.getValueByPath(fromObject, [\n 'logprobsResult',\n ]);\n if (fromLogprobsResult != null) {\n common.setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult);\n }\n\n const fromSafetyRatings = common.getValueByPath(fromObject, [\n 'safetyRatings',\n ]);\n if (fromSafetyRatings != null) {\n common.setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings);\n }\n\n return toObject;\n}\n\nexport function generateContentResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromCandidates = common.getValueByPath(fromObject, ['candidates']);\n if (fromCandidates != null) {\n if (Array.isArray(fromCandidates)) {\n common.setValueByPath(\n toObject,\n ['candidates'],\n fromCandidates.map((item) => {\n return candidateFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['candidates'], fromCandidates);\n }\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromResponseId = common.getValueByPath(fromObject, ['responseId']);\n if (fromResponseId != null) {\n common.setValueByPath(toObject, ['responseId'], fromResponseId);\n }\n\n const fromModelVersion = common.getValueByPath(fromObject, ['modelVersion']);\n if (fromModelVersion != null) {\n common.setValueByPath(toObject, ['modelVersion'], fromModelVersion);\n }\n\n const fromPromptFeedback = common.getValueByPath(fromObject, [\n 'promptFeedback',\n ]);\n if (fromPromptFeedback != null) {\n common.setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingStatisticsFromVertex(\n apiClient: ApiClient,\n fromObject: types.ContentEmbeddingStatistics,\n): Record {\n const toObject: Record = {};\n\n const fromTruncated = common.getValueByPath(fromObject, ['truncated']);\n if (fromTruncated != null) {\n common.setValueByPath(toObject, ['truncated'], fromTruncated);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['token_count']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingFromVertex(\n apiClient: ApiClient,\n fromObject: types.ContentEmbedding,\n): Record {\n const toObject: Record = {};\n\n const fromValues = common.getValueByPath(fromObject, ['values']);\n if (fromValues != null) {\n common.setValueByPath(toObject, ['values'], fromValues);\n }\n\n const fromStatistics = common.getValueByPath(fromObject, ['statistics']);\n if (fromStatistics != null) {\n common.setValueByPath(\n toObject,\n ['statistics'],\n contentEmbeddingStatisticsFromVertex(apiClient, fromStatistics),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromBillableCharacterCount = common.getValueByPath(fromObject, [\n 'billableCharacterCount',\n ]);\n if (fromBillableCharacterCount != null) {\n common.setValueByPath(\n toObject,\n ['billableCharacterCount'],\n fromBillableCharacterCount,\n );\n }\n\n return toObject;\n}\n\nexport function embedContentResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromEmbeddings = common.getValueByPath(fromObject, [\n 'predictions[]',\n 'embeddings',\n ]);\n if (fromEmbeddings != null) {\n if (Array.isArray(fromEmbeddings)) {\n common.setValueByPath(\n toObject,\n ['embeddings'],\n fromEmbeddings.map((item) => {\n return contentEmbeddingFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['embeddings'], fromEmbeddings);\n }\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(\n toObject,\n ['metadata'],\n embedContentMetadataFromVertex(apiClient, fromMetadata),\n );\n }\n\n return toObject;\n}\n\nexport function imageFromVertex(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromGcsUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromGcsUri != null) {\n common.setValueByPath(toObject, ['gcsUri'], fromGcsUri);\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['imageBytes'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function safetyAttributesFromVertex(\n apiClient: ApiClient,\n fromObject: types.SafetyAttributes,\n): Record {\n const toObject: Record = {};\n\n const fromCategories = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'categories',\n ]);\n if (fromCategories != null) {\n common.setValueByPath(toObject, ['categories'], fromCategories);\n }\n\n const fromScores = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'scores',\n ]);\n if (fromScores != null) {\n common.setValueByPath(toObject, ['scores'], fromScores);\n }\n\n const fromContentType = common.getValueByPath(fromObject, ['contentType']);\n if (fromContentType != null) {\n common.setValueByPath(toObject, ['contentType'], fromContentType);\n }\n\n return toObject;\n}\n\nexport function generatedImageFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedImage,\n): Record {\n const toObject: Record = {};\n\n const fromImage = common.getValueByPath(fromObject, ['_self']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['image'],\n imageFromVertex(apiClient, fromImage),\n );\n }\n\n const fromRaiFilteredReason = common.getValueByPath(fromObject, [\n 'raiFilteredReason',\n ]);\n if (fromRaiFilteredReason != null) {\n common.setValueByPath(\n toObject,\n ['raiFilteredReason'],\n fromRaiFilteredReason,\n );\n }\n\n const fromSafetyAttributes = common.getValueByPath(fromObject, ['_self']);\n if (fromSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['safetyAttributes'],\n safetyAttributesFromVertex(apiClient, fromSafetyAttributes),\n );\n }\n\n const fromEnhancedPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromEnhancedPrompt != null) {\n common.setValueByPath(toObject, ['enhancedPrompt'], fromEnhancedPrompt);\n }\n\n return toObject;\n}\n\nexport function generateImagesResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedImages = common.getValueByPath(fromObject, [\n 'predictions',\n ]);\n if (fromGeneratedImages != null) {\n if (Array.isArray(fromGeneratedImages)) {\n common.setValueByPath(\n toObject,\n ['generatedImages'],\n fromGeneratedImages.map((item) => {\n return generatedImageFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedImages'], fromGeneratedImages);\n }\n }\n\n const fromPositivePromptSafetyAttributes = common.getValueByPath(fromObject, [\n 'positivePromptSafetyAttributes',\n ]);\n if (fromPositivePromptSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['positivePromptSafetyAttributes'],\n safetyAttributesFromVertex(apiClient, fromPositivePromptSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function endpointFromVertex(\n apiClient: ApiClient,\n fromObject: types.Endpoint,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['endpoint']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDeployedModelId = common.getValueByPath(fromObject, [\n 'deployedModelId',\n ]);\n if (fromDeployedModelId != null) {\n common.setValueByPath(toObject, ['deployedModelId'], fromDeployedModelId);\n }\n\n return toObject;\n}\n\nexport function tunedModelInfoFromVertex(\n apiClient: ApiClient,\n fromObject: types.TunedModelInfo,\n): Record {\n const toObject: Record = {};\n\n const fromBaseModel = common.getValueByPath(fromObject, [\n 'labels',\n 'google-vertex-llm-tuning-base-model-id',\n ]);\n if (fromBaseModel != null) {\n common.setValueByPath(toObject, ['baseModel'], fromBaseModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n return toObject;\n}\n\nexport function modelFromVertex(\n apiClient: ApiClient,\n fromObject: types.Model,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromVersion = common.getValueByPath(fromObject, ['versionId']);\n if (fromVersion != null) {\n common.setValueByPath(toObject, ['version'], fromVersion);\n }\n\n const fromEndpoints = common.getValueByPath(fromObject, ['deployedModels']);\n if (fromEndpoints != null) {\n if (Array.isArray(fromEndpoints)) {\n common.setValueByPath(\n toObject,\n ['endpoints'],\n fromEndpoints.map((item) => {\n return endpointFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['endpoints'], fromEndpoints);\n }\n }\n\n const fromLabels = common.getValueByPath(fromObject, ['labels']);\n if (fromLabels != null) {\n common.setValueByPath(toObject, ['labels'], fromLabels);\n }\n\n const fromTunedModelInfo = common.getValueByPath(fromObject, ['_self']);\n if (fromTunedModelInfo != null) {\n common.setValueByPath(\n toObject,\n ['tunedModelInfo'],\n tunedModelInfoFromVertex(apiClient, fromTunedModelInfo),\n );\n }\n\n return toObject;\n}\n\nexport function countTokensResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTotalTokens = common.getValueByPath(fromObject, ['totalTokens']);\n if (fromTotalTokens != null) {\n common.setValueByPath(toObject, ['totalTokens'], fromTotalTokens);\n }\n\n return toObject;\n}\n\nexport function computeTokensResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.ComputeTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTokensInfo = common.getValueByPath(fromObject, ['tokensInfo']);\n if (fromTokensInfo != null) {\n common.setValueByPath(toObject, ['tokensInfo'], fromTokensInfo);\n }\n\n return toObject;\n}\n\nexport function videoFromVertex(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromVertex(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, ['videos']);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromVertex(apiClient, fromResponse),\n );\n }\n\n const fromResult = common.getValueByPath(fromObject, ['response']);\n if (fromResult != null) {\n common.setValueByPath(\n toObject,\n ['result'],\n generateVideosResponseFromVertex(apiClient, fromResult),\n );\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as types from '../types';\nimport {\n contentFromMldev,\n contentFromVertex,\n contentToMldev,\n contentToVertex,\n toolToMldev,\n toolToVertex,\n} from './_models_converters';\n\n/**\n * Converters for live client.\n */\n\nexport function liveConnectParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveConnectParameters,\n): types.LiveClientMessage {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig !== undefined && fromConfig !== null) {\n common.setValueByPath(\n toObject,\n ['setup'],\n liveConnectConfigToMldev(apiClient, fromConfig),\n );\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel !== undefined) {\n common.setValueByPath(toObject, ['setup', 'model'], fromModel);\n }\n\n return toObject;\n}\n\nexport function liveConnectParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveConnectParameters,\n): types.LiveClientMessage {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig !== undefined && fromConfig !== null) {\n common.setValueByPath(\n toObject,\n ['setup'],\n liveConnectConfigToVertex(apiClient, fromConfig),\n );\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel !== undefined) {\n common.setValueByPath(toObject, ['setup', 'model'], fromModel);\n }\n\n return toObject;\n}\n\nexport function liveServerMessageFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerMessage,\n): types.LiveServerMessage {\n const toObject: Record = {};\n\n const fromSetupComplete = common.getValueByPath(fromObject, [\n 'setupComplete',\n ]);\n if (fromSetupComplete !== undefined) {\n common.setValueByPath(toObject, ['setupComplete'], fromSetupComplete);\n }\n\n const fromServerContent = common.getValueByPath(fromObject, [\n 'serverContent',\n ]);\n if (fromServerContent !== undefined && fromServerContent !== null) {\n common.setValueByPath(\n toObject,\n ['serverContent'],\n liveServerContentFromMldev(apiClient, fromServerContent),\n );\n }\n\n const fromToolCall = common.getValueByPath(fromObject, ['toolCall']);\n if (fromToolCall !== undefined && fromToolCall !== null) {\n common.setValueByPath(\n toObject,\n ['toolCall'],\n liveServerToolCallFromMldev(apiClient, fromToolCall),\n );\n }\n\n const fromToolCallCancellation = common.getValueByPath(fromObject, [\n 'toolCallCancellation',\n ]);\n if (\n fromToolCallCancellation !== undefined &&\n fromToolCallCancellation !== null\n ) {\n common.setValueByPath(\n toObject,\n ['toolCallCancellation'],\n liveServerToolCallCancellationFromMldev(\n apiClient,\n fromToolCallCancellation,\n ),\n );\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != undefined && fromUsageMetadata != null) {\n common.setValueByPath(\n toObject,\n ['usageMetadata'],\n usageMetadataFromMldev(apiClient, fromUsageMetadata),\n );\n }\n\n const fromGoAway = common.getValueByPath(fromObject, ['goAway']);\n if (fromGoAway !== undefined && fromGoAway !== null) {\n common.setValueByPath(\n toObject,\n ['goAway'],\n liveServerGoAwayFromMldev(fromGoAway),\n );\n }\n\n const fromSessionResumptionUpdate = common.getValueByPath(fromObject, [\n 'sessionResumptionUpdate',\n ]);\n if (\n fromSessionResumptionUpdate !== undefined &&\n fromSessionResumptionUpdate !== null\n ) {\n common.setValueByPath(\n toObject,\n ['sessionResumptionUpdate'],\n liveServerSessionResumptionUpdateFromMldev(fromSessionResumptionUpdate),\n );\n }\n\n return toObject;\n}\n\nexport function liveServerMessageFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerMessage,\n): types.LiveServerMessage {\n const toObject: Record = {};\n\n const fromSetupComplete = common.getValueByPath(fromObject, [\n 'setupComplete',\n ]);\n if (fromSetupComplete !== undefined) {\n common.setValueByPath(toObject, ['setupComplete'], fromSetupComplete);\n }\n\n const fromServerContent = common.getValueByPath(fromObject, [\n 'serverContent',\n ]);\n if (fromServerContent !== undefined && fromServerContent !== null) {\n common.setValueByPath(\n toObject,\n ['serverContent'],\n liveServerContentFromVertex(apiClient, fromServerContent),\n );\n }\n\n const fromToolCall = common.getValueByPath(fromObject, ['toolCall']);\n if (fromToolCall !== undefined && fromToolCall !== null) {\n common.setValueByPath(\n toObject,\n ['toolCall'],\n liveServerToolCallFromVertex(apiClient, fromToolCall),\n );\n }\n\n const fromToolCallCancellation = common.getValueByPath(fromObject, [\n 'toolCallCancellation',\n ]);\n if (\n fromToolCallCancellation !== undefined &&\n fromToolCallCancellation !== null\n ) {\n common.setValueByPath(\n toObject,\n ['toolCallCancellation'],\n liveServerToolCallCancellationFromVertex(\n apiClient,\n fromToolCallCancellation,\n ),\n );\n }\n\n const fromGoAway = common.getValueByPath(fromObject, ['goAway']);\n if (fromGoAway !== undefined && fromGoAway !== null) {\n common.setValueByPath(\n toObject,\n ['goAway'],\n liveServerGoAwayFromVertex(fromGoAway),\n );\n }\n\n const fromSessionResumptionUpdate = common.getValueByPath(fromObject, [\n 'sessionResumptionUpdate',\n ]);\n if (\n fromSessionResumptionUpdate !== undefined &&\n fromSessionResumptionUpdate !== null\n ) {\n common.setValueByPath(\n toObject,\n ['sessionResumptionUpdate'],\n liveServerSessionResumptionUpdateFromVertex(fromSessionResumptionUpdate),\n );\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != undefined && fromUsageMetadata != null) {\n common.setValueByPath(\n toObject,\n ['usageMetadata'],\n usageMetadataFromVertex(apiClient, fromUsageMetadata),\n );\n }\n\n return toObject;\n}\n\nfunction slidingWindowToMldev(\n fromObject: types.SlidingWindow,\n): types.SlidingWindow {\n const toObject: Record = {};\n\n const fromTargetTokens = common.getValueByPath(fromObject, ['targetTokens']);\n if (fromTargetTokens !== undefined && fromTargetTokens !== null) {\n common.setValueByPath(toObject, ['targetTokens'], fromTargetTokens);\n }\n\n return toObject;\n}\n\nfunction slidingWindowToVertex(\n fromObject: types.SlidingWindow,\n): types.SlidingWindow {\n const toObject: Record = {};\n\n const fromTargetTokens = common.getValueByPath(fromObject, ['targetTokens']);\n if (fromTargetTokens !== undefined && fromTargetTokens !== null) {\n common.setValueByPath(toObject, ['targetTokens'], fromTargetTokens);\n }\n\n return toObject;\n}\n\nfunction contextWindowCompressionToMldev(\n fromObject: types.ContextWindowCompressionConfig,\n): types.ContextWindowCompressionConfig {\n const toObject: Record = {};\n\n const fromTriggerTokens = common.getValueByPath(fromObject, [\n 'triggerTokens',\n ]);\n if (fromTriggerTokens !== undefined && fromTriggerTokens !== null) {\n common.setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);\n }\n\n const fromSlidingWindow = common.getValueByPath(fromObject, [\n 'slidingWindow',\n ]);\n if (fromSlidingWindow !== undefined && fromSlidingWindow !== null) {\n common.setValueByPath(\n toObject,\n ['slidingWindow'],\n slidingWindowToMldev(fromSlidingWindow),\n );\n }\n\n return toObject;\n}\n\nfunction contextWindowCompressionToVertex(\n fromObject: types.ContextWindowCompressionConfig,\n): types.ContextWindowCompressionConfig {\n const toObject: Record = {};\n\n const fromTriggerTokens = common.getValueByPath(fromObject, [\n 'triggerTokens',\n ]);\n if (fromTriggerTokens !== undefined && fromTriggerTokens !== null) {\n common.setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);\n }\n\n const fromSlidingWindow = common.getValueByPath(fromObject, [\n 'slidingWindow',\n ]);\n if (fromSlidingWindow !== undefined && fromSlidingWindow !== null) {\n common.setValueByPath(\n toObject,\n ['slidingWindow'],\n slidingWindowToVertex(fromSlidingWindow),\n );\n }\n\n return toObject;\n}\n\nfunction automaticActivityDetectionToMldev(\n fromObject: types.AutomaticActivityDetection,\n): types.AutomaticActivityDetection {\n const toObject: Record = {};\n\n const fromDisabled = common.getValueByPath(fromObject, ['disabled']);\n if (fromDisabled !== undefined && fromDisabled !== null) {\n common.setValueByPath(toObject, ['disabled'], fromDisabled);\n }\n\n const fromStartOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'startOfSpeechSensitivity',\n ]);\n if (\n fromStartOfSpeechSensitivity !== undefined &&\n fromStartOfSpeechSensitivity !== null\n ) {\n common.setValueByPath(\n toObject,\n ['startOfSpeechSensitivity'],\n fromStartOfSpeechSensitivity,\n );\n }\n\n const fromEndOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'endOfSpeechSensitivity',\n ]);\n if (\n fromEndOfSpeechSensitivity !== undefined &&\n fromEndOfSpeechSensitivity !== null\n ) {\n common.setValueByPath(\n toObject,\n ['endOfSpeechSensitivity'],\n fromEndOfSpeechSensitivity,\n );\n }\n\n const fromPrefixPaddingMs = common.getValueByPath(fromObject, [\n 'prefixPaddingMs',\n ]);\n if (fromPrefixPaddingMs !== undefined && fromPrefixPaddingMs !== null) {\n common.setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);\n }\n\n const fromSilenceDurationMs = common.getValueByPath(fromObject, [\n 'silenceDurationMs',\n ]);\n if (fromSilenceDurationMs !== undefined && fromSilenceDurationMs !== null) {\n common.setValueByPath(\n toObject,\n ['silenceDurationMs'],\n fromSilenceDurationMs,\n );\n }\n\n return toObject;\n}\n\nfunction automaticActivityDetectionToVertex(\n fromObject: types.AutomaticActivityDetection,\n): types.AutomaticActivityDetection {\n const toObject: Record = {};\n\n const fromDisabled = common.getValueByPath(fromObject, ['disabled']);\n if (fromDisabled !== undefined && fromDisabled !== null) {\n common.setValueByPath(toObject, ['disabled'], fromDisabled);\n }\n\n const fromStartOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'startOfSpeechSensitivity',\n ]);\n if (\n fromStartOfSpeechSensitivity !== undefined &&\n fromStartOfSpeechSensitivity !== null\n ) {\n common.setValueByPath(\n toObject,\n ['startOfSpeechSensitivity'],\n fromStartOfSpeechSensitivity,\n );\n }\n\n const fromEndOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'endOfSpeechSensitivity',\n ]);\n if (\n fromEndOfSpeechSensitivity !== undefined &&\n fromEndOfSpeechSensitivity !== null\n ) {\n common.setValueByPath(\n toObject,\n ['endOfSpeechSensitivity'],\n fromEndOfSpeechSensitivity,\n );\n }\n\n const fromPrefixPaddingMs = common.getValueByPath(fromObject, [\n 'prefixPaddingMs',\n ]);\n if (fromPrefixPaddingMs !== undefined && fromPrefixPaddingMs !== null) {\n common.setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);\n }\n\n const fromSilenceDurationMs = common.getValueByPath(fromObject, [\n 'silenceDurationMs',\n ]);\n if (fromSilenceDurationMs !== undefined && fromSilenceDurationMs !== null) {\n common.setValueByPath(\n toObject,\n ['silenceDurationMs'],\n fromSilenceDurationMs,\n );\n }\n\n return toObject;\n}\n\nfunction realtimeInputConfigToMldev(\n fromObject: types.RealtimeInputConfig,\n): types.RealtimeInputConfig {\n const toObject: Record = {};\n\n const fromAutomaticActivityDetection = common.getValueByPath(fromObject, [\n 'automaticActivityDetection',\n ]);\n if (\n fromAutomaticActivityDetection !== undefined &&\n fromAutomaticActivityDetection !== null\n ) {\n common.setValueByPath(\n toObject,\n ['automaticActivityDetection'],\n automaticActivityDetectionToMldev(fromAutomaticActivityDetection),\n );\n }\n\n const fromActivityHandling = common.getValueByPath(fromObject, [\n 'activityHandling',\n ]);\n if (fromActivityHandling !== undefined && fromActivityHandling !== null) {\n common.setValueByPath(toObject, ['activityHandling'], fromActivityHandling);\n }\n\n const fromTurnCoverage = common.getValueByPath(fromObject, ['turnCoverage']);\n if (fromTurnCoverage !== undefined && fromTurnCoverage !== null) {\n common.setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);\n }\n\n return toObject;\n}\n\nfunction realtimeInputConfigToVertex(\n fromObject: types.RealtimeInputConfig,\n): types.RealtimeInputConfig {\n const toObject: Record = {};\n\n const fromAutomaticActivityDetection = common.getValueByPath(fromObject, [\n 'automaticActivityDetection',\n ]);\n if (\n fromAutomaticActivityDetection !== undefined &&\n fromAutomaticActivityDetection !== null\n ) {\n common.setValueByPath(\n toObject,\n ['automaticActivityDetection'],\n automaticActivityDetectionToVertex(fromAutomaticActivityDetection),\n );\n }\n\n const fromActivityHandling = common.getValueByPath(fromObject, [\n 'activityHandling',\n ]);\n if (fromActivityHandling !== undefined && fromActivityHandling !== null) {\n common.setValueByPath(toObject, ['activityHandling'], fromActivityHandling);\n }\n\n const fromTurnCoverage = common.getValueByPath(fromObject, ['turnCoverage']);\n if (fromTurnCoverage !== undefined && fromTurnCoverage !== null) {\n common.setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);\n }\n\n return toObject;\n}\n\nfunction liveConnectConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveConnectConfig,\n): types.LiveClientSetup {\n const toObject: Record = {};\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (fromGenerationConfig !== undefined) {\n common.setValueByPath(toObject, ['generationConfig'], fromGenerationConfig);\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities !== undefined) {\n common.setValueByPath(\n toObject,\n ['generationConfig', 'responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig !== undefined) {\n common.setValueByPath(\n toObject,\n ['generationConfig', 'speechConfig'],\n fromSpeechConfig,\n );\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (fromSystemInstruction !== undefined && fromSystemInstruction !== null) {\n common.setValueByPath(\n toObject,\n ['systemInstruction'],\n contentToMldev(apiClient, fromSystemInstruction),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (\n fromTools !== undefined &&\n fromTools !== null &&\n Array.isArray(fromTools)\n ) {\n common.setValueByPath(\n toObject,\n ['tools'],\n fromTools.map((item: types.Tool) => {\n return toolToMldev(apiClient, item);\n }),\n );\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (fromSessionResumption !== undefined && fromSessionResumption !== null) {\n common.setValueByPath(\n toObject,\n ['sessionResumption'],\n liveClientSessionResumptionConfigToMldev(fromSessionResumption),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (\n fromContextWindowCompression !== undefined &&\n fromContextWindowCompression !== null\n ) {\n common.setValueByPath(\n toObject,\n ['contextWindowCompression'],\n contextWindowCompressionToMldev(fromContextWindowCompression),\n );\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (\n fromRealtimeInputConfig !== undefined &&\n fromRealtimeInputConfig !== null\n ) {\n common.setValueByPath(\n toObject,\n ['realtimeInputConfig'],\n realtimeInputConfigToMldev(fromRealtimeInputConfig),\n );\n }\n\n return toObject;\n}\n\nfunction liveConnectConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveConnectConfig,\n): types.LiveClientSetup {\n const toObject: Record = {};\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (fromGenerationConfig !== undefined) {\n common.setValueByPath(toObject, ['generationConfig'], fromGenerationConfig);\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities !== undefined) {\n common.setValueByPath(\n toObject,\n ['generationConfig', 'responseModalities'],\n fromResponseModalities,\n );\n } else {\n // Set default to AUDIO to align with MLDev API.\n common.setValueByPath(\n toObject,\n ['generationConfig', 'responseModalities'],\n ['AUDIO'],\n );\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig !== undefined) {\n common.setValueByPath(\n toObject,\n ['generationConfig', 'speechConfig'],\n fromSpeechConfig,\n );\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (fromSystemInstruction !== undefined && fromSystemInstruction !== null) {\n common.setValueByPath(\n toObject,\n ['systemInstruction'],\n contentToVertex(apiClient, fromSystemInstruction),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (\n fromTools !== undefined &&\n fromTools !== null &&\n Array.isArray(fromTools)\n ) {\n common.setValueByPath(\n toObject,\n ['tools'],\n fromTools.map((item: types.Tool) => {\n return toolToVertex(apiClient, item);\n }),\n );\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (fromSessionResumption !== undefined && fromSessionResumption !== null) {\n common.setValueByPath(\n toObject,\n ['sessionResumption'],\n liveClientSessionResumptionConfigToVertex(fromSessionResumption),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (\n fromContextWindowCompression !== undefined &&\n fromContextWindowCompression !== null\n ) {\n common.setValueByPath(\n toObject,\n ['contextWindowCompression'],\n contextWindowCompressionToVertex(fromContextWindowCompression),\n );\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (\n fromRealtimeInputConfig !== undefined &&\n fromRealtimeInputConfig !== null\n ) {\n common.setValueByPath(\n toObject,\n ['realtimeInputConfig'],\n realtimeInputConfigToVertex(fromRealtimeInputConfig),\n );\n }\n\n return toObject;\n}\n\nfunction liveServerContentFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerContent,\n): types.LiveServerContent {\n const toObject: Record = {};\n\n const fromModelTurn = common.getValueByPath(fromObject, ['modelTurn']);\n if (fromModelTurn !== undefined && fromModelTurn !== null) {\n common.setValueByPath(\n toObject,\n ['modelTurn'],\n contentFromMldev(apiClient, fromModelTurn),\n );\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete !== undefined) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n const fromInterrupted = common.getValueByPath(fromObject, ['interrupted']);\n if (fromInterrupted !== undefined) {\n common.setValueByPath(toObject, ['interrupted'], fromInterrupted);\n }\n\n const fromGenerationComplete = common.getValueByPath(fromObject, [\n 'generationComplete',\n ]);\n if (fromGenerationComplete != null) {\n common.setValueByPath(\n toObject,\n ['generationComplete'],\n fromGenerationComplete,\n );\n }\n\n return toObject;\n}\n\nfunction liveServerContentFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerContent,\n): types.LiveServerContent {\n const toObject: Record = {};\n\n const fromModelTurn = common.getValueByPath(fromObject, ['modelTurn']);\n if (fromModelTurn !== undefined && fromModelTurn !== null) {\n common.setValueByPath(\n toObject,\n ['modelTurn'],\n contentFromVertex(apiClient, fromModelTurn),\n );\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete !== undefined) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n const fromInterrupted = common.getValueByPath(fromObject, ['interrupted']);\n if (fromInterrupted !== undefined) {\n common.setValueByPath(toObject, ['interrupted'], fromInterrupted);\n }\n\n const fromGenerationComplete = common.getValueByPath(fromObject, [\n 'generationComplete',\n ]);\n if (fromGenerationComplete != null) {\n common.setValueByPath(\n toObject,\n ['generationComplete'],\n fromGenerationComplete,\n );\n }\n return toObject;\n}\n\nfunction functionCallFromMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCall,\n): types.FunctionCall {\n const toObject: Record = {};\n\n const fromId = common.getValueByPath(fromObject, ['id']);\n if (fromId !== undefined) {\n common.setValueByPath(toObject, ['id'], fromId);\n }\n\n const fromArgs = common.getValueByPath(fromObject, ['args']);\n if (fromArgs !== undefined) {\n common.setValueByPath(toObject, ['args'], fromArgs);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName !== undefined) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n return toObject;\n}\n\nfunction functionCallFromVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCall,\n): types.FunctionCall {\n const toObject: Record = {};\n\n const fromArgs = common.getValueByPath(fromObject, ['args']);\n if (fromArgs !== undefined) {\n common.setValueByPath(toObject, ['args'], fromArgs);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName !== undefined) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n return toObject;\n}\n\nfunction liveServerToolCallFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCall,\n): types.LiveServerToolCall {\n const toObject: Record = {};\n\n const fromFunctionCalls = common.getValueByPath(fromObject, [\n 'functionCalls',\n ]);\n if (\n fromFunctionCalls !== undefined &&\n fromFunctionCalls !== null &&\n Array.isArray(fromFunctionCalls)\n ) {\n common.setValueByPath(\n toObject,\n ['functionCalls'],\n fromFunctionCalls.map((item: types.FunctionCall) => {\n return functionCallFromMldev(apiClient, item);\n }),\n );\n }\n\n return toObject;\n}\n\nfunction liveServerToolCallFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCall,\n): types.LiveServerToolCall {\n const toObject: Record = {};\n\n const fromFunctionCalls = common.getValueByPath(fromObject, [\n 'functionCalls',\n ]);\n if (\n fromFunctionCalls !== undefined &&\n fromFunctionCalls !== null &&\n Array.isArray(fromFunctionCalls)\n ) {\n common.setValueByPath(\n toObject,\n ['functionCalls'],\n fromFunctionCalls.map((item: types.FunctionCall) => {\n return functionCallFromVertex(apiClient, item);\n }),\n );\n }\n\n return toObject;\n}\n\nfunction liveServerToolCallCancellationFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCallCancellation,\n): types.LiveServerToolCallCancellation {\n const toObject: Record = {};\n\n const fromIds = common.getValueByPath(fromObject, ['ids']);\n if (fromIds !== undefined) {\n common.setValueByPath(toObject, ['ids'], fromIds);\n }\n\n return toObject;\n}\n\nfunction liveServerToolCallCancellationFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCallCancellation,\n): types.LiveServerToolCallCancellation {\n const toObject: Record = {};\n\n const fromIds = common.getValueByPath(fromObject, ['ids']);\n if (fromIds !== undefined) {\n common.setValueByPath(toObject, ['ids'], fromIds);\n }\n\n return toObject;\n}\n\nfunction liveServerGoAwayFromMldev(\n fromObject: types.LiveServerGoAway,\n): types.LiveServerGoAway {\n const toObject: Record = {};\n\n const fromTimeLeft = common.getValueByPath(fromObject, ['timeLeft']);\n if (fromTimeLeft !== undefined) {\n common.setValueByPath(toObject, ['timeLeft'], fromTimeLeft);\n }\n\n return toObject;\n}\n\nfunction liveServerGoAwayFromVertex(\n fromObject: types.LiveServerGoAway,\n): types.LiveServerGoAway {\n const toObject: Record = {};\n\n const fromTimeLeft = common.getValueByPath(fromObject, ['timeLeft']);\n if (fromTimeLeft !== undefined) {\n common.setValueByPath(toObject, ['timeLeft'], fromTimeLeft);\n }\n\n return toObject;\n}\n\nfunction liveServerSessionResumptionUpdateFromMldev(\n fromObject: types.LiveServerSessionResumptionUpdate,\n): types.LiveServerSessionResumptionUpdate {\n const toObject: Record = {};\n\n const fromNewHandle = common.getValueByPath(fromObject, ['newHandle']);\n if (fromNewHandle !== undefined) {\n common.setValueByPath(toObject, ['newHandle'], fromNewHandle);\n }\n\n const fromResumable = common.getValueByPath(fromObject, ['resumable']);\n if (fromResumable !== undefined) {\n common.setValueByPath(toObject, ['resumable'], fromResumable);\n }\n\n const fromLastConsumedClientMessageIndex = common.getValueByPath(fromObject, [\n 'lastConsumedClientMessageIndex',\n ]);\n if (fromLastConsumedClientMessageIndex !== undefined) {\n common.setValueByPath(\n toObject,\n ['lastConsumedClientMessageIndex'],\n fromLastConsumedClientMessageIndex,\n );\n }\n\n return toObject;\n}\n\nfunction liveServerSessionResumptionUpdateFromVertex(\n fromObject: types.LiveServerSessionResumptionUpdate,\n): types.LiveServerSessionResumptionUpdate {\n const toObject: Record = {};\n\n const fromNewHandle = common.getValueByPath(fromObject, ['newHandle']);\n if (fromNewHandle !== undefined) {\n common.setValueByPath(toObject, ['newHandle'], fromNewHandle);\n }\n\n const fromResumable = common.getValueByPath(fromObject, ['resumable']);\n if (fromResumable !== undefined) {\n common.setValueByPath(toObject, ['resumable'], fromResumable);\n }\n\n const fromLastConsumedClientMessageIndex = common.getValueByPath(fromObject, [\n 'lastConsumedClientMessageIndex',\n ]);\n if (fromLastConsumedClientMessageIndex !== undefined) {\n common.setValueByPath(\n toObject,\n ['lastConsumedClientMessageIndex'],\n fromLastConsumedClientMessageIndex,\n );\n }\n\n return toObject;\n}\n\nfunction liveClientSessionResumptionConfigToMldev(\n fromObject: types.SessionResumptionConfig,\n): types.SessionResumptionConfig {\n const toObject: Record = {};\n\n const fromHandle = common.getValueByPath(fromObject, ['handle']);\n if (fromHandle !== undefined) {\n common.setValueByPath(toObject, ['handle'], fromHandle);\n }\n\n if (common.getValueByPath(fromObject, ['transparent']) !== undefined) {\n throw new Error('transparent parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nfunction liveClientSessionResumptionConfigToVertex(\n fromObject: types.SessionResumptionConfig,\n): types.SessionResumptionConfig {\n const toObject: Record = {};\n\n const fromHandle = common.getValueByPath(fromObject, ['handle']);\n if (fromHandle !== undefined) {\n common.setValueByPath(toObject, ['handle'], fromHandle);\n }\n\n const fromTransparent = common.getValueByPath(fromObject, ['transparent']);\n if (fromTransparent !== undefined) {\n common.setValueByPath(toObject, ['transparent'], fromTransparent);\n }\n\n return toObject;\n}\n\nexport function modalityTokenCountFromMldev(\n apiClient: ApiClient,\n fromObject: types.ModalityTokenCount,\n): types.ModalityTokenCount {\n const toObject: Record = {};\n\n const fromModality = common.getValueByPath(fromObject, ['modality']);\n if (fromModality != null) {\n common.setValueByPath(toObject, ['modality'], fromModality);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function usageMetadataFromMldev(\n apiClient: ApiClient,\n fromObject: types.UsageMetadata,\n): types.UsageMetadata {\n const toObject: Record = {};\n\n const fromPromptTokenCount = common.getValueByPath(fromObject, [\n 'promptTokenCount',\n ]);\n if (fromPromptTokenCount != null) {\n common.setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n const fromResponseTokenCount = common.getValueByPath(fromObject, [\n 'responseTokenCount',\n ]);\n if (fromResponseTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['responseTokenCount'],\n fromResponseTokenCount,\n );\n }\n\n const fromToolUsePromptTokenCount = common.getValueByPath(fromObject, [\n 'toolUsePromptTokenCount',\n ]);\n if (fromToolUsePromptTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokenCount'],\n fromToolUsePromptTokenCount,\n );\n }\n\n const fromThoughtsTokenCount = common.getValueByPath(fromObject, [\n 'thoughtsTokenCount',\n ]);\n if (fromThoughtsTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['thoughtsTokenCount'],\n fromThoughtsTokenCount,\n );\n }\n\n const fromTotalTokenCount = common.getValueByPath(fromObject, [\n 'totalTokenCount',\n ]);\n if (fromTotalTokenCount != null) {\n common.setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);\n }\n\n const fromPromptTokensDetails = common.getValueByPath(fromObject, [\n 'promptTokensDetails',\n ]);\n if (fromPromptTokensDetails != null) {\n if (Array.isArray(fromPromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails,\n );\n }\n }\n\n const fromCacheTokensDetails = common.getValueByPath(fromObject, [\n 'cacheTokensDetails',\n ]);\n if (fromCacheTokensDetails != null) {\n if (Array.isArray(fromCacheTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails,\n );\n }\n }\n\n const fromResponseTokensDetails = common.getValueByPath(fromObject, [\n 'responseTokensDetails',\n ]);\n if (fromResponseTokensDetails != null) {\n if (Array.isArray(fromResponseTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails,\n );\n }\n }\n\n const fromToolUsePromptTokensDetails = common.getValueByPath(fromObject, [\n 'toolUsePromptTokensDetails',\n ]);\n if (fromToolUsePromptTokensDetails != null) {\n if (Array.isArray(fromToolUsePromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails,\n );\n }\n }\n\n return toObject;\n}\n\nexport function modalityTokenCountFromVertex(\n apiClient: ApiClient,\n fromObject: types.ModalityTokenCount,\n): types.ModalityTokenCount {\n const toObject: Record = {};\n\n const fromModality = common.getValueByPath(fromObject, ['modality']);\n if (fromModality != null) {\n common.setValueByPath(toObject, ['modality'], fromModality);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function usageMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.UsageMetadata,\n): types.UsageMetadata {\n const toObject: Record = {};\n\n const fromPromptTokenCount = common.getValueByPath(fromObject, [\n 'promptTokenCount',\n ]);\n if (fromPromptTokenCount != null) {\n common.setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n const fromResponseTokenCount = common.getValueByPath(fromObject, [\n 'candidatesTokenCount',\n ]);\n if (fromResponseTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['responseTokenCount'],\n fromResponseTokenCount,\n );\n }\n\n const fromToolUsePromptTokenCount = common.getValueByPath(fromObject, [\n 'toolUsePromptTokenCount',\n ]);\n if (fromToolUsePromptTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokenCount'],\n fromToolUsePromptTokenCount,\n );\n }\n\n const fromThoughtsTokenCount = common.getValueByPath(fromObject, [\n 'thoughtsTokenCount',\n ]);\n if (fromThoughtsTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['thoughtsTokenCount'],\n fromThoughtsTokenCount,\n );\n }\n\n const fromTotalTokenCount = common.getValueByPath(fromObject, [\n 'totalTokenCount',\n ]);\n if (fromTotalTokenCount != null) {\n common.setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);\n }\n\n const fromPromptTokensDetails = common.getValueByPath(fromObject, [\n 'promptTokensDetails',\n ]);\n if (fromPromptTokensDetails != null) {\n if (Array.isArray(fromPromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails,\n );\n }\n }\n\n const fromCacheTokensDetails = common.getValueByPath(fromObject, [\n 'cacheTokensDetails',\n ]);\n if (fromCacheTokensDetails != null) {\n if (Array.isArray(fromCacheTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails,\n );\n }\n }\n\n const fromToolUsePromptTokensDetails = common.getValueByPath(fromObject, [\n 'toolUsePromptTokensDetails',\n ]);\n if (fromToolUsePromptTokensDetails != null) {\n if (Array.isArray(fromToolUsePromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails,\n );\n }\n }\n\n const fromResponseTokensDetails = common.getValueByPath(fromObject, [\n 'candidatesTokensDetails',\n ]);\n if (fromResponseTokensDetails != null) {\n if (Array.isArray(fromResponseTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails,\n );\n }\n }\n\n const fromTrafficType = common.getValueByPath(fromObject, ['trafficType']);\n if (fromTrafficType != null) {\n common.setValueByPath(toObject, ['trafficType'], fromTrafficType);\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Live client.\n *\n * @experimental\n */\n\nimport {ApiClient} from './_api_client';\nimport {Auth} from './_auth';\nimport * as t from './_transformers';\nimport {WebSocket, WebSocketCallbacks, WebSocketFactory} from './_websocket';\nimport * as converters from './converters/_live_converters';\nimport {contentToMldev, contentToVertex} from './converters/_models_converters';\nimport * as types from './types';\n\nconst FUNCTION_RESPONSE_REQUIRES_ID =\n 'FunctionResponse request must have an `id` field from the response of a ToolCall.FunctionalCalls in Google AI.';\n\n/**\n * Handles incoming messages from the WebSocket.\n *\n * @remarks\n * This function is responsible for parsing incoming messages, transforming them\n * into LiveServerMessages, and then calling the onmessage callback. Note that\n * the first message which is received from the server is a setupComplete\n * message.\n *\n * @param apiClient The ApiClient instance.\n * @param onmessage The user-provided onmessage callback (if any).\n * @param event The MessageEvent from the WebSocket.\n */\nasync function handleWebSocketMessage(\n apiClient: ApiClient,\n onmessage: (msg: types.LiveServerMessage) => void,\n event: MessageEvent,\n): Promise {\n let serverMessage: types.LiveServerMessage;\n let data: types.LiveServerMessage;\n if (event.data instanceof Blob) {\n data = JSON.parse(await event.data.text()) as types.LiveServerMessage;\n } else {\n data = JSON.parse(event.data) as types.LiveServerMessage;\n }\n if (apiClient.isVertexAI()) {\n serverMessage = converters.liveServerMessageFromVertex(apiClient, data);\n } else {\n serverMessage = converters.liveServerMessageFromMldev(apiClient, data);\n }\n\n onmessage(serverMessage);\n}\n\n/**\n Live class encapsulates the configuration for live interaction with the\n Generative Language API. It embeds ApiClient for general API settings.\n\n @experimental\n */\nexport class Live {\n constructor(\n private readonly apiClient: ApiClient,\n private readonly auth: Auth,\n private readonly webSocketFactory: WebSocketFactory,\n ) {}\n\n /**\n Establishes a connection to the specified model with the given\n configuration and returns a Session object representing that connection.\n\n @experimental\n\n @remarks\n If using the Gemini API, Live is currently only supported behind API\n version `v1alpha`. Ensure that the API version is set to `v1alpha` when\n initializing the SDK if relying on the Gemini API.\n\n @param params - The parameters for establishing a connection to the model.\n @return A live session.\n\n @example\n ```ts\n const session = await ai.live.connect({\n model: 'gemini-2.0-flash-exp',\n config: {\n responseModalities: [Modality.AUDIO],\n },\n callbacks: {\n onopen: () => {\n console.log('Connected to the socket.');\n },\n onmessage: (e: MessageEvent) => {\n console.log('Received message from the server: %s\\n', debug(e.data));\n },\n onerror: (e: ErrorEvent) => {\n console.log('Error occurred: %s\\n', debug(e.error));\n },\n onclose: (e: CloseEvent) => {\n console.log('Connection closed.');\n },\n },\n });\n ```\n */\n async connect(params: types.LiveConnectParameters): Promise {\n const websocketBaseUrl = this.apiClient.getWebsocketBaseUrl();\n const apiVersion = this.apiClient.getApiVersion();\n let url: string;\n const headers = mapToHeaders(this.apiClient.getDefaultHeaders());\n if (this.apiClient.isVertexAI()) {\n url = `${websocketBaseUrl}/ws/google.cloud.aiplatform.${\n apiVersion\n }.LlmBidiService/BidiGenerateContent`;\n await this.auth.addAuthHeaders(headers);\n } else {\n const apiKey = this.apiClient.getApiKey();\n url = `${websocketBaseUrl}/ws/google.ai.generativelanguage.${\n apiVersion\n }.GenerativeService.BidiGenerateContent?key=${apiKey}`;\n }\n\n let onopenResolve: (value: unknown) => void = () => {};\n const onopenPromise = new Promise((resolve: (value: unknown) => void) => {\n onopenResolve = resolve;\n });\n\n const callbacks: types.LiveCallbacks = params.callbacks;\n\n const onopenAwaitedCallback = function () {\n callbacks?.onopen?.();\n onopenResolve({});\n };\n\n const apiClient = this.apiClient;\n\n const websocketCallbacks: WebSocketCallbacks = {\n onopen: onopenAwaitedCallback,\n onmessage: (event: MessageEvent) => {\n void handleWebSocketMessage(apiClient, callbacks.onmessage, event);\n },\n onerror:\n callbacks?.onerror ??\n function (e: ErrorEvent) {\n void e;\n },\n onclose:\n callbacks?.onclose ??\n function (e: CloseEvent) {\n void e;\n },\n };\n\n const conn = this.webSocketFactory.create(\n url,\n headersToMap(headers),\n websocketCallbacks,\n );\n conn.connect();\n // Wait for the websocket to open before sending requests.\n await onopenPromise;\n\n let transformedModel = t.tModel(this.apiClient, params.model);\n if (\n this.apiClient.isVertexAI() &&\n transformedModel.startsWith('publishers/')\n ) {\n const project = this.apiClient.getProject();\n const location = this.apiClient.getLocation();\n transformedModel =\n `projects/${project}/locations/${location}/` + transformedModel;\n }\n\n let clientMessage: types.LiveClientMessage = {};\n const liveConnectParameters: types.LiveConnectParameters = {\n model: transformedModel,\n config: params.config,\n callbacks: params.callbacks,\n };\n if (this.apiClient.isVertexAI()) {\n clientMessage = converters.liveConnectParametersToVertex(\n this.apiClient,\n liveConnectParameters,\n );\n } else {\n clientMessage = converters.liveConnectParametersToMldev(\n this.apiClient,\n liveConnectParameters,\n );\n }\n conn.send(JSON.stringify(clientMessage));\n return new Session(conn, this.apiClient);\n }\n}\n\nconst defaultLiveSendClientContentParamerters: types.LiveSendClientContentParameters =\n {\n turnComplete: true,\n };\n\n/**\n Represents a connection to the API.\n\n @experimental\n */\nexport class Session {\n constructor(\n readonly conn: WebSocket,\n private readonly apiClient: ApiClient,\n ) {}\n\n private tLiveClientContent(\n apiClient: ApiClient,\n params: types.LiveSendClientContentParameters,\n ): types.LiveClientMessage {\n if (params.turns !== null && params.turns !== undefined) {\n let contents: types.Content[] = [];\n try {\n contents = t.tContents(\n apiClient,\n params.turns as types.ContentListUnion,\n );\n if (apiClient.isVertexAI()) {\n contents = contents.map((item) => contentToVertex(apiClient, item));\n } else {\n contents = contents.map((item) => contentToMldev(apiClient, item));\n }\n } catch {\n throw new Error(\n `Failed to parse client content \"turns\", type: '${typeof params.turns}'`,\n );\n }\n return {\n clientContent: {turns: contents, turnComplete: params.turnComplete},\n };\n }\n\n return {\n clientContent: {turnComplete: params.turnComplete},\n };\n }\n\n private tLiveClientRealtimeInput(\n apiClient: ApiClient,\n params: types.LiveSendRealtimeInputParameters,\n ): types.LiveClientMessage {\n let clientMessage: types.LiveClientMessage = {};\n if (!('media' in params) || !params.media) {\n throw new Error(\n `Failed to convert realtime input \"media\", type: '${typeof params.media}'`,\n );\n }\n\n // LiveClientRealtimeInput\n clientMessage = {\n realtimeInput: {\n mediaChunks: [params.media],\n activityStart: params.activityStart,\n activityEnd: params.activityEnd,\n },\n };\n return clientMessage;\n }\n\n private tLiveClienttToolResponse(\n apiClient: ApiClient,\n params: types.LiveSendToolResponseParameters,\n ): types.LiveClientMessage {\n let functionResponses: types.FunctionResponse[] = [];\n\n if (params.functionResponses == null) {\n throw new Error('functionResponses is required.');\n }\n\n if (!Array.isArray(params.functionResponses)) {\n functionResponses = [params.functionResponses];\n } else {\n functionResponses = params.functionResponses;\n }\n\n if (functionResponses.length === 0) {\n throw new Error('functionResponses is required.');\n }\n\n for (const functionResponse of functionResponses) {\n if (\n typeof functionResponse !== 'object' ||\n functionResponse === null ||\n !('name' in functionResponse) ||\n !('response' in functionResponse)\n ) {\n throw new Error(\n `Could not parse function response, type '${typeof functionResponse}'.`,\n );\n }\n if (!apiClient.isVertexAI() && !('id' in functionResponse)) {\n throw new Error(FUNCTION_RESPONSE_REQUIRES_ID);\n }\n }\n\n const clientMessage: types.LiveClientMessage = {\n toolResponse: {functionResponses: functionResponses},\n };\n return clientMessage;\n }\n\n /**\n Send a message over the established connection.\n\n @param params - Contains two **optional** properties, `turns` and\n `turnComplete`.\n\n - `turns` will be converted to a `Content[]`\n - `turnComplete: true` [default] indicates that you are done sending\n content and expect a response. If `turnComplete: false`, the server\n will wait for additional messages before starting generation.\n\n @experimental\n\n @remarks\n There are two ways to send messages to the live API:\n `sendClientContent` and `sendRealtimeInput`.\n\n `sendClientContent` messages are added to the model context **in order**.\n Having a conversation using `sendClientContent` messages is roughly\n equivalent to using the `Chat.sendMessageStream`, except that the state of\n the `chat` history is stored on the API server instead of locally.\n\n Because of `sendClientContent`'s order guarantee, the model cannot respons\n as quickly to `sendClientContent` messages as to `sendRealtimeInput`\n messages. This makes the biggest difference when sending objects that have\n significant preprocessing time (typically images).\n\n The `sendClientContent` message sends a `Content[]`\n which has more options than the `Blob` sent by `sendRealtimeInput`.\n\n So the main use-cases for `sendClientContent` over `sendRealtimeInput` are:\n\n - Sending anything that can't be represented as a `Blob` (text,\n `sendClientContent({turns=\"Hello?\"}`)).\n - Managing turns when not using audio input and voice activity detection.\n (`sendClientContent({turnComplete:true})` or the short form\n `sendClientContent()`)\n - Prefilling a conversation context\n ```\n sendClientContent({\n turns: [\n Content({role:user, parts:...}),\n Content({role:user, parts:...}),\n ...\n ]\n })\n ```\n @experimental\n */\n sendClientContent(params: types.LiveSendClientContentParameters) {\n params = {\n ...defaultLiveSendClientContentParamerters,\n ...params,\n };\n\n const clientMessage: types.LiveClientMessage = this.tLiveClientContent(\n this.apiClient,\n params,\n );\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Send a realtime message over the established connection.\n\n @param params - Contains one property, `media`.\n\n - `media` will be converted to a `Blob`\n\n @experimental\n\n @remarks\n Use `sendRealtimeInput` for realtime audio chunks and video frames (images).\n\n With `sendRealtimeInput` the api will respond to audio automatically\n based on voice activity detection (VAD).\n\n `sendRealtimeInput` is optimized for responsivness at the expense of\n deterministic ordering guarantees. Audio and video tokens are to the\n context when they become available.\n\n Note: The Call signature expects a `Blob` object, but only a subset\n of audio and image mimetypes are allowed.\n */\n sendRealtimeInput(params: types.LiveSendRealtimeInputParameters) {\n if (params.media == null) {\n throw new Error('Media is required.');\n }\n\n const clientMessage: types.LiveClientMessage =\n this.tLiveClientRealtimeInput(this.apiClient, params);\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Send a function response message over the established connection.\n\n @param params - Contains property `functionResponses`.\n\n - `functionResponses` will be converted to a `functionResponses[]`\n\n @remarks\n Use `sendFunctionResponse` to reply to `LiveServerToolCall` from the server.\n\n Use {@link types.LiveConnectConfig#tools} to configure the callable functions.\n\n @experimental\n */\n sendToolResponse(params: types.LiveSendToolResponseParameters) {\n if (params.functionResponses == null) {\n throw new Error('Tool response parameters are required.');\n }\n\n const clientMessage: types.LiveClientMessage =\n this.tLiveClienttToolResponse(this.apiClient, params);\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Terminates the WebSocket connection.\n\n @experimental\n\n @example\n ```ts\n const session = await ai.live.connect({\n model: 'gemini-2.0-flash-exp',\n config: {\n responseModalities: [Modality.AUDIO],\n }\n });\n\n session.close();\n ```\n */\n close() {\n this.conn.close();\n }\n}\n\n// Converts an headers object to a \"map\" object as expected by the WebSocket\n// constructor. We use this as the Auth interface works with Headers objects\n// while the WebSocket constructor takes a map.\nfunction headersToMap(headers: Headers): Record {\n const headerMap: Record = {};\n headers.forEach((value, key) => {\n headerMap[key] = value;\n });\n return headerMap;\n}\n\n// Converts a \"map\" object to a headers object. We use this as the Auth\n// interface works with Headers objects while the API client default headers\n// returns a map.\nfunction mapToHeaders(map: Record): Headers {\n const headers = new Headers();\n for (const [key, value] of Object.entries(map)) {\n headers.append(key, value);\n }\n return headers;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_models_converters';\nimport * as types from './types';\n\nexport class Models extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Makes an API request to generate content with a given model.\n *\n * For the `model` parameter, supported formats for Vertex AI API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The full resource name starts with 'projects/', for example:\n * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'\n * - The partial resource name with 'publishers/', for example:\n * 'publishers/google/models/gemini-2.0-flash' or\n * 'publishers/meta/models/llama-3.1-405b-instruct-maas'\n * - `/` separated publisher and model name, for example:\n * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas'\n *\n * For the `model` parameter, supported formats for Gemini API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The model name starts with 'models/', for example:\n * 'models/gemini-2.0-flash'\n * - For tuned models, the model name starts with 'tunedModels/',\n * for example:\n * 'tunedModels/1234567890123456789'\n *\n * Some models support multimodal input and output.\n *\n * @param params - The parameters for generating content.\n * @return The response from generating content.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents: 'why is the sky blue?',\n * config: {\n * candidateCount: 2,\n * }\n * });\n * console.log(response);\n * ```\n */\n generateContent = async (\n params: types.GenerateContentParameters,\n ): Promise => {\n return await this.generateContentInternal(params);\n };\n\n /**\n * Makes an API request to generate content with a given model and yields the\n * response in chunks.\n *\n * For the `model` parameter, supported formats for Vertex AI API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The full resource name starts with 'projects/', for example:\n * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'\n * - The partial resource name with 'publishers/', for example:\n * 'publishers/google/models/gemini-2.0-flash' or\n * 'publishers/meta/models/llama-3.1-405b-instruct-maas'\n * - `/` separated publisher and model name, for example:\n * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas'\n *\n * For the `model` parameter, supported formats for Gemini API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The model name starts with 'models/', for example:\n * 'models/gemini-2.0-flash'\n * - For tuned models, the model name starts with 'tunedModels/',\n * for example:\n * 'tunedModels/1234567890123456789'\n *\n * Some models support multimodal input and output.\n *\n * @param params - The parameters for generating content with streaming response.\n * @return The response from generating content.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContentStream({\n * model: 'gemini-2.0-flash',\n * contents: 'why is the sky blue?',\n * config: {\n * maxOutputTokens: 200,\n * }\n * });\n * for await (const chunk of response) {\n * console.log(chunk);\n * }\n * ```\n */\n generateContentStream = async (\n params: types.GenerateContentParameters,\n ): Promise> => {\n return await this.generateContentStreamInternal(params);\n };\n\n /**\n * Generates an image based on a text description and configuration.\n *\n * @param model - The model to use.\n * @param prompt - A text description of the image to generate.\n * @param [config] - The config for image generation.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await client.models.generateImages({\n * model: 'imagen-3.0-generate-002',\n * prompt: 'Robot holding a red skateboard',\n * config: {\n * numberOfImages: 1,\n * includeRaiReason: true,\n * },\n * });\n * console.log(response?.generatedImages?.[0]?.image?.imageBytes);\n * ```\n */\n generateImages = async (\n params: types.GenerateImagesParameters,\n ): Promise => {\n return await this.generateImagesInternal(params).then((apiResponse) => {\n let positivePromptSafetyAttributes;\n const generatedImages = [];\n\n if (apiResponse?.generatedImages) {\n for (const generatedImage of apiResponse.generatedImages) {\n if (\n generatedImage &&\n generatedImage?.safetyAttributes &&\n generatedImage?.safetyAttributes?.contentType === 'Positive Prompt'\n ) {\n positivePromptSafetyAttributes = generatedImage?.safetyAttributes;\n } else {\n generatedImages.push(generatedImage);\n }\n }\n }\n let response: types.GenerateImagesResponse;\n\n if (positivePromptSafetyAttributes) {\n response = {\n generatedImages: generatedImages,\n positivePromptSafetyAttributes: positivePromptSafetyAttributes,\n };\n } else {\n response = {\n generatedImages: generatedImages,\n };\n }\n return response;\n });\n };\n\n private async generateContentInternal(\n params: types.GenerateContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:generateContent',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateContentResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.generateContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:generateContent',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateContentResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n private async generateContentStreamInternal(\n params: types.GenerateContentParameters,\n ): Promise> {\n let response: Promise>;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:streamGenerateContent?alt=sse',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n const apiClient = this.apiClient;\n response = apiClient.requestStream({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n }) as Promise>;\n\n return response.then(async function* (\n apiResponse: AsyncGenerator,\n ) {\n for await (const chunk of apiResponse) {\n const resp = converters.generateContentResponseFromVertex(\n apiClient,\n chunk,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n yield typedResp;\n }\n });\n } else {\n const body = converters.generateContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:streamGenerateContent?alt=sse',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n const apiClient = this.apiClient;\n response = apiClient.requestStream({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n }) as Promise>;\n\n return response.then(async function* (\n apiResponse: AsyncGenerator,\n ) {\n for await (const chunk of apiResponse) {\n const resp = converters.generateContentResponseFromMldev(\n apiClient,\n chunk,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n yield typedResp;\n }\n });\n }\n }\n\n /**\n * Calculates embeddings for the given contents. Only text is supported.\n *\n * @param params - The parameters for embedding contents.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.embedContent({\n * model: 'text-embedding-004',\n * contents: [\n * 'What is your name?',\n * 'What is your favorite color?',\n * ],\n * config: {\n * outputDimensionality: 64,\n * },\n * });\n * console.log(response);\n * ```\n */\n async embedContent(\n params: types.EmbedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.embedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.embedContentResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.EmbedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.embedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:batchEmbedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.embedContentResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.EmbedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Generates an image based on a text description and configuration.\n *\n * @param params - The parameters for generating images.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateImages({\n * model: 'imagen-3.0-generate-002',\n * prompt: 'Robot holding a red skateboard',\n * config: {\n * numberOfImages: 1,\n * includeRaiReason: true,\n * },\n * });\n * console.log(response?.generatedImages?.[0]?.image?.imageBytes);\n * ```\n */\n private async generateImagesInternal(\n params: types.GenerateImagesParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateImagesParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateImagesResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateImagesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.generateImagesParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateImagesResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateImagesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Fetches information about a model by name.\n *\n * @example\n * ```ts\n * const modelInfo = await ai.models.get({model: 'gemini-2.0-flash'});\n * ```\n */\n async get(params: types.GetModelParameters): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getModelParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.modelFromVertex(this.apiClient, apiResponse);\n\n return resp as types.Model;\n });\n } else {\n const body = converters.getModelParametersToMldev(this.apiClient, params);\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.modelFromMldev(this.apiClient, apiResponse);\n\n return resp as types.Model;\n });\n }\n }\n\n /**\n * Counts the number of tokens in the given contents. Multimodal input is\n * supported for Gemini models.\n *\n * @param params - The parameters for counting tokens.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.countTokens({\n * model: 'gemini-2.0-flash',\n * contents: 'The quick brown fox jumps over the lazy dog.'\n * });\n * console.log(response);\n * ```\n */\n async countTokens(\n params: types.CountTokensParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.countTokensParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:countTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.countTokensResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.CountTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.countTokensParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:countTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.countTokensResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.CountTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Given a list of contents, returns a corresponding TokensInfo containing\n * the list of tokens and list of token ids.\n *\n * This method is not supported by the Gemini Developer API.\n *\n * @param params - The parameters for computing tokens.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.computeTokens({\n * model: 'gemini-2.0-flash',\n * contents: 'What is your name?'\n * });\n * console.log(response);\n * ```\n */\n async computeTokens(\n params: types.ComputeTokensParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.computeTokensParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:computeTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.computeTokensResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ComputeTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n throw new Error('This method is only supported by the Vertex AI.');\n }\n }\n\n /**\n * Generates videos based on a text description and configuration.\n *\n * @param params - The parameters for generating videos.\n * @return A Promise which allows you to track the progress and eventually retrieve the generated videos using the operations.get method.\n *\n * @example\n * ```ts\n * const operation = await ai.models.generateVideos({\n * model: 'veo-2.0-generate-001',\n * prompt: 'A neon hologram of a cat driving at top speed',\n * config: {\n * numberOfVideos: 1\n * });\n *\n * while (!operation.done) {\n * await new Promise(resolve => setTimeout(resolve, 10000));\n * operation = await ai.operations.getVideosOperation({operation: operation});\n * }\n *\n * console.log(operation.response?.generatedVideos?.[0]?.video?.uri);\n * ```\n */\n\n async generateVideos(\n params: types.GenerateVideosParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateVideosParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predictLongRunning',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n const body = converters.generateVideosParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predictLongRunning',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function getOperationParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'operationName'],\n fromOperationName,\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function getOperationParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'operationName'],\n fromOperationName,\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function fetchPredictOperationParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.FetchPredictOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(toObject, ['operationName'], fromOperationName);\n }\n\n const fromResourceName = common.getValueByPath(fromObject, ['resourceName']);\n if (fromResourceName != null) {\n common.setValueByPath(toObject, ['_url', 'resourceName'], fromResourceName);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function videoFromMldev(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['video', 'uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'video',\n 'encodedVideo',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['encoding']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromMldev(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, [\n 'generatedSamples',\n ]);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromMldev(apiClient, fromResponse),\n );\n }\n\n const fromResult = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResult != null) {\n common.setValueByPath(\n toObject,\n ['result'],\n generateVideosResponseFromMldev(apiClient, fromResult),\n );\n }\n\n return toObject;\n}\n\nexport function videoFromVertex(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromVertex(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, ['videos']);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromVertex(apiClient, fromResponse),\n );\n }\n\n const fromResult = common.getValueByPath(fromObject, ['response']);\n if (fromResult != null) {\n common.setValueByPath(\n toObject,\n ['result'],\n generateVideosResponseFromVertex(apiClient, fromResult),\n );\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_operations_converters';\nimport * as types from './types';\n\nexport class Operations extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Gets the status of a long-running operation.\n *\n * @param parameters The parameters for the get operation request.\n * @return The updated Operation object, with the latest status or result.\n */\n async getVideosOperation(\n parameters: types.OperationGetParameters,\n ): Promise {\n const operation = parameters.operation;\n const config = parameters.config;\n\n if (operation.name === undefined || operation.name === '') {\n throw new Error('Operation name is required.');\n }\n\n if (this.apiClient.isVertexAI()) {\n const resourceName = operation.name.split('/operations/')[0];\n var httpOptions: types.HttpOptions | undefined = undefined;\n\n if (config && 'httpOptions' in config) {\n httpOptions = config.httpOptions;\n }\n\n return this.fetchPredictVideosOperationInternal({\n operationName: operation.name,\n resourceName: resourceName,\n config: {httpOptions: httpOptions},\n });\n } else {\n return this.getVideosOperationInternal({\n operationName: operation.name,\n config: config,\n });\n }\n }\n\n private async getVideosOperationInternal(\n params: types.GetOperationParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getOperationParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{operationName}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n const body = converters.getOperationParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{operationName}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n }\n }\n\n private async fetchPredictVideosOperationInternal(\n params: types.FetchPredictOperationParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.fetchPredictOperationParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{resourceName}:fetchPredictOperation',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n throw new Error('This method is only supported by the Vertex AI.');\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {Auth} from '../_auth';\n\nexport const GOOGLE_API_KEY_HEADER = 'x-goog-api-key';\n// TODO(b/395122533): We need a secure client side authentication mechanism.\nexport class WebAuth implements Auth {\n constructor(private readonly apiKey: string) {}\n\n async addAuthHeaders(headers: Headers): Promise {\n if (headers.get(GOOGLE_API_KEY_HEADER) !== null) {\n return;\n }\n headers.append(GOOGLE_API_KEY_HEADER, this.apiKey);\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {GoogleAuthOptions} from 'google-auth-library';\n\nimport {ApiClient} from './_api_client';\nimport {Caches} from './caches';\nimport {Chats} from './chats';\nimport {crossError} from './cross/_cross_error';\nimport {CrossUploader} from './cross/_cross_uploader';\nimport {CrossWebSocketFactory} from './cross/_cross_websocket';\nimport {Files} from './files';\nimport {Live} from './live';\nimport {Models} from './models';\nimport {Operations} from './operations';\nimport {HttpOptions} from './types';\nimport {WebAuth} from './web/_web_auth';\n\nconst LANGUAGE_LABEL_PREFIX = 'gl-node/';\n\n/**\n * Google Gen AI SDK's configuration options.\n *\n * See {@link GoogleGenAI} for usage samples.\n */\nexport interface GoogleGenAIOptions {\n /**\n * Optional. Determines whether to use the Vertex AI or the Gemini API.\n *\n * @remarks\n * When true, the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI API} will used.\n * When false, the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API} will be used.\n *\n * If unset, default SDK behavior is to use the Gemini API service.\n */\n vertexai?: boolean;\n /**\n * Optional. The Google Cloud project ID for Vertex AI clients.\n *\n * @remarks\n * Only supported on Node runtimes, ignored on browser runtimes.\n */\n project?: string;\n /**\n * Optional. The Google Cloud project region for Vertex AI clients.\n *\n * @remarks\n * Only supported on Node runtimes, ignored on browser runtimes.\n *\n */\n location?: string;\n /**\n * The API Key, required for Gemini API clients.\n *\n * @remarks\n * Required on browser runtimes.\n */\n apiKey?: string;\n /**\n * Optional. The API version to use.\n *\n * @remarks\n * If unset, the default API version will be used.\n */\n apiVersion?: string;\n /**\n * Optional. Authentication options defined by the by google-auth-library for Vertex AI clients.\n *\n * @remarks\n * @see {@link https://github.com/googleapis/google-auth-library-nodejs/blob/v9.15.0/src/auth/googleauth.ts | GoogleAuthOptions interface in google-auth-library-nodejs}.\n *\n * Only supported on Node runtimes, ignored on browser runtimes.\n *\n */\n googleAuthOptions?: GoogleAuthOptions;\n /**\n * Optional. A set of customizable configuration for HTTP requests.\n */\n httpOptions?: HttpOptions;\n}\n\n/**\n * The Google GenAI SDK.\n *\n * @remarks\n * Provides access to the GenAI features through either the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API}\n * or the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI API}.\n *\n * The {@link GoogleGenAIOptions.vertexai} value determines which of the API services to use.\n *\n * When using the Gemini API, a {@link GoogleGenAIOptions.apiKey} must also be set,\n * when using Vertex AI {@link GoogleGenAIOptions.project} and {@link GoogleGenAIOptions.location} must also be set.\n *\n * @example\n * Initializing the SDK for using the Gemini API:\n * ```ts\n * import {GoogleGenAI} from '@google/genai';\n * const ai = new GoogleGenAI({apiKey: 'GEMINI_API_KEY'});\n * ```\n *\n * @example\n * Initializing the SDK for using the Vertex AI API:\n * ```ts\n * import {GoogleGenAI} from '@google/genai';\n * const ai = new GoogleGenAI({\n * vertexai: true,\n * project: 'PROJECT_ID',\n * location: 'PROJECT_LOCATION'\n * });\n * ```\n *\n */\nexport class GoogleGenAI {\n protected readonly apiClient: ApiClient;\n private readonly apiKey?: string;\n public readonly vertexai: boolean;\n private readonly apiVersion?: string;\n readonly models: Models;\n readonly live: Live;\n readonly chats: Chats;\n readonly caches: Caches;\n readonly files: Files;\n readonly operations: Operations;\n\n constructor(options: GoogleGenAIOptions) {\n if (options.apiKey == null) {\n throw new Error(\n `An API Key must be set when running in an unspecified environment.\\n + ${crossError().message}`,\n );\n }\n this.vertexai = options.vertexai ?? false;\n this.apiKey = options.apiKey;\n this.apiVersion = options.apiVersion;\n const auth = new WebAuth(this.apiKey);\n this.apiClient = new ApiClient({\n auth: auth,\n apiVersion: this.apiVersion,\n apiKey: this.apiKey,\n vertexai: this.vertexai,\n httpOptions: options.httpOptions,\n userAgentExtra: LANGUAGE_LABEL_PREFIX + 'cross',\n uploader: new CrossUploader(),\n });\n this.models = new Models(this.apiClient);\n this.live = new Live(this.apiClient, auth, new CrossWebSocketFactory());\n this.chats = new Chats(this.models, this.apiClient);\n this.caches = new Caches(this.apiClient);\n this.files = new Files(this.apiClient);\n this.operations = new Operations(this.apiClient);\n }\n}\n"],"names":["partToMldev","common.getValueByPath","common.setValueByPath","contentToMldev","functionDeclarationToMldev","googleSearchToMldev","dynamicRetrievalConfigToMldev","googleSearchRetrievalToMldev","toolToMldev","functionCallingConfigToMldev","toolConfigToMldev","t.tContents","t.tContent","t.tCachesModel","t.tCachedContentName","partToVertex","contentToVertex","schemaToVertex","functionDeclarationToVertex","googleSearchToVertex","dynamicRetrievalConfigToVertex","googleSearchRetrievalToVertex","toolToVertex","functionCallingConfigToVertex","toolConfigToVertex","converters.createCachedContentParametersToVertex","common.formatMap","converters.cachedContentFromVertex","converters.createCachedContentParametersToMldev","converters.cachedContentFromMldev","converters.getCachedContentParametersToVertex","converters.getCachedContentParametersToMldev","converters.deleteCachedContentParametersToVertex","converters.deleteCachedContentResponseFromVertex","types.DeleteCachedContentResponse","converters.deleteCachedContentParametersToMldev","converters.deleteCachedContentResponseFromMldev","converters.updateCachedContentParametersToVertex","converters.updateCachedContentParametersToMldev","converters.listCachedContentsParametersToVertex","converters.listCachedContentsResponseFromVertex","types.ListCachedContentsResponse","converters.listCachedContentsParametersToMldev","converters.listCachedContentsResponseFromMldev","t.tFileName","converters.fileFromMldev","converters.listFilesParametersToMldev","converters.listFilesResponseFromMldev","types.ListFilesResponse","converters.createFileParametersToMldev","converters.createFileResponseFromMldev","types.CreateFileResponse","converters.getFileParametersToMldev","converters.deleteFileParametersToMldev","converters.deleteFileResponseFromMldev","types.DeleteFileResponse","t.tSchema","t.tTools","t.tTool","t.tSpeechConfig","t.tModel","t.tContentsForEmbed","t.tBytes","videoFromMldev","generatedVideoFromMldev","generateVideosResponseFromMldev","generateVideosOperationFromMldev","videoFromVertex","generatedVideoFromVertex","generateVideosResponseFromVertex","generateVideosOperationFromVertex","converters.liveServerMessageFromVertex","converters.liveServerMessageFromMldev","converters.liveConnectParametersToVertex","converters.liveConnectParametersToMldev","converters.generateContentParametersToVertex","converters.generateContentResponseFromVertex","types.GenerateContentResponse","converters.generateContentParametersToMldev","converters.generateContentResponseFromMldev","converters.embedContentParametersToVertex","converters.embedContentResponseFromVertex","types.EmbedContentResponse","converters.embedContentParametersToMldev","converters.embedContentResponseFromMldev","converters.generateImagesParametersToVertex","converters.generateImagesResponseFromVertex","types.GenerateImagesResponse","converters.generateImagesParametersToMldev","converters.generateImagesResponseFromMldev","converters.getModelParametersToVertex","converters.modelFromVertex","converters.getModelParametersToMldev","converters.modelFromMldev","converters.countTokensParametersToVertex","converters.countTokensResponseFromVertex","types.CountTokensResponse","converters.countTokensParametersToMldev","converters.countTokensResponseFromMldev","converters.computeTokensParametersToVertex","converters.computeTokensResponseFromVertex","types.ComputeTokensResponse","converters.generateVideosParametersToVertex","converters.generateVideosOperationFromVertex","converters.generateVideosParametersToMldev","converters.generateVideosOperationFromMldev","converters.getOperationParametersToVertex","converters.getOperationParametersToMldev","converters.fetchPredictOperationParametersToVertex"],"mappings":"AAAA;;;;AAIG;MAEU,UAAU,CAAA;AAAG;AAEV,SAAA,SAAS,CACvB,cAAsB,EACtB,QAAiC,EAAA;;IAGjC,MAAM,KAAK,GAAG,cAAc;;IAG5B,OAAO,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,GAAG,KAAI;AAClD,QAAA,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE;AACvD,YAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC;;AAE3B,YAAA,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE;AAClE;AAAM,aAAA;;AAEL,YAAA,MAAM,IAAI,KAAK,CAAC,QAAQ,GAAG,CAAA,wBAAA,CAA0B,CAAC;AACvD;AACH,KAAC,CAA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;YACvB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,cAAc,EAAE,qBAAqB,GAAG,OAAO;YAC/C,QAAQ,EAAE,IAAI,aAAa,EAAE;AAC9B,SAAA,CAAC;QACF,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;AACxC,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,qBAAqB,EAAE,CAAC;AACvE,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC;QACnD,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;QACtC,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC;;AAEnD;;;;"} +\ No newline at end of file ++{"version":3,"file":"index.mjs","sources":["../src/_common.ts","../src/_transformers.ts","../src/converters/_caches_converters.ts","../src/pagers.ts","../src/types.ts","../src/caches.ts","../src/chats.ts","../src/_api_client.ts","../src/cross/_cross_error.ts","../src/cross/_cross_uploader.ts","../src/cross/_cross_websocket.ts","../src/converters/_files_converters.ts","../src/files.ts","../src/converters/_live_converters.ts","../src/converters/_models_converters.ts","../src/live.ts","../src/models.ts","../src/converters/_operations_converters.ts","../src/operations.ts","../src/web/_web_auth.ts","../src/client.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport class BaseModule {}\n\nexport function formatMap(\n templateString: string,\n valueMap: Record,\n): string {\n // Use a regular expression to find all placeholders in the template string\n const regex = /\\{([^}]+)\\}/g;\n\n // Replace each placeholder with its corresponding value from the valueMap\n return templateString.replace(regex, (match, key) => {\n if (Object.prototype.hasOwnProperty.call(valueMap, key)) {\n const value = valueMap[key];\n // Convert the value to a string if it's not a string already\n return value !== undefined && value !== null ? String(value) : '';\n } else {\n // Handle missing keys\n throw new Error(`Key '${key}' not found in valueMap.`);\n }\n });\n}\n\nexport function setValueByPath(\n data: Record,\n keys: string[],\n value: unknown,\n): void {\n for (let i = 0; i < keys.length - 1; i++) {\n const key = keys[i];\n\n if (key.endsWith('[]')) {\n const keyName = key.slice(0, -2);\n if (!(keyName in data)) {\n if (Array.isArray(value)) {\n data[keyName] = Array.from({length: value.length}, () => ({}));\n } else {\n throw new Error(`Value must be a list given an array path ${key}`);\n }\n }\n\n if (Array.isArray(data[keyName])) {\n const arrayData = data[keyName] as Array;\n\n if (Array.isArray(value)) {\n for (let j = 0; j < arrayData.length; j++) {\n const entry = arrayData[j] as Record;\n setValueByPath(entry, keys.slice(i + 1), value[j]);\n }\n } else {\n for (const d of arrayData) {\n setValueByPath(\n d as Record,\n keys.slice(i + 1),\n value,\n );\n }\n }\n }\n return;\n } else if (key.endsWith('[0]')) {\n const keyName = key.slice(0, -3);\n if (!(keyName in data)) {\n data[keyName] = [{}];\n }\n const arrayData = (data as Record)[keyName];\n setValueByPath(\n (arrayData as Array>)[0],\n keys.slice(i + 1),\n value,\n );\n return;\n }\n\n if (!data[key] || typeof data[key] !== 'object') {\n data[key] = {};\n }\n\n data = data[key] as Record;\n }\n\n const keyToSet = keys[keys.length - 1];\n const existingData = data[keyToSet];\n\n if (existingData !== undefined) {\n if (\n !value ||\n (typeof value === 'object' && Object.keys(value).length === 0)\n ) {\n return;\n }\n\n if (value === existingData) {\n return;\n }\n\n if (\n typeof existingData === 'object' &&\n typeof value === 'object' &&\n existingData !== null &&\n value !== null\n ) {\n Object.assign(existingData, value);\n } else {\n throw new Error(`Cannot set value for an existing key. Key: ${keyToSet}`);\n }\n } else {\n data[keyToSet] = value;\n }\n}\n\nexport function getValueByPath(data: unknown, keys: string[]): unknown {\n try {\n if (keys.length === 1 && keys[0] === '_self') {\n return data;\n }\n\n for (let i = 0; i < keys.length; i++) {\n if (typeof data !== 'object' || data === null) {\n return undefined;\n }\n\n const key = keys[i];\n if (key.endsWith('[]')) {\n const keyName = key.slice(0, -2);\n if (keyName in data) {\n const arrayData = (data as Record)[keyName];\n if (!Array.isArray(arrayData)) {\n return undefined;\n }\n return arrayData.map((d) => getValueByPath(d, keys.slice(i + 1)));\n } else {\n return undefined;\n }\n } else {\n data = (data as Record)[key];\n }\n }\n\n return data;\n } catch (error) {\n if (error instanceof TypeError) {\n return undefined;\n }\n throw error;\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ApiClient} from './_api_client';\nimport * as types from './types';\n\nexport function tModel(apiClient: ApiClient, model: string | unknown): string {\n if (!model || typeof model !== 'string') {\n throw new Error('model is required and must be a string');\n }\n\n if (apiClient.isVertexAI()) {\n if (\n model.startsWith('publishers/') ||\n model.startsWith('projects/') ||\n model.startsWith('models/')\n ) {\n return model;\n } else if (model.indexOf('/') >= 0) {\n const parts = model.split('/', 2);\n return `publishers/${parts[0]}/models/${parts[1]}`;\n } else {\n return `publishers/google/models/${model}`;\n }\n } else {\n if (model.startsWith('models/') || model.startsWith('tunedModels/')) {\n return model;\n } else {\n return `models/${model}`;\n }\n }\n}\n\nexport function tCachesModel(\n apiClient: ApiClient,\n model: string | unknown,\n): string {\n const transformedModel = tModel(apiClient, model as string);\n if (!transformedModel) {\n return '';\n }\n\n if (transformedModel.startsWith('publishers/') && apiClient.isVertexAI()) {\n // vertex caches only support model name start with projects.\n return `projects/${apiClient.getProject()}/locations/${apiClient.getLocation()}/${transformedModel}`;\n } else if (transformedModel.startsWith('models/') && apiClient.isVertexAI()) {\n return `projects/${apiClient.getProject()}/locations/${apiClient.getLocation()}/publishers/google/${transformedModel}`;\n } else {\n return transformedModel;\n }\n}\n\nexport function tPart(\n apiClient: ApiClient,\n origin?: types.PartUnion | null,\n): types.Part {\n if (origin === null || origin === undefined) {\n throw new Error('PartUnion is required');\n }\n if (typeof origin === 'object') {\n return origin;\n }\n if (typeof origin === 'string') {\n return {text: origin};\n }\n throw new Error(`Unsupported part type: ${typeof origin}`);\n}\n\nexport function tParts(\n apiClient: ApiClient,\n origin?: types.PartListUnion | null,\n): types.Part[] {\n if (\n origin === null ||\n origin === undefined ||\n (Array.isArray(origin) && origin.length === 0)\n ) {\n throw new Error('PartListUnion is required');\n }\n if (Array.isArray(origin)) {\n return origin.map((item) => tPart(apiClient, item as types.PartUnion)!);\n }\n return [tPart(apiClient, origin)!];\n}\n\nfunction _isContent(origin: unknown): boolean {\n return (\n origin !== null &&\n origin !== undefined &&\n typeof origin === 'object' &&\n 'parts' in origin &&\n Array.isArray(origin.parts)\n );\n}\n\nfunction _isFunctionCallPart(origin: unknown): boolean {\n return (\n origin !== null &&\n origin !== undefined &&\n typeof origin === 'object' &&\n 'functionCall' in origin\n );\n}\n\nfunction _isFunctionResponsePart(origin: unknown): boolean {\n return (\n origin !== null &&\n origin !== undefined &&\n typeof origin === 'object' &&\n 'functionResponse' in origin\n );\n}\n\nexport function tContent(\n apiClient: ApiClient,\n origin?: types.ContentUnion,\n): types.Content {\n if (origin === null || origin === undefined) {\n throw new Error('ContentUnion is required');\n }\n if (_isContent(origin)) {\n // _isContent is a utility function that checks if the\n // origin is a Content.\n return origin as types.Content;\n }\n\n return {\n role: 'user',\n parts: tParts(apiClient, origin as types.PartListUnion)!,\n };\n}\n\nexport function tContentsForEmbed(\n apiClient: ApiClient,\n origin: types.ContentListUnion,\n): types.ContentUnion[] {\n if (!origin) {\n return [];\n }\n if (apiClient.isVertexAI() && Array.isArray(origin)) {\n return origin.flatMap((item) => {\n const content = tContent(apiClient, item as types.ContentUnion);\n if (\n content.parts &&\n content.parts.length > 0 &&\n content.parts[0].text !== undefined\n ) {\n return [content.parts[0].text];\n }\n return [];\n });\n } else if (apiClient.isVertexAI()) {\n const content = tContent(apiClient, origin as types.ContentUnion);\n if (\n content.parts &&\n content.parts.length > 0 &&\n content.parts[0].text !== undefined\n ) {\n return [content.parts[0].text];\n }\n return [];\n }\n if (Array.isArray(origin)) {\n return origin.map(\n (item) => tContent(apiClient, item as types.ContentUnion)!,\n );\n }\n return [tContent(apiClient, origin as types.ContentUnion)!];\n}\n\nexport function tContents(\n apiClient: ApiClient,\n origin?: types.ContentListUnion,\n): types.Content[] {\n if (\n origin === null ||\n origin === undefined ||\n (Array.isArray(origin) && origin.length === 0)\n ) {\n throw new Error('contents are required');\n }\n if (!Array.isArray(origin)) {\n // If it's not an array, it's a single content or a single PartUnion.\n if (_isFunctionCallPart(origin) || _isFunctionResponsePart(origin)) {\n throw new Error(\n 'To specify functionCall or functionResponse parts, please wrap them in a Content object, specifying the role for them',\n );\n }\n return [tContent(apiClient, origin as types.ContentUnion)];\n }\n\n const result: types.Content[] = [];\n const accumulatedParts: types.PartUnion[] = [];\n const isContentArray = _isContent(origin[0]);\n\n for (const item of origin) {\n const isContent = _isContent(item);\n\n if (isContent != isContentArray) {\n throw new Error(\n 'Mixing Content and Parts is not supported, please group the parts into a the appropriate Content objects and specify the roles for them',\n );\n }\n\n if (isContent) {\n // `isContent` contains the result of _isContent, which is a utility\n // function that checks if the item is a Content.\n result.push(item as types.Content);\n } else if (_isFunctionCallPart(item) || _isFunctionResponsePart(item)) {\n throw new Error(\n 'To specify functionCall or functionResponse parts, please wrap them, and any other parts, in Content objects as appropriate, specifying the role for them',\n );\n } else {\n accumulatedParts.push(item as types.PartUnion);\n }\n }\n\n if (!isContentArray) {\n result.push({role: 'user', parts: tParts(apiClient, accumulatedParts)});\n }\n return result;\n}\n\nexport function processSchema(apiClient: ApiClient, schema: types.Schema) {\n if (!apiClient.isVertexAI()) {\n if ('default' in schema) {\n throw new Error(\n 'Default value is not supported in the response schema for the Gemini API.',\n );\n }\n }\n\n if ('anyOf' in schema) {\n if (schema['anyOf'] !== undefined) {\n for (const subSchema of schema['anyOf']) {\n processSchema(apiClient, subSchema);\n }\n }\n }\n\n if ('items' in schema) {\n if (schema['items'] !== undefined) {\n processSchema(apiClient, schema['items']);\n }\n }\n\n if ('properties' in schema) {\n if (schema['properties'] !== undefined) {\n for (const subSchema of Object.values(schema['properties'])) {\n processSchema(apiClient, subSchema);\n }\n }\n }\n}\n\nexport function tSchema(\n apiClient: ApiClient,\n schema: types.Schema,\n): types.Schema {\n processSchema(apiClient, schema);\n return schema;\n}\n\nexport function tSpeechConfig(\n apiClient: ApiClient,\n speechConfig: types.SpeechConfigUnion,\n): types.SpeechConfig {\n if (typeof speechConfig === 'object' && 'voiceConfig' in speechConfig) {\n return speechConfig;\n } else if (typeof speechConfig === 'string') {\n return {\n voiceConfig: {\n prebuiltVoiceConfig: {\n voiceName: speechConfig,\n },\n },\n };\n } else {\n throw new Error(`Unsupported speechConfig type: ${typeof speechConfig}`);\n }\n}\n\nexport function tTool(apiClient: ApiClient, tool: types.Tool): types.Tool {\n return tool;\n}\n\nexport function tTools(\n apiClient: ApiClient,\n tool: types.Tool[] | unknown,\n): types.Tool[] {\n if (!Array.isArray(tool)) {\n throw new Error('tool is required and must be an array of Tools');\n }\n return tool;\n}\n\n/**\n * Prepends resource name with project, location, resource_prefix if needed.\n *\n * @param client The API client.\n * @param resourceName The resource name.\n * @param resourcePrefix The resource prefix.\n * @param splitsAfterPrefix The number of splits after the prefix.\n * @returns The completed resource name.\n *\n * Examples:\n *\n * ```\n * resource_name = '123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = True\n * client.project = 'bar'\n * client.location = 'us-west1'\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns: 'projects/bar/locations/us-west1/cachedContents/123'\n * ```\n *\n * ```\n * resource_name = 'projects/foo/locations/us-central1/cachedContents/123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = True\n * client.project = 'bar'\n * client.location = 'us-west1'\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns: 'projects/foo/locations/us-central1/cachedContents/123'\n * ```\n *\n * ```\n * resource_name = '123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = False\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns 'cachedContents/123'\n * ```\n *\n * ```\n * resource_name = 'some/wrong/cachedContents/resource/name/123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = False\n * # client.vertexai = True\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * -> 'some/wrong/resource/name/123'\n * ```\n */\nfunction resourceName(\n client: ApiClient,\n resourceName: string,\n resourcePrefix: string,\n splitsAfterPrefix: number = 1,\n): string {\n const shouldAppendPrefix =\n !resourceName.startsWith(`${resourcePrefix}/`) &&\n resourceName.split('/').length === splitsAfterPrefix;\n if (client.isVertexAI()) {\n if (resourceName.startsWith('projects/')) {\n return resourceName;\n } else if (resourceName.startsWith('locations/')) {\n return `projects/${client.getProject()}/${resourceName}`;\n } else if (resourceName.startsWith(`${resourcePrefix}/`)) {\n return `projects/${client.getProject()}/locations/${client.getLocation()}/${resourceName}`;\n } else if (shouldAppendPrefix) {\n return `projects/${client.getProject()}/locations/${client.getLocation()}/${resourcePrefix}/${resourceName}`;\n } else {\n return resourceName;\n }\n }\n if (shouldAppendPrefix) {\n return `${resourcePrefix}/${resourceName}`;\n }\n return resourceName;\n}\n\nexport function tCachedContentName(\n apiClient: ApiClient,\n name: string | unknown,\n): string {\n if (typeof name !== 'string') {\n throw new Error('name must be a string');\n }\n return resourceName(apiClient, name, 'cachedContents');\n}\n\nexport function tTuningJobStatus(\n apiClient: ApiClient,\n status: string | unknown,\n): string {\n switch (status) {\n case 'STATE_UNSPECIFIED':\n return 'JOB_STATE_UNSPECIFIED';\n case 'CREATING':\n return 'JOB_STATE_RUNNING';\n case 'ACTIVE':\n return 'JOB_STATE_SUCCEEDED';\n case 'FAILED':\n return 'JOB_STATE_FAILED';\n default:\n return status as string;\n }\n}\n\nexport function tBytes(\n apiClient: ApiClient,\n fromImageBytes: string | unknown,\n): string {\n if (typeof fromImageBytes !== 'string') {\n throw new Error('fromImageBytes must be a string');\n }\n // TODO(b/389133914): Remove dummy bytes converter.\n return fromImageBytes;\n}\nexport function tFileName(\n apiClient: ApiClient,\n fromName: string | unknown,\n): string {\n if (typeof fromName !== 'string') {\n throw new Error('fromName must be a string');\n }\n // Remove the files/ prefx for MLdev urls to get the actual name of the file.\n if (fromName.startsWith('files/')) {\n return fromName.split('files/')[1];\n }\n return fromName;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function partToMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['videoMetadata']) !== undefined) {\n throw new Error('videoMetadata parameter is not supported in Gemini API.');\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToMldev(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['example']) !== undefined) {\n throw new Error('example parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['pattern']) !== undefined) {\n throw new Error('pattern parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['default']) !== undefined) {\n throw new Error('default parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxLength']) !== undefined) {\n throw new Error('maxLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minLength']) !== undefined) {\n throw new Error('minLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minProperties']) !== undefined) {\n throw new Error('minProperties parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxProperties']) !== undefined) {\n throw new Error('maxProperties parameter is not supported in Gemini API.');\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['response']) !== undefined) {\n throw new Error('response parameter is not supported in Gemini API.');\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToMldev(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToMldev(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n if (common.getValueByPath(fromObject, ['retrieval']) !== undefined) {\n throw new Error('retrieval parameter is not supported in Gemini API.');\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToMldev());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (parentObject !== undefined && fromDisplayName != null) {\n common.setValueByPath(parentObject, ['displayName'], fromDisplayName);\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (parentObject !== undefined && fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToMldev(apiClient, fromToolConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['model'],\n t.tCachesModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n createCachedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.DeleteCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n updateCachedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function listCachedContentsConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listCachedContentsParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listCachedContentsConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partToVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToVertex(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n const fromExample = common.getValueByPath(fromObject, ['example']);\n if (fromExample != null) {\n common.setValueByPath(toObject, ['example'], fromExample);\n }\n\n const fromPattern = common.getValueByPath(fromObject, ['pattern']);\n if (fromPattern != null) {\n common.setValueByPath(toObject, ['pattern'], fromPattern);\n }\n\n const fromDefault = common.getValueByPath(fromObject, ['default']);\n if (fromDefault != null) {\n common.setValueByPath(toObject, ['default'], fromDefault);\n }\n\n const fromMaxLength = common.getValueByPath(fromObject, ['maxLength']);\n if (fromMaxLength != null) {\n common.setValueByPath(toObject, ['maxLength'], fromMaxLength);\n }\n\n const fromMinLength = common.getValueByPath(fromObject, ['minLength']);\n if (fromMinLength != null) {\n common.setValueByPath(toObject, ['minLength'], fromMinLength);\n }\n\n const fromMinProperties = common.getValueByPath(fromObject, [\n 'minProperties',\n ]);\n if (fromMinProperties != null) {\n common.setValueByPath(toObject, ['minProperties'], fromMinProperties);\n }\n\n const fromMaxProperties = common.getValueByPath(fromObject, [\n 'maxProperties',\n ]);\n if (fromMaxProperties != null) {\n common.setValueByPath(toObject, ['maxProperties'], fromMaxProperties);\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n schemaToVertex(apiClient, fromResponse),\n );\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToVertex(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToVertex(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n const fromRetrieval = common.getValueByPath(fromObject, ['retrieval']);\n if (fromRetrieval != null) {\n common.setValueByPath(toObject, ['retrieval'], fromRetrieval);\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToVertex());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (parentObject !== undefined && fromDisplayName != null) {\n common.setValueByPath(parentObject, ['displayName'], fromDisplayName);\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (parentObject !== undefined && fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToVertex(apiClient, fromToolConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['model'],\n t.tCachesModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n createCachedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.DeleteCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n updateCachedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function listCachedContentsConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listCachedContentsParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listCachedContentsConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function cachedContentFromMldev(\n apiClient: ApiClient,\n fromObject: types.CachedContent,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (fromExpireTime != null) {\n common.setValueByPath(toObject, ['expireTime'], fromExpireTime);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentResponseFromMldev(): Record<\n string,\n unknown\n> {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function listCachedContentsResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromCachedContents = common.getValueByPath(fromObject, [\n 'cachedContents',\n ]);\n if (fromCachedContents != null) {\n if (Array.isArray(fromCachedContents)) {\n common.setValueByPath(\n toObject,\n ['cachedContents'],\n fromCachedContents.map((item) => {\n return cachedContentFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['cachedContents'], fromCachedContents);\n }\n }\n\n return toObject;\n}\n\nexport function cachedContentFromVertex(\n apiClient: ApiClient,\n fromObject: types.CachedContent,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (fromExpireTime != null) {\n common.setValueByPath(toObject, ['expireTime'], fromExpireTime);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentResponseFromVertex(): Record<\n string,\n unknown\n> {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function listCachedContentsResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromCachedContents = common.getValueByPath(fromObject, [\n 'cachedContents',\n ]);\n if (fromCachedContents != null) {\n if (Array.isArray(fromCachedContents)) {\n common.setValueByPath(\n toObject,\n ['cachedContents'],\n fromCachedContents.map((item) => {\n return cachedContentFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['cachedContents'], fromCachedContents);\n }\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Pagers for the GenAI List APIs.\n */\n\nexport enum PagedItem {\n PAGED_ITEM_BATCH_JOBS = 'batchJobs',\n PAGED_ITEM_MODELS = 'models',\n PAGED_ITEM_TUNING_JOBS = 'tuningJobs',\n PAGED_ITEM_FILES = 'files',\n PAGED_ITEM_CACHED_CONTENTS = 'cachedContents',\n}\n\ninterface PagedItemConfig {\n config?: {\n pageToken?: string;\n pageSize?: number;\n };\n}\n\ninterface PagedItemResponse {\n nextPageToken?: string;\n batchJobs?: T[];\n models?: T[];\n tuningJobs?: T[];\n files?: T[];\n cachedContents?: T[];\n}\n\n/**\n * Pager class for iterating through paginated results.\n */\nexport class Pager implements AsyncIterable {\n private nameInternal!: PagedItem;\n private pageInternal: T[] = [];\n private paramsInternal: PagedItemConfig = {};\n private pageInternalSize!: number;\n protected requestInternal!: (\n params: PagedItemConfig,\n ) => Promise>;\n protected idxInternal!: number;\n\n constructor(\n name: PagedItem,\n request: (params: PagedItemConfig) => Promise>,\n response: PagedItemResponse,\n params: PagedItemConfig,\n ) {\n this.requestInternal = request;\n this.init(name, response, params);\n }\n\n private init(\n name: PagedItem,\n response: PagedItemResponse,\n params: PagedItemConfig,\n ) {\n this.nameInternal = name;\n this.pageInternal = response[this.nameInternal] || [];\n this.idxInternal = 0;\n let requestParams: PagedItemConfig = {config: {}};\n if (!params) {\n requestParams = {config: {}};\n } else if (typeof params === 'object') {\n requestParams = {...params};\n } else {\n requestParams = params;\n }\n if (requestParams['config']) {\n requestParams['config']['pageToken'] = response['nextPageToken'];\n }\n this.paramsInternal = requestParams;\n this.pageInternalSize =\n requestParams['config']?.['pageSize'] ?? this.pageInternal.length;\n }\n\n private initNextPage(response: PagedItemResponse): void {\n this.init(this.nameInternal, response, this.paramsInternal);\n }\n\n /**\n * Returns the current page, which is a list of items.\n *\n * @remarks\n * The first page is retrieved when the pager is created. The returned list of\n * items could be a subset of the entire list.\n */\n get page(): T[] {\n return this.pageInternal;\n }\n\n /**\n * Returns the type of paged item (for example, ``batch_jobs``).\n */\n get name(): PagedItem {\n return this.nameInternal;\n }\n\n /**\n * Returns the length of the page fetched each time by this pager.\n *\n * @remarks\n * The number of items in the page is less than or equal to the page length.\n */\n get pageSize(): number {\n return this.pageInternalSize;\n }\n\n /**\n * Returns the parameters when making the API request for the next page.\n *\n * @remarks\n * Parameters contain a set of optional configs that can be\n * used to customize the API request. For example, the `pageToken` parameter\n * contains the token to request the next page.\n */\n get params(): PagedItemConfig {\n return this.paramsInternal;\n }\n\n /**\n * Returns the total number of items in the current page.\n */\n get pageLength(): number {\n return this.pageInternal.length;\n }\n\n /**\n * Returns the item at the given index.\n */\n getItem(index: number): T {\n return this.pageInternal[index];\n }\n\n /**\n * Returns an async iterator that support iterating through all items\n * retrieved from the API.\n *\n * @remarks\n * The iterator will automatically fetch the next page if there are more items\n * to fetch from the API.\n *\n * @example\n *\n * ```ts\n * const pager = await ai.files.list({config: {pageSize: 10}});\n * for await (const file of pager) {\n * console.log(file.name);\n * }\n * ```\n */\n [Symbol.asyncIterator](): AsyncIterator {\n return {\n next: async () => {\n if (this.idxInternal >= this.pageLength) {\n if (this.hasNextPage()) {\n await this.nextPage();\n } else {\n return {value: undefined, done: true};\n }\n }\n const item = this.getItem(this.idxInternal);\n this.idxInternal += 1;\n return {value: item, done: false};\n },\n return: async () => {\n return {value: undefined, done: true};\n },\n };\n }\n\n /**\n * Fetches the next page of items. This makes a new API request.\n *\n * @throws {Error} If there are no more pages to fetch.\n *\n * @example\n *\n * ```ts\n * const pager = await ai.files.list({config: {pageSize: 10}});\n * let page = pager.page;\n * while (true) {\n * for (const file of page) {\n * console.log(file.name);\n * }\n * if (!pager.hasNextPage()) {\n * break;\n * }\n * page = await pager.nextPage();\n * }\n * ```\n */\n async nextPage(): Promise {\n if (!this.hasNextPage()) {\n throw new Error('No more pages to fetch.');\n }\n const response = await this.requestInternal(this.params);\n this.initNextPage(response);\n return this.page;\n }\n\n /**\n * Returns true if there are more pages to fetch from the API.\n */\n hasNextPage(): boolean {\n if (this.params['config']?.['pageToken'] !== undefined) {\n return true;\n }\n return false;\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\n/** Required. Outcome of the code execution. */\nexport enum Outcome {\n OUTCOME_UNSPECIFIED = 'OUTCOME_UNSPECIFIED',\n OUTCOME_OK = 'OUTCOME_OK',\n OUTCOME_FAILED = 'OUTCOME_FAILED',\n OUTCOME_DEADLINE_EXCEEDED = 'OUTCOME_DEADLINE_EXCEEDED',\n}\n\n/** Required. Programming language of the `code`. */\nexport enum Language {\n LANGUAGE_UNSPECIFIED = 'LANGUAGE_UNSPECIFIED',\n PYTHON = 'PYTHON',\n}\n\n/** Optional. The type of the data. */\nexport enum Type {\n TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED',\n STRING = 'STRING',\n NUMBER = 'NUMBER',\n INTEGER = 'INTEGER',\n BOOLEAN = 'BOOLEAN',\n ARRAY = 'ARRAY',\n OBJECT = 'OBJECT',\n}\n\n/** Required. Harm category. */\nexport enum HarmCategory {\n HARM_CATEGORY_UNSPECIFIED = 'HARM_CATEGORY_UNSPECIFIED',\n HARM_CATEGORY_HATE_SPEECH = 'HARM_CATEGORY_HATE_SPEECH',\n HARM_CATEGORY_DANGEROUS_CONTENT = 'HARM_CATEGORY_DANGEROUS_CONTENT',\n HARM_CATEGORY_HARASSMENT = 'HARM_CATEGORY_HARASSMENT',\n HARM_CATEGORY_SEXUALLY_EXPLICIT = 'HARM_CATEGORY_SEXUALLY_EXPLICIT',\n HARM_CATEGORY_CIVIC_INTEGRITY = 'HARM_CATEGORY_CIVIC_INTEGRITY',\n}\n\n/** Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. */\nexport enum HarmBlockMethod {\n HARM_BLOCK_METHOD_UNSPECIFIED = 'HARM_BLOCK_METHOD_UNSPECIFIED',\n SEVERITY = 'SEVERITY',\n PROBABILITY = 'PROBABILITY',\n}\n\n/** Required. The harm block threshold. */\nexport enum HarmBlockThreshold {\n HARM_BLOCK_THRESHOLD_UNSPECIFIED = 'HARM_BLOCK_THRESHOLD_UNSPECIFIED',\n BLOCK_LOW_AND_ABOVE = 'BLOCK_LOW_AND_ABOVE',\n BLOCK_MEDIUM_AND_ABOVE = 'BLOCK_MEDIUM_AND_ABOVE',\n BLOCK_ONLY_HIGH = 'BLOCK_ONLY_HIGH',\n BLOCK_NONE = 'BLOCK_NONE',\n OFF = 'OFF',\n}\n\n/** The mode of the predictor to be used in dynamic retrieval. */\nexport enum Mode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n MODE_DYNAMIC = 'MODE_DYNAMIC',\n}\n\n/** Output only. The reason why the model stopped generating tokens.\n\n If empty, the model has not stopped generating the tokens.\n */\nexport enum FinishReason {\n FINISH_REASON_UNSPECIFIED = 'FINISH_REASON_UNSPECIFIED',\n STOP = 'STOP',\n MAX_TOKENS = 'MAX_TOKENS',\n SAFETY = 'SAFETY',\n RECITATION = 'RECITATION',\n OTHER = 'OTHER',\n BLOCKLIST = 'BLOCKLIST',\n PROHIBITED_CONTENT = 'PROHIBITED_CONTENT',\n SPII = 'SPII',\n MALFORMED_FUNCTION_CALL = 'MALFORMED_FUNCTION_CALL',\n IMAGE_SAFETY = 'IMAGE_SAFETY',\n}\n\n/** Output only. Harm probability levels in the content. */\nexport enum HarmProbability {\n HARM_PROBABILITY_UNSPECIFIED = 'HARM_PROBABILITY_UNSPECIFIED',\n NEGLIGIBLE = 'NEGLIGIBLE',\n LOW = 'LOW',\n MEDIUM = 'MEDIUM',\n HIGH = 'HIGH',\n}\n\n/** Output only. Harm severity levels in the content. */\nexport enum HarmSeverity {\n HARM_SEVERITY_UNSPECIFIED = 'HARM_SEVERITY_UNSPECIFIED',\n HARM_SEVERITY_NEGLIGIBLE = 'HARM_SEVERITY_NEGLIGIBLE',\n HARM_SEVERITY_LOW = 'HARM_SEVERITY_LOW',\n HARM_SEVERITY_MEDIUM = 'HARM_SEVERITY_MEDIUM',\n HARM_SEVERITY_HIGH = 'HARM_SEVERITY_HIGH',\n}\n\n/** Output only. Blocked reason. */\nexport enum BlockedReason {\n BLOCKED_REASON_UNSPECIFIED = 'BLOCKED_REASON_UNSPECIFIED',\n SAFETY = 'SAFETY',\n OTHER = 'OTHER',\n BLOCKLIST = 'BLOCKLIST',\n PROHIBITED_CONTENT = 'PROHIBITED_CONTENT',\n}\n\n/** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */\nexport enum TrafficType {\n TRAFFIC_TYPE_UNSPECIFIED = 'TRAFFIC_TYPE_UNSPECIFIED',\n ON_DEMAND = 'ON_DEMAND',\n PROVISIONED_THROUGHPUT = 'PROVISIONED_THROUGHPUT',\n}\n\n/** Server content modalities. */\nexport enum Modality {\n MODALITY_UNSPECIFIED = 'MODALITY_UNSPECIFIED',\n TEXT = 'TEXT',\n IMAGE = 'IMAGE',\n AUDIO = 'AUDIO',\n}\n\n/** The media resolution to use. */\nexport enum MediaResolution {\n MEDIA_RESOLUTION_UNSPECIFIED = 'MEDIA_RESOLUTION_UNSPECIFIED',\n MEDIA_RESOLUTION_LOW = 'MEDIA_RESOLUTION_LOW',\n MEDIA_RESOLUTION_MEDIUM = 'MEDIA_RESOLUTION_MEDIUM',\n MEDIA_RESOLUTION_HIGH = 'MEDIA_RESOLUTION_HIGH',\n}\n\n/** Options for feature selection preference. */\nexport enum FeatureSelectionPreference {\n FEATURE_SELECTION_PREFERENCE_UNSPECIFIED = 'FEATURE_SELECTION_PREFERENCE_UNSPECIFIED',\n PRIORITIZE_QUALITY = 'PRIORITIZE_QUALITY',\n BALANCED = 'BALANCED',\n PRIORITIZE_COST = 'PRIORITIZE_COST',\n}\n\n/** Config for the dynamic retrieval config mode. */\nexport enum DynamicRetrievalConfigMode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n MODE_DYNAMIC = 'MODE_DYNAMIC',\n}\n\n/** Config for the function calling config mode. */\nexport enum FunctionCallingConfigMode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n AUTO = 'AUTO',\n ANY = 'ANY',\n NONE = 'NONE',\n}\n\n/** Enum that controls the safety filter level for objectionable content. */\nexport enum SafetyFilterLevel {\n BLOCK_LOW_AND_ABOVE = 'BLOCK_LOW_AND_ABOVE',\n BLOCK_MEDIUM_AND_ABOVE = 'BLOCK_MEDIUM_AND_ABOVE',\n BLOCK_ONLY_HIGH = 'BLOCK_ONLY_HIGH',\n BLOCK_NONE = 'BLOCK_NONE',\n}\n\n/** Enum that controls the generation of people. */\nexport enum PersonGeneration {\n DONT_ALLOW = 'DONT_ALLOW',\n ALLOW_ADULT = 'ALLOW_ADULT',\n ALLOW_ALL = 'ALLOW_ALL',\n}\n\n/** Enum that specifies the language of the text in the prompt. */\nexport enum ImagePromptLanguage {\n auto = 'auto',\n en = 'en',\n ja = 'ja',\n ko = 'ko',\n hi = 'hi',\n}\n\n/** State for the lifecycle of a File. */\nexport enum FileState {\n STATE_UNSPECIFIED = 'STATE_UNSPECIFIED',\n PROCESSING = 'PROCESSING',\n ACTIVE = 'ACTIVE',\n FAILED = 'FAILED',\n}\n\n/** Source of the File. */\nexport enum FileSource {\n SOURCE_UNSPECIFIED = 'SOURCE_UNSPECIFIED',\n UPLOADED = 'UPLOADED',\n GENERATED = 'GENERATED',\n}\n\n/** Enum representing the mask mode of a mask reference image. */\nexport enum MaskReferenceMode {\n MASK_MODE_DEFAULT = 'MASK_MODE_DEFAULT',\n MASK_MODE_USER_PROVIDED = 'MASK_MODE_USER_PROVIDED',\n MASK_MODE_BACKGROUND = 'MASK_MODE_BACKGROUND',\n MASK_MODE_FOREGROUND = 'MASK_MODE_FOREGROUND',\n MASK_MODE_SEMANTIC = 'MASK_MODE_SEMANTIC',\n}\n\n/** Enum representing the control type of a control reference image. */\nexport enum ControlReferenceType {\n CONTROL_TYPE_DEFAULT = 'CONTROL_TYPE_DEFAULT',\n CONTROL_TYPE_CANNY = 'CONTROL_TYPE_CANNY',\n CONTROL_TYPE_SCRIBBLE = 'CONTROL_TYPE_SCRIBBLE',\n CONTROL_TYPE_FACE_MESH = 'CONTROL_TYPE_FACE_MESH',\n}\n\n/** Enum representing the subject type of a subject reference image. */\nexport enum SubjectReferenceType {\n SUBJECT_TYPE_DEFAULT = 'SUBJECT_TYPE_DEFAULT',\n SUBJECT_TYPE_PERSON = 'SUBJECT_TYPE_PERSON',\n SUBJECT_TYPE_ANIMAL = 'SUBJECT_TYPE_ANIMAL',\n SUBJECT_TYPE_PRODUCT = 'SUBJECT_TYPE_PRODUCT',\n}\n\n/** Server content modalities. */\nexport enum MediaModality {\n MODALITY_UNSPECIFIED = 'MODALITY_UNSPECIFIED',\n TEXT = 'TEXT',\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n AUDIO = 'AUDIO',\n DOCUMENT = 'DOCUMENT',\n}\n\n/** Start of speech sensitivity. */\nexport enum StartSensitivity {\n START_SENSITIVITY_UNSPECIFIED = 'START_SENSITIVITY_UNSPECIFIED',\n START_SENSITIVITY_HIGH = 'START_SENSITIVITY_HIGH',\n START_SENSITIVITY_LOW = 'START_SENSITIVITY_LOW',\n}\n\n/** End of speech sensitivity. */\nexport enum EndSensitivity {\n END_SENSITIVITY_UNSPECIFIED = 'END_SENSITIVITY_UNSPECIFIED',\n END_SENSITIVITY_HIGH = 'END_SENSITIVITY_HIGH',\n END_SENSITIVITY_LOW = 'END_SENSITIVITY_LOW',\n}\n\n/** The different ways of handling user activity. */\nexport enum ActivityHandling {\n ACTIVITY_HANDLING_UNSPECIFIED = 'ACTIVITY_HANDLING_UNSPECIFIED',\n START_OF_ACTIVITY_INTERRUPTS = 'START_OF_ACTIVITY_INTERRUPTS',\n NO_INTERRUPTION = 'NO_INTERRUPTION',\n}\n\n/** Options about which input is included in the user's turn. */\nexport enum TurnCoverage {\n TURN_COVERAGE_UNSPECIFIED = 'TURN_COVERAGE_UNSPECIFIED',\n TURN_INCLUDES_ONLY_ACTIVITY = 'TURN_INCLUDES_ONLY_ACTIVITY',\n TURN_INCLUDES_ALL_INPUT = 'TURN_INCLUDES_ALL_INPUT',\n}\n\n/** Metadata describes the input video content. */\nexport declare interface VideoMetadata {\n /** Optional. The end offset of the video. */\n endOffset?: string;\n /** Optional. The start offset of the video. */\n startOffset?: string;\n}\n\n/** Result of executing the [ExecutableCode]. Always follows a `part` containing the [ExecutableCode]. */\nexport declare interface CodeExecutionResult {\n /** Required. Outcome of the code execution. */\n outcome?: Outcome;\n /** Optional. Contains stdout when code execution is successful, stderr or other description otherwise. */\n output?: string;\n}\n\n/** Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the [FunctionDeclaration] tool and [FunctionCallingConfig] mode is set to [Mode.CODE]. */\nexport declare interface ExecutableCode {\n /** Required. The code to be executed. */\n code?: string;\n /** Required. Programming language of the `code`. */\n language?: Language;\n}\n\n/** URI based data. */\nexport declare interface FileData {\n /** Required. URI. */\n fileUri?: string;\n /** Required. The IANA standard MIME type of the source data. */\n mimeType?: string;\n}\n\n/** A function call. */\nexport declare interface FunctionCall {\n /** The unique id of the function call. If populated, the client to execute the\n `function_call` and return the response with the matching `id`. */\n id?: string;\n /** Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. */\n args?: Record;\n /** Required. The name of the function to call. Matches [FunctionDeclaration.name]. */\n name?: string;\n}\n\n/** A function response. */\nexport class FunctionResponse {\n /** The id of the function call this response is for. Populated by the client\n to match the corresponding function call `id`. */\n id?: string;\n /** Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. */\n name?: string;\n /** Required. The function response in JSON object format. Use \"output\" key to specify function output and \"error\" key to specify error details (if any). If \"output\" and \"error\" keys are not specified, then whole \"response\" is treated as function output. */\n response?: Record;\n}\n\n/** Content blob. */\nexport declare interface Blob {\n /** Required. Raw bytes. */\n data?: string;\n /** Required. The IANA standard MIME type of the source data. */\n mimeType?: string;\n}\n\n/** A datatype containing media content.\n\n Exactly one field within a Part should be set, representing the specific type\n of content being conveyed. Using multiple fields within the same `Part`\n instance is considered invalid.\n */\nexport declare interface Part {\n /** Metadata for a given video. */\n videoMetadata?: VideoMetadata;\n /** Indicates if the part is thought from the model. */\n thought?: boolean;\n /** Optional. Result of executing the [ExecutableCode]. */\n codeExecutionResult?: CodeExecutionResult;\n /** Optional. Code generated by the model that is meant to be executed. */\n executableCode?: ExecutableCode;\n /** Optional. URI based data. */\n fileData?: FileData;\n /** Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. */\n functionCall?: FunctionCall;\n /** Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. */\n functionResponse?: FunctionResponse;\n /** Optional. Inlined bytes data. */\n inlineData?: Blob;\n /** Optional. Text part (can be code). */\n text?: string;\n}\n/**\n * Creates a `Part` object from a `URI` string.\n */\nexport function createPartFromUri(uri: string, mimeType: string): Part {\n return {\n fileData: {\n fileUri: uri,\n mimeType: mimeType,\n },\n };\n}\n/**\n * Creates a `Part` object from a `text` string.\n */\nexport function createPartFromText(text: string): Part {\n return {\n text: text,\n };\n}\n/**\n * Creates a `Part` object from a `FunctionCall` object.\n */\nexport function createPartFromFunctionCall(\n name: string,\n args: Record,\n): Part {\n return {\n functionCall: {\n name: name,\n args: args,\n },\n };\n}\n/**\n * Creates a `Part` object from a `FunctionResponse` object.\n */\nexport function createPartFromFunctionResponse(\n id: string,\n name: string,\n response: Record,\n): Part {\n return {\n functionResponse: {\n id: id,\n name: name,\n response: response,\n },\n };\n}\n/**\n * Creates a `Part` object from a `base64` encoded `string`.\n */\nexport function createPartFromBase64(data: string, mimeType: string): Part {\n return {\n inlineData: {\n data: data,\n mimeType: mimeType,\n },\n };\n}\n/**\n * Creates a `Part` object from the `outcome` and `output` of a `CodeExecutionResult` object.\n */\nexport function createPartFromCodeExecutionResult(\n outcome: Outcome,\n output: string,\n): Part {\n return {\n codeExecutionResult: {\n outcome: outcome,\n output: output,\n },\n };\n}\n/**\n * Creates a `Part` object from the `code` and `language` of an `ExecutableCode` object.\n */\nexport function createPartFromExecutableCode(\n code: string,\n language: Language,\n): Part {\n return {\n executableCode: {\n code: code,\n language: language,\n },\n };\n}\n\n/** Contains the multi-part content of a message. */\nexport declare interface Content {\n /** List of parts that constitute a single message. Each part may have\n a different IANA MIME type. */\n parts?: Part[];\n /** Optional. The producer of the content. Must be either 'user' or\n 'model'. Useful to set for multi-turn conversations, otherwise can be\n empty. If role is not specified, SDK will determine the role. */\n role?: string;\n}\nfunction _isPart(obj: unknown): obj is Part {\n if (typeof obj === 'object' && obj !== null) {\n return (\n 'fileData' in obj ||\n 'text' in obj ||\n 'functionCall' in obj ||\n 'functionResponse' in obj ||\n 'inlineData' in obj ||\n 'videoMetadata' in obj ||\n 'codeExecutionResult' in obj ||\n 'executableCode' in obj\n );\n }\n return false;\n}\nfunction _toParts(partOrString: PartListUnion | string): Part[] {\n const parts: Part[] = [];\n if (typeof partOrString === 'string') {\n parts.push(createPartFromText(partOrString));\n } else if (_isPart(partOrString)) {\n parts.push(partOrString);\n } else if (Array.isArray(partOrString)) {\n if (partOrString.length === 0) {\n throw new Error('partOrString cannot be an empty array');\n }\n for (const part of partOrString) {\n if (typeof part === 'string') {\n parts.push(createPartFromText(part));\n } else if (_isPart(part)) {\n parts.push(part);\n } else {\n throw new Error('element in PartUnion must be a Part object or string');\n }\n }\n } else {\n throw new Error('partOrString must be a Part object, string, or array');\n }\n return parts;\n}\n/**\n * Creates a `Content` object with a user role from a `PartListUnion` object or `string`.\n */\nexport function createUserContent(\n partOrString: PartListUnion | string,\n): Content {\n return {\n role: 'user',\n parts: _toParts(partOrString),\n };\n}\n\n/**\n * Creates a `Content` object with a model role from a `PartListUnion` object or `string`.\n */\nexport function createModelContent(\n partOrString: PartListUnion | string,\n): Content {\n return {\n role: 'model',\n parts: _toParts(partOrString),\n };\n}\n/** HTTP options to be used in each of the requests. */\nexport declare interface HttpOptions {\n /** The base URL for the AI platform service endpoint. */\n baseUrl?: string;\n /** Specifies the version of the API to use. */\n apiVersion?: string;\n /** Additional HTTP headers to be sent with the request. */\n headers?: Record;\n /** Timeout for the request in milliseconds. */\n timeout?: number;\n /** Signal for the request. */\n signal?: AbortSignal;\n}\n\n/** Schema that defines the format of input and output data.\n\n Represents a select subset of an OpenAPI 3.0 schema object.\n */\nexport declare interface Schema {\n /** Optional. Example of the object. Will only populated when the object is the root. */\n example?: unknown;\n /** Optional. Pattern of the Type.STRING to restrict a string to a regular expression. */\n pattern?: string;\n /** Optional. Default value of the data. */\n default?: unknown;\n /** Optional. Maximum length of the Type.STRING */\n maxLength?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING */\n minLength?: string;\n /** Optional. Minimum number of the properties for Type.OBJECT. */\n minProperties?: string;\n /** Optional. Maximum number of the properties for Type.OBJECT. */\n maxProperties?: string;\n /** Optional. The value should be validated against any (one or more) of the subschemas in the list. */\n anyOf?: Schema[];\n /** Optional. The description of the data. */\n description?: string;\n /** Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:[\"EAST\", NORTH\", \"SOUTH\", \"WEST\"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:[\"101\", \"201\", \"301\"]} */\n enum?: string[];\n /** Optional. The format of the data. Supported formats: for NUMBER type: \"float\", \"double\" for INTEGER type: \"int32\", \"int64\" for STRING type: \"email\", \"byte\", etc */\n format?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. */\n items?: Schema;\n /** Optional. Maximum number of the elements for Type.ARRAY. */\n maxItems?: string;\n /** Optional. Maximum value of the Type.INTEGER and Type.NUMBER */\n maximum?: number;\n /** Optional. Minimum number of the elements for Type.ARRAY. */\n minItems?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER */\n minimum?: number;\n /** Optional. Indicates if the value may be null. */\n nullable?: boolean;\n /** Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. */\n properties?: Record;\n /** Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. */\n propertyOrdering?: string[];\n /** Optional. Required properties of Type.OBJECT. */\n required?: string[];\n /** Optional. The title of the Schema. */\n title?: string;\n /** Optional. The type of the data. */\n type?: Type;\n}\n\n/** Config for model selection. */\nexport declare interface ModelSelectionConfig {\n /** Options for feature selection preference. */\n featureSelectionPreference?: FeatureSelectionPreference;\n}\n\n/** Safety settings. */\nexport declare interface SafetySetting {\n /** Determines if the harm block method uses probability or probability\n and severity scores. */\n method?: HarmBlockMethod;\n /** Required. Harm category. */\n category?: HarmCategory;\n /** Required. The harm block threshold. */\n threshold?: HarmBlockThreshold;\n}\n\n/** Defines a function that the model can generate JSON inputs for.\n\n The inputs are based on `OpenAPI 3.0 specifications\n `_.\n */\nexport declare interface FunctionDeclaration {\n /** Describes the output from the function in the OpenAPI JSON Schema\n Object format. */\n response?: Schema;\n /** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */\n description?: string;\n /** Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. */\n name?: string;\n /** Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 */\n parameters?: Schema;\n}\n\n/** Tool to support Google Search in Model. Powered by Google. */\nexport declare interface GoogleSearch {}\n\n/** Describes the options to customize dynamic retrieval. */\nexport declare interface DynamicRetrievalConfig {\n /** The mode of the predictor to be used in dynamic retrieval. */\n mode?: DynamicRetrievalConfigMode;\n /** Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used. */\n dynamicThreshold?: number;\n}\n\n/** Tool to retrieve public web data for grounding, powered by Google. */\nexport declare interface GoogleSearchRetrieval {\n /** Specifies the dynamic retrieval configuration for the given source. */\n dynamicRetrievalConfig?: DynamicRetrievalConfig;\n}\n\n/** Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder */\nexport declare interface VertexAISearch {\n /** Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` */\n datastore?: string;\n /** Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` */\n engine?: string;\n}\n\n/** The definition of the Rag resource. */\nexport declare interface VertexRagStoreRagResource {\n /** Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` */\n ragCorpus?: string;\n /** Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field. */\n ragFileIds?: string[];\n}\n\n/** Config for filters. */\nexport declare interface RagRetrievalConfigFilter {\n /** Optional. String for metadata filtering. */\n metadataFilter?: string;\n /** Optional. Only returns contexts with vector distance smaller than the threshold. */\n vectorDistanceThreshold?: number;\n /** Optional. Only returns contexts with vector similarity larger than the threshold. */\n vectorSimilarityThreshold?: number;\n}\n\n/** Config for Hybrid Search. */\nexport declare interface RagRetrievalConfigHybridSearch {\n /** Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally. */\n alpha?: number;\n}\n\n/** Config for LlmRanker. */\nexport declare interface RagRetrievalConfigRankingLlmRanker {\n /** Optional. The model name used for ranking. Format: `gemini-1.5-pro` */\n modelName?: string;\n}\n\n/** Config for Rank Service. */\nexport declare interface RagRetrievalConfigRankingRankService {\n /** Optional. The model name of the rank service. Format: `semantic-ranker-512@latest` */\n modelName?: string;\n}\n\n/** Config for ranking and reranking. */\nexport declare interface RagRetrievalConfigRanking {\n /** Optional. Config for LlmRanker. */\n llmRanker?: RagRetrievalConfigRankingLlmRanker;\n /** Optional. Config for Rank Service. */\n rankService?: RagRetrievalConfigRankingRankService;\n}\n\n/** Specifies the context retrieval config. */\nexport declare interface RagRetrievalConfig {\n /** Optional. Config for filters. */\n filter?: RagRetrievalConfigFilter;\n /** Optional. Config for Hybrid Search. */\n hybridSearch?: RagRetrievalConfigHybridSearch;\n /** Optional. Config for ranking and reranking. */\n ranking?: RagRetrievalConfigRanking;\n /** Optional. The number of contexts to retrieve. */\n topK?: number;\n}\n\n/** Retrieve from Vertex RAG Store for grounding. */\nexport declare interface VertexRagStore {\n /** Optional. Deprecated. Please use rag_resources instead. */\n ragCorpora?: string[];\n /** Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. */\n ragResources?: VertexRagStoreRagResource[];\n /** Optional. The retrieval config for the Rag query. */\n ragRetrievalConfig?: RagRetrievalConfig;\n /** Optional. Number of top k results to return from the selected corpora. */\n similarityTopK?: number;\n /** Optional. Only return results with vector distance smaller than the threshold. */\n vectorDistanceThreshold?: number;\n}\n\n/** Defines a retrieval tool that model can call to access external knowledge. */\nexport declare interface Retrieval {\n /** Optional. Deprecated. This option is no longer supported. */\n disableAttribution?: boolean;\n /** Set to use data source powered by Vertex AI Search. */\n vertexAiSearch?: VertexAISearch;\n /** Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService. */\n vertexRagStore?: VertexRagStore;\n}\n\n/** Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. */\nexport declare interface ToolCodeExecution {}\n\n/** Tool details of a tool that the model may use to generate a response. */\nexport declare interface Tool {\n /** List of function declarations that the tool supports. */\n functionDeclarations?: FunctionDeclaration[];\n /** Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. */\n retrieval?: Retrieval;\n /** Optional. Google Search tool type. Specialized retrieval tool\n that is powered by Google Search. */\n googleSearch?: GoogleSearch;\n /** Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. */\n googleSearchRetrieval?: GoogleSearchRetrieval;\n /** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services. */\n codeExecution?: ToolCodeExecution;\n}\n\n/** Function calling config. */\nexport declare interface FunctionCallingConfig {\n /** Optional. Function calling mode. */\n mode?: FunctionCallingConfigMode;\n /** Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided. */\n allowedFunctionNames?: string[];\n}\n\n/** Tool config.\n\n This config is shared for all tools provided in the request.\n */\nexport declare interface ToolConfig {\n /** Optional. Function calling config. */\n functionCallingConfig?: FunctionCallingConfig;\n}\n\n/** The configuration for the prebuilt speaker to use. */\nexport declare interface PrebuiltVoiceConfig {\n /** The name of the prebuilt voice to use.\n */\n voiceName?: string;\n}\n\n/** The configuration for the voice to use. */\nexport declare interface VoiceConfig {\n /** The configuration for the speaker to use.\n */\n prebuiltVoiceConfig?: PrebuiltVoiceConfig;\n}\n\n/** The speech generation configuration. */\nexport declare interface SpeechConfig {\n /** The configuration for the speaker to use.\n */\n voiceConfig?: VoiceConfig;\n /** Language code (ISO 639. e.g. en-US) for the speech synthesization.\n Only available for Live API.\n */\n languageCode?: string;\n}\n\n/** The thinking features configuration. */\nexport declare interface ThinkingConfig {\n /** Indicates whether to include thoughts in the response. If true, thoughts are returned only if the model supports thought and thoughts are available.\n */\n includeThoughts?: boolean;\n /** Indicates the thinking budget in tokens.\n */\n thinkingBudget?: number;\n}\n\n/** When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. */\nexport declare interface GenerationConfigRoutingConfigAutoRoutingMode {\n /** The model routing preference. */\n modelRoutingPreference?:\n | 'UNKNOWN'\n | 'PRIORITIZE_QUALITY'\n | 'BALANCED'\n | 'PRIORITIZE_COST';\n}\n\n/** When manual routing is set, the specified model will be used directly. */\nexport declare interface GenerationConfigRoutingConfigManualRoutingMode {\n /** The model name to use. Only the public LLM models are accepted. e.g. 'gemini-1.5-pro-001'. */\n modelName?: string;\n}\n\n/** The configuration for routing the request to a specific model. */\nexport declare interface GenerationConfigRoutingConfig {\n /** Automated routing. */\n autoMode?: GenerationConfigRoutingConfigAutoRoutingMode;\n /** Manual routing. */\n manualMode?: GenerationConfigRoutingConfigManualRoutingMode;\n}\n\n/** Optional model configuration parameters.\n\n For more information, see `Content generation parameters\n `_.\n */\nexport declare interface GenerateContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Instructions for the model to steer it toward better performance.\n For example, \"Answer as concisely as possible\" or \"Don't use technical\n terms in your response\".\n */\n systemInstruction?: ContentUnion;\n /** Value that controls the degree of randomness in token selection.\n Lower temperatures are good for prompts that require a less open-ended or\n creative response, while higher temperatures can lead to more diverse or\n creative results.\n */\n temperature?: number;\n /** Tokens are selected from the most to least probable until the sum\n of their probabilities equals this value. Use a lower value for less\n random responses and a higher value for more random responses.\n */\n topP?: number;\n /** For each token selection step, the ``top_k`` tokens with the\n highest probabilities are sampled. Then tokens are further filtered based\n on ``top_p`` with the final token selected using temperature sampling. Use\n a lower number for less random responses and a higher number for more\n random responses.\n */\n topK?: number;\n /** Number of response variations to return.\n */\n candidateCount?: number;\n /** Maximum number of tokens that can be generated in the response.\n */\n maxOutputTokens?: number;\n /** List of strings that tells the model to stop generating text if one\n of the strings is encountered in the response.\n */\n stopSequences?: string[];\n /** Whether to return the log probabilities of the tokens that were\n chosen by the model at each step.\n */\n responseLogprobs?: boolean;\n /** Number of top candidate tokens to return the log probabilities for\n at each generation step.\n */\n logprobs?: number;\n /** Positive values penalize tokens that already appear in the\n generated text, increasing the probability of generating more diverse\n content.\n */\n presencePenalty?: number;\n /** Positive values penalize tokens that repeatedly appear in the\n generated text, increasing the probability of generating more diverse\n content.\n */\n frequencyPenalty?: number;\n /** When ``seed`` is fixed to a specific number, the model makes a best\n effort to provide the same response for repeated requests. By default, a\n random number is used.\n */\n seed?: number;\n /** Output response media type of the generated candidate text.\n */\n responseMimeType?: string;\n /** Schema that the generated candidate text must adhere to.\n */\n responseSchema?: SchemaUnion;\n /** Configuration for model router requests.\n */\n routingConfig?: GenerationConfigRoutingConfig;\n /** Configuration for model selection.\n */\n modelSelectionConfig?: ModelSelectionConfig;\n /** Safety settings in the request to block unsafe content in the\n response.\n */\n safetySettings?: SafetySetting[];\n /** Code that enables the system to interact with external systems to\n perform an action outside of the knowledge and scope of the model.\n */\n tools?: ToolListUnion;\n /** Associates model output to a specific function call.\n */\n toolConfig?: ToolConfig;\n /** Labels with user-defined metadata to break down billed charges. */\n labels?: Record;\n /** Resource name of a context cache that can be used in subsequent\n requests.\n */\n cachedContent?: string;\n /** The requested modalities of the response. Represents the set of\n modalities that the model can return.\n */\n responseModalities?: string[];\n /** If specified, the media resolution specified will be used.\n */\n mediaResolution?: MediaResolution;\n /** The speech generation configuration.\n */\n speechConfig?: SpeechConfigUnion;\n /** If enabled, audio timestamp will be included in the request to the\n model.\n */\n audioTimestamp?: boolean;\n /** The thinking features configuration.\n */\n thinkingConfig?: ThinkingConfig;\n}\n\n/** Config for models.generate_content parameters. */\nexport declare interface GenerateContentParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Content of the request.\n */\n contents: ContentListUnion;\n /** Configuration that contains optional model parameters.\n */\n config?: GenerateContentConfig;\n}\n\n/** Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp */\nexport declare interface GoogleTypeDate {\n /** Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */\n day?: number;\n /** Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */\n month?: number;\n /** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */\n year?: number;\n}\n\n/** Source attributions for content. */\nexport declare interface Citation {\n /** Output only. End index into the content. */\n endIndex?: number;\n /** Output only. License of the attribution. */\n license?: string;\n /** Output only. Publication date of the attribution. */\n publicationDate?: GoogleTypeDate;\n /** Output only. Start index into the content. */\n startIndex?: number;\n /** Output only. Title of the attribution. */\n title?: string;\n /** Output only. Url reference of the attribution. */\n uri?: string;\n}\n\n/** Citation information when the model quotes another source. */\nexport declare interface CitationMetadata {\n /** Contains citation information when the model directly quotes, at\n length, from another source. Can include traditional websites and code\n repositories.\n */\n citations?: Citation[];\n}\n\n/** Chunk from context retrieved by the retrieval tools. */\nexport declare interface GroundingChunkRetrievedContext {\n /** Text of the attribution. */\n text?: string;\n /** Title of the attribution. */\n title?: string;\n /** URI reference of the attribution. */\n uri?: string;\n}\n\n/** Chunk from the web. */\nexport declare interface GroundingChunkWeb {\n /** Domain of the (original) URI. */\n domain?: string;\n /** Title of the chunk. */\n title?: string;\n /** URI reference of the chunk. */\n uri?: string;\n}\n\n/** Grounding chunk. */\nexport declare interface GroundingChunk {\n /** Grounding chunk from context retrieved by the retrieval tools. */\n retrievedContext?: GroundingChunkRetrievedContext;\n /** Grounding chunk from the web. */\n web?: GroundingChunkWeb;\n}\n\n/** Segment of the content. */\nexport declare interface Segment {\n /** Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero. */\n endIndex?: number;\n /** Output only. The index of a Part object within its parent Content object. */\n partIndex?: number;\n /** Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero. */\n startIndex?: number;\n /** Output only. The text corresponding to the segment from the response. */\n text?: string;\n}\n\n/** Grounding support. */\nexport declare interface GroundingSupport {\n /** Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the grounding_chunk_indices. */\n confidenceScores?: number[];\n /** A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim. */\n groundingChunkIndices?: number[];\n /** Segment of the content this support belongs to. */\n segment?: Segment;\n}\n\n/** Metadata related to retrieval in the grounding flow. */\nexport declare interface RetrievalMetadata {\n /** Optional. Score indicating how likely information from Google Search could help answer the prompt. The score is in the range `[0, 1]`, where 0 is the least likely and 1 is the most likely. This score is only populated when Google Search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger Google Search. */\n googleSearchDynamicRetrievalScore?: number;\n}\n\n/** Google search entry point. */\nexport declare interface SearchEntryPoint {\n /** Optional. Web content snippet that can be embedded in a web page or an app webview. */\n renderedContent?: string;\n /** Optional. Base64 encoded JSON representing array of tuple. */\n sdkBlob?: string;\n}\n\n/** Metadata returned to client when grounding is enabled. */\nexport declare interface GroundingMetadata {\n /** List of supporting references retrieved from specified grounding source. */\n groundingChunks?: GroundingChunk[];\n /** Optional. List of grounding support. */\n groundingSupports?: GroundingSupport[];\n /** Optional. Output only. Retrieval metadata. */\n retrievalMetadata?: RetrievalMetadata;\n /** Optional. Queries executed by the retrieval tools. */\n retrievalQueries?: string[];\n /** Optional. Google search entry for the following-up web searches. */\n searchEntryPoint?: SearchEntryPoint;\n /** Optional. Web search queries for the following-up web search. */\n webSearchQueries?: string[];\n}\n\n/** Candidate for the logprobs token and score. */\nexport declare interface LogprobsResultCandidate {\n /** The candidate's log probability. */\n logProbability?: number;\n /** The candidate's token string value. */\n token?: string;\n /** The candidate's token id value. */\n tokenId?: number;\n}\n\n/** Candidates with top log probabilities at each decoding step. */\nexport declare interface LogprobsResultTopCandidates {\n /** Sorted by log probability in descending order. */\n candidates?: LogprobsResultCandidate[];\n}\n\n/** Logprobs Result */\nexport declare interface LogprobsResult {\n /** Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates. */\n chosenCandidates?: LogprobsResultCandidate[];\n /** Length = total number of decoding steps. */\n topCandidates?: LogprobsResultTopCandidates[];\n}\n\n/** Safety rating corresponding to the generated content. */\nexport declare interface SafetyRating {\n /** Output only. Indicates whether the content was filtered out because of this rating. */\n blocked?: boolean;\n /** Output only. Harm category. */\n category?: HarmCategory;\n /** Output only. Harm probability levels in the content. */\n probability?: HarmProbability;\n /** Output only. Harm probability score. */\n probabilityScore?: number;\n /** Output only. Harm severity levels in the content. */\n severity?: HarmSeverity;\n /** Output only. Harm severity score. */\n severityScore?: number;\n}\n\n/** A response candidate generated from the model. */\nexport declare interface Candidate {\n /** Contains the multi-part content of the response.\n */\n content?: Content;\n /** Source attribution of the generated content.\n */\n citationMetadata?: CitationMetadata;\n /** Describes the reason the model stopped generating tokens.\n */\n finishMessage?: string;\n /** Number of tokens for this candidate.\n */\n tokenCount?: number;\n /** The reason why the model stopped generating tokens.\n If empty, the model has not stopped generating the tokens.\n */\n finishReason?: FinishReason;\n /** Output only. Average log probability score of the candidate. */\n avgLogprobs?: number;\n /** Output only. Metadata specifies sources used to ground generated content. */\n groundingMetadata?: GroundingMetadata;\n /** Output only. Index of the candidate. */\n index?: number;\n /** Output only. Log-likelihood scores for the response tokens and top tokens */\n logprobsResult?: LogprobsResult;\n /** Output only. List of ratings for the safety of a response candidate. There is at most one rating per category. */\n safetyRatings?: SafetyRating[];\n}\n\n/** Content filter results for a prompt sent in the request. */\nexport class GenerateContentResponsePromptFeedback {\n /** Output only. Blocked reason. */\n blockReason?: BlockedReason;\n /** Output only. A readable block reason message. */\n blockReasonMessage?: string;\n /** Output only. Safety ratings. */\n safetyRatings?: SafetyRating[];\n}\n\n/** Represents token counting info for a single modality. */\nexport declare interface ModalityTokenCount {\n /** The modality associated with this token count. */\n modality?: MediaModality;\n /** Number of tokens. */\n tokenCount?: number;\n}\n\n/** Usage metadata about response(s). */\nexport class GenerateContentResponseUsageMetadata {\n /** Output only. List of modalities of the cached content in the request input. */\n cacheTokensDetails?: ModalityTokenCount[];\n /** Output only. Number of tokens in the cached part in the input (the cached content). */\n cachedContentTokenCount?: number;\n /** Number of tokens in the response(s). */\n candidatesTokenCount?: number;\n /** Output only. List of modalities that were returned in the response. */\n candidatesTokensDetails?: ModalityTokenCount[];\n /** Number of tokens in the request. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */\n promptTokenCount?: number;\n /** Output only. List of modalities that were processed in the request input. */\n promptTokensDetails?: ModalityTokenCount[];\n /** Output only. Number of tokens present in thoughts output. */\n thoughtsTokenCount?: number;\n /** Output only. Number of tokens present in tool-use prompt(s). */\n toolUsePromptTokenCount?: number;\n /** Output only. List of modalities that were processed for tool-use request inputs. */\n toolUsePromptTokensDetails?: ModalityTokenCount[];\n /** Total token count for prompt, response candidates, and tool-use prompts (if present). */\n totalTokenCount?: number;\n /** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */\n trafficType?: TrafficType;\n}\n\n/** Response message for PredictionService.GenerateContent. */\nexport class GenerateContentResponse {\n /** Response variations returned by the model.\n */\n candidates?: Candidate[];\n /** Timestamp when the request is made to the server.\n */\n createTime?: string;\n /** Identifier for each response.\n */\n responseId?: string;\n /** Output only. The model version used to generate the response. */\n modelVersion?: string;\n /** Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations. */\n promptFeedback?: GenerateContentResponsePromptFeedback;\n /** Usage metadata about the response(s). */\n usageMetadata?: GenerateContentResponseUsageMetadata;\n /**\n * Returns the concatenation of all text parts from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the text from the first\n * one will be returned.\n * If there are non-text parts in the response, the concatenation of all text\n * parts will be returned, and a warning will be logged.\n * If there are thought parts in the response, the concatenation of all text\n * parts excluding the thought parts will be returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'Why is the sky blue?',\n * });\n *\n * console.debug(response.text);\n * ```\n */\n get text(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning text from the first one.',\n );\n }\n let text = '';\n let anyTextPartText = false;\n const nonTextParts = [];\n for (const part of this.candidates?.[0]?.content?.parts ?? []) {\n for (const [fieldName, fieldValue] of Object.entries(part)) {\n if (\n fieldName !== 'text' &&\n fieldName !== 'thought' &&\n (fieldValue !== null || fieldValue !== undefined)\n ) {\n nonTextParts.push(fieldName);\n }\n }\n if (typeof part.text === 'string') {\n if (typeof part.thought === 'boolean' && part.thought) {\n continue;\n }\n anyTextPartText = true;\n text += part.text;\n }\n }\n if (nonTextParts.length > 0) {\n console.warn(\n `there are non-text parts ${nonTextParts} in the response, returning concatenation of all text parts. Please refer to the non text parts for a full response from model.`,\n );\n }\n // part.text === '' is different from part.text is null\n return anyTextPartText ? text : undefined;\n }\n\n /**\n * Returns the function calls from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the function calls from\n * the first one will be returned.\n * If there are no function calls in the response, undefined will be returned.\n *\n * @example\n * ```ts\n * const controlLightFunctionDeclaration: FunctionDeclaration = {\n * name: 'controlLight',\n * parameters: {\n * type: Type.OBJECT,\n * description: 'Set the brightness and color temperature of a room light.',\n * properties: {\n * brightness: {\n * type: Type.NUMBER,\n * description:\n * 'Light level from 0 to 100. Zero is off and 100 is full brightness.',\n * },\n * colorTemperature: {\n * type: Type.STRING,\n * description:\n * 'Color temperature of the light fixture which can be `daylight`, `cool` or `warm`.',\n * },\n * },\n * required: ['brightness', 'colorTemperature'],\n * };\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents: 'Dim the lights so the room feels cozy and warm.',\n * config: {\n * tools: [{functionDeclarations: [controlLightFunctionDeclaration]}],\n * toolConfig: {\n * functionCallingConfig: {\n * mode: FunctionCallingConfigMode.ANY,\n * allowedFunctionNames: ['controlLight'],\n * },\n * },\n * },\n * });\n * console.debug(JSON.stringify(response.functionCalls));\n * ```\n */\n get functionCalls(): FunctionCall[] | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning function calls from the first one.',\n );\n }\n const functionCalls = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.functionCall)\n .map((part) => part.functionCall)\n .filter(\n (functionCall): functionCall is FunctionCall =>\n functionCall !== undefined,\n );\n if (functionCalls?.length === 0) {\n return undefined;\n }\n return functionCalls;\n }\n /**\n * Returns the first executable code from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the executable code from\n * the first one will be returned.\n * If there are no executable code in the response, undefined will be\n * returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.'\n * config: {\n * tools: [{codeExecution: {}}],\n * },\n * });\n *\n * console.debug(response.executableCode);\n * ```\n */\n get executableCode(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning executable code from the first one.',\n );\n }\n const executableCode = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.executableCode)\n .map((part) => part.executableCode)\n .filter(\n (executableCode): executableCode is ExecutableCode =>\n executableCode !== undefined,\n );\n if (executableCode?.length === 0) {\n return undefined;\n }\n\n return executableCode?.[0]?.code;\n }\n /**\n * Returns the first code execution result from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the code execution result from\n * the first one will be returned.\n * If there are no code execution result in the response, undefined will be returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.'\n * config: {\n * tools: [{codeExecution: {}}],\n * },\n * });\n *\n * console.debug(response.codeExecutionResult);\n * ```\n */\n get codeExecutionResult(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning code execution result from the first one.',\n );\n }\n const codeExecutionResult = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.codeExecutionResult)\n .map((part) => part.codeExecutionResult)\n .filter(\n (codeExecutionResult): codeExecutionResult is CodeExecutionResult =>\n codeExecutionResult !== undefined,\n );\n if (codeExecutionResult?.length === 0) {\n return undefined;\n }\n return codeExecutionResult?.[0]?.output;\n }\n}\n\nexport /** Optional parameters for the embed_content method. */\ndeclare interface EmbedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Type of task for which the embedding will be used.\n */\n taskType?: string;\n /** Title for the text. Only applicable when TaskType is\n `RETRIEVAL_DOCUMENT`.\n */\n title?: string;\n /** Reduced dimension for the output embedding. If set,\n excessive values in the output embedding are truncated from the end.\n Supported by newer models since 2024 only. You cannot set this value if\n using the earlier model (`models/embedding-001`).\n */\n outputDimensionality?: number;\n /** Vertex API only. The MIME type of the input.\n */\n mimeType?: string;\n /** Vertex API only. Whether to silently truncate inputs longer than\n the max sequence length. If this option is set to false, oversized inputs\n will lead to an INVALID_ARGUMENT error, similar to other text APIs.\n */\n autoTruncate?: boolean;\n}\n\n/** Parameters for the embed_content method. */\nexport declare interface EmbedContentParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** The content to embed. Only the `parts.text` fields will be counted.\n */\n contents: ContentListUnion;\n /** Configuration that contains optional parameters.\n */\n config?: EmbedContentConfig;\n}\n\n/** Statistics of the input text associated with the result of content embedding. */\nexport declare interface ContentEmbeddingStatistics {\n /** Vertex API only. If the input text was truncated due to having\n a length longer than the allowed maximum input.\n */\n truncated?: boolean;\n /** Vertex API only. Number of tokens of the input text.\n */\n tokenCount?: number;\n}\n\n/** The embedding generated from an input content. */\nexport declare interface ContentEmbedding {\n /** A list of floats representing an embedding.\n */\n values?: number[];\n /** Vertex API only. Statistics of the input text associated with this\n embedding.\n */\n statistics?: ContentEmbeddingStatistics;\n}\n\n/** Request-level metadata for the Vertex Embed Content API. */\nexport declare interface EmbedContentMetadata {\n /** Vertex API only. The total number of billable characters included\n in the request.\n */\n billableCharacterCount?: number;\n}\n\n/** Response for the embed_content method. */\nexport class EmbedContentResponse {\n /** The embeddings for each request, in the same order as provided in\n the batch request.\n */\n embeddings?: ContentEmbedding[];\n /** Vertex API only. Metadata about the request.\n */\n metadata?: EmbedContentMetadata;\n}\n\n/** The config for generating an images. */\nexport declare interface GenerateImagesConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Cloud Storage URI used to store the generated images.\n */\n outputGcsUri?: string;\n /** Description of what to discourage in the generated images.\n */\n negativePrompt?: string;\n /** Number of images to generate.\n */\n numberOfImages?: number;\n /** Aspect ratio of the generated images.\n */\n aspectRatio?: string;\n /** Controls how much the model adheres to the text prompt. Large\n values increase output and prompt alignment, but may compromise image\n quality.\n */\n guidanceScale?: number;\n /** Random seed for image generation. This is not available when\n ``add_watermark`` is set to true.\n */\n seed?: number;\n /** Filter level for safety filtering.\n */\n safetyFilterLevel?: SafetyFilterLevel;\n /** Allows generation of people by the model.\n */\n personGeneration?: PersonGeneration;\n /** Whether to report the safety scores of each generated image and\n the positive prompt in the response.\n */\n includeSafetyAttributes?: boolean;\n /** Whether to include the Responsible AI filter reason if the image\n is filtered out of the response.\n */\n includeRaiReason?: boolean;\n /** Language of the text in the prompt.\n */\n language?: ImagePromptLanguage;\n /** MIME type of the generated image.\n */\n outputMimeType?: string;\n /** Compression quality of the generated image (for ``image/jpeg``\n only).\n */\n outputCompressionQuality?: number;\n /** Whether to add a watermark to the generated images.\n */\n addWatermark?: boolean;\n /** Whether to use the prompt rewriting logic.\n */\n enhancePrompt?: boolean;\n}\n\n/** The parameters for generating images. */\nexport declare interface GenerateImagesParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Text prompt that typically describes the images to output.\n */\n prompt: string;\n /** Configuration for generating images.\n */\n config?: GenerateImagesConfig;\n}\n\n/** An image. */\nexport declare interface Image {\n /** The Cloud Storage URI of the image. ``Image`` can contain a value\n for this field or the ``image_bytes`` field but not both.\n */\n gcsUri?: string;\n /** The image bytes data. ``Image`` can contain a value for this field\n or the ``gcs_uri`` field but not both.\n */\n imageBytes?: string;\n /** The MIME type of the image. */\n mimeType?: string;\n}\n\n/** Safety attributes of a GeneratedImage or the user-provided prompt. */\nexport declare interface SafetyAttributes {\n /** List of RAI categories.\n */\n categories?: string[];\n /** List of scores of each categories.\n */\n scores?: number[];\n /** Internal use only.\n */\n contentType?: string;\n}\n\n/** An output image. */\nexport declare interface GeneratedImage {\n /** The output image data.\n */\n image?: Image;\n /** Responsible AI filter reason if the image is filtered out of the\n response.\n */\n raiFilteredReason?: string;\n /** Safety attributes of the image. Lists of RAI categories and their\n scores of each content.\n */\n safetyAttributes?: SafetyAttributes;\n /** The rewritten prompt used for the image generation if the prompt\n enhancer is enabled.\n */\n enhancedPrompt?: string;\n}\n\n/** The output images response. */\nexport class GenerateImagesResponse {\n /** List of generated images.\n */\n generatedImages?: GeneratedImage[];\n /** Safety attributes of the positive prompt. Only populated if\n ``include_safety_attributes`` is set to True.\n */\n positivePromptSafetyAttributes?: SafetyAttributes;\n}\n\n/** Optional parameters for models.get method. */\nexport declare interface GetModelConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\nexport declare interface GetModelParameters {\n model: string;\n /** Optional parameters for the request. */\n config?: GetModelConfig;\n}\n\n/** An endpoint where you deploy models. */\nexport declare interface Endpoint {\n /** Resource name of the endpoint. */\n name?: string;\n /** ID of the model that's deployed to the endpoint. */\n deployedModelId?: string;\n}\n\n/** A tuned machine learning model. */\nexport declare interface TunedModelInfo {\n /** ID of the base model that you want to tune. */\n baseModel?: string;\n /** Date and time when the base model was created. */\n createTime?: string;\n /** Date and time when the base model was last updated. */\n updateTime?: string;\n}\n\n/** A trained machine learning model. */\nexport declare interface Model {\n /** Resource name of the model. */\n name?: string;\n /** Display name of the model. */\n displayName?: string;\n /** Description of the model. */\n description?: string;\n /** Version ID of the model. A new version is committed when a new\n model version is uploaded or trained under an existing model ID. The\n version ID is an auto-incrementing decimal number in string\n representation. */\n version?: string;\n /** List of deployed models created from this base model. Note that a\n model could have been deployed to endpoints in different locations. */\n endpoints?: Endpoint[];\n /** Labels with user-defined metadata to organize your models. */\n labels?: Record;\n /** Information about the tuned model from the base model. */\n tunedModelInfo?: TunedModelInfo;\n /** The maximum number of input tokens that the model can handle. */\n inputTokenLimit?: number;\n /** The maximum number of output tokens that the model can generate. */\n outputTokenLimit?: number;\n /** List of actions that are supported by the model. */\n supportedActions?: string[];\n}\n\n/** Generation config. */\nexport declare interface GenerationConfig {\n /** Optional. If enabled, audio timestamp will be included in the request to the model. */\n audioTimestamp?: boolean;\n /** Optional. Number of candidates to generate. */\n candidateCount?: number;\n /** Optional. Frequency penalties. */\n frequencyPenalty?: number;\n /** Optional. Logit probabilities. */\n logprobs?: number;\n /** Optional. The maximum number of output tokens to generate per message. */\n maxOutputTokens?: number;\n /** Optional. If specified, the media resolution specified will be used. */\n mediaResolution?: MediaResolution;\n /** Optional. Positive penalties. */\n presencePenalty?: number;\n /** Optional. If true, export the logprobs results in response. */\n responseLogprobs?: boolean;\n /** Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature. */\n responseMimeType?: string;\n /** Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response. */\n responseSchema?: Schema;\n /** Optional. Routing configuration. */\n routingConfig?: GenerationConfigRoutingConfig;\n /** Optional. Seed. */\n seed?: number;\n /** Optional. Stop sequences. */\n stopSequences?: string[];\n /** Optional. Controls the randomness of predictions. */\n temperature?: number;\n /** Optional. If specified, top-k sampling will be used. */\n topK?: number;\n /** Optional. If specified, nucleus sampling will be used. */\n topP?: number;\n}\n\n/** Config for the count_tokens method. */\nexport declare interface CountTokensConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Instructions for the model to steer it toward better performance.\n */\n systemInstruction?: ContentUnion;\n /** Code that enables the system to interact with external systems to\n perform an action outside of the knowledge and scope of the model.\n */\n tools?: Tool[];\n /** Configuration that the model uses to generate the response. Not\n supported by the Gemini Developer API.\n */\n generationConfig?: GenerationConfig;\n}\n\n/** Parameters for counting tokens. */\nexport declare interface CountTokensParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Input content. */\n contents: ContentListUnion;\n /** Configuration for counting tokens. */\n config?: CountTokensConfig;\n}\n\n/** Response for counting tokens. */\nexport class CountTokensResponse {\n /** Total number of tokens. */\n totalTokens?: number;\n /** Number of tokens in the cached part of the prompt (the cached content). */\n cachedContentTokenCount?: number;\n}\n\n/** Optional parameters for computing tokens. */\nexport declare interface ComputeTokensConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for computing tokens. */\nexport declare interface ComputeTokensParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Input content. */\n contents: ContentListUnion;\n /** Optional parameters for the request.\n */\n config?: ComputeTokensConfig;\n}\n\n/** Tokens info with a list of tokens and the corresponding list of token ids. */\nexport declare interface TokensInfo {\n /** Optional. Optional fields for the role from the corresponding Content. */\n role?: string;\n /** A list of token ids from the input. */\n tokenIds?: string[];\n /** A list of tokens from the input. */\n tokens?: string[];\n}\n\n/** Response for computing tokens. */\nexport class ComputeTokensResponse {\n /** Lists of tokens info from the input. A ComputeTokensRequest could have multiple instances with a prompt in each instance. We also need to return lists of tokens info for the request with multiple instances. */\n tokensInfo?: TokensInfo[];\n}\n\n/** Configuration for generating videos. */\nexport declare interface GenerateVideosConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Number of output videos. */\n numberOfVideos?: number;\n /** The gcs bucket where to save the generated videos. */\n outputGcsUri?: string;\n /** Frames per second for video generation. */\n fps?: number;\n /** Duration of the clip for video generation in seconds. */\n durationSeconds?: number;\n /** The RNG seed. If RNG seed is exactly same for each request with unchanged inputs, the prediction results will be consistent. Otherwise, a random RNG seed will be used each time to produce a different result. */\n seed?: number;\n /** The aspect ratio for the generated video. 16:9 (landscape) and 9:16 (portrait) are supported. */\n aspectRatio?: string;\n /** The resolution for the generated video. 1280x720, 1920x1080 are supported. */\n resolution?: string;\n /** Whether allow to generate person videos, and restrict to specific ages. Supported values are: dont_allow, allow_adult. */\n personGeneration?: string;\n /** The pubsub topic where to publish the video generation progress. */\n pubsubTopic?: string;\n /** Optional field in addition to the text content. Negative prompts can be explicitly stated here to help generate the video. */\n negativePrompt?: string;\n /** Whether to use the prompt rewriting logic. */\n enhancePrompt?: boolean;\n}\n\n/** Class that represents the parameters for generating an image. */\nexport declare interface GenerateVideosParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** The text prompt for generating the videos. Optional for image to video use cases. */\n prompt?: string;\n /** The input image for generating the videos.\n Optional if prompt is provided. */\n image?: Image;\n /** Configuration for generating videos. */\n config?: GenerateVideosConfig;\n}\n\n/** A generated video. */\nexport declare interface Video {\n /** Path to another storage. */\n uri?: string;\n /** Video bytes. */\n videoBytes?: string;\n /** Video encoding, for example \"video/mp4\". */\n mimeType?: string;\n}\n\n/** A generated video. */\nexport declare interface GeneratedVideo {\n /** The output video */\n video?: Video;\n}\n\n/** Response with generated videos. */\nexport class GenerateVideosResponse {\n /** List of the generated videos */\n generatedVideos?: GeneratedVideo[];\n /** Returns if any videos were filtered due to RAI policies. */\n raiMediaFilteredCount?: number;\n /** Returns rai failure reasons if any. */\n raiMediaFilteredReasons?: string[];\n}\n\n/** A video generation operation. */\nexport declare interface GenerateVideosOperation {\n /** The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. */\n name?: string;\n /** Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. */\n metadata?: Record;\n /** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */\n done?: boolean;\n /** The error result of the operation in case of failure or cancellation. */\n error?: Record;\n /** The generated videos. */\n response?: GenerateVideosResponse;\n}\n\n/** Optional configuration for cached content creation. */\nexport declare interface CreateCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: \"3.5s\". */\n ttl?: string;\n /** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */\n expireTime?: string;\n /** The user-generated meaningful display name of the cached content.\n */\n displayName?: string;\n /** The content to cache.\n */\n contents?: ContentListUnion;\n /** Developer set system instruction.\n */\n systemInstruction?: ContentUnion;\n /** A list of `Tools` the model may use to generate the next response.\n */\n tools?: Tool[];\n /** Configuration for the tools to use. This config is shared for all tools.\n */\n toolConfig?: ToolConfig;\n}\n\n/** Parameters for caches.create method. */\nexport declare interface CreateCachedContentParameters {\n /** ID of the model to use. Example: gemini-1.5-flash */\n model: string;\n /** Configuration that contains optional parameters.\n */\n config?: CreateCachedContentConfig;\n}\n\n/** Metadata on the usage of the cached content. */\nexport declare interface CachedContentUsageMetadata {\n /** Duration of audio in seconds. */\n audioDurationSeconds?: number;\n /** Number of images. */\n imageCount?: number;\n /** Number of text characters. */\n textCount?: number;\n /** Total number of tokens that the cached content consumes. */\n totalTokenCount?: number;\n /** Duration of video in seconds. */\n videoDurationSeconds?: number;\n}\n\n/** A resource used in LLM queries for users to explicitly specify what to cache. */\nexport declare interface CachedContent {\n /** The server-generated resource name of the cached content. */\n name?: string;\n /** The user-generated meaningful display name of the cached content. */\n displayName?: string;\n /** The name of the publisher model to use for cached content. */\n model?: string;\n /** Creation time of the cache entry. */\n createTime?: string;\n /** When the cache entry was last updated in UTC time. */\n updateTime?: string;\n /** Expiration time of the cached content. */\n expireTime?: string;\n /** Metadata on the usage of the cached content. */\n usageMetadata?: CachedContentUsageMetadata;\n}\n\n/** Optional parameters for caches.get method. */\nexport declare interface GetCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for caches.get method. */\nexport declare interface GetCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Optional parameters for the request.\n */\n config?: GetCachedContentConfig;\n}\n\n/** Optional parameters for caches.delete method. */\nexport declare interface DeleteCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for caches.delete method. */\nexport declare interface DeleteCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Optional parameters for the request.\n */\n config?: DeleteCachedContentConfig;\n}\n\n/** Empty response for caches.delete method. */\nexport class DeleteCachedContentResponse {}\n\n/** Optional parameters for caches.update method. */\nexport declare interface UpdateCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: \"3.5s\". */\n ttl?: string;\n /** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */\n expireTime?: string;\n}\n\nexport declare interface UpdateCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Configuration that contains optional parameters.\n */\n config?: UpdateCachedContentConfig;\n}\n\n/** Config for caches.list method. */\nexport declare interface ListCachedContentsConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n pageSize?: number;\n pageToken?: string;\n}\n\n/** Parameters for caches.list method. */\nexport declare interface ListCachedContentsParameters {\n /** Configuration that contains optional parameters.\n */\n config?: ListCachedContentsConfig;\n}\n\nexport class ListCachedContentsResponse {\n nextPageToken?: string;\n /** List of cached contents.\n */\n cachedContents?: CachedContent[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface ListFilesConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n pageSize?: number;\n pageToken?: string;\n}\n\n/** Generates the parameters for the list method. */\nexport declare interface ListFilesParameters {\n /** Used to override the default configuration. */\n config?: ListFilesConfig;\n}\n\n/** Status of a File that uses a common error model. */\nexport declare interface FileStatus {\n /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */\n details?: Record[];\n /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */\n message?: string;\n /** The status code. 0 for OK, 1 for CANCELLED */\n code?: number;\n}\n\n/** A file uploaded to the API. */\nexport declare interface File {\n /** The `File` resource name. The ID (name excluding the \"files/\" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be generated. Example: `files/123-456` */\n name?: string;\n /** Optional. The human-readable display name for the `File`. The display name must be no more than 512 characters in length, including spaces. Example: 'Welcome Image' */\n displayName?: string;\n /** Output only. MIME type of the file. */\n mimeType?: string;\n /** Output only. Size of the file in bytes. */\n sizeBytes?: string;\n /** Output only. The timestamp of when the `File` was created. */\n createTime?: string;\n /** Output only. The timestamp of when the `File` will be deleted. Only set if the `File` is scheduled to expire. */\n expirationTime?: string;\n /** Output only. The timestamp of when the `File` was last updated. */\n updateTime?: string;\n /** Output only. SHA-256 hash of the uploaded bytes. The hash value is encoded in base64 format. */\n sha256Hash?: string;\n /** Output only. The URI of the `File`. */\n uri?: string;\n /** Output only. The URI of the `File`, only set for downloadable (generated) files. */\n downloadUri?: string;\n /** Output only. Processing state of the File. */\n state?: FileState;\n /** Output only. The source of the `File`. */\n source?: FileSource;\n /** Output only. Metadata for a video. */\n videoMetadata?: Record;\n /** Output only. Error status if File processing failed. */\n error?: FileStatus;\n}\n\n/** Response for the list files method. */\nexport class ListFilesResponse {\n /** A token to retrieve next page of results. */\n nextPageToken?: string;\n /** The list of files. */\n files?: File[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface CreateFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the private _create method. */\nexport declare interface CreateFileParameters {\n /** The file to be uploaded.\n mime_type: (Required) The MIME type of the file. Must be provided.\n name: (Optional) The name of the file in the destination (e.g.\n 'files/sample-image').\n display_name: (Optional) The display name of the file.\n */\n file: File;\n /** Used to override the default configuration. */\n config?: CreateFileConfig;\n}\n\n/** A wrapper class for the http response. */\nexport class HttpResponse {\n /** Used to retain the processed HTTP headers in the response. */\n headers?: Record;\n /**\n * The original http response.\n */\n responseInternal: Response;\n\n constructor(response: Response) {\n // Process the headers.\n const headers: Record = {};\n for (const pair of response.headers.entries()) {\n headers[pair[0]] = pair[1];\n }\n this.headers = headers;\n\n // Keep the original response.\n this.responseInternal = response;\n }\n\n json(): Promise {\n return this.responseInternal.json();\n }\n}\n\n/** Callbacks for the live API. */\nexport interface LiveCallbacks {\n /**\n * Called when the websocket connection is established.\n */\n onopen?: (() => void) | null;\n /**\n * Called when a message is received from the server.\n */\n onmessage: (e: LiveServerMessage) => void;\n /**\n * Called when an error occurs.\n */\n onerror?: ((e: ErrorEvent) => void) | null;\n /**\n * Called when the websocket connection is closed.\n */\n onclose?: ((e: CloseEvent) => void) | null;\n}\n\n/** Parameters for the upload file method. */\nexport interface UploadFileParameters {\n /** The string path to the file to be uploaded or a Blob object. */\n file: string | globalThis.Blob;\n /** Configuration that contains optional parameters. */\n config?: UploadFileConfig;\n}\n/** Response for the create file method. */\nexport class CreateFileResponse {\n /** Used to retain the full HTTP response. */\n sdkHttpResponse?: HttpResponse;\n}\n\n/** Used to override the default configuration. */\nexport declare interface GetFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the get method. */\nexport declare interface GetFileParameters {\n /** The name identifier for the file to retrieve. */\n name: string;\n /** Used to override the default configuration. */\n config?: GetFileConfig;\n}\n\n/** Used to override the default configuration. */\nexport declare interface DeleteFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the get method. */\nexport declare interface DeleteFileParameters {\n /** The name identifier for the file to be deleted. */\n name: string;\n /** Used to override the default configuration. */\n config?: DeleteFileConfig;\n}\n\n/** Response for the delete file method. */\nexport class DeleteFileResponse {}\n\nexport declare interface GetOperationConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for the GET method. */\nexport declare interface GetOperationParameters {\n /** The server-assigned name for the operation. */\n operationName: string;\n /** Used to override the default configuration. */\n config?: GetOperationConfig;\n}\n\nexport declare interface FetchPredictOperationConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for the fetchPredictOperation method. */\nexport declare interface FetchPredictOperationParameters {\n /** The server-assigned name for the operation. */\n operationName: string;\n resourceName: string;\n /** Used to override the default configuration. */\n config?: FetchPredictOperationConfig;\n}\n\nexport declare interface TestTableItem {\n /** The name of the test. This is used to derive the replay id. */\n name?: string;\n /** The parameters to the test. Use pydantic models. */\n parameters?: Record;\n /** Expects an exception for MLDev matching the string. */\n exceptionIfMldev?: string;\n /** Expects an exception for Vertex matching the string. */\n exceptionIfVertex?: string;\n /** Use if you don't want to use the default replay id which is derived from the test name. */\n overrideReplayId?: string;\n /** True if the parameters contain an unsupported union type. This test will be skipped for languages that do not support the union type. */\n hasUnion?: boolean;\n /** When set to a reason string, this test will be skipped in the API mode. Use this flag for tests that can not be reproduced with the real API. E.g. a test that deletes a resource. */\n skipInApiMode?: string;\n /** Keys to ignore when comparing the request and response. This is useful for tests that are not deterministic. */\n ignoreKeys?: string[];\n}\n\nexport declare interface TestTableFile {\n comment?: string;\n testMethod?: string;\n parameterNames?: string[];\n testTable?: TestTableItem[];\n}\n\n/** Represents a single request in a replay. */\nexport declare interface ReplayRequest {\n method?: string;\n url?: string;\n headers?: Record;\n bodySegments?: Record[];\n}\n\n/** Represents a single response in a replay. */\nexport class ReplayResponse {\n statusCode?: number;\n headers?: Record;\n bodySegments?: Record[];\n sdkResponseSegments?: Record[];\n}\n\n/** Represents a single interaction, request and response in a replay. */\nexport declare interface ReplayInteraction {\n request?: ReplayRequest;\n response?: ReplayResponse;\n}\n\n/** Represents a recorded session. */\nexport declare interface ReplayFile {\n replayId?: string;\n interactions?: ReplayInteraction[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface UploadFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The name of the file in the destination (e.g., 'files/sample-image'. If not provided one will be generated. */\n name?: string;\n /** mime_type: The MIME type of the file. If not provided, it will be inferred from the file extension. */\n mimeType?: string;\n /** Optional display name of the file. */\n displayName?: string;\n}\n\n/** Used to override the default configuration. */\nexport declare interface DownloadFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Configuration for upscaling an image.\n\n For more information on this configuration, refer to\n the `Imagen API reference documentation\n `_.\n */\nexport declare interface UpscaleImageConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Whether to include a reason for filtered-out images in the\n response. */\n includeRaiReason?: boolean;\n /** The image format that the output should be saved as. */\n outputMimeType?: string;\n /** The level of compression if the ``output_mime_type`` is\n ``image/jpeg``. */\n outputCompressionQuality?: number;\n}\n\n/** User-facing config UpscaleImageParameters. */\nexport declare interface UpscaleImageParameters {\n /** The model to use. */\n model: string;\n /** The input image to upscale. */\n image: Image;\n /** The factor to upscale the image (x2 or x4). */\n upscaleFactor: string;\n /** Configuration for upscaling. */\n config?: UpscaleImageConfig;\n}\n\n/** A raw reference image.\n\n A raw reference image represents the base image to edit, provided by the user.\n It can optionally be provided in addition to a mask reference image or\n a style reference image.\n */\nexport declare interface RawReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n}\n\n/** Configuration for a Mask reference image. */\nexport declare interface MaskReferenceConfig {\n /** Prompts the model to generate a mask instead of you needing to\n provide one (unless MASK_MODE_USER_PROVIDED is used). */\n maskMode?: MaskReferenceMode;\n /** A list of up to 5 class ids to use for semantic segmentation.\n Automatically creates an image mask based on specific objects. */\n segmentationClasses?: number[];\n /** Dilation percentage of the mask provided.\n Float between 0 and 1. */\n maskDilation?: number;\n}\n\n/** A mask reference image.\n\n This encapsulates either a mask image provided by the user and configs for\n the user provided mask, or only config parameters for the model to generate\n a mask.\n\n A mask image is an image whose non-zero values indicate where to edit the base\n image. If the user provides a mask image, the mask must be in the same\n dimensions as the raw image.\n */\nexport declare interface MaskReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the mask reference image. */\n config?: MaskReferenceConfig;\n}\n\n/** Configuration for a Control reference image. */\nexport declare interface ControlReferenceConfig {\n /** The type of control reference image to use. */\n controlType?: ControlReferenceType;\n /** Defaults to False. When set to True, the control image will be\n computed by the model based on the control type. When set to False,\n the control image must be provided by the user. */\n enableControlImageComputation?: boolean;\n}\n\n/** A control reference image.\n\n The image of the control reference image is either a control image provided\n by the user, or a regular image which the backend will use to generate a\n control image of. In the case of the latter, the\n enable_control_image_computation field in the config should be set to True.\n\n A control image is an image that represents a sketch image of areas for the\n model to fill in based on the prompt.\n */\nexport declare interface ControlReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the control reference image. */\n config?: ControlReferenceConfig;\n}\n\n/** Configuration for a Style reference image. */\nexport declare interface StyleReferenceConfig {\n /** A text description of the style to use for the generated image. */\n styleDescription?: string;\n}\n\n/** A style reference image.\n\n This encapsulates a style reference image provided by the user, and\n additionally optional config parameters for the style reference image.\n\n A raw reference image can also be provided as a destination for the style to\n be applied to.\n */\nexport declare interface StyleReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the style reference image. */\n config?: StyleReferenceConfig;\n}\n\n/** Configuration for a Subject reference image. */\nexport declare interface SubjectReferenceConfig {\n /** The subject type of a subject reference image. */\n subjectType?: SubjectReferenceType;\n /** Subject description for the image. */\n subjectDescription?: string;\n}\n\n/** A subject reference image.\n\n This encapsulates a subject reference image provided by the user, and\n additionally optional config parameters for the subject reference image.\n\n A raw reference image can also be provided as a destination for the subject to\n be applied to.\n */\nexport declare interface SubjectReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the subject reference image. */\n config?: SubjectReferenceConfig;\n}\n\n/** Sent in response to a `LiveGenerateContentSetup` message from the client. */\nexport declare interface LiveServerSetupComplete {}\n\n/** Incremental server update generated by the model in response to client messages.\n\n Content is generated as quickly as possible, and not in real time. Clients\n may choose to buffer and play it out in real time.\n */\nexport declare interface LiveServerContent {\n /** The content that the model has generated as part of the current conversation with the user. */\n modelTurn?: Content;\n /** If true, indicates that the model is done generating. Generation will only start in response to additional client messages. Can be set alongside `content`, indicating that the `content` is the last in the turn. */\n turnComplete?: boolean;\n /** If true, indicates that a client message has interrupted current model generation. If the client is playing out the content in realtime, this is a good signal to stop and empty the current queue. */\n interrupted?: boolean;\n /** If true, indicates that the model is done generating. When model is\n interrupted while generating there will be no generation_complete message\n in interrupted turn, it will go through interrupted > turn_complete.\n When model assumes realtime playback there will be delay between\n generation_complete and turn_complete that is caused by model\n waiting for playback to finish. If true, indicates that the model\n has finished generating all content. This is a signal to the client\n that it can stop sending messages. */\n generationComplete?: boolean;\n}\n\n/** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */\nexport declare interface LiveServerToolCall {\n /** The function call to be executed. */\n functionCalls?: FunctionCall[];\n}\n\n/** Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled.\n\n If there were side-effects to those tool calls, clients may attempt to undo\n the tool calls. This message occurs only in cases where the clients interrupt\n server turns.\n */\nexport declare interface LiveServerToolCallCancellation {\n /** The ids of the tool calls to be cancelled. */\n ids?: string[];\n}\n\n/** Usage metadata about response(s). */\nexport declare interface UsageMetadata {\n /** Number of tokens in the prompt. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */\n promptTokenCount?: number;\n /** Number of tokens in the cached part of the prompt (the cached content). */\n cachedContentTokenCount?: number;\n /** Total number of tokens across all the generated response candidates. */\n responseTokenCount?: number;\n /** Number of tokens present in tool-use prompt(s). */\n toolUsePromptTokenCount?: number;\n /** Number of tokens of thoughts for thinking models. */\n thoughtsTokenCount?: number;\n /** Total token count for prompt, response candidates, and tool-use prompts(if present). */\n totalTokenCount?: number;\n /** List of modalities that were processed in the request input. */\n promptTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were processed in the cache input. */\n cacheTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were returned in the response. */\n responseTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were processed in the tool-use prompt. */\n toolUsePromptTokensDetails?: ModalityTokenCount[];\n /** Traffic type. This shows whether a request consumes Pay-As-You-Go\n or Provisioned Throughput quota. */\n trafficType?: TrafficType;\n}\n\n/** Server will not be able to service client soon. */\nexport declare interface LiveServerGoAway {\n /** The remaining time before the connection will be terminated as ABORTED. The minimal time returned here is specified differently together with the rate limits for a given model. */\n timeLeft?: string;\n}\n\n/** Update of the session resumption state.\n\n Only sent if `session_resumption` was set in the connection config.\n */\nexport declare interface LiveServerSessionResumptionUpdate {\n /** New handle that represents state that can be resumed. Empty if `resumable`=false. */\n newHandle?: string;\n /** True if session can be resumed at this point. It might be not possible to resume session at some points. In that case we send update empty new_handle and resumable=false. Example of such case could be model executing function calls or just generating. Resuming session (using previous session token) in such state will result in some data loss. */\n resumable?: boolean;\n /** Index of last message sent by client that is included in state represented by this SessionResumptionToken. Only sent when `SessionResumptionConfig.transparent` is set.\n\nPresence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `SessionResmumptionTokenUpdate`. This field will enable them to limit buffering (avoid keeping all requests in RAM).\n\nNote: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames arelikely not needed. */\n lastConsumedClientMessageIndex?: string;\n}\n\n/** Response message for API call. */\nexport declare interface LiveServerMessage {\n /** Sent in response to a `LiveClientSetup` message from the client. */\n setupComplete?: LiveServerSetupComplete;\n /** Content generated by the model in response to client messages. */\n serverContent?: LiveServerContent;\n /** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */\n toolCall?: LiveServerToolCall;\n /** Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled. */\n toolCallCancellation?: LiveServerToolCallCancellation;\n /** Usage metadata about model response(s). */\n usageMetadata?: UsageMetadata;\n /** Server will disconnect soon. */\n goAway?: LiveServerGoAway;\n /** Update of the session resumption state. */\n sessionResumptionUpdate?: LiveServerSessionResumptionUpdate;\n}\n\n/** Configures automatic detection of activity. */\nexport declare interface AutomaticActivityDetection {\n /** If enabled, detected voice and text input count as activity. If disabled, the client must send activity signals. */\n disabled?: boolean;\n /** Determines how likely speech is to be detected. */\n startOfSpeechSensitivity?: StartSensitivity;\n /** Determines how likely detected speech is ended. */\n endOfSpeechSensitivity?: EndSensitivity;\n /** The required duration of detected speech before start-of-speech is committed. The lower this value the more sensitive the start-of-speech detection is and the shorter speech can be recognized. However, this also increases the probability of false positives. */\n prefixPaddingMs?: number;\n /** The required duration of detected non-speech (e.g. silence) before end-of-speech is committed. The larger this value, the longer speech gaps can be without interrupting the user's activity but this will increase the model's latency. */\n silenceDurationMs?: number;\n}\n\n/** Marks the end of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface RealtimeInputConfig {\n /** If not set, automatic activity detection is enabled by default. If automatic voice detection is disabled, the client must send activity signals. */\n automaticActivityDetection?: AutomaticActivityDetection;\n /** Defines what effect activity has. */\n activityHandling?: ActivityHandling;\n /** Defines which input is included in the user's turn. */\n turnCoverage?: TurnCoverage;\n}\n\n/** Configuration of session resumption mechanism.\n\n Included in `LiveConnectConfig.session_resumption`. If included server\n will send `LiveServerSessionResumptionUpdate` messages.\n */\nexport declare interface SessionResumptionConfig {\n /** Session resumption handle of previous session (session to restore).\n\nIf not present new session will be started. */\n handle?: string;\n /** If set the server will send `last_consumed_client_message_index` in the `session_resumption_update` messages to allow for transparent reconnections. */\n transparent?: boolean;\n}\n\n/** Context window will be truncated by keeping only suffix of it.\n\n Context window will always be cut at start of USER role turn. System\n instructions and `BidiGenerateContentSetup.prefix_turns` will not be\n subject to the sliding window mechanism, they will always stay at the\n beginning of context window.\n */\nexport declare interface SlidingWindow {\n /** Session reduction target -- how many tokens we should keep. Window shortening operation has some latency costs, so we should avoid running it on every turn. Should be < trigger_tokens. If not set, trigger_tokens/2 is assumed. */\n targetTokens?: string;\n}\n\n/** Enables context window compression -- mechanism managing model context window so it does not exceed given length. */\nexport declare interface ContextWindowCompressionConfig {\n /** Number of tokens (before running turn) that triggers context window compression mechanism. */\n triggerTokens?: string;\n /** Sliding window compression mechanism. */\n slidingWindow?: SlidingWindow;\n}\n\n/** The audio transcription configuration in Setup. */\nexport declare interface AudioTranscriptionConfig {}\n\n/** Message contains configuration that will apply for the duration of the streaming session. */\nexport declare interface LiveClientSetup {\n /** \n The fully qualified name of the publisher model or tuned model endpoint to\n use.\n */\n model?: string;\n /** The generation configuration for the session.\n Note: only a subset of fields are supported.\n */\n generationConfig?: GenerationConfig;\n /** The user provided system instructions for the model.\n Note: only text should be used in parts and content in each part will be\n in a separate paragraph. */\n systemInstruction?: ContentUnion;\n /** A list of `Tools` the model may use to generate the next response.\n\n A `Tool` is a piece of code that enables the system to interact with\n external systems to perform an action, or set of actions, outside of\n knowledge and scope of the model. */\n tools?: ToolListUnion;\n /** Configures the realtime input behavior in BidiGenerateContent. */\n realtimeInputConfig?: RealtimeInputConfig;\n /** Configures session resumption mechanism.\n\n If included server will send SessionResumptionUpdate messages. */\n sessionResumption?: SessionResumptionConfig;\n /** Configures context window compression mechanism.\n\n If included, server will compress context window to fit into given length. */\n contextWindowCompression?: ContextWindowCompressionConfig;\n}\n\n/** Incremental update of the current conversation delivered from the client.\n\n All the content here will unconditionally be appended to the conversation\n history and used as part of the prompt to the model to generate content.\n\n A message here will interrupt any current model generation.\n */\nexport declare interface LiveClientContent {\n /** The content appended to the current conversation with the model.\n\n For single-turn queries, this is a single instance. For multi-turn\n queries, this is a repeated field that contains conversation history and\n latest request.\n */\n turns?: Content[];\n /** If true, indicates that the server content generation should start with\n the currently accumulated prompt. Otherwise, the server will await\n additional messages before starting generation. */\n turnComplete?: boolean;\n}\n\n/** Marks the start of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface ActivityStart {}\n\n/** Marks the end of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface ActivityEnd {}\n\n/** User input that is sent in real time.\n\n This is different from `LiveClientContent` in a few ways:\n\n - Can be sent continuously without interruption to model generation.\n - If there is a need to mix data interleaved across the\n `LiveClientContent` and the `LiveClientRealtimeInput`, server attempts to\n optimize for best response, but there are no guarantees.\n - End of turn is not explicitly specified, but is rather derived from user\n activity (for example, end of speech).\n - Even before the end of turn, the data is processed incrementally\n to optimize for a fast start of the response from the model.\n - Is always assumed to be the user's input (cannot be used to populate\n conversation history).\n */\nexport declare interface LiveClientRealtimeInput {\n /** Inlined bytes data for media input. */\n mediaChunks?: Blob[];\n /** Marks the start of user activity. */\n activityStart?: ActivityStart;\n /** Marks the end of user activity. */\n activityEnd?: ActivityEnd;\n}\n\n/** Client generated response to a `ToolCall` received from the server.\n\n Individual `FunctionResponse` objects are matched to the respective\n `FunctionCall` objects by the `id` field.\n\n Note that in the unary and server-streaming GenerateContent APIs function\n calling happens by exchanging the `Content` parts, while in the bidi\n GenerateContent APIs function calling happens over this dedicated set of\n messages.\n */\nexport class LiveClientToolResponse {\n /** The response to the function calls. */\n functionResponses?: FunctionResponse[];\n}\n\n/** Messages sent by the client in the API call. */\nexport declare interface LiveClientMessage {\n /** Message to be sent by the system when connecting to the API. SDK users should not send this message. */\n setup?: LiveClientSetup;\n /** Incremental update of the current conversation delivered from the client. */\n clientContent?: LiveClientContent;\n /** User input that is sent in real time. */\n realtimeInput?: LiveClientRealtimeInput;\n /** Response to a `ToolCallMessage` received from the server. */\n toolResponse?: LiveClientToolResponse;\n}\n\n/** Session config for the API connection. */\nexport declare interface LiveConnectConfig {\n /** The generation configuration for the session. */\n generationConfig?: GenerationConfig;\n /** The requested modalities of the response. Represents the set of\n modalities that the model can return. Defaults to AUDIO if not specified.\n */\n responseModalities?: Modality[];\n /** The speech generation configuration.\n */\n speechConfig?: SpeechConfig;\n /** The user provided system instructions for the model.\n Note: only text should be used in parts and content in each part will be\n in a separate paragraph. */\n systemInstruction?: ContentUnion;\n /** A list of `Tools` the model may use to generate the next response.\n\n A `Tool` is a piece of code that enables the system to interact with\n external systems to perform an action, or set of actions, outside of\n knowledge and scope of the model. */\n tools?: ToolListUnion;\n /** Configures session resumption mechanism.\n\nIf included the server will send SessionResumptionUpdate messages. */\n sessionResumption?: SessionResumptionConfig;\n /** Configures the realtime input behavior in BidiGenerateContent. */\n realtimeInputConfig?: RealtimeInputConfig;\n /** Configures context window compression mechanism.\n\n If included, server will compress context window to fit into given length. */\n contextWindowCompression?: ContextWindowCompressionConfig;\n}\n\n/** Parameters for connecting to the live API. */\nexport declare interface LiveConnectParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** callbacks */\n callbacks: LiveCallbacks;\n /** Optional configuration parameters for the request.\n */\n config?: LiveConnectConfig;\n}\n\n/** Parameters for initializing a new chat session.\n\n These parameters are used when creating a chat session with the\n `chats.create()` method.\n */\nexport declare interface CreateChatParameters {\n /** The name of the model to use for the chat session.\n\n For example: 'gemini-2.0-flash', 'gemini-1.5-pro', etc. See gemini API\n docs to find the available models.\n */\n model: string;\n /** Config for the entire chat session.\n\n This config applies to all requests within the session\n unless overridden by a per-request `config` in `SendMessageParameters`.\n */\n config?: GenerateContentConfig;\n /** The initial conversation history for the chat session.\n\n This allows you to start the chat with a pre-existing history. The history\n must be a list of `Content` alternating between 'user' and 'model' roles.\n It should start with a 'user' message.\n */\n history?: Content[];\n}\n\n/** Parameters for sending a message within a chat session.\n\n These parameters are used with the `chat.sendMessage()` method.\n */\nexport declare interface SendMessageParameters {\n /** The message to send to the model.\n\n The SDK will combine all parts into a single 'user' content to send to\n the model.\n */\n message: PartListUnion;\n /** Config for this specific request.\n\n Please note that the per-request config does not change the chat level\n config, nor inherit from it. If you intend to use some values from the\n chat's default config, you must explicitly copy them into this per-request\n config.\n */\n config?: GenerateContentConfig;\n}\n\n/** Parameters for sending client content to the live API. */\nexport declare interface LiveSendClientContentParameters {\n /** Client content to send to the session. */\n turns?: ContentListUnion;\n /** If true, indicates that the server content generation should start with\n the currently accumulated prompt. Otherwise, the server will await\n additional messages before starting generation. */\n turnComplete?: boolean;\n}\n\n/** Parameters for sending realtime input to the live API. */\nexport declare interface LiveSendRealtimeInputParameters {\n /** Realtime input to send to the session. */\n media: Blob;\n /** Marks the start of user activity. */\n activityStart?: ActivityStart;\n /** Marks the end of user activity. */\n activityEnd?: ActivityEnd;\n}\n\n/** Parameters for sending tool responses to the live API. */\nexport class LiveSendToolResponseParameters {\n /** Tool responses to send to the session. */\n functionResponses: FunctionResponse[] | FunctionResponse = [];\n}\n\n/** Parameters for the get method of the operations module. */\nexport declare interface OperationGetParameters {\n /** The operation to be retrieved. */\n operation: GenerateVideosOperation;\n /** Used to override the default configuration. */\n config?: GetOperationConfig;\n}\n\nexport type PartUnion = Part | string;\n\nexport type PartListUnion = PartUnion[] | PartUnion;\n\nexport type ContentUnion = Content | PartUnion[] | PartUnion;\n\nexport type ContentListUnion = Content | Content[] | PartUnion | PartUnion[];\n\nexport type SchemaUnion = Schema;\n\nexport type SpeechConfigUnion = SpeechConfig | string;\n\nexport type ToolListUnion = Tool[];\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_caches_converters';\nimport {PagedItem, Pager} from './pagers';\nimport * as types from './types';\n\nexport class Caches extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Lists cached content configurations.\n *\n * @param params - The parameters for the list request.\n * @return The paginated results of the list of cached contents.\n *\n * @example\n * ```ts\n * const cachedContents = await ai.caches.list({config: {'pageSize': 2}});\n * for (const cachedContent of cachedContents) {\n * console.log(cachedContent);\n * }\n * ```\n */\n list = async (\n params: types.ListCachedContentsParameters = {},\n ): Promise> => {\n return new Pager(\n PagedItem.PAGED_ITEM_CACHED_CONTENTS,\n (x: types.ListCachedContentsParameters) => this.listInternal(x),\n await this.listInternal(params),\n params,\n );\n };\n\n /**\n * Creates a cached contents resource.\n *\n * @remarks\n * Context caching is only supported for specific models. See [Gemini\n * Developer API reference](https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac)\n * and [Vertex AI reference](https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models)\n * for more information.\n *\n * @param params - The parameters for the create request.\n * @return The created cached content.\n *\n * @example\n * ```ts\n * const contents = ...; // Initialize the content to cache.\n * const response = await ai.caches.create({\n * model: 'gemini-1.5-flash',\n * config: {\n * 'contents': contents,\n * 'displayName': 'test cache',\n * 'systemInstruction': 'What is the sum of the two pdfs?',\n * 'ttl': '86400s',\n * }\n * });\n * ```\n */\n async create(\n params: types.CreateCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.createCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.createCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n /**\n * Gets cached content configurations.\n *\n * @param params - The parameters for the get request.\n * @return The cached content.\n *\n * @example\n * ```ts\n * await ai.caches.get({name: 'gemini-1.5-flash'});\n * ```\n */\n async get(\n params: types.GetCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.getCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n /**\n * Deletes cached content.\n *\n * @param params - The parameters for the delete request.\n * @return The empty response returned by the API.\n *\n * @example\n * ```ts\n * await ai.caches.delete({name: 'gemini-1.5-flash'});\n * ```\n */\n async delete(\n params: types.DeleteCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.deleteCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteCachedContentResponseFromVertex();\n const typedResp = new types.DeleteCachedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.deleteCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteCachedContentResponseFromMldev();\n const typedResp = new types.DeleteCachedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Updates cached content configurations.\n *\n * @param params - The parameters for the update request.\n * @return The updated cached content.\n *\n * @example\n * ```ts\n * const response = await ai.caches.update({\n * name: 'gemini-1.5-flash',\n * config: {'ttl': '7600s'}\n * });\n * ```\n */\n async update(\n params: types.UpdateCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.updateCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'PATCH',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.updateCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'PATCH',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n private async listInternal(\n params: types.ListCachedContentsParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.listCachedContentsParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listCachedContentsResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListCachedContentsResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.listCachedContentsParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listCachedContentsResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListCachedContentsResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ApiClient} from './_api_client';\nimport * as t from './_transformers';\nimport {Models} from './models';\nimport * as types from './types';\n\n/**\n * Returns true if the response is valid, false otherwise.\n */\nfunction isValidResponse(response: types.GenerateContentResponse): boolean {\n if (response.candidates == undefined || response.candidates.length === 0) {\n return false;\n }\n const content = response.candidates[0]?.content;\n if (content === undefined) {\n return false;\n }\n return isValidContent(content);\n}\n\nfunction isValidContent(content: types.Content): boolean {\n if (content.parts === undefined || content.parts.length === 0) {\n return false;\n }\n for (const part of content.parts) {\n if (part === undefined || Object.keys(part).length === 0) {\n return false;\n }\n if (part.text !== undefined && part.text === '') {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Validates the history contains the correct roles.\n *\n * @remarks\n * Expects the history to start with a user turn and then alternate between\n * user and model turns.\n *\n * @throws Error if the history does not start with a user turn.\n * @throws Error if the history contains an invalid role.\n */\nfunction validateHistory(history: types.Content[]) {\n // Empty history is valid.\n if (history.length === 0) {\n return;\n }\n if (history[0].role !== 'user') {\n throw new Error('History must start with a user turn.');\n }\n for (const content of history) {\n if (content.role !== 'user' && content.role !== 'model') {\n throw new Error(`Role must be user or model, but got ${content.role}.`);\n }\n }\n}\n\n/**\n * Extracts the curated (valid) history from a comprehensive history.\n *\n * @remarks\n * The model may sometimes generate invalid or empty contents(e.g., due to safty\n * filters or recitation). Extracting valid turns from the history\n * ensures that subsequent requests could be accpeted by the model.\n */\nfunction extractCuratedHistory(\n comprehensiveHistory: types.Content[],\n): types.Content[] {\n if (comprehensiveHistory === undefined || comprehensiveHistory.length === 0) {\n return [];\n }\n const curatedHistory: types.Content[] = [];\n const length = comprehensiveHistory.length;\n let i = 0;\n let userInput = comprehensiveHistory[0];\n while (i < length) {\n if (comprehensiveHistory[i].role === 'user') {\n userInput = comprehensiveHistory[i];\n i++;\n } else {\n const modelOutput: types.Content[] = [];\n let isValid = true;\n while (i < length && comprehensiveHistory[i].role === 'model') {\n modelOutput.push(comprehensiveHistory[i]);\n if (isValid && !isValidContent(comprehensiveHistory[i])) {\n isValid = false;\n }\n i++;\n }\n if (isValid) {\n curatedHistory.push(userInput);\n curatedHistory.push(...modelOutput);\n }\n }\n }\n return curatedHistory;\n}\n\n/**\n * A utility class to create a chat session.\n */\nexport class Chats {\n private readonly modelsModule: Models;\n private readonly apiClient: ApiClient;\n\n constructor(modelsModule: Models, apiClient: ApiClient) {\n this.modelsModule = modelsModule;\n this.apiClient = apiClient;\n }\n\n /**\n * Creates a new chat session.\n *\n * @remarks\n * The config in the params will be used for all requests within the chat\n * session unless overridden by a per-request `config` in\n * @see {@link types.SendMessageParameters#config}.\n *\n * @param params - Parameters for creating a chat session.\n * @returns A new chat session.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({\n * model: 'gemini-2.0-flash'\n * config: {\n * temperature: 0.5,\n * maxOutputTokens: 1024,\n * }\n * });\n * ```\n */\n create(params: types.CreateChatParameters) {\n return new Chat(\n this.apiClient,\n this.modelsModule,\n params.model,\n params.config,\n params.history,\n );\n }\n}\n\n/**\n * Chat session that enables sending messages to the model with previous\n * conversation context.\n *\n * @remarks\n * The session maintains all the turns between user and model.\n */\nexport class Chat {\n // A promise to represent the current state of the message being sent to the\n // model.\n private sendPromise: Promise = Promise.resolve();\n\n constructor(\n private readonly apiClient: ApiClient,\n private readonly modelsModule: Models,\n private readonly model: string,\n private readonly config: types.GenerateContentConfig = {},\n private history: types.Content[] = [],\n ) {\n validateHistory(history);\n }\n\n /**\n * Sends a message to the model and returns the response.\n *\n * @remarks\n * This method will wait for the previous message to be processed before\n * sending the next message.\n *\n * @see {@link Chat#sendMessageStream} for streaming method.\n * @param params - parameters for sending messages within a chat session.\n * @returns The model's response.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({model: 'gemini-2.0-flash'});\n * const response = await chat.sendMessage({\n * message: 'Why is the sky blue?'\n * });\n * console.log(response.text);\n * ```\n */\n async sendMessage(\n params: types.SendMessageParameters,\n ): Promise {\n await this.sendPromise;\n const inputContent = t.tContent(this.apiClient, params.message);\n const responsePromise = this.modelsModule.generateContent({\n model: this.model,\n contents: this.getHistory(true).concat(inputContent),\n config: params.config ?? this.config,\n });\n this.sendPromise = (async () => {\n const response = await responsePromise;\n const outputContent = response.candidates?.[0]?.content;\n const modelOutput = outputContent ? [outputContent] : [];\n this.recordHistory(inputContent, modelOutput);\n return;\n })();\n await this.sendPromise;\n return responsePromise;\n }\n\n /**\n * Sends a message to the model and returns the response in chunks.\n *\n * @remarks\n * This method will wait for the previous message to be processed before\n * sending the next message.\n *\n * @see {@link Chat#sendMessage} for non-streaming method.\n * @param params - parameters for sending the message.\n * @return The model's response.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({model: 'gemini-2.0-flash'});\n * const response = await chat.sendMessageStream({\n * message: 'Why is the sky blue?'\n * });\n * for await (const chunk of response) {\n * console.log(chunk.text);\n * }\n * ```\n */\n async sendMessageStream(\n params: types.SendMessageParameters,\n ): Promise> {\n await this.sendPromise;\n const inputContent = t.tContent(this.apiClient, params.message);\n const streamResponse = this.modelsModule.generateContentStream({\n model: this.model,\n contents: this.getHistory(true).concat(inputContent),\n config: params.config ?? this.config,\n });\n this.sendPromise = streamResponse.then(() => undefined);\n const response = await streamResponse;\n const result = this.processStreamResponse(response, inputContent);\n return result;\n }\n\n /**\n * Returns the chat history.\n *\n * @remarks\n * The history is a list of contents alternating between user and model.\n *\n * There are two types of history:\n * - The `curated history` contains only the valid turns between user and\n * model, which will be included in the subsequent requests sent to the model.\n * - The `comprehensive history` contains all turns, including invalid or\n * empty model outputs, providing a complete record of the history.\n *\n * The history is updated after receiving the response from the model,\n * for streaming response, it means receiving the last chunk of the response.\n *\n * The `comprehensive history` is returned by default. To get the `curated\n * history`, set the `curated` parameter to `true`.\n *\n * @param curated - whether to return the curated history or the comprehensive\n * history.\n * @return History contents alternating between user and model for the entire\n * chat session.\n */\n getHistory(curated: boolean = false): types.Content[] {\n return curated ? extractCuratedHistory(this.history) : this.history;\n }\n\n private async *processStreamResponse(\n streamResponse: AsyncGenerator,\n inputContent: types.Content,\n ) {\n const outputContent: types.Content[] = [];\n for await (const chunk of streamResponse) {\n if (isValidResponse(chunk)) {\n const content = chunk.candidates?.[0]?.content;\n if (content !== undefined) {\n outputContent.push(content);\n }\n }\n yield chunk;\n }\n this.recordHistory(inputContent, outputContent);\n }\n\n private recordHistory(\n userInput: types.Content,\n modelOutput: types.Content[],\n ) {\n let outputContents: types.Content[] = [];\n if (\n modelOutput.length > 0 &&\n modelOutput.every((content) => content.role === 'model')\n ) {\n outputContents = modelOutput;\n } else {\n // Appends an empty content when model returns empty response, so that the\n // history is always alternating between user and model.\n outputContents.push({\n role: 'model',\n parts: [],\n } as types.Content);\n }\n this.history.push(userInput);\n this.history.push(...outputContents);\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {Auth} from './_auth';\nimport * as common from './_common';\nimport {Uploader} from './_uploader';\nimport {File, HttpOptions, HttpResponse, UploadFileConfig} from './types';\n\nconst CONTENT_TYPE_HEADER = 'Content-Type';\nconst SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';\nconst USER_AGENT_HEADER = 'User-Agent';\nconst GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';\nexport const SDK_VERSION = '0.8.0'; // x-release-please-version\nconst LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;\nconst VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';\nconst GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';\nconst responseLineRE = /^data: (.*)(?:\\n\\n|\\r\\r|\\r\\n\\r\\n)/;\n\n/**\n * Client errors raised by the GenAI API.\n */\nexport class ClientError extends Error {\n constructor(message: string, stackTrace?: string) {\n if (stackTrace) {\n super(message, {cause: stackTrace});\n } else {\n super(message, {cause: new Error().stack});\n }\n this.message = message;\n this.name = 'ClientError';\n }\n}\n\n/**\n * Server errors raised by the GenAI API.\n */\nexport class ServerError extends Error {\n constructor(message: string, stackTrace?: string) {\n if (stackTrace) {\n super(message, {cause: stackTrace});\n } else {\n super(message, {cause: new Error().stack});\n }\n this.message = message;\n this.name = 'ServerError';\n }\n}\n\n/**\n * Options for initializing the ApiClient. The ApiClient uses the parameters\n * for authentication purposes as well as to infer if SDK should send the\n * request to Vertex AI or Gemini API.\n */\nexport interface ApiClientInitOptions {\n /**\n * The object used for adding authentication headers to API requests.\n */\n auth: Auth;\n /**\n * The uploader to use for uploading files. This field is required for\n * creating a client, will be set through the Node_client or Web_client.\n */\n uploader: Uploader;\n /**\n * Optional. The Google Cloud project ID for Vertex AI users.\n * It is not the numeric project name.\n * If not provided, SDK will try to resolve it from runtime environment.\n */\n project?: string;\n /**\n * Optional. The Google Cloud project location for Vertex AI users.\n * If not provided, SDK will try to resolve it from runtime environment.\n */\n location?: string;\n /**\n * The API Key. This is required for Gemini API users.\n */\n apiKey?: string;\n /**\n * Optional. Set to true if you intend to call Vertex AI endpoints.\n * If unset, default SDK behavior is to call Gemini API.\n */\n vertexai?: boolean;\n /**\n * Optional. The API version for the endpoint.\n * If unset, SDK will choose a default api version.\n */\n apiVersion?: string;\n /**\n * Optional. A set of customizable configuration for HTTP requests.\n */\n httpOptions?: HttpOptions;\n /**\n * Optional. An extra string to append at the end of the User-Agent header.\n *\n * This can be used to e.g specify the runtime and its version.\n */\n userAgentExtra?: string;\n}\n\n/**\n * Represents the necessary information to send a request to an API endpoint.\n * This interface defines the structure for constructing and executing HTTP\n * requests.\n */\nexport interface HttpRequest {\n /**\n * URL path from the modules, this path is appended to the base API URL to\n * form the complete request URL.\n *\n * If you wish to set full URL, use httpOptions.baseUrl instead. Example to\n * set full URL in the request:\n *\n * const request: HttpRequest = {\n * path: '',\n * httpOptions: {\n * baseUrl: 'https://',\n * apiVersion: '',\n * },\n * httpMethod: 'GET',\n * };\n *\n * The result URL will be: https://\n *\n */\n path: string;\n /**\n * Optional query parameters to be appended to the request URL.\n */\n queryParams?: Record;\n /**\n * Optional request body in json string or Blob format, GET request doesn't\n * need a request body.\n */\n body?: string | Blob;\n /**\n * The HTTP method to be used for the request.\n */\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE';\n /**\n * Optional set of customizable configuration for HTTP requests.\n */\n httpOptions?: HttpOptions;\n}\n\n/**\n * The ApiClient class is used to send requests to the Gemini API or Vertex AI\n * endpoints.\n */\nexport class ApiClient {\n readonly clientOptions: ApiClientInitOptions;\n\n constructor(opts: ApiClientInitOptions) {\n this.clientOptions = {\n ...opts,\n project: opts.project,\n location: opts.location,\n apiKey: opts.apiKey,\n vertexai: opts.vertexai,\n };\n\n const initHttpOptions: HttpOptions = {};\n\n if (this.clientOptions.vertexai) {\n initHttpOptions.apiVersion =\n this.clientOptions.apiVersion ?? VERTEX_AI_API_DEFAULT_VERSION;\n // Assume that proj/api key validation occurs before they are passed in.\n if (this.getProject() || this.getLocation()) {\n initHttpOptions.baseUrl = `https://${this.clientOptions.location}-aiplatform.googleapis.com/`;\n this.clientOptions.apiKey = undefined; // unset API key.\n } else {\n initHttpOptions.baseUrl = `https://aiplatform.googleapis.com/`;\n this.clientOptions.project = undefined; // unset project.\n this.clientOptions.location = undefined; // unset location.\n }\n } else {\n initHttpOptions.apiVersion =\n this.clientOptions.apiVersion ?? GOOGLE_AI_API_DEFAULT_VERSION;\n initHttpOptions.baseUrl = `https://generativelanguage.googleapis.com/`;\n }\n\n initHttpOptions.headers = this.getDefaultHeaders();\n\n this.clientOptions.httpOptions = initHttpOptions;\n\n if (opts.httpOptions) {\n this.clientOptions.httpOptions = this.patchHttpOptions(\n initHttpOptions,\n opts.httpOptions,\n );\n }\n }\n\n isVertexAI(): boolean {\n return this.clientOptions.vertexai ?? false;\n }\n\n getProject() {\n return this.clientOptions.project;\n }\n\n getLocation() {\n return this.clientOptions.location;\n }\n\n getApiVersion() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.apiVersion !== undefined\n ) {\n return this.clientOptions.httpOptions.apiVersion;\n }\n throw new Error('API version is not set.');\n }\n\n getBaseUrl() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.baseUrl !== undefined\n ) {\n return this.clientOptions.httpOptions.baseUrl;\n }\n throw new Error('Base URL is not set.');\n }\n\n getRequestUrl() {\n return this.getRequestUrlInternal(this.clientOptions.httpOptions);\n }\n\n getHeaders() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.headers !== undefined\n ) {\n return this.clientOptions.httpOptions.headers;\n } else {\n throw new Error('Headers are not set.');\n }\n }\n\n private getRequestUrlInternal(httpOptions?: HttpOptions) {\n if (\n !httpOptions ||\n httpOptions.baseUrl === undefined ||\n httpOptions.apiVersion === undefined\n ) {\n throw new Error('HTTP options are not correctly set.');\n }\n const baseUrl = httpOptions.baseUrl.endsWith('/')\n ? httpOptions.baseUrl.slice(0, -1)\n : httpOptions.baseUrl;\n const urlElement: Array = [baseUrl];\n if (httpOptions.apiVersion && httpOptions.apiVersion !== '') {\n urlElement.push(httpOptions.apiVersion);\n }\n return urlElement.join('/');\n }\n\n getBaseResourcePath() {\n return `projects/${this.clientOptions.project}/locations/${\n this.clientOptions.location\n }`;\n }\n\n getApiKey() {\n return this.clientOptions.apiKey;\n }\n\n getWebsocketBaseUrl() {\n const baseUrl = this.getBaseUrl();\n const urlParts = new URL(baseUrl);\n urlParts.protocol = 'wss';\n return urlParts.toString();\n }\n\n setBaseUrl(url: string) {\n if (this.clientOptions.httpOptions) {\n this.clientOptions.httpOptions.baseUrl = url;\n } else {\n throw new Error('HTTP options are not correctly set.');\n }\n }\n\n private constructUrl(\n path: string,\n httpOptions: HttpOptions,\n prependProjectLocation: boolean,\n ): URL {\n const urlElement: Array = [this.getRequestUrlInternal(httpOptions)];\n if (prependProjectLocation) {\n urlElement.push(this.getBaseResourcePath());\n }\n if (path !== '') {\n urlElement.push(path);\n }\n const url = new URL(`${urlElement.join('/')}`);\n\n return url;\n }\n\n private shouldPrependVertexProjectPath(request: HttpRequest): boolean {\n if (this.clientOptions.apiKey) {\n return false;\n }\n if (!this.clientOptions.vertexai) {\n return false;\n }\n if (request.path.startsWith('projects/')) {\n // Assume the path already starts with\n // `projects//location/`.\n return false;\n }\n if (\n request.httpMethod === 'GET' &&\n request.path.startsWith('publishers/google/models')\n ) {\n // These paths are used by Vertex's models.get and models.list\n // calls. For base models Vertex does not accept a project/location\n // prefix (for tuned model the prefix is required).\n return false;\n }\n return true;\n }\n\n async request(request: HttpRequest): Promise {\n let patchedHttpOptions = this.clientOptions.httpOptions!;\n if (request.httpOptions) {\n patchedHttpOptions = this.patchHttpOptions(\n this.clientOptions.httpOptions!,\n request.httpOptions,\n );\n }\n\n const prependProjectLocation = this.shouldPrependVertexProjectPath(request);\n const url = this.constructUrl(\n request.path,\n patchedHttpOptions,\n prependProjectLocation,\n );\n if (request.queryParams) {\n for (const [key, value] of Object.entries(request.queryParams)) {\n url.searchParams.append(key, String(value));\n }\n }\n let requestInit: RequestInit = {};\n if (request.httpMethod === 'GET') {\n if (request.body && request.body !== '{}') {\n throw new Error(\n 'Request body should be empty for GET request, but got non empty request body',\n );\n }\n } else {\n requestInit.body = request.body;\n }\n requestInit = await this.includeExtraHttpOptionsToRequestInit(\n requestInit,\n patchedHttpOptions,\n );\n return this.unaryApiCall(url, requestInit, request.httpMethod);\n }\n\n private patchHttpOptions(\n baseHttpOptions: HttpOptions,\n requestHttpOptions: HttpOptions,\n ): HttpOptions {\n const patchedHttpOptions = JSON.parse(\n JSON.stringify(baseHttpOptions),\n ) as HttpOptions;\n\n for (const [key, value] of Object.entries(requestHttpOptions)) {\n // Records compile to objects.\n if (typeof value === 'object') {\n // @ts-expect-error TS2345TS7053: Element implicitly has an 'any' type\n // because expression of type 'string' can't be used to index type\n // 'HttpOptions'.\n patchedHttpOptions[key] = {...patchedHttpOptions[key], ...value};\n } else if (value !== undefined) {\n // @ts-expect-error TS2345TS7053: Element implicitly has an 'any' type\n // because expression of type 'string' can't be used to index type\n // 'HttpOptions'.\n patchedHttpOptions[key] = value;\n }\n }\n return patchedHttpOptions;\n }\n\n async requestStream(\n request: HttpRequest,\n ): Promise> {\n let patchedHttpOptions = this.clientOptions.httpOptions!;\n if (request.httpOptions) {\n patchedHttpOptions = this.patchHttpOptions(\n this.clientOptions.httpOptions!,\n request.httpOptions,\n );\n }\n\n const prependProjectLocation = this.shouldPrependVertexProjectPath(request);\n const url = this.constructUrl(\n request.path,\n patchedHttpOptions,\n prependProjectLocation,\n );\n if (!url.searchParams.has('alt') || url.searchParams.get('alt') !== 'sse') {\n url.searchParams.set('alt', 'sse');\n }\n let requestInit: RequestInit = {};\n requestInit.body = request.body;\n requestInit = await this.includeExtraHttpOptionsToRequestInit(\n requestInit,\n patchedHttpOptions,\n );\n return this.streamApiCall(url, requestInit, request.httpMethod);\n }\n\n private async includeExtraHttpOptionsToRequestInit(\n requestInit: RequestInit,\n httpOptions: HttpOptions,\n ): Promise {\n if (httpOptions && (httpOptions.signal || httpOptions.timeout && httpOptions?.timeout >= 0)) {\n const abortController = new AbortController();\n const signal = abortController.signal;\n if (httpOptions.timeout && httpOptions.timeout >= 0) {\n setTimeout(() => abortController.abort(), httpOptions.timeout);\n }\n if (httpOptions.signal) {\n httpOptions.signal?.addEventListener('abort', () => {\n abortController.abort();\n });\n }\n requestInit.signal = signal;\n }\n requestInit.headers = await this.getHeadersInternal(httpOptions);\n return requestInit;\n }\n\n private async unaryApiCall(\n url: URL,\n requestInit: RequestInit,\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE',\n ): Promise {\n return this.apiCall(url.toString(), {\n ...requestInit,\n method: httpMethod,\n })\n .then(async (response) => {\n await throwErrorIfNotOK(response);\n return new HttpResponse(response);\n })\n .catch((e) => {\n if (e instanceof Error) {\n throw e;\n } else {\n throw new Error(JSON.stringify(e));\n }\n });\n }\n\n private async streamApiCall(\n url: URL,\n requestInit: RequestInit,\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE',\n ): Promise> {\n return this.apiCall(url.toString(), {\n ...requestInit,\n method: httpMethod,\n })\n .then(async (response) => {\n await throwErrorIfNotOK(response);\n return this.processStreamResponse(response);\n })\n .catch((e) => {\n if (e instanceof Error) {\n throw e;\n } else {\n throw new Error(JSON.stringify(e));\n }\n });\n }\n\n async *processStreamResponse(\n response: Response,\n ): AsyncGenerator {\n const reader = response?.body?.getReader();\n const decoder = new TextDecoder('utf-8');\n if (!reader) {\n throw new Error('Response body is empty');\n }\n\n try {\n let buffer = '';\n while (true) {\n const {done, value} = await reader.read();\n if (done) {\n if (buffer.trim().length > 0) {\n throw new Error('Incomplete JSON segment at the end');\n }\n break;\n }\n const chunkString = decoder.decode(value);\n buffer += chunkString;\n let match = buffer.match(responseLineRE);\n while (match) {\n const processedChunkString = match[1];\n try {\n const partialResponse = new Response(processedChunkString, {\n headers: response?.headers,\n status: response?.status,\n statusText: response?.statusText,\n });\n yield new HttpResponse(partialResponse);\n buffer = buffer.slice(match[0].length);\n match = buffer.match(responseLineRE);\n } catch (e) {\n throw new Error(\n `exception parsing stream chunk ${processedChunkString}. ${e}`,\n );\n }\n }\n }\n } finally {\n reader.releaseLock();\n }\n }\n private async apiCall(\n url: string,\n requestInit: RequestInit,\n ): Promise {\n return fetch(url, requestInit).catch((e) => {\n throw new Error(`exception ${e} sending request`);\n });\n }\n\n getDefaultHeaders(): Record {\n const headers: Record = {};\n\n const versionHeaderValue =\n LIBRARY_LABEL + ' ' + this.clientOptions.userAgentExtra;\n\n headers[USER_AGENT_HEADER] = versionHeaderValue;\n headers[GOOGLE_API_CLIENT_HEADER] = versionHeaderValue;\n headers[CONTENT_TYPE_HEADER] = 'application/json';\n\n return headers;\n }\n\n private async getHeadersInternal(\n httpOptions: HttpOptions | undefined,\n ): Promise {\n const headers = new Headers();\n if (httpOptions && httpOptions.headers) {\n for (const [key, value] of Object.entries(httpOptions.headers)) {\n headers.append(key, value);\n }\n // Append a timeout header if it is set, note that the timeout option is\n // in milliseconds but the header is in seconds.\n if (httpOptions.timeout && httpOptions.timeout > 0) {\n headers.append(\n SERVER_TIMEOUT_HEADER,\n String(Math.ceil(httpOptions.timeout / 1000)),\n );\n }\n }\n await this.clientOptions.auth.addAuthHeaders(headers);\n return headers;\n }\n\n /**\n * Uploads a file asynchronously using Gemini API only, this is not supported\n * in Vertex AI.\n *\n * @param file The string path to the file to be uploaded or a Blob object.\n * @param config Optional parameters specified in the `UploadFileConfig`\n * interface. @see {@link UploadFileConfig}\n * @return A promise that resolves to a `File` object.\n * @throws An error if called on a Vertex AI client.\n * @throws An error if the `mimeType` is not provided and can not be inferred,\n */\n async uploadFile(\n file: string | Blob,\n config?: UploadFileConfig,\n ): Promise {\n const fileToUpload: File = {};\n if (config != null) {\n fileToUpload.mimeType = config.mimeType;\n fileToUpload.name = config.name;\n fileToUpload.displayName = config.displayName;\n }\n\n if (fileToUpload.name && !fileToUpload.name.startsWith('files/')) {\n fileToUpload.name = `files/${fileToUpload.name}`;\n }\n\n const uploader = this.clientOptions.uploader;\n const fileStat = await uploader.stat(file);\n fileToUpload.sizeBytes = String(fileStat.size);\n const mimeType = config?.mimeType ?? fileStat.type;\n if (mimeType === undefined || mimeType === '') {\n throw new Error(\n 'Can not determine mimeType. Please provide mimeType in the config.',\n );\n }\n fileToUpload.mimeType = mimeType;\n\n const uploadUrl = await this.fetchUploadUrl(fileToUpload, config);\n return uploader.upload(file, uploadUrl, this);\n }\n\n private async fetchUploadUrl(\n file: File,\n config?: UploadFileConfig,\n ): Promise {\n let httpOptions: HttpOptions = {};\n if (config?.httpOptions) {\n httpOptions = config.httpOptions;\n } else {\n httpOptions = {\n apiVersion: '', // api-version is set in the path.\n headers: {\n 'Content-Type': 'application/json',\n 'X-Goog-Upload-Protocol': 'resumable',\n 'X-Goog-Upload-Command': 'start',\n 'X-Goog-Upload-Header-Content-Length': `${file.sizeBytes}`,\n 'X-Goog-Upload-Header-Content-Type': `${file.mimeType}`,\n },\n };\n }\n\n const body: Record = {\n 'file': file,\n };\n const httpResponse = await this.request({\n path: common.formatMap(\n 'upload/v1beta/files',\n body['_url'] as Record,\n ),\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions,\n });\n\n if (!httpResponse || !httpResponse?.headers) {\n throw new Error(\n 'Server did not return an HttpResponse or the returned HttpResponse did not have headers.',\n );\n }\n\n const uploadUrl: string | undefined =\n httpResponse?.headers?.['x-goog-upload-url'];\n if (uploadUrl === undefined) {\n throw new Error(\n 'Failed to get upload url. Server did not return the x-google-upload-url in the headers',\n );\n }\n return uploadUrl;\n }\n}\n\nasync function throwErrorIfNotOK(response: Response | undefined) {\n if (response === undefined) {\n throw new ServerError('response is undefined');\n }\n if (!response.ok) {\n const status: number = response.status;\n const statusText: string = response.statusText;\n let errorBody: Record;\n if (response.headers.get('content-type')?.includes('application/json')) {\n errorBody = await response.json();\n } else {\n errorBody = {\n error: {\n message: 'exception parsing response',\n code: response.status,\n status: response.statusText,\n },\n };\n }\n const errorMessage = `got status: ${status} ${statusText}. ${JSON.stringify(\n errorBody,\n )}`;\n if (status >= 400 && status < 500) {\n const clientError = new ClientError(errorMessage);\n throw clientError;\n } else if (status >= 500 && status < 600) {\n const serverError = new ServerError(errorMessage);\n throw serverError;\n }\n throw new Error(errorMessage);\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport function crossError(): Error {\n // TODO(b/399934880): this message needs a link to a help page explaining how to enable conditional exports\n return new Error(`This feature requires the web or Node specific @google/genai implementation, you can fix this by either:\n\n*Enabling conditional exports for your project [recommended]*\n\n*Using a platform specific import* - Make sure your code imports either '@google/genai/web' or '@google/genai/node' instead of '@google/genai'.\n`);\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {ApiClient} from '../_api_client';\nimport {FileStat, Uploader} from '../_uploader';\nimport {File, HttpResponse} from '../types';\n\nimport {crossError} from './_cross_error';\n\nexport const MAX_CHUNK_SIZE = 1024 * 1024 * 8; // bytes\nexport class CrossUploader implements Uploader {\n async upload(\n file: string | Blob,\n uploadUrl: string,\n apiClient: ApiClient,\n ): Promise {\n if (typeof file === 'string') {\n throw crossError();\n } else {\n return uploadBlob(file, uploadUrl, apiClient);\n }\n }\n\n async stat(file: string | Blob): Promise {\n if (typeof file === 'string') {\n throw crossError();\n } else {\n return getBlobStat(file);\n }\n }\n}\n\nexport async function uploadBlob(\n file: Blob,\n uploadUrl: string,\n apiClient: ApiClient,\n): Promise {\n let fileSize = 0;\n let offset = 0;\n let response: HttpResponse = new HttpResponse(new Response());\n let uploadCommand = 'upload';\n fileSize = file.size;\n while (offset < fileSize) {\n const chunkSize = Math.min(MAX_CHUNK_SIZE, fileSize - offset);\n const chunk = file.slice(offset, offset + chunkSize);\n if (offset + chunkSize >= fileSize) {\n uploadCommand += ', finalize';\n }\n response = await apiClient.request({\n path: '',\n body: chunk,\n httpMethod: 'POST',\n httpOptions: {\n apiVersion: '',\n baseUrl: uploadUrl,\n headers: {\n 'X-Goog-Upload-Command': uploadCommand,\n 'X-Goog-Upload-Offset': String(offset),\n 'Content-Length': String(chunkSize),\n },\n },\n });\n offset += chunkSize;\n // The `x-goog-upload-status` header field can be `active`, `final` and\n //`cancelled` in resposne.\n if (response?.headers?.['x-goog-upload-status'] !== 'active') {\n break;\n }\n // TODO(b/401391430) Investigate why the upload status is not finalized\n // even though all content has been uploaded.\n if (fileSize <= offset) {\n throw new Error(\n 'All content has been uploaded, but the upload status is not finalized.',\n );\n }\n }\n const responseJson = (await response?.json()) as Record<\n string,\n File | unknown\n >;\n if (response?.headers?.['x-goog-upload-status'] !== 'final') {\n throw new Error('Failed to upload file: Upload status is not finalized.');\n }\n return responseJson['file'] as File;\n}\n\nexport async function getBlobStat(file: Blob): Promise {\n const fileStat: FileStat = {size: file.size, type: file.type};\n return fileStat;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n WebSocketCallbacks,\n WebSocketFactory,\n WebSocket as Ws,\n} from '../_websocket';\nimport {crossError} from './_cross_error';\n\n// TODO((b/401271082): re-enable lint once CrossWebSocketFactory is implemented.\n/* eslint-disable @typescript-eslint/no-unused-vars */\nexport class CrossWebSocketFactory implements WebSocketFactory {\n create(\n url: string,\n headers: Record,\n callbacks: WebSocketCallbacks,\n ): Ws {\n throw crossError();\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function listFilesConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listFilesParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listFilesConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function fileStatusToMldev(\n apiClient: ApiClient,\n fromObject: types.FileStatus,\n): Record {\n const toObject: Record = {};\n\n const fromDetails = common.getValueByPath(fromObject, ['details']);\n if (fromDetails != null) {\n common.setValueByPath(toObject, ['details'], fromDetails);\n }\n\n const fromMessage = common.getValueByPath(fromObject, ['message']);\n if (fromMessage != null) {\n common.setValueByPath(toObject, ['message'], fromMessage);\n }\n\n const fromCode = common.getValueByPath(fromObject, ['code']);\n if (fromCode != null) {\n common.setValueByPath(toObject, ['code'], fromCode);\n }\n\n return toObject;\n}\n\nexport function fileToMldev(\n apiClient: ApiClient,\n fromObject: types.File,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n const fromSizeBytes = common.getValueByPath(fromObject, ['sizeBytes']);\n if (fromSizeBytes != null) {\n common.setValueByPath(toObject, ['sizeBytes'], fromSizeBytes);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromExpirationTime = common.getValueByPath(fromObject, [\n 'expirationTime',\n ]);\n if (fromExpirationTime != null) {\n common.setValueByPath(toObject, ['expirationTime'], fromExpirationTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromSha256Hash = common.getValueByPath(fromObject, ['sha256Hash']);\n if (fromSha256Hash != null) {\n common.setValueByPath(toObject, ['sha256Hash'], fromSha256Hash);\n }\n\n const fromUri = common.getValueByPath(fromObject, ['uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromDownloadUri = common.getValueByPath(fromObject, ['downloadUri']);\n if (fromDownloadUri != null) {\n common.setValueByPath(toObject, ['downloadUri'], fromDownloadUri);\n }\n\n const fromState = common.getValueByPath(fromObject, ['state']);\n if (fromState != null) {\n common.setValueByPath(toObject, ['state'], fromState);\n }\n\n const fromSource = common.getValueByPath(fromObject, ['source']);\n if (fromSource != null) {\n common.setValueByPath(toObject, ['source'], fromSource);\n }\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(\n toObject,\n ['error'],\n fileStatusToMldev(apiClient, fromError),\n );\n }\n\n return toObject;\n}\n\nexport function createFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromFile = common.getValueByPath(fromObject, ['file']);\n if (fromFile != null) {\n common.setValueByPath(toObject, ['file'], fileToMldev(apiClient, fromFile));\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function getFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'file'],\n t.tFileName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.DeleteFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'file'],\n t.tFileName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function fileStatusFromMldev(\n apiClient: ApiClient,\n fromObject: types.FileStatus,\n): Record {\n const toObject: Record = {};\n\n const fromDetails = common.getValueByPath(fromObject, ['details']);\n if (fromDetails != null) {\n common.setValueByPath(toObject, ['details'], fromDetails);\n }\n\n const fromMessage = common.getValueByPath(fromObject, ['message']);\n if (fromMessage != null) {\n common.setValueByPath(toObject, ['message'], fromMessage);\n }\n\n const fromCode = common.getValueByPath(fromObject, ['code']);\n if (fromCode != null) {\n common.setValueByPath(toObject, ['code'], fromCode);\n }\n\n return toObject;\n}\n\nexport function fileFromMldev(\n apiClient: ApiClient,\n fromObject: types.File,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n const fromSizeBytes = common.getValueByPath(fromObject, ['sizeBytes']);\n if (fromSizeBytes != null) {\n common.setValueByPath(toObject, ['sizeBytes'], fromSizeBytes);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromExpirationTime = common.getValueByPath(fromObject, [\n 'expirationTime',\n ]);\n if (fromExpirationTime != null) {\n common.setValueByPath(toObject, ['expirationTime'], fromExpirationTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromSha256Hash = common.getValueByPath(fromObject, ['sha256Hash']);\n if (fromSha256Hash != null) {\n common.setValueByPath(toObject, ['sha256Hash'], fromSha256Hash);\n }\n\n const fromUri = common.getValueByPath(fromObject, ['uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromDownloadUri = common.getValueByPath(fromObject, ['downloadUri']);\n if (fromDownloadUri != null) {\n common.setValueByPath(toObject, ['downloadUri'], fromDownloadUri);\n }\n\n const fromState = common.getValueByPath(fromObject, ['state']);\n if (fromState != null) {\n common.setValueByPath(toObject, ['state'], fromState);\n }\n\n const fromSource = common.getValueByPath(fromObject, ['source']);\n if (fromSource != null) {\n common.setValueByPath(toObject, ['source'], fromSource);\n }\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(\n toObject,\n ['error'],\n fileStatusFromMldev(apiClient, fromError),\n );\n }\n\n return toObject;\n}\n\nexport function listFilesResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromFiles = common.getValueByPath(fromObject, ['files']);\n if (fromFiles != null) {\n if (Array.isArray(fromFiles)) {\n common.setValueByPath(\n toObject,\n ['files'],\n fromFiles.map((item) => {\n return fileFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['files'], fromFiles);\n }\n }\n\n return toObject;\n}\n\nexport function createFileResponseFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function deleteFileResponseFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_files_converters';\nimport {PagedItem, Pager} from './pagers';\nimport * as types from './types';\n\nexport class Files extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Lists all current project files from the service.\n *\n * @param params - The parameters for the list request\n * @return The paginated results of the list of files\n *\n * @example\n * The following code prints the names of all files from the service, the\n * size of each page is 10.\n *\n * ```ts\n * const listResponse = await ai.files.list({config: {'pageSize': 10}});\n * for await (const file of listResponse) {\n * console.log(file.name);\n * }\n * ```\n */\n list = async (\n params: types.ListFilesParameters = {},\n ): Promise> => {\n return new Pager(\n PagedItem.PAGED_ITEM_FILES,\n (x: types.ListFilesParameters) => this.listInternal(x),\n await this.listInternal(params),\n params,\n );\n };\n\n /**\n * Uploads a file asynchronously to the Gemini API.\n * This method is not available in Vertex AI.\n * Supported upload sources:\n * - Node.js: File path (string) or Blob object.\n * - Browser: Blob object (e.g., File).\n *\n * @remarks\n * The `mimeType` can be specified in the `config` parameter. If omitted:\n * - For file path (string) inputs, the `mimeType` will be inferred from the\n * file extension.\n * - For Blob object inputs, the `mimeType` will be set to the Blob's `type`\n * property.\n * Somex eamples for file extension to mimeType mapping:\n * .txt -> text/plain\n * .json -> application/json\n * .jpg -> image/jpeg\n * .png -> image/png\n * .mp3 -> audio/mpeg\n * .mp4 -> video/mp4\n *\n * This section can contain multiple paragraphs and code examples.\n *\n * @param params - Optional parameters specified in the\n * `types.UploadFileParameters` interface.\n * @see {@link types.UploadFileParameters#config} for the optional\n * config in the parameters.\n * @return A promise that resolves to a `types.File` object.\n * @throws An error if called on a Vertex AI client.\n * @throws An error if the `mimeType` is not provided and can not be inferred,\n * the `mimeType` can be provided in the `params.config` parameter.\n * @throws An error occurs if a suitable upload location cannot be established.\n *\n * @example\n * The following code uploads a file to Gemini API.\n *\n * ```ts\n * const file = await ai.files.upload({file: 'file.txt', config: {\n * mimeType: 'text/plain',\n * }});\n * console.log(file.name);\n * ```\n */\n async upload(params: types.UploadFileParameters): Promise {\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'Vertex AI does not support uploading files. You can share files through a GCS bucket.',\n );\n }\n\n return this.apiClient\n .uploadFile(params.file, params.config)\n .then((response) => {\n const file = converters.fileFromMldev(this.apiClient, response);\n return file as types.File;\n });\n }\n\n private async listInternal(\n params: types.ListFilesParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.listFilesParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap('files', body['_url'] as Record);\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listFilesResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListFilesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n private async createInternal(\n params: types.CreateFileParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.createFileParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'upload/v1beta/files',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.createFileResponseFromMldev();\n const typedResp = new types.CreateFileResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Retrieves the file information from the service.\n *\n * @param params - The parameters for the get request\n * @return The Promise that resolves to the types.File object requested.\n *\n * @example\n * ```ts\n * const config: GetFileParameters = {\n * name: fileName,\n * };\n * file = await ai.files.get(config);\n * console.log(file.name);\n * ```\n */\n async get(params: types.GetFileParameters): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.getFileParametersToMldev(this.apiClient, params);\n path = common.formatMap(\n 'files/{file}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.fileFromMldev(this.apiClient, apiResponse);\n\n return resp as types.File;\n });\n }\n }\n\n /**\n * Deletes a remotely stored file.\n *\n * @param params - The parameters for the delete request.\n * @return The DeleteFileResponse, the response for the delete method.\n *\n * @example\n * The following code deletes an example file named \"files/mehozpxf877d\".\n *\n * ```ts\n * await ai.files.delete({name: file.name});\n * ```\n */\n async delete(\n params: types.DeleteFileParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.deleteFileParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'files/{file}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteFileResponseFromMldev();\n const typedResp = new types.DeleteFileResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function partToMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['videoMetadata']) !== undefined) {\n throw new Error('videoMetadata parameter is not supported in Gemini API.');\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function partToVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function contentToVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToMldev(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['example']) !== undefined) {\n throw new Error('example parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['pattern']) !== undefined) {\n throw new Error('pattern parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['default']) !== undefined) {\n throw new Error('default parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxLength']) !== undefined) {\n throw new Error('maxLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minLength']) !== undefined) {\n throw new Error('minLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minProperties']) !== undefined) {\n throw new Error('minProperties parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxProperties']) !== undefined) {\n throw new Error('maxProperties parameter is not supported in Gemini API.');\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function schemaToVertex(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n const fromExample = common.getValueByPath(fromObject, ['example']);\n if (fromExample != null) {\n common.setValueByPath(toObject, ['example'], fromExample);\n }\n\n const fromPattern = common.getValueByPath(fromObject, ['pattern']);\n if (fromPattern != null) {\n common.setValueByPath(toObject, ['pattern'], fromPattern);\n }\n\n const fromDefault = common.getValueByPath(fromObject, ['default']);\n if (fromDefault != null) {\n common.setValueByPath(toObject, ['default'], fromDefault);\n }\n\n const fromMaxLength = common.getValueByPath(fromObject, ['maxLength']);\n if (fromMaxLength != null) {\n common.setValueByPath(toObject, ['maxLength'], fromMaxLength);\n }\n\n const fromMinLength = common.getValueByPath(fromObject, ['minLength']);\n if (fromMinLength != null) {\n common.setValueByPath(toObject, ['minLength'], fromMinLength);\n }\n\n const fromMinProperties = common.getValueByPath(fromObject, [\n 'minProperties',\n ]);\n if (fromMinProperties != null) {\n common.setValueByPath(toObject, ['minProperties'], fromMinProperties);\n }\n\n const fromMaxProperties = common.getValueByPath(fromObject, [\n 'maxProperties',\n ]);\n if (fromMaxProperties != null) {\n common.setValueByPath(toObject, ['maxProperties'], fromMaxProperties);\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['response']) !== undefined) {\n throw new Error('response parameter is not supported in Gemini API.');\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n schemaToVertex(apiClient, fromResponse),\n );\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function googleSearchToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToMldev(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToVertex(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToMldev(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n if (common.getValueByPath(fromObject, ['retrieval']) !== undefined) {\n throw new Error('retrieval parameter is not supported in Gemini API.');\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToMldev());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function toolToVertex(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n const fromRetrieval = common.getValueByPath(fromObject, ['retrieval']);\n if (fromRetrieval != null) {\n common.setValueByPath(toObject, ['retrieval'], fromRetrieval);\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToVertex());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function sessionResumptionConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.SessionResumptionConfig,\n): Record {\n const toObject: Record = {};\n\n const fromHandle = common.getValueByPath(fromObject, ['handle']);\n if (fromHandle != null) {\n common.setValueByPath(toObject, ['handle'], fromHandle);\n }\n\n if (common.getValueByPath(fromObject, ['transparent']) !== undefined) {\n throw new Error('transparent parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function sessionResumptionConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.SessionResumptionConfig,\n): Record {\n const toObject: Record = {};\n\n const fromHandle = common.getValueByPath(fromObject, ['handle']);\n if (fromHandle != null) {\n common.setValueByPath(toObject, ['handle'], fromHandle);\n }\n\n const fromTransparent = common.getValueByPath(fromObject, ['transparent']);\n if (fromTransparent != null) {\n common.setValueByPath(toObject, ['transparent'], fromTransparent);\n }\n\n return toObject;\n}\n\nexport function audioTranscriptionConfigToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function audioTranscriptionConfigToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function automaticActivityDetectionToMldev(\n apiClient: ApiClient,\n fromObject: types.AutomaticActivityDetection,\n): Record {\n const toObject: Record = {};\n\n const fromDisabled = common.getValueByPath(fromObject, ['disabled']);\n if (fromDisabled != null) {\n common.setValueByPath(toObject, ['disabled'], fromDisabled);\n }\n\n const fromStartOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'startOfSpeechSensitivity',\n ]);\n if (fromStartOfSpeechSensitivity != null) {\n common.setValueByPath(\n toObject,\n ['startOfSpeechSensitivity'],\n fromStartOfSpeechSensitivity,\n );\n }\n\n const fromEndOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'endOfSpeechSensitivity',\n ]);\n if (fromEndOfSpeechSensitivity != null) {\n common.setValueByPath(\n toObject,\n ['endOfSpeechSensitivity'],\n fromEndOfSpeechSensitivity,\n );\n }\n\n const fromPrefixPaddingMs = common.getValueByPath(fromObject, [\n 'prefixPaddingMs',\n ]);\n if (fromPrefixPaddingMs != null) {\n common.setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);\n }\n\n const fromSilenceDurationMs = common.getValueByPath(fromObject, [\n 'silenceDurationMs',\n ]);\n if (fromSilenceDurationMs != null) {\n common.setValueByPath(\n toObject,\n ['silenceDurationMs'],\n fromSilenceDurationMs,\n );\n }\n\n return toObject;\n}\n\nexport function automaticActivityDetectionToVertex(\n apiClient: ApiClient,\n fromObject: types.AutomaticActivityDetection,\n): Record {\n const toObject: Record = {};\n\n const fromDisabled = common.getValueByPath(fromObject, ['disabled']);\n if (fromDisabled != null) {\n common.setValueByPath(toObject, ['disabled'], fromDisabled);\n }\n\n const fromStartOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'startOfSpeechSensitivity',\n ]);\n if (fromStartOfSpeechSensitivity != null) {\n common.setValueByPath(\n toObject,\n ['startOfSpeechSensitivity'],\n fromStartOfSpeechSensitivity,\n );\n }\n\n const fromEndOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'endOfSpeechSensitivity',\n ]);\n if (fromEndOfSpeechSensitivity != null) {\n common.setValueByPath(\n toObject,\n ['endOfSpeechSensitivity'],\n fromEndOfSpeechSensitivity,\n );\n }\n\n const fromPrefixPaddingMs = common.getValueByPath(fromObject, [\n 'prefixPaddingMs',\n ]);\n if (fromPrefixPaddingMs != null) {\n common.setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);\n }\n\n const fromSilenceDurationMs = common.getValueByPath(fromObject, [\n 'silenceDurationMs',\n ]);\n if (fromSilenceDurationMs != null) {\n common.setValueByPath(\n toObject,\n ['silenceDurationMs'],\n fromSilenceDurationMs,\n );\n }\n\n return toObject;\n}\n\nexport function realtimeInputConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.RealtimeInputConfig,\n): Record {\n const toObject: Record = {};\n\n const fromAutomaticActivityDetection = common.getValueByPath(fromObject, [\n 'automaticActivityDetection',\n ]);\n if (fromAutomaticActivityDetection != null) {\n common.setValueByPath(\n toObject,\n ['automaticActivityDetection'],\n automaticActivityDetectionToMldev(\n apiClient,\n fromAutomaticActivityDetection,\n ),\n );\n }\n\n const fromActivityHandling = common.getValueByPath(fromObject, [\n 'activityHandling',\n ]);\n if (fromActivityHandling != null) {\n common.setValueByPath(toObject, ['activityHandling'], fromActivityHandling);\n }\n\n const fromTurnCoverage = common.getValueByPath(fromObject, ['turnCoverage']);\n if (fromTurnCoverage != null) {\n common.setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);\n }\n\n return toObject;\n}\n\nexport function realtimeInputConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.RealtimeInputConfig,\n): Record {\n const toObject: Record = {};\n\n const fromAutomaticActivityDetection = common.getValueByPath(fromObject, [\n 'automaticActivityDetection',\n ]);\n if (fromAutomaticActivityDetection != null) {\n common.setValueByPath(\n toObject,\n ['automaticActivityDetection'],\n automaticActivityDetectionToVertex(\n apiClient,\n fromAutomaticActivityDetection,\n ),\n );\n }\n\n const fromActivityHandling = common.getValueByPath(fromObject, [\n 'activityHandling',\n ]);\n if (fromActivityHandling != null) {\n common.setValueByPath(toObject, ['activityHandling'], fromActivityHandling);\n }\n\n const fromTurnCoverage = common.getValueByPath(fromObject, ['turnCoverage']);\n if (fromTurnCoverage != null) {\n common.setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);\n }\n\n return toObject;\n}\n\nexport function slidingWindowToMldev(\n apiClient: ApiClient,\n fromObject: types.SlidingWindow,\n): Record {\n const toObject: Record = {};\n\n const fromTargetTokens = common.getValueByPath(fromObject, ['targetTokens']);\n if (fromTargetTokens != null) {\n common.setValueByPath(toObject, ['targetTokens'], fromTargetTokens);\n }\n\n return toObject;\n}\n\nexport function slidingWindowToVertex(\n apiClient: ApiClient,\n fromObject: types.SlidingWindow,\n): Record {\n const toObject: Record = {};\n\n const fromTargetTokens = common.getValueByPath(fromObject, ['targetTokens']);\n if (fromTargetTokens != null) {\n common.setValueByPath(toObject, ['targetTokens'], fromTargetTokens);\n }\n\n return toObject;\n}\n\nexport function contextWindowCompressionConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ContextWindowCompressionConfig,\n): Record {\n const toObject: Record = {};\n\n const fromTriggerTokens = common.getValueByPath(fromObject, [\n 'triggerTokens',\n ]);\n if (fromTriggerTokens != null) {\n common.setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);\n }\n\n const fromSlidingWindow = common.getValueByPath(fromObject, [\n 'slidingWindow',\n ]);\n if (fromSlidingWindow != null) {\n common.setValueByPath(\n toObject,\n ['slidingWindow'],\n slidingWindowToMldev(apiClient, fromSlidingWindow),\n );\n }\n\n return toObject;\n}\n\nexport function contextWindowCompressionConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ContextWindowCompressionConfig,\n): Record {\n const toObject: Record = {};\n\n const fromTriggerTokens = common.getValueByPath(fromObject, [\n 'triggerTokens',\n ]);\n if (fromTriggerTokens != null) {\n common.setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);\n }\n\n const fromSlidingWindow = common.getValueByPath(fromObject, [\n 'slidingWindow',\n ]);\n if (fromSlidingWindow != null) {\n common.setValueByPath(\n toObject,\n ['slidingWindow'],\n slidingWindowToVertex(apiClient, fromSlidingWindow),\n );\n }\n\n return toObject;\n}\n\nexport function liveConnectConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveConnectConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (parentObject !== undefined && fromGenerationConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig'],\n fromGenerationConfig,\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (parentObject !== undefined && fromResponseModalities != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig', 'responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (parentObject !== undefined && fromSpeechConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig', 'speechConfig'],\n fromSpeechConfig,\n );\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['setup', 'tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToMldev(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['setup', 'tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (parentObject !== undefined && fromSessionResumption != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'sessionResumption'],\n sessionResumptionConfigToMldev(apiClient, fromSessionResumption),\n );\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (parentObject !== undefined && fromRealtimeInputConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'realtimeInputConfig'],\n realtimeInputConfigToMldev(apiClient, fromRealtimeInputConfig),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (parentObject !== undefined && fromContextWindowCompression != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'contextWindowCompression'],\n contextWindowCompressionConfigToMldev(\n apiClient,\n fromContextWindowCompression,\n ),\n );\n }\n\n return toObject;\n}\n\nexport function liveConnectConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveConnectConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (parentObject !== undefined && fromGenerationConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig'],\n fromGenerationConfig,\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (parentObject !== undefined && fromResponseModalities != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig', 'responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (parentObject !== undefined && fromSpeechConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig', 'speechConfig'],\n fromSpeechConfig,\n );\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['setup', 'tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToVertex(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['setup', 'tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (parentObject !== undefined && fromSessionResumption != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'sessionResumption'],\n sessionResumptionConfigToVertex(apiClient, fromSessionResumption),\n );\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (parentObject !== undefined && fromRealtimeInputConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'realtimeInputConfig'],\n realtimeInputConfigToVertex(apiClient, fromRealtimeInputConfig),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (parentObject !== undefined && fromContextWindowCompression != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'contextWindowCompression'],\n contextWindowCompressionConfigToVertex(\n apiClient,\n fromContextWindowCompression,\n ),\n );\n }\n\n return toObject;\n}\n\nexport function liveConnectParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveConnectParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['setup', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n liveConnectConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function liveConnectParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveConnectParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['setup', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n liveConnectConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function liveClientSetupToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveClientSetup,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (fromGenerationConfig != null) {\n common.setValueByPath(toObject, ['generationConfig'], fromGenerationConfig);\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (fromSystemInstruction != null) {\n common.setValueByPath(\n toObject,\n ['systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n toObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToMldev(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (fromRealtimeInputConfig != null) {\n common.setValueByPath(\n toObject,\n ['realtimeInputConfig'],\n realtimeInputConfigToMldev(apiClient, fromRealtimeInputConfig),\n );\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (fromSessionResumption != null) {\n common.setValueByPath(\n toObject,\n ['sessionResumption'],\n sessionResumptionConfigToMldev(apiClient, fromSessionResumption),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (fromContextWindowCompression != null) {\n common.setValueByPath(\n toObject,\n ['contextWindowCompression'],\n contextWindowCompressionConfigToMldev(\n apiClient,\n fromContextWindowCompression,\n ),\n );\n }\n\n return toObject;\n}\n\nexport function liveClientSetupToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveClientSetup,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (fromGenerationConfig != null) {\n common.setValueByPath(toObject, ['generationConfig'], fromGenerationConfig);\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (fromSystemInstruction != null) {\n common.setValueByPath(\n toObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n toObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToVertex(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (fromRealtimeInputConfig != null) {\n common.setValueByPath(\n toObject,\n ['realtimeInputConfig'],\n realtimeInputConfigToVertex(apiClient, fromRealtimeInputConfig),\n );\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (fromSessionResumption != null) {\n common.setValueByPath(\n toObject,\n ['sessionResumption'],\n sessionResumptionConfigToVertex(apiClient, fromSessionResumption),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (fromContextWindowCompression != null) {\n common.setValueByPath(\n toObject,\n ['contextWindowCompression'],\n contextWindowCompressionConfigToVertex(\n apiClient,\n fromContextWindowCompression,\n ),\n );\n }\n\n return toObject;\n}\n\nexport function liveClientContentToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveClientContent,\n): Record {\n const toObject: Record = {};\n\n const fromTurns = common.getValueByPath(fromObject, ['turns']);\n if (fromTurns != null) {\n if (Array.isArray(fromTurns)) {\n common.setValueByPath(\n toObject,\n ['turns'],\n fromTurns.map((item) => {\n return contentToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['turns'], fromTurns);\n }\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete != null) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n return toObject;\n}\n\nexport function liveClientContentToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveClientContent,\n): Record {\n const toObject: Record = {};\n\n const fromTurns = common.getValueByPath(fromObject, ['turns']);\n if (fromTurns != null) {\n if (Array.isArray(fromTurns)) {\n common.setValueByPath(\n toObject,\n ['turns'],\n fromTurns.map((item) => {\n return contentToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['turns'], fromTurns);\n }\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete != null) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n return toObject;\n}\n\nexport function activityStartToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function activityStartToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function activityEndToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function activityEndToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function liveClientRealtimeInputToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveClientRealtimeInput,\n): Record {\n const toObject: Record = {};\n\n const fromMediaChunks = common.getValueByPath(fromObject, ['mediaChunks']);\n if (fromMediaChunks != null) {\n common.setValueByPath(toObject, ['mediaChunks'], fromMediaChunks);\n }\n\n const fromActivityStart = common.getValueByPath(fromObject, [\n 'activityStart',\n ]);\n if (fromActivityStart != null) {\n common.setValueByPath(toObject, ['activityStart'], activityStartToMldev());\n }\n\n const fromActivityEnd = common.getValueByPath(fromObject, ['activityEnd']);\n if (fromActivityEnd != null) {\n common.setValueByPath(toObject, ['activityEnd'], activityEndToMldev());\n }\n\n return toObject;\n}\n\nexport function liveClientRealtimeInputToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveClientRealtimeInput,\n): Record {\n const toObject: Record = {};\n\n const fromMediaChunks = common.getValueByPath(fromObject, ['mediaChunks']);\n if (fromMediaChunks != null) {\n common.setValueByPath(toObject, ['mediaChunks'], fromMediaChunks);\n }\n\n const fromActivityStart = common.getValueByPath(fromObject, [\n 'activityStart',\n ]);\n if (fromActivityStart != null) {\n common.setValueByPath(toObject, ['activityStart'], activityStartToVertex());\n }\n\n const fromActivityEnd = common.getValueByPath(fromObject, ['activityEnd']);\n if (fromActivityEnd != null) {\n common.setValueByPath(toObject, ['activityEnd'], activityEndToVertex());\n }\n\n return toObject;\n}\n\nexport function functionResponseToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionResponse,\n): Record {\n const toObject: Record = {};\n\n const fromId = common.getValueByPath(fromObject, ['id']);\n if (fromId != null) {\n common.setValueByPath(toObject, ['id'], fromId);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(toObject, ['response'], fromResponse);\n }\n\n return toObject;\n}\n\nexport function functionResponseToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionResponse,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['id']) !== undefined) {\n throw new Error('id parameter is not supported in Vertex AI.');\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(toObject, ['response'], fromResponse);\n }\n\n return toObject;\n}\n\nexport function liveClientToolResponseToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveClientToolResponse,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionResponses = common.getValueByPath(fromObject, [\n 'functionResponses',\n ]);\n if (fromFunctionResponses != null) {\n if (Array.isArray(fromFunctionResponses)) {\n common.setValueByPath(\n toObject,\n ['functionResponses'],\n fromFunctionResponses.map((item) => {\n return functionResponseToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionResponses'],\n fromFunctionResponses,\n );\n }\n }\n\n return toObject;\n}\n\nexport function liveClientToolResponseToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveClientToolResponse,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionResponses = common.getValueByPath(fromObject, [\n 'functionResponses',\n ]);\n if (fromFunctionResponses != null) {\n if (Array.isArray(fromFunctionResponses)) {\n common.setValueByPath(\n toObject,\n ['functionResponses'],\n fromFunctionResponses.map((item) => {\n return functionResponseToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionResponses'],\n fromFunctionResponses,\n );\n }\n }\n\n return toObject;\n}\n\nexport function liveClientMessageToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveClientMessage,\n): Record {\n const toObject: Record = {};\n\n const fromSetup = common.getValueByPath(fromObject, ['setup']);\n if (fromSetup != null) {\n common.setValueByPath(\n toObject,\n ['setup'],\n liveClientSetupToMldev(apiClient, fromSetup),\n );\n }\n\n const fromClientContent = common.getValueByPath(fromObject, [\n 'clientContent',\n ]);\n if (fromClientContent != null) {\n common.setValueByPath(\n toObject,\n ['clientContent'],\n liveClientContentToMldev(apiClient, fromClientContent),\n );\n }\n\n const fromRealtimeInput = common.getValueByPath(fromObject, [\n 'realtimeInput',\n ]);\n if (fromRealtimeInput != null) {\n common.setValueByPath(\n toObject,\n ['realtimeInput'],\n liveClientRealtimeInputToMldev(apiClient, fromRealtimeInput),\n );\n }\n\n const fromToolResponse = common.getValueByPath(fromObject, ['toolResponse']);\n if (fromToolResponse != null) {\n common.setValueByPath(\n toObject,\n ['toolResponse'],\n liveClientToolResponseToMldev(apiClient, fromToolResponse),\n );\n }\n\n return toObject;\n}\n\nexport function liveClientMessageToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveClientMessage,\n): Record {\n const toObject: Record = {};\n\n const fromSetup = common.getValueByPath(fromObject, ['setup']);\n if (fromSetup != null) {\n common.setValueByPath(\n toObject,\n ['setup'],\n liveClientSetupToVertex(apiClient, fromSetup),\n );\n }\n\n const fromClientContent = common.getValueByPath(fromObject, [\n 'clientContent',\n ]);\n if (fromClientContent != null) {\n common.setValueByPath(\n toObject,\n ['clientContent'],\n liveClientContentToVertex(apiClient, fromClientContent),\n );\n }\n\n const fromRealtimeInput = common.getValueByPath(fromObject, [\n 'realtimeInput',\n ]);\n if (fromRealtimeInput != null) {\n common.setValueByPath(\n toObject,\n ['realtimeInput'],\n liveClientRealtimeInputToVertex(apiClient, fromRealtimeInput),\n );\n }\n\n const fromToolResponse = common.getValueByPath(fromObject, ['toolResponse']);\n if (fromToolResponse != null) {\n common.setValueByPath(\n toObject,\n ['toolResponse'],\n liveClientToolResponseToVertex(apiClient, fromToolResponse),\n );\n }\n\n return toObject;\n}\n\nexport function liveServerSetupCompleteFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function liveServerSetupCompleteFromVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function partFromMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function partFromVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentFromMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function contentFromVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function transcriptionFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function transcriptionFromVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function liveServerContentFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerContent,\n): Record {\n const toObject: Record = {};\n\n const fromModelTurn = common.getValueByPath(fromObject, ['modelTurn']);\n if (fromModelTurn != null) {\n common.setValueByPath(\n toObject,\n ['modelTurn'],\n contentFromMldev(apiClient, fromModelTurn),\n );\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete != null) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n const fromInterrupted = common.getValueByPath(fromObject, ['interrupted']);\n if (fromInterrupted != null) {\n common.setValueByPath(toObject, ['interrupted'], fromInterrupted);\n }\n\n const fromGenerationComplete = common.getValueByPath(fromObject, [\n 'generationComplete',\n ]);\n if (fromGenerationComplete != null) {\n common.setValueByPath(\n toObject,\n ['generationComplete'],\n fromGenerationComplete,\n );\n }\n\n return toObject;\n}\n\nexport function liveServerContentFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerContent,\n): Record {\n const toObject: Record = {};\n\n const fromModelTurn = common.getValueByPath(fromObject, ['modelTurn']);\n if (fromModelTurn != null) {\n common.setValueByPath(\n toObject,\n ['modelTurn'],\n contentFromVertex(apiClient, fromModelTurn),\n );\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete != null) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n const fromInterrupted = common.getValueByPath(fromObject, ['interrupted']);\n if (fromInterrupted != null) {\n common.setValueByPath(toObject, ['interrupted'], fromInterrupted);\n }\n\n const fromGenerationComplete = common.getValueByPath(fromObject, [\n 'generationComplete',\n ]);\n if (fromGenerationComplete != null) {\n common.setValueByPath(\n toObject,\n ['generationComplete'],\n fromGenerationComplete,\n );\n }\n\n return toObject;\n}\n\nexport function functionCallFromMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCall,\n): Record {\n const toObject: Record = {};\n\n const fromId = common.getValueByPath(fromObject, ['id']);\n if (fromId != null) {\n common.setValueByPath(toObject, ['id'], fromId);\n }\n\n const fromArgs = common.getValueByPath(fromObject, ['args']);\n if (fromArgs != null) {\n common.setValueByPath(toObject, ['args'], fromArgs);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n return toObject;\n}\n\nexport function functionCallFromVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCall,\n): Record {\n const toObject: Record = {};\n\n const fromArgs = common.getValueByPath(fromObject, ['args']);\n if (fromArgs != null) {\n common.setValueByPath(toObject, ['args'], fromArgs);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n return toObject;\n}\n\nexport function liveServerToolCallFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCall,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCalls = common.getValueByPath(fromObject, [\n 'functionCalls',\n ]);\n if (fromFunctionCalls != null) {\n if (Array.isArray(fromFunctionCalls)) {\n common.setValueByPath(\n toObject,\n ['functionCalls'],\n fromFunctionCalls.map((item) => {\n return functionCallFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['functionCalls'], fromFunctionCalls);\n }\n }\n\n return toObject;\n}\n\nexport function liveServerToolCallFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCall,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCalls = common.getValueByPath(fromObject, [\n 'functionCalls',\n ]);\n if (fromFunctionCalls != null) {\n if (Array.isArray(fromFunctionCalls)) {\n common.setValueByPath(\n toObject,\n ['functionCalls'],\n fromFunctionCalls.map((item) => {\n return functionCallFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['functionCalls'], fromFunctionCalls);\n }\n }\n\n return toObject;\n}\n\nexport function liveServerToolCallCancellationFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCallCancellation,\n): Record {\n const toObject: Record = {};\n\n const fromIds = common.getValueByPath(fromObject, ['ids']);\n if (fromIds != null) {\n common.setValueByPath(toObject, ['ids'], fromIds);\n }\n\n return toObject;\n}\n\nexport function liveServerToolCallCancellationFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCallCancellation,\n): Record {\n const toObject: Record = {};\n\n const fromIds = common.getValueByPath(fromObject, ['ids']);\n if (fromIds != null) {\n common.setValueByPath(toObject, ['ids'], fromIds);\n }\n\n return toObject;\n}\n\nexport function modalityTokenCountFromMldev(\n apiClient: ApiClient,\n fromObject: types.ModalityTokenCount,\n): Record {\n const toObject: Record = {};\n\n const fromModality = common.getValueByPath(fromObject, ['modality']);\n if (fromModality != null) {\n common.setValueByPath(toObject, ['modality'], fromModality);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function modalityTokenCountFromVertex(\n apiClient: ApiClient,\n fromObject: types.ModalityTokenCount,\n): Record {\n const toObject: Record = {};\n\n const fromModality = common.getValueByPath(fromObject, ['modality']);\n if (fromModality != null) {\n common.setValueByPath(toObject, ['modality'], fromModality);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function usageMetadataFromMldev(\n apiClient: ApiClient,\n fromObject: types.UsageMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromPromptTokenCount = common.getValueByPath(fromObject, [\n 'promptTokenCount',\n ]);\n if (fromPromptTokenCount != null) {\n common.setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n const fromResponseTokenCount = common.getValueByPath(fromObject, [\n 'responseTokenCount',\n ]);\n if (fromResponseTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['responseTokenCount'],\n fromResponseTokenCount,\n );\n }\n\n const fromToolUsePromptTokenCount = common.getValueByPath(fromObject, [\n 'toolUsePromptTokenCount',\n ]);\n if (fromToolUsePromptTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokenCount'],\n fromToolUsePromptTokenCount,\n );\n }\n\n const fromThoughtsTokenCount = common.getValueByPath(fromObject, [\n 'thoughtsTokenCount',\n ]);\n if (fromThoughtsTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['thoughtsTokenCount'],\n fromThoughtsTokenCount,\n );\n }\n\n const fromTotalTokenCount = common.getValueByPath(fromObject, [\n 'totalTokenCount',\n ]);\n if (fromTotalTokenCount != null) {\n common.setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);\n }\n\n const fromPromptTokensDetails = common.getValueByPath(fromObject, [\n 'promptTokensDetails',\n ]);\n if (fromPromptTokensDetails != null) {\n if (Array.isArray(fromPromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails,\n );\n }\n }\n\n const fromCacheTokensDetails = common.getValueByPath(fromObject, [\n 'cacheTokensDetails',\n ]);\n if (fromCacheTokensDetails != null) {\n if (Array.isArray(fromCacheTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails,\n );\n }\n }\n\n const fromResponseTokensDetails = common.getValueByPath(fromObject, [\n 'responseTokensDetails',\n ]);\n if (fromResponseTokensDetails != null) {\n if (Array.isArray(fromResponseTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails,\n );\n }\n }\n\n const fromToolUsePromptTokensDetails = common.getValueByPath(fromObject, [\n 'toolUsePromptTokensDetails',\n ]);\n if (fromToolUsePromptTokensDetails != null) {\n if (Array.isArray(fromToolUsePromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails,\n );\n }\n }\n\n return toObject;\n}\n\nexport function usageMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.UsageMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromPromptTokenCount = common.getValueByPath(fromObject, [\n 'promptTokenCount',\n ]);\n if (fromPromptTokenCount != null) {\n common.setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n const fromResponseTokenCount = common.getValueByPath(fromObject, [\n 'candidatesTokenCount',\n ]);\n if (fromResponseTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['responseTokenCount'],\n fromResponseTokenCount,\n );\n }\n\n const fromToolUsePromptTokenCount = common.getValueByPath(fromObject, [\n 'toolUsePromptTokenCount',\n ]);\n if (fromToolUsePromptTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokenCount'],\n fromToolUsePromptTokenCount,\n );\n }\n\n const fromThoughtsTokenCount = common.getValueByPath(fromObject, [\n 'thoughtsTokenCount',\n ]);\n if (fromThoughtsTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['thoughtsTokenCount'],\n fromThoughtsTokenCount,\n );\n }\n\n const fromTotalTokenCount = common.getValueByPath(fromObject, [\n 'totalTokenCount',\n ]);\n if (fromTotalTokenCount != null) {\n common.setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);\n }\n\n const fromPromptTokensDetails = common.getValueByPath(fromObject, [\n 'promptTokensDetails',\n ]);\n if (fromPromptTokensDetails != null) {\n if (Array.isArray(fromPromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails,\n );\n }\n }\n\n const fromCacheTokensDetails = common.getValueByPath(fromObject, [\n 'cacheTokensDetails',\n ]);\n if (fromCacheTokensDetails != null) {\n if (Array.isArray(fromCacheTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails,\n );\n }\n }\n\n const fromResponseTokensDetails = common.getValueByPath(fromObject, [\n 'candidatesTokensDetails',\n ]);\n if (fromResponseTokensDetails != null) {\n if (Array.isArray(fromResponseTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails,\n );\n }\n }\n\n const fromToolUsePromptTokensDetails = common.getValueByPath(fromObject, [\n 'toolUsePromptTokensDetails',\n ]);\n if (fromToolUsePromptTokensDetails != null) {\n if (Array.isArray(fromToolUsePromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails,\n );\n }\n }\n\n const fromTrafficType = common.getValueByPath(fromObject, ['trafficType']);\n if (fromTrafficType != null) {\n common.setValueByPath(toObject, ['trafficType'], fromTrafficType);\n }\n\n return toObject;\n}\n\nexport function liveServerGoAwayFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerGoAway,\n): Record {\n const toObject: Record = {};\n\n const fromTimeLeft = common.getValueByPath(fromObject, ['timeLeft']);\n if (fromTimeLeft != null) {\n common.setValueByPath(toObject, ['timeLeft'], fromTimeLeft);\n }\n\n return toObject;\n}\n\nexport function liveServerGoAwayFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerGoAway,\n): Record {\n const toObject: Record = {};\n\n const fromTimeLeft = common.getValueByPath(fromObject, ['timeLeft']);\n if (fromTimeLeft != null) {\n common.setValueByPath(toObject, ['timeLeft'], fromTimeLeft);\n }\n\n return toObject;\n}\n\nexport function liveServerSessionResumptionUpdateFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerSessionResumptionUpdate,\n): Record {\n const toObject: Record = {};\n\n const fromNewHandle = common.getValueByPath(fromObject, ['newHandle']);\n if (fromNewHandle != null) {\n common.setValueByPath(toObject, ['newHandle'], fromNewHandle);\n }\n\n const fromResumable = common.getValueByPath(fromObject, ['resumable']);\n if (fromResumable != null) {\n common.setValueByPath(toObject, ['resumable'], fromResumable);\n }\n\n const fromLastConsumedClientMessageIndex = common.getValueByPath(fromObject, [\n 'lastConsumedClientMessageIndex',\n ]);\n if (fromLastConsumedClientMessageIndex != null) {\n common.setValueByPath(\n toObject,\n ['lastConsumedClientMessageIndex'],\n fromLastConsumedClientMessageIndex,\n );\n }\n\n return toObject;\n}\n\nexport function liveServerSessionResumptionUpdateFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerSessionResumptionUpdate,\n): Record {\n const toObject: Record = {};\n\n const fromNewHandle = common.getValueByPath(fromObject, ['newHandle']);\n if (fromNewHandle != null) {\n common.setValueByPath(toObject, ['newHandle'], fromNewHandle);\n }\n\n const fromResumable = common.getValueByPath(fromObject, ['resumable']);\n if (fromResumable != null) {\n common.setValueByPath(toObject, ['resumable'], fromResumable);\n }\n\n const fromLastConsumedClientMessageIndex = common.getValueByPath(fromObject, [\n 'lastConsumedClientMessageIndex',\n ]);\n if (fromLastConsumedClientMessageIndex != null) {\n common.setValueByPath(\n toObject,\n ['lastConsumedClientMessageIndex'],\n fromLastConsumedClientMessageIndex,\n );\n }\n\n return toObject;\n}\n\nexport function liveServerMessageFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerMessage,\n): Record {\n const toObject: Record = {};\n\n const fromSetupComplete = common.getValueByPath(fromObject, [\n 'setupComplete',\n ]);\n if (fromSetupComplete != null) {\n common.setValueByPath(\n toObject,\n ['setupComplete'],\n liveServerSetupCompleteFromMldev(),\n );\n }\n\n const fromServerContent = common.getValueByPath(fromObject, [\n 'serverContent',\n ]);\n if (fromServerContent != null) {\n common.setValueByPath(\n toObject,\n ['serverContent'],\n liveServerContentFromMldev(apiClient, fromServerContent),\n );\n }\n\n const fromToolCall = common.getValueByPath(fromObject, ['toolCall']);\n if (fromToolCall != null) {\n common.setValueByPath(\n toObject,\n ['toolCall'],\n liveServerToolCallFromMldev(apiClient, fromToolCall),\n );\n }\n\n const fromToolCallCancellation = common.getValueByPath(fromObject, [\n 'toolCallCancellation',\n ]);\n if (fromToolCallCancellation != null) {\n common.setValueByPath(\n toObject,\n ['toolCallCancellation'],\n liveServerToolCallCancellationFromMldev(\n apiClient,\n fromToolCallCancellation,\n ),\n );\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(\n toObject,\n ['usageMetadata'],\n usageMetadataFromMldev(apiClient, fromUsageMetadata),\n );\n }\n\n const fromGoAway = common.getValueByPath(fromObject, ['goAway']);\n if (fromGoAway != null) {\n common.setValueByPath(\n toObject,\n ['goAway'],\n liveServerGoAwayFromMldev(apiClient, fromGoAway),\n );\n }\n\n const fromSessionResumptionUpdate = common.getValueByPath(fromObject, [\n 'sessionResumptionUpdate',\n ]);\n if (fromSessionResumptionUpdate != null) {\n common.setValueByPath(\n toObject,\n ['sessionResumptionUpdate'],\n liveServerSessionResumptionUpdateFromMldev(\n apiClient,\n fromSessionResumptionUpdate,\n ),\n );\n }\n\n return toObject;\n}\n\nexport function liveServerMessageFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerMessage,\n): Record {\n const toObject: Record = {};\n\n const fromSetupComplete = common.getValueByPath(fromObject, [\n 'setupComplete',\n ]);\n if (fromSetupComplete != null) {\n common.setValueByPath(\n toObject,\n ['setupComplete'],\n liveServerSetupCompleteFromVertex(),\n );\n }\n\n const fromServerContent = common.getValueByPath(fromObject, [\n 'serverContent',\n ]);\n if (fromServerContent != null) {\n common.setValueByPath(\n toObject,\n ['serverContent'],\n liveServerContentFromVertex(apiClient, fromServerContent),\n );\n }\n\n const fromToolCall = common.getValueByPath(fromObject, ['toolCall']);\n if (fromToolCall != null) {\n common.setValueByPath(\n toObject,\n ['toolCall'],\n liveServerToolCallFromVertex(apiClient, fromToolCall),\n );\n }\n\n const fromToolCallCancellation = common.getValueByPath(fromObject, [\n 'toolCallCancellation',\n ]);\n if (fromToolCallCancellation != null) {\n common.setValueByPath(\n toObject,\n ['toolCallCancellation'],\n liveServerToolCallCancellationFromVertex(\n apiClient,\n fromToolCallCancellation,\n ),\n );\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(\n toObject,\n ['usageMetadata'],\n usageMetadataFromVertex(apiClient, fromUsageMetadata),\n );\n }\n\n const fromGoAway = common.getValueByPath(fromObject, ['goAway']);\n if (fromGoAway != null) {\n common.setValueByPath(\n toObject,\n ['goAway'],\n liveServerGoAwayFromVertex(apiClient, fromGoAway),\n );\n }\n\n const fromSessionResumptionUpdate = common.getValueByPath(fromObject, [\n 'sessionResumptionUpdate',\n ]);\n if (fromSessionResumptionUpdate != null) {\n common.setValueByPath(\n toObject,\n ['sessionResumptionUpdate'],\n liveServerSessionResumptionUpdateFromVertex(\n apiClient,\n fromSessionResumptionUpdate,\n ),\n );\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function partToMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['videoMetadata']) !== undefined) {\n throw new Error('videoMetadata parameter is not supported in Gemini API.');\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToMldev(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['example']) !== undefined) {\n throw new Error('example parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['pattern']) !== undefined) {\n throw new Error('pattern parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['default']) !== undefined) {\n throw new Error('default parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxLength']) !== undefined) {\n throw new Error('maxLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minLength']) !== undefined) {\n throw new Error('minLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minProperties']) !== undefined) {\n throw new Error('minProperties parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxProperties']) !== undefined) {\n throw new Error('maxProperties parameter is not supported in Gemini API.');\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function modelSelectionConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ModelSelectionConfig,\n): Record {\n const toObject: Record = {};\n\n if (\n common.getValueByPath(fromObject, ['featureSelectionPreference']) !==\n undefined\n ) {\n throw new Error(\n 'featureSelectionPreference parameter is not supported in Gemini API.',\n );\n }\n\n return toObject;\n}\n\nexport function safetySettingToMldev(\n apiClient: ApiClient,\n fromObject: types.SafetySetting,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['method']) !== undefined) {\n throw new Error('method parameter is not supported in Gemini API.');\n }\n\n const fromCategory = common.getValueByPath(fromObject, ['category']);\n if (fromCategory != null) {\n common.setValueByPath(toObject, ['category'], fromCategory);\n }\n\n const fromThreshold = common.getValueByPath(fromObject, ['threshold']);\n if (fromThreshold != null) {\n common.setValueByPath(toObject, ['threshold'], fromThreshold);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['response']) !== undefined) {\n throw new Error('response parameter is not supported in Gemini API.');\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToMldev(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToMldev(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n if (common.getValueByPath(fromObject, ['retrieval']) !== undefined) {\n throw new Error('retrieval parameter is not supported in Gemini API.');\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToMldev());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function prebuiltVoiceConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.PrebuiltVoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceName = common.getValueByPath(fromObject, ['voiceName']);\n if (fromVoiceName != null) {\n common.setValueByPath(toObject, ['voiceName'], fromVoiceName);\n }\n\n return toObject;\n}\n\nexport function voiceConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.VoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromPrebuiltVoiceConfig = common.getValueByPath(fromObject, [\n 'prebuiltVoiceConfig',\n ]);\n if (fromPrebuiltVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['prebuiltVoiceConfig'],\n prebuiltVoiceConfigToMldev(apiClient, fromPrebuiltVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function speechConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.SpeechConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceConfig = common.getValueByPath(fromObject, ['voiceConfig']);\n if (fromVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['voiceConfig'],\n voiceConfigToMldev(apiClient, fromVoiceConfig),\n );\n }\n\n const fromLanguageCode = common.getValueByPath(fromObject, ['languageCode']);\n if (fromLanguageCode != null) {\n common.setValueByPath(toObject, ['languageCode'], fromLanguageCode);\n }\n\n return toObject;\n}\n\nexport function thinkingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ThinkingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromIncludeThoughts = common.getValueByPath(fromObject, [\n 'includeThoughts',\n ]);\n if (fromIncludeThoughts != null) {\n common.setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);\n }\n\n const fromThinkingBudget = common.getValueByPath(fromObject, [\n 'thinkingBudget',\n ]);\n if (fromThinkingBudget != null) {\n common.setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);\n }\n\n return toObject;\n}\n\nexport function generateContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTemperature = common.getValueByPath(fromObject, ['temperature']);\n if (fromTemperature != null) {\n common.setValueByPath(toObject, ['temperature'], fromTemperature);\n }\n\n const fromTopP = common.getValueByPath(fromObject, ['topP']);\n if (fromTopP != null) {\n common.setValueByPath(toObject, ['topP'], fromTopP);\n }\n\n const fromTopK = common.getValueByPath(fromObject, ['topK']);\n if (fromTopK != null) {\n common.setValueByPath(toObject, ['topK'], fromTopK);\n }\n\n const fromCandidateCount = common.getValueByPath(fromObject, [\n 'candidateCount',\n ]);\n if (fromCandidateCount != null) {\n common.setValueByPath(toObject, ['candidateCount'], fromCandidateCount);\n }\n\n const fromMaxOutputTokens = common.getValueByPath(fromObject, [\n 'maxOutputTokens',\n ]);\n if (fromMaxOutputTokens != null) {\n common.setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);\n }\n\n const fromStopSequences = common.getValueByPath(fromObject, [\n 'stopSequences',\n ]);\n if (fromStopSequences != null) {\n common.setValueByPath(toObject, ['stopSequences'], fromStopSequences);\n }\n\n const fromResponseLogprobs = common.getValueByPath(fromObject, [\n 'responseLogprobs',\n ]);\n if (fromResponseLogprobs != null) {\n common.setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);\n }\n\n const fromLogprobs = common.getValueByPath(fromObject, ['logprobs']);\n if (fromLogprobs != null) {\n common.setValueByPath(toObject, ['logprobs'], fromLogprobs);\n }\n\n const fromPresencePenalty = common.getValueByPath(fromObject, [\n 'presencePenalty',\n ]);\n if (fromPresencePenalty != null) {\n common.setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);\n }\n\n const fromFrequencyPenalty = common.getValueByPath(fromObject, [\n 'frequencyPenalty',\n ]);\n if (fromFrequencyPenalty != null) {\n common.setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (fromSeed != null) {\n common.setValueByPath(toObject, ['seed'], fromSeed);\n }\n\n const fromResponseMimeType = common.getValueByPath(fromObject, [\n 'responseMimeType',\n ]);\n if (fromResponseMimeType != null) {\n common.setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);\n }\n\n const fromResponseSchema = common.getValueByPath(fromObject, [\n 'responseSchema',\n ]);\n if (fromResponseSchema != null) {\n common.setValueByPath(\n toObject,\n ['responseSchema'],\n schemaToMldev(apiClient, t.tSchema(apiClient, fromResponseSchema)),\n );\n }\n\n if (common.getValueByPath(fromObject, ['routingConfig']) !== undefined) {\n throw new Error('routingConfig parameter is not supported in Gemini API.');\n }\n\n if (\n common.getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined\n ) {\n throw new Error(\n 'modelSelectionConfig parameter is not supported in Gemini API.',\n );\n }\n\n const fromSafetySettings = common.getValueByPath(fromObject, [\n 'safetySettings',\n ]);\n if (parentObject !== undefined && fromSafetySettings != null) {\n if (Array.isArray(fromSafetySettings)) {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings.map((item) => {\n return safetySettingToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings,\n );\n }\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToMldev(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToMldev(apiClient, fromToolConfig),\n );\n }\n\n if (common.getValueByPath(fromObject, ['labels']) !== undefined) {\n throw new Error('labels parameter is not supported in Gemini API.');\n }\n\n const fromCachedContent = common.getValueByPath(fromObject, [\n 'cachedContent',\n ]);\n if (parentObject !== undefined && fromCachedContent != null) {\n common.setValueByPath(\n parentObject,\n ['cachedContent'],\n t.tCachedContentName(apiClient, fromCachedContent),\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities != null) {\n common.setValueByPath(\n toObject,\n ['responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromMediaResolution = common.getValueByPath(fromObject, [\n 'mediaResolution',\n ]);\n if (fromMediaResolution != null) {\n common.setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig != null) {\n common.setValueByPath(\n toObject,\n ['speechConfig'],\n speechConfigToMldev(\n apiClient,\n t.tSpeechConfig(apiClient, fromSpeechConfig),\n ),\n );\n }\n\n if (common.getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {\n throw new Error('audioTimestamp parameter is not supported in Gemini API.');\n }\n\n const fromThinkingConfig = common.getValueByPath(fromObject, [\n 'thinkingConfig',\n ]);\n if (fromThinkingConfig != null) {\n common.setValueByPath(\n toObject,\n ['thinkingConfig'],\n thinkingConfigToMldev(apiClient, fromThinkingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function generateContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['generationConfig'],\n generateContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTaskType = common.getValueByPath(fromObject, ['taskType']);\n if (parentObject !== undefined && fromTaskType != null) {\n common.setValueByPath(\n parentObject,\n ['requests[]', 'taskType'],\n fromTaskType,\n );\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (parentObject !== undefined && fromTitle != null) {\n common.setValueByPath(parentObject, ['requests[]', 'title'], fromTitle);\n }\n\n const fromOutputDimensionality = common.getValueByPath(fromObject, [\n 'outputDimensionality',\n ]);\n if (parentObject !== undefined && fromOutputDimensionality != null) {\n common.setValueByPath(\n parentObject,\n ['requests[]', 'outputDimensionality'],\n fromOutputDimensionality,\n );\n }\n\n if (common.getValueByPath(fromObject, ['mimeType']) !== undefined) {\n throw new Error('mimeType parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['autoTruncate']) !== undefined) {\n throw new Error('autoTruncate parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function embedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n common.setValueByPath(\n toObject,\n ['requests[]', 'content'],\n t.tContentsForEmbed(apiClient, fromContents),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n embedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n const fromModelForEmbedContent = common.getValueByPath(fromObject, ['model']);\n if (fromModelForEmbedContent !== undefined) {\n common.setValueByPath(\n toObject,\n ['requests[]', 'model'],\n t.tModel(apiClient, fromModelForEmbedContent),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {\n throw new Error('outputGcsUri parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['negativePrompt']) !== undefined) {\n throw new Error('negativePrompt parameter is not supported in Gemini API.');\n }\n\n const fromNumberOfImages = common.getValueByPath(fromObject, [\n 'numberOfImages',\n ]);\n if (parentObject !== undefined && fromNumberOfImages != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfImages,\n );\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromGuidanceScale = common.getValueByPath(fromObject, [\n 'guidanceScale',\n ]);\n if (parentObject !== undefined && fromGuidanceScale != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'guidanceScale'],\n fromGuidanceScale,\n );\n }\n\n if (common.getValueByPath(fromObject, ['seed']) !== undefined) {\n throw new Error('seed parameter is not supported in Gemini API.');\n }\n\n const fromSafetyFilterLevel = common.getValueByPath(fromObject, [\n 'safetyFilterLevel',\n ]);\n if (parentObject !== undefined && fromSafetyFilterLevel != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'safetySetting'],\n fromSafetyFilterLevel,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromIncludeSafetyAttributes = common.getValueByPath(fromObject, [\n 'includeSafetyAttributes',\n ]);\n if (parentObject !== undefined && fromIncludeSafetyAttributes != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeSafetyAttributes'],\n fromIncludeSafetyAttributes,\n );\n }\n\n const fromIncludeRaiReason = common.getValueByPath(fromObject, [\n 'includeRaiReason',\n ]);\n if (parentObject !== undefined && fromIncludeRaiReason != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeRaiReason'],\n fromIncludeRaiReason,\n );\n }\n\n const fromLanguage = common.getValueByPath(fromObject, ['language']);\n if (parentObject !== undefined && fromLanguage != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'language'],\n fromLanguage,\n );\n }\n\n const fromOutputMimeType = common.getValueByPath(fromObject, [\n 'outputMimeType',\n ]);\n if (parentObject !== undefined && fromOutputMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'mimeType'],\n fromOutputMimeType,\n );\n }\n\n const fromOutputCompressionQuality = common.getValueByPath(fromObject, [\n 'outputCompressionQuality',\n ]);\n if (parentObject !== undefined && fromOutputCompressionQuality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'compressionQuality'],\n fromOutputCompressionQuality,\n );\n }\n\n if (common.getValueByPath(fromObject, ['addWatermark']) !== undefined) {\n throw new Error('addWatermark parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {\n throw new Error('enhancePrompt parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function generateImagesParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateImagesConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getModelParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetModelParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function countTokensConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensConfig,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['systemInstruction']) !== undefined) {\n throw new Error(\n 'systemInstruction parameter is not supported in Gemini API.',\n );\n }\n\n if (common.getValueByPath(fromObject, ['tools']) !== undefined) {\n throw new Error('tools parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['generationConfig']) !== undefined) {\n throw new Error(\n 'generationConfig parameter is not supported in Gemini API.',\n );\n }\n\n return toObject;\n}\n\nexport function countTokensParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n countTokensConfigToMldev(apiClient, fromConfig),\n );\n }\n\n return toObject;\n}\n\nexport function imageToMldev(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['gcsUri']) !== undefined) {\n throw new Error('gcsUri parameter is not supported in Gemini API.');\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, ['imageBytes']);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['bytesBase64Encoded'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generateVideosConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromNumberOfVideos = common.getValueByPath(fromObject, [\n 'numberOfVideos',\n ]);\n if (parentObject !== undefined && fromNumberOfVideos != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfVideos,\n );\n }\n\n if (common.getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {\n throw new Error('outputGcsUri parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['fps']) !== undefined) {\n throw new Error('fps parameter is not supported in Gemini API.');\n }\n\n const fromDurationSeconds = common.getValueByPath(fromObject, [\n 'durationSeconds',\n ]);\n if (parentObject !== undefined && fromDurationSeconds != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'durationSeconds'],\n fromDurationSeconds,\n );\n }\n\n if (common.getValueByPath(fromObject, ['seed']) !== undefined) {\n throw new Error('seed parameter is not supported in Gemini API.');\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n if (common.getValueByPath(fromObject, ['resolution']) !== undefined) {\n throw new Error('resolution parameter is not supported in Gemini API.');\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n if (common.getValueByPath(fromObject, ['pubsubTopic']) !== undefined) {\n throw new Error('pubsubTopic parameter is not supported in Gemini API.');\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n if (common.getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {\n throw new Error('enhancePrompt parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function generateVideosParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromImage = common.getValueByPath(fromObject, ['image']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['instances[0]', 'image'],\n imageToMldev(apiClient, fromImage),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateVideosConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partToVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToVertex(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n const fromExample = common.getValueByPath(fromObject, ['example']);\n if (fromExample != null) {\n common.setValueByPath(toObject, ['example'], fromExample);\n }\n\n const fromPattern = common.getValueByPath(fromObject, ['pattern']);\n if (fromPattern != null) {\n common.setValueByPath(toObject, ['pattern'], fromPattern);\n }\n\n const fromDefault = common.getValueByPath(fromObject, ['default']);\n if (fromDefault != null) {\n common.setValueByPath(toObject, ['default'], fromDefault);\n }\n\n const fromMaxLength = common.getValueByPath(fromObject, ['maxLength']);\n if (fromMaxLength != null) {\n common.setValueByPath(toObject, ['maxLength'], fromMaxLength);\n }\n\n const fromMinLength = common.getValueByPath(fromObject, ['minLength']);\n if (fromMinLength != null) {\n common.setValueByPath(toObject, ['minLength'], fromMinLength);\n }\n\n const fromMinProperties = common.getValueByPath(fromObject, [\n 'minProperties',\n ]);\n if (fromMinProperties != null) {\n common.setValueByPath(toObject, ['minProperties'], fromMinProperties);\n }\n\n const fromMaxProperties = common.getValueByPath(fromObject, [\n 'maxProperties',\n ]);\n if (fromMaxProperties != null) {\n common.setValueByPath(toObject, ['maxProperties'], fromMaxProperties);\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function modelSelectionConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ModelSelectionConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFeatureSelectionPreference = common.getValueByPath(fromObject, [\n 'featureSelectionPreference',\n ]);\n if (fromFeatureSelectionPreference != null) {\n common.setValueByPath(\n toObject,\n ['featureSelectionPreference'],\n fromFeatureSelectionPreference,\n );\n }\n\n return toObject;\n}\n\nexport function safetySettingToVertex(\n apiClient: ApiClient,\n fromObject: types.SafetySetting,\n): Record {\n const toObject: Record = {};\n\n const fromMethod = common.getValueByPath(fromObject, ['method']);\n if (fromMethod != null) {\n common.setValueByPath(toObject, ['method'], fromMethod);\n }\n\n const fromCategory = common.getValueByPath(fromObject, ['category']);\n if (fromCategory != null) {\n common.setValueByPath(toObject, ['category'], fromCategory);\n }\n\n const fromThreshold = common.getValueByPath(fromObject, ['threshold']);\n if (fromThreshold != null) {\n common.setValueByPath(toObject, ['threshold'], fromThreshold);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n schemaToVertex(apiClient, fromResponse),\n );\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToVertex(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToVertex(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n const fromRetrieval = common.getValueByPath(fromObject, ['retrieval']);\n if (fromRetrieval != null) {\n common.setValueByPath(toObject, ['retrieval'], fromRetrieval);\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToVertex());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function prebuiltVoiceConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.PrebuiltVoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceName = common.getValueByPath(fromObject, ['voiceName']);\n if (fromVoiceName != null) {\n common.setValueByPath(toObject, ['voiceName'], fromVoiceName);\n }\n\n return toObject;\n}\n\nexport function voiceConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.VoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromPrebuiltVoiceConfig = common.getValueByPath(fromObject, [\n 'prebuiltVoiceConfig',\n ]);\n if (fromPrebuiltVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['prebuiltVoiceConfig'],\n prebuiltVoiceConfigToVertex(apiClient, fromPrebuiltVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function speechConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.SpeechConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceConfig = common.getValueByPath(fromObject, ['voiceConfig']);\n if (fromVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['voiceConfig'],\n voiceConfigToVertex(apiClient, fromVoiceConfig),\n );\n }\n\n const fromLanguageCode = common.getValueByPath(fromObject, ['languageCode']);\n if (fromLanguageCode != null) {\n common.setValueByPath(toObject, ['languageCode'], fromLanguageCode);\n }\n\n return toObject;\n}\n\nexport function thinkingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ThinkingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromIncludeThoughts = common.getValueByPath(fromObject, [\n 'includeThoughts',\n ]);\n if (fromIncludeThoughts != null) {\n common.setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);\n }\n\n const fromThinkingBudget = common.getValueByPath(fromObject, [\n 'thinkingBudget',\n ]);\n if (fromThinkingBudget != null) {\n common.setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);\n }\n\n return toObject;\n}\n\nexport function generateContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTemperature = common.getValueByPath(fromObject, ['temperature']);\n if (fromTemperature != null) {\n common.setValueByPath(toObject, ['temperature'], fromTemperature);\n }\n\n const fromTopP = common.getValueByPath(fromObject, ['topP']);\n if (fromTopP != null) {\n common.setValueByPath(toObject, ['topP'], fromTopP);\n }\n\n const fromTopK = common.getValueByPath(fromObject, ['topK']);\n if (fromTopK != null) {\n common.setValueByPath(toObject, ['topK'], fromTopK);\n }\n\n const fromCandidateCount = common.getValueByPath(fromObject, [\n 'candidateCount',\n ]);\n if (fromCandidateCount != null) {\n common.setValueByPath(toObject, ['candidateCount'], fromCandidateCount);\n }\n\n const fromMaxOutputTokens = common.getValueByPath(fromObject, [\n 'maxOutputTokens',\n ]);\n if (fromMaxOutputTokens != null) {\n common.setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);\n }\n\n const fromStopSequences = common.getValueByPath(fromObject, [\n 'stopSequences',\n ]);\n if (fromStopSequences != null) {\n common.setValueByPath(toObject, ['stopSequences'], fromStopSequences);\n }\n\n const fromResponseLogprobs = common.getValueByPath(fromObject, [\n 'responseLogprobs',\n ]);\n if (fromResponseLogprobs != null) {\n common.setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);\n }\n\n const fromLogprobs = common.getValueByPath(fromObject, ['logprobs']);\n if (fromLogprobs != null) {\n common.setValueByPath(toObject, ['logprobs'], fromLogprobs);\n }\n\n const fromPresencePenalty = common.getValueByPath(fromObject, [\n 'presencePenalty',\n ]);\n if (fromPresencePenalty != null) {\n common.setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);\n }\n\n const fromFrequencyPenalty = common.getValueByPath(fromObject, [\n 'frequencyPenalty',\n ]);\n if (fromFrequencyPenalty != null) {\n common.setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (fromSeed != null) {\n common.setValueByPath(toObject, ['seed'], fromSeed);\n }\n\n const fromResponseMimeType = common.getValueByPath(fromObject, [\n 'responseMimeType',\n ]);\n if (fromResponseMimeType != null) {\n common.setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);\n }\n\n const fromResponseSchema = common.getValueByPath(fromObject, [\n 'responseSchema',\n ]);\n if (fromResponseSchema != null) {\n common.setValueByPath(\n toObject,\n ['responseSchema'],\n schemaToVertex(apiClient, t.tSchema(apiClient, fromResponseSchema)),\n );\n }\n\n const fromRoutingConfig = common.getValueByPath(fromObject, [\n 'routingConfig',\n ]);\n if (fromRoutingConfig != null) {\n common.setValueByPath(toObject, ['routingConfig'], fromRoutingConfig);\n }\n\n const fromModelSelectionConfig = common.getValueByPath(fromObject, [\n 'modelSelectionConfig',\n ]);\n if (fromModelSelectionConfig != null) {\n common.setValueByPath(\n toObject,\n ['modelConfig'],\n modelSelectionConfigToVertex(apiClient, fromModelSelectionConfig),\n );\n }\n\n const fromSafetySettings = common.getValueByPath(fromObject, [\n 'safetySettings',\n ]);\n if (parentObject !== undefined && fromSafetySettings != null) {\n if (Array.isArray(fromSafetySettings)) {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings.map((item) => {\n return safetySettingToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings,\n );\n }\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToVertex(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToVertex(apiClient, fromToolConfig),\n );\n }\n\n const fromLabels = common.getValueByPath(fromObject, ['labels']);\n if (parentObject !== undefined && fromLabels != null) {\n common.setValueByPath(parentObject, ['labels'], fromLabels);\n }\n\n const fromCachedContent = common.getValueByPath(fromObject, [\n 'cachedContent',\n ]);\n if (parentObject !== undefined && fromCachedContent != null) {\n common.setValueByPath(\n parentObject,\n ['cachedContent'],\n t.tCachedContentName(apiClient, fromCachedContent),\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities != null) {\n common.setValueByPath(\n toObject,\n ['responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromMediaResolution = common.getValueByPath(fromObject, [\n 'mediaResolution',\n ]);\n if (fromMediaResolution != null) {\n common.setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig != null) {\n common.setValueByPath(\n toObject,\n ['speechConfig'],\n speechConfigToVertex(\n apiClient,\n t.tSpeechConfig(apiClient, fromSpeechConfig),\n ),\n );\n }\n\n const fromAudioTimestamp = common.getValueByPath(fromObject, [\n 'audioTimestamp',\n ]);\n if (fromAudioTimestamp != null) {\n common.setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp);\n }\n\n const fromThinkingConfig = common.getValueByPath(fromObject, [\n 'thinkingConfig',\n ]);\n if (fromThinkingConfig != null) {\n common.setValueByPath(\n toObject,\n ['thinkingConfig'],\n thinkingConfigToVertex(apiClient, fromThinkingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function generateContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['generationConfig'],\n generateContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTaskType = common.getValueByPath(fromObject, ['taskType']);\n if (parentObject !== undefined && fromTaskType != null) {\n common.setValueByPath(\n parentObject,\n ['instances[]', 'task_type'],\n fromTaskType,\n );\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (parentObject !== undefined && fromTitle != null) {\n common.setValueByPath(parentObject, ['instances[]', 'title'], fromTitle);\n }\n\n const fromOutputDimensionality = common.getValueByPath(fromObject, [\n 'outputDimensionality',\n ]);\n if (parentObject !== undefined && fromOutputDimensionality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputDimensionality'],\n fromOutputDimensionality,\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (parentObject !== undefined && fromMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['instances[]', 'mimeType'],\n fromMimeType,\n );\n }\n\n const fromAutoTruncate = common.getValueByPath(fromObject, ['autoTruncate']);\n if (parentObject !== undefined && fromAutoTruncate != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'autoTruncate'],\n fromAutoTruncate,\n );\n }\n\n return toObject;\n}\n\nexport function embedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n common.setValueByPath(\n toObject,\n ['instances[]', 'content'],\n t.tContentsForEmbed(apiClient, fromContents),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n embedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromOutputGcsUri = common.getValueByPath(fromObject, ['outputGcsUri']);\n if (parentObject !== undefined && fromOutputGcsUri != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'storageUri'],\n fromOutputGcsUri,\n );\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n const fromNumberOfImages = common.getValueByPath(fromObject, [\n 'numberOfImages',\n ]);\n if (parentObject !== undefined && fromNumberOfImages != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfImages,\n );\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromGuidanceScale = common.getValueByPath(fromObject, [\n 'guidanceScale',\n ]);\n if (parentObject !== undefined && fromGuidanceScale != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'guidanceScale'],\n fromGuidanceScale,\n );\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (parentObject !== undefined && fromSeed != null) {\n common.setValueByPath(parentObject, ['parameters', 'seed'], fromSeed);\n }\n\n const fromSafetyFilterLevel = common.getValueByPath(fromObject, [\n 'safetyFilterLevel',\n ]);\n if (parentObject !== undefined && fromSafetyFilterLevel != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'safetySetting'],\n fromSafetyFilterLevel,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromIncludeSafetyAttributes = common.getValueByPath(fromObject, [\n 'includeSafetyAttributes',\n ]);\n if (parentObject !== undefined && fromIncludeSafetyAttributes != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeSafetyAttributes'],\n fromIncludeSafetyAttributes,\n );\n }\n\n const fromIncludeRaiReason = common.getValueByPath(fromObject, [\n 'includeRaiReason',\n ]);\n if (parentObject !== undefined && fromIncludeRaiReason != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeRaiReason'],\n fromIncludeRaiReason,\n );\n }\n\n const fromLanguage = common.getValueByPath(fromObject, ['language']);\n if (parentObject !== undefined && fromLanguage != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'language'],\n fromLanguage,\n );\n }\n\n const fromOutputMimeType = common.getValueByPath(fromObject, [\n 'outputMimeType',\n ]);\n if (parentObject !== undefined && fromOutputMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'mimeType'],\n fromOutputMimeType,\n );\n }\n\n const fromOutputCompressionQuality = common.getValueByPath(fromObject, [\n 'outputCompressionQuality',\n ]);\n if (parentObject !== undefined && fromOutputCompressionQuality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'compressionQuality'],\n fromOutputCompressionQuality,\n );\n }\n\n const fromAddWatermark = common.getValueByPath(fromObject, ['addWatermark']);\n if (parentObject !== undefined && fromAddWatermark != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'addWatermark'],\n fromAddWatermark,\n );\n }\n\n const fromEnhancePrompt = common.getValueByPath(fromObject, [\n 'enhancePrompt',\n ]);\n if (parentObject !== undefined && fromEnhancePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'enhancePrompt'],\n fromEnhancePrompt,\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateImagesConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getModelParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetModelParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function countTokensConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (parentObject !== undefined && fromGenerationConfig != null) {\n common.setValueByPath(\n parentObject,\n ['generationConfig'],\n fromGenerationConfig,\n );\n }\n\n return toObject;\n}\n\nexport function countTokensParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n countTokensConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function computeTokensParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.ComputeTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function imageToVertex(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromGcsUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromGcsUri != null) {\n common.setValueByPath(toObject, ['gcsUri'], fromGcsUri);\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, ['imageBytes']);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['bytesBase64Encoded'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generateVideosConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromNumberOfVideos = common.getValueByPath(fromObject, [\n 'numberOfVideos',\n ]);\n if (parentObject !== undefined && fromNumberOfVideos != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfVideos,\n );\n }\n\n const fromOutputGcsUri = common.getValueByPath(fromObject, ['outputGcsUri']);\n if (parentObject !== undefined && fromOutputGcsUri != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'storageUri'],\n fromOutputGcsUri,\n );\n }\n\n const fromFps = common.getValueByPath(fromObject, ['fps']);\n if (parentObject !== undefined && fromFps != null) {\n common.setValueByPath(parentObject, ['parameters', 'fps'], fromFps);\n }\n\n const fromDurationSeconds = common.getValueByPath(fromObject, [\n 'durationSeconds',\n ]);\n if (parentObject !== undefined && fromDurationSeconds != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'durationSeconds'],\n fromDurationSeconds,\n );\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (parentObject !== undefined && fromSeed != null) {\n common.setValueByPath(parentObject, ['parameters', 'seed'], fromSeed);\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromResolution = common.getValueByPath(fromObject, ['resolution']);\n if (parentObject !== undefined && fromResolution != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'resolution'],\n fromResolution,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromPubsubTopic = common.getValueByPath(fromObject, ['pubsubTopic']);\n if (parentObject !== undefined && fromPubsubTopic != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'pubsubTopic'],\n fromPubsubTopic,\n );\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n const fromEnhancePrompt = common.getValueByPath(fromObject, [\n 'enhancePrompt',\n ]);\n if (parentObject !== undefined && fromEnhancePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'enhancePrompt'],\n fromEnhancePrompt,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromImage = common.getValueByPath(fromObject, ['image']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['instances[0]', 'image'],\n imageToVertex(apiClient, fromImage),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateVideosConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partFromMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentFromMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function citationMetadataFromMldev(\n apiClient: ApiClient,\n fromObject: types.CitationMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromCitations = common.getValueByPath(fromObject, ['citationSources']);\n if (fromCitations != null) {\n common.setValueByPath(toObject, ['citations'], fromCitations);\n }\n\n return toObject;\n}\n\nexport function candidateFromMldev(\n apiClient: ApiClient,\n fromObject: types.Candidate,\n): Record {\n const toObject: Record = {};\n\n const fromContent = common.getValueByPath(fromObject, ['content']);\n if (fromContent != null) {\n common.setValueByPath(\n toObject,\n ['content'],\n contentFromMldev(apiClient, fromContent),\n );\n }\n\n const fromCitationMetadata = common.getValueByPath(fromObject, [\n 'citationMetadata',\n ]);\n if (fromCitationMetadata != null) {\n common.setValueByPath(\n toObject,\n ['citationMetadata'],\n citationMetadataFromMldev(apiClient, fromCitationMetadata),\n );\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n const fromFinishReason = common.getValueByPath(fromObject, ['finishReason']);\n if (fromFinishReason != null) {\n common.setValueByPath(toObject, ['finishReason'], fromFinishReason);\n }\n\n const fromAvgLogprobs = common.getValueByPath(fromObject, ['avgLogprobs']);\n if (fromAvgLogprobs != null) {\n common.setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);\n }\n\n const fromGroundingMetadata = common.getValueByPath(fromObject, [\n 'groundingMetadata',\n ]);\n if (fromGroundingMetadata != null) {\n common.setValueByPath(\n toObject,\n ['groundingMetadata'],\n fromGroundingMetadata,\n );\n }\n\n const fromIndex = common.getValueByPath(fromObject, ['index']);\n if (fromIndex != null) {\n common.setValueByPath(toObject, ['index'], fromIndex);\n }\n\n const fromLogprobsResult = common.getValueByPath(fromObject, [\n 'logprobsResult',\n ]);\n if (fromLogprobsResult != null) {\n common.setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult);\n }\n\n const fromSafetyRatings = common.getValueByPath(fromObject, [\n 'safetyRatings',\n ]);\n if (fromSafetyRatings != null) {\n common.setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings);\n }\n\n return toObject;\n}\n\nexport function generateContentResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromCandidates = common.getValueByPath(fromObject, ['candidates']);\n if (fromCandidates != null) {\n if (Array.isArray(fromCandidates)) {\n common.setValueByPath(\n toObject,\n ['candidates'],\n fromCandidates.map((item) => {\n return candidateFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['candidates'], fromCandidates);\n }\n }\n\n const fromModelVersion = common.getValueByPath(fromObject, ['modelVersion']);\n if (fromModelVersion != null) {\n common.setValueByPath(toObject, ['modelVersion'], fromModelVersion);\n }\n\n const fromPromptFeedback = common.getValueByPath(fromObject, [\n 'promptFeedback',\n ]);\n if (fromPromptFeedback != null) {\n common.setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingStatisticsFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function contentEmbeddingFromMldev(\n apiClient: ApiClient,\n fromObject: types.ContentEmbedding,\n): Record {\n const toObject: Record = {};\n\n const fromValues = common.getValueByPath(fromObject, ['values']);\n if (fromValues != null) {\n common.setValueByPath(toObject, ['values'], fromValues);\n }\n\n return toObject;\n}\n\nexport function embedContentMetadataFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function embedContentResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromEmbeddings = common.getValueByPath(fromObject, ['embeddings']);\n if (fromEmbeddings != null) {\n if (Array.isArray(fromEmbeddings)) {\n common.setValueByPath(\n toObject,\n ['embeddings'],\n fromEmbeddings.map((item) => {\n return contentEmbeddingFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['embeddings'], fromEmbeddings);\n }\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(\n toObject,\n ['metadata'],\n embedContentMetadataFromMldev(),\n );\n }\n\n return toObject;\n}\n\nexport function imageFromMldev(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromImageBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['imageBytes'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function safetyAttributesFromMldev(\n apiClient: ApiClient,\n fromObject: types.SafetyAttributes,\n): Record {\n const toObject: Record = {};\n\n const fromCategories = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'categories',\n ]);\n if (fromCategories != null) {\n common.setValueByPath(toObject, ['categories'], fromCategories);\n }\n\n const fromScores = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'scores',\n ]);\n if (fromScores != null) {\n common.setValueByPath(toObject, ['scores'], fromScores);\n }\n\n const fromContentType = common.getValueByPath(fromObject, ['contentType']);\n if (fromContentType != null) {\n common.setValueByPath(toObject, ['contentType'], fromContentType);\n }\n\n return toObject;\n}\n\nexport function generatedImageFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedImage,\n): Record {\n const toObject: Record = {};\n\n const fromImage = common.getValueByPath(fromObject, ['_self']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['image'],\n imageFromMldev(apiClient, fromImage),\n );\n }\n\n const fromRaiFilteredReason = common.getValueByPath(fromObject, [\n 'raiFilteredReason',\n ]);\n if (fromRaiFilteredReason != null) {\n common.setValueByPath(\n toObject,\n ['raiFilteredReason'],\n fromRaiFilteredReason,\n );\n }\n\n const fromSafetyAttributes = common.getValueByPath(fromObject, ['_self']);\n if (fromSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['safetyAttributes'],\n safetyAttributesFromMldev(apiClient, fromSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedImages = common.getValueByPath(fromObject, [\n 'predictions',\n ]);\n if (fromGeneratedImages != null) {\n if (Array.isArray(fromGeneratedImages)) {\n common.setValueByPath(\n toObject,\n ['generatedImages'],\n fromGeneratedImages.map((item) => {\n return generatedImageFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedImages'], fromGeneratedImages);\n }\n }\n\n const fromPositivePromptSafetyAttributes = common.getValueByPath(fromObject, [\n 'positivePromptSafetyAttributes',\n ]);\n if (fromPositivePromptSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['positivePromptSafetyAttributes'],\n safetyAttributesFromMldev(apiClient, fromPositivePromptSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function endpointFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function tunedModelInfoFromMldev(\n apiClient: ApiClient,\n fromObject: types.TunedModelInfo,\n): Record {\n const toObject: Record = {};\n\n const fromBaseModel = common.getValueByPath(fromObject, ['baseModel']);\n if (fromBaseModel != null) {\n common.setValueByPath(toObject, ['baseModel'], fromBaseModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n return toObject;\n}\n\nexport function modelFromMldev(\n apiClient: ApiClient,\n fromObject: types.Model,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromVersion = common.getValueByPath(fromObject, ['version']);\n if (fromVersion != null) {\n common.setValueByPath(toObject, ['version'], fromVersion);\n }\n\n const fromTunedModelInfo = common.getValueByPath(fromObject, ['_self']);\n if (fromTunedModelInfo != null) {\n common.setValueByPath(\n toObject,\n ['tunedModelInfo'],\n tunedModelInfoFromMldev(apiClient, fromTunedModelInfo),\n );\n }\n\n const fromInputTokenLimit = common.getValueByPath(fromObject, [\n 'inputTokenLimit',\n ]);\n if (fromInputTokenLimit != null) {\n common.setValueByPath(toObject, ['inputTokenLimit'], fromInputTokenLimit);\n }\n\n const fromOutputTokenLimit = common.getValueByPath(fromObject, [\n 'outputTokenLimit',\n ]);\n if (fromOutputTokenLimit != null) {\n common.setValueByPath(toObject, ['outputTokenLimit'], fromOutputTokenLimit);\n }\n\n const fromSupportedActions = common.getValueByPath(fromObject, [\n 'supportedGenerationMethods',\n ]);\n if (fromSupportedActions != null) {\n common.setValueByPath(toObject, ['supportedActions'], fromSupportedActions);\n }\n\n return toObject;\n}\n\nexport function countTokensResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTotalTokens = common.getValueByPath(fromObject, ['totalTokens']);\n if (fromTotalTokens != null) {\n common.setValueByPath(toObject, ['totalTokens'], fromTotalTokens);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n return toObject;\n}\n\nexport function videoFromMldev(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['video', 'uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'video',\n 'encodedVideo',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['encoding']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromMldev(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, [\n 'generatedSamples',\n ]);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromMldev(apiClient, fromResponse),\n );\n }\n\n return toObject;\n}\n\nexport function partFromVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentFromVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function citationMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.CitationMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromCitations = common.getValueByPath(fromObject, ['citations']);\n if (fromCitations != null) {\n common.setValueByPath(toObject, ['citations'], fromCitations);\n }\n\n return toObject;\n}\n\nexport function candidateFromVertex(\n apiClient: ApiClient,\n fromObject: types.Candidate,\n): Record {\n const toObject: Record = {};\n\n const fromContent = common.getValueByPath(fromObject, ['content']);\n if (fromContent != null) {\n common.setValueByPath(\n toObject,\n ['content'],\n contentFromVertex(apiClient, fromContent),\n );\n }\n\n const fromCitationMetadata = common.getValueByPath(fromObject, [\n 'citationMetadata',\n ]);\n if (fromCitationMetadata != null) {\n common.setValueByPath(\n toObject,\n ['citationMetadata'],\n citationMetadataFromVertex(apiClient, fromCitationMetadata),\n );\n }\n\n const fromFinishMessage = common.getValueByPath(fromObject, [\n 'finishMessage',\n ]);\n if (fromFinishMessage != null) {\n common.setValueByPath(toObject, ['finishMessage'], fromFinishMessage);\n }\n\n const fromFinishReason = common.getValueByPath(fromObject, ['finishReason']);\n if (fromFinishReason != null) {\n common.setValueByPath(toObject, ['finishReason'], fromFinishReason);\n }\n\n const fromAvgLogprobs = common.getValueByPath(fromObject, ['avgLogprobs']);\n if (fromAvgLogprobs != null) {\n common.setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);\n }\n\n const fromGroundingMetadata = common.getValueByPath(fromObject, [\n 'groundingMetadata',\n ]);\n if (fromGroundingMetadata != null) {\n common.setValueByPath(\n toObject,\n ['groundingMetadata'],\n fromGroundingMetadata,\n );\n }\n\n const fromIndex = common.getValueByPath(fromObject, ['index']);\n if (fromIndex != null) {\n common.setValueByPath(toObject, ['index'], fromIndex);\n }\n\n const fromLogprobsResult = common.getValueByPath(fromObject, [\n 'logprobsResult',\n ]);\n if (fromLogprobsResult != null) {\n common.setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult);\n }\n\n const fromSafetyRatings = common.getValueByPath(fromObject, [\n 'safetyRatings',\n ]);\n if (fromSafetyRatings != null) {\n common.setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings);\n }\n\n return toObject;\n}\n\nexport function generateContentResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromCandidates = common.getValueByPath(fromObject, ['candidates']);\n if (fromCandidates != null) {\n if (Array.isArray(fromCandidates)) {\n common.setValueByPath(\n toObject,\n ['candidates'],\n fromCandidates.map((item) => {\n return candidateFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['candidates'], fromCandidates);\n }\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromResponseId = common.getValueByPath(fromObject, ['responseId']);\n if (fromResponseId != null) {\n common.setValueByPath(toObject, ['responseId'], fromResponseId);\n }\n\n const fromModelVersion = common.getValueByPath(fromObject, ['modelVersion']);\n if (fromModelVersion != null) {\n common.setValueByPath(toObject, ['modelVersion'], fromModelVersion);\n }\n\n const fromPromptFeedback = common.getValueByPath(fromObject, [\n 'promptFeedback',\n ]);\n if (fromPromptFeedback != null) {\n common.setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingStatisticsFromVertex(\n apiClient: ApiClient,\n fromObject: types.ContentEmbeddingStatistics,\n): Record {\n const toObject: Record = {};\n\n const fromTruncated = common.getValueByPath(fromObject, ['truncated']);\n if (fromTruncated != null) {\n common.setValueByPath(toObject, ['truncated'], fromTruncated);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['token_count']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingFromVertex(\n apiClient: ApiClient,\n fromObject: types.ContentEmbedding,\n): Record {\n const toObject: Record = {};\n\n const fromValues = common.getValueByPath(fromObject, ['values']);\n if (fromValues != null) {\n common.setValueByPath(toObject, ['values'], fromValues);\n }\n\n const fromStatistics = common.getValueByPath(fromObject, ['statistics']);\n if (fromStatistics != null) {\n common.setValueByPath(\n toObject,\n ['statistics'],\n contentEmbeddingStatisticsFromVertex(apiClient, fromStatistics),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromBillableCharacterCount = common.getValueByPath(fromObject, [\n 'billableCharacterCount',\n ]);\n if (fromBillableCharacterCount != null) {\n common.setValueByPath(\n toObject,\n ['billableCharacterCount'],\n fromBillableCharacterCount,\n );\n }\n\n return toObject;\n}\n\nexport function embedContentResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromEmbeddings = common.getValueByPath(fromObject, [\n 'predictions[]',\n 'embeddings',\n ]);\n if (fromEmbeddings != null) {\n if (Array.isArray(fromEmbeddings)) {\n common.setValueByPath(\n toObject,\n ['embeddings'],\n fromEmbeddings.map((item) => {\n return contentEmbeddingFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['embeddings'], fromEmbeddings);\n }\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(\n toObject,\n ['metadata'],\n embedContentMetadataFromVertex(apiClient, fromMetadata),\n );\n }\n\n return toObject;\n}\n\nexport function imageFromVertex(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromGcsUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromGcsUri != null) {\n common.setValueByPath(toObject, ['gcsUri'], fromGcsUri);\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['imageBytes'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function safetyAttributesFromVertex(\n apiClient: ApiClient,\n fromObject: types.SafetyAttributes,\n): Record {\n const toObject: Record = {};\n\n const fromCategories = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'categories',\n ]);\n if (fromCategories != null) {\n common.setValueByPath(toObject, ['categories'], fromCategories);\n }\n\n const fromScores = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'scores',\n ]);\n if (fromScores != null) {\n common.setValueByPath(toObject, ['scores'], fromScores);\n }\n\n const fromContentType = common.getValueByPath(fromObject, ['contentType']);\n if (fromContentType != null) {\n common.setValueByPath(toObject, ['contentType'], fromContentType);\n }\n\n return toObject;\n}\n\nexport function generatedImageFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedImage,\n): Record {\n const toObject: Record = {};\n\n const fromImage = common.getValueByPath(fromObject, ['_self']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['image'],\n imageFromVertex(apiClient, fromImage),\n );\n }\n\n const fromRaiFilteredReason = common.getValueByPath(fromObject, [\n 'raiFilteredReason',\n ]);\n if (fromRaiFilteredReason != null) {\n common.setValueByPath(\n toObject,\n ['raiFilteredReason'],\n fromRaiFilteredReason,\n );\n }\n\n const fromSafetyAttributes = common.getValueByPath(fromObject, ['_self']);\n if (fromSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['safetyAttributes'],\n safetyAttributesFromVertex(apiClient, fromSafetyAttributes),\n );\n }\n\n const fromEnhancedPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromEnhancedPrompt != null) {\n common.setValueByPath(toObject, ['enhancedPrompt'], fromEnhancedPrompt);\n }\n\n return toObject;\n}\n\nexport function generateImagesResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedImages = common.getValueByPath(fromObject, [\n 'predictions',\n ]);\n if (fromGeneratedImages != null) {\n if (Array.isArray(fromGeneratedImages)) {\n common.setValueByPath(\n toObject,\n ['generatedImages'],\n fromGeneratedImages.map((item) => {\n return generatedImageFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedImages'], fromGeneratedImages);\n }\n }\n\n const fromPositivePromptSafetyAttributes = common.getValueByPath(fromObject, [\n 'positivePromptSafetyAttributes',\n ]);\n if (fromPositivePromptSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['positivePromptSafetyAttributes'],\n safetyAttributesFromVertex(apiClient, fromPositivePromptSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function endpointFromVertex(\n apiClient: ApiClient,\n fromObject: types.Endpoint,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['endpoint']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDeployedModelId = common.getValueByPath(fromObject, [\n 'deployedModelId',\n ]);\n if (fromDeployedModelId != null) {\n common.setValueByPath(toObject, ['deployedModelId'], fromDeployedModelId);\n }\n\n return toObject;\n}\n\nexport function tunedModelInfoFromVertex(\n apiClient: ApiClient,\n fromObject: types.TunedModelInfo,\n): Record {\n const toObject: Record = {};\n\n const fromBaseModel = common.getValueByPath(fromObject, [\n 'labels',\n 'google-vertex-llm-tuning-base-model-id',\n ]);\n if (fromBaseModel != null) {\n common.setValueByPath(toObject, ['baseModel'], fromBaseModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n return toObject;\n}\n\nexport function modelFromVertex(\n apiClient: ApiClient,\n fromObject: types.Model,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromVersion = common.getValueByPath(fromObject, ['versionId']);\n if (fromVersion != null) {\n common.setValueByPath(toObject, ['version'], fromVersion);\n }\n\n const fromEndpoints = common.getValueByPath(fromObject, ['deployedModels']);\n if (fromEndpoints != null) {\n if (Array.isArray(fromEndpoints)) {\n common.setValueByPath(\n toObject,\n ['endpoints'],\n fromEndpoints.map((item) => {\n return endpointFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['endpoints'], fromEndpoints);\n }\n }\n\n const fromLabels = common.getValueByPath(fromObject, ['labels']);\n if (fromLabels != null) {\n common.setValueByPath(toObject, ['labels'], fromLabels);\n }\n\n const fromTunedModelInfo = common.getValueByPath(fromObject, ['_self']);\n if (fromTunedModelInfo != null) {\n common.setValueByPath(\n toObject,\n ['tunedModelInfo'],\n tunedModelInfoFromVertex(apiClient, fromTunedModelInfo),\n );\n }\n\n return toObject;\n}\n\nexport function countTokensResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTotalTokens = common.getValueByPath(fromObject, ['totalTokens']);\n if (fromTotalTokens != null) {\n common.setValueByPath(toObject, ['totalTokens'], fromTotalTokens);\n }\n\n return toObject;\n}\n\nexport function computeTokensResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.ComputeTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTokensInfo = common.getValueByPath(fromObject, ['tokensInfo']);\n if (fromTokensInfo != null) {\n common.setValueByPath(toObject, ['tokensInfo'], fromTokensInfo);\n }\n\n return toObject;\n}\n\nexport function videoFromVertex(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromVertex(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, ['videos']);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromVertex(apiClient, fromResponse),\n );\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Live client.\n *\n * @experimental\n */\n\nimport {ApiClient} from './_api_client';\nimport {Auth} from './_auth';\nimport * as t from './_transformers';\nimport {WebSocket, WebSocketCallbacks, WebSocketFactory} from './_websocket';\nimport * as converters from './converters/_live_converters';\nimport {contentToMldev, contentToVertex} from './converters/_models_converters';\nimport * as types from './types';\n\nconst FUNCTION_RESPONSE_REQUIRES_ID =\n 'FunctionResponse request must have an `id` field from the response of a ToolCall.FunctionalCalls in Google AI.';\n\n/**\n * Handles incoming messages from the WebSocket.\n *\n * @remarks\n * This function is responsible for parsing incoming messages, transforming them\n * into LiveServerMessages, and then calling the onmessage callback. Note that\n * the first message which is received from the server is a setupComplete\n * message.\n *\n * @param apiClient The ApiClient instance.\n * @param onmessage The user-provided onmessage callback (if any).\n * @param event The MessageEvent from the WebSocket.\n */\nasync function handleWebSocketMessage(\n apiClient: ApiClient,\n onmessage: (msg: types.LiveServerMessage) => void,\n event: MessageEvent,\n): Promise {\n let serverMessage: types.LiveServerMessage;\n let data: types.LiveServerMessage;\n if (event.data instanceof Blob) {\n data = JSON.parse(await event.data.text()) as types.LiveServerMessage;\n } else {\n data = JSON.parse(event.data) as types.LiveServerMessage;\n }\n if (apiClient.isVertexAI()) {\n serverMessage = converters.liveServerMessageFromVertex(apiClient, data);\n } else {\n serverMessage = converters.liveServerMessageFromMldev(apiClient, data);\n }\n\n onmessage(serverMessage);\n}\n\n/**\n Live class encapsulates the configuration for live interaction with the\n Generative Language API. It embeds ApiClient for general API settings.\n\n @experimental\n */\nexport class Live {\n constructor(\n private readonly apiClient: ApiClient,\n private readonly auth: Auth,\n private readonly webSocketFactory: WebSocketFactory,\n ) {}\n\n /**\n Establishes a connection to the specified model with the given\n configuration and returns a Session object representing that connection.\n\n @experimental\n\n @remarks\n\n @param params - The parameters for establishing a connection to the model.\n @return A live session.\n\n @example\n ```ts\n let model: string;\n if (GOOGLE_GENAI_USE_VERTEXAI) {\n model = 'gemini-2.0-flash-live-preview-04-09';\n } else {\n model = 'gemini-2.0-flash-live-001';\n }\n const session = await ai.live.connect({\n model: model,\n config: {\n responseModalities: [Modality.AUDIO],\n },\n callbacks: {\n onopen: () => {\n console.log('Connected to the socket.');\n },\n onmessage: (e: MessageEvent) => {\n console.log('Received message from the server: %s\\n', debug(e.data));\n },\n onerror: (e: ErrorEvent) => {\n console.log('Error occurred: %s\\n', debug(e.error));\n },\n onclose: (e: CloseEvent) => {\n console.log('Connection closed.');\n },\n },\n });\n ```\n */\n async connect(params: types.LiveConnectParameters): Promise {\n const websocketBaseUrl = this.apiClient.getWebsocketBaseUrl();\n const apiVersion = this.apiClient.getApiVersion();\n let url: string;\n const headers = mapToHeaders(this.apiClient.getDefaultHeaders());\n if (this.apiClient.isVertexAI()) {\n url = `${websocketBaseUrl}/ws/google.cloud.aiplatform.${\n apiVersion\n }.LlmBidiService/BidiGenerateContent`;\n await this.auth.addAuthHeaders(headers);\n } else {\n const apiKey = this.apiClient.getApiKey();\n url = `${websocketBaseUrl}/ws/google.ai.generativelanguage.${\n apiVersion\n }.GenerativeService.BidiGenerateContent?key=${apiKey}`;\n }\n\n let onopenResolve: (value: unknown) => void = () => {};\n const onopenPromise = new Promise((resolve: (value: unknown) => void) => {\n onopenResolve = resolve;\n });\n\n const callbacks: types.LiveCallbacks = params.callbacks;\n\n const onopenAwaitedCallback = function () {\n callbacks?.onopen?.();\n onopenResolve({});\n };\n\n const apiClient = this.apiClient;\n\n const websocketCallbacks: WebSocketCallbacks = {\n onopen: onopenAwaitedCallback,\n onmessage: (event: MessageEvent) => {\n void handleWebSocketMessage(apiClient, callbacks.onmessage, event);\n },\n onerror:\n callbacks?.onerror ??\n function (e: ErrorEvent) {\n void e;\n },\n onclose:\n callbacks?.onclose ??\n function (e: CloseEvent) {\n void e;\n },\n };\n\n const conn = this.webSocketFactory.create(\n url,\n headersToMap(headers),\n websocketCallbacks,\n );\n conn.connect();\n // Wait for the websocket to open before sending requests.\n await onopenPromise;\n\n let transformedModel = t.tModel(this.apiClient, params.model);\n if (\n this.apiClient.isVertexAI() &&\n transformedModel.startsWith('publishers/')\n ) {\n const project = this.apiClient.getProject();\n const location = this.apiClient.getLocation();\n transformedModel =\n `projects/${project}/locations/${location}/` + transformedModel;\n }\n\n let clientMessage: Record = {};\n\n if (\n this.apiClient.isVertexAI() &&\n params.config?.responseModalities === undefined\n ) {\n // Set default to AUDIO to align with MLDev API.\n if (params.config === undefined) {\n params.config = {responseModalities: [types.Modality.AUDIO]};\n } else {\n params.config.responseModalities = [types.Modality.AUDIO];\n }\n }\n const liveConnectParameters: types.LiveConnectParameters = {\n model: transformedModel,\n config: params.config,\n callbacks: params.callbacks,\n };\n if (this.apiClient.isVertexAI()) {\n clientMessage = converters.liveConnectParametersToVertex(\n this.apiClient,\n liveConnectParameters,\n );\n } else {\n clientMessage = converters.liveConnectParametersToMldev(\n this.apiClient,\n liveConnectParameters,\n );\n }\n delete clientMessage['config'];\n conn.send(JSON.stringify(clientMessage));\n return new Session(conn, this.apiClient);\n }\n}\n\nconst defaultLiveSendClientContentParamerters: types.LiveSendClientContentParameters =\n {\n turnComplete: true,\n };\n\n/**\n Represents a connection to the API.\n\n @experimental\n */\nexport class Session {\n constructor(\n readonly conn: WebSocket,\n private readonly apiClient: ApiClient,\n ) {}\n\n private tLiveClientContent(\n apiClient: ApiClient,\n params: types.LiveSendClientContentParameters,\n ): types.LiveClientMessage {\n if (params.turns !== null && params.turns !== undefined) {\n let contents: types.Content[] = [];\n try {\n contents = t.tContents(\n apiClient,\n params.turns as types.ContentListUnion,\n );\n if (apiClient.isVertexAI()) {\n contents = contents.map((item) => contentToVertex(apiClient, item));\n } else {\n contents = contents.map((item) => contentToMldev(apiClient, item));\n }\n } catch {\n throw new Error(\n `Failed to parse client content \"turns\", type: '${typeof params.turns}'`,\n );\n }\n return {\n clientContent: {turns: contents, turnComplete: params.turnComplete},\n };\n }\n\n return {\n clientContent: {turnComplete: params.turnComplete},\n };\n }\n\n private tLiveClientRealtimeInput(\n apiClient: ApiClient,\n params: types.LiveSendRealtimeInputParameters,\n ): types.LiveClientMessage {\n let clientMessage: types.LiveClientMessage = {};\n if (!('media' in params) || !params.media) {\n throw new Error(\n `Failed to convert realtime input \"media\", type: '${typeof params.media}'`,\n );\n }\n\n // LiveClientRealtimeInput\n clientMessage = {\n realtimeInput: {\n mediaChunks: [params.media],\n activityStart: params.activityStart,\n activityEnd: params.activityEnd,\n },\n };\n return clientMessage;\n }\n\n private tLiveClienttToolResponse(\n apiClient: ApiClient,\n params: types.LiveSendToolResponseParameters,\n ): types.LiveClientMessage {\n let functionResponses: types.FunctionResponse[] = [];\n\n if (params.functionResponses == null) {\n throw new Error('functionResponses is required.');\n }\n\n if (!Array.isArray(params.functionResponses)) {\n functionResponses = [params.functionResponses];\n } else {\n functionResponses = params.functionResponses;\n }\n\n if (functionResponses.length === 0) {\n throw new Error('functionResponses is required.');\n }\n\n for (const functionResponse of functionResponses) {\n if (\n typeof functionResponse !== 'object' ||\n functionResponse === null ||\n !('name' in functionResponse) ||\n !('response' in functionResponse)\n ) {\n throw new Error(\n `Could not parse function response, type '${typeof functionResponse}'.`,\n );\n }\n if (!apiClient.isVertexAI() && !('id' in functionResponse)) {\n throw new Error(FUNCTION_RESPONSE_REQUIRES_ID);\n }\n }\n\n const clientMessage: types.LiveClientMessage = {\n toolResponse: {functionResponses: functionResponses},\n };\n return clientMessage;\n }\n\n /**\n Send a message over the established connection.\n\n @param params - Contains two **optional** properties, `turns` and\n `turnComplete`.\n\n - `turns` will be converted to a `Content[]`\n - `turnComplete: true` [default] indicates that you are done sending\n content and expect a response. If `turnComplete: false`, the server\n will wait for additional messages before starting generation.\n\n @experimental\n\n @remarks\n There are two ways to send messages to the live API:\n `sendClientContent` and `sendRealtimeInput`.\n\n `sendClientContent` messages are added to the model context **in order**.\n Having a conversation using `sendClientContent` messages is roughly\n equivalent to using the `Chat.sendMessageStream`, except that the state of\n the `chat` history is stored on the API server instead of locally.\n\n Because of `sendClientContent`'s order guarantee, the model cannot respons\n as quickly to `sendClientContent` messages as to `sendRealtimeInput`\n messages. This makes the biggest difference when sending objects that have\n significant preprocessing time (typically images).\n\n The `sendClientContent` message sends a `Content[]`\n which has more options than the `Blob` sent by `sendRealtimeInput`.\n\n So the main use-cases for `sendClientContent` over `sendRealtimeInput` are:\n\n - Sending anything that can't be represented as a `Blob` (text,\n `sendClientContent({turns=\"Hello?\"}`)).\n - Managing turns when not using audio input and voice activity detection.\n (`sendClientContent({turnComplete:true})` or the short form\n `sendClientContent()`)\n - Prefilling a conversation context\n ```\n sendClientContent({\n turns: [\n Content({role:user, parts:...}),\n Content({role:user, parts:...}),\n ...\n ]\n })\n ```\n @experimental\n */\n sendClientContent(params: types.LiveSendClientContentParameters) {\n params = {\n ...defaultLiveSendClientContentParamerters,\n ...params,\n };\n\n const clientMessage: types.LiveClientMessage = this.tLiveClientContent(\n this.apiClient,\n params,\n );\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Send a realtime message over the established connection.\n\n @param params - Contains one property, `media`.\n\n - `media` will be converted to a `Blob`\n\n @experimental\n\n @remarks\n Use `sendRealtimeInput` for realtime audio chunks and video frames (images).\n\n With `sendRealtimeInput` the api will respond to audio automatically\n based on voice activity detection (VAD).\n\n `sendRealtimeInput` is optimized for responsivness at the expense of\n deterministic ordering guarantees. Audio and video tokens are to the\n context when they become available.\n\n Note: The Call signature expects a `Blob` object, but only a subset\n of audio and image mimetypes are allowed.\n */\n sendRealtimeInput(params: types.LiveSendRealtimeInputParameters) {\n if (params.media == null) {\n throw new Error('Media is required.');\n }\n\n const clientMessage: types.LiveClientMessage =\n this.tLiveClientRealtimeInput(this.apiClient, params);\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Send a function response message over the established connection.\n\n @param params - Contains property `functionResponses`.\n\n - `functionResponses` will be converted to a `functionResponses[]`\n\n @remarks\n Use `sendFunctionResponse` to reply to `LiveServerToolCall` from the server.\n\n Use {@link types.LiveConnectConfig#tools} to configure the callable functions.\n\n @experimental\n */\n sendToolResponse(params: types.LiveSendToolResponseParameters) {\n if (params.functionResponses == null) {\n throw new Error('Tool response parameters are required.');\n }\n\n const clientMessage: types.LiveClientMessage =\n this.tLiveClienttToolResponse(this.apiClient, params);\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Terminates the WebSocket connection.\n\n @experimental\n\n @example\n ```ts\n let model: string;\n if (GOOGLE_GENAI_USE_VERTEXAI) {\n model = 'gemini-2.0-flash-live-preview-04-09';\n } else {\n model = 'gemini-2.0-flash-live-001';\n }\n const session = await ai.live.connect({\n model: model,\n config: {\n responseModalities: [Modality.AUDIO],\n }\n });\n\n session.close();\n ```\n */\n close() {\n this.conn.close();\n }\n}\n\n// Converts an headers object to a \"map\" object as expected by the WebSocket\n// constructor. We use this as the Auth interface works with Headers objects\n// while the WebSocket constructor takes a map.\nfunction headersToMap(headers: Headers): Record {\n const headerMap: Record = {};\n headers.forEach((value, key) => {\n headerMap[key] = value;\n });\n return headerMap;\n}\n\n// Converts a \"map\" object to a headers object. We use this as the Auth\n// interface works with Headers objects while the API client default headers\n// returns a map.\nfunction mapToHeaders(map: Record): Headers {\n const headers = new Headers();\n for (const [key, value] of Object.entries(map)) {\n headers.append(key, value);\n }\n return headers;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_models_converters';\nimport * as types from './types';\n\nexport class Models extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Makes an API request to generate content with a given model.\n *\n * For the `model` parameter, supported formats for Vertex AI API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The full resource name starts with 'projects/', for example:\n * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'\n * - The partial resource name with 'publishers/', for example:\n * 'publishers/google/models/gemini-2.0-flash' or\n * 'publishers/meta/models/llama-3.1-405b-instruct-maas'\n * - `/` separated publisher and model name, for example:\n * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas'\n *\n * For the `model` parameter, supported formats for Gemini API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The model name starts with 'models/', for example:\n * 'models/gemini-2.0-flash'\n * - For tuned models, the model name starts with 'tunedModels/',\n * for example:\n * 'tunedModels/1234567890123456789'\n *\n * Some models support multimodal input and output.\n *\n * @param params - The parameters for generating content.\n * @return The response from generating content.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents: 'why is the sky blue?',\n * config: {\n * candidateCount: 2,\n * }\n * });\n * console.log(response);\n * ```\n */\n generateContent = async (\n params: types.GenerateContentParameters,\n ): Promise => {\n return await this.generateContentInternal(params);\n };\n\n /**\n * Makes an API request to generate content with a given model and yields the\n * response in chunks.\n *\n * For the `model` parameter, supported formats for Vertex AI API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The full resource name starts with 'projects/', for example:\n * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'\n * - The partial resource name with 'publishers/', for example:\n * 'publishers/google/models/gemini-2.0-flash' or\n * 'publishers/meta/models/llama-3.1-405b-instruct-maas'\n * - `/` separated publisher and model name, for example:\n * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas'\n *\n * For the `model` parameter, supported formats for Gemini API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The model name starts with 'models/', for example:\n * 'models/gemini-2.0-flash'\n * - For tuned models, the model name starts with 'tunedModels/',\n * for example:\n * 'tunedModels/1234567890123456789'\n *\n * Some models support multimodal input and output.\n *\n * @param params - The parameters for generating content with streaming response.\n * @return The response from generating content.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContentStream({\n * model: 'gemini-2.0-flash',\n * contents: 'why is the sky blue?',\n * config: {\n * maxOutputTokens: 200,\n * }\n * });\n * for await (const chunk of response) {\n * console.log(chunk);\n * }\n * ```\n */\n generateContentStream = async (\n params: types.GenerateContentParameters,\n ): Promise> => {\n return await this.generateContentStreamInternal(params);\n };\n\n /**\n * Generates an image based on a text description and configuration.\n *\n * @param model - The model to use.\n * @param prompt - A text description of the image to generate.\n * @param [config] - The config for image generation.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await client.models.generateImages({\n * model: 'imagen-3.0-generate-002',\n * prompt: 'Robot holding a red skateboard',\n * config: {\n * numberOfImages: 1,\n * includeRaiReason: true,\n * },\n * });\n * console.log(response?.generatedImages?.[0]?.image?.imageBytes);\n * ```\n */\n generateImages = async (\n params: types.GenerateImagesParameters,\n ): Promise => {\n return await this.generateImagesInternal(params).then((apiResponse) => {\n let positivePromptSafetyAttributes;\n const generatedImages = [];\n\n if (apiResponse?.generatedImages) {\n for (const generatedImage of apiResponse.generatedImages) {\n if (\n generatedImage &&\n generatedImage?.safetyAttributes &&\n generatedImage?.safetyAttributes?.contentType === 'Positive Prompt'\n ) {\n positivePromptSafetyAttributes = generatedImage?.safetyAttributes;\n } else {\n generatedImages.push(generatedImage);\n }\n }\n }\n let response: types.GenerateImagesResponse;\n\n if (positivePromptSafetyAttributes) {\n response = {\n generatedImages: generatedImages,\n positivePromptSafetyAttributes: positivePromptSafetyAttributes,\n };\n } else {\n response = {\n generatedImages: generatedImages,\n };\n }\n return response;\n });\n };\n\n private async generateContentInternal(\n params: types.GenerateContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:generateContent',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateContentResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.generateContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:generateContent',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateContentResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n private async generateContentStreamInternal(\n params: types.GenerateContentParameters,\n ): Promise> {\n let response: Promise>;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:streamGenerateContent?alt=sse',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n const apiClient = this.apiClient;\n response = apiClient.requestStream({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n }) as Promise>;\n\n return response.then(async function* (\n apiResponse: AsyncGenerator,\n ) {\n for await (const chunk of apiResponse) {\n const resp = converters.generateContentResponseFromVertex(\n apiClient,\n (await chunk.json()) as types.GenerateContentResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n yield typedResp;\n }\n });\n } else {\n const body = converters.generateContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:streamGenerateContent?alt=sse',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n const apiClient = this.apiClient;\n response = apiClient.requestStream({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n }) as Promise>;\n\n return response.then(async function* (\n apiResponse: AsyncGenerator,\n ) {\n for await (const chunk of apiResponse) {\n const resp = converters.generateContentResponseFromMldev(\n apiClient,\n (await chunk.json()) as types.GenerateContentResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n yield typedResp;\n }\n });\n }\n }\n\n /**\n * Calculates embeddings for the given contents. Only text is supported.\n *\n * @param params - The parameters for embedding contents.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.embedContent({\n * model: 'text-embedding-004',\n * contents: [\n * 'What is your name?',\n * 'What is your favorite color?',\n * ],\n * config: {\n * outputDimensionality: 64,\n * },\n * });\n * console.log(response);\n * ```\n */\n async embedContent(\n params: types.EmbedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.embedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.embedContentResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.EmbedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.embedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:batchEmbedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.embedContentResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.EmbedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Generates an image based on a text description and configuration.\n *\n * @param params - The parameters for generating images.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateImages({\n * model: 'imagen-3.0-generate-002',\n * prompt: 'Robot holding a red skateboard',\n * config: {\n * numberOfImages: 1,\n * includeRaiReason: true,\n * },\n * });\n * console.log(response?.generatedImages?.[0]?.image?.imageBytes);\n * ```\n */\n private async generateImagesInternal(\n params: types.GenerateImagesParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateImagesParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateImagesResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateImagesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.generateImagesParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateImagesResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateImagesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Fetches information about a model by name.\n *\n * @example\n * ```ts\n * const modelInfo = await ai.models.get({model: 'gemini-2.0-flash'});\n * ```\n */\n async get(params: types.GetModelParameters): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getModelParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.modelFromVertex(this.apiClient, apiResponse);\n\n return resp as types.Model;\n });\n } else {\n const body = converters.getModelParametersToMldev(this.apiClient, params);\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.modelFromMldev(this.apiClient, apiResponse);\n\n return resp as types.Model;\n });\n }\n }\n\n /**\n * Counts the number of tokens in the given contents. Multimodal input is\n * supported for Gemini models.\n *\n * @param params - The parameters for counting tokens.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.countTokens({\n * model: 'gemini-2.0-flash',\n * contents: 'The quick brown fox jumps over the lazy dog.'\n * });\n * console.log(response);\n * ```\n */\n async countTokens(\n params: types.CountTokensParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.countTokensParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:countTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.countTokensResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.CountTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.countTokensParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:countTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.countTokensResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.CountTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Given a list of contents, returns a corresponding TokensInfo containing\n * the list of tokens and list of token ids.\n *\n * This method is not supported by the Gemini Developer API.\n *\n * @param params - The parameters for computing tokens.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.computeTokens({\n * model: 'gemini-2.0-flash',\n * contents: 'What is your name?'\n * });\n * console.log(response);\n * ```\n */\n async computeTokens(\n params: types.ComputeTokensParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.computeTokensParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:computeTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.computeTokensResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ComputeTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n throw new Error('This method is only supported by the Vertex AI.');\n }\n }\n\n /**\n * Generates videos based on a text description and configuration.\n *\n * @param params - The parameters for generating videos.\n * @return A Promise which allows you to track the progress and eventually retrieve the generated videos using the operations.get method.\n *\n * @example\n * ```ts\n * const operation = await ai.models.generateVideos({\n * model: 'veo-2.0-generate-001',\n * prompt: 'A neon hologram of a cat driving at top speed',\n * config: {\n * numberOfVideos: 1\n * });\n *\n * while (!operation.done) {\n * await new Promise(resolve => setTimeout(resolve, 10000));\n * operation = await ai.operations.getVideosOperation({operation: operation});\n * }\n *\n * console.log(operation.response?.generatedVideos?.[0]?.video?.uri);\n * ```\n */\n\n async generateVideos(\n params: types.GenerateVideosParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateVideosParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predictLongRunning',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n const body = converters.generateVideosParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predictLongRunning',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function getOperationParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'operationName'],\n fromOperationName,\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function getOperationParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'operationName'],\n fromOperationName,\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function fetchPredictOperationParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.FetchPredictOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(toObject, ['operationName'], fromOperationName);\n }\n\n const fromResourceName = common.getValueByPath(fromObject, ['resourceName']);\n if (fromResourceName != null) {\n common.setValueByPath(toObject, ['_url', 'resourceName'], fromResourceName);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function videoFromMldev(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['video', 'uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'video',\n 'encodedVideo',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['encoding']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromMldev(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, [\n 'generatedSamples',\n ]);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromMldev(apiClient, fromResponse),\n );\n }\n\n return toObject;\n}\n\nexport function videoFromVertex(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromVertex(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, ['videos']);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromVertex(apiClient, fromResponse),\n );\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_operations_converters';\nimport * as types from './types';\n\nexport class Operations extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Gets the status of a long-running operation.\n *\n * @param parameters The parameters for the get operation request.\n * @return The updated Operation object, with the latest status or result.\n */\n async getVideosOperation(\n parameters: types.OperationGetParameters,\n ): Promise {\n const operation = parameters.operation;\n const config = parameters.config;\n\n if (operation.name === undefined || operation.name === '') {\n throw new Error('Operation name is required.');\n }\n\n if (this.apiClient.isVertexAI()) {\n const resourceName = operation.name.split('/operations/')[0];\n let httpOptions: types.HttpOptions | undefined = undefined;\n\n if (config && 'httpOptions' in config) {\n httpOptions = config.httpOptions;\n }\n\n return this.fetchPredictVideosOperationInternal({\n operationName: operation.name,\n resourceName: resourceName,\n config: {httpOptions: httpOptions},\n });\n } else {\n return this.getVideosOperationInternal({\n operationName: operation.name,\n config: config,\n });\n }\n }\n\n private async getVideosOperationInternal(\n params: types.GetOperationParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getOperationParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{operationName}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n const body = converters.getOperationParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{operationName}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n }\n }\n\n private async fetchPredictVideosOperationInternal(\n params: types.FetchPredictOperationParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.fetchPredictOperationParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{resourceName}:fetchPredictOperation',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n throw new Error('This method is only supported by the Vertex AI.');\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {Auth} from '../_auth';\n\nexport const GOOGLE_API_KEY_HEADER = 'x-goog-api-key';\n// TODO(b/395122533): We need a secure client side authentication mechanism.\nexport class WebAuth implements Auth {\n constructor(private readonly apiKey: string) {}\n\n async addAuthHeaders(headers: Headers): Promise {\n if (headers.get(GOOGLE_API_KEY_HEADER) !== null) {\n return;\n }\n headers.append(GOOGLE_API_KEY_HEADER, this.apiKey);\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {GoogleAuthOptions} from 'google-auth-library';\n\nimport {ApiClient} from './_api_client';\nimport {Caches} from './caches';\nimport {Chats} from './chats';\nimport {crossError} from './cross/_cross_error';\nimport {CrossUploader} from './cross/_cross_uploader';\nimport {CrossWebSocketFactory} from './cross/_cross_websocket';\nimport {Files} from './files';\nimport {Live} from './live';\nimport {Models} from './models';\nimport {Operations} from './operations';\nimport {HttpOptions} from './types';\nimport {WebAuth} from './web/_web_auth';\n\nconst LANGUAGE_LABEL_PREFIX = 'gl-node/';\n\n/**\n * Google Gen AI SDK's configuration options.\n *\n * See {@link GoogleGenAI} for usage samples.\n */\nexport interface GoogleGenAIOptions {\n /**\n * Optional. Determines whether to use the Vertex AI or the Gemini API.\n *\n * @remarks\n * When true, the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI API} will used.\n * When false, the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API} will be used.\n *\n * If unset, default SDK behavior is to use the Gemini API service.\n */\n vertexai?: boolean;\n /**\n * Optional. The Google Cloud project ID for Vertex AI clients.\n *\n * @remarks\n * Only supported on Node runtimes, ignored on browser runtimes.\n */\n project?: string;\n /**\n * Optional. The Google Cloud project region for Vertex AI clients.\n *\n * @remarks\n * Only supported on Node runtimes, ignored on browser runtimes.\n *\n */\n location?: string;\n /**\n * The API Key, required for Gemini API clients.\n *\n * @remarks\n * Required on browser runtimes.\n */\n apiKey?: string;\n /**\n * Optional. The API version to use.\n *\n * @remarks\n * If unset, the default API version will be used.\n */\n apiVersion?: string;\n /**\n * Optional. Authentication options defined by the by google-auth-library for Vertex AI clients.\n *\n * @remarks\n * @see {@link https://github.com/googleapis/google-auth-library-nodejs/blob/v9.15.0/src/auth/googleauth.ts | GoogleAuthOptions interface in google-auth-library-nodejs}.\n *\n * Only supported on Node runtimes, ignored on browser runtimes.\n *\n */\n googleAuthOptions?: GoogleAuthOptions;\n /**\n * Optional. A set of customizable configuration for HTTP requests.\n */\n httpOptions?: HttpOptions;\n}\n\n/**\n * The Google GenAI SDK.\n *\n * @remarks\n * Provides access to the GenAI features through either the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API}\n * or the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI API}.\n *\n * The {@link GoogleGenAIOptions.vertexai} value determines which of the API services to use.\n *\n * When using the Gemini API, a {@link GoogleGenAIOptions.apiKey} must also be set,\n * when using Vertex AI {@link GoogleGenAIOptions.project} and {@link GoogleGenAIOptions.location} must also be set.\n *\n * @example\n * Initializing the SDK for using the Gemini API:\n * ```ts\n * import {GoogleGenAI} from '@google/genai';\n * const ai = new GoogleGenAI({apiKey: 'GEMINI_API_KEY'});\n * ```\n *\n * @example\n * Initializing the SDK for using the Vertex AI API:\n * ```ts\n * import {GoogleGenAI} from '@google/genai';\n * const ai = new GoogleGenAI({\n * vertexai: true,\n * project: 'PROJECT_ID',\n * location: 'PROJECT_LOCATION'\n * });\n * ```\n *\n */\nexport class GoogleGenAI {\n protected readonly apiClient: ApiClient;\n private readonly apiKey?: string;\n public readonly vertexai: boolean;\n private readonly apiVersion?: string;\n readonly models: Models;\n readonly live: Live;\n readonly chats: Chats;\n readonly caches: Caches;\n readonly files: Files;\n readonly operations: Operations;\n\n constructor(options: GoogleGenAIOptions) {\n if (options.apiKey == null) {\n throw new Error(\n `An API Key must be set when running in an unspecified environment.\\n + ${crossError().message}`,\n );\n }\n this.vertexai = options.vertexai ?? false;\n this.apiKey = options.apiKey;\n this.apiVersion = options.apiVersion;\n const auth = new WebAuth(this.apiKey);\n this.apiClient = new ApiClient({\n auth: auth,\n apiVersion: this.apiVersion,\n apiKey: this.apiKey,\n vertexai: this.vertexai,\n httpOptions: options.httpOptions,\n userAgentExtra: LANGUAGE_LABEL_PREFIX + 'cross',\n uploader: new CrossUploader(),\n });\n this.models = new Models(this.apiClient);\n this.live = new Live(this.apiClient, auth, new CrossWebSocketFactory());\n this.chats = new Chats(this.models, this.apiClient);\n this.caches = new Caches(this.apiClient);\n this.files = new Files(this.apiClient);\n this.operations = new Operations(this.apiClient);\n }\n}\n"],"names":["partToMldev","common.getValueByPath","common.setValueByPath","contentToMldev","functionDeclarationToMldev","googleSearchToMldev","dynamicRetrievalConfigToMldev","googleSearchRetrievalToMldev","toolToMldev","functionCallingConfigToMldev","toolConfigToMldev","t.tContents","t.tContent","t.tCachesModel","t.tCachedContentName","partToVertex","contentToVertex","schemaToVertex","functionDeclarationToVertex","googleSearchToVertex","dynamicRetrievalConfigToVertex","googleSearchRetrievalToVertex","toolToVertex","functionCallingConfigToVertex","toolConfigToVertex","converters.createCachedContentParametersToVertex","common.formatMap","converters.cachedContentFromVertex","converters.createCachedContentParametersToMldev","converters.cachedContentFromMldev","converters.getCachedContentParametersToVertex","converters.getCachedContentParametersToMldev","converters.deleteCachedContentParametersToVertex","converters.deleteCachedContentResponseFromVertex","types.DeleteCachedContentResponse","converters.deleteCachedContentParametersToMldev","converters.deleteCachedContentResponseFromMldev","converters.updateCachedContentParametersToVertex","converters.updateCachedContentParametersToMldev","converters.listCachedContentsParametersToVertex","converters.listCachedContentsResponseFromVertex","types.ListCachedContentsResponse","converters.listCachedContentsParametersToMldev","converters.listCachedContentsResponseFromMldev","t.tFileName","converters.fileFromMldev","converters.listFilesParametersToMldev","converters.listFilesResponseFromMldev","types.ListFilesResponse","converters.createFileParametersToMldev","converters.createFileResponseFromMldev","types.CreateFileResponse","converters.getFileParametersToMldev","converters.deleteFileParametersToMldev","converters.deleteFileResponseFromMldev","types.DeleteFileResponse","t.tTools","t.tTool","t.tModel","partFromMldev","partFromVertex","contentFromMldev","contentFromVertex","t.tSchema","t.tSpeechConfig","t.tContentsForEmbed","t.tBytes","videoFromMldev","generatedVideoFromMldev","generateVideosResponseFromMldev","generateVideosOperationFromMldev","videoFromVertex","generatedVideoFromVertex","generateVideosResponseFromVertex","generateVideosOperationFromVertex","converters.liveServerMessageFromVertex","converters.liveServerMessageFromMldev","types.Modality","converters.liveConnectParametersToVertex","converters.liveConnectParametersToMldev","converters.generateContentParametersToVertex","converters.generateContentResponseFromVertex","types.GenerateContentResponse","converters.generateContentParametersToMldev","converters.generateContentResponseFromMldev","converters.embedContentParametersToVertex","converters.embedContentResponseFromVertex","types.EmbedContentResponse","converters.embedContentParametersToMldev","converters.embedContentResponseFromMldev","converters.generateImagesParametersToVertex","converters.generateImagesResponseFromVertex","types.GenerateImagesResponse","converters.generateImagesParametersToMldev","converters.generateImagesResponseFromMldev","converters.getModelParametersToVertex","converters.modelFromVertex","converters.getModelParametersToMldev","converters.modelFromMldev","converters.countTokensParametersToVertex","converters.countTokensResponseFromVertex","types.CountTokensResponse","converters.countTokensParametersToMldev","converters.countTokensResponseFromMldev","converters.computeTokensParametersToVertex","converters.computeTokensResponseFromVertex","types.ComputeTokensResponse","converters.generateVideosParametersToVertex","converters.generateVideosOperationFromVertex","converters.generateVideosParametersToMldev","converters.generateVideosOperationFromMldev","converters.getOperationParametersToVertex","converters.getOperationParametersToMldev","converters.fetchPredictOperationParametersToVertex"],"mappings":"AAAA;;;;AAIG;MAEU,UAAU,CAAA;AAAG;AAEV,SAAA,SAAS,CACvB,cAAsB,EACtB,QAAiC,EAAA;;IAGjC,MAAM,KAAK,GAAG,cAAc;;IAG5B,OAAO,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,GAAG,KAAI;AAClD,QAAA,IAAI,MAAM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IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM;AAC5B,QAAA,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU;QACpC,MAAM,IAAI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC;AACrC,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC;AAC7B,YAAA,IAAI,EAAE,IAAI;YACV,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,cAAc,EAAE,qBAAqB,GAAG,OAAO;YAC/C,QAAQ,EAAE,IAAI,aAAa,EAAE;AAC9B,SAAA,CAAC;QACF,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;AACxC,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,qBAAqB,EAAE,CAAC;AACvE,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC;QACnD,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;QACtC,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC;;AAEnD;;;;"} +\ No newline at end of file +diff --git a/dist/node/index.js b/dist/node/index.js +index d55c6b9820bf71e36f2835aabc806d180e17e5a3..ab2de8ed6aeec524784a4309eae6f9bf36d48c3b 100644 +--- a/dist/node/index.js ++++ b/dist/node/index.js +@@ -235,44 +235,25 @@ function _isFunctionCallPart(origin) { + typeof origin === 'object' && + 'functionCall' in origin); + } +-function _isUserPart(origin) { +- if (origin === null || origin === undefined) { +- return false; +- } +- if (_isFunctionCallPart(origin)) { +- return false; +- } +- return true; +-} +-function _areUserParts(origin) { +- if (origin === null || +- origin === undefined || +- (Array.isArray(origin) && origin.length === 0)) { +- return false; +- } +- return origin.every(_isUserPart); ++function _isFunctionResponsePart(origin) { ++ return (origin !== null && ++ origin !== undefined && ++ typeof origin === 'object' && ++ 'functionResponse' in origin); + } + function tContent(apiClient, origin) { + if (origin === null || origin === undefined) { + throw new Error('ContentUnion is required'); + } + if (_isContent(origin)) { +- // @ts-expect-error: _isContent is a utility function that checks if the ++ // _isContent is a utility function that checks if the + // origin is a Content. + return origin; + } +- if (_isUserPart(origin)) { +- return { +- role: 'user', +- parts: tParts(apiClient, origin), +- }; +- } +- else { +- return { +- role: 'model', +- parts: tParts(apiClient, origin), +- }; +- } ++ return { ++ role: 'user', ++ parts: tParts(apiClient, origin), ++ }; + } + function tContentsForEmbed(apiClient, origin) { + if (!origin) { +@@ -303,34 +284,6 @@ function tContentsForEmbed(apiClient, origin) { + } + return [tContent(apiClient, origin)]; + } +-function _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts) { +- if (accumulatedParts.length === 0) { +- return; +- } +- if (_areUserParts(accumulatedParts)) { +- result.push({ +- role: 'user', +- parts: tParts(apiClient, accumulatedParts), +- }); +- } +- else { +- result.push({ +- role: 'model', +- parts: tParts(apiClient, accumulatedParts), +- }); +- } +- accumulatedParts.length = 0; // clear the array inplace +-} +-function _handleCurrentPart(apiClient, result, accumulatedParts, currentPart) { +- if (_isUserPart(currentPart) === _areUserParts(accumulatedParts)) { +- accumulatedParts.push(currentPart); +- } +- else { +- _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts); +- accumulatedParts.length = 0; +- accumulatedParts.push(currentPart); +- } +-} + function tContents(apiClient, origin) { + if (origin === null || + origin === undefined || +@@ -338,35 +291,35 @@ function tContents(apiClient, origin) { + throw new Error('contents are required'); + } + if (!Array.isArray(origin)) { ++ // If it's not an array, it's a single content or a single PartUnion. ++ if (_isFunctionCallPart(origin) || _isFunctionResponsePart(origin)) { ++ throw new Error('To specify functionCall or functionResponse parts, please wrap them in a Content object, specifying the role for them'); ++ } + return [tContent(apiClient, origin)]; + } + const result = []; + const accumulatedParts = []; +- for (const content of origin) { +- if (_isContent(content)) { +- _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts); +- // @ts-expect-error: content is a Content here +- result.push(content); +- } +- else if (typeof content === 'string' || +- (typeof content === 'object' && !Array.isArray(content))) { +- // @ts-expect-error: content is a part here +- _handleCurrentPart(apiClient, result, accumulatedParts, content); +- } +- else if (Array.isArray(content)) { +- // if there're consecutive user parts before the list, +- // convert to UserContent and append to result +- _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts); +- result.push({ +- role: 'user', +- parts: tParts(apiClient, content), +- }); ++ const isContentArray = _isContent(origin[0]); ++ for (const item of origin) { ++ const isContent = _isContent(item); ++ if (isContent != isContentArray) { ++ throw new Error('Mixing Content and Parts is not supported, please group the parts into a the appropriate Content objects and specify the roles for them'); ++ } ++ if (isContent) { ++ // `isContent` contains the result of _isContent, which is a utility ++ // function that checks if the item is a Content. ++ result.push(item); ++ } ++ else if (_isFunctionCallPart(item) || _isFunctionResponsePart(item)) { ++ throw new Error('To specify functionCall or functionResponse parts, please wrap them, and any other parts, in Content objects as appropriate, specifying the role for them'); + } + else { +- throw new Error(`Unsupported content type: ${typeof content}`); ++ accumulatedParts.push(item); + } + } +- _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts); ++ if (!isContentArray) { ++ result.push({ role: 'user', parts: tParts(apiClient, accumulatedParts) }); ++ } + return result; + } + function processSchema(apiClient, schema) { +@@ -531,7 +484,7 @@ function tFileName(apiClient, fromName) { + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +-function partToMldev$1(apiClient, fromObject) { ++function partToMldev$2(apiClient, fromObject) { + const toObject = {}; + if (getValueByPath(fromObject, ['videoMetadata']) !== undefined) { + throw new Error('videoMetadata parameter is not supported in Gemini API.'); +@@ -576,13 +529,13 @@ function partToMldev$1(apiClient, fromObject) { + } + return toObject; + } +-function contentToMldev$1(apiClient, fromObject) { ++function contentToMldev$2(apiClient, fromObject) { + const toObject = {}; + const fromParts = getValueByPath(fromObject, ['parts']); + if (fromParts != null) { + if (Array.isArray(fromParts)) { + setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partToMldev$1(apiClient, item); ++ return partToMldev$2(apiClient, item); + })); + } + else { +@@ -595,7 +548,7 @@ function contentToMldev$1(apiClient, fromObject) { + } + return toObject; + } +-function functionDeclarationToMldev$1(apiClient, fromObject) { ++function functionDeclarationToMldev$2(apiClient, fromObject) { + const toObject = {}; + if (getValueByPath(fromObject, ['response']) !== undefined) { + throw new Error('response parameter is not supported in Gemini API.'); +@@ -614,11 +567,11 @@ function functionDeclarationToMldev$1(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchToMldev$1() { ++function googleSearchToMldev$2() { + const toObject = {}; + return toObject; + } +-function dynamicRetrievalConfigToMldev$1(apiClient, fromObject) { ++function dynamicRetrievalConfigToMldev$2(apiClient, fromObject) { + const toObject = {}; + const fromMode = getValueByPath(fromObject, ['mode']); + if (fromMode != null) { +@@ -632,17 +585,17 @@ function dynamicRetrievalConfigToMldev$1(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchRetrievalToMldev$1(apiClient, fromObject) { ++function googleSearchRetrievalToMldev$2(apiClient, fromObject) { + const toObject = {}; + const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ + 'dynamicRetrievalConfig', + ]); + if (fromDynamicRetrievalConfig != null) { +- setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev$1(apiClient, fromDynamicRetrievalConfig)); ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev$2(apiClient, fromDynamicRetrievalConfig)); + } + return toObject; + } +-function toolToMldev$1(apiClient, fromObject) { ++function toolToMldev$2(apiClient, fromObject) { + const toObject = {}; + const fromFunctionDeclarations = getValueByPath(fromObject, [ + 'functionDeclarations', +@@ -650,7 +603,7 @@ function toolToMldev$1(apiClient, fromObject) { + if (fromFunctionDeclarations != null) { + if (Array.isArray(fromFunctionDeclarations)) { + setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { +- return functionDeclarationToMldev$1(apiClient, item); ++ return functionDeclarationToMldev$2(apiClient, item); + })); + } + else { +@@ -662,13 +615,13 @@ function toolToMldev$1(apiClient, fromObject) { + } + const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); + if (fromGoogleSearch != null) { +- setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$1()); ++ setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$2()); + } + const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ + 'googleSearchRetrieval', + ]); + if (fromGoogleSearchRetrieval != null) { +- setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev$1(apiClient, fromGoogleSearchRetrieval)); ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev$2(apiClient, fromGoogleSearchRetrieval)); + } + const fromCodeExecution = getValueByPath(fromObject, [ + 'codeExecution', +@@ -720,7 +673,7 @@ function createCachedContentConfigToMldev(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromContents != null) { + if (Array.isArray(fromContents)) { + setValueByPath(parentObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToMldev$1(apiClient, item); ++ return contentToMldev$2(apiClient, item); + }))); + } + else { +@@ -731,13 +684,13 @@ function createCachedContentConfigToMldev(apiClient, fromObject, parentObject) { + 'systemInstruction', + ]); + if (parentObject !== undefined && fromSystemInstruction != null) { +- setValueByPath(parentObject, ['systemInstruction'], contentToMldev$1(apiClient, tContent(apiClient, fromSystemInstruction))); ++ setValueByPath(parentObject, ['systemInstruction'], contentToMldev$2(apiClient, tContent(apiClient, fromSystemInstruction))); + } + const fromTools = getValueByPath(fromObject, ['tools']); + if (parentObject !== undefined && fromTools != null) { + if (Array.isArray(fromTools)) { + setValueByPath(parentObject, ['tools'], fromTools.map((item) => { +- return toolToMldev$1(apiClient, item); ++ return toolToMldev$2(apiClient, item); + })); + } + else { +@@ -830,7 +783,7 @@ function listCachedContentsParametersToMldev(apiClient, fromObject) { + } + return toObject; + } +-function partToVertex$1(apiClient, fromObject) { ++function partToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromVideoMetadata = getValueByPath(fromObject, [ + 'videoMetadata', +@@ -878,13 +831,13 @@ function partToVertex$1(apiClient, fromObject) { + } + return toObject; + } +-function contentToVertex$1(apiClient, fromObject) { ++function contentToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromParts = getValueByPath(fromObject, ['parts']); + if (fromParts != null) { + if (Array.isArray(fromParts)) { + setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partToVertex$1(apiClient, item); ++ return partToVertex$2(apiClient, item); + })); + } + else { +@@ -897,7 +850,7 @@ function contentToVertex$1(apiClient, fromObject) { + } + return toObject; + } +-function schemaToVertex$1(apiClient, fromObject) { ++function schemaToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromExample = getValueByPath(fromObject, ['example']); + if (fromExample != null) { +@@ -995,11 +948,11 @@ function schemaToVertex$1(apiClient, fromObject) { + } + return toObject; + } +-function functionDeclarationToVertex$1(apiClient, fromObject) { ++function functionDeclarationToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromResponse = getValueByPath(fromObject, ['response']); + if (fromResponse != null) { +- setValueByPath(toObject, ['response'], schemaToVertex$1(apiClient, fromResponse)); ++ setValueByPath(toObject, ['response'], schemaToVertex$2(apiClient, fromResponse)); + } + const fromDescription = getValueByPath(fromObject, ['description']); + if (fromDescription != null) { +@@ -1015,11 +968,11 @@ function functionDeclarationToVertex$1(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchToVertex$1() { ++function googleSearchToVertex$2() { + const toObject = {}; + return toObject; + } +-function dynamicRetrievalConfigToVertex$1(apiClient, fromObject) { ++function dynamicRetrievalConfigToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromMode = getValueByPath(fromObject, ['mode']); + if (fromMode != null) { +@@ -1033,17 +986,17 @@ function dynamicRetrievalConfigToVertex$1(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchRetrievalToVertex$1(apiClient, fromObject) { ++function googleSearchRetrievalToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ + 'dynamicRetrievalConfig', + ]); + if (fromDynamicRetrievalConfig != null) { +- setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$1(apiClient, fromDynamicRetrievalConfig)); ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$2(apiClient, fromDynamicRetrievalConfig)); + } + return toObject; + } +-function toolToVertex$1(apiClient, fromObject) { ++function toolToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromFunctionDeclarations = getValueByPath(fromObject, [ + 'functionDeclarations', +@@ -1051,7 +1004,7 @@ function toolToVertex$1(apiClient, fromObject) { + if (fromFunctionDeclarations != null) { + if (Array.isArray(fromFunctionDeclarations)) { + setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { +- return functionDeclarationToVertex$1(apiClient, item); ++ return functionDeclarationToVertex$2(apiClient, item); + })); + } + else { +@@ -1064,13 +1017,13 @@ function toolToVertex$1(apiClient, fromObject) { + } + const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); + if (fromGoogleSearch != null) { +- setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$1()); ++ setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$2()); + } + const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ + 'googleSearchRetrieval', + ]); + if (fromGoogleSearchRetrieval != null) { +- setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$1(apiClient, fromGoogleSearchRetrieval)); ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$2(apiClient, fromGoogleSearchRetrieval)); + } + const fromCodeExecution = getValueByPath(fromObject, [ + 'codeExecution', +@@ -1122,7 +1075,7 @@ function createCachedContentConfigToVertex(apiClient, fromObject, parentObject) + if (parentObject !== undefined && fromContents != null) { + if (Array.isArray(fromContents)) { + setValueByPath(parentObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToVertex$1(apiClient, item); ++ return contentToVertex$2(apiClient, item); + }))); + } + else { +@@ -1133,13 +1086,13 @@ function createCachedContentConfigToVertex(apiClient, fromObject, parentObject) + 'systemInstruction', + ]); + if (parentObject !== undefined && fromSystemInstruction != null) { +- setValueByPath(parentObject, ['systemInstruction'], contentToVertex$1(apiClient, tContent(apiClient, fromSystemInstruction))); ++ setValueByPath(parentObject, ['systemInstruction'], contentToVertex$2(apiClient, tContent(apiClient, fromSystemInstruction))); + } + const fromTools = getValueByPath(fromObject, ['tools']); + if (parentObject !== undefined && fromTools != null) { + if (Array.isArray(fromTools)) { + setValueByPath(parentObject, ['tools'], fromTools.map((item) => { +- return toolToVertex$1(apiClient, item); ++ return toolToVertex$2(apiClient, item); + })); + } + else { +@@ -1664,6 +1617,14 @@ exports.MediaResolution = void 0; + MediaResolution["MEDIA_RESOLUTION_MEDIUM"] = "MEDIA_RESOLUTION_MEDIUM"; + MediaResolution["MEDIA_RESOLUTION_HIGH"] = "MEDIA_RESOLUTION_HIGH"; + })(exports.MediaResolution || (exports.MediaResolution = {})); ++/** Options for feature selection preference. */ ++exports.FeatureSelectionPreference = void 0; ++(function (FeatureSelectionPreference) { ++ FeatureSelectionPreference["FEATURE_SELECTION_PREFERENCE_UNSPECIFIED"] = "FEATURE_SELECTION_PREFERENCE_UNSPECIFIED"; ++ FeatureSelectionPreference["PRIORITIZE_QUALITY"] = "PRIORITIZE_QUALITY"; ++ FeatureSelectionPreference["BALANCED"] = "BALANCED"; ++ FeatureSelectionPreference["PRIORITIZE_COST"] = "PRIORITIZE_COST"; ++})(exports.FeatureSelectionPreference || (exports.FeatureSelectionPreference = {})); + /** Config for the dynamic retrieval config mode. */ + exports.DynamicRetrievalConfigMode = void 0; + (function (DynamicRetrievalConfigMode) { +@@ -2214,8 +2175,8 @@ class Caches extends BaseModule { + * + * @remarks + * Context caching is only supported for specific models. See [Gemini +- * Developer API reference] (https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac) +- * and [Vertex AI reference] (https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models) ++ * Developer API reference](https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac) ++ * and [Vertex AI reference](https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models) + * for more information. + * + * @param params - The parameters for the create request. +@@ -3141,12 +3102,8 @@ function listFilesResponseFromMldev(apiClient, fromObject) { + } + return toObject; + } +-function createFileResponseFromMldev(apiClient, fromObject) { ++function createFileResponseFromMldev() { + const toObject = {}; +- const fromHttpHeaders = getValueByPath(fromObject, ['httpHeaders']); +- if (fromHttpHeaders != null) { +- setValueByPath(toObject, ['httpHeaders'], fromHttpHeaders); +- } + return toObject; + } + function deleteFileResponseFromMldev() { +@@ -3298,8 +3255,8 @@ class Files extends BaseModule { + .then((httpResponse) => { + return httpResponse.json(); + }); +- return response.then((apiResponse) => { +- const resp = createFileResponseFromMldev(this.apiClient, apiResponse); ++ return response.then(() => { ++ const resp = createFileResponseFromMldev(); + const typedResp = new CreateFileResponse(); + Object.assign(typedResp, resp); + return typedResp; +@@ -3407,7 +3364,7 @@ class Files extends BaseModule { + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +-function partToMldev(apiClient, fromObject) { ++function partToMldev$1(apiClient, fromObject) { + const toObject = {}; + if (getValueByPath(fromObject, ['videoMetadata']) !== undefined) { + throw new Error('videoMetadata parameter is not supported in Gemini API.'); +@@ -3452,13 +3409,61 @@ function partToMldev(apiClient, fromObject) { + } + return toObject; + } +-function contentToMldev(apiClient, fromObject) { ++function partToVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromVideoMetadata = getValueByPath(fromObject, [ ++ 'videoMetadata', ++ ]); ++ if (fromVideoMetadata != null) { ++ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); ++ } ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); ++ } ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', ++ ]); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); ++ } ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', ++ ]); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); ++ } ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); ++ } ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); ++ } ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', ++ ]); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); ++ } ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); ++ } ++ const fromText = getValueByPath(fromObject, ['text']); ++ if (fromText != null) { ++ setValueByPath(toObject, ['text'], fromText); ++ } ++ return toObject; ++} ++function contentToMldev$1(apiClient, fromObject) { + const toObject = {}; + const fromParts = getValueByPath(fromObject, ['parts']); + if (fromParts != null) { + if (Array.isArray(fromParts)) { + setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partToMldev(apiClient, item); ++ return partToMldev$1(apiClient, item); + })); + } + else { +@@ -3471,28 +3476,58 @@ function contentToMldev(apiClient, fromObject) { + } + return toObject; + } +-function schemaToMldev(apiClient, fromObject) { ++function contentToVertex$1(apiClient, fromObject) { + const toObject = {}; +- if (getValueByPath(fromObject, ['example']) !== undefined) { +- throw new Error('example parameter is not supported in Gemini API.'); ++ const fromParts = getValueByPath(fromObject, ['parts']); ++ if (fromParts != null) { ++ if (Array.isArray(fromParts)) { ++ setValueByPath(toObject, ['parts'], fromParts.map((item) => { ++ return partToVertex$1(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['parts'], fromParts); ++ } + } +- if (getValueByPath(fromObject, ['pattern']) !== undefined) { +- throw new Error('pattern parameter is not supported in Gemini API.'); ++ const fromRole = getValueByPath(fromObject, ['role']); ++ if (fromRole != null) { ++ setValueByPath(toObject, ['role'], fromRole); + } +- if (getValueByPath(fromObject, ['default']) !== undefined) { +- throw new Error('default parameter is not supported in Gemini API.'); ++ return toObject; ++} ++function schemaToVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromExample = getValueByPath(fromObject, ['example']); ++ if (fromExample != null) { ++ setValueByPath(toObject, ['example'], fromExample); + } +- if (getValueByPath(fromObject, ['maxLength']) !== undefined) { +- throw new Error('maxLength parameter is not supported in Gemini API.'); ++ const fromPattern = getValueByPath(fromObject, ['pattern']); ++ if (fromPattern != null) { ++ setValueByPath(toObject, ['pattern'], fromPattern); + } +- if (getValueByPath(fromObject, ['minLength']) !== undefined) { +- throw new Error('minLength parameter is not supported in Gemini API.'); ++ const fromDefault = getValueByPath(fromObject, ['default']); ++ if (fromDefault != null) { ++ setValueByPath(toObject, ['default'], fromDefault); + } +- if (getValueByPath(fromObject, ['minProperties']) !== undefined) { +- throw new Error('minProperties parameter is not supported in Gemini API.'); ++ const fromMaxLength = getValueByPath(fromObject, ['maxLength']); ++ if (fromMaxLength != null) { ++ setValueByPath(toObject, ['maxLength'], fromMaxLength); + } +- if (getValueByPath(fromObject, ['maxProperties']) !== undefined) { +- throw new Error('maxProperties parameter is not supported in Gemini API.'); ++ const fromMinLength = getValueByPath(fromObject, ['minLength']); ++ if (fromMinLength != null) { ++ setValueByPath(toObject, ['minLength'], fromMinLength); ++ } ++ const fromMinProperties = getValueByPath(fromObject, [ ++ 'minProperties', ++ ]); ++ if (fromMinProperties != null) { ++ setValueByPath(toObject, ['minProperties'], fromMinProperties); ++ } ++ const fromMaxProperties = getValueByPath(fromObject, [ ++ 'maxProperties', ++ ]); ++ if (fromMaxProperties != null) { ++ setValueByPath(toObject, ['maxProperties'], fromMaxProperties); + } + const fromAnyOf = getValueByPath(fromObject, ['anyOf']); + if (fromAnyOf != null) { +@@ -3558,25 +3593,30 @@ function schemaToMldev(apiClient, fromObject) { + } + return toObject; + } +-function safetySettingToMldev(apiClient, fromObject) { ++function functionDeclarationToMldev$1(apiClient, fromObject) { + const toObject = {}; +- if (getValueByPath(fromObject, ['method']) !== undefined) { +- throw new Error('method parameter is not supported in Gemini API.'); ++ if (getValueByPath(fromObject, ['response']) !== undefined) { ++ throw new Error('response parameter is not supported in Gemini API.'); + } +- const fromCategory = getValueByPath(fromObject, ['category']); +- if (fromCategory != null) { +- setValueByPath(toObject, ['category'], fromCategory); ++ const fromDescription = getValueByPath(fromObject, ['description']); ++ if (fromDescription != null) { ++ setValueByPath(toObject, ['description'], fromDescription); + } +- const fromThreshold = getValueByPath(fromObject, ['threshold']); +- if (fromThreshold != null) { +- setValueByPath(toObject, ['threshold'], fromThreshold); ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); ++ } ++ const fromParameters = getValueByPath(fromObject, ['parameters']); ++ if (fromParameters != null) { ++ setValueByPath(toObject, ['parameters'], fromParameters); + } + return toObject; + } +-function functionDeclarationToMldev(apiClient, fromObject) { ++function functionDeclarationToVertex$1(apiClient, fromObject) { + const toObject = {}; +- if (getValueByPath(fromObject, ['response']) !== undefined) { +- throw new Error('response parameter is not supported in Gemini API.'); ++ const fromResponse = getValueByPath(fromObject, ['response']); ++ if (fromResponse != null) { ++ setValueByPath(toObject, ['response'], schemaToVertex$1(apiClient, fromResponse)); + } + const fromDescription = getValueByPath(fromObject, ['description']); + if (fromDescription != null) { +@@ -3592,11 +3632,15 @@ function functionDeclarationToMldev(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchToMldev() { ++function googleSearchToMldev$1() { + const toObject = {}; + return toObject; + } +-function dynamicRetrievalConfigToMldev(apiClient, fromObject) { ++function googleSearchToVertex$1() { ++ const toObject = {}; ++ return toObject; ++} ++function dynamicRetrievalConfigToMldev$1(apiClient, fromObject) { + const toObject = {}; + const fromMode = getValueByPath(fromObject, ['mode']); + if (fromMode != null) { +@@ -3610,17 +3654,41 @@ function dynamicRetrievalConfigToMldev(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchRetrievalToMldev(apiClient, fromObject) { ++function dynamicRetrievalConfigToVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromMode = getValueByPath(fromObject, ['mode']); ++ if (fromMode != null) { ++ setValueByPath(toObject, ['mode'], fromMode); ++ } ++ const fromDynamicThreshold = getValueByPath(fromObject, [ ++ 'dynamicThreshold', ++ ]); ++ if (fromDynamicThreshold != null) { ++ setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold); ++ } ++ return toObject; ++} ++function googleSearchRetrievalToMldev$1(apiClient, fromObject) { + const toObject = {}; + const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ + 'dynamicRetrievalConfig', + ]); + if (fromDynamicRetrievalConfig != null) { +- setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig)); ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev$1(apiClient, fromDynamicRetrievalConfig)); + } + return toObject; + } +-function toolToMldev(apiClient, fromObject) { ++function googleSearchRetrievalToVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ ++ 'dynamicRetrievalConfig', ++ ]); ++ if (fromDynamicRetrievalConfig != null) { ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$1(apiClient, fromDynamicRetrievalConfig)); ++ } ++ return toObject; ++} ++function toolToMldev$1(apiClient, fromObject) { + const toObject = {}; + const fromFunctionDeclarations = getValueByPath(fromObject, [ + 'functionDeclarations', +@@ -3628,7 +3696,7 @@ function toolToMldev(apiClient, fromObject) { + if (fromFunctionDeclarations != null) { + if (Array.isArray(fromFunctionDeclarations)) { + setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { +- return functionDeclarationToMldev(apiClient, item); ++ return functionDeclarationToMldev$1(apiClient, item); + })); + } + else { +@@ -3640,13 +3708,13 @@ function toolToMldev(apiClient, fromObject) { + } + const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); + if (fromGoogleSearch != null) { +- setValueByPath(toObject, ['googleSearch'], googleSearchToMldev()); ++ setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$1()); + } + const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ + 'googleSearchRetrieval', + ]); + if (fromGoogleSearchRetrieval != null) { +- setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval)); ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev$1(apiClient, fromGoogleSearchRetrieval)); + } + const fromCodeExecution = getValueByPath(fromObject, [ + 'codeExecution', +@@ -3656,561 +3724,1016 @@ function toolToMldev(apiClient, fromObject) { + } + return toObject; + } +-function functionCallingConfigToMldev(apiClient, fromObject) { ++function toolToVertex$1(apiClient, fromObject) { + const toObject = {}; +- const fromMode = getValueByPath(fromObject, ['mode']); +- if (fromMode != null) { +- setValueByPath(toObject, ['mode'], fromMode); ++ const fromFunctionDeclarations = getValueByPath(fromObject, [ ++ 'functionDeclarations', ++ ]); ++ if (fromFunctionDeclarations != null) { ++ if (Array.isArray(fromFunctionDeclarations)) { ++ setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { ++ return functionDeclarationToVertex$1(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations); ++ } + } +- const fromAllowedFunctionNames = getValueByPath(fromObject, [ +- 'allowedFunctionNames', ++ const fromRetrieval = getValueByPath(fromObject, ['retrieval']); ++ if (fromRetrieval != null) { ++ setValueByPath(toObject, ['retrieval'], fromRetrieval); ++ } ++ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); ++ if (fromGoogleSearch != null) { ++ setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$1()); ++ } ++ const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ ++ 'googleSearchRetrieval', + ]); +- if (fromAllowedFunctionNames != null) { +- setValueByPath(toObject, ['allowedFunctionNames'], fromAllowedFunctionNames); ++ if (fromGoogleSearchRetrieval != null) { ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$1(apiClient, fromGoogleSearchRetrieval)); ++ } ++ const fromCodeExecution = getValueByPath(fromObject, [ ++ 'codeExecution', ++ ]); ++ if (fromCodeExecution != null) { ++ setValueByPath(toObject, ['codeExecution'], fromCodeExecution); + } + return toObject; + } +-function toolConfigToMldev(apiClient, fromObject) { ++function sessionResumptionConfigToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromFunctionCallingConfig = getValueByPath(fromObject, [ +- 'functionCallingConfig', +- ]); +- if (fromFunctionCallingConfig != null) { +- setValueByPath(toObject, ['functionCallingConfig'], functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig)); ++ const fromHandle = getValueByPath(fromObject, ['handle']); ++ if (fromHandle != null) { ++ setValueByPath(toObject, ['handle'], fromHandle); ++ } ++ if (getValueByPath(fromObject, ['transparent']) !== undefined) { ++ throw new Error('transparent parameter is not supported in Gemini API.'); + } + return toObject; + } +-function prebuiltVoiceConfigToMldev(apiClient, fromObject) { ++function sessionResumptionConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromVoiceName = getValueByPath(fromObject, ['voiceName']); +- if (fromVoiceName != null) { +- setValueByPath(toObject, ['voiceName'], fromVoiceName); ++ const fromHandle = getValueByPath(fromObject, ['handle']); ++ if (fromHandle != null) { ++ setValueByPath(toObject, ['handle'], fromHandle); ++ } ++ const fromTransparent = getValueByPath(fromObject, ['transparent']); ++ if (fromTransparent != null) { ++ setValueByPath(toObject, ['transparent'], fromTransparent); + } + return toObject; + } +-function voiceConfigToMldev(apiClient, fromObject) { ++function automaticActivityDetectionToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [ +- 'prebuiltVoiceConfig', ++ const fromDisabled = getValueByPath(fromObject, ['disabled']); ++ if (fromDisabled != null) { ++ setValueByPath(toObject, ['disabled'], fromDisabled); ++ } ++ const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [ ++ 'startOfSpeechSensitivity', + ]); +- if (fromPrebuiltVoiceConfig != null) { +- setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToMldev(apiClient, fromPrebuiltVoiceConfig)); ++ if (fromStartOfSpeechSensitivity != null) { ++ setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity); ++ } ++ const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [ ++ 'endOfSpeechSensitivity', ++ ]); ++ if (fromEndOfSpeechSensitivity != null) { ++ setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity); ++ } ++ const fromPrefixPaddingMs = getValueByPath(fromObject, [ ++ 'prefixPaddingMs', ++ ]); ++ if (fromPrefixPaddingMs != null) { ++ setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs); ++ } ++ const fromSilenceDurationMs = getValueByPath(fromObject, [ ++ 'silenceDurationMs', ++ ]); ++ if (fromSilenceDurationMs != null) { ++ setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs); + } + return toObject; + } +-function speechConfigToMldev(apiClient, fromObject) { ++function automaticActivityDetectionToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']); +- if (fromVoiceConfig != null) { +- setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev(apiClient, fromVoiceConfig)); ++ const fromDisabled = getValueByPath(fromObject, ['disabled']); ++ if (fromDisabled != null) { ++ setValueByPath(toObject, ['disabled'], fromDisabled); ++ } ++ const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [ ++ 'startOfSpeechSensitivity', ++ ]); ++ if (fromStartOfSpeechSensitivity != null) { ++ setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity); ++ } ++ const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [ ++ 'endOfSpeechSensitivity', ++ ]); ++ if (fromEndOfSpeechSensitivity != null) { ++ setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity); ++ } ++ const fromPrefixPaddingMs = getValueByPath(fromObject, [ ++ 'prefixPaddingMs', ++ ]); ++ if (fromPrefixPaddingMs != null) { ++ setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs); ++ } ++ const fromSilenceDurationMs = getValueByPath(fromObject, [ ++ 'silenceDurationMs', ++ ]); ++ if (fromSilenceDurationMs != null) { ++ setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs); + } + return toObject; + } +-function thinkingConfigToMldev(apiClient, fromObject) { ++function realtimeInputConfigToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromIncludeThoughts = getValueByPath(fromObject, [ +- 'includeThoughts', ++ const fromAutomaticActivityDetection = getValueByPath(fromObject, [ ++ 'automaticActivityDetection', + ]); +- if (fromIncludeThoughts != null) { +- setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts); ++ if (fromAutomaticActivityDetection != null) { ++ setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToMldev(apiClient, fromAutomaticActivityDetection)); + } +- const fromThinkingBudget = getValueByPath(fromObject, [ +- 'thinkingBudget', ++ const fromActivityHandling = getValueByPath(fromObject, [ ++ 'activityHandling', + ]); +- if (fromThinkingBudget != null) { +- setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget); ++ if (fromActivityHandling != null) { ++ setValueByPath(toObject, ['activityHandling'], fromActivityHandling); ++ } ++ const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']); ++ if (fromTurnCoverage != null) { ++ setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage); + } + return toObject; + } +-function generateContentConfigToMldev(apiClient, fromObject, parentObject) { ++function realtimeInputConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromSystemInstruction = getValueByPath(fromObject, [ +- 'systemInstruction', ++ const fromAutomaticActivityDetection = getValueByPath(fromObject, [ ++ 'automaticActivityDetection', + ]); +- if (parentObject !== undefined && fromSystemInstruction != null) { +- setValueByPath(parentObject, ['systemInstruction'], contentToMldev(apiClient, tContent(apiClient, fromSystemInstruction))); +- } +- const fromTemperature = getValueByPath(fromObject, ['temperature']); +- if (fromTemperature != null) { +- setValueByPath(toObject, ['temperature'], fromTemperature); ++ if (fromAutomaticActivityDetection != null) { ++ setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToVertex(apiClient, fromAutomaticActivityDetection)); + } +- const fromTopP = getValueByPath(fromObject, ['topP']); +- if (fromTopP != null) { +- setValueByPath(toObject, ['topP'], fromTopP); ++ const fromActivityHandling = getValueByPath(fromObject, [ ++ 'activityHandling', ++ ]); ++ if (fromActivityHandling != null) { ++ setValueByPath(toObject, ['activityHandling'], fromActivityHandling); + } +- const fromTopK = getValueByPath(fromObject, ['topK']); +- if (fromTopK != null) { +- setValueByPath(toObject, ['topK'], fromTopK); ++ const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']); ++ if (fromTurnCoverage != null) { ++ setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage); + } +- const fromCandidateCount = getValueByPath(fromObject, [ +- 'candidateCount', +- ]); +- if (fromCandidateCount != null) { +- setValueByPath(toObject, ['candidateCount'], fromCandidateCount); ++ return toObject; ++} ++function slidingWindowToMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']); ++ if (fromTargetTokens != null) { ++ setValueByPath(toObject, ['targetTokens'], fromTargetTokens); + } +- const fromMaxOutputTokens = getValueByPath(fromObject, [ +- 'maxOutputTokens', +- ]); +- if (fromMaxOutputTokens != null) { +- setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens); ++ return toObject; ++} ++function slidingWindowToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']); ++ if (fromTargetTokens != null) { ++ setValueByPath(toObject, ['targetTokens'], fromTargetTokens); + } +- const fromStopSequences = getValueByPath(fromObject, [ +- 'stopSequences', ++ return toObject; ++} ++function contextWindowCompressionConfigToMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTriggerTokens = getValueByPath(fromObject, [ ++ 'triggerTokens', + ]); +- if (fromStopSequences != null) { +- setValueByPath(toObject, ['stopSequences'], fromStopSequences); ++ if (fromTriggerTokens != null) { ++ setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens); + } +- const fromResponseLogprobs = getValueByPath(fromObject, [ +- 'responseLogprobs', ++ const fromSlidingWindow = getValueByPath(fromObject, [ ++ 'slidingWindow', + ]); +- if (fromResponseLogprobs != null) { +- setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs); +- } +- const fromLogprobs = getValueByPath(fromObject, ['logprobs']); +- if (fromLogprobs != null) { +- setValueByPath(toObject, ['logprobs'], fromLogprobs); ++ if (fromSlidingWindow != null) { ++ setValueByPath(toObject, ['slidingWindow'], slidingWindowToMldev(apiClient, fromSlidingWindow)); + } +- const fromPresencePenalty = getValueByPath(fromObject, [ +- 'presencePenalty', ++ return toObject; ++} ++function contextWindowCompressionConfigToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTriggerTokens = getValueByPath(fromObject, [ ++ 'triggerTokens', + ]); +- if (fromPresencePenalty != null) { +- setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty); ++ if (fromTriggerTokens != null) { ++ setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens); + } +- const fromFrequencyPenalty = getValueByPath(fromObject, [ +- 'frequencyPenalty', ++ const fromSlidingWindow = getValueByPath(fromObject, [ ++ 'slidingWindow', + ]); +- if (fromFrequencyPenalty != null) { +- setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty); +- } +- const fromSeed = getValueByPath(fromObject, ['seed']); +- if (fromSeed != null) { +- setValueByPath(toObject, ['seed'], fromSeed); ++ if (fromSlidingWindow != null) { ++ setValueByPath(toObject, ['slidingWindow'], slidingWindowToVertex(apiClient, fromSlidingWindow)); + } +- const fromResponseMimeType = getValueByPath(fromObject, [ +- 'responseMimeType', ++ return toObject; ++} ++function liveConnectConfigToMldev(apiClient, fromObject, parentObject) { ++ const toObject = {}; ++ const fromGenerationConfig = getValueByPath(fromObject, [ ++ 'generationConfig', + ]); +- if (fromResponseMimeType != null) { +- setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType); ++ if (parentObject !== undefined && fromGenerationConfig != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig); + } +- const fromResponseSchema = getValueByPath(fromObject, [ +- 'responseSchema', ++ const fromResponseModalities = getValueByPath(fromObject, [ ++ 'responseModalities', + ]); +- if (fromResponseSchema != null) { +- setValueByPath(toObject, ['responseSchema'], schemaToMldev(apiClient, tSchema(apiClient, fromResponseSchema))); ++ if (parentObject !== undefined && fromResponseModalities != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities); + } +- if (getValueByPath(fromObject, ['routingConfig']) !== undefined) { +- throw new Error('routingConfig parameter is not supported in Gemini API.'); ++ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); ++ if (parentObject !== undefined && fromSpeechConfig != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], fromSpeechConfig); + } +- const fromSafetySettings = getValueByPath(fromObject, [ +- 'safetySettings', ++ const fromSystemInstruction = getValueByPath(fromObject, [ ++ 'systemInstruction', + ]); +- if (parentObject !== undefined && fromSafetySettings != null) { +- if (Array.isArray(fromSafetySettings)) { +- setValueByPath(parentObject, ['safetySettings'], fromSafetySettings.map((item) => { +- return safetySettingToMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(parentObject, ['safetySettings'], fromSafetySettings); +- } ++ if (parentObject !== undefined && fromSystemInstruction != null) { ++ setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToMldev$1(apiClient, tContent(apiClient, fromSystemInstruction))); + } + const fromTools = getValueByPath(fromObject, ['tools']); + if (parentObject !== undefined && fromTools != null) { + if (Array.isArray(fromTools)) { +- setValueByPath(parentObject, ['tools'], tTools(apiClient, tTools(apiClient, fromTools).map((item) => { +- return toolToMldev(apiClient, tTool(apiClient, item)); ++ setValueByPath(parentObject, ['setup', 'tools'], tTools(apiClient, tTools(apiClient, fromTools).map((item) => { ++ return toolToMldev$1(apiClient, tTool(apiClient, item)); + }))); + } + else { +- setValueByPath(parentObject, ['tools'], tTools(apiClient, fromTools)); ++ setValueByPath(parentObject, ['setup', 'tools'], tTools(apiClient, fromTools)); + } + } +- const fromToolConfig = getValueByPath(fromObject, ['toolConfig']); +- if (parentObject !== undefined && fromToolConfig != null) { +- setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev(apiClient, fromToolConfig)); ++ const fromSessionResumption = getValueByPath(fromObject, [ ++ 'sessionResumption', ++ ]); ++ if (parentObject !== undefined && fromSessionResumption != null) { ++ setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToMldev(apiClient, fromSessionResumption)); + } +- if (getValueByPath(fromObject, ['labels']) !== undefined) { +- throw new Error('labels parameter is not supported in Gemini API.'); ++ const fromRealtimeInputConfig = getValueByPath(fromObject, [ ++ 'realtimeInputConfig', ++ ]); ++ if (parentObject !== undefined && fromRealtimeInputConfig != null) { ++ setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToMldev(apiClient, fromRealtimeInputConfig)); + } +- const fromCachedContent = getValueByPath(fromObject, [ +- 'cachedContent', ++ const fromContextWindowCompression = getValueByPath(fromObject, [ ++ 'contextWindowCompression', + ]); +- if (parentObject !== undefined && fromCachedContent != null) { +- setValueByPath(parentObject, ['cachedContent'], tCachedContentName(apiClient, fromCachedContent)); ++ if (parentObject !== undefined && fromContextWindowCompression != null) { ++ setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToMldev(apiClient, fromContextWindowCompression)); + } +- const fromResponseModalities = getValueByPath(fromObject, [ +- 'responseModalities', ++ return toObject; ++} ++function liveConnectConfigToVertex(apiClient, fromObject, parentObject) { ++ const toObject = {}; ++ const fromGenerationConfig = getValueByPath(fromObject, [ ++ 'generationConfig', + ]); +- if (fromResponseModalities != null) { +- setValueByPath(toObject, ['responseModalities'], fromResponseModalities); ++ if (parentObject !== undefined && fromGenerationConfig != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig); + } +- const fromMediaResolution = getValueByPath(fromObject, [ +- 'mediaResolution', ++ const fromResponseModalities = getValueByPath(fromObject, [ ++ 'responseModalities', + ]); +- if (fromMediaResolution != null) { +- setValueByPath(toObject, ['mediaResolution'], fromMediaResolution); ++ if (parentObject !== undefined && fromResponseModalities != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities); + } + const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); +- if (fromSpeechConfig != null) { +- setValueByPath(toObject, ['speechConfig'], speechConfigToMldev(apiClient, tSpeechConfig(apiClient, fromSpeechConfig))); ++ if (parentObject !== undefined && fromSpeechConfig != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], fromSpeechConfig); + } +- if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) { +- throw new Error('audioTimestamp parameter is not supported in Gemini API.'); +- } +- const fromThinkingConfig = getValueByPath(fromObject, [ +- 'thinkingConfig', ++ const fromSystemInstruction = getValueByPath(fromObject, [ ++ 'systemInstruction', + ]); +- if (fromThinkingConfig != null) { +- setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev(apiClient, fromThinkingConfig)); +- } +- return toObject; +-} +-function generateContentParametersToMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); ++ if (parentObject !== undefined && fromSystemInstruction != null) { ++ setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToVertex$1(apiClient, tContent(apiClient, fromSystemInstruction))); + } +- const fromContents = getValueByPath(fromObject, ['contents']); +- if (fromContents != null) { +- if (Array.isArray(fromContents)) { +- setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToMldev(apiClient, item); ++ const fromTools = getValueByPath(fromObject, ['tools']); ++ if (parentObject !== undefined && fromTools != null) { ++ if (Array.isArray(fromTools)) { ++ setValueByPath(parentObject, ['setup', 'tools'], tTools(apiClient, tTools(apiClient, fromTools).map((item) => { ++ return toolToVertex$1(apiClient, tTool(apiClient, item)); + }))); + } + else { +- setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); ++ setValueByPath(parentObject, ['setup', 'tools'], tTools(apiClient, fromTools)); + } + } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['generationConfig'], generateContentConfigToMldev(apiClient, fromConfig, toObject)); +- } +- return toObject; +-} +-function embedContentConfigToMldev(apiClient, fromObject, parentObject) { +- const toObject = {}; +- const fromTaskType = getValueByPath(fromObject, ['taskType']); +- if (parentObject !== undefined && fromTaskType != null) { +- setValueByPath(parentObject, ['requests[]', 'taskType'], fromTaskType); ++ const fromSessionResumption = getValueByPath(fromObject, [ ++ 'sessionResumption', ++ ]); ++ if (parentObject !== undefined && fromSessionResumption != null) { ++ setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToVertex(apiClient, fromSessionResumption)); + } +- const fromTitle = getValueByPath(fromObject, ['title']); +- if (parentObject !== undefined && fromTitle != null) { +- setValueByPath(parentObject, ['requests[]', 'title'], fromTitle); ++ const fromRealtimeInputConfig = getValueByPath(fromObject, [ ++ 'realtimeInputConfig', ++ ]); ++ if (parentObject !== undefined && fromRealtimeInputConfig != null) { ++ setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToVertex(apiClient, fromRealtimeInputConfig)); + } +- const fromOutputDimensionality = getValueByPath(fromObject, [ +- 'outputDimensionality', ++ const fromContextWindowCompression = getValueByPath(fromObject, [ ++ 'contextWindowCompression', + ]); +- if (parentObject !== undefined && fromOutputDimensionality != null) { +- setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality); ++ if (parentObject !== undefined && fromContextWindowCompression != null) { ++ setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToVertex(apiClient, fromContextWindowCompression)); + } +- if (getValueByPath(fromObject, ['mimeType']) !== undefined) { +- throw new Error('mimeType parameter is not supported in Gemini API.'); ++ return toObject; ++} ++function liveConnectParametersToMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel)); + } +- if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) { +- throw new Error('autoTruncate parameter is not supported in Gemini API.'); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], liveConnectConfigToMldev(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function embedContentParametersToMldev(apiClient, fromObject) { ++function liveConnectParametersToVertex(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); +- } +- const fromContents = getValueByPath(fromObject, ['contents']); +- if (fromContents != null) { +- setValueByPath(toObject, ['requests[]', 'content'], tContentsForEmbed(apiClient, fromContents)); ++ setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel)); + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['config'], embedContentConfigToMldev(apiClient, fromConfig, toObject)); +- } +- const fromModelForEmbedContent = getValueByPath(fromObject, ['model']); +- if (fromModelForEmbedContent !== undefined) { +- setValueByPath(toObject, ['requests[]', 'model'], tModel(apiClient, fromModelForEmbedContent)); ++ setValueByPath(toObject, ['config'], liveConnectConfigToVertex(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function generateImagesConfigToMldev(apiClient, fromObject, parentObject) { ++function liveServerSetupCompleteFromMldev() { + const toObject = {}; +- if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) { +- throw new Error('outputGcsUri parameter is not supported in Gemini API.'); ++ return toObject; ++} ++function liveServerSetupCompleteFromVertex() { ++ const toObject = {}; ++ return toObject; ++} ++function partFromMldev$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); + } +- if (getValueByPath(fromObject, ['negativePrompt']) !== undefined) { +- throw new Error('negativePrompt parameter is not supported in Gemini API.'); ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', ++ ]); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); + } +- const fromNumberOfImages = getValueByPath(fromObject, [ +- 'numberOfImages', ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', + ]); +- if (parentObject !== undefined && fromNumberOfImages != null) { +- setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfImages); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); + } +- const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']); +- if (parentObject !== undefined && fromAspectRatio != null) { +- setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio); ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); + } +- const fromGuidanceScale = getValueByPath(fromObject, [ +- 'guidanceScale', ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); ++ } ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', + ]); +- if (parentObject !== undefined && fromGuidanceScale != null) { +- setValueByPath(parentObject, ['parameters', 'guidanceScale'], fromGuidanceScale); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); + } +- if (getValueByPath(fromObject, ['seed']) !== undefined) { +- throw new Error('seed parameter is not supported in Gemini API.'); ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); + } +- const fromSafetyFilterLevel = getValueByPath(fromObject, [ +- 'safetyFilterLevel', +- ]); +- if (parentObject !== undefined && fromSafetyFilterLevel != null) { +- setValueByPath(parentObject, ['parameters', 'safetySetting'], fromSafetyFilterLevel); ++ const fromText = getValueByPath(fromObject, ['text']); ++ if (fromText != null) { ++ setValueByPath(toObject, ['text'], fromText); + } +- const fromPersonGeneration = getValueByPath(fromObject, [ +- 'personGeneration', ++ return toObject; ++} ++function partFromVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromVideoMetadata = getValueByPath(fromObject, [ ++ 'videoMetadata', + ]); +- if (parentObject !== undefined && fromPersonGeneration != null) { +- setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration); ++ if (fromVideoMetadata != null) { ++ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); + } +- const fromIncludeSafetyAttributes = getValueByPath(fromObject, [ +- 'includeSafetyAttributes', ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); ++ } ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', + ]); +- if (parentObject !== undefined && fromIncludeSafetyAttributes != null) { +- setValueByPath(parentObject, ['parameters', 'includeSafetyAttributes'], fromIncludeSafetyAttributes); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); + } +- const fromIncludeRaiReason = getValueByPath(fromObject, [ +- 'includeRaiReason', ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', + ]); +- if (parentObject !== undefined && fromIncludeRaiReason != null) { +- setValueByPath(parentObject, ['parameters', 'includeRaiReason'], fromIncludeRaiReason); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); + } +- const fromLanguage = getValueByPath(fromObject, ['language']); +- if (parentObject !== undefined && fromLanguage != null) { +- setValueByPath(parentObject, ['parameters', 'language'], fromLanguage); ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); + } +- const fromOutputMimeType = getValueByPath(fromObject, [ +- 'outputMimeType', +- ]); +- if (parentObject !== undefined && fromOutputMimeType != null) { +- setValueByPath(parentObject, ['parameters', 'outputOptions', 'mimeType'], fromOutputMimeType); ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); + } +- const fromOutputCompressionQuality = getValueByPath(fromObject, [ +- 'outputCompressionQuality', ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', + ]); +- if (parentObject !== undefined && fromOutputCompressionQuality != null) { +- setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); + } +- if (getValueByPath(fromObject, ['addWatermark']) !== undefined) { +- throw new Error('addWatermark parameter is not supported in Gemini API.'); ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); + } +- if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) { +- throw new Error('enhancePrompt parameter is not supported in Gemini API.'); ++ const fromText = getValueByPath(fromObject, ['text']); ++ if (fromText != null) { ++ setValueByPath(toObject, ['text'], fromText); + } + return toObject; + } +-function generateImagesParametersToMldev(apiClient, fromObject) { ++function contentFromMldev$1(apiClient, fromObject) { + const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); +- } +- const fromPrompt = getValueByPath(fromObject, ['prompt']); +- if (fromPrompt != null) { +- setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt); ++ const fromParts = getValueByPath(fromObject, ['parts']); ++ if (fromParts != null) { ++ if (Array.isArray(fromParts)) { ++ setValueByPath(toObject, ['parts'], fromParts.map((item) => { ++ return partFromMldev$1(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['parts'], fromParts); ++ } + } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['config'], generateImagesConfigToMldev(apiClient, fromConfig, toObject)); ++ const fromRole = getValueByPath(fromObject, ['role']); ++ if (fromRole != null) { ++ setValueByPath(toObject, ['role'], fromRole); + } + return toObject; + } +-function getModelParametersToMldev(apiClient, fromObject) { ++function contentFromVertex$1(apiClient, fromObject) { + const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'name'], tModel(apiClient, fromModel)); +- } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['config'], fromConfig); ++ const fromParts = getValueByPath(fromObject, ['parts']); ++ if (fromParts != null) { ++ if (Array.isArray(fromParts)) { ++ setValueByPath(toObject, ['parts'], fromParts.map((item) => { ++ return partFromVertex$1(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['parts'], fromParts); ++ } ++ } ++ const fromRole = getValueByPath(fromObject, ['role']); ++ if (fromRole != null) { ++ setValueByPath(toObject, ['role'], fromRole); + } + return toObject; + } +-function countTokensConfigToMldev(apiClient, fromObject) { ++function liveServerContentFromMldev(apiClient, fromObject) { + const toObject = {}; +- if (getValueByPath(fromObject, ['systemInstruction']) !== undefined) { +- throw new Error('systemInstruction parameter is not supported in Gemini API.'); ++ const fromModelTurn = getValueByPath(fromObject, ['modelTurn']); ++ if (fromModelTurn != null) { ++ setValueByPath(toObject, ['modelTurn'], contentFromMldev$1(apiClient, fromModelTurn)); + } +- if (getValueByPath(fromObject, ['tools']) !== undefined) { +- throw new Error('tools parameter is not supported in Gemini API.'); ++ const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']); ++ if (fromTurnComplete != null) { ++ setValueByPath(toObject, ['turnComplete'], fromTurnComplete); + } +- if (getValueByPath(fromObject, ['generationConfig']) !== undefined) { +- throw new Error('generationConfig parameter is not supported in Gemini API.'); ++ const fromInterrupted = getValueByPath(fromObject, ['interrupted']); ++ if (fromInterrupted != null) { ++ setValueByPath(toObject, ['interrupted'], fromInterrupted); ++ } ++ const fromGenerationComplete = getValueByPath(fromObject, [ ++ 'generationComplete', ++ ]); ++ if (fromGenerationComplete != null) { ++ setValueByPath(toObject, ['generationComplete'], fromGenerationComplete); + } + return toObject; + } +-function countTokensParametersToMldev(apiClient, fromObject) { ++function liveServerContentFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); ++ const fromModelTurn = getValueByPath(fromObject, ['modelTurn']); ++ if (fromModelTurn != null) { ++ setValueByPath(toObject, ['modelTurn'], contentFromVertex$1(apiClient, fromModelTurn)); + } +- const fromContents = getValueByPath(fromObject, ['contents']); +- if (fromContents != null) { +- if (Array.isArray(fromContents)) { +- setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToMldev(apiClient, item); +- }))); +- } +- else { +- setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); +- } ++ const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']); ++ if (fromTurnComplete != null) { ++ setValueByPath(toObject, ['turnComplete'], fromTurnComplete); + } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['config'], countTokensConfigToMldev(apiClient, fromConfig)); ++ const fromInterrupted = getValueByPath(fromObject, ['interrupted']); ++ if (fromInterrupted != null) { ++ setValueByPath(toObject, ['interrupted'], fromInterrupted); ++ } ++ const fromGenerationComplete = getValueByPath(fromObject, [ ++ 'generationComplete', ++ ]); ++ if (fromGenerationComplete != null) { ++ setValueByPath(toObject, ['generationComplete'], fromGenerationComplete); + } + return toObject; + } +-function imageToMldev(apiClient, fromObject) { ++function functionCallFromMldev(apiClient, fromObject) { + const toObject = {}; +- if (getValueByPath(fromObject, ['gcsUri']) !== undefined) { +- throw new Error('gcsUri parameter is not supported in Gemini API.'); ++ const fromId = getValueByPath(fromObject, ['id']); ++ if (fromId != null) { ++ setValueByPath(toObject, ['id'], fromId); + } +- const fromImageBytes = getValueByPath(fromObject, ['imageBytes']); +- if (fromImageBytes != null) { +- setValueByPath(toObject, ['bytesBase64Encoded'], tBytes(apiClient, fromImageBytes)); ++ const fromArgs = getValueByPath(fromObject, ['args']); ++ if (fromArgs != null) { ++ setValueByPath(toObject, ['args'], fromArgs); + } +- const fromMimeType = getValueByPath(fromObject, ['mimeType']); +- if (fromMimeType != null) { +- setValueByPath(toObject, ['mimeType'], fromMimeType); ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); + } + return toObject; + } +-function generateVideosConfigToMldev(apiClient, fromObject, parentObject) { ++function functionCallFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromNumberOfVideos = getValueByPath(fromObject, [ +- 'numberOfVideos', +- ]); +- if (parentObject !== undefined && fromNumberOfVideos != null) { +- setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfVideos); +- } +- if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) { +- throw new Error('outputGcsUri parameter is not supported in Gemini API.'); ++ const fromArgs = getValueByPath(fromObject, ['args']); ++ if (fromArgs != null) { ++ setValueByPath(toObject, ['args'], fromArgs); + } +- if (getValueByPath(fromObject, ['fps']) !== undefined) { +- throw new Error('fps parameter is not supported in Gemini API.'); ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); + } +- const fromDurationSeconds = getValueByPath(fromObject, [ +- 'durationSeconds', ++ return toObject; ++} ++function liveServerToolCallFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromFunctionCalls = getValueByPath(fromObject, [ ++ 'functionCalls', + ]); +- if (parentObject !== undefined && fromDurationSeconds != null) { +- setValueByPath(parentObject, ['parameters', 'durationSeconds'], fromDurationSeconds); +- } +- if (getValueByPath(fromObject, ['seed']) !== undefined) { +- throw new Error('seed parameter is not supported in Gemini API.'); +- } +- const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']); +- if (parentObject !== undefined && fromAspectRatio != null) { +- setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio); +- } +- if (getValueByPath(fromObject, ['resolution']) !== undefined) { +- throw new Error('resolution parameter is not supported in Gemini API.'); ++ if (fromFunctionCalls != null) { ++ if (Array.isArray(fromFunctionCalls)) { ++ setValueByPath(toObject, ['functionCalls'], fromFunctionCalls.map((item) => { ++ return functionCallFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['functionCalls'], fromFunctionCalls); ++ } + } +- const fromPersonGeneration = getValueByPath(fromObject, [ +- 'personGeneration', ++ return toObject; ++} ++function liveServerToolCallFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromFunctionCalls = getValueByPath(fromObject, [ ++ 'functionCalls', + ]); +- if (parentObject !== undefined && fromPersonGeneration != null) { +- setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration); +- } +- if (getValueByPath(fromObject, ['pubsubTopic']) !== undefined) { +- throw new Error('pubsubTopic parameter is not supported in Gemini API.'); ++ if (fromFunctionCalls != null) { ++ if (Array.isArray(fromFunctionCalls)) { ++ setValueByPath(toObject, ['functionCalls'], fromFunctionCalls.map((item) => { ++ return functionCallFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['functionCalls'], fromFunctionCalls); ++ } + } +- const fromNegativePrompt = getValueByPath(fromObject, [ +- 'negativePrompt', +- ]); +- if (parentObject !== undefined && fromNegativePrompt != null) { +- setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt); ++ return toObject; ++} ++function liveServerToolCallCancellationFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromIds = getValueByPath(fromObject, ['ids']); ++ if (fromIds != null) { ++ setValueByPath(toObject, ['ids'], fromIds); + } +- if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) { +- throw new Error('enhancePrompt parameter is not supported in Gemini API.'); ++ return toObject; ++} ++function liveServerToolCallCancellationFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromIds = getValueByPath(fromObject, ['ids']); ++ if (fromIds != null) { ++ setValueByPath(toObject, ['ids'], fromIds); + } + return toObject; + } +-function generateVideosParametersToMldev(apiClient, fromObject) { ++function modalityTokenCountFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); ++ const fromModality = getValueByPath(fromObject, ['modality']); ++ if (fromModality != null) { ++ setValueByPath(toObject, ['modality'], fromModality); + } +- const fromPrompt = getValueByPath(fromObject, ['prompt']); +- if (fromPrompt != null) { +- setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt); ++ const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); ++ if (fromTokenCount != null) { ++ setValueByPath(toObject, ['tokenCount'], fromTokenCount); + } +- const fromImage = getValueByPath(fromObject, ['image']); +- if (fromImage != null) { +- setValueByPath(toObject, ['instances[0]', 'image'], imageToMldev(apiClient, fromImage)); ++ return toObject; ++} ++function modalityTokenCountFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromModality = getValueByPath(fromObject, ['modality']); ++ if (fromModality != null) { ++ setValueByPath(toObject, ['modality'], fromModality); + } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['config'], generateVideosConfigToMldev(apiClient, fromConfig, toObject)); ++ const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); ++ if (fromTokenCount != null) { ++ setValueByPath(toObject, ['tokenCount'], fromTokenCount); + } + return toObject; + } +-function partToVertex(apiClient, fromObject) { ++function usageMetadataFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromVideoMetadata = getValueByPath(fromObject, [ +- 'videoMetadata', ++ const fromPromptTokenCount = getValueByPath(fromObject, [ ++ 'promptTokenCount', + ]); +- if (fromVideoMetadata != null) { +- setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); +- } +- const fromThought = getValueByPath(fromObject, ['thought']); +- if (fromThought != null) { +- setValueByPath(toObject, ['thought'], fromThought); ++ if (fromPromptTokenCount != null) { ++ setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount); + } +- const fromCodeExecutionResult = getValueByPath(fromObject, [ +- 'codeExecutionResult', ++ const fromCachedContentTokenCount = getValueByPath(fromObject, [ ++ 'cachedContentTokenCount', + ]); +- if (fromCodeExecutionResult != null) { +- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); ++ if (fromCachedContentTokenCount != null) { ++ setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); + } +- const fromExecutableCode = getValueByPath(fromObject, [ +- 'executableCode', ++ const fromResponseTokenCount = getValueByPath(fromObject, [ ++ 'responseTokenCount', + ]); +- if (fromExecutableCode != null) { +- setValueByPath(toObject, ['executableCode'], fromExecutableCode); ++ if (fromResponseTokenCount != null) { ++ setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount); + } +- const fromFileData = getValueByPath(fromObject, ['fileData']); +- if (fromFileData != null) { +- setValueByPath(toObject, ['fileData'], fromFileData); ++ const fromToolUsePromptTokenCount = getValueByPath(fromObject, [ ++ 'toolUsePromptTokenCount', ++ ]); ++ if (fromToolUsePromptTokenCount != null) { ++ setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount); + } +- const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); +- if (fromFunctionCall != null) { +- setValueByPath(toObject, ['functionCall'], fromFunctionCall); ++ const fromThoughtsTokenCount = getValueByPath(fromObject, [ ++ 'thoughtsTokenCount', ++ ]); ++ if (fromThoughtsTokenCount != null) { ++ setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount); + } +- const fromFunctionResponse = getValueByPath(fromObject, [ +- 'functionResponse', ++ const fromTotalTokenCount = getValueByPath(fromObject, [ ++ 'totalTokenCount', + ]); +- if (fromFunctionResponse != null) { +- setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); ++ if (fromTotalTokenCount != null) { ++ setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount); + } +- const fromInlineData = getValueByPath(fromObject, ['inlineData']); +- if (fromInlineData != null) { +- setValueByPath(toObject, ['inlineData'], fromInlineData); ++ const fromPromptTokensDetails = getValueByPath(fromObject, [ ++ 'promptTokensDetails', ++ ]); ++ if (fromPromptTokensDetails != null) { ++ if (Array.isArray(fromPromptTokensDetails)) { ++ setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails.map((item) => { ++ return modalityTokenCountFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails); ++ } + } +- const fromText = getValueByPath(fromObject, ['text']); ++ const fromCacheTokensDetails = getValueByPath(fromObject, [ ++ 'cacheTokensDetails', ++ ]); ++ if (fromCacheTokensDetails != null) { ++ if (Array.isArray(fromCacheTokensDetails)) { ++ setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails.map((item) => { ++ return modalityTokenCountFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails); ++ } ++ } ++ const fromResponseTokensDetails = getValueByPath(fromObject, [ ++ 'responseTokensDetails', ++ ]); ++ if (fromResponseTokensDetails != null) { ++ if (Array.isArray(fromResponseTokensDetails)) { ++ setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails.map((item) => { ++ return modalityTokenCountFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails); ++ } ++ } ++ const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [ ++ 'toolUsePromptTokensDetails', ++ ]); ++ if (fromToolUsePromptTokensDetails != null) { ++ if (Array.isArray(fromToolUsePromptTokensDetails)) { ++ setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails.map((item) => { ++ return modalityTokenCountFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails); ++ } ++ } ++ return toObject; ++} ++function usageMetadataFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromPromptTokenCount = getValueByPath(fromObject, [ ++ 'promptTokenCount', ++ ]); ++ if (fromPromptTokenCount != null) { ++ setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount); ++ } ++ const fromCachedContentTokenCount = getValueByPath(fromObject, [ ++ 'cachedContentTokenCount', ++ ]); ++ if (fromCachedContentTokenCount != null) { ++ setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); ++ } ++ const fromResponseTokenCount = getValueByPath(fromObject, [ ++ 'candidatesTokenCount', ++ ]); ++ if (fromResponseTokenCount != null) { ++ setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount); ++ } ++ const fromToolUsePromptTokenCount = getValueByPath(fromObject, [ ++ 'toolUsePromptTokenCount', ++ ]); ++ if (fromToolUsePromptTokenCount != null) { ++ setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount); ++ } ++ const fromThoughtsTokenCount = getValueByPath(fromObject, [ ++ 'thoughtsTokenCount', ++ ]); ++ if (fromThoughtsTokenCount != null) { ++ setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount); ++ } ++ const fromTotalTokenCount = getValueByPath(fromObject, [ ++ 'totalTokenCount', ++ ]); ++ if (fromTotalTokenCount != null) { ++ setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount); ++ } ++ const fromPromptTokensDetails = getValueByPath(fromObject, [ ++ 'promptTokensDetails', ++ ]); ++ if (fromPromptTokensDetails != null) { ++ if (Array.isArray(fromPromptTokensDetails)) { ++ setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails.map((item) => { ++ return modalityTokenCountFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails); ++ } ++ } ++ const fromCacheTokensDetails = getValueByPath(fromObject, [ ++ 'cacheTokensDetails', ++ ]); ++ if (fromCacheTokensDetails != null) { ++ if (Array.isArray(fromCacheTokensDetails)) { ++ setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails.map((item) => { ++ return modalityTokenCountFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails); ++ } ++ } ++ const fromResponseTokensDetails = getValueByPath(fromObject, [ ++ 'candidatesTokensDetails', ++ ]); ++ if (fromResponseTokensDetails != null) { ++ if (Array.isArray(fromResponseTokensDetails)) { ++ setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails.map((item) => { ++ return modalityTokenCountFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails); ++ } ++ } ++ const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [ ++ 'toolUsePromptTokensDetails', ++ ]); ++ if (fromToolUsePromptTokensDetails != null) { ++ if (Array.isArray(fromToolUsePromptTokensDetails)) { ++ setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails.map((item) => { ++ return modalityTokenCountFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails); ++ } ++ } ++ const fromTrafficType = getValueByPath(fromObject, ['trafficType']); ++ if (fromTrafficType != null) { ++ setValueByPath(toObject, ['trafficType'], fromTrafficType); ++ } ++ return toObject; ++} ++function liveServerGoAwayFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']); ++ if (fromTimeLeft != null) { ++ setValueByPath(toObject, ['timeLeft'], fromTimeLeft); ++ } ++ return toObject; ++} ++function liveServerGoAwayFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']); ++ if (fromTimeLeft != null) { ++ setValueByPath(toObject, ['timeLeft'], fromTimeLeft); ++ } ++ return toObject; ++} ++function liveServerSessionResumptionUpdateFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromNewHandle = getValueByPath(fromObject, ['newHandle']); ++ if (fromNewHandle != null) { ++ setValueByPath(toObject, ['newHandle'], fromNewHandle); ++ } ++ const fromResumable = getValueByPath(fromObject, ['resumable']); ++ if (fromResumable != null) { ++ setValueByPath(toObject, ['resumable'], fromResumable); ++ } ++ const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [ ++ 'lastConsumedClientMessageIndex', ++ ]); ++ if (fromLastConsumedClientMessageIndex != null) { ++ setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex); ++ } ++ return toObject; ++} ++function liveServerSessionResumptionUpdateFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromNewHandle = getValueByPath(fromObject, ['newHandle']); ++ if (fromNewHandle != null) { ++ setValueByPath(toObject, ['newHandle'], fromNewHandle); ++ } ++ const fromResumable = getValueByPath(fromObject, ['resumable']); ++ if (fromResumable != null) { ++ setValueByPath(toObject, ['resumable'], fromResumable); ++ } ++ const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [ ++ 'lastConsumedClientMessageIndex', ++ ]); ++ if (fromLastConsumedClientMessageIndex != null) { ++ setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex); ++ } ++ return toObject; ++} ++function liveServerMessageFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromSetupComplete = getValueByPath(fromObject, [ ++ 'setupComplete', ++ ]); ++ if (fromSetupComplete != null) { ++ setValueByPath(toObject, ['setupComplete'], liveServerSetupCompleteFromMldev()); ++ } ++ const fromServerContent = getValueByPath(fromObject, [ ++ 'serverContent', ++ ]); ++ if (fromServerContent != null) { ++ setValueByPath(toObject, ['serverContent'], liveServerContentFromMldev(apiClient, fromServerContent)); ++ } ++ const fromToolCall = getValueByPath(fromObject, ['toolCall']); ++ if (fromToolCall != null) { ++ setValueByPath(toObject, ['toolCall'], liveServerToolCallFromMldev(apiClient, fromToolCall)); ++ } ++ const fromToolCallCancellation = getValueByPath(fromObject, [ ++ 'toolCallCancellation', ++ ]); ++ if (fromToolCallCancellation != null) { ++ setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromMldev(apiClient, fromToolCallCancellation)); ++ } ++ const fromUsageMetadata = getValueByPath(fromObject, [ ++ 'usageMetadata', ++ ]); ++ if (fromUsageMetadata != null) { ++ setValueByPath(toObject, ['usageMetadata'], usageMetadataFromMldev(apiClient, fromUsageMetadata)); ++ } ++ const fromGoAway = getValueByPath(fromObject, ['goAway']); ++ if (fromGoAway != null) { ++ setValueByPath(toObject, ['goAway'], liveServerGoAwayFromMldev(apiClient, fromGoAway)); ++ } ++ const fromSessionResumptionUpdate = getValueByPath(fromObject, [ ++ 'sessionResumptionUpdate', ++ ]); ++ if (fromSessionResumptionUpdate != null) { ++ setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromMldev(apiClient, fromSessionResumptionUpdate)); ++ } ++ return toObject; ++} ++function liveServerMessageFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromSetupComplete = getValueByPath(fromObject, [ ++ 'setupComplete', ++ ]); ++ if (fromSetupComplete != null) { ++ setValueByPath(toObject, ['setupComplete'], liveServerSetupCompleteFromVertex()); ++ } ++ const fromServerContent = getValueByPath(fromObject, [ ++ 'serverContent', ++ ]); ++ if (fromServerContent != null) { ++ setValueByPath(toObject, ['serverContent'], liveServerContentFromVertex(apiClient, fromServerContent)); ++ } ++ const fromToolCall = getValueByPath(fromObject, ['toolCall']); ++ if (fromToolCall != null) { ++ setValueByPath(toObject, ['toolCall'], liveServerToolCallFromVertex(apiClient, fromToolCall)); ++ } ++ const fromToolCallCancellation = getValueByPath(fromObject, [ ++ 'toolCallCancellation', ++ ]); ++ if (fromToolCallCancellation != null) { ++ setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromVertex(apiClient, fromToolCallCancellation)); ++ } ++ const fromUsageMetadata = getValueByPath(fromObject, [ ++ 'usageMetadata', ++ ]); ++ if (fromUsageMetadata != null) { ++ setValueByPath(toObject, ['usageMetadata'], usageMetadataFromVertex(apiClient, fromUsageMetadata)); ++ } ++ const fromGoAway = getValueByPath(fromObject, ['goAway']); ++ if (fromGoAway != null) { ++ setValueByPath(toObject, ['goAway'], liveServerGoAwayFromVertex(apiClient, fromGoAway)); ++ } ++ const fromSessionResumptionUpdate = getValueByPath(fromObject, [ ++ 'sessionResumptionUpdate', ++ ]); ++ if (fromSessionResumptionUpdate != null) { ++ setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromVertex(apiClient, fromSessionResumptionUpdate)); ++ } ++ return toObject; ++} ++ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++function partToMldev(apiClient, fromObject) { ++ const toObject = {}; ++ if (getValueByPath(fromObject, ['videoMetadata']) !== undefined) { ++ throw new Error('videoMetadata parameter is not supported in Gemini API.'); ++ } ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); ++ } ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', ++ ]); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); ++ } ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', ++ ]); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); ++ } ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); ++ } ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); ++ } ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', ++ ]); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); ++ } ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); ++ } ++ const fromText = getValueByPath(fromObject, ['text']); + if (fromText != null) { + setValueByPath(toObject, ['text'], fromText); + } + return toObject; + } +-function contentToVertex(apiClient, fromObject) { ++function contentToMldev(apiClient, fromObject) { + const toObject = {}; + const fromParts = getValueByPath(fromObject, ['parts']); + if (fromParts != null) { + if (Array.isArray(fromParts)) { + setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partToVertex(apiClient, item); ++ return partToMldev(apiClient, item); + })); + } + else { +@@ -4223,39 +4746,28 @@ function contentToVertex(apiClient, fromObject) { + } + return toObject; + } +-function schemaToVertex(apiClient, fromObject) { ++function schemaToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromExample = getValueByPath(fromObject, ['example']); +- if (fromExample != null) { +- setValueByPath(toObject, ['example'], fromExample); ++ if (getValueByPath(fromObject, ['example']) !== undefined) { ++ throw new Error('example parameter is not supported in Gemini API.'); + } +- const fromPattern = getValueByPath(fromObject, ['pattern']); +- if (fromPattern != null) { +- setValueByPath(toObject, ['pattern'], fromPattern); ++ if (getValueByPath(fromObject, ['pattern']) !== undefined) { ++ throw new Error('pattern parameter is not supported in Gemini API.'); + } +- const fromDefault = getValueByPath(fromObject, ['default']); +- if (fromDefault != null) { +- setValueByPath(toObject, ['default'], fromDefault); ++ if (getValueByPath(fromObject, ['default']) !== undefined) { ++ throw new Error('default parameter is not supported in Gemini API.'); + } +- const fromMaxLength = getValueByPath(fromObject, ['maxLength']); +- if (fromMaxLength != null) { +- setValueByPath(toObject, ['maxLength'], fromMaxLength); ++ if (getValueByPath(fromObject, ['maxLength']) !== undefined) { ++ throw new Error('maxLength parameter is not supported in Gemini API.'); + } +- const fromMinLength = getValueByPath(fromObject, ['minLength']); +- if (fromMinLength != null) { +- setValueByPath(toObject, ['minLength'], fromMinLength); ++ if (getValueByPath(fromObject, ['minLength']) !== undefined) { ++ throw new Error('minLength parameter is not supported in Gemini API.'); + } +- const fromMinProperties = getValueByPath(fromObject, [ +- 'minProperties', +- ]); +- if (fromMinProperties != null) { +- setValueByPath(toObject, ['minProperties'], fromMinProperties); ++ if (getValueByPath(fromObject, ['minProperties']) !== undefined) { ++ throw new Error('minProperties parameter is not supported in Gemini API.'); + } +- const fromMaxProperties = getValueByPath(fromObject, [ +- 'maxProperties', +- ]); +- if (fromMaxProperties != null) { +- setValueByPath(toObject, ['maxProperties'], fromMaxProperties); ++ if (getValueByPath(fromObject, ['maxProperties']) !== undefined) { ++ throw new Error('maxProperties parameter is not supported in Gemini API.'); + } + const fromAnyOf = getValueByPath(fromObject, ['anyOf']); + if (fromAnyOf != null) { +@@ -4321,11 +4833,10 @@ function schemaToVertex(apiClient, fromObject) { + } + return toObject; + } +-function safetySettingToVertex(apiClient, fromObject) { ++function safetySettingToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromMethod = getValueByPath(fromObject, ['method']); +- if (fromMethod != null) { +- setValueByPath(toObject, ['method'], fromMethod); ++ if (getValueByPath(fromObject, ['method']) !== undefined) { ++ throw new Error('method parameter is not supported in Gemini API.'); + } + const fromCategory = getValueByPath(fromObject, ['category']); + if (fromCategory != null) { +@@ -4337,11 +4848,10 @@ function safetySettingToVertex(apiClient, fromObject) { + } + return toObject; + } +-function functionDeclarationToVertex(apiClient, fromObject) { ++function functionDeclarationToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromResponse = getValueByPath(fromObject, ['response']); +- if (fromResponse != null) { +- setValueByPath(toObject, ['response'], schemaToVertex(apiClient, fromResponse)); ++ if (getValueByPath(fromObject, ['response']) !== undefined) { ++ throw new Error('response parameter is not supported in Gemini API.'); + } + const fromDescription = getValueByPath(fromObject, ['description']); + if (fromDescription != null) { +@@ -4357,11 +4867,11 @@ function functionDeclarationToVertex(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchToVertex() { ++function googleSearchToMldev() { + const toObject = {}; + return toObject; + } +-function dynamicRetrievalConfigToVertex(apiClient, fromObject) { ++function dynamicRetrievalConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromMode = getValueByPath(fromObject, ['mode']); + if (fromMode != null) { +@@ -4375,17 +4885,17 @@ function dynamicRetrievalConfigToVertex(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchRetrievalToVertex(apiClient, fromObject) { ++function googleSearchRetrievalToMldev(apiClient, fromObject) { + const toObject = {}; + const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ + 'dynamicRetrievalConfig', + ]); + if (fromDynamicRetrievalConfig != null) { +- setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig)); ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig)); + } + return toObject; + } +-function toolToVertex(apiClient, fromObject) { ++function toolToMldev(apiClient, fromObject) { + const toObject = {}; + const fromFunctionDeclarations = getValueByPath(fromObject, [ + 'functionDeclarations', +@@ -4393,26 +4903,25 @@ function toolToVertex(apiClient, fromObject) { + if (fromFunctionDeclarations != null) { + if (Array.isArray(fromFunctionDeclarations)) { + setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { +- return functionDeclarationToVertex(apiClient, item); ++ return functionDeclarationToMldev(apiClient, item); + })); + } + else { + setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations); + } + } +- const fromRetrieval = getValueByPath(fromObject, ['retrieval']); +- if (fromRetrieval != null) { +- setValueByPath(toObject, ['retrieval'], fromRetrieval); ++ if (getValueByPath(fromObject, ['retrieval']) !== undefined) { ++ throw new Error('retrieval parameter is not supported in Gemini API.'); + } + const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); + if (fromGoogleSearch != null) { +- setValueByPath(toObject, ['googleSearch'], googleSearchToVertex()); ++ setValueByPath(toObject, ['googleSearch'], googleSearchToMldev()); + } + const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ + 'googleSearchRetrieval', + ]); + if (fromGoogleSearchRetrieval != null) { +- setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval)); ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval)); + } + const fromCodeExecution = getValueByPath(fromObject, [ + 'codeExecution', +@@ -4422,7 +4931,7 @@ function toolToVertex(apiClient, fromObject) { + } + return toObject; + } +-function functionCallingConfigToVertex(apiClient, fromObject) { ++function functionCallingConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromMode = getValueByPath(fromObject, ['mode']); + if (fromMode != null) { +@@ -4436,17 +4945,17 @@ function functionCallingConfigToVertex(apiClient, fromObject) { + } + return toObject; + } +-function toolConfigToVertex(apiClient, fromObject) { ++function toolConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromFunctionCallingConfig = getValueByPath(fromObject, [ + 'functionCallingConfig', + ]); + if (fromFunctionCallingConfig != null) { +- setValueByPath(toObject, ['functionCallingConfig'], functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig)); ++ setValueByPath(toObject, ['functionCallingConfig'], functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig)); + } + return toObject; + } +-function prebuiltVoiceConfigToVertex(apiClient, fromObject) { ++function prebuiltVoiceConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromVoiceName = getValueByPath(fromObject, ['voiceName']); + if (fromVoiceName != null) { +@@ -4454,25 +4963,29 @@ function prebuiltVoiceConfigToVertex(apiClient, fromObject) { + } + return toObject; + } +-function voiceConfigToVertex(apiClient, fromObject) { ++function voiceConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [ + 'prebuiltVoiceConfig', + ]); + if (fromPrebuiltVoiceConfig != null) { +- setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToVertex(apiClient, fromPrebuiltVoiceConfig)); ++ setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToMldev(apiClient, fromPrebuiltVoiceConfig)); + } + return toObject; + } +-function speechConfigToVertex(apiClient, fromObject) { ++function speechConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']); + if (fromVoiceConfig != null) { +- setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(apiClient, fromVoiceConfig)); ++ setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev(apiClient, fromVoiceConfig)); ++ } ++ const fromLanguageCode = getValueByPath(fromObject, ['languageCode']); ++ if (fromLanguageCode != null) { ++ setValueByPath(toObject, ['languageCode'], fromLanguageCode); + } + return toObject; + } +-function thinkingConfigToVertex(apiClient, fromObject) { ++function thinkingConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromIncludeThoughts = getValueByPath(fromObject, [ + 'includeThoughts', +@@ -4488,13 +5001,13 @@ function thinkingConfigToVertex(apiClient, fromObject) { + } + return toObject; + } +-function generateContentConfigToVertex(apiClient, fromObject, parentObject) { ++function generateContentConfigToMldev(apiClient, fromObject, parentObject) { + const toObject = {}; + const fromSystemInstruction = getValueByPath(fromObject, [ + 'systemInstruction', + ]); + if (parentObject !== undefined && fromSystemInstruction != null) { +- setValueByPath(parentObject, ['systemInstruction'], contentToVertex(apiClient, tContent(apiClient, fromSystemInstruction))); ++ setValueByPath(parentObject, ['systemInstruction'], contentToMldev(apiClient, tContent(apiClient, fromSystemInstruction))); + } + const fromTemperature = getValueByPath(fromObject, ['temperature']); + if (fromTemperature != null) { +@@ -4562,13 +5075,13 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + 'responseSchema', + ]); + if (fromResponseSchema != null) { +- setValueByPath(toObject, ['responseSchema'], schemaToVertex(apiClient, tSchema(apiClient, fromResponseSchema))); ++ setValueByPath(toObject, ['responseSchema'], schemaToMldev(apiClient, tSchema(apiClient, fromResponseSchema))); + } +- const fromRoutingConfig = getValueByPath(fromObject, [ +- 'routingConfig', +- ]); +- if (fromRoutingConfig != null) { +- setValueByPath(toObject, ['routingConfig'], fromRoutingConfig); ++ if (getValueByPath(fromObject, ['routingConfig']) !== undefined) { ++ throw new Error('routingConfig parameter is not supported in Gemini API.'); ++ } ++ if (getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined) { ++ throw new Error('modelSelectionConfig parameter is not supported in Gemini API.'); + } + const fromSafetySettings = getValueByPath(fromObject, [ + 'safetySettings', +@@ -4576,7 +5089,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromSafetySettings != null) { + if (Array.isArray(fromSafetySettings)) { + setValueByPath(parentObject, ['safetySettings'], fromSafetySettings.map((item) => { +- return safetySettingToVertex(apiClient, item); ++ return safetySettingToMldev(apiClient, item); + })); + } + else { +@@ -4587,7 +5100,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromTools != null) { + if (Array.isArray(fromTools)) { + setValueByPath(parentObject, ['tools'], tTools(apiClient, tTools(apiClient, fromTools).map((item) => { +- return toolToVertex(apiClient, tTool(apiClient, item)); ++ return toolToMldev(apiClient, tTool(apiClient, item)); + }))); + } + else { +@@ -4596,11 +5109,10 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + } + const fromToolConfig = getValueByPath(fromObject, ['toolConfig']); + if (parentObject !== undefined && fromToolConfig != null) { +- setValueByPath(parentObject, ['toolConfig'], toolConfigToVertex(apiClient, fromToolConfig)); ++ setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev(apiClient, fromToolConfig)); + } +- const fromLabels = getValueByPath(fromObject, ['labels']); +- if (parentObject !== undefined && fromLabels != null) { +- setValueByPath(parentObject, ['labels'], fromLabels); ++ if (getValueByPath(fromObject, ['labels']) !== undefined) { ++ throw new Error('labels parameter is not supported in Gemini API.'); + } + const fromCachedContent = getValueByPath(fromObject, [ + 'cachedContent', +@@ -4622,23 +5134,20 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + } + const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); + if (fromSpeechConfig != null) { +- setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(apiClient, tSpeechConfig(apiClient, fromSpeechConfig))); ++ setValueByPath(toObject, ['speechConfig'], speechConfigToMldev(apiClient, tSpeechConfig(apiClient, fromSpeechConfig))); + } +- const fromAudioTimestamp = getValueByPath(fromObject, [ +- 'audioTimestamp', +- ]); +- if (fromAudioTimestamp != null) { +- setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp); ++ if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) { ++ throw new Error('audioTimestamp parameter is not supported in Gemini API.'); + } + const fromThinkingConfig = getValueByPath(fromObject, [ + 'thinkingConfig', + ]); + if (fromThinkingConfig != null) { +- setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToVertex(apiClient, fromThinkingConfig)); ++ setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev(apiClient, fromThinkingConfig)); + } + return toObject; + } +-function generateContentParametersToVertex(apiClient, fromObject) { ++function generateContentParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -4648,7 +5157,7 @@ function generateContentParametersToVertex(apiClient, fromObject) { + if (fromContents != null) { + if (Array.isArray(fromContents)) { + setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToVertex(apiClient, item); ++ return contentToMldev(apiClient, item); + }))); + } + else { +@@ -4657,37 +5166,35 @@ function generateContentParametersToVertex(apiClient, fromObject) { + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['generationConfig'], generateContentConfigToVertex(apiClient, fromConfig, toObject)); ++ setValueByPath(toObject, ['generationConfig'], generateContentConfigToMldev(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function embedContentConfigToVertex(apiClient, fromObject, parentObject) { ++function embedContentConfigToMldev(apiClient, fromObject, parentObject) { + const toObject = {}; + const fromTaskType = getValueByPath(fromObject, ['taskType']); + if (parentObject !== undefined && fromTaskType != null) { +- setValueByPath(parentObject, ['instances[]', 'task_type'], fromTaskType); ++ setValueByPath(parentObject, ['requests[]', 'taskType'], fromTaskType); + } + const fromTitle = getValueByPath(fromObject, ['title']); + if (parentObject !== undefined && fromTitle != null) { +- setValueByPath(parentObject, ['instances[]', 'title'], fromTitle); ++ setValueByPath(parentObject, ['requests[]', 'title'], fromTitle); + } + const fromOutputDimensionality = getValueByPath(fromObject, [ + 'outputDimensionality', + ]); + if (parentObject !== undefined && fromOutputDimensionality != null) { +- setValueByPath(parentObject, ['parameters', 'outputDimensionality'], fromOutputDimensionality); ++ setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality); + } +- const fromMimeType = getValueByPath(fromObject, ['mimeType']); +- if (parentObject !== undefined && fromMimeType != null) { +- setValueByPath(parentObject, ['instances[]', 'mimeType'], fromMimeType); ++ if (getValueByPath(fromObject, ['mimeType']) !== undefined) { ++ throw new Error('mimeType parameter is not supported in Gemini API.'); + } +- const fromAutoTruncate = getValueByPath(fromObject, ['autoTruncate']); +- if (parentObject !== undefined && fromAutoTruncate != null) { +- setValueByPath(parentObject, ['parameters', 'autoTruncate'], fromAutoTruncate); ++ if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) { ++ throw new Error('autoTruncate parameter is not supported in Gemini API.'); + } + return toObject; + } +-function embedContentParametersToVertex(apiClient, fromObject) { ++function embedContentParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -4695,25 +5202,25 @@ function embedContentParametersToVertex(apiClient, fromObject) { + } + const fromContents = getValueByPath(fromObject, ['contents']); + if (fromContents != null) { +- setValueByPath(toObject, ['instances[]', 'content'], tContentsForEmbed(apiClient, fromContents)); ++ setValueByPath(toObject, ['requests[]', 'content'], tContentsForEmbed(apiClient, fromContents)); + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['config'], embedContentConfigToVertex(apiClient, fromConfig, toObject)); ++ setValueByPath(toObject, ['config'], embedContentConfigToMldev(apiClient, fromConfig, toObject)); ++ } ++ const fromModelForEmbedContent = getValueByPath(fromObject, ['model']); ++ if (fromModelForEmbedContent !== undefined) { ++ setValueByPath(toObject, ['requests[]', 'model'], tModel(apiClient, fromModelForEmbedContent)); + } + return toObject; + } +-function generateImagesConfigToVertex(apiClient, fromObject, parentObject) { ++function generateImagesConfigToMldev(apiClient, fromObject, parentObject) { + const toObject = {}; +- const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']); +- if (parentObject !== undefined && fromOutputGcsUri != null) { +- setValueByPath(parentObject, ['parameters', 'storageUri'], fromOutputGcsUri); ++ if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) { ++ throw new Error('outputGcsUri parameter is not supported in Gemini API.'); + } +- const fromNegativePrompt = getValueByPath(fromObject, [ +- 'negativePrompt', +- ]); +- if (parentObject !== undefined && fromNegativePrompt != null) { +- setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt); ++ if (getValueByPath(fromObject, ['negativePrompt']) !== undefined) { ++ throw new Error('negativePrompt parameter is not supported in Gemini API.'); + } + const fromNumberOfImages = getValueByPath(fromObject, [ + 'numberOfImages', +@@ -4731,9 +5238,8 @@ function generateImagesConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromGuidanceScale != null) { + setValueByPath(parentObject, ['parameters', 'guidanceScale'], fromGuidanceScale); + } +- const fromSeed = getValueByPath(fromObject, ['seed']); +- if (parentObject !== undefined && fromSeed != null) { +- setValueByPath(parentObject, ['parameters', 'seed'], fromSeed); ++ if (getValueByPath(fromObject, ['seed']) !== undefined) { ++ throw new Error('seed parameter is not supported in Gemini API.'); + } + const fromSafetyFilterLevel = getValueByPath(fromObject, [ + 'safetyFilterLevel', +@@ -4775,19 +5281,15 @@ function generateImagesConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromOutputCompressionQuality != null) { + setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality); + } +- const fromAddWatermark = getValueByPath(fromObject, ['addWatermark']); +- if (parentObject !== undefined && fromAddWatermark != null) { +- setValueByPath(parentObject, ['parameters', 'addWatermark'], fromAddWatermark); ++ if (getValueByPath(fromObject, ['addWatermark']) !== undefined) { ++ throw new Error('addWatermark parameter is not supported in Gemini API.'); + } +- const fromEnhancePrompt = getValueByPath(fromObject, [ +- 'enhancePrompt', +- ]); +- if (parentObject !== undefined && fromEnhancePrompt != null) { +- setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt); ++ if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) { ++ throw new Error('enhancePrompt parameter is not supported in Gemini API.'); + } + return toObject; + } +-function generateImagesParametersToVertex(apiClient, fromObject) { ++function generateImagesParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -4799,11 +5301,11 @@ function generateImagesParametersToVertex(apiClient, fromObject) { + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['config'], generateImagesConfigToVertex(apiClient, fromConfig, toObject)); ++ setValueByPath(toObject, ['config'], generateImagesConfigToMldev(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function getModelParametersToVertex(apiClient, fromObject) { ++function getModelParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -4815,57 +5317,20 @@ function getModelParametersToVertex(apiClient, fromObject) { + } + return toObject; + } +-function countTokensConfigToVertex(apiClient, fromObject, parentObject) { +- const toObject = {}; +- const fromSystemInstruction = getValueByPath(fromObject, [ +- 'systemInstruction', +- ]); +- if (parentObject !== undefined && fromSystemInstruction != null) { +- setValueByPath(parentObject, ['systemInstruction'], contentToVertex(apiClient, tContent(apiClient, fromSystemInstruction))); +- } +- const fromTools = getValueByPath(fromObject, ['tools']); +- if (parentObject !== undefined && fromTools != null) { +- if (Array.isArray(fromTools)) { +- setValueByPath(parentObject, ['tools'], fromTools.map((item) => { +- return toolToVertex(apiClient, item); +- })); +- } +- else { +- setValueByPath(parentObject, ['tools'], fromTools); +- } +- } +- const fromGenerationConfig = getValueByPath(fromObject, [ +- 'generationConfig', +- ]); +- if (parentObject !== undefined && fromGenerationConfig != null) { +- setValueByPath(parentObject, ['generationConfig'], fromGenerationConfig); +- } +- return toObject; +-} +-function countTokensParametersToVertex(apiClient, fromObject) { ++function countTokensConfigToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); ++ if (getValueByPath(fromObject, ['systemInstruction']) !== undefined) { ++ throw new Error('systemInstruction parameter is not supported in Gemini API.'); + } +- const fromContents = getValueByPath(fromObject, ['contents']); +- if (fromContents != null) { +- if (Array.isArray(fromContents)) { +- setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToVertex(apiClient, item); +- }))); +- } +- else { +- setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); +- } ++ if (getValueByPath(fromObject, ['tools']) !== undefined) { ++ throw new Error('tools parameter is not supported in Gemini API.'); + } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['config'], countTokensConfigToVertex(apiClient, fromConfig, toObject)); ++ if (getValueByPath(fromObject, ['generationConfig']) !== undefined) { ++ throw new Error('generationConfig parameter is not supported in Gemini API.'); + } + return toObject; + } +-function computeTokensParametersToVertex(apiClient, fromObject) { ++function countTokensParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -4875,7 +5340,7 @@ function computeTokensParametersToVertex(apiClient, fromObject) { + if (fromContents != null) { + if (Array.isArray(fromContents)) { + setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToVertex(apiClient, item); ++ return contentToMldev(apiClient, item); + }))); + } + else { +@@ -4884,15 +5349,14 @@ function computeTokensParametersToVertex(apiClient, fromObject) { + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['config'], fromConfig); ++ setValueByPath(toObject, ['config'], countTokensConfigToMldev(apiClient, fromConfig)); + } + return toObject; + } +-function imageToVertex(apiClient, fromObject) { ++function imageToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromGcsUri = getValueByPath(fromObject, ['gcsUri']); +- if (fromGcsUri != null) { +- setValueByPath(toObject, ['gcsUri'], fromGcsUri); ++ if (getValueByPath(fromObject, ['gcsUri']) !== undefined) { ++ throw new Error('gcsUri parameter is not supported in Gemini API.'); + } + const fromImageBytes = getValueByPath(fromObject, ['imageBytes']); + if (fromImageBytes != null) { +@@ -4904,7 +5368,7 @@ function imageToVertex(apiClient, fromObject) { + } + return toObject; + } +-function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { ++function generateVideosConfigToMldev(apiClient, fromObject, parentObject) { + const toObject = {}; + const fromNumberOfVideos = getValueByPath(fromObject, [ + 'numberOfVideos', +@@ -4912,13 +5376,11 @@ function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromNumberOfVideos != null) { + setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfVideos); + } +- const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']); +- if (parentObject !== undefined && fromOutputGcsUri != null) { +- setValueByPath(parentObject, ['parameters', 'storageUri'], fromOutputGcsUri); ++ if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) { ++ throw new Error('outputGcsUri parameter is not supported in Gemini API.'); + } +- const fromFps = getValueByPath(fromObject, ['fps']); +- if (parentObject !== undefined && fromFps != null) { +- setValueByPath(parentObject, ['parameters', 'fps'], fromFps); ++ if (getValueByPath(fromObject, ['fps']) !== undefined) { ++ throw new Error('fps parameter is not supported in Gemini API.'); + } + const fromDurationSeconds = getValueByPath(fromObject, [ + 'durationSeconds', +@@ -4926,17 +5388,15 @@ function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromDurationSeconds != null) { + setValueByPath(parentObject, ['parameters', 'durationSeconds'], fromDurationSeconds); + } +- const fromSeed = getValueByPath(fromObject, ['seed']); +- if (parentObject !== undefined && fromSeed != null) { +- setValueByPath(parentObject, ['parameters', 'seed'], fromSeed); ++ if (getValueByPath(fromObject, ['seed']) !== undefined) { ++ throw new Error('seed parameter is not supported in Gemini API.'); + } + const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']); + if (parentObject !== undefined && fromAspectRatio != null) { + setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio); + } +- const fromResolution = getValueByPath(fromObject, ['resolution']); +- if (parentObject !== undefined && fromResolution != null) { +- setValueByPath(parentObject, ['parameters', 'resolution'], fromResolution); ++ if (getValueByPath(fromObject, ['resolution']) !== undefined) { ++ throw new Error('resolution parameter is not supported in Gemini API.'); + } + const fromPersonGeneration = getValueByPath(fromObject, [ + 'personGeneration', +@@ -4944,9 +5404,8 @@ function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromPersonGeneration != null) { + setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration); + } +- const fromPubsubTopic = getValueByPath(fromObject, ['pubsubTopic']); +- if (parentObject !== undefined && fromPubsubTopic != null) { +- setValueByPath(parentObject, ['parameters', 'pubsubTopic'], fromPubsubTopic); ++ if (getValueByPath(fromObject, ['pubsubTopic']) !== undefined) { ++ throw new Error('pubsubTopic parameter is not supported in Gemini API.'); + } + const fromNegativePrompt = getValueByPath(fromObject, [ + 'negativePrompt', +@@ -4954,15 +5413,12 @@ function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromNegativePrompt != null) { + setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt); + } +- const fromEnhancePrompt = getValueByPath(fromObject, [ +- 'enhancePrompt', +- ]); +- if (parentObject !== undefined && fromEnhancePrompt != null) { +- setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt); ++ if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) { ++ throw new Error('enhancePrompt parameter is not supported in Gemini API.'); + } + return toObject; + } +-function generateVideosParametersToVertex(apiClient, fromObject) { ++function generateVideosParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -4974,16 +5430,22 @@ function generateVideosParametersToVertex(apiClient, fromObject) { + } + const fromImage = getValueByPath(fromObject, ['image']); + if (fromImage != null) { +- setValueByPath(toObject, ['instances[0]', 'image'], imageToVertex(apiClient, fromImage)); ++ setValueByPath(toObject, ['instances[0]', 'image'], imageToMldev(apiClient, fromImage)); + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['config'], generateVideosConfigToVertex(apiClient, fromConfig, toObject)); ++ setValueByPath(toObject, ['config'], generateVideosConfigToMldev(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function partFromMldev(apiClient, fromObject) { ++function partToVertex(apiClient, fromObject) { + const toObject = {}; ++ const fromVideoMetadata = getValueByPath(fromObject, [ ++ 'videoMetadata', ++ ]); ++ if (fromVideoMetadata != null) { ++ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); ++ } + const fromThought = getValueByPath(fromObject, ['thought']); + if (fromThought != null) { + setValueByPath(toObject, ['thought'], fromThought); +@@ -5024,13 +5486,13 @@ function partFromMldev(apiClient, fromObject) { + } + return toObject; + } +-function contentFromMldev(apiClient, fromObject) { ++function contentToVertex(apiClient, fromObject) { + const toObject = {}; + const fromParts = getValueByPath(fromObject, ['parts']); + if (fromParts != null) { + if (Array.isArray(fromParts)) { + setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partFromMldev(apiClient, item); ++ return partToVertex(apiClient, item); + })); + } + else { +@@ -5043,1628 +5505,1663 @@ function contentFromMldev(apiClient, fromObject) { + } + return toObject; + } +-function citationMetadataFromMldev(apiClient, fromObject) { ++function schemaToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromCitations = getValueByPath(fromObject, ['citationSources']); +- if (fromCitations != null) { +- setValueByPath(toObject, ['citations'], fromCitations); ++ const fromExample = getValueByPath(fromObject, ['example']); ++ if (fromExample != null) { ++ setValueByPath(toObject, ['example'], fromExample); + } +- return toObject; +-} +-function candidateFromMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromContent = getValueByPath(fromObject, ['content']); +- if (fromContent != null) { +- setValueByPath(toObject, ['content'], contentFromMldev(apiClient, fromContent)); ++ const fromPattern = getValueByPath(fromObject, ['pattern']); ++ if (fromPattern != null) { ++ setValueByPath(toObject, ['pattern'], fromPattern); + } +- const fromCitationMetadata = getValueByPath(fromObject, [ +- 'citationMetadata', +- ]); +- if (fromCitationMetadata != null) { +- setValueByPath(toObject, ['citationMetadata'], citationMetadataFromMldev(apiClient, fromCitationMetadata)); ++ const fromDefault = getValueByPath(fromObject, ['default']); ++ if (fromDefault != null) { ++ setValueByPath(toObject, ['default'], fromDefault); + } +- const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); +- if (fromTokenCount != null) { +- setValueByPath(toObject, ['tokenCount'], fromTokenCount); ++ const fromMaxLength = getValueByPath(fromObject, ['maxLength']); ++ if (fromMaxLength != null) { ++ setValueByPath(toObject, ['maxLength'], fromMaxLength); + } +- const fromFinishReason = getValueByPath(fromObject, ['finishReason']); +- if (fromFinishReason != null) { +- setValueByPath(toObject, ['finishReason'], fromFinishReason); ++ const fromMinLength = getValueByPath(fromObject, ['minLength']); ++ if (fromMinLength != null) { ++ setValueByPath(toObject, ['minLength'], fromMinLength); + } +- const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']); +- if (fromAvgLogprobs != null) { +- setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs); ++ const fromMinProperties = getValueByPath(fromObject, [ ++ 'minProperties', ++ ]); ++ if (fromMinProperties != null) { ++ setValueByPath(toObject, ['minProperties'], fromMinProperties); + } +- const fromGroundingMetadata = getValueByPath(fromObject, [ +- 'groundingMetadata', ++ const fromMaxProperties = getValueByPath(fromObject, [ ++ 'maxProperties', + ]); +- if (fromGroundingMetadata != null) { +- setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata); ++ if (fromMaxProperties != null) { ++ setValueByPath(toObject, ['maxProperties'], fromMaxProperties); + } +- const fromIndex = getValueByPath(fromObject, ['index']); +- if (fromIndex != null) { +- setValueByPath(toObject, ['index'], fromIndex); ++ const fromAnyOf = getValueByPath(fromObject, ['anyOf']); ++ if (fromAnyOf != null) { ++ setValueByPath(toObject, ['anyOf'], fromAnyOf); + } +- const fromLogprobsResult = getValueByPath(fromObject, [ +- 'logprobsResult', ++ const fromDescription = getValueByPath(fromObject, ['description']); ++ if (fromDescription != null) { ++ setValueByPath(toObject, ['description'], fromDescription); ++ } ++ const fromEnum = getValueByPath(fromObject, ['enum']); ++ if (fromEnum != null) { ++ setValueByPath(toObject, ['enum'], fromEnum); ++ } ++ const fromFormat = getValueByPath(fromObject, ['format']); ++ if (fromFormat != null) { ++ setValueByPath(toObject, ['format'], fromFormat); ++ } ++ const fromItems = getValueByPath(fromObject, ['items']); ++ if (fromItems != null) { ++ setValueByPath(toObject, ['items'], fromItems); ++ } ++ const fromMaxItems = getValueByPath(fromObject, ['maxItems']); ++ if (fromMaxItems != null) { ++ setValueByPath(toObject, ['maxItems'], fromMaxItems); ++ } ++ const fromMaximum = getValueByPath(fromObject, ['maximum']); ++ if (fromMaximum != null) { ++ setValueByPath(toObject, ['maximum'], fromMaximum); ++ } ++ const fromMinItems = getValueByPath(fromObject, ['minItems']); ++ if (fromMinItems != null) { ++ setValueByPath(toObject, ['minItems'], fromMinItems); ++ } ++ const fromMinimum = getValueByPath(fromObject, ['minimum']); ++ if (fromMinimum != null) { ++ setValueByPath(toObject, ['minimum'], fromMinimum); ++ } ++ const fromNullable = getValueByPath(fromObject, ['nullable']); ++ if (fromNullable != null) { ++ setValueByPath(toObject, ['nullable'], fromNullable); ++ } ++ const fromProperties = getValueByPath(fromObject, ['properties']); ++ if (fromProperties != null) { ++ setValueByPath(toObject, ['properties'], fromProperties); ++ } ++ const fromPropertyOrdering = getValueByPath(fromObject, [ ++ 'propertyOrdering', + ]); +- if (fromLogprobsResult != null) { +- setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult); ++ if (fromPropertyOrdering != null) { ++ setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering); + } +- const fromSafetyRatings = getValueByPath(fromObject, [ +- 'safetyRatings', ++ const fromRequired = getValueByPath(fromObject, ['required']); ++ if (fromRequired != null) { ++ setValueByPath(toObject, ['required'], fromRequired); ++ } ++ const fromTitle = getValueByPath(fromObject, ['title']); ++ if (fromTitle != null) { ++ setValueByPath(toObject, ['title'], fromTitle); ++ } ++ const fromType = getValueByPath(fromObject, ['type']); ++ if (fromType != null) { ++ setValueByPath(toObject, ['type'], fromType); ++ } ++ return toObject; ++} ++function modelSelectionConfigToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromFeatureSelectionPreference = getValueByPath(fromObject, [ ++ 'featureSelectionPreference', + ]); +- if (fromSafetyRatings != null) { +- setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings); ++ if (fromFeatureSelectionPreference != null) { ++ setValueByPath(toObject, ['featureSelectionPreference'], fromFeatureSelectionPreference); + } + return toObject; + } +-function generateContentResponseFromMldev(apiClient, fromObject) { ++function safetySettingToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromCandidates = getValueByPath(fromObject, ['candidates']); +- if (fromCandidates != null) { +- if (Array.isArray(fromCandidates)) { +- setValueByPath(toObject, ['candidates'], fromCandidates.map((item) => { +- return candidateFromMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['candidates'], fromCandidates); +- } ++ const fromMethod = getValueByPath(fromObject, ['method']); ++ if (fromMethod != null) { ++ setValueByPath(toObject, ['method'], fromMethod); + } +- const fromModelVersion = getValueByPath(fromObject, ['modelVersion']); +- if (fromModelVersion != null) { +- setValueByPath(toObject, ['modelVersion'], fromModelVersion); ++ const fromCategory = getValueByPath(fromObject, ['category']); ++ if (fromCategory != null) { ++ setValueByPath(toObject, ['category'], fromCategory); + } +- const fromPromptFeedback = getValueByPath(fromObject, [ +- 'promptFeedback', +- ]); +- if (fromPromptFeedback != null) { +- setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback); ++ const fromThreshold = getValueByPath(fromObject, ['threshold']); ++ if (fromThreshold != null) { ++ setValueByPath(toObject, ['threshold'], fromThreshold); + } +- const fromUsageMetadata = getValueByPath(fromObject, [ +- 'usageMetadata', +- ]); +- if (fromUsageMetadata != null) { +- setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata); ++ return toObject; ++} ++function functionDeclarationToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromResponse = getValueByPath(fromObject, ['response']); ++ if (fromResponse != null) { ++ setValueByPath(toObject, ['response'], schemaToVertex(apiClient, fromResponse)); ++ } ++ const fromDescription = getValueByPath(fromObject, ['description']); ++ if (fromDescription != null) { ++ setValueByPath(toObject, ['description'], fromDescription); ++ } ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); ++ } ++ const fromParameters = getValueByPath(fromObject, ['parameters']); ++ if (fromParameters != null) { ++ setValueByPath(toObject, ['parameters'], fromParameters); ++ } ++ return toObject; ++} ++function googleSearchToVertex() { ++ const toObject = {}; ++ return toObject; ++} ++function dynamicRetrievalConfigToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromMode = getValueByPath(fromObject, ['mode']); ++ if (fromMode != null) { ++ setValueByPath(toObject, ['mode'], fromMode); ++ } ++ const fromDynamicThreshold = getValueByPath(fromObject, [ ++ 'dynamicThreshold', ++ ]); ++ if (fromDynamicThreshold != null) { ++ setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold); + } + return toObject; + } +-function contentEmbeddingFromMldev(apiClient, fromObject) { ++function googleSearchRetrievalToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromValues = getValueByPath(fromObject, ['values']); +- if (fromValues != null) { +- setValueByPath(toObject, ['values'], fromValues); ++ const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ ++ 'dynamicRetrievalConfig', ++ ]); ++ if (fromDynamicRetrievalConfig != null) { ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig)); + } + return toObject; + } +-function embedContentMetadataFromMldev() { +- const toObject = {}; +- return toObject; +-} +-function embedContentResponseFromMldev(apiClient, fromObject) { ++function toolToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromEmbeddings = getValueByPath(fromObject, ['embeddings']); +- if (fromEmbeddings != null) { +- if (Array.isArray(fromEmbeddings)) { +- setValueByPath(toObject, ['embeddings'], fromEmbeddings.map((item) => { +- return contentEmbeddingFromMldev(apiClient, item); ++ const fromFunctionDeclarations = getValueByPath(fromObject, [ ++ 'functionDeclarations', ++ ]); ++ if (fromFunctionDeclarations != null) { ++ if (Array.isArray(fromFunctionDeclarations)) { ++ setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { ++ return functionDeclarationToVertex(apiClient, item); + })); + } + else { +- setValueByPath(toObject, ['embeddings'], fromEmbeddings); ++ setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations); + } + } +- const fromMetadata = getValueByPath(fromObject, ['metadata']); +- if (fromMetadata != null) { +- setValueByPath(toObject, ['metadata'], embedContentMetadataFromMldev()); ++ const fromRetrieval = getValueByPath(fromObject, ['retrieval']); ++ if (fromRetrieval != null) { ++ setValueByPath(toObject, ['retrieval'], fromRetrieval); + } +- return toObject; +-} +-function imageFromMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromImageBytes = getValueByPath(fromObject, [ +- 'bytesBase64Encoded', ++ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); ++ if (fromGoogleSearch != null) { ++ setValueByPath(toObject, ['googleSearch'], googleSearchToVertex()); ++ } ++ const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ ++ 'googleSearchRetrieval', + ]); +- if (fromImageBytes != null) { +- setValueByPath(toObject, ['imageBytes'], tBytes(apiClient, fromImageBytes)); ++ if (fromGoogleSearchRetrieval != null) { ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval)); + } +- const fromMimeType = getValueByPath(fromObject, ['mimeType']); +- if (fromMimeType != null) { +- setValueByPath(toObject, ['mimeType'], fromMimeType); ++ const fromCodeExecution = getValueByPath(fromObject, [ ++ 'codeExecution', ++ ]); ++ if (fromCodeExecution != null) { ++ setValueByPath(toObject, ['codeExecution'], fromCodeExecution); + } + return toObject; + } +-function safetyAttributesFromMldev(apiClient, fromObject) { ++function functionCallingConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromCategories = getValueByPath(fromObject, [ +- 'safetyAttributes', +- 'categories', +- ]); +- if (fromCategories != null) { +- setValueByPath(toObject, ['categories'], fromCategories); ++ const fromMode = getValueByPath(fromObject, ['mode']); ++ if (fromMode != null) { ++ setValueByPath(toObject, ['mode'], fromMode); + } +- const fromScores = getValueByPath(fromObject, [ +- 'safetyAttributes', +- 'scores', ++ const fromAllowedFunctionNames = getValueByPath(fromObject, [ ++ 'allowedFunctionNames', + ]); +- if (fromScores != null) { +- setValueByPath(toObject, ['scores'], fromScores); +- } +- const fromContentType = getValueByPath(fromObject, ['contentType']); +- if (fromContentType != null) { +- setValueByPath(toObject, ['contentType'], fromContentType); ++ if (fromAllowedFunctionNames != null) { ++ setValueByPath(toObject, ['allowedFunctionNames'], fromAllowedFunctionNames); + } + return toObject; + } +-function generatedImageFromMldev(apiClient, fromObject) { ++function toolConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromImage = getValueByPath(fromObject, ['_self']); +- if (fromImage != null) { +- setValueByPath(toObject, ['image'], imageFromMldev(apiClient, fromImage)); +- } +- const fromRaiFilteredReason = getValueByPath(fromObject, [ +- 'raiFilteredReason', ++ const fromFunctionCallingConfig = getValueByPath(fromObject, [ ++ 'functionCallingConfig', + ]); +- if (fromRaiFilteredReason != null) { +- setValueByPath(toObject, ['raiFilteredReason'], fromRaiFilteredReason); +- } +- const fromSafetyAttributes = getValueByPath(fromObject, ['_self']); +- if (fromSafetyAttributes != null) { +- setValueByPath(toObject, ['safetyAttributes'], safetyAttributesFromMldev(apiClient, fromSafetyAttributes)); ++ if (fromFunctionCallingConfig != null) { ++ setValueByPath(toObject, ['functionCallingConfig'], functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig)); + } + return toObject; + } +-function generateImagesResponseFromMldev(apiClient, fromObject) { ++function prebuiltVoiceConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromGeneratedImages = getValueByPath(fromObject, [ +- 'predictions', +- ]); +- if (fromGeneratedImages != null) { +- if (Array.isArray(fromGeneratedImages)) { +- setValueByPath(toObject, ['generatedImages'], fromGeneratedImages.map((item) => { +- return generatedImageFromMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['generatedImages'], fromGeneratedImages); +- } ++ const fromVoiceName = getValueByPath(fromObject, ['voiceName']); ++ if (fromVoiceName != null) { ++ setValueByPath(toObject, ['voiceName'], fromVoiceName); + } +- const fromPositivePromptSafetyAttributes = getValueByPath(fromObject, [ +- 'positivePromptSafetyAttributes', ++ return toObject; ++} ++function voiceConfigToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [ ++ 'prebuiltVoiceConfig', + ]); +- if (fromPositivePromptSafetyAttributes != null) { +- setValueByPath(toObject, ['positivePromptSafetyAttributes'], safetyAttributesFromMldev(apiClient, fromPositivePromptSafetyAttributes)); ++ if (fromPrebuiltVoiceConfig != null) { ++ setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToVertex(apiClient, fromPrebuiltVoiceConfig)); + } + return toObject; + } +-function tunedModelInfoFromMldev(apiClient, fromObject) { ++function speechConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromBaseModel = getValueByPath(fromObject, ['baseModel']); +- if (fromBaseModel != null) { +- setValueByPath(toObject, ['baseModel'], fromBaseModel); ++ const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']); ++ if (fromVoiceConfig != null) { ++ setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(apiClient, fromVoiceConfig)); + } +- const fromCreateTime = getValueByPath(fromObject, ['createTime']); +- if (fromCreateTime != null) { +- setValueByPath(toObject, ['createTime'], fromCreateTime); ++ const fromLanguageCode = getValueByPath(fromObject, ['languageCode']); ++ if (fromLanguageCode != null) { ++ setValueByPath(toObject, ['languageCode'], fromLanguageCode); + } +- const fromUpdateTime = getValueByPath(fromObject, ['updateTime']); +- if (fromUpdateTime != null) { +- setValueByPath(toObject, ['updateTime'], fromUpdateTime); ++ return toObject; ++} ++function thinkingConfigToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromIncludeThoughts = getValueByPath(fromObject, [ ++ 'includeThoughts', ++ ]); ++ if (fromIncludeThoughts != null) { ++ setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts); ++ } ++ const fromThinkingBudget = getValueByPath(fromObject, [ ++ 'thinkingBudget', ++ ]); ++ if (fromThinkingBudget != null) { ++ setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget); + } + return toObject; + } +-function modelFromMldev(apiClient, fromObject) { ++function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + const toObject = {}; +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName != null) { +- setValueByPath(toObject, ['name'], fromName); ++ const fromSystemInstruction = getValueByPath(fromObject, [ ++ 'systemInstruction', ++ ]); ++ if (parentObject !== undefined && fromSystemInstruction != null) { ++ setValueByPath(parentObject, ['systemInstruction'], contentToVertex(apiClient, tContent(apiClient, fromSystemInstruction))); + } +- const fromDisplayName = getValueByPath(fromObject, ['displayName']); +- if (fromDisplayName != null) { +- setValueByPath(toObject, ['displayName'], fromDisplayName); ++ const fromTemperature = getValueByPath(fromObject, ['temperature']); ++ if (fromTemperature != null) { ++ setValueByPath(toObject, ['temperature'], fromTemperature); + } +- const fromDescription = getValueByPath(fromObject, ['description']); +- if (fromDescription != null) { +- setValueByPath(toObject, ['description'], fromDescription); ++ const fromTopP = getValueByPath(fromObject, ['topP']); ++ if (fromTopP != null) { ++ setValueByPath(toObject, ['topP'], fromTopP); + } +- const fromVersion = getValueByPath(fromObject, ['version']); +- if (fromVersion != null) { +- setValueByPath(toObject, ['version'], fromVersion); ++ const fromTopK = getValueByPath(fromObject, ['topK']); ++ if (fromTopK != null) { ++ setValueByPath(toObject, ['topK'], fromTopK); + } +- const fromTunedModelInfo = getValueByPath(fromObject, ['_self']); +- if (fromTunedModelInfo != null) { +- setValueByPath(toObject, ['tunedModelInfo'], tunedModelInfoFromMldev(apiClient, fromTunedModelInfo)); ++ const fromCandidateCount = getValueByPath(fromObject, [ ++ 'candidateCount', ++ ]); ++ if (fromCandidateCount != null) { ++ setValueByPath(toObject, ['candidateCount'], fromCandidateCount); + } +- const fromInputTokenLimit = getValueByPath(fromObject, [ +- 'inputTokenLimit', ++ const fromMaxOutputTokens = getValueByPath(fromObject, [ ++ 'maxOutputTokens', + ]); +- if (fromInputTokenLimit != null) { +- setValueByPath(toObject, ['inputTokenLimit'], fromInputTokenLimit); ++ if (fromMaxOutputTokens != null) { ++ setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens); + } +- const fromOutputTokenLimit = getValueByPath(fromObject, [ +- 'outputTokenLimit', ++ const fromStopSequences = getValueByPath(fromObject, [ ++ 'stopSequences', + ]); +- if (fromOutputTokenLimit != null) { +- setValueByPath(toObject, ['outputTokenLimit'], fromOutputTokenLimit); ++ if (fromStopSequences != null) { ++ setValueByPath(toObject, ['stopSequences'], fromStopSequences); + } +- const fromSupportedActions = getValueByPath(fromObject, [ +- 'supportedGenerationMethods', ++ const fromResponseLogprobs = getValueByPath(fromObject, [ ++ 'responseLogprobs', + ]); +- if (fromSupportedActions != null) { +- setValueByPath(toObject, ['supportedActions'], fromSupportedActions); ++ if (fromResponseLogprobs != null) { ++ setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs); + } +- return toObject; +-} +-function countTokensResponseFromMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromTotalTokens = getValueByPath(fromObject, ['totalTokens']); +- if (fromTotalTokens != null) { +- setValueByPath(toObject, ['totalTokens'], fromTotalTokens); ++ const fromLogprobs = getValueByPath(fromObject, ['logprobs']); ++ if (fromLogprobs != null) { ++ setValueByPath(toObject, ['logprobs'], fromLogprobs); + } +- const fromCachedContentTokenCount = getValueByPath(fromObject, [ +- 'cachedContentTokenCount', ++ const fromPresencePenalty = getValueByPath(fromObject, [ ++ 'presencePenalty', + ]); +- if (fromCachedContentTokenCount != null) { +- setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); ++ if (fromPresencePenalty != null) { ++ setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty); + } +- return toObject; +-} +-function videoFromMldev$1(apiClient, fromObject) { +- const toObject = {}; +- const fromUri = getValueByPath(fromObject, ['video', 'uri']); +- if (fromUri != null) { +- setValueByPath(toObject, ['uri'], fromUri); ++ const fromFrequencyPenalty = getValueByPath(fromObject, [ ++ 'frequencyPenalty', ++ ]); ++ if (fromFrequencyPenalty != null) { ++ setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty); ++ } ++ const fromSeed = getValueByPath(fromObject, ['seed']); ++ if (fromSeed != null) { ++ setValueByPath(toObject, ['seed'], fromSeed); + } +- const fromVideoBytes = getValueByPath(fromObject, [ +- 'video', +- 'encodedVideo', ++ const fromResponseMimeType = getValueByPath(fromObject, [ ++ 'responseMimeType', + ]); +- if (fromVideoBytes != null) { +- setValueByPath(toObject, ['videoBytes'], tBytes(apiClient, fromVideoBytes)); ++ if (fromResponseMimeType != null) { ++ setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType); + } +- const fromMimeType = getValueByPath(fromObject, ['encoding']); +- if (fromMimeType != null) { +- setValueByPath(toObject, ['mimeType'], fromMimeType); ++ const fromResponseSchema = getValueByPath(fromObject, [ ++ 'responseSchema', ++ ]); ++ if (fromResponseSchema != null) { ++ setValueByPath(toObject, ['responseSchema'], schemaToVertex(apiClient, tSchema(apiClient, fromResponseSchema))); + } +- return toObject; +-} +-function generatedVideoFromMldev$1(apiClient, fromObject) { +- const toObject = {}; +- const fromVideo = getValueByPath(fromObject, ['_self']); +- if (fromVideo != null) { +- setValueByPath(toObject, ['video'], videoFromMldev$1(apiClient, fromVideo)); ++ const fromRoutingConfig = getValueByPath(fromObject, [ ++ 'routingConfig', ++ ]); ++ if (fromRoutingConfig != null) { ++ setValueByPath(toObject, ['routingConfig'], fromRoutingConfig); + } +- return toObject; +-} +-function generateVideosResponseFromMldev$1(apiClient, fromObject) { +- const toObject = {}; +- const fromGeneratedVideos = getValueByPath(fromObject, [ +- 'generatedSamples', ++ const fromModelSelectionConfig = getValueByPath(fromObject, [ ++ 'modelSelectionConfig', + ]); +- if (fromGeneratedVideos != null) { +- if (Array.isArray(fromGeneratedVideos)) { +- setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos.map((item) => { +- return generatedVideoFromMldev$1(apiClient, item); ++ if (fromModelSelectionConfig != null) { ++ setValueByPath(toObject, ['modelConfig'], modelSelectionConfigToVertex(apiClient, fromModelSelectionConfig)); ++ } ++ const fromSafetySettings = getValueByPath(fromObject, [ ++ 'safetySettings', ++ ]); ++ if (parentObject !== undefined && fromSafetySettings != null) { ++ if (Array.isArray(fromSafetySettings)) { ++ setValueByPath(parentObject, ['safetySettings'], fromSafetySettings.map((item) => { ++ return safetySettingToVertex(apiClient, item); + })); + } + else { +- setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos); ++ setValueByPath(parentObject, ['safetySettings'], fromSafetySettings); + } + } +- const fromRaiMediaFilteredCount = getValueByPath(fromObject, [ +- 'raiMediaFilteredCount', +- ]); +- if (fromRaiMediaFilteredCount != null) { +- setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount); ++ const fromTools = getValueByPath(fromObject, ['tools']); ++ if (parentObject !== undefined && fromTools != null) { ++ if (Array.isArray(fromTools)) { ++ setValueByPath(parentObject, ['tools'], tTools(apiClient, tTools(apiClient, fromTools).map((item) => { ++ return toolToVertex(apiClient, tTool(apiClient, item)); ++ }))); ++ } ++ else { ++ setValueByPath(parentObject, ['tools'], tTools(apiClient, fromTools)); ++ } + } +- const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [ +- 'raiMediaFilteredReasons', +- ]); +- if (fromRaiMediaFilteredReasons != null) { +- setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons); ++ const fromToolConfig = getValueByPath(fromObject, ['toolConfig']); ++ if (parentObject !== undefined && fromToolConfig != null) { ++ setValueByPath(parentObject, ['toolConfig'], toolConfigToVertex(apiClient, fromToolConfig)); + } +- return toObject; +-} +-function generateVideosOperationFromMldev$1(apiClient, fromObject) { +- const toObject = {}; +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName != null) { +- setValueByPath(toObject, ['name'], fromName); ++ const fromLabels = getValueByPath(fromObject, ['labels']); ++ if (parentObject !== undefined && fromLabels != null) { ++ setValueByPath(parentObject, ['labels'], fromLabels); + } +- const fromMetadata = getValueByPath(fromObject, ['metadata']); +- if (fromMetadata != null) { +- setValueByPath(toObject, ['metadata'], fromMetadata); ++ const fromCachedContent = getValueByPath(fromObject, [ ++ 'cachedContent', ++ ]); ++ if (parentObject !== undefined && fromCachedContent != null) { ++ setValueByPath(parentObject, ['cachedContent'], tCachedContentName(apiClient, fromCachedContent)); + } +- const fromDone = getValueByPath(fromObject, ['done']); +- if (fromDone != null) { +- setValueByPath(toObject, ['done'], fromDone); ++ const fromResponseModalities = getValueByPath(fromObject, [ ++ 'responseModalities', ++ ]); ++ if (fromResponseModalities != null) { ++ setValueByPath(toObject, ['responseModalities'], fromResponseModalities); + } +- const fromError = getValueByPath(fromObject, ['error']); +- if (fromError != null) { +- setValueByPath(toObject, ['error'], fromError); ++ const fromMediaResolution = getValueByPath(fromObject, [ ++ 'mediaResolution', ++ ]); ++ if (fromMediaResolution != null) { ++ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution); + } +- const fromResponse = getValueByPath(fromObject, [ +- 'response', +- 'generateVideoResponse', ++ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); ++ if (fromSpeechConfig != null) { ++ setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(apiClient, tSpeechConfig(apiClient, fromSpeechConfig))); ++ } ++ const fromAudioTimestamp = getValueByPath(fromObject, [ ++ 'audioTimestamp', + ]); +- if (fromResponse != null) { +- setValueByPath(toObject, ['response'], generateVideosResponseFromMldev$1(apiClient, fromResponse)); ++ if (fromAudioTimestamp != null) { ++ setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp); + } +- const fromResult = getValueByPath(fromObject, [ +- 'response', +- 'generateVideoResponse', ++ const fromThinkingConfig = getValueByPath(fromObject, [ ++ 'thinkingConfig', + ]); +- if (fromResult != null) { +- setValueByPath(toObject, ['result'], generateVideosResponseFromMldev$1(apiClient, fromResult)); ++ if (fromThinkingConfig != null) { ++ setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToVertex(apiClient, fromThinkingConfig)); + } + return toObject; + } +-function partFromVertex(apiClient, fromObject) { ++function generateContentParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromVideoMetadata = getValueByPath(fromObject, [ +- 'videoMetadata', +- ]); +- if (fromVideoMetadata != null) { +- setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); +- } +- const fromThought = getValueByPath(fromObject, ['thought']); +- if (fromThought != null) { +- setValueByPath(toObject, ['thought'], fromThought); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); + } +- const fromCodeExecutionResult = getValueByPath(fromObject, [ +- 'codeExecutionResult', +- ]); +- if (fromCodeExecutionResult != null) { +- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); ++ const fromContents = getValueByPath(fromObject, ['contents']); ++ if (fromContents != null) { ++ if (Array.isArray(fromContents)) { ++ setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { ++ return contentToVertex(apiClient, item); ++ }))); ++ } ++ else { ++ setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); ++ } + } +- const fromExecutableCode = getValueByPath(fromObject, [ +- 'executableCode', +- ]); +- if (fromExecutableCode != null) { +- setValueByPath(toObject, ['executableCode'], fromExecutableCode); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['generationConfig'], generateContentConfigToVertex(apiClient, fromConfig, toObject)); + } +- const fromFileData = getValueByPath(fromObject, ['fileData']); +- if (fromFileData != null) { +- setValueByPath(toObject, ['fileData'], fromFileData); ++ return toObject; ++} ++function embedContentConfigToVertex(apiClient, fromObject, parentObject) { ++ const toObject = {}; ++ const fromTaskType = getValueByPath(fromObject, ['taskType']); ++ if (parentObject !== undefined && fromTaskType != null) { ++ setValueByPath(parentObject, ['instances[]', 'task_type'], fromTaskType); + } +- const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); +- if (fromFunctionCall != null) { +- setValueByPath(toObject, ['functionCall'], fromFunctionCall); ++ const fromTitle = getValueByPath(fromObject, ['title']); ++ if (parentObject !== undefined && fromTitle != null) { ++ setValueByPath(parentObject, ['instances[]', 'title'], fromTitle); + } +- const fromFunctionResponse = getValueByPath(fromObject, [ +- 'functionResponse', ++ const fromOutputDimensionality = getValueByPath(fromObject, [ ++ 'outputDimensionality', + ]); +- if (fromFunctionResponse != null) { +- setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); ++ if (parentObject !== undefined && fromOutputDimensionality != null) { ++ setValueByPath(parentObject, ['parameters', 'outputDimensionality'], fromOutputDimensionality); + } +- const fromInlineData = getValueByPath(fromObject, ['inlineData']); +- if (fromInlineData != null) { +- setValueByPath(toObject, ['inlineData'], fromInlineData); ++ const fromMimeType = getValueByPath(fromObject, ['mimeType']); ++ if (parentObject !== undefined && fromMimeType != null) { ++ setValueByPath(parentObject, ['instances[]', 'mimeType'], fromMimeType); + } +- const fromText = getValueByPath(fromObject, ['text']); +- if (fromText != null) { +- setValueByPath(toObject, ['text'], fromText); ++ const fromAutoTruncate = getValueByPath(fromObject, ['autoTruncate']); ++ if (parentObject !== undefined && fromAutoTruncate != null) { ++ setValueByPath(parentObject, ['parameters', 'autoTruncate'], fromAutoTruncate); + } + return toObject; + } +-function contentFromVertex(apiClient, fromObject) { ++function embedContentParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromParts = getValueByPath(fromObject, ['parts']); +- if (fromParts != null) { +- if (Array.isArray(fromParts)) { +- setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partFromVertex(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['parts'], fromParts); +- } ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); + } +- const fromRole = getValueByPath(fromObject, ['role']); +- if (fromRole != null) { +- setValueByPath(toObject, ['role'], fromRole); ++ const fromContents = getValueByPath(fromObject, ['contents']); ++ if (fromContents != null) { ++ setValueByPath(toObject, ['instances[]', 'content'], tContentsForEmbed(apiClient, fromContents)); + } +- return toObject; +-} +-function citationMetadataFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromCitations = getValueByPath(fromObject, ['citations']); +- if (fromCitations != null) { +- setValueByPath(toObject, ['citations'], fromCitations); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], embedContentConfigToVertex(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function candidateFromVertex(apiClient, fromObject) { ++function generateImagesConfigToVertex(apiClient, fromObject, parentObject) { + const toObject = {}; +- const fromContent = getValueByPath(fromObject, ['content']); +- if (fromContent != null) { +- setValueByPath(toObject, ['content'], contentFromVertex(apiClient, fromContent)); +- } +- const fromCitationMetadata = getValueByPath(fromObject, [ +- 'citationMetadata', +- ]); +- if (fromCitationMetadata != null) { +- setValueByPath(toObject, ['citationMetadata'], citationMetadataFromVertex(apiClient, fromCitationMetadata)); ++ const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']); ++ if (parentObject !== undefined && fromOutputGcsUri != null) { ++ setValueByPath(parentObject, ['parameters', 'storageUri'], fromOutputGcsUri); + } +- const fromFinishMessage = getValueByPath(fromObject, [ +- 'finishMessage', ++ const fromNegativePrompt = getValueByPath(fromObject, [ ++ 'negativePrompt', + ]); +- if (fromFinishMessage != null) { +- setValueByPath(toObject, ['finishMessage'], fromFinishMessage); +- } +- const fromFinishReason = getValueByPath(fromObject, ['finishReason']); +- if (fromFinishReason != null) { +- setValueByPath(toObject, ['finishReason'], fromFinishReason); ++ if (parentObject !== undefined && fromNegativePrompt != null) { ++ setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt); + } +- const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']); +- if (fromAvgLogprobs != null) { +- setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs); ++ const fromNumberOfImages = getValueByPath(fromObject, [ ++ 'numberOfImages', ++ ]); ++ if (parentObject !== undefined && fromNumberOfImages != null) { ++ setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfImages); + } +- const fromGroundingMetadata = getValueByPath(fromObject, [ +- 'groundingMetadata', ++ const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']); ++ if (parentObject !== undefined && fromAspectRatio != null) { ++ setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio); ++ } ++ const fromGuidanceScale = getValueByPath(fromObject, [ ++ 'guidanceScale', + ]); +- if (fromGroundingMetadata != null) { +- setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata); ++ if (parentObject !== undefined && fromGuidanceScale != null) { ++ setValueByPath(parentObject, ['parameters', 'guidanceScale'], fromGuidanceScale); + } +- const fromIndex = getValueByPath(fromObject, ['index']); +- if (fromIndex != null) { +- setValueByPath(toObject, ['index'], fromIndex); ++ const fromSeed = getValueByPath(fromObject, ['seed']); ++ if (parentObject !== undefined && fromSeed != null) { ++ setValueByPath(parentObject, ['parameters', 'seed'], fromSeed); + } +- const fromLogprobsResult = getValueByPath(fromObject, [ +- 'logprobsResult', ++ const fromSafetyFilterLevel = getValueByPath(fromObject, [ ++ 'safetyFilterLevel', + ]); +- if (fromLogprobsResult != null) { +- setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult); ++ if (parentObject !== undefined && fromSafetyFilterLevel != null) { ++ setValueByPath(parentObject, ['parameters', 'safetySetting'], fromSafetyFilterLevel); + } +- const fromSafetyRatings = getValueByPath(fromObject, [ +- 'safetyRatings', ++ const fromPersonGeneration = getValueByPath(fromObject, [ ++ 'personGeneration', + ]); +- if (fromSafetyRatings != null) { +- setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings); ++ if (parentObject !== undefined && fromPersonGeneration != null) { ++ setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration); + } +- return toObject; +-} +-function generateContentResponseFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromCandidates = getValueByPath(fromObject, ['candidates']); +- if (fromCandidates != null) { +- if (Array.isArray(fromCandidates)) { +- setValueByPath(toObject, ['candidates'], fromCandidates.map((item) => { +- return candidateFromVertex(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['candidates'], fromCandidates); +- } ++ const fromIncludeSafetyAttributes = getValueByPath(fromObject, [ ++ 'includeSafetyAttributes', ++ ]); ++ if (parentObject !== undefined && fromIncludeSafetyAttributes != null) { ++ setValueByPath(parentObject, ['parameters', 'includeSafetyAttributes'], fromIncludeSafetyAttributes); + } +- const fromCreateTime = getValueByPath(fromObject, ['createTime']); +- if (fromCreateTime != null) { +- setValueByPath(toObject, ['createTime'], fromCreateTime); ++ const fromIncludeRaiReason = getValueByPath(fromObject, [ ++ 'includeRaiReason', ++ ]); ++ if (parentObject !== undefined && fromIncludeRaiReason != null) { ++ setValueByPath(parentObject, ['parameters', 'includeRaiReason'], fromIncludeRaiReason); + } +- const fromResponseId = getValueByPath(fromObject, ['responseId']); +- if (fromResponseId != null) { +- setValueByPath(toObject, ['responseId'], fromResponseId); ++ const fromLanguage = getValueByPath(fromObject, ['language']); ++ if (parentObject !== undefined && fromLanguage != null) { ++ setValueByPath(parentObject, ['parameters', 'language'], fromLanguage); + } +- const fromModelVersion = getValueByPath(fromObject, ['modelVersion']); +- if (fromModelVersion != null) { +- setValueByPath(toObject, ['modelVersion'], fromModelVersion); ++ const fromOutputMimeType = getValueByPath(fromObject, [ ++ 'outputMimeType', ++ ]); ++ if (parentObject !== undefined && fromOutputMimeType != null) { ++ setValueByPath(parentObject, ['parameters', 'outputOptions', 'mimeType'], fromOutputMimeType); + } +- const fromPromptFeedback = getValueByPath(fromObject, [ +- 'promptFeedback', ++ const fromOutputCompressionQuality = getValueByPath(fromObject, [ ++ 'outputCompressionQuality', + ]); +- if (fromPromptFeedback != null) { +- setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback); ++ if (parentObject !== undefined && fromOutputCompressionQuality != null) { ++ setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality); + } +- const fromUsageMetadata = getValueByPath(fromObject, [ +- 'usageMetadata', ++ const fromAddWatermark = getValueByPath(fromObject, ['addWatermark']); ++ if (parentObject !== undefined && fromAddWatermark != null) { ++ setValueByPath(parentObject, ['parameters', 'addWatermark'], fromAddWatermark); ++ } ++ const fromEnhancePrompt = getValueByPath(fromObject, [ ++ 'enhancePrompt', + ]); +- if (fromUsageMetadata != null) { +- setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata); ++ if (parentObject !== undefined && fromEnhancePrompt != null) { ++ setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt); + } + return toObject; + } +-function contentEmbeddingStatisticsFromVertex(apiClient, fromObject) { ++function generateImagesParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromTruncated = getValueByPath(fromObject, ['truncated']); +- if (fromTruncated != null) { +- setValueByPath(toObject, ['truncated'], fromTruncated); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); + } +- const fromTokenCount = getValueByPath(fromObject, ['token_count']); +- if (fromTokenCount != null) { +- setValueByPath(toObject, ['tokenCount'], fromTokenCount); ++ const fromPrompt = getValueByPath(fromObject, ['prompt']); ++ if (fromPrompt != null) { ++ setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt); ++ } ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], generateImagesConfigToVertex(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function contentEmbeddingFromVertex(apiClient, fromObject) { ++function getModelParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromValues = getValueByPath(fromObject, ['values']); +- if (fromValues != null) { +- setValueByPath(toObject, ['values'], fromValues); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'name'], tModel(apiClient, fromModel)); + } +- const fromStatistics = getValueByPath(fromObject, ['statistics']); +- if (fromStatistics != null) { +- setValueByPath(toObject, ['statistics'], contentEmbeddingStatisticsFromVertex(apiClient, fromStatistics)); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], fromConfig); + } + return toObject; + } +-function embedContentMetadataFromVertex(apiClient, fromObject) { ++function countTokensConfigToVertex(apiClient, fromObject, parentObject) { + const toObject = {}; +- const fromBillableCharacterCount = getValueByPath(fromObject, [ +- 'billableCharacterCount', ++ const fromSystemInstruction = getValueByPath(fromObject, [ ++ 'systemInstruction', + ]); +- if (fromBillableCharacterCount != null) { +- setValueByPath(toObject, ['billableCharacterCount'], fromBillableCharacterCount); ++ if (parentObject !== undefined && fromSystemInstruction != null) { ++ setValueByPath(parentObject, ['systemInstruction'], contentToVertex(apiClient, tContent(apiClient, fromSystemInstruction))); + } +- return toObject; +-} +-function embedContentResponseFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromEmbeddings = getValueByPath(fromObject, [ +- 'predictions[]', +- 'embeddings', +- ]); +- if (fromEmbeddings != null) { +- if (Array.isArray(fromEmbeddings)) { +- setValueByPath(toObject, ['embeddings'], fromEmbeddings.map((item) => { +- return contentEmbeddingFromVertex(apiClient, item); ++ const fromTools = getValueByPath(fromObject, ['tools']); ++ if (parentObject !== undefined && fromTools != null) { ++ if (Array.isArray(fromTools)) { ++ setValueByPath(parentObject, ['tools'], fromTools.map((item) => { ++ return toolToVertex(apiClient, item); + })); + } + else { +- setValueByPath(toObject, ['embeddings'], fromEmbeddings); ++ setValueByPath(parentObject, ['tools'], fromTools); + } + } +- const fromMetadata = getValueByPath(fromObject, ['metadata']); +- if (fromMetadata != null) { +- setValueByPath(toObject, ['metadata'], embedContentMetadataFromVertex(apiClient, fromMetadata)); +- } +- return toObject; +-} +-function imageFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromGcsUri = getValueByPath(fromObject, ['gcsUri']); +- if (fromGcsUri != null) { +- setValueByPath(toObject, ['gcsUri'], fromGcsUri); +- } +- const fromImageBytes = getValueByPath(fromObject, [ +- 'bytesBase64Encoded', +- ]); +- if (fromImageBytes != null) { +- setValueByPath(toObject, ['imageBytes'], tBytes(apiClient, fromImageBytes)); +- } +- const fromMimeType = getValueByPath(fromObject, ['mimeType']); +- if (fromMimeType != null) { +- setValueByPath(toObject, ['mimeType'], fromMimeType); +- } +- return toObject; +-} +-function safetyAttributesFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromCategories = getValueByPath(fromObject, [ +- 'safetyAttributes', +- 'categories', +- ]); +- if (fromCategories != null) { +- setValueByPath(toObject, ['categories'], fromCategories); +- } +- const fromScores = getValueByPath(fromObject, [ +- 'safetyAttributes', +- 'scores', ++ const fromGenerationConfig = getValueByPath(fromObject, [ ++ 'generationConfig', + ]); +- if (fromScores != null) { +- setValueByPath(toObject, ['scores'], fromScores); +- } +- const fromContentType = getValueByPath(fromObject, ['contentType']); +- if (fromContentType != null) { +- setValueByPath(toObject, ['contentType'], fromContentType); ++ if (parentObject !== undefined && fromGenerationConfig != null) { ++ setValueByPath(parentObject, ['generationConfig'], fromGenerationConfig); + } + return toObject; + } +-function generatedImageFromVertex(apiClient, fromObject) { ++function countTokensParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromImage = getValueByPath(fromObject, ['_self']); +- if (fromImage != null) { +- setValueByPath(toObject, ['image'], imageFromVertex(apiClient, fromImage)); +- } +- const fromRaiFilteredReason = getValueByPath(fromObject, [ +- 'raiFilteredReason', +- ]); +- if (fromRaiFilteredReason != null) { +- setValueByPath(toObject, ['raiFilteredReason'], fromRaiFilteredReason); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); + } +- const fromSafetyAttributes = getValueByPath(fromObject, ['_self']); +- if (fromSafetyAttributes != null) { +- setValueByPath(toObject, ['safetyAttributes'], safetyAttributesFromVertex(apiClient, fromSafetyAttributes)); ++ const fromContents = getValueByPath(fromObject, ['contents']); ++ if (fromContents != null) { ++ if (Array.isArray(fromContents)) { ++ setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { ++ return contentToVertex(apiClient, item); ++ }))); ++ } ++ else { ++ setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); ++ } + } +- const fromEnhancedPrompt = getValueByPath(fromObject, ['prompt']); +- if (fromEnhancedPrompt != null) { +- setValueByPath(toObject, ['enhancedPrompt'], fromEnhancedPrompt); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], countTokensConfigToVertex(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function generateImagesResponseFromVertex(apiClient, fromObject) { ++function computeTokensParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromGeneratedImages = getValueByPath(fromObject, [ +- 'predictions', +- ]); +- if (fromGeneratedImages != null) { +- if (Array.isArray(fromGeneratedImages)) { +- setValueByPath(toObject, ['generatedImages'], fromGeneratedImages.map((item) => { +- return generatedImageFromVertex(apiClient, item); +- })); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); ++ } ++ const fromContents = getValueByPath(fromObject, ['contents']); ++ if (fromContents != null) { ++ if (Array.isArray(fromContents)) { ++ setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { ++ return contentToVertex(apiClient, item); ++ }))); + } + else { +- setValueByPath(toObject, ['generatedImages'], fromGeneratedImages); ++ setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); + } + } +- const fromPositivePromptSafetyAttributes = getValueByPath(fromObject, [ +- 'positivePromptSafetyAttributes', +- ]); +- if (fromPositivePromptSafetyAttributes != null) { +- setValueByPath(toObject, ['positivePromptSafetyAttributes'], safetyAttributesFromVertex(apiClient, fromPositivePromptSafetyAttributes)); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], fromConfig); + } + return toObject; + } +-function endpointFromVertex(apiClient, fromObject) { ++function imageToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromName = getValueByPath(fromObject, ['endpoint']); +- if (fromName != null) { +- setValueByPath(toObject, ['name'], fromName); ++ const fromGcsUri = getValueByPath(fromObject, ['gcsUri']); ++ if (fromGcsUri != null) { ++ setValueByPath(toObject, ['gcsUri'], fromGcsUri); + } +- const fromDeployedModelId = getValueByPath(fromObject, [ +- 'deployedModelId', +- ]); +- if (fromDeployedModelId != null) { +- setValueByPath(toObject, ['deployedModelId'], fromDeployedModelId); ++ const fromImageBytes = getValueByPath(fromObject, ['imageBytes']); ++ if (fromImageBytes != null) { ++ setValueByPath(toObject, ['bytesBase64Encoded'], tBytes(apiClient, fromImageBytes)); ++ } ++ const fromMimeType = getValueByPath(fromObject, ['mimeType']); ++ if (fromMimeType != null) { ++ setValueByPath(toObject, ['mimeType'], fromMimeType); + } + return toObject; + } +-function tunedModelInfoFromVertex(apiClient, fromObject) { ++function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { + const toObject = {}; +- const fromBaseModel = getValueByPath(fromObject, [ +- 'labels', +- 'google-vertex-llm-tuning-base-model-id', ++ const fromNumberOfVideos = getValueByPath(fromObject, [ ++ 'numberOfVideos', + ]); +- if (fromBaseModel != null) { +- setValueByPath(toObject, ['baseModel'], fromBaseModel); +- } +- const fromCreateTime = getValueByPath(fromObject, ['createTime']); +- if (fromCreateTime != null) { +- setValueByPath(toObject, ['createTime'], fromCreateTime); ++ if (parentObject !== undefined && fromNumberOfVideos != null) { ++ setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfVideos); + } +- const fromUpdateTime = getValueByPath(fromObject, ['updateTime']); +- if (fromUpdateTime != null) { +- setValueByPath(toObject, ['updateTime'], fromUpdateTime); ++ const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']); ++ if (parentObject !== undefined && fromOutputGcsUri != null) { ++ setValueByPath(parentObject, ['parameters', 'storageUri'], fromOutputGcsUri); + } +- return toObject; +-} +-function modelFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName != null) { +- setValueByPath(toObject, ['name'], fromName); ++ const fromFps = getValueByPath(fromObject, ['fps']); ++ if (parentObject !== undefined && fromFps != null) { ++ setValueByPath(parentObject, ['parameters', 'fps'], fromFps); + } +- const fromDisplayName = getValueByPath(fromObject, ['displayName']); +- if (fromDisplayName != null) { +- setValueByPath(toObject, ['displayName'], fromDisplayName); ++ const fromDurationSeconds = getValueByPath(fromObject, [ ++ 'durationSeconds', ++ ]); ++ if (parentObject !== undefined && fromDurationSeconds != null) { ++ setValueByPath(parentObject, ['parameters', 'durationSeconds'], fromDurationSeconds); + } +- const fromDescription = getValueByPath(fromObject, ['description']); +- if (fromDescription != null) { +- setValueByPath(toObject, ['description'], fromDescription); ++ const fromSeed = getValueByPath(fromObject, ['seed']); ++ if (parentObject !== undefined && fromSeed != null) { ++ setValueByPath(parentObject, ['parameters', 'seed'], fromSeed); + } +- const fromVersion = getValueByPath(fromObject, ['versionId']); +- if (fromVersion != null) { +- setValueByPath(toObject, ['version'], fromVersion); ++ const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']); ++ if (parentObject !== undefined && fromAspectRatio != null) { ++ setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio); + } +- const fromEndpoints = getValueByPath(fromObject, ['deployedModels']); +- if (fromEndpoints != null) { +- if (Array.isArray(fromEndpoints)) { +- setValueByPath(toObject, ['endpoints'], fromEndpoints.map((item) => { +- return endpointFromVertex(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['endpoints'], fromEndpoints); +- } ++ const fromResolution = getValueByPath(fromObject, ['resolution']); ++ if (parentObject !== undefined && fromResolution != null) { ++ setValueByPath(parentObject, ['parameters', 'resolution'], fromResolution); + } +- const fromLabels = getValueByPath(fromObject, ['labels']); +- if (fromLabels != null) { +- setValueByPath(toObject, ['labels'], fromLabels); ++ const fromPersonGeneration = getValueByPath(fromObject, [ ++ 'personGeneration', ++ ]); ++ if (parentObject !== undefined && fromPersonGeneration != null) { ++ setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration); + } +- const fromTunedModelInfo = getValueByPath(fromObject, ['_self']); +- if (fromTunedModelInfo != null) { +- setValueByPath(toObject, ['tunedModelInfo'], tunedModelInfoFromVertex(apiClient, fromTunedModelInfo)); ++ const fromPubsubTopic = getValueByPath(fromObject, ['pubsubTopic']); ++ if (parentObject !== undefined && fromPubsubTopic != null) { ++ setValueByPath(parentObject, ['parameters', 'pubsubTopic'], fromPubsubTopic); + } +- return toObject; +-} +-function countTokensResponseFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromTotalTokens = getValueByPath(fromObject, ['totalTokens']); +- if (fromTotalTokens != null) { +- setValueByPath(toObject, ['totalTokens'], fromTotalTokens); ++ const fromNegativePrompt = getValueByPath(fromObject, [ ++ 'negativePrompt', ++ ]); ++ if (parentObject !== undefined && fromNegativePrompt != null) { ++ setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt); + } +- return toObject; +-} +-function computeTokensResponseFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromTokensInfo = getValueByPath(fromObject, ['tokensInfo']); +- if (fromTokensInfo != null) { +- setValueByPath(toObject, ['tokensInfo'], fromTokensInfo); ++ const fromEnhancePrompt = getValueByPath(fromObject, [ ++ 'enhancePrompt', ++ ]); ++ if (parentObject !== undefined && fromEnhancePrompt != null) { ++ setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt); + } + return toObject; + } +-function videoFromVertex$1(apiClient, fromObject) { ++function generateVideosParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromUri = getValueByPath(fromObject, ['gcsUri']); +- if (fromUri != null) { +- setValueByPath(toObject, ['uri'], fromUri); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); + } +- const fromVideoBytes = getValueByPath(fromObject, [ +- 'bytesBase64Encoded', +- ]); +- if (fromVideoBytes != null) { +- setValueByPath(toObject, ['videoBytes'], tBytes(apiClient, fromVideoBytes)); ++ const fromPrompt = getValueByPath(fromObject, ['prompt']); ++ if (fromPrompt != null) { ++ setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt); + } +- const fromMimeType = getValueByPath(fromObject, ['mimeType']); +- if (fromMimeType != null) { +- setValueByPath(toObject, ['mimeType'], fromMimeType); ++ const fromImage = getValueByPath(fromObject, ['image']); ++ if (fromImage != null) { ++ setValueByPath(toObject, ['instances[0]', 'image'], imageToVertex(apiClient, fromImage)); + } +- return toObject; +-} +-function generatedVideoFromVertex$1(apiClient, fromObject) { +- const toObject = {}; +- const fromVideo = getValueByPath(fromObject, ['_self']); +- if (fromVideo != null) { +- setValueByPath(toObject, ['video'], videoFromVertex$1(apiClient, fromVideo)); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], generateVideosConfigToVertex(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function generateVideosResponseFromVertex$1(apiClient, fromObject) { ++function partFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromGeneratedVideos = getValueByPath(fromObject, ['videos']); +- if (fromGeneratedVideos != null) { +- if (Array.isArray(fromGeneratedVideos)) { +- setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos.map((item) => { +- return generatedVideoFromVertex$1(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos); +- } ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); + } +- const fromRaiMediaFilteredCount = getValueByPath(fromObject, [ +- 'raiMediaFilteredCount', ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', + ]); +- if (fromRaiMediaFilteredCount != null) { +- setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); + } +- const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [ +- 'raiMediaFilteredReasons', ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', + ]); +- if (fromRaiMediaFilteredReasons != null) { +- setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons); +- } +- return toObject; +-} +-function generateVideosOperationFromVertex$1(apiClient, fromObject) { +- const toObject = {}; +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName != null) { +- setValueByPath(toObject, ['name'], fromName); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); + } +- const fromMetadata = getValueByPath(fromObject, ['metadata']); +- if (fromMetadata != null) { +- setValueByPath(toObject, ['metadata'], fromMetadata); ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); + } +- const fromDone = getValueByPath(fromObject, ['done']); +- if (fromDone != null) { +- setValueByPath(toObject, ['done'], fromDone); ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); + } +- const fromError = getValueByPath(fromObject, ['error']); +- if (fromError != null) { +- setValueByPath(toObject, ['error'], fromError); ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', ++ ]); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); + } +- const fromResponse = getValueByPath(fromObject, ['response']); +- if (fromResponse != null) { +- setValueByPath(toObject, ['response'], generateVideosResponseFromVertex$1(apiClient, fromResponse)); ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); + } +- const fromResult = getValueByPath(fromObject, ['response']); +- if (fromResult != null) { +- setValueByPath(toObject, ['result'], generateVideosResponseFromVertex$1(apiClient, fromResult)); ++ const fromText = getValueByPath(fromObject, ['text']); ++ if (fromText != null) { ++ setValueByPath(toObject, ['text'], fromText); + } + return toObject; + } +- +-/** +- * @license +- * Copyright 2025 Google LLC +- * SPDX-License-Identifier: Apache-2.0 +- */ +-/** +- * Converters for live client. +- */ +-function liveConnectParametersToMldev(apiClient, fromObject) { ++function contentFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig !== undefined && fromConfig !== null) { +- setValueByPath(toObject, ['setup'], liveConnectConfigToMldev(apiClient, fromConfig)); ++ const fromParts = getValueByPath(fromObject, ['parts']); ++ if (fromParts != null) { ++ if (Array.isArray(fromParts)) { ++ setValueByPath(toObject, ['parts'], fromParts.map((item) => { ++ return partFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['parts'], fromParts); ++ } + } +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel !== undefined) { +- setValueByPath(toObject, ['setup', 'model'], fromModel); ++ const fromRole = getValueByPath(fromObject, ['role']); ++ if (fromRole != null) { ++ setValueByPath(toObject, ['role'], fromRole); + } + return toObject; + } +-function liveConnectParametersToVertex(apiClient, fromObject) { ++function citationMetadataFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig !== undefined && fromConfig !== null) { +- setValueByPath(toObject, ['setup'], liveConnectConfigToVertex(apiClient, fromConfig)); +- } +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel !== undefined) { +- setValueByPath(toObject, ['setup', 'model'], fromModel); ++ const fromCitations = getValueByPath(fromObject, ['citationSources']); ++ if (fromCitations != null) { ++ setValueByPath(toObject, ['citations'], fromCitations); + } + return toObject; + } +-function liveServerMessageFromMldev(apiClient, fromObject) { ++function candidateFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromSetupComplete = getValueByPath(fromObject, [ +- 'setupComplete', +- ]); +- if (fromSetupComplete !== undefined) { +- setValueByPath(toObject, ['setupComplete'], fromSetupComplete); ++ const fromContent = getValueByPath(fromObject, ['content']); ++ if (fromContent != null) { ++ setValueByPath(toObject, ['content'], contentFromMldev(apiClient, fromContent)); + } +- const fromServerContent = getValueByPath(fromObject, [ +- 'serverContent', ++ const fromCitationMetadata = getValueByPath(fromObject, [ ++ 'citationMetadata', + ]); +- if (fromServerContent !== undefined && fromServerContent !== null) { +- setValueByPath(toObject, ['serverContent'], liveServerContentFromMldev(apiClient, fromServerContent)); ++ if (fromCitationMetadata != null) { ++ setValueByPath(toObject, ['citationMetadata'], citationMetadataFromMldev(apiClient, fromCitationMetadata)); + } +- const fromToolCall = getValueByPath(fromObject, ['toolCall']); +- if (fromToolCall !== undefined && fromToolCall !== null) { +- setValueByPath(toObject, ['toolCall'], liveServerToolCallFromMldev(apiClient, fromToolCall)); ++ const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); ++ if (fromTokenCount != null) { ++ setValueByPath(toObject, ['tokenCount'], fromTokenCount); + } +- const fromToolCallCancellation = getValueByPath(fromObject, [ +- 'toolCallCancellation', +- ]); +- if (fromToolCallCancellation !== undefined && +- fromToolCallCancellation !== null) { +- setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromMldev(apiClient, fromToolCallCancellation)); ++ const fromFinishReason = getValueByPath(fromObject, ['finishReason']); ++ if (fromFinishReason != null) { ++ setValueByPath(toObject, ['finishReason'], fromFinishReason); + } +- const fromUsageMetadata = getValueByPath(fromObject, [ +- 'usageMetadata', ++ const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']); ++ if (fromAvgLogprobs != null) { ++ setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs); ++ } ++ const fromGroundingMetadata = getValueByPath(fromObject, [ ++ 'groundingMetadata', + ]); +- if (fromUsageMetadata != undefined && fromUsageMetadata != null) { +- setValueByPath(toObject, ['usageMetadata'], usageMetadataFromMldev(apiClient, fromUsageMetadata)); ++ if (fromGroundingMetadata != null) { ++ setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata); + } +- const fromGoAway = getValueByPath(fromObject, ['goAway']); +- if (fromGoAway !== undefined && fromGoAway !== null) { +- setValueByPath(toObject, ['goAway'], liveServerGoAwayFromMldev(fromGoAway)); ++ const fromIndex = getValueByPath(fromObject, ['index']); ++ if (fromIndex != null) { ++ setValueByPath(toObject, ['index'], fromIndex); + } +- const fromSessionResumptionUpdate = getValueByPath(fromObject, [ +- 'sessionResumptionUpdate', ++ const fromLogprobsResult = getValueByPath(fromObject, [ ++ 'logprobsResult', ++ ]); ++ if (fromLogprobsResult != null) { ++ setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult); ++ } ++ const fromSafetyRatings = getValueByPath(fromObject, [ ++ 'safetyRatings', + ]); +- if (fromSessionResumptionUpdate !== undefined && +- fromSessionResumptionUpdate !== null) { +- setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromMldev(fromSessionResumptionUpdate)); ++ if (fromSafetyRatings != null) { ++ setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings); + } + return toObject; + } +-function liveServerMessageFromVertex(apiClient, fromObject) { ++function generateContentResponseFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromSetupComplete = getValueByPath(fromObject, [ +- 'setupComplete', +- ]); +- if (fromSetupComplete !== undefined) { +- setValueByPath(toObject, ['setupComplete'], fromSetupComplete); +- } +- const fromServerContent = getValueByPath(fromObject, [ +- 'serverContent', +- ]); +- if (fromServerContent !== undefined && fromServerContent !== null) { +- setValueByPath(toObject, ['serverContent'], liveServerContentFromVertex(apiClient, fromServerContent)); +- } +- const fromToolCall = getValueByPath(fromObject, ['toolCall']); +- if (fromToolCall !== undefined && fromToolCall !== null) { +- setValueByPath(toObject, ['toolCall'], liveServerToolCallFromVertex(apiClient, fromToolCall)); +- } +- const fromToolCallCancellation = getValueByPath(fromObject, [ +- 'toolCallCancellation', +- ]); +- if (fromToolCallCancellation !== undefined && +- fromToolCallCancellation !== null) { +- setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromVertex(apiClient, fromToolCallCancellation)); ++ const fromCandidates = getValueByPath(fromObject, ['candidates']); ++ if (fromCandidates != null) { ++ if (Array.isArray(fromCandidates)) { ++ setValueByPath(toObject, ['candidates'], fromCandidates.map((item) => { ++ return candidateFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['candidates'], fromCandidates); ++ } + } +- const fromGoAway = getValueByPath(fromObject, ['goAway']); +- if (fromGoAway !== undefined && fromGoAway !== null) { +- setValueByPath(toObject, ['goAway'], liveServerGoAwayFromVertex(fromGoAway)); ++ const fromModelVersion = getValueByPath(fromObject, ['modelVersion']); ++ if (fromModelVersion != null) { ++ setValueByPath(toObject, ['modelVersion'], fromModelVersion); + } +- const fromSessionResumptionUpdate = getValueByPath(fromObject, [ +- 'sessionResumptionUpdate', ++ const fromPromptFeedback = getValueByPath(fromObject, [ ++ 'promptFeedback', + ]); +- if (fromSessionResumptionUpdate !== undefined && +- fromSessionResumptionUpdate !== null) { +- setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromVertex(fromSessionResumptionUpdate)); ++ if (fromPromptFeedback != null) { ++ setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback); + } + const fromUsageMetadata = getValueByPath(fromObject, [ + 'usageMetadata', + ]); +- if (fromUsageMetadata != undefined && fromUsageMetadata != null) { +- setValueByPath(toObject, ['usageMetadata'], usageMetadataFromVertex(apiClient, fromUsageMetadata)); ++ if (fromUsageMetadata != null) { ++ setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata); + } + return toObject; + } +-function slidingWindowToMldev(fromObject) { ++function contentEmbeddingFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']); +- if (fromTargetTokens !== undefined && fromTargetTokens !== null) { +- setValueByPath(toObject, ['targetTokens'], fromTargetTokens); ++ const fromValues = getValueByPath(fromObject, ['values']); ++ if (fromValues != null) { ++ setValueByPath(toObject, ['values'], fromValues); + } + return toObject; + } +-function slidingWindowToVertex(fromObject) { ++function embedContentMetadataFromMldev() { + const toObject = {}; +- const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']); +- if (fromTargetTokens !== undefined && fromTargetTokens !== null) { +- setValueByPath(toObject, ['targetTokens'], fromTargetTokens); ++ return toObject; ++} ++function embedContentResponseFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromEmbeddings = getValueByPath(fromObject, ['embeddings']); ++ if (fromEmbeddings != null) { ++ if (Array.isArray(fromEmbeddings)) { ++ setValueByPath(toObject, ['embeddings'], fromEmbeddings.map((item) => { ++ return contentEmbeddingFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['embeddings'], fromEmbeddings); ++ } ++ } ++ const fromMetadata = getValueByPath(fromObject, ['metadata']); ++ if (fromMetadata != null) { ++ setValueByPath(toObject, ['metadata'], embedContentMetadataFromMldev()); + } + return toObject; + } +-function contextWindowCompressionToMldev(fromObject) { ++function imageFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromTriggerTokens = getValueByPath(fromObject, [ +- 'triggerTokens', ++ const fromImageBytes = getValueByPath(fromObject, [ ++ 'bytesBase64Encoded', + ]); +- if (fromTriggerTokens !== undefined && fromTriggerTokens !== null) { +- setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens); ++ if (fromImageBytes != null) { ++ setValueByPath(toObject, ['imageBytes'], tBytes(apiClient, fromImageBytes)); + } +- const fromSlidingWindow = getValueByPath(fromObject, [ +- 'slidingWindow', +- ]); +- if (fromSlidingWindow !== undefined && fromSlidingWindow !== null) { +- setValueByPath(toObject, ['slidingWindow'], slidingWindowToMldev(fromSlidingWindow)); ++ const fromMimeType = getValueByPath(fromObject, ['mimeType']); ++ if (fromMimeType != null) { ++ setValueByPath(toObject, ['mimeType'], fromMimeType); + } + return toObject; + } +-function contextWindowCompressionToVertex(fromObject) { ++function safetyAttributesFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromTriggerTokens = getValueByPath(fromObject, [ +- 'triggerTokens', ++ const fromCategories = getValueByPath(fromObject, [ ++ 'safetyAttributes', ++ 'categories', + ]); +- if (fromTriggerTokens !== undefined && fromTriggerTokens !== null) { +- setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens); ++ if (fromCategories != null) { ++ setValueByPath(toObject, ['categories'], fromCategories); + } +- const fromSlidingWindow = getValueByPath(fromObject, [ +- 'slidingWindow', ++ const fromScores = getValueByPath(fromObject, [ ++ 'safetyAttributes', ++ 'scores', + ]); +- if (fromSlidingWindow !== undefined && fromSlidingWindow !== null) { +- setValueByPath(toObject, ['slidingWindow'], slidingWindowToVertex(fromSlidingWindow)); ++ if (fromScores != null) { ++ setValueByPath(toObject, ['scores'], fromScores); ++ } ++ const fromContentType = getValueByPath(fromObject, ['contentType']); ++ if (fromContentType != null) { ++ setValueByPath(toObject, ['contentType'], fromContentType); + } + return toObject; + } +-function automaticActivityDetectionToMldev(fromObject) { ++function generatedImageFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromDisabled = getValueByPath(fromObject, ['disabled']); +- if (fromDisabled !== undefined && fromDisabled !== null) { +- setValueByPath(toObject, ['disabled'], fromDisabled); ++ const fromImage = getValueByPath(fromObject, ['_self']); ++ if (fromImage != null) { ++ setValueByPath(toObject, ['image'], imageFromMldev(apiClient, fromImage)); + } +- const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [ +- 'startOfSpeechSensitivity', ++ const fromRaiFilteredReason = getValueByPath(fromObject, [ ++ 'raiFilteredReason', + ]); +- if (fromStartOfSpeechSensitivity !== undefined && +- fromStartOfSpeechSensitivity !== null) { +- setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity); ++ if (fromRaiFilteredReason != null) { ++ setValueByPath(toObject, ['raiFilteredReason'], fromRaiFilteredReason); + } +- const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [ +- 'endOfSpeechSensitivity', +- ]); +- if (fromEndOfSpeechSensitivity !== undefined && +- fromEndOfSpeechSensitivity !== null) { +- setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity); ++ const fromSafetyAttributes = getValueByPath(fromObject, ['_self']); ++ if (fromSafetyAttributes != null) { ++ setValueByPath(toObject, ['safetyAttributes'], safetyAttributesFromMldev(apiClient, fromSafetyAttributes)); + } +- const fromPrefixPaddingMs = getValueByPath(fromObject, [ +- 'prefixPaddingMs', ++ return toObject; ++} ++function generateImagesResponseFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromGeneratedImages = getValueByPath(fromObject, [ ++ 'predictions', + ]); +- if (fromPrefixPaddingMs !== undefined && fromPrefixPaddingMs !== null) { +- setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs); ++ if (fromGeneratedImages != null) { ++ if (Array.isArray(fromGeneratedImages)) { ++ setValueByPath(toObject, ['generatedImages'], fromGeneratedImages.map((item) => { ++ return generatedImageFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['generatedImages'], fromGeneratedImages); ++ } + } +- const fromSilenceDurationMs = getValueByPath(fromObject, [ +- 'silenceDurationMs', ++ const fromPositivePromptSafetyAttributes = getValueByPath(fromObject, [ ++ 'positivePromptSafetyAttributes', + ]); +- if (fromSilenceDurationMs !== undefined && fromSilenceDurationMs !== null) { +- setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs); ++ if (fromPositivePromptSafetyAttributes != null) { ++ setValueByPath(toObject, ['positivePromptSafetyAttributes'], safetyAttributesFromMldev(apiClient, fromPositivePromptSafetyAttributes)); + } + return toObject; + } +-function automaticActivityDetectionToVertex(fromObject) { ++function tunedModelInfoFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromDisabled = getValueByPath(fromObject, ['disabled']); +- if (fromDisabled !== undefined && fromDisabled !== null) { +- setValueByPath(toObject, ['disabled'], fromDisabled); ++ const fromBaseModel = getValueByPath(fromObject, ['baseModel']); ++ if (fromBaseModel != null) { ++ setValueByPath(toObject, ['baseModel'], fromBaseModel); + } +- const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [ +- 'startOfSpeechSensitivity', +- ]); +- if (fromStartOfSpeechSensitivity !== undefined && +- fromStartOfSpeechSensitivity !== null) { +- setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity); ++ const fromCreateTime = getValueByPath(fromObject, ['createTime']); ++ if (fromCreateTime != null) { ++ setValueByPath(toObject, ['createTime'], fromCreateTime); ++ } ++ const fromUpdateTime = getValueByPath(fromObject, ['updateTime']); ++ if (fromUpdateTime != null) { ++ setValueByPath(toObject, ['updateTime'], fromUpdateTime); ++ } ++ return toObject; ++} ++function modelFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); ++ } ++ const fromDisplayName = getValueByPath(fromObject, ['displayName']); ++ if (fromDisplayName != null) { ++ setValueByPath(toObject, ['displayName'], fromDisplayName); ++ } ++ const fromDescription = getValueByPath(fromObject, ['description']); ++ if (fromDescription != null) { ++ setValueByPath(toObject, ['description'], fromDescription); ++ } ++ const fromVersion = getValueByPath(fromObject, ['version']); ++ if (fromVersion != null) { ++ setValueByPath(toObject, ['version'], fromVersion); ++ } ++ const fromTunedModelInfo = getValueByPath(fromObject, ['_self']); ++ if (fromTunedModelInfo != null) { ++ setValueByPath(toObject, ['tunedModelInfo'], tunedModelInfoFromMldev(apiClient, fromTunedModelInfo)); + } +- const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [ +- 'endOfSpeechSensitivity', ++ const fromInputTokenLimit = getValueByPath(fromObject, [ ++ 'inputTokenLimit', + ]); +- if (fromEndOfSpeechSensitivity !== undefined && +- fromEndOfSpeechSensitivity !== null) { +- setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity); ++ if (fromInputTokenLimit != null) { ++ setValueByPath(toObject, ['inputTokenLimit'], fromInputTokenLimit); + } +- const fromPrefixPaddingMs = getValueByPath(fromObject, [ +- 'prefixPaddingMs', ++ const fromOutputTokenLimit = getValueByPath(fromObject, [ ++ 'outputTokenLimit', + ]); +- if (fromPrefixPaddingMs !== undefined && fromPrefixPaddingMs !== null) { +- setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs); ++ if (fromOutputTokenLimit != null) { ++ setValueByPath(toObject, ['outputTokenLimit'], fromOutputTokenLimit); + } +- const fromSilenceDurationMs = getValueByPath(fromObject, [ +- 'silenceDurationMs', ++ const fromSupportedActions = getValueByPath(fromObject, [ ++ 'supportedGenerationMethods', + ]); +- if (fromSilenceDurationMs !== undefined && fromSilenceDurationMs !== null) { +- setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs); ++ if (fromSupportedActions != null) { ++ setValueByPath(toObject, ['supportedActions'], fromSupportedActions); + } + return toObject; + } +-function realtimeInputConfigToMldev(fromObject) { ++function countTokensResponseFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromAutomaticActivityDetection = getValueByPath(fromObject, [ +- 'automaticActivityDetection', +- ]); +- if (fromAutomaticActivityDetection !== undefined && +- fromAutomaticActivityDetection !== null) { +- setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToMldev(fromAutomaticActivityDetection)); ++ const fromTotalTokens = getValueByPath(fromObject, ['totalTokens']); ++ if (fromTotalTokens != null) { ++ setValueByPath(toObject, ['totalTokens'], fromTotalTokens); + } +- const fromActivityHandling = getValueByPath(fromObject, [ +- 'activityHandling', ++ const fromCachedContentTokenCount = getValueByPath(fromObject, [ ++ 'cachedContentTokenCount', + ]); +- if (fromActivityHandling !== undefined && fromActivityHandling !== null) { +- setValueByPath(toObject, ['activityHandling'], fromActivityHandling); +- } +- const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']); +- if (fromTurnCoverage !== undefined && fromTurnCoverage !== null) { +- setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage); ++ if (fromCachedContentTokenCount != null) { ++ setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); + } + return toObject; + } +-function realtimeInputConfigToVertex(fromObject) { ++function videoFromMldev$1(apiClient, fromObject) { + const toObject = {}; +- const fromAutomaticActivityDetection = getValueByPath(fromObject, [ +- 'automaticActivityDetection', +- ]); +- if (fromAutomaticActivityDetection !== undefined && +- fromAutomaticActivityDetection !== null) { +- setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToVertex(fromAutomaticActivityDetection)); ++ const fromUri = getValueByPath(fromObject, ['video', 'uri']); ++ if (fromUri != null) { ++ setValueByPath(toObject, ['uri'], fromUri); + } +- const fromActivityHandling = getValueByPath(fromObject, [ +- 'activityHandling', ++ const fromVideoBytes = getValueByPath(fromObject, [ ++ 'video', ++ 'encodedVideo', + ]); +- if (fromActivityHandling !== undefined && fromActivityHandling !== null) { +- setValueByPath(toObject, ['activityHandling'], fromActivityHandling); ++ if (fromVideoBytes != null) { ++ setValueByPath(toObject, ['videoBytes'], tBytes(apiClient, fromVideoBytes)); + } +- const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']); +- if (fromTurnCoverage !== undefined && fromTurnCoverage !== null) { +- setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage); ++ const fromMimeType = getValueByPath(fromObject, ['encoding']); ++ if (fromMimeType != null) { ++ setValueByPath(toObject, ['mimeType'], fromMimeType); + } + return toObject; + } +-function liveConnectConfigToMldev(apiClient, fromObject) { ++function generatedVideoFromMldev$1(apiClient, fromObject) { + const toObject = {}; +- const fromGenerationConfig = getValueByPath(fromObject, [ +- 'generationConfig', +- ]); +- if (fromGenerationConfig !== undefined) { +- setValueByPath(toObject, ['generationConfig'], fromGenerationConfig); ++ const fromVideo = getValueByPath(fromObject, ['_self']); ++ if (fromVideo != null) { ++ setValueByPath(toObject, ['video'], videoFromMldev$1(apiClient, fromVideo)); + } +- const fromResponseModalities = getValueByPath(fromObject, [ +- 'responseModalities', ++ return toObject; ++} ++function generateVideosResponseFromMldev$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromGeneratedVideos = getValueByPath(fromObject, [ ++ 'generatedSamples', + ]); +- if (fromResponseModalities !== undefined) { +- setValueByPath(toObject, ['generationConfig', 'responseModalities'], fromResponseModalities); ++ if (fromGeneratedVideos != null) { ++ if (Array.isArray(fromGeneratedVideos)) { ++ setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos.map((item) => { ++ return generatedVideoFromMldev$1(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos); ++ } + } +- const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); +- if (fromSpeechConfig !== undefined) { +- setValueByPath(toObject, ['generationConfig', 'speechConfig'], fromSpeechConfig); ++ const fromRaiMediaFilteredCount = getValueByPath(fromObject, [ ++ 'raiMediaFilteredCount', ++ ]); ++ if (fromRaiMediaFilteredCount != null) { ++ setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount); + } +- const fromSystemInstruction = getValueByPath(fromObject, [ +- 'systemInstruction', ++ const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [ ++ 'raiMediaFilteredReasons', + ]); +- if (fromSystemInstruction !== undefined && fromSystemInstruction !== null) { +- setValueByPath(toObject, ['systemInstruction'], contentToMldev(apiClient, fromSystemInstruction)); ++ if (fromRaiMediaFilteredReasons != null) { ++ setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons); + } +- const fromTools = getValueByPath(fromObject, ['tools']); +- if (fromTools !== undefined && +- fromTools !== null && +- Array.isArray(fromTools)) { +- setValueByPath(toObject, ['tools'], fromTools.map((item) => { +- return toolToMldev(apiClient, item); +- })); ++ return toObject; ++} ++function generateVideosOperationFromMldev$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); + } +- const fromSessionResumption = getValueByPath(fromObject, [ +- 'sessionResumption', +- ]); +- if (fromSessionResumption !== undefined && fromSessionResumption !== null) { +- setValueByPath(toObject, ['sessionResumption'], liveClientSessionResumptionConfigToMldev(fromSessionResumption)); ++ const fromMetadata = getValueByPath(fromObject, ['metadata']); ++ if (fromMetadata != null) { ++ setValueByPath(toObject, ['metadata'], fromMetadata); + } +- const fromContextWindowCompression = getValueByPath(fromObject, [ +- 'contextWindowCompression', +- ]); +- if (fromContextWindowCompression !== undefined && +- fromContextWindowCompression !== null) { +- setValueByPath(toObject, ['contextWindowCompression'], contextWindowCompressionToMldev(fromContextWindowCompression)); ++ const fromDone = getValueByPath(fromObject, ['done']); ++ if (fromDone != null) { ++ setValueByPath(toObject, ['done'], fromDone); + } +- const fromRealtimeInputConfig = getValueByPath(fromObject, [ +- 'realtimeInputConfig', ++ const fromError = getValueByPath(fromObject, ['error']); ++ if (fromError != null) { ++ setValueByPath(toObject, ['error'], fromError); ++ } ++ const fromResponse = getValueByPath(fromObject, [ ++ 'response', ++ 'generateVideoResponse', + ]); +- if (fromRealtimeInputConfig !== undefined && +- fromRealtimeInputConfig !== null) { +- setValueByPath(toObject, ['realtimeInputConfig'], realtimeInputConfigToMldev(fromRealtimeInputConfig)); ++ if (fromResponse != null) { ++ setValueByPath(toObject, ['response'], generateVideosResponseFromMldev$1(apiClient, fromResponse)); + } + return toObject; + } +-function liveConnectConfigToVertex(apiClient, fromObject) { ++function partFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromGenerationConfig = getValueByPath(fromObject, [ +- 'generationConfig', +- ]); +- if (fromGenerationConfig !== undefined) { +- setValueByPath(toObject, ['generationConfig'], fromGenerationConfig); +- } +- const fromResponseModalities = getValueByPath(fromObject, [ +- 'responseModalities', ++ const fromVideoMetadata = getValueByPath(fromObject, [ ++ 'videoMetadata', + ]); +- if (fromResponseModalities !== undefined) { +- setValueByPath(toObject, ['generationConfig', 'responseModalities'], fromResponseModalities); ++ if (fromVideoMetadata != null) { ++ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); + } +- else { +- // Set default to AUDIO to align with MLDev API. +- setValueByPath(toObject, ['generationConfig', 'responseModalities'], ['AUDIO']); ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); + } +- const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); +- if (fromSpeechConfig !== undefined) { +- setValueByPath(toObject, ['generationConfig', 'speechConfig'], fromSpeechConfig); ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', ++ ]); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); + } +- const fromSystemInstruction = getValueByPath(fromObject, [ +- 'systemInstruction', ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', + ]); +- if (fromSystemInstruction !== undefined && fromSystemInstruction !== null) { +- setValueByPath(toObject, ['systemInstruction'], contentToVertex(apiClient, fromSystemInstruction)); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); + } +- const fromTools = getValueByPath(fromObject, ['tools']); +- if (fromTools !== undefined && +- fromTools !== null && +- Array.isArray(fromTools)) { +- setValueByPath(toObject, ['tools'], fromTools.map((item) => { +- return toolToVertex(apiClient, item); +- })); ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); + } +- const fromSessionResumption = getValueByPath(fromObject, [ +- 'sessionResumption', +- ]); +- if (fromSessionResumption !== undefined && fromSessionResumption !== null) { +- setValueByPath(toObject, ['sessionResumption'], liveClientSessionResumptionConfigToVertex(fromSessionResumption)); ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); + } +- const fromContextWindowCompression = getValueByPath(fromObject, [ +- 'contextWindowCompression', ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', + ]); +- if (fromContextWindowCompression !== undefined && +- fromContextWindowCompression !== null) { +- setValueByPath(toObject, ['contextWindowCompression'], contextWindowCompressionToVertex(fromContextWindowCompression)); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); + } +- const fromRealtimeInputConfig = getValueByPath(fromObject, [ +- 'realtimeInputConfig', +- ]); +- if (fromRealtimeInputConfig !== undefined && +- fromRealtimeInputConfig !== null) { +- setValueByPath(toObject, ['realtimeInputConfig'], realtimeInputConfigToVertex(fromRealtimeInputConfig)); ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); ++ } ++ const fromText = getValueByPath(fromObject, ['text']); ++ if (fromText != null) { ++ setValueByPath(toObject, ['text'], fromText); + } + return toObject; + } +-function liveServerContentFromMldev(apiClient, fromObject) { ++function contentFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromModelTurn = getValueByPath(fromObject, ['modelTurn']); +- if (fromModelTurn !== undefined && fromModelTurn !== null) { +- setValueByPath(toObject, ['modelTurn'], contentFromMldev(apiClient, fromModelTurn)); +- } +- const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']); +- if (fromTurnComplete !== undefined) { +- setValueByPath(toObject, ['turnComplete'], fromTurnComplete); ++ const fromParts = getValueByPath(fromObject, ['parts']); ++ if (fromParts != null) { ++ if (Array.isArray(fromParts)) { ++ setValueByPath(toObject, ['parts'], fromParts.map((item) => { ++ return partFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['parts'], fromParts); ++ } + } +- const fromInterrupted = getValueByPath(fromObject, ['interrupted']); +- if (fromInterrupted !== undefined) { +- setValueByPath(toObject, ['interrupted'], fromInterrupted); ++ const fromRole = getValueByPath(fromObject, ['role']); ++ if (fromRole != null) { ++ setValueByPath(toObject, ['role'], fromRole); + } +- const fromGenerationComplete = getValueByPath(fromObject, [ +- 'generationComplete', +- ]); +- if (fromGenerationComplete != null) { +- setValueByPath(toObject, ['generationComplete'], fromGenerationComplete); ++ return toObject; ++} ++function citationMetadataFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromCitations = getValueByPath(fromObject, ['citations']); ++ if (fromCitations != null) { ++ setValueByPath(toObject, ['citations'], fromCitations); + } + return toObject; + } +-function liveServerContentFromVertex(apiClient, fromObject) { ++function candidateFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromModelTurn = getValueByPath(fromObject, ['modelTurn']); +- if (fromModelTurn !== undefined && fromModelTurn !== null) { +- setValueByPath(toObject, ['modelTurn'], contentFromVertex(apiClient, fromModelTurn)); ++ const fromContent = getValueByPath(fromObject, ['content']); ++ if (fromContent != null) { ++ setValueByPath(toObject, ['content'], contentFromVertex(apiClient, fromContent)); + } +- const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']); +- if (fromTurnComplete !== undefined) { +- setValueByPath(toObject, ['turnComplete'], fromTurnComplete); ++ const fromCitationMetadata = getValueByPath(fromObject, [ ++ 'citationMetadata', ++ ]); ++ if (fromCitationMetadata != null) { ++ setValueByPath(toObject, ['citationMetadata'], citationMetadataFromVertex(apiClient, fromCitationMetadata)); + } +- const fromInterrupted = getValueByPath(fromObject, ['interrupted']); +- if (fromInterrupted !== undefined) { +- setValueByPath(toObject, ['interrupted'], fromInterrupted); ++ const fromFinishMessage = getValueByPath(fromObject, [ ++ 'finishMessage', ++ ]); ++ if (fromFinishMessage != null) { ++ setValueByPath(toObject, ['finishMessage'], fromFinishMessage); ++ } ++ const fromFinishReason = getValueByPath(fromObject, ['finishReason']); ++ if (fromFinishReason != null) { ++ setValueByPath(toObject, ['finishReason'], fromFinishReason); ++ } ++ const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']); ++ if (fromAvgLogprobs != null) { ++ setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs); ++ } ++ const fromGroundingMetadata = getValueByPath(fromObject, [ ++ 'groundingMetadata', ++ ]); ++ if (fromGroundingMetadata != null) { ++ setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata); ++ } ++ const fromIndex = getValueByPath(fromObject, ['index']); ++ if (fromIndex != null) { ++ setValueByPath(toObject, ['index'], fromIndex); ++ } ++ const fromLogprobsResult = getValueByPath(fromObject, [ ++ 'logprobsResult', ++ ]); ++ if (fromLogprobsResult != null) { ++ setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult); + } +- const fromGenerationComplete = getValueByPath(fromObject, [ +- 'generationComplete', ++ const fromSafetyRatings = getValueByPath(fromObject, [ ++ 'safetyRatings', + ]); +- if (fromGenerationComplete != null) { +- setValueByPath(toObject, ['generationComplete'], fromGenerationComplete); ++ if (fromSafetyRatings != null) { ++ setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings); + } + return toObject; + } +-function functionCallFromMldev(apiClient, fromObject) { ++function generateContentResponseFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromId = getValueByPath(fromObject, ['id']); +- if (fromId !== undefined) { +- setValueByPath(toObject, ['id'], fromId); +- } +- const fromArgs = getValueByPath(fromObject, ['args']); +- if (fromArgs !== undefined) { +- setValueByPath(toObject, ['args'], fromArgs); ++ const fromCandidates = getValueByPath(fromObject, ['candidates']); ++ if (fromCandidates != null) { ++ if (Array.isArray(fromCandidates)) { ++ setValueByPath(toObject, ['candidates'], fromCandidates.map((item) => { ++ return candidateFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['candidates'], fromCandidates); ++ } + } +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName !== undefined) { +- setValueByPath(toObject, ['name'], fromName); ++ const fromCreateTime = getValueByPath(fromObject, ['createTime']); ++ if (fromCreateTime != null) { ++ setValueByPath(toObject, ['createTime'], fromCreateTime); + } +- return toObject; +-} +-function functionCallFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromArgs = getValueByPath(fromObject, ['args']); +- if (fromArgs !== undefined) { +- setValueByPath(toObject, ['args'], fromArgs); ++ const fromResponseId = getValueByPath(fromObject, ['responseId']); ++ if (fromResponseId != null) { ++ setValueByPath(toObject, ['responseId'], fromResponseId); + } +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName !== undefined) { +- setValueByPath(toObject, ['name'], fromName); ++ const fromModelVersion = getValueByPath(fromObject, ['modelVersion']); ++ if (fromModelVersion != null) { ++ setValueByPath(toObject, ['modelVersion'], fromModelVersion); + } +- return toObject; +-} +-function liveServerToolCallFromMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromFunctionCalls = getValueByPath(fromObject, [ +- 'functionCalls', ++ const fromPromptFeedback = getValueByPath(fromObject, [ ++ 'promptFeedback', + ]); +- if (fromFunctionCalls !== undefined && +- fromFunctionCalls !== null && +- Array.isArray(fromFunctionCalls)) { +- setValueByPath(toObject, ['functionCalls'], fromFunctionCalls.map((item) => { +- return functionCallFromMldev(apiClient, item); +- })); ++ if (fromPromptFeedback != null) { ++ setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback); + } +- return toObject; +-} +-function liveServerToolCallFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromFunctionCalls = getValueByPath(fromObject, [ +- 'functionCalls', ++ const fromUsageMetadata = getValueByPath(fromObject, [ ++ 'usageMetadata', + ]); +- if (fromFunctionCalls !== undefined && +- fromFunctionCalls !== null && +- Array.isArray(fromFunctionCalls)) { +- setValueByPath(toObject, ['functionCalls'], fromFunctionCalls.map((item) => { +- return functionCallFromVertex(apiClient, item); +- })); ++ if (fromUsageMetadata != null) { ++ setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata); + } + return toObject; + } +-function liveServerToolCallCancellationFromMldev(apiClient, fromObject) { ++function contentEmbeddingStatisticsFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromIds = getValueByPath(fromObject, ['ids']); +- if (fromIds !== undefined) { +- setValueByPath(toObject, ['ids'], fromIds); ++ const fromTruncated = getValueByPath(fromObject, ['truncated']); ++ if (fromTruncated != null) { ++ setValueByPath(toObject, ['truncated'], fromTruncated); + } +- return toObject; +-} +-function liveServerToolCallCancellationFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromIds = getValueByPath(fromObject, ['ids']); +- if (fromIds !== undefined) { +- setValueByPath(toObject, ['ids'], fromIds); ++ const fromTokenCount = getValueByPath(fromObject, ['token_count']); ++ if (fromTokenCount != null) { ++ setValueByPath(toObject, ['tokenCount'], fromTokenCount); + } + return toObject; + } +-function liveServerGoAwayFromMldev(fromObject) { ++function contentEmbeddingFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']); +- if (fromTimeLeft !== undefined) { +- setValueByPath(toObject, ['timeLeft'], fromTimeLeft); ++ const fromValues = getValueByPath(fromObject, ['values']); ++ if (fromValues != null) { ++ setValueByPath(toObject, ['values'], fromValues); + } +- return toObject; +-} +-function liveServerGoAwayFromVertex(fromObject) { +- const toObject = {}; +- const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']); +- if (fromTimeLeft !== undefined) { +- setValueByPath(toObject, ['timeLeft'], fromTimeLeft); ++ const fromStatistics = getValueByPath(fromObject, ['statistics']); ++ if (fromStatistics != null) { ++ setValueByPath(toObject, ['statistics'], contentEmbeddingStatisticsFromVertex(apiClient, fromStatistics)); + } + return toObject; + } +-function liveServerSessionResumptionUpdateFromMldev(fromObject) { ++function embedContentMetadataFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromNewHandle = getValueByPath(fromObject, ['newHandle']); +- if (fromNewHandle !== undefined) { +- setValueByPath(toObject, ['newHandle'], fromNewHandle); +- } +- const fromResumable = getValueByPath(fromObject, ['resumable']); +- if (fromResumable !== undefined) { +- setValueByPath(toObject, ['resumable'], fromResumable); +- } +- const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [ +- 'lastConsumedClientMessageIndex', ++ const fromBillableCharacterCount = getValueByPath(fromObject, [ ++ 'billableCharacterCount', + ]); +- if (fromLastConsumedClientMessageIndex !== undefined) { +- setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex); ++ if (fromBillableCharacterCount != null) { ++ setValueByPath(toObject, ['billableCharacterCount'], fromBillableCharacterCount); + } + return toObject; + } +-function liveServerSessionResumptionUpdateFromVertex(fromObject) { ++function embedContentResponseFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromNewHandle = getValueByPath(fromObject, ['newHandle']); +- if (fromNewHandle !== undefined) { +- setValueByPath(toObject, ['newHandle'], fromNewHandle); +- } +- const fromResumable = getValueByPath(fromObject, ['resumable']); +- if (fromResumable !== undefined) { +- setValueByPath(toObject, ['resumable'], fromResumable); +- } +- const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [ +- 'lastConsumedClientMessageIndex', ++ const fromEmbeddings = getValueByPath(fromObject, [ ++ 'predictions[]', ++ 'embeddings', + ]); +- if (fromLastConsumedClientMessageIndex !== undefined) { +- setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex); +- } +- return toObject; +-} +-function liveClientSessionResumptionConfigToMldev(fromObject) { +- const toObject = {}; +- const fromHandle = getValueByPath(fromObject, ['handle']); +- if (fromHandle !== undefined) { +- setValueByPath(toObject, ['handle'], fromHandle); ++ if (fromEmbeddings != null) { ++ if (Array.isArray(fromEmbeddings)) { ++ setValueByPath(toObject, ['embeddings'], fromEmbeddings.map((item) => { ++ return contentEmbeddingFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['embeddings'], fromEmbeddings); ++ } + } +- if (getValueByPath(fromObject, ['transparent']) !== undefined) { +- throw new Error('transparent parameter is not supported in Gemini API.'); ++ const fromMetadata = getValueByPath(fromObject, ['metadata']); ++ if (fromMetadata != null) { ++ setValueByPath(toObject, ['metadata'], embedContentMetadataFromVertex(apiClient, fromMetadata)); + } + return toObject; + } +-function liveClientSessionResumptionConfigToVertex(fromObject) { ++function imageFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromHandle = getValueByPath(fromObject, ['handle']); +- if (fromHandle !== undefined) { +- setValueByPath(toObject, ['handle'], fromHandle); +- } +- const fromTransparent = getValueByPath(fromObject, ['transparent']); +- if (fromTransparent !== undefined) { +- setValueByPath(toObject, ['transparent'], fromTransparent); ++ const fromGcsUri = getValueByPath(fromObject, ['gcsUri']); ++ if (fromGcsUri != null) { ++ setValueByPath(toObject, ['gcsUri'], fromGcsUri); + } +- return toObject; +-} +-function modalityTokenCountFromMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromModality = getValueByPath(fromObject, ['modality']); +- if (fromModality != null) { +- setValueByPath(toObject, ['modality'], fromModality); ++ const fromImageBytes = getValueByPath(fromObject, [ ++ 'bytesBase64Encoded', ++ ]); ++ if (fromImageBytes != null) { ++ setValueByPath(toObject, ['imageBytes'], tBytes(apiClient, fromImageBytes)); + } +- const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); +- if (fromTokenCount != null) { +- setValueByPath(toObject, ['tokenCount'], fromTokenCount); ++ const fromMimeType = getValueByPath(fromObject, ['mimeType']); ++ if (fromMimeType != null) { ++ setValueByPath(toObject, ['mimeType'], fromMimeType); + } + return toObject; + } +-function usageMetadataFromMldev(apiClient, fromObject) { ++function safetyAttributesFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromPromptTokenCount = getValueByPath(fromObject, [ +- 'promptTokenCount', +- ]); +- if (fromPromptTokenCount != null) { +- setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount); +- } +- const fromCachedContentTokenCount = getValueByPath(fromObject, [ +- 'cachedContentTokenCount', ++ const fromCategories = getValueByPath(fromObject, [ ++ 'safetyAttributes', ++ 'categories', + ]); +- if (fromCachedContentTokenCount != null) { +- setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); ++ if (fromCategories != null) { ++ setValueByPath(toObject, ['categories'], fromCategories); + } +- const fromResponseTokenCount = getValueByPath(fromObject, [ +- 'responseTokenCount', ++ const fromScores = getValueByPath(fromObject, [ ++ 'safetyAttributes', ++ 'scores', + ]); +- if (fromResponseTokenCount != null) { +- setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount); ++ if (fromScores != null) { ++ setValueByPath(toObject, ['scores'], fromScores); + } +- const fromToolUsePromptTokenCount = getValueByPath(fromObject, [ +- 'toolUsePromptTokenCount', +- ]); +- if (fromToolUsePromptTokenCount != null) { +- setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount); ++ const fromContentType = getValueByPath(fromObject, ['contentType']); ++ if (fromContentType != null) { ++ setValueByPath(toObject, ['contentType'], fromContentType); + } +- const fromThoughtsTokenCount = getValueByPath(fromObject, [ +- 'thoughtsTokenCount', +- ]); +- if (fromThoughtsTokenCount != null) { +- setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount); ++ return toObject; ++} ++function generatedImageFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromImage = getValueByPath(fromObject, ['_self']); ++ if (fromImage != null) { ++ setValueByPath(toObject, ['image'], imageFromVertex(apiClient, fromImage)); + } +- const fromTotalTokenCount = getValueByPath(fromObject, [ +- 'totalTokenCount', ++ const fromRaiFilteredReason = getValueByPath(fromObject, [ ++ 'raiFilteredReason', + ]); +- if (fromTotalTokenCount != null) { +- setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount); ++ if (fromRaiFilteredReason != null) { ++ setValueByPath(toObject, ['raiFilteredReason'], fromRaiFilteredReason); + } +- const fromPromptTokensDetails = getValueByPath(fromObject, [ +- 'promptTokensDetails', +- ]); +- if (fromPromptTokensDetails != null) { +- if (Array.isArray(fromPromptTokensDetails)) { +- setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails.map((item) => { +- return modalityTokenCountFromMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails); +- } ++ const fromSafetyAttributes = getValueByPath(fromObject, ['_self']); ++ if (fromSafetyAttributes != null) { ++ setValueByPath(toObject, ['safetyAttributes'], safetyAttributesFromVertex(apiClient, fromSafetyAttributes)); + } +- const fromCacheTokensDetails = getValueByPath(fromObject, [ +- 'cacheTokensDetails', +- ]); +- if (fromCacheTokensDetails != null) { +- if (Array.isArray(fromCacheTokensDetails)) { +- setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails.map((item) => { +- return modalityTokenCountFromMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails); +- } ++ const fromEnhancedPrompt = getValueByPath(fromObject, ['prompt']); ++ if (fromEnhancedPrompt != null) { ++ setValueByPath(toObject, ['enhancedPrompt'], fromEnhancedPrompt); + } +- const fromResponseTokensDetails = getValueByPath(fromObject, [ +- 'responseTokensDetails', ++ return toObject; ++} ++function generateImagesResponseFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromGeneratedImages = getValueByPath(fromObject, [ ++ 'predictions', + ]); +- if (fromResponseTokensDetails != null) { +- if (Array.isArray(fromResponseTokensDetails)) { +- setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails.map((item) => { +- return modalityTokenCountFromMldev(apiClient, item); ++ if (fromGeneratedImages != null) { ++ if (Array.isArray(fromGeneratedImages)) { ++ setValueByPath(toObject, ['generatedImages'], fromGeneratedImages.map((item) => { ++ return generatedImageFromVertex(apiClient, item); + })); + } + else { +- setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails); ++ setValueByPath(toObject, ['generatedImages'], fromGeneratedImages); + } + } +- const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [ +- 'toolUsePromptTokensDetails', ++ const fromPositivePromptSafetyAttributes = getValueByPath(fromObject, [ ++ 'positivePromptSafetyAttributes', + ]); +- if (fromToolUsePromptTokensDetails != null) { +- if (Array.isArray(fromToolUsePromptTokensDetails)) { +- setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails.map((item) => { +- return modalityTokenCountFromMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails); +- } ++ if (fromPositivePromptSafetyAttributes != null) { ++ setValueByPath(toObject, ['positivePromptSafetyAttributes'], safetyAttributesFromVertex(apiClient, fromPositivePromptSafetyAttributes)); + } + return toObject; + } +-function modalityTokenCountFromVertex(apiClient, fromObject) { ++function endpointFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromModality = getValueByPath(fromObject, ['modality']); +- if (fromModality != null) { +- setValueByPath(toObject, ['modality'], fromModality); ++ const fromName = getValueByPath(fromObject, ['endpoint']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); + } +- const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); +- if (fromTokenCount != null) { +- setValueByPath(toObject, ['tokenCount'], fromTokenCount); ++ const fromDeployedModelId = getValueByPath(fromObject, [ ++ 'deployedModelId', ++ ]); ++ if (fromDeployedModelId != null) { ++ setValueByPath(toObject, ['deployedModelId'], fromDeployedModelId); + } + return toObject; + } +-function usageMetadataFromVertex(apiClient, fromObject) { ++function tunedModelInfoFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromPromptTokenCount = getValueByPath(fromObject, [ +- 'promptTokenCount', ++ const fromBaseModel = getValueByPath(fromObject, [ ++ 'labels', ++ 'google-vertex-llm-tuning-base-model-id', + ]); +- if (fromPromptTokenCount != null) { +- setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount); ++ if (fromBaseModel != null) { ++ setValueByPath(toObject, ['baseModel'], fromBaseModel); + } +- const fromCachedContentTokenCount = getValueByPath(fromObject, [ +- 'cachedContentTokenCount', +- ]); +- if (fromCachedContentTokenCount != null) { +- setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); ++ const fromCreateTime = getValueByPath(fromObject, ['createTime']); ++ if (fromCreateTime != null) { ++ setValueByPath(toObject, ['createTime'], fromCreateTime); + } +- const fromResponseTokenCount = getValueByPath(fromObject, [ +- 'candidatesTokenCount', +- ]); +- if (fromResponseTokenCount != null) { +- setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount); ++ const fromUpdateTime = getValueByPath(fromObject, ['updateTime']); ++ if (fromUpdateTime != null) { ++ setValueByPath(toObject, ['updateTime'], fromUpdateTime); + } +- const fromToolUsePromptTokenCount = getValueByPath(fromObject, [ +- 'toolUsePromptTokenCount', +- ]); +- if (fromToolUsePromptTokenCount != null) { +- setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount); ++ return toObject; ++} ++function modelFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); + } +- const fromThoughtsTokenCount = getValueByPath(fromObject, [ +- 'thoughtsTokenCount', +- ]); +- if (fromThoughtsTokenCount != null) { +- setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount); ++ const fromDisplayName = getValueByPath(fromObject, ['displayName']); ++ if (fromDisplayName != null) { ++ setValueByPath(toObject, ['displayName'], fromDisplayName); + } +- const fromTotalTokenCount = getValueByPath(fromObject, [ +- 'totalTokenCount', +- ]); +- if (fromTotalTokenCount != null) { +- setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount); ++ const fromDescription = getValueByPath(fromObject, ['description']); ++ if (fromDescription != null) { ++ setValueByPath(toObject, ['description'], fromDescription); + } +- const fromPromptTokensDetails = getValueByPath(fromObject, [ +- 'promptTokensDetails', +- ]); +- if (fromPromptTokensDetails != null) { +- if (Array.isArray(fromPromptTokensDetails)) { +- setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails.map((item) => { +- return modalityTokenCountFromVertex(apiClient, item); ++ const fromVersion = getValueByPath(fromObject, ['versionId']); ++ if (fromVersion != null) { ++ setValueByPath(toObject, ['version'], fromVersion); ++ } ++ const fromEndpoints = getValueByPath(fromObject, ['deployedModels']); ++ if (fromEndpoints != null) { ++ if (Array.isArray(fromEndpoints)) { ++ setValueByPath(toObject, ['endpoints'], fromEndpoints.map((item) => { ++ return endpointFromVertex(apiClient, item); + })); + } + else { +- setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails); ++ setValueByPath(toObject, ['endpoints'], fromEndpoints); + } + } +- const fromCacheTokensDetails = getValueByPath(fromObject, [ +- 'cacheTokensDetails', ++ const fromLabels = getValueByPath(fromObject, ['labels']); ++ if (fromLabels != null) { ++ setValueByPath(toObject, ['labels'], fromLabels); ++ } ++ const fromTunedModelInfo = getValueByPath(fromObject, ['_self']); ++ if (fromTunedModelInfo != null) { ++ setValueByPath(toObject, ['tunedModelInfo'], tunedModelInfoFromVertex(apiClient, fromTunedModelInfo)); ++ } ++ return toObject; ++} ++function countTokensResponseFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTotalTokens = getValueByPath(fromObject, ['totalTokens']); ++ if (fromTotalTokens != null) { ++ setValueByPath(toObject, ['totalTokens'], fromTotalTokens); ++ } ++ return toObject; ++} ++function computeTokensResponseFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTokensInfo = getValueByPath(fromObject, ['tokensInfo']); ++ if (fromTokensInfo != null) { ++ setValueByPath(toObject, ['tokensInfo'], fromTokensInfo); ++ } ++ return toObject; ++} ++function videoFromVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromUri = getValueByPath(fromObject, ['gcsUri']); ++ if (fromUri != null) { ++ setValueByPath(toObject, ['uri'], fromUri); ++ } ++ const fromVideoBytes = getValueByPath(fromObject, [ ++ 'bytesBase64Encoded', + ]); +- if (fromCacheTokensDetails != null) { +- if (Array.isArray(fromCacheTokensDetails)) { +- setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails.map((item) => { +- return modalityTokenCountFromVertex(apiClient, item); ++ if (fromVideoBytes != null) { ++ setValueByPath(toObject, ['videoBytes'], tBytes(apiClient, fromVideoBytes)); ++ } ++ const fromMimeType = getValueByPath(fromObject, ['mimeType']); ++ if (fromMimeType != null) { ++ setValueByPath(toObject, ['mimeType'], fromMimeType); ++ } ++ return toObject; ++} ++function generatedVideoFromVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromVideo = getValueByPath(fromObject, ['_self']); ++ if (fromVideo != null) { ++ setValueByPath(toObject, ['video'], videoFromVertex$1(apiClient, fromVideo)); ++ } ++ return toObject; ++} ++function generateVideosResponseFromVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromGeneratedVideos = getValueByPath(fromObject, ['videos']); ++ if (fromGeneratedVideos != null) { ++ if (Array.isArray(fromGeneratedVideos)) { ++ setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos.map((item) => { ++ return generatedVideoFromVertex$1(apiClient, item); + })); + } + else { +- setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails); ++ setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos); + } + } +- const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [ +- 'toolUsePromptTokensDetails', ++ const fromRaiMediaFilteredCount = getValueByPath(fromObject, [ ++ 'raiMediaFilteredCount', + ]); +- if (fromToolUsePromptTokensDetails != null) { +- if (Array.isArray(fromToolUsePromptTokensDetails)) { +- setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails.map((item) => { +- return modalityTokenCountFromVertex(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails); +- } ++ if (fromRaiMediaFilteredCount != null) { ++ setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount); + } +- const fromResponseTokensDetails = getValueByPath(fromObject, [ +- 'candidatesTokensDetails', ++ const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [ ++ 'raiMediaFilteredReasons', + ]); +- if (fromResponseTokensDetails != null) { +- if (Array.isArray(fromResponseTokensDetails)) { +- setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails.map((item) => { +- return modalityTokenCountFromVertex(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails); +- } ++ if (fromRaiMediaFilteredReasons != null) { ++ setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons); + } +- const fromTrafficType = getValueByPath(fromObject, ['trafficType']); +- if (fromTrafficType != null) { +- setValueByPath(toObject, ['trafficType'], fromTrafficType); ++ return toObject; ++} ++function generateVideosOperationFromVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); ++ } ++ const fromMetadata = getValueByPath(fromObject, ['metadata']); ++ if (fromMetadata != null) { ++ setValueByPath(toObject, ['metadata'], fromMetadata); ++ } ++ const fromDone = getValueByPath(fromObject, ['done']); ++ if (fromDone != null) { ++ setValueByPath(toObject, ['done'], fromDone); ++ } ++ const fromError = getValueByPath(fromObject, ['error']); ++ if (fromError != null) { ++ setValueByPath(toObject, ['error'], fromError); ++ } ++ const fromResponse = getValueByPath(fromObject, ['response']); ++ if (fromResponse != null) { ++ setValueByPath(toObject, ['response'], generateVideosResponseFromVertex$1(apiClient, fromResponse)); + } + return toObject; + } +@@ -6724,17 +7221,20 @@ class Live { + @experimental + + @remarks +- If using the Gemini API, Live is currently only supported behind API +- version `v1alpha`. Ensure that the API version is set to `v1alpha` when +- initializing the SDK if relying on the Gemini API. + + @param params - The parameters for establishing a connection to the model. + @return A live session. + + @example + ```ts ++ let model: string; ++ if (GOOGLE_GENAI_USE_VERTEXAI) { ++ model = 'gemini-2.0-flash-live-preview-04-09'; ++ } else { ++ model = 'gemini-2.0-flash-live-001'; ++ } + const session = await ai.live.connect({ +- model: 'gemini-2.0-flash-exp', ++ model: model, + config: { + responseModalities: [Modality.AUDIO], + }, +@@ -6756,7 +7256,7 @@ class Live { + ``` + */ + async connect(params) { +- var _a, _b; ++ var _a, _b, _c; + const websocketBaseUrl = this.apiClient.getWebsocketBaseUrl(); + const apiVersion = this.apiClient.getApiVersion(); + let url; +@@ -6803,6 +7303,16 @@ class Live { + `projects/${project}/locations/${location}/` + transformedModel; + } + let clientMessage = {}; ++ if (this.apiClient.isVertexAI() && ++ ((_c = params.config) === null || _c === void 0 ? void 0 : _c.responseModalities) === undefined) { ++ // Set default to AUDIO to align with MLDev API. ++ if (params.config === undefined) { ++ params.config = { responseModalities: [exports.Modality.AUDIO] }; ++ } ++ else { ++ params.config.responseModalities = [exports.Modality.AUDIO]; ++ } ++ } + const liveConnectParameters = { + model: transformedModel, + config: params.config, +@@ -6814,6 +7324,7 @@ class Live { + else { + clientMessage = liveConnectParametersToMldev(this.apiClient, liveConnectParameters); + } ++ delete clientMessage['config']; + conn.send(JSON.stringify(clientMessage)); + return new Session(conn, this.apiClient); + } +@@ -7010,8 +7521,14 @@ class Session { + + @example + ```ts ++ let model: string; ++ if (GOOGLE_GENAI_USE_VERTEXAI) { ++ model = 'gemini-2.0-flash-live-preview-04-09'; ++ } else { ++ model = 'gemini-2.0-flash-live-001'; ++ } + const session = await ai.live.connect({ +- model: 'gemini-2.0-flash-exp', ++ model: model, + config: { + responseModalities: [Modality.AUDIO], + } +@@ -7277,7 +7794,7 @@ class Models extends BaseModule { + _c = apiResponse_1_1.value; + _d = false; + const chunk = _c; +- const resp = generateContentResponseFromVertex(apiClient, chunk); ++ const resp = generateContentResponseFromVertex(apiClient, (yield __await(chunk.json()))); + const typedResp = new GenerateContentResponse(); + Object.assign(typedResp, resp); + yield yield __await(typedResp); +@@ -7316,7 +7833,7 @@ class Models extends BaseModule { + _c = apiResponse_2_1.value; + _d = false; + const chunk = _c; +- const resp = generateContentResponseFromMldev(apiClient, chunk); ++ const resp = generateContentResponseFromMldev(apiClient, (yield __await(chunk.json()))); + const typedResp = new GenerateContentResponse(); + Object.assign(typedResp, resp); + yield yield __await(typedResp); +@@ -7878,13 +8395,6 @@ function generateVideosOperationFromMldev(apiClient, fromObject) { + if (fromResponse != null) { + setValueByPath(toObject, ['response'], generateVideosResponseFromMldev(apiClient, fromResponse)); + } +- const fromResult = getValueByPath(fromObject, [ +- 'response', +- 'generateVideoResponse', +- ]); +- if (fromResult != null) { +- setValueByPath(toObject, ['result'], generateVideosResponseFromMldev(apiClient, fromResult)); +- } + return toObject; + } + function videoFromVertex(apiClient, fromObject) { +@@ -7962,10 +8472,6 @@ function generateVideosOperationFromVertex(apiClient, fromObject) { + if (fromResponse != null) { + setValueByPath(toObject, ['response'], generateVideosResponseFromVertex(apiClient, fromResponse)); + } +- const fromResult = getValueByPath(fromObject, ['response']); +- if (fromResult != null) { +- setValueByPath(toObject, ['result'], generateVideosResponseFromVertex(apiClient, fromResult)); +- } + return toObject; + } + +@@ -7993,7 +8499,7 @@ class Operations extends BaseModule { + } + if (this.apiClient.isVertexAI()) { + const resourceName = operation.name.split('/operations/')[0]; +- var httpOptions = undefined; ++ let httpOptions = undefined; + if (config && 'httpOptions' in config) { + httpOptions = config.httpOptions; + } +@@ -8336,10 +8842,18 @@ class ApiClient { + return this.streamApiCall(url, requestInit, request.httpMethod); + } + async includeExtraHttpOptionsToRequestInit(requestInit, httpOptions) { +- if (httpOptions && httpOptions.timeout && httpOptions.timeout > 0) { ++ var _a; ++ if (httpOptions && (httpOptions.signal || httpOptions.timeout && (httpOptions === null || httpOptions === void 0 ? void 0 : httpOptions.timeout) >= 0)) { + const abortController = new AbortController(); + const signal = abortController.signal; +- setTimeout(() => abortController.abort(), httpOptions.timeout); ++ if (httpOptions.timeout && httpOptions.timeout >= 0) { ++ setTimeout(() => abortController.abort(), httpOptions.timeout); ++ } ++ if (httpOptions.signal) { ++ (_a = httpOptions.signal) === null || _a === void 0 ? void 0 : _a.addEventListener('abort', () => { ++ abortController.abort(); ++ }); ++ } + requestInit.signal = signal; + } + requestInit.headers = await this.getHeadersInternal(httpOptions); +@@ -8399,8 +8913,12 @@ class ApiClient { + while (match) { + const processedChunkString = match[1]; + try { +- const chunkData = JSON.parse(processedChunkString); +- yield yield __await(chunkData); ++ const partialResponse = new Response(processedChunkString, { ++ headers: response === null || response === void 0 ? void 0 : response.headers, ++ status: response === null || response === void 0 ? void 0 : response.status, ++ statusText: response === null || response === void 0 ? void 0 : response.statusText, ++ }); ++ yield yield __await(new HttpResponse(partialResponse)); + buffer = buffer.slice(match[0].length); + match = buffer.match(responseLineRE); + } +diff --git a/dist/node/index.js.map b/dist/node/index.js.map +index df213aa99ac999738282ce2b2b3c6008c3d3dd0d..d39cd3f4037985bf2aa5dd3f7043e7844c3ee18e 100644 +--- a/dist/node/index.js.map ++++ b/dist/node/index.js.map +@@ -1 +1 @@ +-{"version":3,"file":"index.js","sources":["../../src/_common.ts","../../src/_transformers.ts","../../src/converters/_caches_converters.ts","../../src/pagers.ts","../../src/types.ts","../../src/caches.ts","../../src/chats.ts","../../src/converters/_files_converters.ts","../../src/files.ts","../../src/converters/_models_converters.ts","../../src/converters/_live_converters.ts","../../src/live.ts","../../src/models.ts","../../src/converters/_operations_converters.ts","../../src/operations.ts","../../src/_api_client.ts","../../src/node/_node_auth.ts","../../src/node/_node_websocket.ts","../../src/cross/_cross_uploader.ts","../../src/node/_node_uploader.ts","../../src/node/node_client.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport class BaseModule {}\n\nexport function formatMap(\n templateString: string,\n valueMap: Record,\n): string {\n // Use a regular expression to find all placeholders in the template string\n const regex = /\\{([^}]+)\\}/g;\n\n // Replace each placeholder with its corresponding value from the valueMap\n return templateString.replace(regex, (match, key) => {\n if (Object.prototype.hasOwnProperty.call(valueMap, key)) {\n const value = valueMap[key];\n // Convert the value to a string if it's not a string already\n return value !== undefined && value !== null ? String(value) : '';\n } else {\n // Handle missing keys\n throw new Error(`Key '${key}' not found in valueMap.`);\n }\n });\n}\n\nexport function setValueByPath(\n data: Record,\n keys: string[],\n value: unknown,\n): void {\n for (let i = 0; i < keys.length - 1; i++) {\n const key = keys[i];\n\n if (key.endsWith('[]')) {\n const keyName = key.slice(0, -2);\n if (!(keyName in data)) {\n if (Array.isArray(value)) {\n data[keyName] = Array.from({length: value.length}, () => ({}));\n } else {\n throw new Error(`Value must be a list given an array path ${key}`);\n }\n }\n\n if (Array.isArray(data[keyName])) {\n const arrayData = data[keyName] as Array;\n\n if (Array.isArray(value)) {\n for (let j = 0; j < arrayData.length; j++) {\n const entry = arrayData[j] as Record;\n setValueByPath(entry, keys.slice(i + 1), value[j]);\n }\n } else {\n for (const d of arrayData) {\n setValueByPath(\n d as Record,\n keys.slice(i + 1),\n value,\n );\n }\n }\n }\n return;\n } else if (key.endsWith('[0]')) {\n const keyName = key.slice(0, -3);\n if (!(keyName in data)) {\n data[keyName] = [{}];\n }\n const arrayData = (data as Record)[keyName];\n setValueByPath(\n (arrayData as Array>)[0],\n keys.slice(i + 1),\n value,\n );\n return;\n }\n\n if (!data[key] || typeof data[key] !== 'object') {\n data[key] = {};\n }\n\n data = data[key] as Record;\n }\n\n const keyToSet = keys[keys.length - 1];\n const existingData = data[keyToSet];\n\n if (existingData !== undefined) {\n if (\n !value ||\n (typeof value === 'object' && Object.keys(value).length === 0)\n ) {\n return;\n }\n\n if (value === existingData) {\n return;\n }\n\n if (\n typeof existingData === 'object' &&\n typeof value === 'object' &&\n existingData !== null &&\n value !== null\n ) {\n Object.assign(existingData, value);\n } else {\n throw new Error(`Cannot set value for an existing key. Key: ${keyToSet}`);\n }\n } else {\n data[keyToSet] = value;\n }\n}\n\nexport function getValueByPath(data: unknown, keys: string[]): unknown {\n try {\n if (keys.length === 1 && keys[0] === '_self') {\n return data;\n }\n\n for (let i = 0; i < keys.length; i++) {\n if (typeof data !== 'object' || data === null) {\n return undefined;\n }\n\n const key = keys[i];\n if (key.endsWith('[]')) {\n const keyName = key.slice(0, -2);\n if (keyName in data) {\n const arrayData = (data as Record)[keyName];\n if (!Array.isArray(arrayData)) {\n return undefined;\n }\n return arrayData.map((d) => getValueByPath(d, keys.slice(i + 1)));\n } else {\n return undefined;\n }\n } else {\n data = (data as Record)[key];\n }\n }\n\n return data;\n } catch (error) {\n if (error instanceof TypeError) {\n return undefined;\n }\n throw error;\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ApiClient} from './_api_client';\nimport * as types from './types';\n\nexport function tModel(apiClient: ApiClient, model: string | unknown): string {\n if (!model || typeof model !== 'string') {\n throw new Error('model is required and must be a string');\n }\n\n if (apiClient.isVertexAI()) {\n if (\n model.startsWith('publishers/') ||\n model.startsWith('projects/') ||\n model.startsWith('models/')\n ) {\n return model;\n } else if (model.indexOf('/') >= 0) {\n const parts = model.split('/', 2);\n return `publishers/${parts[0]}/models/${parts[1]}`;\n } else {\n return `publishers/google/models/${model}`;\n }\n } else {\n if (model.startsWith('models/') || model.startsWith('tunedModels/')) {\n return model;\n } else {\n return `models/${model}`;\n }\n }\n}\n\nexport function tCachesModel(\n apiClient: ApiClient,\n model: string | unknown,\n): string {\n const transformedModel = tModel(apiClient, model as string);\n if (!transformedModel) {\n return '';\n }\n\n if (transformedModel.startsWith('publishers/') && apiClient.isVertexAI()) {\n // vertex caches only support model name start with projects.\n return `projects/${apiClient.getProject()}/locations/${apiClient.getLocation()}/${transformedModel}`;\n } else if (transformedModel.startsWith('models/') && apiClient.isVertexAI()) {\n return `projects/${apiClient.getProject()}/locations/${apiClient.getLocation()}/publishers/google/${transformedModel}`;\n } else {\n return transformedModel;\n }\n}\n\nexport function tPart(\n apiClient: ApiClient,\n origin?: types.PartUnion | null,\n): types.Part {\n if (origin === null || origin === undefined) {\n throw new Error('PartUnion is required');\n }\n if (typeof origin === 'object') {\n return origin;\n }\n if (typeof origin === 'string') {\n return {text: origin};\n }\n throw new Error(`Unsupported part type: ${typeof origin}`);\n}\n\nexport function tParts(\n apiClient: ApiClient,\n origin?: types.PartListUnion | null,\n): types.Part[] {\n if (\n origin === null ||\n origin === undefined ||\n (Array.isArray(origin) && origin.length === 0)\n ) {\n throw new Error('PartListUnion is required');\n }\n if (Array.isArray(origin)) {\n return origin.map((item) => tPart(apiClient, item as types.PartUnion)!);\n }\n return [tPart(apiClient, origin)!];\n}\n\nfunction _isContent(origin: unknown): boolean {\n return (\n origin !== null &&\n origin !== undefined &&\n typeof origin === 'object' &&\n 'parts' in origin &&\n Array.isArray(origin.parts)\n );\n}\n\nfunction _isFunctionCallPart(origin: unknown): boolean {\n return (\n origin !== null &&\n origin !== undefined &&\n typeof origin === 'object' &&\n 'functionCall' in origin\n );\n}\n\nfunction _isUserPart(origin: unknown): boolean {\n if (origin === null || origin === undefined) {\n return false;\n }\n if (_isFunctionCallPart(origin)) {\n return false;\n }\n return true;\n}\n\nfunction _areUserParts(origin: types.PartListUnion[]): boolean {\n if (\n origin === null ||\n origin === undefined ||\n (Array.isArray(origin) && origin.length === 0)\n ) {\n return false;\n }\n return origin.every(_isUserPart);\n}\n\nexport function tContent(\n apiClient: ApiClient,\n origin?: types.ContentUnion,\n): types.Content {\n if (origin === null || origin === undefined) {\n throw new Error('ContentUnion is required');\n }\n if (_isContent(origin)) {\n // @ts-expect-error: _isContent is a utility function that checks if the\n // origin is a Content.\n return origin;\n }\n\n if (_isUserPart(origin)) {\n return {\n role: 'user',\n parts: tParts(apiClient, origin as types.PartListUnion)!,\n };\n } else {\n return {\n role: 'model',\n parts: tParts(apiClient, origin as types.PartListUnion)!,\n };\n }\n}\n\nexport function tContentsForEmbed(\n apiClient: ApiClient,\n origin: types.ContentListUnion,\n): types.ContentUnion[] {\n if (!origin) {\n return [];\n }\n if (apiClient.isVertexAI() && Array.isArray(origin)) {\n return origin.flatMap((item) => {\n const content = tContent(apiClient, item as types.ContentUnion);\n if (\n content.parts &&\n content.parts.length > 0 &&\n content.parts[0].text !== undefined\n ) {\n return [content.parts[0].text];\n }\n return [];\n });\n } else if (apiClient.isVertexAI()) {\n const content = tContent(apiClient, origin as types.ContentUnion);\n if (\n content.parts &&\n content.parts.length > 0 &&\n content.parts[0].text !== undefined\n ) {\n return [content.parts[0].text];\n }\n return [];\n }\n if (Array.isArray(origin)) {\n return origin.map(\n (item) => tContent(apiClient, item as types.ContentUnion)!,\n );\n }\n return [tContent(apiClient, origin as types.ContentUnion)!];\n}\n\nfunction _appendAccumulatedPartsAsContent(\n apiClient: ApiClient,\n result: types.Content[],\n accumulatedParts: types.PartUnion[],\n) {\n if (accumulatedParts.length === 0) {\n return;\n }\n if (_areUserParts(accumulatedParts)) {\n result.push({\n role: 'user',\n parts: tParts(apiClient, accumulatedParts),\n });\n } else {\n result.push({\n role: 'model',\n parts: tParts(apiClient, accumulatedParts),\n });\n }\n accumulatedParts.length = 0; // clear the array inplace\n}\n\nfunction _handleCurrentPart(\n apiClient: ApiClient,\n result: types.Content[],\n accumulatedParts: types.PartUnion[],\n currentPart: types.PartUnion,\n) {\n if (_isUserPart(currentPart) === _areUserParts(accumulatedParts)) {\n accumulatedParts.push(currentPart);\n } else {\n _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts);\n accumulatedParts.length = 0;\n accumulatedParts.push(currentPart);\n }\n}\n\nexport function tContents(\n apiClient: ApiClient,\n origin?: types.ContentListUnion,\n): types.Content[] {\n if (\n origin === null ||\n origin === undefined ||\n (Array.isArray(origin) && origin.length === 0)\n ) {\n throw new Error('contents are required');\n }\n if (!Array.isArray(origin)) {\n return [tContent(apiClient, origin)];\n }\n\n const result: types.Content[] = [];\n const accumulatedParts: types.PartUnion[] = [];\n\n for (const content of origin) {\n if (_isContent(content)) {\n _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts);\n // @ts-expect-error: content is a Content here\n result.push(content);\n } else if (\n typeof content === 'string' ||\n (typeof content === 'object' && !Array.isArray(content))\n ) {\n // @ts-expect-error: content is a part here\n _handleCurrentPart(apiClient, result, accumulatedParts, content);\n } else if (Array.isArray(content)) {\n // if there're consecutive user parts before the list,\n // convert to UserContent and append to result\n _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts);\n result.push({\n role: 'user',\n parts: tParts(apiClient, content),\n });\n } else {\n throw new Error(`Unsupported content type: ${typeof content}`);\n }\n }\n _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts);\n\n return result;\n}\n\nexport function processSchema(apiClient: ApiClient, schema: types.Schema) {\n if (!apiClient.isVertexAI()) {\n if ('default' in schema) {\n throw new Error(\n 'Default value is not supported in the response schema for the Gemini API.',\n );\n }\n }\n\n if ('anyOf' in schema) {\n if (schema['anyOf'] !== undefined) {\n for (const subSchema of schema['anyOf']) {\n processSchema(apiClient, subSchema);\n }\n }\n }\n\n if ('items' in schema) {\n if (schema['items'] !== undefined) {\n processSchema(apiClient, schema['items']);\n }\n }\n\n if ('properties' in schema) {\n if (schema['properties'] !== undefined) {\n for (const subSchema of Object.values(schema['properties'])) {\n processSchema(apiClient, subSchema);\n }\n }\n }\n}\n\nexport function tSchema(\n apiClient: ApiClient,\n schema: types.Schema,\n): types.Schema {\n processSchema(apiClient, schema);\n return schema;\n}\n\nexport function tSpeechConfig(\n apiClient: ApiClient,\n speechConfig: types.SpeechConfigUnion,\n): types.SpeechConfig {\n if (typeof speechConfig === 'object' && 'voiceConfig' in speechConfig) {\n return speechConfig;\n } else if (typeof speechConfig === 'string') {\n return {\n voiceConfig: {\n prebuiltVoiceConfig: {\n voiceName: speechConfig,\n },\n },\n };\n } else {\n throw new Error(`Unsupported speechConfig type: ${typeof speechConfig}`);\n }\n}\n\nexport function tTool(apiClient: ApiClient, tool: types.Tool): types.Tool {\n return tool;\n}\n\nexport function tTools(\n apiClient: ApiClient,\n tool: types.Tool[] | unknown,\n): types.Tool[] {\n if (!Array.isArray(tool)) {\n throw new Error('tool is required and must be an array of Tools');\n }\n return tool;\n}\n\n/**\n * Prepends resource name with project, location, resource_prefix if needed.\n *\n * @param client The API client.\n * @param resourceName The resource name.\n * @param resourcePrefix The resource prefix.\n * @param splitsAfterPrefix The number of splits after the prefix.\n * @returns The completed resource name.\n *\n * Examples:\n *\n * ```\n * resource_name = '123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = True\n * client.project = 'bar'\n * client.location = 'us-west1'\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns: 'projects/bar/locations/us-west1/cachedContents/123'\n * ```\n *\n * ```\n * resource_name = 'projects/foo/locations/us-central1/cachedContents/123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = True\n * client.project = 'bar'\n * client.location = 'us-west1'\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns: 'projects/foo/locations/us-central1/cachedContents/123'\n * ```\n *\n * ```\n * resource_name = '123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = False\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns 'cachedContents/123'\n * ```\n *\n * ```\n * resource_name = 'some/wrong/cachedContents/resource/name/123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = False\n * # client.vertexai = True\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * -> 'some/wrong/resource/name/123'\n * ```\n */\nfunction resourceName(\n client: ApiClient,\n resourceName: string,\n resourcePrefix: string,\n splitsAfterPrefix: number = 1,\n): string {\n const shouldAppendPrefix =\n !resourceName.startsWith(`${resourcePrefix}/`) &&\n resourceName.split('/').length === splitsAfterPrefix;\n if (client.isVertexAI()) {\n if (resourceName.startsWith('projects/')) {\n return resourceName;\n } else if (resourceName.startsWith('locations/')) {\n return `projects/${client.getProject()}/${resourceName}`;\n } else if (resourceName.startsWith(`${resourcePrefix}/`)) {\n return `projects/${client.getProject()}/locations/${client.getLocation()}/${resourceName}`;\n } else if (shouldAppendPrefix) {\n return `projects/${client.getProject()}/locations/${client.getLocation()}/${resourcePrefix}/${resourceName}`;\n } else {\n return resourceName;\n }\n }\n if (shouldAppendPrefix) {\n return `${resourcePrefix}/${resourceName}`;\n }\n return resourceName;\n}\n\nexport function tCachedContentName(\n apiClient: ApiClient,\n name: string | unknown,\n): string {\n if (typeof name !== 'string') {\n throw new Error('name must be a string');\n }\n return resourceName(apiClient, name, 'cachedContents');\n}\n\nexport function tTuningJobStatus(\n apiClient: ApiClient,\n status: string | unknown,\n): string {\n switch (status) {\n case 'STATE_UNSPECIFIED':\n return 'JOB_STATE_UNSPECIFIED';\n case 'CREATING':\n return 'JOB_STATE_RUNNING';\n case 'ACTIVE':\n return 'JOB_STATE_SUCCEEDED';\n case 'FAILED':\n return 'JOB_STATE_FAILED';\n default:\n return status as string;\n }\n}\n\nexport function tBytes(\n apiClient: ApiClient,\n fromImageBytes: string | unknown,\n): string {\n if (typeof fromImageBytes !== 'string') {\n throw new Error('fromImageBytes must be a string');\n }\n // TODO(b/389133914): Remove dummy bytes converter.\n return fromImageBytes;\n}\nexport function tFileName(\n apiClient: ApiClient,\n fromName: string | unknown,\n): string {\n if (typeof fromName !== 'string') {\n throw new Error('fromName must be a string');\n }\n // Remove the files/ prefx for MLdev urls to get the actual name of the file.\n if (fromName.startsWith('files/')) {\n return fromName.split('files/')[1];\n }\n return fromName;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function partToMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['videoMetadata']) !== undefined) {\n throw new Error('videoMetadata parameter is not supported in Gemini API.');\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToMldev(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['example']) !== undefined) {\n throw new Error('example parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['pattern']) !== undefined) {\n throw new Error('pattern parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['default']) !== undefined) {\n throw new Error('default parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxLength']) !== undefined) {\n throw new Error('maxLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minLength']) !== undefined) {\n throw new Error('minLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minProperties']) !== undefined) {\n throw new Error('minProperties parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxProperties']) !== undefined) {\n throw new Error('maxProperties parameter is not supported in Gemini API.');\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['response']) !== undefined) {\n throw new Error('response parameter is not supported in Gemini API.');\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToMldev(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToMldev(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n if (common.getValueByPath(fromObject, ['retrieval']) !== undefined) {\n throw new Error('retrieval parameter is not supported in Gemini API.');\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToMldev());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (parentObject !== undefined && fromDisplayName != null) {\n common.setValueByPath(parentObject, ['displayName'], fromDisplayName);\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (parentObject !== undefined && fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToMldev(apiClient, fromToolConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['model'],\n t.tCachesModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n createCachedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.DeleteCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n updateCachedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function listCachedContentsConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listCachedContentsParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listCachedContentsConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partToVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToVertex(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n const fromExample = common.getValueByPath(fromObject, ['example']);\n if (fromExample != null) {\n common.setValueByPath(toObject, ['example'], fromExample);\n }\n\n const fromPattern = common.getValueByPath(fromObject, ['pattern']);\n if (fromPattern != null) {\n common.setValueByPath(toObject, ['pattern'], fromPattern);\n }\n\n const fromDefault = common.getValueByPath(fromObject, ['default']);\n if (fromDefault != null) {\n common.setValueByPath(toObject, ['default'], fromDefault);\n }\n\n const fromMaxLength = common.getValueByPath(fromObject, ['maxLength']);\n if (fromMaxLength != null) {\n common.setValueByPath(toObject, ['maxLength'], fromMaxLength);\n }\n\n const fromMinLength = common.getValueByPath(fromObject, ['minLength']);\n if (fromMinLength != null) {\n common.setValueByPath(toObject, ['minLength'], fromMinLength);\n }\n\n const fromMinProperties = common.getValueByPath(fromObject, [\n 'minProperties',\n ]);\n if (fromMinProperties != null) {\n common.setValueByPath(toObject, ['minProperties'], fromMinProperties);\n }\n\n const fromMaxProperties = common.getValueByPath(fromObject, [\n 'maxProperties',\n ]);\n if (fromMaxProperties != null) {\n common.setValueByPath(toObject, ['maxProperties'], fromMaxProperties);\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n schemaToVertex(apiClient, fromResponse),\n );\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToVertex(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToVertex(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n const fromRetrieval = common.getValueByPath(fromObject, ['retrieval']);\n if (fromRetrieval != null) {\n common.setValueByPath(toObject, ['retrieval'], fromRetrieval);\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToVertex());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (parentObject !== undefined && fromDisplayName != null) {\n common.setValueByPath(parentObject, ['displayName'], fromDisplayName);\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (parentObject !== undefined && fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToVertex(apiClient, fromToolConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['model'],\n t.tCachesModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n createCachedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.DeleteCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n updateCachedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function listCachedContentsConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listCachedContentsParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listCachedContentsConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function cachedContentFromMldev(\n apiClient: ApiClient,\n fromObject: types.CachedContent,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (fromExpireTime != null) {\n common.setValueByPath(toObject, ['expireTime'], fromExpireTime);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentResponseFromMldev(): Record<\n string,\n unknown\n> {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function listCachedContentsResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromCachedContents = common.getValueByPath(fromObject, [\n 'cachedContents',\n ]);\n if (fromCachedContents != null) {\n if (Array.isArray(fromCachedContents)) {\n common.setValueByPath(\n toObject,\n ['cachedContents'],\n fromCachedContents.map((item) => {\n return cachedContentFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['cachedContents'], fromCachedContents);\n }\n }\n\n return toObject;\n}\n\nexport function cachedContentFromVertex(\n apiClient: ApiClient,\n fromObject: types.CachedContent,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (fromExpireTime != null) {\n common.setValueByPath(toObject, ['expireTime'], fromExpireTime);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentResponseFromVertex(): Record<\n string,\n unknown\n> {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function listCachedContentsResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromCachedContents = common.getValueByPath(fromObject, [\n 'cachedContents',\n ]);\n if (fromCachedContents != null) {\n if (Array.isArray(fromCachedContents)) {\n common.setValueByPath(\n toObject,\n ['cachedContents'],\n fromCachedContents.map((item) => {\n return cachedContentFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['cachedContents'], fromCachedContents);\n }\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Pagers for the GenAI List APIs.\n */\n\nexport enum PagedItem {\n PAGED_ITEM_BATCH_JOBS = 'batchJobs',\n PAGED_ITEM_MODELS = 'models',\n PAGED_ITEM_TUNING_JOBS = 'tuningJobs',\n PAGED_ITEM_FILES = 'files',\n PAGED_ITEM_CACHED_CONTENTS = 'cachedContents',\n}\n\ninterface PagedItemConfig {\n config?: {\n pageToken?: string;\n pageSize?: number;\n };\n}\n\ninterface PagedItemResponse {\n nextPageToken?: string;\n batchJobs?: T[];\n models?: T[];\n tuningJobs?: T[];\n files?: T[];\n cachedContents?: T[];\n}\n\n/**\n * Pager class for iterating through paginated results.\n */\nexport class Pager implements AsyncIterable {\n private nameInternal!: PagedItem;\n private pageInternal: T[] = [];\n private paramsInternal: PagedItemConfig = {};\n private pageInternalSize!: number;\n protected requestInternal!: (\n params: PagedItemConfig,\n ) => Promise>;\n protected idxInternal!: number;\n\n constructor(\n name: PagedItem,\n request: (params: PagedItemConfig) => Promise>,\n response: PagedItemResponse,\n params: PagedItemConfig,\n ) {\n this.requestInternal = request;\n this.init(name, response, params);\n }\n\n private init(\n name: PagedItem,\n response: PagedItemResponse,\n params: PagedItemConfig,\n ) {\n this.nameInternal = name;\n this.pageInternal = response[this.nameInternal] || [];\n this.idxInternal = 0;\n let requestParams: PagedItemConfig = {config: {}};\n if (!params) {\n requestParams = {config: {}};\n } else if (typeof params === 'object') {\n requestParams = {...params};\n } else {\n requestParams = params;\n }\n if (requestParams['config']) {\n requestParams['config']['pageToken'] = response['nextPageToken'];\n }\n this.paramsInternal = requestParams;\n this.pageInternalSize =\n requestParams['config']?.['pageSize'] ?? this.pageInternal.length;\n }\n\n private initNextPage(response: PagedItemResponse): void {\n this.init(this.nameInternal, response, this.paramsInternal);\n }\n\n /**\n * Returns the current page, which is a list of items.\n *\n * @remarks\n * The first page is retrieved when the pager is created. The returned list of\n * items could be a subset of the entire list.\n */\n get page(): T[] {\n return this.pageInternal;\n }\n\n /**\n * Returns the type of paged item (for example, ``batch_jobs``).\n */\n get name(): PagedItem {\n return this.nameInternal;\n }\n\n /**\n * Returns the length of the page fetched each time by this pager.\n *\n * @remarks\n * The number of items in the page is less than or equal to the page length.\n */\n get pageSize(): number {\n return this.pageInternalSize;\n }\n\n /**\n * Returns the parameters when making the API request for the next page.\n *\n * @remarks\n * Parameters contain a set of optional configs that can be\n * used to customize the API request. For example, the `pageToken` parameter\n * contains the token to request the next page.\n */\n get params(): PagedItemConfig {\n return this.paramsInternal;\n }\n\n /**\n * Returns the total number of items in the current page.\n */\n get pageLength(): number {\n return this.pageInternal.length;\n }\n\n /**\n * Returns the item at the given index.\n */\n getItem(index: number): T {\n return this.pageInternal[index];\n }\n\n /**\n * Returns an async iterator that support iterating through all items\n * retrieved from the API.\n *\n * @remarks\n * The iterator will automatically fetch the next page if there are more items\n * to fetch from the API.\n *\n * @example\n *\n * ```ts\n * const pager = await ai.files.list({config: {pageSize: 10}});\n * for await (const file of pager) {\n * console.log(file.name);\n * }\n * ```\n */\n [Symbol.asyncIterator](): AsyncIterator {\n return {\n next: async () => {\n if (this.idxInternal >= this.pageLength) {\n if (this.hasNextPage()) {\n await this.nextPage();\n } else {\n return {value: undefined, done: true};\n }\n }\n const item = this.getItem(this.idxInternal);\n this.idxInternal += 1;\n return {value: item, done: false};\n },\n return: async () => {\n return {value: undefined, done: true};\n },\n };\n }\n\n /**\n * Fetches the next page of items. This makes a new API request.\n *\n * @throws {Error} If there are no more pages to fetch.\n *\n * @example\n *\n * ```ts\n * const pager = await ai.files.list({config: {pageSize: 10}});\n * let page = pager.page;\n * while (true) {\n * for (const file of page) {\n * console.log(file.name);\n * }\n * if (!pager.hasNextPage()) {\n * break;\n * }\n * page = await pager.nextPage();\n * }\n * ```\n */\n async nextPage(): Promise {\n if (!this.hasNextPage()) {\n throw new Error('No more pages to fetch.');\n }\n const response = await this.requestInternal(this.params);\n this.initNextPage(response);\n return this.page;\n }\n\n /**\n * Returns true if there are more pages to fetch from the API.\n */\n hasNextPage(): boolean {\n if (this.params['config']?.['pageToken'] !== undefined) {\n return true;\n }\n return false;\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\n/** Required. Outcome of the code execution. */\nexport enum Outcome {\n OUTCOME_UNSPECIFIED = 'OUTCOME_UNSPECIFIED',\n OUTCOME_OK = 'OUTCOME_OK',\n OUTCOME_FAILED = 'OUTCOME_FAILED',\n OUTCOME_DEADLINE_EXCEEDED = 'OUTCOME_DEADLINE_EXCEEDED',\n}\n\n/** Required. Programming language of the `code`. */\nexport enum Language {\n LANGUAGE_UNSPECIFIED = 'LANGUAGE_UNSPECIFIED',\n PYTHON = 'PYTHON',\n}\n\n/** Optional. The type of the data. */\nexport enum Type {\n TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED',\n STRING = 'STRING',\n NUMBER = 'NUMBER',\n INTEGER = 'INTEGER',\n BOOLEAN = 'BOOLEAN',\n ARRAY = 'ARRAY',\n OBJECT = 'OBJECT',\n}\n\n/** Required. Harm category. */\nexport enum HarmCategory {\n HARM_CATEGORY_UNSPECIFIED = 'HARM_CATEGORY_UNSPECIFIED',\n HARM_CATEGORY_HATE_SPEECH = 'HARM_CATEGORY_HATE_SPEECH',\n HARM_CATEGORY_DANGEROUS_CONTENT = 'HARM_CATEGORY_DANGEROUS_CONTENT',\n HARM_CATEGORY_HARASSMENT = 'HARM_CATEGORY_HARASSMENT',\n HARM_CATEGORY_SEXUALLY_EXPLICIT = 'HARM_CATEGORY_SEXUALLY_EXPLICIT',\n HARM_CATEGORY_CIVIC_INTEGRITY = 'HARM_CATEGORY_CIVIC_INTEGRITY',\n}\n\n/** Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. */\nexport enum HarmBlockMethod {\n HARM_BLOCK_METHOD_UNSPECIFIED = 'HARM_BLOCK_METHOD_UNSPECIFIED',\n SEVERITY = 'SEVERITY',\n PROBABILITY = 'PROBABILITY',\n}\n\n/** Required. The harm block threshold. */\nexport enum HarmBlockThreshold {\n HARM_BLOCK_THRESHOLD_UNSPECIFIED = 'HARM_BLOCK_THRESHOLD_UNSPECIFIED',\n BLOCK_LOW_AND_ABOVE = 'BLOCK_LOW_AND_ABOVE',\n BLOCK_MEDIUM_AND_ABOVE = 'BLOCK_MEDIUM_AND_ABOVE',\n BLOCK_ONLY_HIGH = 'BLOCK_ONLY_HIGH',\n BLOCK_NONE = 'BLOCK_NONE',\n OFF = 'OFF',\n}\n\n/** The mode of the predictor to be used in dynamic retrieval. */\nexport enum Mode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n MODE_DYNAMIC = 'MODE_DYNAMIC',\n}\n\n/** Output only. The reason why the model stopped generating tokens.\n\n If empty, the model has not stopped generating the tokens.\n */\nexport enum FinishReason {\n FINISH_REASON_UNSPECIFIED = 'FINISH_REASON_UNSPECIFIED',\n STOP = 'STOP',\n MAX_TOKENS = 'MAX_TOKENS',\n SAFETY = 'SAFETY',\n RECITATION = 'RECITATION',\n OTHER = 'OTHER',\n BLOCKLIST = 'BLOCKLIST',\n PROHIBITED_CONTENT = 'PROHIBITED_CONTENT',\n SPII = 'SPII',\n MALFORMED_FUNCTION_CALL = 'MALFORMED_FUNCTION_CALL',\n IMAGE_SAFETY = 'IMAGE_SAFETY',\n}\n\n/** Output only. Harm probability levels in the content. */\nexport enum HarmProbability {\n HARM_PROBABILITY_UNSPECIFIED = 'HARM_PROBABILITY_UNSPECIFIED',\n NEGLIGIBLE = 'NEGLIGIBLE',\n LOW = 'LOW',\n MEDIUM = 'MEDIUM',\n HIGH = 'HIGH',\n}\n\n/** Output only. Harm severity levels in the content. */\nexport enum HarmSeverity {\n HARM_SEVERITY_UNSPECIFIED = 'HARM_SEVERITY_UNSPECIFIED',\n HARM_SEVERITY_NEGLIGIBLE = 'HARM_SEVERITY_NEGLIGIBLE',\n HARM_SEVERITY_LOW = 'HARM_SEVERITY_LOW',\n HARM_SEVERITY_MEDIUM = 'HARM_SEVERITY_MEDIUM',\n HARM_SEVERITY_HIGH = 'HARM_SEVERITY_HIGH',\n}\n\n/** Output only. Blocked reason. */\nexport enum BlockedReason {\n BLOCKED_REASON_UNSPECIFIED = 'BLOCKED_REASON_UNSPECIFIED',\n SAFETY = 'SAFETY',\n OTHER = 'OTHER',\n BLOCKLIST = 'BLOCKLIST',\n PROHIBITED_CONTENT = 'PROHIBITED_CONTENT',\n}\n\n/** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */\nexport enum TrafficType {\n TRAFFIC_TYPE_UNSPECIFIED = 'TRAFFIC_TYPE_UNSPECIFIED',\n ON_DEMAND = 'ON_DEMAND',\n PROVISIONED_THROUGHPUT = 'PROVISIONED_THROUGHPUT',\n}\n\n/** Server content modalities. */\nexport enum Modality {\n MODALITY_UNSPECIFIED = 'MODALITY_UNSPECIFIED',\n TEXT = 'TEXT',\n IMAGE = 'IMAGE',\n AUDIO = 'AUDIO',\n}\n\n/** The media resolution to use. */\nexport enum MediaResolution {\n MEDIA_RESOLUTION_UNSPECIFIED = 'MEDIA_RESOLUTION_UNSPECIFIED',\n MEDIA_RESOLUTION_LOW = 'MEDIA_RESOLUTION_LOW',\n MEDIA_RESOLUTION_MEDIUM = 'MEDIA_RESOLUTION_MEDIUM',\n MEDIA_RESOLUTION_HIGH = 'MEDIA_RESOLUTION_HIGH',\n}\n\n/** Config for the dynamic retrieval config mode. */\nexport enum DynamicRetrievalConfigMode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n MODE_DYNAMIC = 'MODE_DYNAMIC',\n}\n\n/** Config for the function calling config mode. */\nexport enum FunctionCallingConfigMode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n AUTO = 'AUTO',\n ANY = 'ANY',\n NONE = 'NONE',\n}\n\n/** Enum that controls the safety filter level for objectionable content. */\nexport enum SafetyFilterLevel {\n BLOCK_LOW_AND_ABOVE = 'BLOCK_LOW_AND_ABOVE',\n BLOCK_MEDIUM_AND_ABOVE = 'BLOCK_MEDIUM_AND_ABOVE',\n BLOCK_ONLY_HIGH = 'BLOCK_ONLY_HIGH',\n BLOCK_NONE = 'BLOCK_NONE',\n}\n\n/** Enum that controls the generation of people. */\nexport enum PersonGeneration {\n DONT_ALLOW = 'DONT_ALLOW',\n ALLOW_ADULT = 'ALLOW_ADULT',\n ALLOW_ALL = 'ALLOW_ALL',\n}\n\n/** Enum that specifies the language of the text in the prompt. */\nexport enum ImagePromptLanguage {\n auto = 'auto',\n en = 'en',\n ja = 'ja',\n ko = 'ko',\n hi = 'hi',\n}\n\n/** State for the lifecycle of a File. */\nexport enum FileState {\n STATE_UNSPECIFIED = 'STATE_UNSPECIFIED',\n PROCESSING = 'PROCESSING',\n ACTIVE = 'ACTIVE',\n FAILED = 'FAILED',\n}\n\n/** Source of the File. */\nexport enum FileSource {\n SOURCE_UNSPECIFIED = 'SOURCE_UNSPECIFIED',\n UPLOADED = 'UPLOADED',\n GENERATED = 'GENERATED',\n}\n\n/** Enum representing the mask mode of a mask reference image. */\nexport enum MaskReferenceMode {\n MASK_MODE_DEFAULT = 'MASK_MODE_DEFAULT',\n MASK_MODE_USER_PROVIDED = 'MASK_MODE_USER_PROVIDED',\n MASK_MODE_BACKGROUND = 'MASK_MODE_BACKGROUND',\n MASK_MODE_FOREGROUND = 'MASK_MODE_FOREGROUND',\n MASK_MODE_SEMANTIC = 'MASK_MODE_SEMANTIC',\n}\n\n/** Enum representing the control type of a control reference image. */\nexport enum ControlReferenceType {\n CONTROL_TYPE_DEFAULT = 'CONTROL_TYPE_DEFAULT',\n CONTROL_TYPE_CANNY = 'CONTROL_TYPE_CANNY',\n CONTROL_TYPE_SCRIBBLE = 'CONTROL_TYPE_SCRIBBLE',\n CONTROL_TYPE_FACE_MESH = 'CONTROL_TYPE_FACE_MESH',\n}\n\n/** Enum representing the subject type of a subject reference image. */\nexport enum SubjectReferenceType {\n SUBJECT_TYPE_DEFAULT = 'SUBJECT_TYPE_DEFAULT',\n SUBJECT_TYPE_PERSON = 'SUBJECT_TYPE_PERSON',\n SUBJECT_TYPE_ANIMAL = 'SUBJECT_TYPE_ANIMAL',\n SUBJECT_TYPE_PRODUCT = 'SUBJECT_TYPE_PRODUCT',\n}\n\n/** Server content modalities. */\nexport enum MediaModality {\n MODALITY_UNSPECIFIED = 'MODALITY_UNSPECIFIED',\n TEXT = 'TEXT',\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n AUDIO = 'AUDIO',\n DOCUMENT = 'DOCUMENT',\n}\n\n/** Start of speech sensitivity. */\nexport enum StartSensitivity {\n START_SENSITIVITY_UNSPECIFIED = 'START_SENSITIVITY_UNSPECIFIED',\n START_SENSITIVITY_HIGH = 'START_SENSITIVITY_HIGH',\n START_SENSITIVITY_LOW = 'START_SENSITIVITY_LOW',\n}\n\n/** End of speech sensitivity. */\nexport enum EndSensitivity {\n END_SENSITIVITY_UNSPECIFIED = 'END_SENSITIVITY_UNSPECIFIED',\n END_SENSITIVITY_HIGH = 'END_SENSITIVITY_HIGH',\n END_SENSITIVITY_LOW = 'END_SENSITIVITY_LOW',\n}\n\n/** The different ways of handling user activity. */\nexport enum ActivityHandling {\n ACTIVITY_HANDLING_UNSPECIFIED = 'ACTIVITY_HANDLING_UNSPECIFIED',\n START_OF_ACTIVITY_INTERRUPTS = 'START_OF_ACTIVITY_INTERRUPTS',\n NO_INTERRUPTION = 'NO_INTERRUPTION',\n}\n\n/** Options about which input is included in the user's turn. */\nexport enum TurnCoverage {\n TURN_COVERAGE_UNSPECIFIED = 'TURN_COVERAGE_UNSPECIFIED',\n TURN_INCLUDES_ONLY_ACTIVITY = 'TURN_INCLUDES_ONLY_ACTIVITY',\n TURN_INCLUDES_ALL_INPUT = 'TURN_INCLUDES_ALL_INPUT',\n}\n\n/** Metadata describes the input video content. */\nexport declare interface VideoMetadata {\n /** Optional. The end offset of the video. */\n endOffset?: string;\n /** Optional. The start offset of the video. */\n startOffset?: string;\n}\n\n/** Result of executing the [ExecutableCode]. Always follows a `part` containing the [ExecutableCode]. */\nexport declare interface CodeExecutionResult {\n /** Required. Outcome of the code execution. */\n outcome?: Outcome;\n /** Optional. Contains stdout when code execution is successful, stderr or other description otherwise. */\n output?: string;\n}\n\n/** Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the [FunctionDeclaration] tool and [FunctionCallingConfig] mode is set to [Mode.CODE]. */\nexport declare interface ExecutableCode {\n /** Required. The code to be executed. */\n code?: string;\n /** Required. Programming language of the `code`. */\n language?: Language;\n}\n\n/** URI based data. */\nexport declare interface FileData {\n /** Required. URI. */\n fileUri?: string;\n /** Required. The IANA standard MIME type of the source data. */\n mimeType?: string;\n}\n\n/** A function call. */\nexport declare interface FunctionCall {\n /** The unique id of the function call. If populated, the client to execute the\n `function_call` and return the response with the matching `id`. */\n id?: string;\n /** Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. */\n args?: Record;\n /** Required. The name of the function to call. Matches [FunctionDeclaration.name]. */\n name?: string;\n}\n\n/** A function response. */\nexport class FunctionResponse {\n /** The id of the function call this response is for. Populated by the client\n to match the corresponding function call `id`. */\n id?: string;\n /** Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. */\n name?: string;\n /** Required. The function response in JSON object format. Use \"output\" key to specify function output and \"error\" key to specify error details (if any). If \"output\" and \"error\" keys are not specified, then whole \"response\" is treated as function output. */\n response?: Record;\n}\n\n/** Content blob. */\nexport declare interface Blob {\n /** Required. Raw bytes. */\n data?: string;\n /** Required. The IANA standard MIME type of the source data. */\n mimeType?: string;\n}\n\n/** A datatype containing media content.\n\n Exactly one field within a Part should be set, representing the specific type\n of content being conveyed. Using multiple fields within the same `Part`\n instance is considered invalid.\n */\nexport declare interface Part {\n /** Metadata for a given video. */\n videoMetadata?: VideoMetadata;\n /** Indicates if the part is thought from the model. */\n thought?: boolean;\n /** Optional. Result of executing the [ExecutableCode]. */\n codeExecutionResult?: CodeExecutionResult;\n /** Optional. Code generated by the model that is meant to be executed. */\n executableCode?: ExecutableCode;\n /** Optional. URI based data. */\n fileData?: FileData;\n /** Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. */\n functionCall?: FunctionCall;\n /** Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. */\n functionResponse?: FunctionResponse;\n /** Optional. Inlined bytes data. */\n inlineData?: Blob;\n /** Optional. Text part (can be code). */\n text?: string;\n}\n/**\n * Creates a `Part` object from a `URI` string.\n */\nexport function createPartFromUri(uri: string, mimeType: string): Part {\n return {\n fileData: {\n fileUri: uri,\n mimeType: mimeType,\n },\n };\n}\n/**\n * Creates a `Part` object from a `text` string.\n */\nexport function createPartFromText(text: string): Part {\n return {\n text: text,\n };\n}\n/**\n * Creates a `Part` object from a `FunctionCall` object.\n */\nexport function createPartFromFunctionCall(\n name: string,\n args: Record,\n): Part {\n return {\n functionCall: {\n name: name,\n args: args,\n },\n };\n}\n/**\n * Creates a `Part` object from a `FunctionResponse` object.\n */\nexport function createPartFromFunctionResponse(\n id: string,\n name: string,\n response: Record,\n): Part {\n return {\n functionResponse: {\n id: id,\n name: name,\n response: response,\n },\n };\n}\n/**\n * Creates a `Part` object from a `base64` encoded `string`.\n */\nexport function createPartFromBase64(data: string, mimeType: string): Part {\n return {\n inlineData: {\n data: data,\n mimeType: mimeType,\n },\n };\n}\n/**\n * Creates a `Part` object from the `outcome` and `output` of a `CodeExecutionResult` object.\n */\nexport function createPartFromCodeExecutionResult(\n outcome: Outcome,\n output: string,\n): Part {\n return {\n codeExecutionResult: {\n outcome: outcome,\n output: output,\n },\n };\n}\n/**\n * Creates a `Part` object from the `code` and `language` of an `ExecutableCode` object.\n */\nexport function createPartFromExecutableCode(\n code: string,\n language: Language,\n): Part {\n return {\n executableCode: {\n code: code,\n language: language,\n },\n };\n}\n\n/** Contains the multi-part content of a message. */\nexport declare interface Content {\n /** List of parts that constitute a single message. Each part may have\n a different IANA MIME type. */\n parts?: Part[];\n /** Optional. The producer of the content. Must be either 'user' or\n 'model'. Useful to set for multi-turn conversations, otherwise can be\n empty. If role is not specified, SDK will determine the role. */\n role?: string;\n}\nfunction _isPart(obj: unknown): obj is Part {\n if (typeof obj === 'object' && obj !== null) {\n return (\n 'fileData' in obj ||\n 'text' in obj ||\n 'functionCall' in obj ||\n 'functionResponse' in obj ||\n 'inlineData' in obj ||\n 'videoMetadata' in obj ||\n 'codeExecutionResult' in obj ||\n 'executableCode' in obj\n );\n }\n return false;\n}\nfunction _toParts(partOrString: PartListUnion | string): Part[] {\n const parts: Part[] = [];\n if (typeof partOrString === 'string') {\n parts.push(createPartFromText(partOrString));\n } else if (_isPart(partOrString)) {\n parts.push(partOrString);\n } else if (Array.isArray(partOrString)) {\n if (partOrString.length === 0) {\n throw new Error('partOrString cannot be an empty array');\n }\n for (const part of partOrString) {\n if (typeof part === 'string') {\n parts.push(createPartFromText(part));\n } else if (_isPart(part)) {\n parts.push(part);\n } else {\n throw new Error('element in PartUnion must be a Part object or string');\n }\n }\n } else {\n throw new Error('partOrString must be a Part object, string, or array');\n }\n return parts;\n}\n/**\n * Creates a `Content` object with a user role from a `PartListUnion` object or `string`.\n */\nexport function createUserContent(\n partOrString: PartListUnion | string,\n): Content {\n return {\n role: 'user',\n parts: _toParts(partOrString),\n };\n}\n\n/**\n * Creates a `Content` object with a model role from a `PartListUnion` object or `string`.\n */\nexport function createModelContent(\n partOrString: PartListUnion | string,\n): Content {\n return {\n role: 'model',\n parts: _toParts(partOrString),\n };\n}\n/** HTTP options to be used in each of the requests. */\nexport declare interface HttpOptions {\n /** The base URL for the AI platform service endpoint. */\n baseUrl?: string;\n /** Specifies the version of the API to use. */\n apiVersion?: string;\n /** Additional HTTP headers to be sent with the request. */\n headers?: Record;\n /** Timeout for the request in milliseconds. */\n timeout?: number;\n}\n\n/** Schema that defines the format of input and output data.\n\n Represents a select subset of an OpenAPI 3.0 schema object.\n */\nexport declare interface Schema {\n /** Optional. Example of the object. Will only populated when the object is the root. */\n example?: unknown;\n /** Optional. Pattern of the Type.STRING to restrict a string to a regular expression. */\n pattern?: string;\n /** Optional. Default value of the data. */\n default?: unknown;\n /** Optional. Maximum length of the Type.STRING */\n maxLength?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING */\n minLength?: string;\n /** Optional. Minimum number of the properties for Type.OBJECT. */\n minProperties?: string;\n /** Optional. Maximum number of the properties for Type.OBJECT. */\n maxProperties?: string;\n /** Optional. The value should be validated against any (one or more) of the subschemas in the list. */\n anyOf?: Schema[];\n /** Optional. The description of the data. */\n description?: string;\n /** Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:[\"EAST\", NORTH\", \"SOUTH\", \"WEST\"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:[\"101\", \"201\", \"301\"]} */\n enum?: string[];\n /** Optional. The format of the data. Supported formats: for NUMBER type: \"float\", \"double\" for INTEGER type: \"int32\", \"int64\" for STRING type: \"email\", \"byte\", etc */\n format?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. */\n items?: Schema;\n /** Optional. Maximum number of the elements for Type.ARRAY. */\n maxItems?: string;\n /** Optional. Maximum value of the Type.INTEGER and Type.NUMBER */\n maximum?: number;\n /** Optional. Minimum number of the elements for Type.ARRAY. */\n minItems?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER */\n minimum?: number;\n /** Optional. Indicates if the value may be null. */\n nullable?: boolean;\n /** Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. */\n properties?: Record;\n /** Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. */\n propertyOrdering?: string[];\n /** Optional. Required properties of Type.OBJECT. */\n required?: string[];\n /** Optional. The title of the Schema. */\n title?: string;\n /** Optional. The type of the data. */\n type?: Type;\n}\n\n/** Safety settings. */\nexport declare interface SafetySetting {\n /** Determines if the harm block method uses probability or probability\n and severity scores. */\n method?: HarmBlockMethod;\n /** Required. Harm category. */\n category?: HarmCategory;\n /** Required. The harm block threshold. */\n threshold?: HarmBlockThreshold;\n}\n\n/** Defines a function that the model can generate JSON inputs for.\n\n The inputs are based on `OpenAPI 3.0 specifications\n `_.\n */\nexport declare interface FunctionDeclaration {\n /** Describes the output from the function in the OpenAPI JSON Schema\n Object format. */\n response?: Schema;\n /** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */\n description?: string;\n /** Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. */\n name?: string;\n /** Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 */\n parameters?: Schema;\n}\n\n/** Tool to support Google Search in Model. Powered by Google. */\nexport declare interface GoogleSearch {}\n\n/** Describes the options to customize dynamic retrieval. */\nexport declare interface DynamicRetrievalConfig {\n /** The mode of the predictor to be used in dynamic retrieval. */\n mode?: DynamicRetrievalConfigMode;\n /** Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used. */\n dynamicThreshold?: number;\n}\n\n/** Tool to retrieve public web data for grounding, powered by Google. */\nexport declare interface GoogleSearchRetrieval {\n /** Specifies the dynamic retrieval configuration for the given source. */\n dynamicRetrievalConfig?: DynamicRetrievalConfig;\n}\n\n/** Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder */\nexport declare interface VertexAISearch {\n /** Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` */\n datastore?: string;\n /** Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` */\n engine?: string;\n}\n\n/** The definition of the Rag resource. */\nexport declare interface VertexRagStoreRagResource {\n /** Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` */\n ragCorpus?: string;\n /** Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field. */\n ragFileIds?: string[];\n}\n\n/** Retrieve from Vertex RAG Store for grounding. */\nexport declare interface VertexRagStore {\n /** Optional. Deprecated. Please use rag_resources instead. */\n ragCorpora?: string[];\n /** Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. */\n ragResources?: VertexRagStoreRagResource[];\n /** Optional. Number of top k results to return from the selected corpora. */\n similarityTopK?: number;\n /** Optional. Only return results with vector distance smaller than the threshold. */\n vectorDistanceThreshold?: number;\n}\n\n/** Defines a retrieval tool that model can call to access external knowledge. */\nexport declare interface Retrieval {\n /** Optional. Deprecated. This option is no longer supported. */\n disableAttribution?: boolean;\n /** Set to use data source powered by Vertex AI Search. */\n vertexAiSearch?: VertexAISearch;\n /** Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService. */\n vertexRagStore?: VertexRagStore;\n}\n\n/** Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. */\nexport declare interface ToolCodeExecution {}\n\n/** Tool details of a tool that the model may use to generate a response. */\nexport declare interface Tool {\n /** List of function declarations that the tool supports. */\n functionDeclarations?: FunctionDeclaration[];\n /** Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. */\n retrieval?: Retrieval;\n /** Optional. Google Search tool type. Specialized retrieval tool\n that is powered by Google Search. */\n googleSearch?: GoogleSearch;\n /** Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. */\n googleSearchRetrieval?: GoogleSearchRetrieval;\n /** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services. */\n codeExecution?: ToolCodeExecution;\n}\n\n/** Function calling config. */\nexport declare interface FunctionCallingConfig {\n /** Optional. Function calling mode. */\n mode?: FunctionCallingConfigMode;\n /** Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided. */\n allowedFunctionNames?: string[];\n}\n\n/** Tool config.\n\n This config is shared for all tools provided in the request.\n */\nexport declare interface ToolConfig {\n /** Optional. Function calling config. */\n functionCallingConfig?: FunctionCallingConfig;\n}\n\n/** The configuration for the prebuilt speaker to use. */\nexport declare interface PrebuiltVoiceConfig {\n /** The name of the prebuilt voice to use.\n */\n voiceName?: string;\n}\n\n/** The configuration for the voice to use. */\nexport declare interface VoiceConfig {\n /** The configuration for the speaker to use.\n */\n prebuiltVoiceConfig?: PrebuiltVoiceConfig;\n}\n\n/** The speech generation configuration. */\nexport declare interface SpeechConfig {\n /** The configuration for the speaker to use.\n */\n voiceConfig?: VoiceConfig;\n}\n\n/** The thinking features configuration. */\nexport declare interface ThinkingConfig {\n /** Indicates whether to include thoughts in the response. If true, thoughts are returned only if the model supports thought and thoughts are available.\n */\n includeThoughts?: boolean;\n /** Indicates the thinking budget in tokens.\n */\n thinkingBudget?: number;\n}\n\n/** When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. */\nexport declare interface GenerationConfigRoutingConfigAutoRoutingMode {\n /** The model routing preference. */\n modelRoutingPreference?:\n | 'UNKNOWN'\n | 'PRIORITIZE_QUALITY'\n | 'BALANCED'\n | 'PRIORITIZE_COST';\n}\n\n/** When manual routing is set, the specified model will be used directly. */\nexport declare interface GenerationConfigRoutingConfigManualRoutingMode {\n /** The model name to use. Only the public LLM models are accepted. e.g. 'gemini-1.5-pro-001'. */\n modelName?: string;\n}\n\n/** The configuration for routing the request to a specific model. */\nexport declare interface GenerationConfigRoutingConfig {\n /** Automated routing. */\n autoMode?: GenerationConfigRoutingConfigAutoRoutingMode;\n /** Manual routing. */\n manualMode?: GenerationConfigRoutingConfigManualRoutingMode;\n}\n\n/** Optional model configuration parameters.\n\n For more information, see `Content generation parameters\n `_.\n */\nexport declare interface GenerateContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Instructions for the model to steer it toward better performance.\n For example, \"Answer as concisely as possible\" or \"Don't use technical\n terms in your response\".\n */\n systemInstruction?: ContentUnion;\n /** Value that controls the degree of randomness in token selection.\n Lower temperatures are good for prompts that require a less open-ended or\n creative response, while higher temperatures can lead to more diverse or\n creative results.\n */\n temperature?: number;\n /** Tokens are selected from the most to least probable until the sum\n of their probabilities equals this value. Use a lower value for less\n random responses and a higher value for more random responses.\n */\n topP?: number;\n /** For each token selection step, the ``top_k`` tokens with the\n highest probabilities are sampled. Then tokens are further filtered based\n on ``top_p`` with the final token selected using temperature sampling. Use\n a lower number for less random responses and a higher number for more\n random responses.\n */\n topK?: number;\n /** Number of response variations to return.\n */\n candidateCount?: number;\n /** Maximum number of tokens that can be generated in the response.\n */\n maxOutputTokens?: number;\n /** List of strings that tells the model to stop generating text if one\n of the strings is encountered in the response.\n */\n stopSequences?: string[];\n /** Whether to return the log probabilities of the tokens that were\n chosen by the model at each step.\n */\n responseLogprobs?: boolean;\n /** Number of top candidate tokens to return the log probabilities for\n at each generation step.\n */\n logprobs?: number;\n /** Positive values penalize tokens that already appear in the\n generated text, increasing the probability of generating more diverse\n content.\n */\n presencePenalty?: number;\n /** Positive values penalize tokens that repeatedly appear in the\n generated text, increasing the probability of generating more diverse\n content.\n */\n frequencyPenalty?: number;\n /** When ``seed`` is fixed to a specific number, the model makes a best\n effort to provide the same response for repeated requests. By default, a\n random number is used.\n */\n seed?: number;\n /** Output response media type of the generated candidate text.\n */\n responseMimeType?: string;\n /** Schema that the generated candidate text must adhere to.\n */\n responseSchema?: SchemaUnion;\n /** Configuration for model router requests.\n */\n routingConfig?: GenerationConfigRoutingConfig;\n /** Safety settings in the request to block unsafe content in the\n response.\n */\n safetySettings?: SafetySetting[];\n /** Code that enables the system to interact with external systems to\n perform an action outside of the knowledge and scope of the model.\n */\n tools?: ToolListUnion;\n /** Associates model output to a specific function call.\n */\n toolConfig?: ToolConfig;\n /** Labels with user-defined metadata to break down billed charges. */\n labels?: Record;\n /** Resource name of a context cache that can be used in subsequent\n requests.\n */\n cachedContent?: string;\n /** The requested modalities of the response. Represents the set of\n modalities that the model can return.\n */\n responseModalities?: string[];\n /** If specified, the media resolution specified will be used.\n */\n mediaResolution?: MediaResolution;\n /** The speech generation configuration.\n */\n speechConfig?: SpeechConfigUnion;\n /** If enabled, audio timestamp will be included in the request to the\n model.\n */\n audioTimestamp?: boolean;\n /** The thinking features configuration.\n */\n thinkingConfig?: ThinkingConfig;\n}\n\n/** Config for models.generate_content parameters. */\nexport declare interface GenerateContentParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Content of the request.\n */\n contents: ContentListUnion;\n /** Configuration that contains optional model parameters.\n */\n config?: GenerateContentConfig;\n}\n\n/** Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp */\nexport declare interface GoogleTypeDate {\n /** Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */\n day?: number;\n /** Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */\n month?: number;\n /** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */\n year?: number;\n}\n\n/** Source attributions for content. */\nexport declare interface Citation {\n /** Output only. End index into the content. */\n endIndex?: number;\n /** Output only. License of the attribution. */\n license?: string;\n /** Output only. Publication date of the attribution. */\n publicationDate?: GoogleTypeDate;\n /** Output only. Start index into the content. */\n startIndex?: number;\n /** Output only. Title of the attribution. */\n title?: string;\n /** Output only. Url reference of the attribution. */\n uri?: string;\n}\n\n/** Citation information when the model quotes another source. */\nexport declare interface CitationMetadata {\n /** Contains citation information when the model directly quotes, at\n length, from another source. Can include traditional websites and code\n repositories.\n */\n citations?: Citation[];\n}\n\n/** Chunk from context retrieved by the retrieval tools. */\nexport declare interface GroundingChunkRetrievedContext {\n /** Text of the attribution. */\n text?: string;\n /** Title of the attribution. */\n title?: string;\n /** URI reference of the attribution. */\n uri?: string;\n}\n\n/** Chunk from the web. */\nexport declare interface GroundingChunkWeb {\n /** Domain of the (original) URI. */\n domain?: string;\n /** Title of the chunk. */\n title?: string;\n /** URI reference of the chunk. */\n uri?: string;\n}\n\n/** Grounding chunk. */\nexport declare interface GroundingChunk {\n /** Grounding chunk from context retrieved by the retrieval tools. */\n retrievedContext?: GroundingChunkRetrievedContext;\n /** Grounding chunk from the web. */\n web?: GroundingChunkWeb;\n}\n\n/** Segment of the content. */\nexport declare interface Segment {\n /** Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero. */\n endIndex?: number;\n /** Output only. The index of a Part object within its parent Content object. */\n partIndex?: number;\n /** Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero. */\n startIndex?: number;\n /** Output only. The text corresponding to the segment from the response. */\n text?: string;\n}\n\n/** Grounding support. */\nexport declare interface GroundingSupport {\n /** Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the grounding_chunk_indices. */\n confidenceScores?: number[];\n /** A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim. */\n groundingChunkIndices?: number[];\n /** Segment of the content this support belongs to. */\n segment?: Segment;\n}\n\n/** Metadata related to retrieval in the grounding flow. */\nexport declare interface RetrievalMetadata {\n /** Optional. Score indicating how likely information from Google Search could help answer the prompt. The score is in the range `[0, 1]`, where 0 is the least likely and 1 is the most likely. This score is only populated when Google Search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger Google Search. */\n googleSearchDynamicRetrievalScore?: number;\n}\n\n/** Google search entry point. */\nexport declare interface SearchEntryPoint {\n /** Optional. Web content snippet that can be embedded in a web page or an app webview. */\n renderedContent?: string;\n /** Optional. Base64 encoded JSON representing array of tuple. */\n sdkBlob?: string;\n}\n\n/** Metadata returned to client when grounding is enabled. */\nexport declare interface GroundingMetadata {\n /** List of supporting references retrieved from specified grounding source. */\n groundingChunks?: GroundingChunk[];\n /** Optional. List of grounding support. */\n groundingSupports?: GroundingSupport[];\n /** Optional. Output only. Retrieval metadata. */\n retrievalMetadata?: RetrievalMetadata;\n /** Optional. Queries executed by the retrieval tools. */\n retrievalQueries?: string[];\n /** Optional. Google search entry for the following-up web searches. */\n searchEntryPoint?: SearchEntryPoint;\n /** Optional. Web search queries for the following-up web search. */\n webSearchQueries?: string[];\n}\n\n/** Candidate for the logprobs token and score. */\nexport declare interface LogprobsResultCandidate {\n /** The candidate's log probability. */\n logProbability?: number;\n /** The candidate's token string value. */\n token?: string;\n /** The candidate's token id value. */\n tokenId?: number;\n}\n\n/** Candidates with top log probabilities at each decoding step. */\nexport declare interface LogprobsResultTopCandidates {\n /** Sorted by log probability in descending order. */\n candidates?: LogprobsResultCandidate[];\n}\n\n/** Logprobs Result */\nexport declare interface LogprobsResult {\n /** Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates. */\n chosenCandidates?: LogprobsResultCandidate[];\n /** Length = total number of decoding steps. */\n topCandidates?: LogprobsResultTopCandidates[];\n}\n\n/** Safety rating corresponding to the generated content. */\nexport declare interface SafetyRating {\n /** Output only. Indicates whether the content was filtered out because of this rating. */\n blocked?: boolean;\n /** Output only. Harm category. */\n category?: HarmCategory;\n /** Output only. Harm probability levels in the content. */\n probability?: HarmProbability;\n /** Output only. Harm probability score. */\n probabilityScore?: number;\n /** Output only. Harm severity levels in the content. */\n severity?: HarmSeverity;\n /** Output only. Harm severity score. */\n severityScore?: number;\n}\n\n/** A response candidate generated from the model. */\nexport declare interface Candidate {\n /** Contains the multi-part content of the response.\n */\n content?: Content;\n /** Source attribution of the generated content.\n */\n citationMetadata?: CitationMetadata;\n /** Describes the reason the model stopped generating tokens.\n */\n finishMessage?: string;\n /** Number of tokens for this candidate.\n */\n tokenCount?: number;\n /** The reason why the model stopped generating tokens.\n If empty, the model has not stopped generating the tokens.\n */\n finishReason?: FinishReason;\n /** Output only. Average log probability score of the candidate. */\n avgLogprobs?: number;\n /** Output only. Metadata specifies sources used to ground generated content. */\n groundingMetadata?: GroundingMetadata;\n /** Output only. Index of the candidate. */\n index?: number;\n /** Output only. Log-likelihood scores for the response tokens and top tokens */\n logprobsResult?: LogprobsResult;\n /** Output only. List of ratings for the safety of a response candidate. There is at most one rating per category. */\n safetyRatings?: SafetyRating[];\n}\n\n/** Content filter results for a prompt sent in the request. */\nexport class GenerateContentResponsePromptFeedback {\n /** Output only. Blocked reason. */\n blockReason?: BlockedReason;\n /** Output only. A readable block reason message. */\n blockReasonMessage?: string;\n /** Output only. Safety ratings. */\n safetyRatings?: SafetyRating[];\n}\n\n/** Represents token counting info for a single modality. */\nexport declare interface ModalityTokenCount {\n /** The modality associated with this token count. */\n modality?: MediaModality;\n /** Number of tokens. */\n tokenCount?: number;\n}\n\n/** Usage metadata about response(s). */\nexport class GenerateContentResponseUsageMetadata {\n /** Output only. List of modalities of the cached content in the request input. */\n cacheTokensDetails?: ModalityTokenCount[];\n /** Output only. Number of tokens in the cached part in the input (the cached content). */\n cachedContentTokenCount?: number;\n /** Number of tokens in the response(s). */\n candidatesTokenCount?: number;\n /** Output only. List of modalities that were returned in the response. */\n candidatesTokensDetails?: ModalityTokenCount[];\n /** Number of tokens in the request. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */\n promptTokenCount?: number;\n /** Output only. List of modalities that were processed in the request input. */\n promptTokensDetails?: ModalityTokenCount[];\n /** Output only. Number of tokens present in thoughts output. */\n thoughtsTokenCount?: number;\n /** Output only. Number of tokens present in tool-use prompt(s). */\n toolUsePromptTokenCount?: number;\n /** Output only. List of modalities that were processed for tool-use request inputs. */\n toolUsePromptTokensDetails?: ModalityTokenCount[];\n /** Total token count for prompt, response candidates, and tool-use prompts (if present). */\n totalTokenCount?: number;\n /** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */\n trafficType?: TrafficType;\n}\n\n/** Response message for PredictionService.GenerateContent. */\nexport class GenerateContentResponse {\n /** Response variations returned by the model.\n */\n candidates?: Candidate[];\n /** Timestamp when the request is made to the server.\n */\n createTime?: string;\n /** Identifier for each response.\n */\n responseId?: string;\n /** Output only. The model version used to generate the response. */\n modelVersion?: string;\n /** Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations. */\n promptFeedback?: GenerateContentResponsePromptFeedback;\n /** Usage metadata about the response(s). */\n usageMetadata?: GenerateContentResponseUsageMetadata;\n /**\n * Returns the concatenation of all text parts from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the text from the first\n * one will be returned.\n * If there are non-text parts in the response, the concatenation of all text\n * parts will be returned, and a warning will be logged.\n * If there are thought parts in the response, the concatenation of all text\n * parts excluding the thought parts will be returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'Why is the sky blue?',\n * });\n *\n * console.debug(response.text);\n * ```\n */\n get text(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning text from the first one.',\n );\n }\n let text = '';\n let anyTextPartText = false;\n const nonTextParts = [];\n for (const part of this.candidates?.[0]?.content?.parts ?? []) {\n for (const [fieldName, fieldValue] of Object.entries(part)) {\n if (\n fieldName !== 'text' &&\n fieldName !== 'thought' &&\n (fieldValue !== null || fieldValue !== undefined)\n ) {\n nonTextParts.push(fieldName);\n }\n }\n if (typeof part.text === 'string') {\n if (typeof part.thought === 'boolean' && part.thought) {\n continue;\n }\n anyTextPartText = true;\n text += part.text;\n }\n }\n if (nonTextParts.length > 0) {\n console.warn(\n `there are non-text parts ${nonTextParts} in the response, returning concatenation of all text parts. Please refer to the non text parts for a full response from model.`,\n );\n }\n // part.text === '' is different from part.text is null\n return anyTextPartText ? text : undefined;\n }\n\n /**\n * Returns the function calls from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the function calls from\n * the first one will be returned.\n * If there are no function calls in the response, undefined will be returned.\n *\n * @example\n * ```ts\n * const controlLightFunctionDeclaration: FunctionDeclaration = {\n * name: 'controlLight',\n * parameters: {\n * type: Type.OBJECT,\n * description: 'Set the brightness and color temperature of a room light.',\n * properties: {\n * brightness: {\n * type: Type.NUMBER,\n * description:\n * 'Light level from 0 to 100. Zero is off and 100 is full brightness.',\n * },\n * colorTemperature: {\n * type: Type.STRING,\n * description:\n * 'Color temperature of the light fixture which can be `daylight`, `cool` or `warm`.',\n * },\n * },\n * required: ['brightness', 'colorTemperature'],\n * };\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents: 'Dim the lights so the room feels cozy and warm.',\n * config: {\n * tools: [{functionDeclarations: [controlLightFunctionDeclaration]}],\n * toolConfig: {\n * functionCallingConfig: {\n * mode: FunctionCallingConfigMode.ANY,\n * allowedFunctionNames: ['controlLight'],\n * },\n * },\n * },\n * });\n * console.debug(JSON.stringify(response.functionCalls));\n * ```\n */\n get functionCalls(): FunctionCall[] | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning function calls from the first one.',\n );\n }\n const functionCalls = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.functionCall)\n .map((part) => part.functionCall)\n .filter(\n (functionCall): functionCall is FunctionCall =>\n functionCall !== undefined,\n );\n if (functionCalls?.length === 0) {\n return undefined;\n }\n return functionCalls;\n }\n /**\n * Returns the first executable code from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the executable code from\n * the first one will be returned.\n * If there are no executable code in the response, undefined will be\n * returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.'\n * config: {\n * tools: [{codeExecution: {}}],\n * },\n * });\n *\n * console.debug(response.executableCode);\n * ```\n */\n get executableCode(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning executable code from the first one.',\n );\n }\n const executableCode = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.executableCode)\n .map((part) => part.executableCode)\n .filter(\n (executableCode): executableCode is ExecutableCode =>\n executableCode !== undefined,\n );\n if (executableCode?.length === 0) {\n return undefined;\n }\n\n return executableCode?.[0]?.code;\n }\n /**\n * Returns the first code execution result from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the code execution result from\n * the first one will be returned.\n * If there are no code execution result in the response, undefined will be returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.'\n * config: {\n * tools: [{codeExecution: {}}],\n * },\n * });\n *\n * console.debug(response.codeExecutionResult);\n * ```\n */\n get codeExecutionResult(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning code execution result from the first one.',\n );\n }\n const codeExecutionResult = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.codeExecutionResult)\n .map((part) => part.codeExecutionResult)\n .filter(\n (codeExecutionResult): codeExecutionResult is CodeExecutionResult =>\n codeExecutionResult !== undefined,\n );\n if (codeExecutionResult?.length === 0) {\n return undefined;\n }\n return codeExecutionResult?.[0]?.output;\n }\n}\n\nexport /** Optional parameters for the embed_content method. */\ndeclare interface EmbedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Type of task for which the embedding will be used.\n */\n taskType?: string;\n /** Title for the text. Only applicable when TaskType is\n `RETRIEVAL_DOCUMENT`.\n */\n title?: string;\n /** Reduced dimension for the output embedding. If set,\n excessive values in the output embedding are truncated from the end.\n Supported by newer models since 2024 only. You cannot set this value if\n using the earlier model (`models/embedding-001`).\n */\n outputDimensionality?: number;\n /** Vertex API only. The MIME type of the input.\n */\n mimeType?: string;\n /** Vertex API only. Whether to silently truncate inputs longer than\n the max sequence length. If this option is set to false, oversized inputs\n will lead to an INVALID_ARGUMENT error, similar to other text APIs.\n */\n autoTruncate?: boolean;\n}\n\n/** Parameters for the embed_content method. */\nexport declare interface EmbedContentParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** The content to embed. Only the `parts.text` fields will be counted.\n */\n contents: ContentListUnion;\n /** Configuration that contains optional parameters.\n */\n config?: EmbedContentConfig;\n}\n\n/** Statistics of the input text associated with the result of content embedding. */\nexport declare interface ContentEmbeddingStatistics {\n /** Vertex API only. If the input text was truncated due to having\n a length longer than the allowed maximum input.\n */\n truncated?: boolean;\n /** Vertex API only. Number of tokens of the input text.\n */\n tokenCount?: number;\n}\n\n/** The embedding generated from an input content. */\nexport declare interface ContentEmbedding {\n /** A list of floats representing an embedding.\n */\n values?: number[];\n /** Vertex API only. Statistics of the input text associated with this\n embedding.\n */\n statistics?: ContentEmbeddingStatistics;\n}\n\n/** Request-level metadata for the Vertex Embed Content API. */\nexport declare interface EmbedContentMetadata {\n /** Vertex API only. The total number of billable characters included\n in the request.\n */\n billableCharacterCount?: number;\n}\n\n/** Response for the embed_content method. */\nexport class EmbedContentResponse {\n /** The embeddings for each request, in the same order as provided in\n the batch request.\n */\n embeddings?: ContentEmbedding[];\n /** Vertex API only. Metadata about the request.\n */\n metadata?: EmbedContentMetadata;\n}\n\n/** The config for generating an images. */\nexport declare interface GenerateImagesConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Cloud Storage URI used to store the generated images.\n */\n outputGcsUri?: string;\n /** Description of what to discourage in the generated images.\n */\n negativePrompt?: string;\n /** Number of images to generate.\n */\n numberOfImages?: number;\n /** Aspect ratio of the generated images.\n */\n aspectRatio?: string;\n /** Controls how much the model adheres to the text prompt. Large\n values increase output and prompt alignment, but may compromise image\n quality.\n */\n guidanceScale?: number;\n /** Random seed for image generation. This is not available when\n ``add_watermark`` is set to true.\n */\n seed?: number;\n /** Filter level for safety filtering.\n */\n safetyFilterLevel?: SafetyFilterLevel;\n /** Allows generation of people by the model.\n */\n personGeneration?: PersonGeneration;\n /** Whether to report the safety scores of each generated image and\n the positive prompt in the response.\n */\n includeSafetyAttributes?: boolean;\n /** Whether to include the Responsible AI filter reason if the image\n is filtered out of the response.\n */\n includeRaiReason?: boolean;\n /** Language of the text in the prompt.\n */\n language?: ImagePromptLanguage;\n /** MIME type of the generated image.\n */\n outputMimeType?: string;\n /** Compression quality of the generated image (for ``image/jpeg``\n only).\n */\n outputCompressionQuality?: number;\n /** Whether to add a watermark to the generated images.\n */\n addWatermark?: boolean;\n /** Whether to use the prompt rewriting logic.\n */\n enhancePrompt?: boolean;\n}\n\n/** The parameters for generating images. */\nexport declare interface GenerateImagesParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Text prompt that typically describes the images to output.\n */\n prompt: string;\n /** Configuration for generating images.\n */\n config?: GenerateImagesConfig;\n}\n\n/** An image. */\nexport declare interface Image {\n /** The Cloud Storage URI of the image. ``Image`` can contain a value\n for this field or the ``image_bytes`` field but not both.\n */\n gcsUri?: string;\n /** The image bytes data. ``Image`` can contain a value for this field\n or the ``gcs_uri`` field but not both.\n */\n imageBytes?: string;\n /** The MIME type of the image. */\n mimeType?: string;\n}\n\n/** Safety attributes of a GeneratedImage or the user-provided prompt. */\nexport declare interface SafetyAttributes {\n /** List of RAI categories.\n */\n categories?: string[];\n /** List of scores of each categories.\n */\n scores?: number[];\n /** Internal use only.\n */\n contentType?: string;\n}\n\n/** An output image. */\nexport declare interface GeneratedImage {\n /** The output image data.\n */\n image?: Image;\n /** Responsible AI filter reason if the image is filtered out of the\n response.\n */\n raiFilteredReason?: string;\n /** Safety attributes of the image. Lists of RAI categories and their\n scores of each content.\n */\n safetyAttributes?: SafetyAttributes;\n /** The rewritten prompt used for the image generation if the prompt\n enhancer is enabled.\n */\n enhancedPrompt?: string;\n}\n\n/** The output images response. */\nexport class GenerateImagesResponse {\n /** List of generated images.\n */\n generatedImages?: GeneratedImage[];\n /** Safety attributes of the positive prompt. Only populated if\n ``include_safety_attributes`` is set to True.\n */\n positivePromptSafetyAttributes?: SafetyAttributes;\n}\n\n/** Optional parameters for models.get method. */\nexport declare interface GetModelConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\nexport declare interface GetModelParameters {\n model: string;\n /** Optional parameters for the request. */\n config?: GetModelConfig;\n}\n\n/** An endpoint where you deploy models. */\nexport declare interface Endpoint {\n /** Resource name of the endpoint. */\n name?: string;\n /** ID of the model that's deployed to the endpoint. */\n deployedModelId?: string;\n}\n\n/** A tuned machine learning model. */\nexport declare interface TunedModelInfo {\n /** ID of the base model that you want to tune. */\n baseModel?: string;\n /** Date and time when the base model was created. */\n createTime?: string;\n /** Date and time when the base model was last updated. */\n updateTime?: string;\n}\n\n/** A trained machine learning model. */\nexport declare interface Model {\n /** Resource name of the model. */\n name?: string;\n /** Display name of the model. */\n displayName?: string;\n /** Description of the model. */\n description?: string;\n /** Version ID of the model. A new version is committed when a new\n model version is uploaded or trained under an existing model ID. The\n version ID is an auto-incrementing decimal number in string\n representation. */\n version?: string;\n /** List of deployed models created from this base model. Note that a\n model could have been deployed to endpoints in different locations. */\n endpoints?: Endpoint[];\n /** Labels with user-defined metadata to organize your models. */\n labels?: Record;\n /** Information about the tuned model from the base model. */\n tunedModelInfo?: TunedModelInfo;\n /** The maximum number of input tokens that the model can handle. */\n inputTokenLimit?: number;\n /** The maximum number of output tokens that the model can generate. */\n outputTokenLimit?: number;\n /** List of actions that are supported by the model. */\n supportedActions?: string[];\n}\n\n/** Generation config. */\nexport declare interface GenerationConfig {\n /** Optional. If enabled, audio timestamp will be included in the request to the model. */\n audioTimestamp?: boolean;\n /** Optional. Number of candidates to generate. */\n candidateCount?: number;\n /** Optional. Frequency penalties. */\n frequencyPenalty?: number;\n /** Optional. Logit probabilities. */\n logprobs?: number;\n /** Optional. The maximum number of output tokens to generate per message. */\n maxOutputTokens?: number;\n /** Optional. If specified, the media resolution specified will be used. */\n mediaResolution?: MediaResolution;\n /** Optional. Positive penalties. */\n presencePenalty?: number;\n /** Optional. If true, export the logprobs results in response. */\n responseLogprobs?: boolean;\n /** Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature. */\n responseMimeType?: string;\n /** Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response. */\n responseSchema?: Schema;\n /** Optional. Routing configuration. */\n routingConfig?: GenerationConfigRoutingConfig;\n /** Optional. Seed. */\n seed?: number;\n /** Optional. Stop sequences. */\n stopSequences?: string[];\n /** Optional. Controls the randomness of predictions. */\n temperature?: number;\n /** Optional. If specified, top-k sampling will be used. */\n topK?: number;\n /** Optional. If specified, nucleus sampling will be used. */\n topP?: number;\n}\n\n/** Config for the count_tokens method. */\nexport declare interface CountTokensConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Instructions for the model to steer it toward better performance.\n */\n systemInstruction?: ContentUnion;\n /** Code that enables the system to interact with external systems to\n perform an action outside of the knowledge and scope of the model.\n */\n tools?: Tool[];\n /** Configuration that the model uses to generate the response. Not\n supported by the Gemini Developer API.\n */\n generationConfig?: GenerationConfig;\n}\n\n/** Parameters for counting tokens. */\nexport declare interface CountTokensParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Input content. */\n contents: ContentListUnion;\n /** Configuration for counting tokens. */\n config?: CountTokensConfig;\n}\n\n/** Response for counting tokens. */\nexport class CountTokensResponse {\n /** Total number of tokens. */\n totalTokens?: number;\n /** Number of tokens in the cached part of the prompt (the cached content). */\n cachedContentTokenCount?: number;\n}\n\n/** Optional parameters for computing tokens. */\nexport declare interface ComputeTokensConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for computing tokens. */\nexport declare interface ComputeTokensParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Input content. */\n contents: ContentListUnion;\n /** Optional parameters for the request.\n */\n config?: ComputeTokensConfig;\n}\n\n/** Tokens info with a list of tokens and the corresponding list of token ids. */\nexport declare interface TokensInfo {\n /** Optional. Optional fields for the role from the corresponding Content. */\n role?: string;\n /** A list of token ids from the input. */\n tokenIds?: string[];\n /** A list of tokens from the input. */\n tokens?: string[];\n}\n\n/** Response for computing tokens. */\nexport class ComputeTokensResponse {\n /** Lists of tokens info from the input. A ComputeTokensRequest could have multiple instances with a prompt in each instance. We also need to return lists of tokens info for the request with multiple instances. */\n tokensInfo?: TokensInfo[];\n}\n\n/** Configuration for generating videos. */\nexport declare interface GenerateVideosConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Number of output videos. */\n numberOfVideos?: number;\n /** The gcs bucket where to save the generated videos. */\n outputGcsUri?: string;\n /** Frames per second for video generation. */\n fps?: number;\n /** Duration of the clip for video generation in seconds. */\n durationSeconds?: number;\n /** The RNG seed. If RNG seed is exactly same for each request with unchanged inputs, the prediction results will be consistent. Otherwise, a random RNG seed will be used each time to produce a different result. */\n seed?: number;\n /** The aspect ratio for the generated video. 16:9 (landscape) and 9:16 (portrait) are supported. */\n aspectRatio?: string;\n /** The resolution for the generated video. 1280x720, 1920x1080 are supported. */\n resolution?: string;\n /** Whether allow to generate person videos, and restrict to specific ages. Supported values are: dont_allow, allow_adult. */\n personGeneration?: string;\n /** The pubsub topic where to publish the video generation progress. */\n pubsubTopic?: string;\n /** Optional field in addition to the text content. Negative prompts can be explicitly stated here to help generate the video. */\n negativePrompt?: string;\n /** Whether to use the prompt rewriting logic. */\n enhancePrompt?: boolean;\n}\n\n/** Class that represents the parameters for generating an image. */\nexport declare interface GenerateVideosParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** The text prompt for generating the videos. Optional for image to video use cases. */\n prompt?: string;\n /** The input image for generating the videos.\n Optional if prompt is provided. */\n image?: Image;\n /** Configuration for generating videos. */\n config?: GenerateVideosConfig;\n}\n\n/** A generated video. */\nexport declare interface Video {\n /** Path to another storage. */\n uri?: string;\n /** Video bytes. */\n videoBytes?: string;\n /** Video encoding, for example \"video/mp4\". */\n mimeType?: string;\n}\n\n/** A generated video. */\nexport declare interface GeneratedVideo {\n /** The output video */\n video?: Video;\n}\n\n/** Response with generated videos. */\nexport class GenerateVideosResponse {\n /** List of the generated videos */\n generatedVideos?: GeneratedVideo[];\n /** Returns if any videos were filtered due to RAI policies. */\n raiMediaFilteredCount?: number;\n /** Returns rai failure reasons if any. */\n raiMediaFilteredReasons?: string[];\n}\n\n/** A video generation operation. */\nexport declare interface GenerateVideosOperation {\n /** The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. */\n name?: string;\n /** Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. */\n metadata?: Record;\n /** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */\n done?: boolean;\n /** The error result of the operation in case of failure or cancellation. */\n error?: Record;\n /** The generated videos. */\n response?: GenerateVideosResponse;\n}\n\n/** Optional configuration for cached content creation. */\nexport declare interface CreateCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: \"3.5s\". */\n ttl?: string;\n /** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */\n expireTime?: string;\n /** The user-generated meaningful display name of the cached content.\n */\n displayName?: string;\n /** The content to cache.\n */\n contents?: ContentListUnion;\n /** Developer set system instruction.\n */\n systemInstruction?: ContentUnion;\n /** A list of `Tools` the model may use to generate the next response.\n */\n tools?: Tool[];\n /** Configuration for the tools to use. This config is shared for all tools.\n */\n toolConfig?: ToolConfig;\n}\n\n/** Parameters for caches.create method. */\nexport declare interface CreateCachedContentParameters {\n /** ID of the model to use. Example: gemini-1.5-flash */\n model: string;\n /** Configuration that contains optional parameters.\n */\n config?: CreateCachedContentConfig;\n}\n\n/** Metadata on the usage of the cached content. */\nexport declare interface CachedContentUsageMetadata {\n /** Duration of audio in seconds. */\n audioDurationSeconds?: number;\n /** Number of images. */\n imageCount?: number;\n /** Number of text characters. */\n textCount?: number;\n /** Total number of tokens that the cached content consumes. */\n totalTokenCount?: number;\n /** Duration of video in seconds. */\n videoDurationSeconds?: number;\n}\n\n/** A resource used in LLM queries for users to explicitly specify what to cache. */\nexport declare interface CachedContent {\n /** The server-generated resource name of the cached content. */\n name?: string;\n /** The user-generated meaningful display name of the cached content. */\n displayName?: string;\n /** The name of the publisher model to use for cached content. */\n model?: string;\n /** Creation time of the cache entry. */\n createTime?: string;\n /** When the cache entry was last updated in UTC time. */\n updateTime?: string;\n /** Expiration time of the cached content. */\n expireTime?: string;\n /** Metadata on the usage of the cached content. */\n usageMetadata?: CachedContentUsageMetadata;\n}\n\n/** Optional parameters for caches.get method. */\nexport declare interface GetCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for caches.get method. */\nexport declare interface GetCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Optional parameters for the request.\n */\n config?: GetCachedContentConfig;\n}\n\n/** Optional parameters for caches.delete method. */\nexport declare interface DeleteCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for caches.delete method. */\nexport declare interface DeleteCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Optional parameters for the request.\n */\n config?: DeleteCachedContentConfig;\n}\n\n/** Empty response for caches.delete method. */\nexport class DeleteCachedContentResponse {}\n\n/** Optional parameters for caches.update method. */\nexport declare interface UpdateCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: \"3.5s\". */\n ttl?: string;\n /** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */\n expireTime?: string;\n}\n\nexport declare interface UpdateCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Configuration that contains optional parameters.\n */\n config?: UpdateCachedContentConfig;\n}\n\n/** Config for caches.list method. */\nexport declare interface ListCachedContentsConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n pageSize?: number;\n pageToken?: string;\n}\n\n/** Parameters for caches.list method. */\nexport declare interface ListCachedContentsParameters {\n /** Configuration that contains optional parameters.\n */\n config?: ListCachedContentsConfig;\n}\n\nexport class ListCachedContentsResponse {\n nextPageToken?: string;\n /** List of cached contents.\n */\n cachedContents?: CachedContent[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface ListFilesConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n pageSize?: number;\n pageToken?: string;\n}\n\n/** Generates the parameters for the list method. */\nexport declare interface ListFilesParameters {\n /** Used to override the default configuration. */\n config?: ListFilesConfig;\n}\n\n/** Status of a File that uses a common error model. */\nexport declare interface FileStatus {\n /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */\n details?: Record[];\n /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */\n message?: string;\n /** The status code. 0 for OK, 1 for CANCELLED */\n code?: number;\n}\n\n/** A file uploaded to the API. */\nexport declare interface File {\n /** The `File` resource name. The ID (name excluding the \"files/\" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be generated. Example: `files/123-456` */\n name?: string;\n /** Optional. The human-readable display name for the `File`. The display name must be no more than 512 characters in length, including spaces. Example: 'Welcome Image' */\n displayName?: string;\n /** Output only. MIME type of the file. */\n mimeType?: string;\n /** Output only. Size of the file in bytes. */\n sizeBytes?: string;\n /** Output only. The timestamp of when the `File` was created. */\n createTime?: string;\n /** Output only. The timestamp of when the `File` will be deleted. Only set if the `File` is scheduled to expire. */\n expirationTime?: string;\n /** Output only. The timestamp of when the `File` was last updated. */\n updateTime?: string;\n /** Output only. SHA-256 hash of the uploaded bytes. The hash value is encoded in base64 format. */\n sha256Hash?: string;\n /** Output only. The URI of the `File`. */\n uri?: string;\n /** Output only. The URI of the `File`, only set for downloadable (generated) files. */\n downloadUri?: string;\n /** Output only. Processing state of the File. */\n state?: FileState;\n /** Output only. The source of the `File`. */\n source?: FileSource;\n /** Output only. Metadata for a video. */\n videoMetadata?: Record;\n /** Output only. Error status if File processing failed. */\n error?: FileStatus;\n}\n\n/** Response for the list files method. */\nexport class ListFilesResponse {\n /** A token to retrieve next page of results. */\n nextPageToken?: string;\n /** The list of files. */\n files?: File[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface CreateFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the private _create method. */\nexport declare interface CreateFileParameters {\n /** The file to be uploaded.\n mime_type: (Required) The MIME type of the file. Must be provided.\n name: (Optional) The name of the file in the destination (e.g.\n 'files/sample-image').\n display_name: (Optional) The display name of the file.\n */\n file: File;\n /** Used to override the default configuration. */\n config?: CreateFileConfig;\n}\n\n/** A wrapper class for the http response. */\nexport class HttpResponse {\n /** Used to retain the processed HTTP headers in the response. */\n headers?: Record;\n /**\n * The original http response.\n */\n responseInternal: Response;\n\n constructor(response: Response) {\n // Process the headers.\n const headers: Record = {};\n for (const pair of response.headers.entries()) {\n headers[pair[0]] = pair[1];\n }\n this.headers = headers;\n\n // Keep the original response.\n this.responseInternal = response;\n }\n\n json(): Promise {\n return this.responseInternal.json();\n }\n}\n\n/** Callbacks for the live API. */\nexport interface LiveCallbacks {\n /**\n * Called when the websocket connection is established.\n */\n onopen?: (() => void) | null;\n /**\n * Called when a message is received from the server.\n */\n onmessage: (e: LiveServerMessage) => void;\n /**\n * Called when an error occurs.\n */\n onerror?: ((e: ErrorEvent) => void) | null;\n /**\n * Called when the websocket connection is closed.\n */\n onclose?: ((e: CloseEvent) => void) | null;\n}\n\n/** Parameters for the upload file method. */\nexport interface UploadFileParameters {\n /** The string path to the file to be uploaded or a Blob object. */\n file: string | globalThis.Blob;\n /** Configuration that contains optional parameters. */\n config?: UploadFileConfig;\n}\n/** Response for the create file method. */\nexport class CreateFileResponse {\n /** Used to retain the full HTTP response. */\n sdkHttpResponse?: HttpResponse;\n}\n\n/** Used to override the default configuration. */\nexport declare interface GetFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the get method. */\nexport declare interface GetFileParameters {\n /** The name identifier for the file to retrieve. */\n name: string;\n /** Used to override the default configuration. */\n config?: GetFileConfig;\n}\n\n/** Used to override the default configuration. */\nexport declare interface DeleteFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the get method. */\nexport declare interface DeleteFileParameters {\n /** The name identifier for the file to be deleted. */\n name: string;\n /** Used to override the default configuration. */\n config?: DeleteFileConfig;\n}\n\n/** Response for the delete file method. */\nexport class DeleteFileResponse {}\n\nexport declare interface GetOperationConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for the GET method. */\nexport declare interface GetOperationParameters {\n /** The server-assigned name for the operation. */\n operationName: string;\n /** Used to override the default configuration. */\n config?: GetOperationConfig;\n}\n\nexport declare interface FetchPredictOperationConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for the fetchPredictOperation method. */\nexport declare interface FetchPredictOperationParameters {\n /** The server-assigned name for the operation. */\n operationName: string;\n resourceName: string;\n /** Used to override the default configuration. */\n config?: FetchPredictOperationConfig;\n}\n\nexport declare interface TestTableItem {\n /** The name of the test. This is used to derive the replay id. */\n name?: string;\n /** The parameters to the test. Use pydantic models. */\n parameters?: Record;\n /** Expects an exception for MLDev matching the string. */\n exceptionIfMldev?: string;\n /** Expects an exception for Vertex matching the string. */\n exceptionIfVertex?: string;\n /** Use if you don't want to use the default replay id which is derived from the test name. */\n overrideReplayId?: string;\n /** True if the parameters contain an unsupported union type. This test will be skipped for languages that do not support the union type. */\n hasUnion?: boolean;\n /** When set to a reason string, this test will be skipped in the API mode. Use this flag for tests that can not be reproduced with the real API. E.g. a test that deletes a resource. */\n skipInApiMode?: string;\n /** Keys to ignore when comparing the request and response. This is useful for tests that are not deterministic. */\n ignoreKeys?: string[];\n}\n\nexport declare interface TestTableFile {\n comment?: string;\n testMethod?: string;\n parameterNames?: string[];\n testTable?: TestTableItem[];\n}\n\n/** Represents a single request in a replay. */\nexport declare interface ReplayRequest {\n method?: string;\n url?: string;\n headers?: Record;\n bodySegments?: Record[];\n}\n\n/** Represents a single response in a replay. */\nexport class ReplayResponse {\n statusCode?: number;\n headers?: Record;\n bodySegments?: Record[];\n sdkResponseSegments?: Record[];\n}\n\n/** Represents a single interaction, request and response in a replay. */\nexport declare interface ReplayInteraction {\n request?: ReplayRequest;\n response?: ReplayResponse;\n}\n\n/** Represents a recorded session. */\nexport declare interface ReplayFile {\n replayId?: string;\n interactions?: ReplayInteraction[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface UploadFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The name of the file in the destination (e.g., 'files/sample-image'. If not provided one will be generated. */\n name?: string;\n /** mime_type: The MIME type of the file. If not provided, it will be inferred from the file extension. */\n mimeType?: string;\n /** Optional display name of the file. */\n displayName?: string;\n}\n\n/** Used to override the default configuration. */\nexport declare interface DownloadFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Configuration for upscaling an image.\n\n For more information on this configuration, refer to\n the `Imagen API reference documentation\n `_.\n */\nexport declare interface UpscaleImageConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Whether to include a reason for filtered-out images in the\n response. */\n includeRaiReason?: boolean;\n /** The image format that the output should be saved as. */\n outputMimeType?: string;\n /** The level of compression if the ``output_mime_type`` is\n ``image/jpeg``. */\n outputCompressionQuality?: number;\n}\n\n/** User-facing config UpscaleImageParameters. */\nexport declare interface UpscaleImageParameters {\n /** The model to use. */\n model: string;\n /** The input image to upscale. */\n image: Image;\n /** The factor to upscale the image (x2 or x4). */\n upscaleFactor: string;\n /** Configuration for upscaling. */\n config?: UpscaleImageConfig;\n}\n\n/** A raw reference image.\n\n A raw reference image represents the base image to edit, provided by the user.\n It can optionally be provided in addition to a mask reference image or\n a style reference image.\n */\nexport declare interface RawReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n}\n\n/** Configuration for a Mask reference image. */\nexport declare interface MaskReferenceConfig {\n /** Prompts the model to generate a mask instead of you needing to\n provide one (unless MASK_MODE_USER_PROVIDED is used). */\n maskMode?: MaskReferenceMode;\n /** A list of up to 5 class ids to use for semantic segmentation.\n Automatically creates an image mask based on specific objects. */\n segmentationClasses?: number[];\n /** Dilation percentage of the mask provided.\n Float between 0 and 1. */\n maskDilation?: number;\n}\n\n/** A mask reference image.\n\n This encapsulates either a mask image provided by the user and configs for\n the user provided mask, or only config parameters for the model to generate\n a mask.\n\n A mask image is an image whose non-zero values indicate where to edit the base\n image. If the user provides a mask image, the mask must be in the same\n dimensions as the raw image.\n */\nexport declare interface MaskReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the mask reference image. */\n config?: MaskReferenceConfig;\n}\n\n/** Configuration for a Control reference image. */\nexport declare interface ControlReferenceConfig {\n /** The type of control reference image to use. */\n controlType?: ControlReferenceType;\n /** Defaults to False. When set to True, the control image will be\n computed by the model based on the control type. When set to False,\n the control image must be provided by the user. */\n enableControlImageComputation?: boolean;\n}\n\n/** A control reference image.\n\n The image of the control reference image is either a control image provided\n by the user, or a regular image which the backend will use to generate a\n control image of. In the case of the latter, the\n enable_control_image_computation field in the config should be set to True.\n\n A control image is an image that represents a sketch image of areas for the\n model to fill in based on the prompt.\n */\nexport declare interface ControlReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the control reference image. */\n config?: ControlReferenceConfig;\n}\n\n/** Configuration for a Style reference image. */\nexport declare interface StyleReferenceConfig {\n /** A text description of the style to use for the generated image. */\n styleDescription?: string;\n}\n\n/** A style reference image.\n\n This encapsulates a style reference image provided by the user, and\n additionally optional config parameters for the style reference image.\n\n A raw reference image can also be provided as a destination for the style to\n be applied to.\n */\nexport declare interface StyleReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the style reference image. */\n config?: StyleReferenceConfig;\n}\n\n/** Configuration for a Subject reference image. */\nexport declare interface SubjectReferenceConfig {\n /** The subject type of a subject reference image. */\n subjectType?: SubjectReferenceType;\n /** Subject description for the image. */\n subjectDescription?: string;\n}\n\n/** A subject reference image.\n\n This encapsulates a subject reference image provided by the user, and\n additionally optional config parameters for the subject reference image.\n\n A raw reference image can also be provided as a destination for the subject to\n be applied to.\n */\nexport declare interface SubjectReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the subject reference image. */\n config?: SubjectReferenceConfig;\n}\n\n/** Sent in response to a `LiveGenerateContentSetup` message from the client. */\nexport declare interface LiveServerSetupComplete {}\n\n/** Incremental server update generated by the model in response to client messages.\n\n Content is generated as quickly as possible, and not in real time. Clients\n may choose to buffer and play it out in real time.\n */\nexport declare interface LiveServerContent {\n /** The content that the model has generated as part of the current conversation with the user. */\n modelTurn?: Content;\n /** If true, indicates that the model is done generating. Generation will only start in response to additional client messages. Can be set alongside `content`, indicating that the `content` is the last in the turn. */\n turnComplete?: boolean;\n /** If true, indicates that a client message has interrupted current model generation. If the client is playing out the content in realtime, this is a good signal to stop and empty the current queue. */\n interrupted?: boolean;\n /** If true, indicates that the model is done generating. When model is\n interrupted while generating there will be no generation_complete message\n in interrupted turn, it will go through interrupted > turn_complete.\n When model assumes realtime playback there will be delay between\n generation_complete and turn_complete that is caused by model\n waiting for playback to finish. If true, indicates that the model\n has finished generating all content. This is a signal to the client\n that it can stop sending messages. */\n generationComplete?: boolean;\n}\n\n/** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */\nexport declare interface LiveServerToolCall {\n /** The function call to be executed. */\n functionCalls?: FunctionCall[];\n}\n\n/** Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled.\n\n If there were side-effects to those tool calls, clients may attempt to undo\n the tool calls. This message occurs only in cases where the clients interrupt\n server turns.\n */\nexport declare interface LiveServerToolCallCancellation {\n /** The ids of the tool calls to be cancelled. */\n ids?: string[];\n}\n\n/** Usage metadata about response(s). */\nexport declare interface UsageMetadata {\n /** Number of tokens in the prompt. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */\n promptTokenCount?: number;\n /** Number of tokens in the cached part of the prompt (the cached content). */\n cachedContentTokenCount?: number;\n /** Total number of tokens across all the generated response candidates. */\n responseTokenCount?: number;\n /** Number of tokens present in tool-use prompt(s). */\n toolUsePromptTokenCount?: number;\n /** Number of tokens of thoughts for thinking models. */\n thoughtsTokenCount?: number;\n /** Total token count for prompt, response candidates, and tool-use prompts(if present). */\n totalTokenCount?: number;\n /** List of modalities that were processed in the request input. */\n promptTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were processed in the cache input. */\n cacheTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were returned in the response. */\n responseTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were processed in the tool-use prompt. */\n toolUsePromptTokensDetails?: ModalityTokenCount[];\n /** Traffic type. This shows whether a request consumes Pay-As-You-Go\n or Provisioned Throughput quota. */\n trafficType?: TrafficType;\n}\n\n/** Server will not be able to service client soon. */\nexport declare interface LiveServerGoAway {\n /** The remaining time before the connection will be terminated as ABORTED. The minimal time returned here is specified differently together with the rate limits for a given model. */\n timeLeft?: string;\n}\n\n/** Update of the session resumption state.\n\n Only sent if `session_resumption` was set in the connection config.\n */\nexport declare interface LiveServerSessionResumptionUpdate {\n /** New handle that represents state that can be resumed. Empty if `resumable`=false. */\n newHandle?: string;\n /** True if session can be resumed at this point. It might be not possible to resume session at some points. In that case we send update empty new_handle and resumable=false. Example of such case could be model executing function calls or just generating. Resuming session (using previous session token) in such state will result in some data loss. */\n resumable?: boolean;\n /** Index of last message sent by client that is included in state represented by this SessionResumptionToken. Only sent when `SessionResumptionConfig.transparent` is set.\n\nPresence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `SessionResmumptionTokenUpdate`. This field will enable them to limit buffering (avoid keeping all requests in RAM).\n\nNote: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames arelikely not needed. */\n lastConsumedClientMessageIndex?: string;\n}\n\n/** Response message for API call. */\nexport declare interface LiveServerMessage {\n /** Sent in response to a `LiveClientSetup` message from the client. */\n setupComplete?: LiveServerSetupComplete;\n /** Content generated by the model in response to client messages. */\n serverContent?: LiveServerContent;\n /** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */\n toolCall?: LiveServerToolCall;\n /** Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled. */\n toolCallCancellation?: LiveServerToolCallCancellation;\n /** Usage metadata about model response(s). */\n usageMetadata?: UsageMetadata;\n /** Server will disconnect soon. */\n goAway?: LiveServerGoAway;\n /** Update of the session resumption state. */\n sessionResumptionUpdate?: LiveServerSessionResumptionUpdate;\n}\n\n/** Configures automatic detection of activity. */\nexport declare interface AutomaticActivityDetection {\n /** If enabled, detected voice and text input count as activity. If disabled, the client must send activity signals. */\n disabled?: boolean;\n /** Determines how likely speech is to be detected. */\n startOfSpeechSensitivity?: StartSensitivity;\n /** Determines how likely detected speech is ended. */\n endOfSpeechSensitivity?: EndSensitivity;\n /** The required duration of detected speech before start-of-speech is committed. The lower this value the more sensitive the start-of-speech detection is and the shorter speech can be recognized. However, this also increases the probability of false positives. */\n prefixPaddingMs?: number;\n /** The required duration of detected non-speech (e.g. silence) before end-of-speech is committed. The larger this value, the longer speech gaps can be without interrupting the user's activity but this will increase the model's latency. */\n silenceDurationMs?: number;\n}\n\n/** Marks the end of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface RealtimeInputConfig {\n /** If not set, automatic activity detection is enabled by default. If automatic voice detection is disabled, the client must send activity signals. */\n automaticActivityDetection?: AutomaticActivityDetection;\n /** Defines what effect activity has. */\n activityHandling?: ActivityHandling;\n /** Defines which input is included in the user's turn. */\n turnCoverage?: TurnCoverage;\n}\n\n/** Configuration of session resumption mechanism.\n\n Included in `LiveConnectConfig.session_resumption`. If included server\n will send `LiveServerSessionResumptionUpdate` messages.\n */\nexport declare interface SessionResumptionConfig {\n /** Session resumption handle of previous session (session to restore).\n\nIf not present new session will be started. */\n handle?: string;\n /** If set the server will send `last_consumed_client_message_index` in the `session_resumption_update` messages to allow for transparent reconnections. */\n transparent?: boolean;\n}\n\n/** Context window will be truncated by keeping only suffix of it.\n\n Context window will always be cut at start of USER role turn. System\n instructions and `BidiGenerateContentSetup.prefix_turns` will not be\n subject to the sliding window mechanism, they will always stay at the\n beginning of context window.\n */\nexport declare interface SlidingWindow {\n /** Session reduction target -- how many tokens we should keep. Window shortening operation has some latency costs, so we should avoid running it on every turn. Should be < trigger_tokens. If not set, trigger_tokens/2 is assumed. */\n targetTokens?: string;\n}\n\n/** Enables context window compression -- mechanism managing model context window so it does not exceed given length. */\nexport declare interface ContextWindowCompressionConfig {\n /** Number of tokens (before running turn) that triggers context window compression mechanism. */\n triggerTokens?: string;\n /** Sliding window compression mechanism. */\n slidingWindow?: SlidingWindow;\n}\n\n/** Message contains configuration that will apply for the duration of the streaming session. */\nexport declare interface LiveClientSetup {\n /** \n The fully qualified name of the publisher model or tuned model endpoint to\n use.\n */\n model?: string;\n /** The generation configuration for the session.\n Note: only a subset of fields are supported.\n */\n generationConfig?: GenerationConfig;\n /** The user provided system instructions for the model.\n Note: only text should be used in parts and content in each part will be\n in a separate paragraph. */\n systemInstruction?: Content;\n /** A list of `Tools` the model may use to generate the next response.\n\n A `Tool` is a piece of code that enables the system to interact with\n external systems to perform an action, or set of actions, outside of\n knowledge and scope of the model. */\n tools?: ToolListUnion;\n /** Configures the realtime input behavior in BidiGenerateContent. */\n realtimeInputConfig?: RealtimeInputConfig;\n /** Configures session resumption mechanism.\n\n If included server will send SessionResumptionUpdate messages. */\n sessionResumption?: SessionResumptionConfig;\n /** Configures context window compression mechanism.\n\n If included, server will compress context window to fit into given length. */\n contextWindowCompression?: ContextWindowCompressionConfig;\n}\n\n/** Incremental update of the current conversation delivered from the client.\n\n All the content here will unconditionally be appended to the conversation\n history and used as part of the prompt to the model to generate content.\n\n A message here will interrupt any current model generation.\n */\nexport declare interface LiveClientContent {\n /** The content appended to the current conversation with the model.\n\n For single-turn queries, this is a single instance. For multi-turn\n queries, this is a repeated field that contains conversation history and\n latest request.\n */\n turns?: Content[];\n /** If true, indicates that the server content generation should start with\n the currently accumulated prompt. Otherwise, the server will await\n additional messages before starting generation. */\n turnComplete?: boolean;\n}\n\n/** Marks the start of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface ActivityStart {}\n\n/** Marks the end of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface ActivityEnd {}\n\n/** User input that is sent in real time.\n\n This is different from `LiveClientContent` in a few ways:\n\n - Can be sent continuously without interruption to model generation.\n - If there is a need to mix data interleaved across the\n `LiveClientContent` and the `LiveClientRealtimeInput`, server attempts to\n optimize for best response, but there are no guarantees.\n - End of turn is not explicitly specified, but is rather derived from user\n activity (for example, end of speech).\n - Even before the end of turn, the data is processed incrementally\n to optimize for a fast start of the response from the model.\n - Is always assumed to be the user's input (cannot be used to populate\n conversation history).\n */\nexport declare interface LiveClientRealtimeInput {\n /** Inlined bytes data for media input. */\n mediaChunks?: Blob[];\n /** Marks the start of user activity. */\n activityStart?: ActivityStart;\n /** Marks the end of user activity. */\n activityEnd?: ActivityEnd;\n}\n\n/** Client generated response to a `ToolCall` received from the server.\n\n Individual `FunctionResponse` objects are matched to the respective\n `FunctionCall` objects by the `id` field.\n\n Note that in the unary and server-streaming GenerateContent APIs function\n calling happens by exchanging the `Content` parts, while in the bidi\n GenerateContent APIs function calling happens over this dedicated set of\n messages.\n */\nexport class LiveClientToolResponse {\n /** The response to the function calls. */\n functionResponses?: FunctionResponse[];\n}\n\n/** Messages sent by the client in the API call. */\nexport declare interface LiveClientMessage {\n /** Message to be sent by the system when connecting to the API. SDK users should not send this message. */\n setup?: LiveClientSetup;\n /** Incremental update of the current conversation delivered from the client. */\n clientContent?: LiveClientContent;\n /** User input that is sent in real time. */\n realtimeInput?: LiveClientRealtimeInput;\n /** Response to a `ToolCallMessage` received from the server. */\n toolResponse?: LiveClientToolResponse;\n}\n\n/** The audio transcription configuration in Setup. */\nexport declare interface AudioTranscriptionConfig {}\n\n/** Session config for the API connection. */\nexport declare interface LiveConnectConfig {\n /** The generation configuration for the session. */\n generationConfig?: GenerationConfig;\n /** The requested modalities of the response. Represents the set of\n modalities that the model can return. Defaults to AUDIO if not specified.\n */\n responseModalities?: Modality[];\n /** The speech generation configuration.\n */\n speechConfig?: SpeechConfig;\n /** The user provided system instructions for the model.\n Note: only text should be used in parts and content in each part will be\n in a separate paragraph. */\n systemInstruction?: Content;\n /** A list of `Tools` the model may use to generate the next response.\n\n A `Tool` is a piece of code that enables the system to interact with\n external systems to perform an action, or set of actions, outside of\n knowledge and scope of the model. */\n tools?: ToolListUnion;\n /** Configures session resumption mechanism.\n\nIf included the server will send SessionResumptionUpdate messages. */\n sessionResumption?: SessionResumptionConfig;\n /** Configures the realtime input behavior in BidiGenerateContent. */\n realtimeInputConfig?: RealtimeInputConfig;\n /** Configures context window compression mechanism.\n\n If included, server will compress context window to fit into given length. */\n contextWindowCompression?: ContextWindowCompressionConfig;\n}\n\n/** Parameters for connecting to the live API. */\nexport declare interface LiveConnectParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** callbacks */\n callbacks: LiveCallbacks;\n /** Optional configuration parameters for the request.\n */\n config?: LiveConnectConfig;\n}\n\n/** Parameters for initializing a new chat session.\n\n These parameters are used when creating a chat session with the\n `chats.create()` method.\n */\nexport declare interface CreateChatParameters {\n /** The name of the model to use for the chat session.\n\n For example: 'gemini-2.0-flash', 'gemini-1.5-pro', etc. See gemini API\n docs to find the available models.\n */\n model: string;\n /** Config for the entire chat session.\n\n This config applies to all requests within the session\n unless overridden by a per-request `config` in `SendMessageParameters`.\n */\n config?: GenerateContentConfig;\n /** The initial conversation history for the chat session.\n\n This allows you to start the chat with a pre-existing history. The history\n must be a list of `Content` alternating between 'user' and 'model' roles.\n It should start with a 'user' message.\n */\n history?: Content[];\n}\n\n/** Parameters for sending a message within a chat session.\n\n These parameters are used with the `chat.sendMessage()` method.\n */\nexport declare interface SendMessageParameters {\n /** The message to send to the model.\n\n The SDK will combine all parts into a single 'user' content to send to\n the model.\n */\n message: PartListUnion;\n /** Config for this specific request.\n\n Please note that the per-request config does not change the chat level\n config, nor inherit from it. If you intend to use some values from the\n chat's default config, you must explicitly copy them into this per-request\n config.\n */\n config?: GenerateContentConfig;\n}\n\n/** Parameters for sending client content to the live API. */\nexport declare interface LiveSendClientContentParameters {\n /** Client content to send to the session. */\n turns?: ContentListUnion;\n /** If true, indicates that the server content generation should start with\n the currently accumulated prompt. Otherwise, the server will await\n additional messages before starting generation. */\n turnComplete?: boolean;\n}\n\n/** Parameters for sending realtime input to the live API. */\nexport declare interface LiveSendRealtimeInputParameters {\n /** Realtime input to send to the session. */\n media: Blob;\n /** Marks the start of user activity. */\n activityStart?: ActivityStart;\n /** Marks the end of user activity. */\n activityEnd?: ActivityEnd;\n}\n\n/** Parameters for sending tool responses to the live API. */\nexport class LiveSendToolResponseParameters {\n /** Tool responses to send to the session. */\n functionResponses: FunctionResponse[] | FunctionResponse = [];\n}\n\n/** Parameters for the get method of the operations module. */\nexport declare interface OperationGetParameters {\n /** The operation to be retrieved. */\n operation: GenerateVideosOperation;\n /** Used to override the default configuration. */\n config?: GetOperationConfig;\n}\n\nexport type PartUnion = Part | string;\n\nexport type PartListUnion = PartUnion[] | PartUnion;\n\nexport type ContentUnion = Content | PartUnion[] | PartUnion;\n\nexport type ContentListUnion = ContentUnion[] | ContentUnion;\n\nexport type SchemaUnion = Schema;\n\nexport type SpeechConfigUnion = SpeechConfig | string;\n\nexport type ToolListUnion = Tool[];\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_caches_converters';\nimport {PagedItem, Pager} from './pagers';\nimport * as types from './types';\n\nexport class Caches extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Lists cached content configurations.\n *\n * @param params - The parameters for the list request.\n * @return The paginated results of the list of cached contents.\n *\n * @example\n * ```ts\n * const cachedContents = await ai.caches.list({config: {'pageSize': 2}});\n * for (const cachedContent of cachedContents) {\n * console.log(cachedContent);\n * }\n * ```\n */\n list = async (\n params: types.ListCachedContentsParameters = {},\n ): Promise> => {\n return new Pager(\n PagedItem.PAGED_ITEM_CACHED_CONTENTS,\n (x: types.ListCachedContentsParameters) => this.listInternal(x),\n await this.listInternal(params),\n params,\n );\n };\n\n /**\n * Creates a cached contents resource.\n *\n * @remarks\n * Context caching is only supported for specific models. See [Gemini\n * Developer API reference] (https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac)\n * and [Vertex AI reference] (https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models)\n * for more information.\n *\n * @param params - The parameters for the create request.\n * @return The created cached content.\n *\n * @example\n * ```ts\n * const contents = ...; // Initialize the content to cache.\n * const response = await ai.caches.create({\n * model: 'gemini-1.5-flash',\n * config: {\n * 'contents': contents,\n * 'displayName': 'test cache',\n * 'systemInstruction': 'What is the sum of the two pdfs?',\n * 'ttl': '86400s',\n * }\n * });\n * ```\n */\n async create(\n params: types.CreateCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.createCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.createCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n /**\n * Gets cached content configurations.\n *\n * @param params - The parameters for the get request.\n * @return The cached content.\n *\n * @example\n * ```ts\n * await ai.caches.get({name: 'gemini-1.5-flash'});\n * ```\n */\n async get(\n params: types.GetCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.getCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n /**\n * Deletes cached content.\n *\n * @param params - The parameters for the delete request.\n * @return The empty response returned by the API.\n *\n * @example\n * ```ts\n * await ai.caches.delete({name: 'gemini-1.5-flash'});\n * ```\n */\n async delete(\n params: types.DeleteCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.deleteCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteCachedContentResponseFromVertex();\n const typedResp = new types.DeleteCachedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.deleteCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteCachedContentResponseFromMldev();\n const typedResp = new types.DeleteCachedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Updates cached content configurations.\n *\n * @param params - The parameters for the update request.\n * @return The updated cached content.\n *\n * @example\n * ```ts\n * const response = await ai.caches.update({\n * name: 'gemini-1.5-flash',\n * config: {'ttl': '7600s'}\n * });\n * ```\n */\n async update(\n params: types.UpdateCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.updateCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'PATCH',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.updateCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'PATCH',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n private async listInternal(\n params: types.ListCachedContentsParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.listCachedContentsParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listCachedContentsResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListCachedContentsResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.listCachedContentsParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listCachedContentsResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListCachedContentsResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ApiClient} from './_api_client';\nimport * as t from './_transformers';\nimport {Models} from './models';\nimport * as types from './types';\n\n/**\n * Returns true if the response is valid, false otherwise.\n */\nfunction isValidResponse(response: types.GenerateContentResponse): boolean {\n if (response.candidates == undefined || response.candidates.length === 0) {\n return false;\n }\n const content = response.candidates[0]?.content;\n if (content === undefined) {\n return false;\n }\n return isValidContent(content);\n}\n\nfunction isValidContent(content: types.Content): boolean {\n if (content.parts === undefined || content.parts.length === 0) {\n return false;\n }\n for (const part of content.parts) {\n if (part === undefined || Object.keys(part).length === 0) {\n return false;\n }\n if (part.text !== undefined && part.text === '') {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Validates the history contains the correct roles.\n *\n * @remarks\n * Expects the history to start with a user turn and then alternate between\n * user and model turns.\n *\n * @throws Error if the history does not start with a user turn.\n * @throws Error if the history contains an invalid role.\n */\nfunction validateHistory(history: types.Content[]) {\n // Empty history is valid.\n if (history.length === 0) {\n return;\n }\n if (history[0].role !== 'user') {\n throw new Error('History must start with a user turn.');\n }\n for (const content of history) {\n if (content.role !== 'user' && content.role !== 'model') {\n throw new Error(`Role must be user or model, but got ${content.role}.`);\n }\n }\n}\n\n/**\n * Extracts the curated (valid) history from a comprehensive history.\n *\n * @remarks\n * The model may sometimes generate invalid or empty contents(e.g., due to safty\n * filters or recitation). Extracting valid turns from the history\n * ensures that subsequent requests could be accpeted by the model.\n */\nfunction extractCuratedHistory(\n comprehensiveHistory: types.Content[],\n): types.Content[] {\n if (comprehensiveHistory === undefined || comprehensiveHistory.length === 0) {\n return [];\n }\n const curatedHistory: types.Content[] = [];\n const length = comprehensiveHistory.length;\n let i = 0;\n let userInput = comprehensiveHistory[0];\n while (i < length) {\n if (comprehensiveHistory[i].role === 'user') {\n userInput = comprehensiveHistory[i];\n i++;\n } else {\n const modelOutput: types.Content[] = [];\n let isValid = true;\n while (i < length && comprehensiveHistory[i].role === 'model') {\n modelOutput.push(comprehensiveHistory[i]);\n if (isValid && !isValidContent(comprehensiveHistory[i])) {\n isValid = false;\n }\n i++;\n }\n if (isValid) {\n curatedHistory.push(userInput);\n curatedHistory.push(...modelOutput);\n }\n }\n }\n return curatedHistory;\n}\n\n/**\n * A utility class to create a chat session.\n */\nexport class Chats {\n private readonly modelsModule: Models;\n private readonly apiClient: ApiClient;\n\n constructor(modelsModule: Models, apiClient: ApiClient) {\n this.modelsModule = modelsModule;\n this.apiClient = apiClient;\n }\n\n /**\n * Creates a new chat session.\n *\n * @remarks\n * The config in the params will be used for all requests within the chat\n * session unless overridden by a per-request `config` in\n * @see {@link types.SendMessageParameters#config}.\n *\n * @param params - Parameters for creating a chat session.\n * @returns A new chat session.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({\n * model: 'gemini-2.0-flash'\n * config: {\n * temperature: 0.5,\n * maxOutputTokens: 1024,\n * }\n * });\n * ```\n */\n create(params: types.CreateChatParameters) {\n return new Chat(\n this.apiClient,\n this.modelsModule,\n params.model,\n params.config,\n params.history,\n );\n }\n}\n\n/**\n * Chat session that enables sending messages to the model with previous\n * conversation context.\n *\n * @remarks\n * The session maintains all the turns between user and model.\n */\nexport class Chat {\n // A promise to represent the current state of the message being sent to the\n // model.\n private sendPromise: Promise = Promise.resolve();\n\n constructor(\n private readonly apiClient: ApiClient,\n private readonly modelsModule: Models,\n private readonly model: string,\n private readonly config: types.GenerateContentConfig = {},\n private history: types.Content[] = [],\n ) {\n validateHistory(history);\n }\n\n /**\n * Sends a message to the model and returns the response.\n *\n * @remarks\n * This method will wait for the previous message to be processed before\n * sending the next message.\n *\n * @see {@link Chat#sendMessageStream} for streaming method.\n * @param params - parameters for sending messages within a chat session.\n * @returns The model's response.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({model: 'gemini-2.0-flash'});\n * const response = await chat.sendMessage({\n * message: 'Why is the sky blue?'\n * });\n * console.log(response.text);\n * ```\n */\n async sendMessage(\n params: types.SendMessageParameters,\n ): Promise {\n await this.sendPromise;\n const inputContent = t.tContent(this.apiClient, params.message);\n const responsePromise = this.modelsModule.generateContent({\n model: this.model,\n contents: this.getHistory(true).concat(inputContent),\n config: params.config ?? this.config,\n });\n this.sendPromise = (async () => {\n const response = await responsePromise;\n const outputContent = response.candidates?.[0]?.content;\n const modelOutput = outputContent ? [outputContent] : [];\n this.recordHistory(inputContent, modelOutput);\n return;\n })();\n await this.sendPromise;\n return responsePromise;\n }\n\n /**\n * Sends a message to the model and returns the response in chunks.\n *\n * @remarks\n * This method will wait for the previous message to be processed before\n * sending the next message.\n *\n * @see {@link Chat#sendMessage} for non-streaming method.\n * @param params - parameters for sending the message.\n * @return The model's response.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({model: 'gemini-2.0-flash'});\n * const response = await chat.sendMessageStream({\n * message: 'Why is the sky blue?'\n * });\n * for await (const chunk of response) {\n * console.log(chunk.text);\n * }\n * ```\n */\n async sendMessageStream(\n params: types.SendMessageParameters,\n ): Promise> {\n await this.sendPromise;\n const inputContent = t.tContent(this.apiClient, params.message);\n const streamResponse = this.modelsModule.generateContentStream({\n model: this.model,\n contents: this.getHistory(true).concat(inputContent),\n config: params.config ?? this.config,\n });\n this.sendPromise = streamResponse.then(() => undefined);\n const response = await streamResponse;\n const result = this.processStreamResponse(response, inputContent);\n return result;\n }\n\n /**\n * Returns the chat history.\n *\n * @remarks\n * The history is a list of contents alternating between user and model.\n *\n * There are two types of history:\n * - The `curated history` contains only the valid turns between user and\n * model, which will be included in the subsequent requests sent to the model.\n * - The `comprehensive history` contains all turns, including invalid or\n * empty model outputs, providing a complete record of the history.\n *\n * The history is updated after receiving the response from the model,\n * for streaming response, it means receiving the last chunk of the response.\n *\n * The `comprehensive history` is returned by default. To get the `curated\n * history`, set the `curated` parameter to `true`.\n *\n * @param curated - whether to return the curated history or the comprehensive\n * history.\n * @return History contents alternating between user and model for the entire\n * chat session.\n */\n getHistory(curated: boolean = false): types.Content[] {\n return curated ? extractCuratedHistory(this.history) : this.history;\n }\n\n private async *processStreamResponse(\n streamResponse: AsyncGenerator,\n inputContent: types.Content,\n ) {\n const outputContent: types.Content[] = [];\n for await (const chunk of streamResponse) {\n if (isValidResponse(chunk)) {\n const content = chunk.candidates?.[0]?.content;\n if (content !== undefined) {\n outputContent.push(content);\n }\n }\n yield chunk;\n }\n this.recordHistory(inputContent, outputContent);\n }\n\n private recordHistory(\n userInput: types.Content,\n modelOutput: types.Content[],\n ) {\n let outputContents: types.Content[] = [];\n if (\n modelOutput.length > 0 &&\n modelOutput.every((content) => content.role === 'model')\n ) {\n outputContents = modelOutput;\n } else {\n // Appends an empty content when model returns empty response, so that the\n // history is always alternating between user and model.\n outputContents.push({\n role: 'model',\n parts: [],\n } as types.Content);\n }\n this.history.push(userInput);\n this.history.push(...outputContents);\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function listFilesConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listFilesParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listFilesConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function fileStatusToMldev(\n apiClient: ApiClient,\n fromObject: types.FileStatus,\n): Record {\n const toObject: Record = {};\n\n const fromDetails = common.getValueByPath(fromObject, ['details']);\n if (fromDetails != null) {\n common.setValueByPath(toObject, ['details'], fromDetails);\n }\n\n const fromMessage = common.getValueByPath(fromObject, ['message']);\n if (fromMessage != null) {\n common.setValueByPath(toObject, ['message'], fromMessage);\n }\n\n const fromCode = common.getValueByPath(fromObject, ['code']);\n if (fromCode != null) {\n common.setValueByPath(toObject, ['code'], fromCode);\n }\n\n return toObject;\n}\n\nexport function fileToMldev(\n apiClient: ApiClient,\n fromObject: types.File,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n const fromSizeBytes = common.getValueByPath(fromObject, ['sizeBytes']);\n if (fromSizeBytes != null) {\n common.setValueByPath(toObject, ['sizeBytes'], fromSizeBytes);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromExpirationTime = common.getValueByPath(fromObject, [\n 'expirationTime',\n ]);\n if (fromExpirationTime != null) {\n common.setValueByPath(toObject, ['expirationTime'], fromExpirationTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromSha256Hash = common.getValueByPath(fromObject, ['sha256Hash']);\n if (fromSha256Hash != null) {\n common.setValueByPath(toObject, ['sha256Hash'], fromSha256Hash);\n }\n\n const fromUri = common.getValueByPath(fromObject, ['uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromDownloadUri = common.getValueByPath(fromObject, ['downloadUri']);\n if (fromDownloadUri != null) {\n common.setValueByPath(toObject, ['downloadUri'], fromDownloadUri);\n }\n\n const fromState = common.getValueByPath(fromObject, ['state']);\n if (fromState != null) {\n common.setValueByPath(toObject, ['state'], fromState);\n }\n\n const fromSource = common.getValueByPath(fromObject, ['source']);\n if (fromSource != null) {\n common.setValueByPath(toObject, ['source'], fromSource);\n }\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(\n toObject,\n ['error'],\n fileStatusToMldev(apiClient, fromError),\n );\n }\n\n return toObject;\n}\n\nexport function createFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromFile = common.getValueByPath(fromObject, ['file']);\n if (fromFile != null) {\n common.setValueByPath(toObject, ['file'], fileToMldev(apiClient, fromFile));\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function getFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'file'],\n t.tFileName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.DeleteFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'file'],\n t.tFileName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function fileStatusFromMldev(\n apiClient: ApiClient,\n fromObject: types.FileStatus,\n): Record {\n const toObject: Record = {};\n\n const fromDetails = common.getValueByPath(fromObject, ['details']);\n if (fromDetails != null) {\n common.setValueByPath(toObject, ['details'], fromDetails);\n }\n\n const fromMessage = common.getValueByPath(fromObject, ['message']);\n if (fromMessage != null) {\n common.setValueByPath(toObject, ['message'], fromMessage);\n }\n\n const fromCode = common.getValueByPath(fromObject, ['code']);\n if (fromCode != null) {\n common.setValueByPath(toObject, ['code'], fromCode);\n }\n\n return toObject;\n}\n\nexport function fileFromMldev(\n apiClient: ApiClient,\n fromObject: types.File,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n const fromSizeBytes = common.getValueByPath(fromObject, ['sizeBytes']);\n if (fromSizeBytes != null) {\n common.setValueByPath(toObject, ['sizeBytes'], fromSizeBytes);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromExpirationTime = common.getValueByPath(fromObject, [\n 'expirationTime',\n ]);\n if (fromExpirationTime != null) {\n common.setValueByPath(toObject, ['expirationTime'], fromExpirationTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromSha256Hash = common.getValueByPath(fromObject, ['sha256Hash']);\n if (fromSha256Hash != null) {\n common.setValueByPath(toObject, ['sha256Hash'], fromSha256Hash);\n }\n\n const fromUri = common.getValueByPath(fromObject, ['uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromDownloadUri = common.getValueByPath(fromObject, ['downloadUri']);\n if (fromDownloadUri != null) {\n common.setValueByPath(toObject, ['downloadUri'], fromDownloadUri);\n }\n\n const fromState = common.getValueByPath(fromObject, ['state']);\n if (fromState != null) {\n common.setValueByPath(toObject, ['state'], fromState);\n }\n\n const fromSource = common.getValueByPath(fromObject, ['source']);\n if (fromSource != null) {\n common.setValueByPath(toObject, ['source'], fromSource);\n }\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(\n toObject,\n ['error'],\n fileStatusFromMldev(apiClient, fromError),\n );\n }\n\n return toObject;\n}\n\nexport function listFilesResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromFiles = common.getValueByPath(fromObject, ['files']);\n if (fromFiles != null) {\n if (Array.isArray(fromFiles)) {\n common.setValueByPath(\n toObject,\n ['files'],\n fromFiles.map((item) => {\n return fileFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['files'], fromFiles);\n }\n }\n\n return toObject;\n}\n\nexport function createFileResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.CreateFileResponse,\n): Record {\n const toObject: Record = {};\n\n const fromHttpHeaders = common.getValueByPath(fromObject, ['httpHeaders']);\n if (fromHttpHeaders != null) {\n common.setValueByPath(toObject, ['httpHeaders'], fromHttpHeaders);\n }\n\n return toObject;\n}\n\nexport function deleteFileResponseFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_files_converters';\nimport {PagedItem, Pager} from './pagers';\nimport * as types from './types';\n\nexport class Files extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Lists all current project files from the service.\n *\n * @param params - The parameters for the list request\n * @return The paginated results of the list of files\n *\n * @example\n * The following code prints the names of all files from the service, the\n * size of each page is 10.\n *\n * ```ts\n * const listResponse = await ai.files.list({config: {'pageSize': 10}});\n * for await (const file of listResponse) {\n * console.log(file.name);\n * }\n * ```\n */\n list = async (\n params: types.ListFilesParameters = {},\n ): Promise> => {\n return new Pager(\n PagedItem.PAGED_ITEM_FILES,\n (x: types.ListFilesParameters) => this.listInternal(x),\n await this.listInternal(params),\n params,\n );\n };\n\n /**\n * Uploads a file asynchronously to the Gemini API.\n * This method is not available in Vertex AI.\n * Supported upload sources:\n * - Node.js: File path (string) or Blob object.\n * - Browser: Blob object (e.g., File).\n *\n * @remarks\n * The `mimeType` can be specified in the `config` parameter. If omitted:\n * - For file path (string) inputs, the `mimeType` will be inferred from the\n * file extension.\n * - For Blob object inputs, the `mimeType` will be set to the Blob's `type`\n * property.\n * Somex eamples for file extension to mimeType mapping:\n * .txt -> text/plain\n * .json -> application/json\n * .jpg -> image/jpeg\n * .png -> image/png\n * .mp3 -> audio/mpeg\n * .mp4 -> video/mp4\n *\n * This section can contain multiple paragraphs and code examples.\n *\n * @param params - Optional parameters specified in the\n * `types.UploadFileParameters` interface.\n * @see {@link types.UploadFileParameters#config} for the optional\n * config in the parameters.\n * @return A promise that resolves to a `types.File` object.\n * @throws An error if called on a Vertex AI client.\n * @throws An error if the `mimeType` is not provided and can not be inferred,\n * the `mimeType` can be provided in the `params.config` parameter.\n * @throws An error occurs if a suitable upload location cannot be established.\n *\n * @example\n * The following code uploads a file to Gemini API.\n *\n * ```ts\n * const file = await ai.files.upload({file: 'file.txt', config: {\n * mimeType: 'text/plain',\n * }});\n * console.log(file.name);\n * ```\n */\n async upload(params: types.UploadFileParameters): Promise {\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'Vertex AI does not support uploading files. You can share files through a GCS bucket.',\n );\n }\n\n return this.apiClient\n .uploadFile(params.file, params.config)\n .then((response) => {\n const file = converters.fileFromMldev(this.apiClient, response);\n return file as types.File;\n });\n }\n\n private async listInternal(\n params: types.ListFilesParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.listFilesParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap('files', body['_url'] as Record);\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listFilesResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListFilesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n private async createInternal(\n params: types.CreateFileParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.createFileParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'upload/v1beta/files',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.createFileResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.CreateFileResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Retrieves the file information from the service.\n *\n * @param params - The parameters for the get request\n * @return The Promise that resolves to the types.File object requested.\n *\n * @example\n * ```ts\n * const config: GetFileParameters = {\n * name: fileName,\n * };\n * file = await ai.files.get(config);\n * console.log(file.name);\n * ```\n */\n async get(params: types.GetFileParameters): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.getFileParametersToMldev(this.apiClient, params);\n path = common.formatMap(\n 'files/{file}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.fileFromMldev(this.apiClient, apiResponse);\n\n return resp as types.File;\n });\n }\n }\n\n /**\n * Deletes a remotely stored file.\n *\n * @param params - The parameters for the delete request.\n * @return The DeleteFileResponse, the response for the delete method.\n *\n * @example\n * The following code deletes an example file named \"files/mehozpxf877d\".\n *\n * ```ts\n * await ai.files.delete({name: file.name});\n * ```\n */\n async delete(\n params: types.DeleteFileParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.deleteFileParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'files/{file}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteFileResponseFromMldev();\n const typedResp = new types.DeleteFileResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function partToMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['videoMetadata']) !== undefined) {\n throw new Error('videoMetadata parameter is not supported in Gemini API.');\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToMldev(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['example']) !== undefined) {\n throw new Error('example parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['pattern']) !== undefined) {\n throw new Error('pattern parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['default']) !== undefined) {\n throw new Error('default parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxLength']) !== undefined) {\n throw new Error('maxLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minLength']) !== undefined) {\n throw new Error('minLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minProperties']) !== undefined) {\n throw new Error('minProperties parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxProperties']) !== undefined) {\n throw new Error('maxProperties parameter is not supported in Gemini API.');\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function safetySettingToMldev(\n apiClient: ApiClient,\n fromObject: types.SafetySetting,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['method']) !== undefined) {\n throw new Error('method parameter is not supported in Gemini API.');\n }\n\n const fromCategory = common.getValueByPath(fromObject, ['category']);\n if (fromCategory != null) {\n common.setValueByPath(toObject, ['category'], fromCategory);\n }\n\n const fromThreshold = common.getValueByPath(fromObject, ['threshold']);\n if (fromThreshold != null) {\n common.setValueByPath(toObject, ['threshold'], fromThreshold);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['response']) !== undefined) {\n throw new Error('response parameter is not supported in Gemini API.');\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToMldev(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToMldev(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n if (common.getValueByPath(fromObject, ['retrieval']) !== undefined) {\n throw new Error('retrieval parameter is not supported in Gemini API.');\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToMldev());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function prebuiltVoiceConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.PrebuiltVoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceName = common.getValueByPath(fromObject, ['voiceName']);\n if (fromVoiceName != null) {\n common.setValueByPath(toObject, ['voiceName'], fromVoiceName);\n }\n\n return toObject;\n}\n\nexport function voiceConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.VoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromPrebuiltVoiceConfig = common.getValueByPath(fromObject, [\n 'prebuiltVoiceConfig',\n ]);\n if (fromPrebuiltVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['prebuiltVoiceConfig'],\n prebuiltVoiceConfigToMldev(apiClient, fromPrebuiltVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function speechConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.SpeechConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceConfig = common.getValueByPath(fromObject, ['voiceConfig']);\n if (fromVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['voiceConfig'],\n voiceConfigToMldev(apiClient, fromVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function thinkingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ThinkingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromIncludeThoughts = common.getValueByPath(fromObject, [\n 'includeThoughts',\n ]);\n if (fromIncludeThoughts != null) {\n common.setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);\n }\n\n const fromThinkingBudget = common.getValueByPath(fromObject, [\n 'thinkingBudget',\n ]);\n if (fromThinkingBudget != null) {\n common.setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);\n }\n\n return toObject;\n}\n\nexport function generateContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTemperature = common.getValueByPath(fromObject, ['temperature']);\n if (fromTemperature != null) {\n common.setValueByPath(toObject, ['temperature'], fromTemperature);\n }\n\n const fromTopP = common.getValueByPath(fromObject, ['topP']);\n if (fromTopP != null) {\n common.setValueByPath(toObject, ['topP'], fromTopP);\n }\n\n const fromTopK = common.getValueByPath(fromObject, ['topK']);\n if (fromTopK != null) {\n common.setValueByPath(toObject, ['topK'], fromTopK);\n }\n\n const fromCandidateCount = common.getValueByPath(fromObject, [\n 'candidateCount',\n ]);\n if (fromCandidateCount != null) {\n common.setValueByPath(toObject, ['candidateCount'], fromCandidateCount);\n }\n\n const fromMaxOutputTokens = common.getValueByPath(fromObject, [\n 'maxOutputTokens',\n ]);\n if (fromMaxOutputTokens != null) {\n common.setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);\n }\n\n const fromStopSequences = common.getValueByPath(fromObject, [\n 'stopSequences',\n ]);\n if (fromStopSequences != null) {\n common.setValueByPath(toObject, ['stopSequences'], fromStopSequences);\n }\n\n const fromResponseLogprobs = common.getValueByPath(fromObject, [\n 'responseLogprobs',\n ]);\n if (fromResponseLogprobs != null) {\n common.setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);\n }\n\n const fromLogprobs = common.getValueByPath(fromObject, ['logprobs']);\n if (fromLogprobs != null) {\n common.setValueByPath(toObject, ['logprobs'], fromLogprobs);\n }\n\n const fromPresencePenalty = common.getValueByPath(fromObject, [\n 'presencePenalty',\n ]);\n if (fromPresencePenalty != null) {\n common.setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);\n }\n\n const fromFrequencyPenalty = common.getValueByPath(fromObject, [\n 'frequencyPenalty',\n ]);\n if (fromFrequencyPenalty != null) {\n common.setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (fromSeed != null) {\n common.setValueByPath(toObject, ['seed'], fromSeed);\n }\n\n const fromResponseMimeType = common.getValueByPath(fromObject, [\n 'responseMimeType',\n ]);\n if (fromResponseMimeType != null) {\n common.setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);\n }\n\n const fromResponseSchema = common.getValueByPath(fromObject, [\n 'responseSchema',\n ]);\n if (fromResponseSchema != null) {\n common.setValueByPath(\n toObject,\n ['responseSchema'],\n schemaToMldev(apiClient, t.tSchema(apiClient, fromResponseSchema)),\n );\n }\n\n if (common.getValueByPath(fromObject, ['routingConfig']) !== undefined) {\n throw new Error('routingConfig parameter is not supported in Gemini API.');\n }\n\n const fromSafetySettings = common.getValueByPath(fromObject, [\n 'safetySettings',\n ]);\n if (parentObject !== undefined && fromSafetySettings != null) {\n if (Array.isArray(fromSafetySettings)) {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings.map((item) => {\n return safetySettingToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings,\n );\n }\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToMldev(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToMldev(apiClient, fromToolConfig),\n );\n }\n\n if (common.getValueByPath(fromObject, ['labels']) !== undefined) {\n throw new Error('labels parameter is not supported in Gemini API.');\n }\n\n const fromCachedContent = common.getValueByPath(fromObject, [\n 'cachedContent',\n ]);\n if (parentObject !== undefined && fromCachedContent != null) {\n common.setValueByPath(\n parentObject,\n ['cachedContent'],\n t.tCachedContentName(apiClient, fromCachedContent),\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities != null) {\n common.setValueByPath(\n toObject,\n ['responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromMediaResolution = common.getValueByPath(fromObject, [\n 'mediaResolution',\n ]);\n if (fromMediaResolution != null) {\n common.setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig != null) {\n common.setValueByPath(\n toObject,\n ['speechConfig'],\n speechConfigToMldev(\n apiClient,\n t.tSpeechConfig(apiClient, fromSpeechConfig),\n ),\n );\n }\n\n if (common.getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {\n throw new Error('audioTimestamp parameter is not supported in Gemini API.');\n }\n\n const fromThinkingConfig = common.getValueByPath(fromObject, [\n 'thinkingConfig',\n ]);\n if (fromThinkingConfig != null) {\n common.setValueByPath(\n toObject,\n ['thinkingConfig'],\n thinkingConfigToMldev(apiClient, fromThinkingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function generateContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['generationConfig'],\n generateContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTaskType = common.getValueByPath(fromObject, ['taskType']);\n if (parentObject !== undefined && fromTaskType != null) {\n common.setValueByPath(\n parentObject,\n ['requests[]', 'taskType'],\n fromTaskType,\n );\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (parentObject !== undefined && fromTitle != null) {\n common.setValueByPath(parentObject, ['requests[]', 'title'], fromTitle);\n }\n\n const fromOutputDimensionality = common.getValueByPath(fromObject, [\n 'outputDimensionality',\n ]);\n if (parentObject !== undefined && fromOutputDimensionality != null) {\n common.setValueByPath(\n parentObject,\n ['requests[]', 'outputDimensionality'],\n fromOutputDimensionality,\n );\n }\n\n if (common.getValueByPath(fromObject, ['mimeType']) !== undefined) {\n throw new Error('mimeType parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['autoTruncate']) !== undefined) {\n throw new Error('autoTruncate parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function embedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n common.setValueByPath(\n toObject,\n ['requests[]', 'content'],\n t.tContentsForEmbed(apiClient, fromContents),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n embedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n const fromModelForEmbedContent = common.getValueByPath(fromObject, ['model']);\n if (fromModelForEmbedContent !== undefined) {\n common.setValueByPath(\n toObject,\n ['requests[]', 'model'],\n t.tModel(apiClient, fromModelForEmbedContent),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {\n throw new Error('outputGcsUri parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['negativePrompt']) !== undefined) {\n throw new Error('negativePrompt parameter is not supported in Gemini API.');\n }\n\n const fromNumberOfImages = common.getValueByPath(fromObject, [\n 'numberOfImages',\n ]);\n if (parentObject !== undefined && fromNumberOfImages != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfImages,\n );\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromGuidanceScale = common.getValueByPath(fromObject, [\n 'guidanceScale',\n ]);\n if (parentObject !== undefined && fromGuidanceScale != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'guidanceScale'],\n fromGuidanceScale,\n );\n }\n\n if (common.getValueByPath(fromObject, ['seed']) !== undefined) {\n throw new Error('seed parameter is not supported in Gemini API.');\n }\n\n const fromSafetyFilterLevel = common.getValueByPath(fromObject, [\n 'safetyFilterLevel',\n ]);\n if (parentObject !== undefined && fromSafetyFilterLevel != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'safetySetting'],\n fromSafetyFilterLevel,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromIncludeSafetyAttributes = common.getValueByPath(fromObject, [\n 'includeSafetyAttributes',\n ]);\n if (parentObject !== undefined && fromIncludeSafetyAttributes != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeSafetyAttributes'],\n fromIncludeSafetyAttributes,\n );\n }\n\n const fromIncludeRaiReason = common.getValueByPath(fromObject, [\n 'includeRaiReason',\n ]);\n if (parentObject !== undefined && fromIncludeRaiReason != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeRaiReason'],\n fromIncludeRaiReason,\n );\n }\n\n const fromLanguage = common.getValueByPath(fromObject, ['language']);\n if (parentObject !== undefined && fromLanguage != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'language'],\n fromLanguage,\n );\n }\n\n const fromOutputMimeType = common.getValueByPath(fromObject, [\n 'outputMimeType',\n ]);\n if (parentObject !== undefined && fromOutputMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'mimeType'],\n fromOutputMimeType,\n );\n }\n\n const fromOutputCompressionQuality = common.getValueByPath(fromObject, [\n 'outputCompressionQuality',\n ]);\n if (parentObject !== undefined && fromOutputCompressionQuality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'compressionQuality'],\n fromOutputCompressionQuality,\n );\n }\n\n if (common.getValueByPath(fromObject, ['addWatermark']) !== undefined) {\n throw new Error('addWatermark parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {\n throw new Error('enhancePrompt parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function generateImagesParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateImagesConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getModelParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetModelParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function countTokensConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensConfig,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['systemInstruction']) !== undefined) {\n throw new Error(\n 'systemInstruction parameter is not supported in Gemini API.',\n );\n }\n\n if (common.getValueByPath(fromObject, ['tools']) !== undefined) {\n throw new Error('tools parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['generationConfig']) !== undefined) {\n throw new Error(\n 'generationConfig parameter is not supported in Gemini API.',\n );\n }\n\n return toObject;\n}\n\nexport function countTokensParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n countTokensConfigToMldev(apiClient, fromConfig),\n );\n }\n\n return toObject;\n}\n\nexport function imageToMldev(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['gcsUri']) !== undefined) {\n throw new Error('gcsUri parameter is not supported in Gemini API.');\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, ['imageBytes']);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['bytesBase64Encoded'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generateVideosConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromNumberOfVideos = common.getValueByPath(fromObject, [\n 'numberOfVideos',\n ]);\n if (parentObject !== undefined && fromNumberOfVideos != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfVideos,\n );\n }\n\n if (common.getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {\n throw new Error('outputGcsUri parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['fps']) !== undefined) {\n throw new Error('fps parameter is not supported in Gemini API.');\n }\n\n const fromDurationSeconds = common.getValueByPath(fromObject, [\n 'durationSeconds',\n ]);\n if (parentObject !== undefined && fromDurationSeconds != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'durationSeconds'],\n fromDurationSeconds,\n );\n }\n\n if (common.getValueByPath(fromObject, ['seed']) !== undefined) {\n throw new Error('seed parameter is not supported in Gemini API.');\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n if (common.getValueByPath(fromObject, ['resolution']) !== undefined) {\n throw new Error('resolution parameter is not supported in Gemini API.');\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n if (common.getValueByPath(fromObject, ['pubsubTopic']) !== undefined) {\n throw new Error('pubsubTopic parameter is not supported in Gemini API.');\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n if (common.getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {\n throw new Error('enhancePrompt parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function generateVideosParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromImage = common.getValueByPath(fromObject, ['image']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['instances[0]', 'image'],\n imageToMldev(apiClient, fromImage),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateVideosConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partToVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToVertex(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n const fromExample = common.getValueByPath(fromObject, ['example']);\n if (fromExample != null) {\n common.setValueByPath(toObject, ['example'], fromExample);\n }\n\n const fromPattern = common.getValueByPath(fromObject, ['pattern']);\n if (fromPattern != null) {\n common.setValueByPath(toObject, ['pattern'], fromPattern);\n }\n\n const fromDefault = common.getValueByPath(fromObject, ['default']);\n if (fromDefault != null) {\n common.setValueByPath(toObject, ['default'], fromDefault);\n }\n\n const fromMaxLength = common.getValueByPath(fromObject, ['maxLength']);\n if (fromMaxLength != null) {\n common.setValueByPath(toObject, ['maxLength'], fromMaxLength);\n }\n\n const fromMinLength = common.getValueByPath(fromObject, ['minLength']);\n if (fromMinLength != null) {\n common.setValueByPath(toObject, ['minLength'], fromMinLength);\n }\n\n const fromMinProperties = common.getValueByPath(fromObject, [\n 'minProperties',\n ]);\n if (fromMinProperties != null) {\n common.setValueByPath(toObject, ['minProperties'], fromMinProperties);\n }\n\n const fromMaxProperties = common.getValueByPath(fromObject, [\n 'maxProperties',\n ]);\n if (fromMaxProperties != null) {\n common.setValueByPath(toObject, ['maxProperties'], fromMaxProperties);\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function safetySettingToVertex(\n apiClient: ApiClient,\n fromObject: types.SafetySetting,\n): Record {\n const toObject: Record = {};\n\n const fromMethod = common.getValueByPath(fromObject, ['method']);\n if (fromMethod != null) {\n common.setValueByPath(toObject, ['method'], fromMethod);\n }\n\n const fromCategory = common.getValueByPath(fromObject, ['category']);\n if (fromCategory != null) {\n common.setValueByPath(toObject, ['category'], fromCategory);\n }\n\n const fromThreshold = common.getValueByPath(fromObject, ['threshold']);\n if (fromThreshold != null) {\n common.setValueByPath(toObject, ['threshold'], fromThreshold);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n schemaToVertex(apiClient, fromResponse),\n );\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToVertex(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToVertex(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n const fromRetrieval = common.getValueByPath(fromObject, ['retrieval']);\n if (fromRetrieval != null) {\n common.setValueByPath(toObject, ['retrieval'], fromRetrieval);\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToVertex());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function prebuiltVoiceConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.PrebuiltVoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceName = common.getValueByPath(fromObject, ['voiceName']);\n if (fromVoiceName != null) {\n common.setValueByPath(toObject, ['voiceName'], fromVoiceName);\n }\n\n return toObject;\n}\n\nexport function voiceConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.VoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromPrebuiltVoiceConfig = common.getValueByPath(fromObject, [\n 'prebuiltVoiceConfig',\n ]);\n if (fromPrebuiltVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['prebuiltVoiceConfig'],\n prebuiltVoiceConfigToVertex(apiClient, fromPrebuiltVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function speechConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.SpeechConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceConfig = common.getValueByPath(fromObject, ['voiceConfig']);\n if (fromVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['voiceConfig'],\n voiceConfigToVertex(apiClient, fromVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function thinkingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ThinkingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromIncludeThoughts = common.getValueByPath(fromObject, [\n 'includeThoughts',\n ]);\n if (fromIncludeThoughts != null) {\n common.setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);\n }\n\n const fromThinkingBudget = common.getValueByPath(fromObject, [\n 'thinkingBudget',\n ]);\n if (fromThinkingBudget != null) {\n common.setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);\n }\n\n return toObject;\n}\n\nexport function generateContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTemperature = common.getValueByPath(fromObject, ['temperature']);\n if (fromTemperature != null) {\n common.setValueByPath(toObject, ['temperature'], fromTemperature);\n }\n\n const fromTopP = common.getValueByPath(fromObject, ['topP']);\n if (fromTopP != null) {\n common.setValueByPath(toObject, ['topP'], fromTopP);\n }\n\n const fromTopK = common.getValueByPath(fromObject, ['topK']);\n if (fromTopK != null) {\n common.setValueByPath(toObject, ['topK'], fromTopK);\n }\n\n const fromCandidateCount = common.getValueByPath(fromObject, [\n 'candidateCount',\n ]);\n if (fromCandidateCount != null) {\n common.setValueByPath(toObject, ['candidateCount'], fromCandidateCount);\n }\n\n const fromMaxOutputTokens = common.getValueByPath(fromObject, [\n 'maxOutputTokens',\n ]);\n if (fromMaxOutputTokens != null) {\n common.setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);\n }\n\n const fromStopSequences = common.getValueByPath(fromObject, [\n 'stopSequences',\n ]);\n if (fromStopSequences != null) {\n common.setValueByPath(toObject, ['stopSequences'], fromStopSequences);\n }\n\n const fromResponseLogprobs = common.getValueByPath(fromObject, [\n 'responseLogprobs',\n ]);\n if (fromResponseLogprobs != null) {\n common.setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);\n }\n\n const fromLogprobs = common.getValueByPath(fromObject, ['logprobs']);\n if (fromLogprobs != null) {\n common.setValueByPath(toObject, ['logprobs'], fromLogprobs);\n }\n\n const fromPresencePenalty = common.getValueByPath(fromObject, [\n 'presencePenalty',\n ]);\n if (fromPresencePenalty != null) {\n common.setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);\n }\n\n const fromFrequencyPenalty = common.getValueByPath(fromObject, [\n 'frequencyPenalty',\n ]);\n if (fromFrequencyPenalty != null) {\n common.setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (fromSeed != null) {\n common.setValueByPath(toObject, ['seed'], fromSeed);\n }\n\n const fromResponseMimeType = common.getValueByPath(fromObject, [\n 'responseMimeType',\n ]);\n if (fromResponseMimeType != null) {\n common.setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);\n }\n\n const fromResponseSchema = common.getValueByPath(fromObject, [\n 'responseSchema',\n ]);\n if (fromResponseSchema != null) {\n common.setValueByPath(\n toObject,\n ['responseSchema'],\n schemaToVertex(apiClient, t.tSchema(apiClient, fromResponseSchema)),\n );\n }\n\n const fromRoutingConfig = common.getValueByPath(fromObject, [\n 'routingConfig',\n ]);\n if (fromRoutingConfig != null) {\n common.setValueByPath(toObject, ['routingConfig'], fromRoutingConfig);\n }\n\n const fromSafetySettings = common.getValueByPath(fromObject, [\n 'safetySettings',\n ]);\n if (parentObject !== undefined && fromSafetySettings != null) {\n if (Array.isArray(fromSafetySettings)) {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings.map((item) => {\n return safetySettingToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings,\n );\n }\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToVertex(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToVertex(apiClient, fromToolConfig),\n );\n }\n\n const fromLabels = common.getValueByPath(fromObject, ['labels']);\n if (parentObject !== undefined && fromLabels != null) {\n common.setValueByPath(parentObject, ['labels'], fromLabels);\n }\n\n const fromCachedContent = common.getValueByPath(fromObject, [\n 'cachedContent',\n ]);\n if (parentObject !== undefined && fromCachedContent != null) {\n common.setValueByPath(\n parentObject,\n ['cachedContent'],\n t.tCachedContentName(apiClient, fromCachedContent),\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities != null) {\n common.setValueByPath(\n toObject,\n ['responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromMediaResolution = common.getValueByPath(fromObject, [\n 'mediaResolution',\n ]);\n if (fromMediaResolution != null) {\n common.setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig != null) {\n common.setValueByPath(\n toObject,\n ['speechConfig'],\n speechConfigToVertex(\n apiClient,\n t.tSpeechConfig(apiClient, fromSpeechConfig),\n ),\n );\n }\n\n const fromAudioTimestamp = common.getValueByPath(fromObject, [\n 'audioTimestamp',\n ]);\n if (fromAudioTimestamp != null) {\n common.setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp);\n }\n\n const fromThinkingConfig = common.getValueByPath(fromObject, [\n 'thinkingConfig',\n ]);\n if (fromThinkingConfig != null) {\n common.setValueByPath(\n toObject,\n ['thinkingConfig'],\n thinkingConfigToVertex(apiClient, fromThinkingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function generateContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['generationConfig'],\n generateContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTaskType = common.getValueByPath(fromObject, ['taskType']);\n if (parentObject !== undefined && fromTaskType != null) {\n common.setValueByPath(\n parentObject,\n ['instances[]', 'task_type'],\n fromTaskType,\n );\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (parentObject !== undefined && fromTitle != null) {\n common.setValueByPath(parentObject, ['instances[]', 'title'], fromTitle);\n }\n\n const fromOutputDimensionality = common.getValueByPath(fromObject, [\n 'outputDimensionality',\n ]);\n if (parentObject !== undefined && fromOutputDimensionality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputDimensionality'],\n fromOutputDimensionality,\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (parentObject !== undefined && fromMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['instances[]', 'mimeType'],\n fromMimeType,\n );\n }\n\n const fromAutoTruncate = common.getValueByPath(fromObject, ['autoTruncate']);\n if (parentObject !== undefined && fromAutoTruncate != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'autoTruncate'],\n fromAutoTruncate,\n );\n }\n\n return toObject;\n}\n\nexport function embedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n common.setValueByPath(\n toObject,\n ['instances[]', 'content'],\n t.tContentsForEmbed(apiClient, fromContents),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n embedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromOutputGcsUri = common.getValueByPath(fromObject, ['outputGcsUri']);\n if (parentObject !== undefined && fromOutputGcsUri != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'storageUri'],\n fromOutputGcsUri,\n );\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n const fromNumberOfImages = common.getValueByPath(fromObject, [\n 'numberOfImages',\n ]);\n if (parentObject !== undefined && fromNumberOfImages != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfImages,\n );\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromGuidanceScale = common.getValueByPath(fromObject, [\n 'guidanceScale',\n ]);\n if (parentObject !== undefined && fromGuidanceScale != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'guidanceScale'],\n fromGuidanceScale,\n );\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (parentObject !== undefined && fromSeed != null) {\n common.setValueByPath(parentObject, ['parameters', 'seed'], fromSeed);\n }\n\n const fromSafetyFilterLevel = common.getValueByPath(fromObject, [\n 'safetyFilterLevel',\n ]);\n if (parentObject !== undefined && fromSafetyFilterLevel != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'safetySetting'],\n fromSafetyFilterLevel,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromIncludeSafetyAttributes = common.getValueByPath(fromObject, [\n 'includeSafetyAttributes',\n ]);\n if (parentObject !== undefined && fromIncludeSafetyAttributes != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeSafetyAttributes'],\n fromIncludeSafetyAttributes,\n );\n }\n\n const fromIncludeRaiReason = common.getValueByPath(fromObject, [\n 'includeRaiReason',\n ]);\n if (parentObject !== undefined && fromIncludeRaiReason != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeRaiReason'],\n fromIncludeRaiReason,\n );\n }\n\n const fromLanguage = common.getValueByPath(fromObject, ['language']);\n if (parentObject !== undefined && fromLanguage != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'language'],\n fromLanguage,\n );\n }\n\n const fromOutputMimeType = common.getValueByPath(fromObject, [\n 'outputMimeType',\n ]);\n if (parentObject !== undefined && fromOutputMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'mimeType'],\n fromOutputMimeType,\n );\n }\n\n const fromOutputCompressionQuality = common.getValueByPath(fromObject, [\n 'outputCompressionQuality',\n ]);\n if (parentObject !== undefined && fromOutputCompressionQuality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'compressionQuality'],\n fromOutputCompressionQuality,\n );\n }\n\n const fromAddWatermark = common.getValueByPath(fromObject, ['addWatermark']);\n if (parentObject !== undefined && fromAddWatermark != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'addWatermark'],\n fromAddWatermark,\n );\n }\n\n const fromEnhancePrompt = common.getValueByPath(fromObject, [\n 'enhancePrompt',\n ]);\n if (parentObject !== undefined && fromEnhancePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'enhancePrompt'],\n fromEnhancePrompt,\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateImagesConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getModelParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetModelParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function countTokensConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (parentObject !== undefined && fromGenerationConfig != null) {\n common.setValueByPath(\n parentObject,\n ['generationConfig'],\n fromGenerationConfig,\n );\n }\n\n return toObject;\n}\n\nexport function countTokensParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n countTokensConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function computeTokensParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.ComputeTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function imageToVertex(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromGcsUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromGcsUri != null) {\n common.setValueByPath(toObject, ['gcsUri'], fromGcsUri);\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, ['imageBytes']);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['bytesBase64Encoded'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generateVideosConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromNumberOfVideos = common.getValueByPath(fromObject, [\n 'numberOfVideos',\n ]);\n if (parentObject !== undefined && fromNumberOfVideos != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfVideos,\n );\n }\n\n const fromOutputGcsUri = common.getValueByPath(fromObject, ['outputGcsUri']);\n if (parentObject !== undefined && fromOutputGcsUri != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'storageUri'],\n fromOutputGcsUri,\n );\n }\n\n const fromFps = common.getValueByPath(fromObject, ['fps']);\n if (parentObject !== undefined && fromFps != null) {\n common.setValueByPath(parentObject, ['parameters', 'fps'], fromFps);\n }\n\n const fromDurationSeconds = common.getValueByPath(fromObject, [\n 'durationSeconds',\n ]);\n if (parentObject !== undefined && fromDurationSeconds != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'durationSeconds'],\n fromDurationSeconds,\n );\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (parentObject !== undefined && fromSeed != null) {\n common.setValueByPath(parentObject, ['parameters', 'seed'], fromSeed);\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromResolution = common.getValueByPath(fromObject, ['resolution']);\n if (parentObject !== undefined && fromResolution != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'resolution'],\n fromResolution,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromPubsubTopic = common.getValueByPath(fromObject, ['pubsubTopic']);\n if (parentObject !== undefined && fromPubsubTopic != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'pubsubTopic'],\n fromPubsubTopic,\n );\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n const fromEnhancePrompt = common.getValueByPath(fromObject, [\n 'enhancePrompt',\n ]);\n if (parentObject !== undefined && fromEnhancePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'enhancePrompt'],\n fromEnhancePrompt,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromImage = common.getValueByPath(fromObject, ['image']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['instances[0]', 'image'],\n imageToVertex(apiClient, fromImage),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateVideosConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partFromMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentFromMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function citationMetadataFromMldev(\n apiClient: ApiClient,\n fromObject: types.CitationMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromCitations = common.getValueByPath(fromObject, ['citationSources']);\n if (fromCitations != null) {\n common.setValueByPath(toObject, ['citations'], fromCitations);\n }\n\n return toObject;\n}\n\nexport function candidateFromMldev(\n apiClient: ApiClient,\n fromObject: types.Candidate,\n): Record {\n const toObject: Record = {};\n\n const fromContent = common.getValueByPath(fromObject, ['content']);\n if (fromContent != null) {\n common.setValueByPath(\n toObject,\n ['content'],\n contentFromMldev(apiClient, fromContent),\n );\n }\n\n const fromCitationMetadata = common.getValueByPath(fromObject, [\n 'citationMetadata',\n ]);\n if (fromCitationMetadata != null) {\n common.setValueByPath(\n toObject,\n ['citationMetadata'],\n citationMetadataFromMldev(apiClient, fromCitationMetadata),\n );\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n const fromFinishReason = common.getValueByPath(fromObject, ['finishReason']);\n if (fromFinishReason != null) {\n common.setValueByPath(toObject, ['finishReason'], fromFinishReason);\n }\n\n const fromAvgLogprobs = common.getValueByPath(fromObject, ['avgLogprobs']);\n if (fromAvgLogprobs != null) {\n common.setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);\n }\n\n const fromGroundingMetadata = common.getValueByPath(fromObject, [\n 'groundingMetadata',\n ]);\n if (fromGroundingMetadata != null) {\n common.setValueByPath(\n toObject,\n ['groundingMetadata'],\n fromGroundingMetadata,\n );\n }\n\n const fromIndex = common.getValueByPath(fromObject, ['index']);\n if (fromIndex != null) {\n common.setValueByPath(toObject, ['index'], fromIndex);\n }\n\n const fromLogprobsResult = common.getValueByPath(fromObject, [\n 'logprobsResult',\n ]);\n if (fromLogprobsResult != null) {\n common.setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult);\n }\n\n const fromSafetyRatings = common.getValueByPath(fromObject, [\n 'safetyRatings',\n ]);\n if (fromSafetyRatings != null) {\n common.setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings);\n }\n\n return toObject;\n}\n\nexport function generateContentResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromCandidates = common.getValueByPath(fromObject, ['candidates']);\n if (fromCandidates != null) {\n if (Array.isArray(fromCandidates)) {\n common.setValueByPath(\n toObject,\n ['candidates'],\n fromCandidates.map((item) => {\n return candidateFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['candidates'], fromCandidates);\n }\n }\n\n const fromModelVersion = common.getValueByPath(fromObject, ['modelVersion']);\n if (fromModelVersion != null) {\n common.setValueByPath(toObject, ['modelVersion'], fromModelVersion);\n }\n\n const fromPromptFeedback = common.getValueByPath(fromObject, [\n 'promptFeedback',\n ]);\n if (fromPromptFeedback != null) {\n common.setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingStatisticsFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function contentEmbeddingFromMldev(\n apiClient: ApiClient,\n fromObject: types.ContentEmbedding,\n): Record {\n const toObject: Record = {};\n\n const fromValues = common.getValueByPath(fromObject, ['values']);\n if (fromValues != null) {\n common.setValueByPath(toObject, ['values'], fromValues);\n }\n\n return toObject;\n}\n\nexport function embedContentMetadataFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function embedContentResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromEmbeddings = common.getValueByPath(fromObject, ['embeddings']);\n if (fromEmbeddings != null) {\n if (Array.isArray(fromEmbeddings)) {\n common.setValueByPath(\n toObject,\n ['embeddings'],\n fromEmbeddings.map((item) => {\n return contentEmbeddingFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['embeddings'], fromEmbeddings);\n }\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(\n toObject,\n ['metadata'],\n embedContentMetadataFromMldev(),\n );\n }\n\n return toObject;\n}\n\nexport function imageFromMldev(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromImageBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['imageBytes'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function safetyAttributesFromMldev(\n apiClient: ApiClient,\n fromObject: types.SafetyAttributes,\n): Record {\n const toObject: Record = {};\n\n const fromCategories = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'categories',\n ]);\n if (fromCategories != null) {\n common.setValueByPath(toObject, ['categories'], fromCategories);\n }\n\n const fromScores = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'scores',\n ]);\n if (fromScores != null) {\n common.setValueByPath(toObject, ['scores'], fromScores);\n }\n\n const fromContentType = common.getValueByPath(fromObject, ['contentType']);\n if (fromContentType != null) {\n common.setValueByPath(toObject, ['contentType'], fromContentType);\n }\n\n return toObject;\n}\n\nexport function generatedImageFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedImage,\n): Record {\n const toObject: Record = {};\n\n const fromImage = common.getValueByPath(fromObject, ['_self']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['image'],\n imageFromMldev(apiClient, fromImage),\n );\n }\n\n const fromRaiFilteredReason = common.getValueByPath(fromObject, [\n 'raiFilteredReason',\n ]);\n if (fromRaiFilteredReason != null) {\n common.setValueByPath(\n toObject,\n ['raiFilteredReason'],\n fromRaiFilteredReason,\n );\n }\n\n const fromSafetyAttributes = common.getValueByPath(fromObject, ['_self']);\n if (fromSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['safetyAttributes'],\n safetyAttributesFromMldev(apiClient, fromSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedImages = common.getValueByPath(fromObject, [\n 'predictions',\n ]);\n if (fromGeneratedImages != null) {\n if (Array.isArray(fromGeneratedImages)) {\n common.setValueByPath(\n toObject,\n ['generatedImages'],\n fromGeneratedImages.map((item) => {\n return generatedImageFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedImages'], fromGeneratedImages);\n }\n }\n\n const fromPositivePromptSafetyAttributes = common.getValueByPath(fromObject, [\n 'positivePromptSafetyAttributes',\n ]);\n if (fromPositivePromptSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['positivePromptSafetyAttributes'],\n safetyAttributesFromMldev(apiClient, fromPositivePromptSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function endpointFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function tunedModelInfoFromMldev(\n apiClient: ApiClient,\n fromObject: types.TunedModelInfo,\n): Record {\n const toObject: Record = {};\n\n const fromBaseModel = common.getValueByPath(fromObject, ['baseModel']);\n if (fromBaseModel != null) {\n common.setValueByPath(toObject, ['baseModel'], fromBaseModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n return toObject;\n}\n\nexport function modelFromMldev(\n apiClient: ApiClient,\n fromObject: types.Model,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromVersion = common.getValueByPath(fromObject, ['version']);\n if (fromVersion != null) {\n common.setValueByPath(toObject, ['version'], fromVersion);\n }\n\n const fromTunedModelInfo = common.getValueByPath(fromObject, ['_self']);\n if (fromTunedModelInfo != null) {\n common.setValueByPath(\n toObject,\n ['tunedModelInfo'],\n tunedModelInfoFromMldev(apiClient, fromTunedModelInfo),\n );\n }\n\n const fromInputTokenLimit = common.getValueByPath(fromObject, [\n 'inputTokenLimit',\n ]);\n if (fromInputTokenLimit != null) {\n common.setValueByPath(toObject, ['inputTokenLimit'], fromInputTokenLimit);\n }\n\n const fromOutputTokenLimit = common.getValueByPath(fromObject, [\n 'outputTokenLimit',\n ]);\n if (fromOutputTokenLimit != null) {\n common.setValueByPath(toObject, ['outputTokenLimit'], fromOutputTokenLimit);\n }\n\n const fromSupportedActions = common.getValueByPath(fromObject, [\n 'supportedGenerationMethods',\n ]);\n if (fromSupportedActions != null) {\n common.setValueByPath(toObject, ['supportedActions'], fromSupportedActions);\n }\n\n return toObject;\n}\n\nexport function countTokensResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTotalTokens = common.getValueByPath(fromObject, ['totalTokens']);\n if (fromTotalTokens != null) {\n common.setValueByPath(toObject, ['totalTokens'], fromTotalTokens);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n return toObject;\n}\n\nexport function videoFromMldev(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['video', 'uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'video',\n 'encodedVideo',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['encoding']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromMldev(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, [\n 'generatedSamples',\n ]);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromMldev(apiClient, fromResponse),\n );\n }\n\n const fromResult = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResult != null) {\n common.setValueByPath(\n toObject,\n ['result'],\n generateVideosResponseFromMldev(apiClient, fromResult),\n );\n }\n\n return toObject;\n}\n\nexport function partFromVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentFromVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function citationMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.CitationMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromCitations = common.getValueByPath(fromObject, ['citations']);\n if (fromCitations != null) {\n common.setValueByPath(toObject, ['citations'], fromCitations);\n }\n\n return toObject;\n}\n\nexport function candidateFromVertex(\n apiClient: ApiClient,\n fromObject: types.Candidate,\n): Record {\n const toObject: Record = {};\n\n const fromContent = common.getValueByPath(fromObject, ['content']);\n if (fromContent != null) {\n common.setValueByPath(\n toObject,\n ['content'],\n contentFromVertex(apiClient, fromContent),\n );\n }\n\n const fromCitationMetadata = common.getValueByPath(fromObject, [\n 'citationMetadata',\n ]);\n if (fromCitationMetadata != null) {\n common.setValueByPath(\n toObject,\n ['citationMetadata'],\n citationMetadataFromVertex(apiClient, fromCitationMetadata),\n );\n }\n\n const fromFinishMessage = common.getValueByPath(fromObject, [\n 'finishMessage',\n ]);\n if (fromFinishMessage != null) {\n common.setValueByPath(toObject, ['finishMessage'], fromFinishMessage);\n }\n\n const fromFinishReason = common.getValueByPath(fromObject, ['finishReason']);\n if (fromFinishReason != null) {\n common.setValueByPath(toObject, ['finishReason'], fromFinishReason);\n }\n\n const fromAvgLogprobs = common.getValueByPath(fromObject, ['avgLogprobs']);\n if (fromAvgLogprobs != null) {\n common.setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);\n }\n\n const fromGroundingMetadata = common.getValueByPath(fromObject, [\n 'groundingMetadata',\n ]);\n if (fromGroundingMetadata != null) {\n common.setValueByPath(\n toObject,\n ['groundingMetadata'],\n fromGroundingMetadata,\n );\n }\n\n const fromIndex = common.getValueByPath(fromObject, ['index']);\n if (fromIndex != null) {\n common.setValueByPath(toObject, ['index'], fromIndex);\n }\n\n const fromLogprobsResult = common.getValueByPath(fromObject, [\n 'logprobsResult',\n ]);\n if (fromLogprobsResult != null) {\n common.setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult);\n }\n\n const fromSafetyRatings = common.getValueByPath(fromObject, [\n 'safetyRatings',\n ]);\n if (fromSafetyRatings != null) {\n common.setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings);\n }\n\n return toObject;\n}\n\nexport function generateContentResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromCandidates = common.getValueByPath(fromObject, ['candidates']);\n if (fromCandidates != null) {\n if (Array.isArray(fromCandidates)) {\n common.setValueByPath(\n toObject,\n ['candidates'],\n fromCandidates.map((item) => {\n return candidateFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['candidates'], fromCandidates);\n }\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromResponseId = common.getValueByPath(fromObject, ['responseId']);\n if (fromResponseId != null) {\n common.setValueByPath(toObject, ['responseId'], fromResponseId);\n }\n\n const fromModelVersion = common.getValueByPath(fromObject, ['modelVersion']);\n if (fromModelVersion != null) {\n common.setValueByPath(toObject, ['modelVersion'], fromModelVersion);\n }\n\n const fromPromptFeedback = common.getValueByPath(fromObject, [\n 'promptFeedback',\n ]);\n if (fromPromptFeedback != null) {\n common.setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingStatisticsFromVertex(\n apiClient: ApiClient,\n fromObject: types.ContentEmbeddingStatistics,\n): Record {\n const toObject: Record = {};\n\n const fromTruncated = common.getValueByPath(fromObject, ['truncated']);\n if (fromTruncated != null) {\n common.setValueByPath(toObject, ['truncated'], fromTruncated);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['token_count']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingFromVertex(\n apiClient: ApiClient,\n fromObject: types.ContentEmbedding,\n): Record {\n const toObject: Record = {};\n\n const fromValues = common.getValueByPath(fromObject, ['values']);\n if (fromValues != null) {\n common.setValueByPath(toObject, ['values'], fromValues);\n }\n\n const fromStatistics = common.getValueByPath(fromObject, ['statistics']);\n if (fromStatistics != null) {\n common.setValueByPath(\n toObject,\n ['statistics'],\n contentEmbeddingStatisticsFromVertex(apiClient, fromStatistics),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromBillableCharacterCount = common.getValueByPath(fromObject, [\n 'billableCharacterCount',\n ]);\n if (fromBillableCharacterCount != null) {\n common.setValueByPath(\n toObject,\n ['billableCharacterCount'],\n fromBillableCharacterCount,\n );\n }\n\n return toObject;\n}\n\nexport function embedContentResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromEmbeddings = common.getValueByPath(fromObject, [\n 'predictions[]',\n 'embeddings',\n ]);\n if (fromEmbeddings != null) {\n if (Array.isArray(fromEmbeddings)) {\n common.setValueByPath(\n toObject,\n ['embeddings'],\n fromEmbeddings.map((item) => {\n return contentEmbeddingFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['embeddings'], fromEmbeddings);\n }\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(\n toObject,\n ['metadata'],\n embedContentMetadataFromVertex(apiClient, fromMetadata),\n );\n }\n\n return toObject;\n}\n\nexport function imageFromVertex(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromGcsUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromGcsUri != null) {\n common.setValueByPath(toObject, ['gcsUri'], fromGcsUri);\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['imageBytes'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function safetyAttributesFromVertex(\n apiClient: ApiClient,\n fromObject: types.SafetyAttributes,\n): Record {\n const toObject: Record = {};\n\n const fromCategories = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'categories',\n ]);\n if (fromCategories != null) {\n common.setValueByPath(toObject, ['categories'], fromCategories);\n }\n\n const fromScores = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'scores',\n ]);\n if (fromScores != null) {\n common.setValueByPath(toObject, ['scores'], fromScores);\n }\n\n const fromContentType = common.getValueByPath(fromObject, ['contentType']);\n if (fromContentType != null) {\n common.setValueByPath(toObject, ['contentType'], fromContentType);\n }\n\n return toObject;\n}\n\nexport function generatedImageFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedImage,\n): Record {\n const toObject: Record = {};\n\n const fromImage = common.getValueByPath(fromObject, ['_self']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['image'],\n imageFromVertex(apiClient, fromImage),\n );\n }\n\n const fromRaiFilteredReason = common.getValueByPath(fromObject, [\n 'raiFilteredReason',\n ]);\n if (fromRaiFilteredReason != null) {\n common.setValueByPath(\n toObject,\n ['raiFilteredReason'],\n fromRaiFilteredReason,\n );\n }\n\n const fromSafetyAttributes = common.getValueByPath(fromObject, ['_self']);\n if (fromSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['safetyAttributes'],\n safetyAttributesFromVertex(apiClient, fromSafetyAttributes),\n );\n }\n\n const fromEnhancedPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromEnhancedPrompt != null) {\n common.setValueByPath(toObject, ['enhancedPrompt'], fromEnhancedPrompt);\n }\n\n return toObject;\n}\n\nexport function generateImagesResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedImages = common.getValueByPath(fromObject, [\n 'predictions',\n ]);\n if (fromGeneratedImages != null) {\n if (Array.isArray(fromGeneratedImages)) {\n common.setValueByPath(\n toObject,\n ['generatedImages'],\n fromGeneratedImages.map((item) => {\n return generatedImageFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedImages'], fromGeneratedImages);\n }\n }\n\n const fromPositivePromptSafetyAttributes = common.getValueByPath(fromObject, [\n 'positivePromptSafetyAttributes',\n ]);\n if (fromPositivePromptSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['positivePromptSafetyAttributes'],\n safetyAttributesFromVertex(apiClient, fromPositivePromptSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function endpointFromVertex(\n apiClient: ApiClient,\n fromObject: types.Endpoint,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['endpoint']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDeployedModelId = common.getValueByPath(fromObject, [\n 'deployedModelId',\n ]);\n if (fromDeployedModelId != null) {\n common.setValueByPath(toObject, ['deployedModelId'], fromDeployedModelId);\n }\n\n return toObject;\n}\n\nexport function tunedModelInfoFromVertex(\n apiClient: ApiClient,\n fromObject: types.TunedModelInfo,\n): Record {\n const toObject: Record = {};\n\n const fromBaseModel = common.getValueByPath(fromObject, [\n 'labels',\n 'google-vertex-llm-tuning-base-model-id',\n ]);\n if (fromBaseModel != null) {\n common.setValueByPath(toObject, ['baseModel'], fromBaseModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n return toObject;\n}\n\nexport function modelFromVertex(\n apiClient: ApiClient,\n fromObject: types.Model,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromVersion = common.getValueByPath(fromObject, ['versionId']);\n if (fromVersion != null) {\n common.setValueByPath(toObject, ['version'], fromVersion);\n }\n\n const fromEndpoints = common.getValueByPath(fromObject, ['deployedModels']);\n if (fromEndpoints != null) {\n if (Array.isArray(fromEndpoints)) {\n common.setValueByPath(\n toObject,\n ['endpoints'],\n fromEndpoints.map((item) => {\n return endpointFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['endpoints'], fromEndpoints);\n }\n }\n\n const fromLabels = common.getValueByPath(fromObject, ['labels']);\n if (fromLabels != null) {\n common.setValueByPath(toObject, ['labels'], fromLabels);\n }\n\n const fromTunedModelInfo = common.getValueByPath(fromObject, ['_self']);\n if (fromTunedModelInfo != null) {\n common.setValueByPath(\n toObject,\n ['tunedModelInfo'],\n tunedModelInfoFromVertex(apiClient, fromTunedModelInfo),\n );\n }\n\n return toObject;\n}\n\nexport function countTokensResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTotalTokens = common.getValueByPath(fromObject, ['totalTokens']);\n if (fromTotalTokens != null) {\n common.setValueByPath(toObject, ['totalTokens'], fromTotalTokens);\n }\n\n return toObject;\n}\n\nexport function computeTokensResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.ComputeTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTokensInfo = common.getValueByPath(fromObject, ['tokensInfo']);\n if (fromTokensInfo != null) {\n common.setValueByPath(toObject, ['tokensInfo'], fromTokensInfo);\n }\n\n return toObject;\n}\n\nexport function videoFromVertex(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromVertex(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, ['videos']);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromVertex(apiClient, fromResponse),\n );\n }\n\n const fromResult = common.getValueByPath(fromObject, ['response']);\n if (fromResult != null) {\n common.setValueByPath(\n toObject,\n ['result'],\n generateVideosResponseFromVertex(apiClient, fromResult),\n );\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as types from '../types';\nimport {\n contentFromMldev,\n contentFromVertex,\n contentToMldev,\n contentToVertex,\n toolToMldev,\n toolToVertex,\n} from './_models_converters';\n\n/**\n * Converters for live client.\n */\n\nexport function liveConnectParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveConnectParameters,\n): types.LiveClientMessage {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig !== undefined && fromConfig !== null) {\n common.setValueByPath(\n toObject,\n ['setup'],\n liveConnectConfigToMldev(apiClient, fromConfig),\n );\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel !== undefined) {\n common.setValueByPath(toObject, ['setup', 'model'], fromModel);\n }\n\n return toObject;\n}\n\nexport function liveConnectParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveConnectParameters,\n): types.LiveClientMessage {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig !== undefined && fromConfig !== null) {\n common.setValueByPath(\n toObject,\n ['setup'],\n liveConnectConfigToVertex(apiClient, fromConfig),\n );\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel !== undefined) {\n common.setValueByPath(toObject, ['setup', 'model'], fromModel);\n }\n\n return toObject;\n}\n\nexport function liveServerMessageFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerMessage,\n): types.LiveServerMessage {\n const toObject: Record = {};\n\n const fromSetupComplete = common.getValueByPath(fromObject, [\n 'setupComplete',\n ]);\n if (fromSetupComplete !== undefined) {\n common.setValueByPath(toObject, ['setupComplete'], fromSetupComplete);\n }\n\n const fromServerContent = common.getValueByPath(fromObject, [\n 'serverContent',\n ]);\n if (fromServerContent !== undefined && fromServerContent !== null) {\n common.setValueByPath(\n toObject,\n ['serverContent'],\n liveServerContentFromMldev(apiClient, fromServerContent),\n );\n }\n\n const fromToolCall = common.getValueByPath(fromObject, ['toolCall']);\n if (fromToolCall !== undefined && fromToolCall !== null) {\n common.setValueByPath(\n toObject,\n ['toolCall'],\n liveServerToolCallFromMldev(apiClient, fromToolCall),\n );\n }\n\n const fromToolCallCancellation = common.getValueByPath(fromObject, [\n 'toolCallCancellation',\n ]);\n if (\n fromToolCallCancellation !== undefined &&\n fromToolCallCancellation !== null\n ) {\n common.setValueByPath(\n toObject,\n ['toolCallCancellation'],\n liveServerToolCallCancellationFromMldev(\n apiClient,\n fromToolCallCancellation,\n ),\n );\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != undefined && fromUsageMetadata != null) {\n common.setValueByPath(\n toObject,\n ['usageMetadata'],\n usageMetadataFromMldev(apiClient, fromUsageMetadata),\n );\n }\n\n const fromGoAway = common.getValueByPath(fromObject, ['goAway']);\n if (fromGoAway !== undefined && fromGoAway !== null) {\n common.setValueByPath(\n toObject,\n ['goAway'],\n liveServerGoAwayFromMldev(fromGoAway),\n );\n }\n\n const fromSessionResumptionUpdate = common.getValueByPath(fromObject, [\n 'sessionResumptionUpdate',\n ]);\n if (\n fromSessionResumptionUpdate !== undefined &&\n fromSessionResumptionUpdate !== null\n ) {\n common.setValueByPath(\n toObject,\n ['sessionResumptionUpdate'],\n liveServerSessionResumptionUpdateFromMldev(fromSessionResumptionUpdate),\n );\n }\n\n return toObject;\n}\n\nexport function liveServerMessageFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerMessage,\n): types.LiveServerMessage {\n const toObject: Record = {};\n\n const fromSetupComplete = common.getValueByPath(fromObject, [\n 'setupComplete',\n ]);\n if (fromSetupComplete !== undefined) {\n common.setValueByPath(toObject, ['setupComplete'], fromSetupComplete);\n }\n\n const fromServerContent = common.getValueByPath(fromObject, [\n 'serverContent',\n ]);\n if (fromServerContent !== undefined && fromServerContent !== null) {\n common.setValueByPath(\n toObject,\n ['serverContent'],\n liveServerContentFromVertex(apiClient, fromServerContent),\n );\n }\n\n const fromToolCall = common.getValueByPath(fromObject, ['toolCall']);\n if (fromToolCall !== undefined && fromToolCall !== null) {\n common.setValueByPath(\n toObject,\n ['toolCall'],\n liveServerToolCallFromVertex(apiClient, fromToolCall),\n );\n }\n\n const fromToolCallCancellation = common.getValueByPath(fromObject, [\n 'toolCallCancellation',\n ]);\n if (\n fromToolCallCancellation !== undefined &&\n fromToolCallCancellation !== null\n ) {\n common.setValueByPath(\n toObject,\n ['toolCallCancellation'],\n liveServerToolCallCancellationFromVertex(\n apiClient,\n fromToolCallCancellation,\n ),\n );\n }\n\n const fromGoAway = common.getValueByPath(fromObject, ['goAway']);\n if (fromGoAway !== undefined && fromGoAway !== null) {\n common.setValueByPath(\n toObject,\n ['goAway'],\n liveServerGoAwayFromVertex(fromGoAway),\n );\n }\n\n const fromSessionResumptionUpdate = common.getValueByPath(fromObject, [\n 'sessionResumptionUpdate',\n ]);\n if (\n fromSessionResumptionUpdate !== undefined &&\n fromSessionResumptionUpdate !== null\n ) {\n common.setValueByPath(\n toObject,\n ['sessionResumptionUpdate'],\n liveServerSessionResumptionUpdateFromVertex(fromSessionResumptionUpdate),\n );\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != undefined && fromUsageMetadata != null) {\n common.setValueByPath(\n toObject,\n ['usageMetadata'],\n usageMetadataFromVertex(apiClient, fromUsageMetadata),\n );\n }\n\n return toObject;\n}\n\nfunction slidingWindowToMldev(\n fromObject: types.SlidingWindow,\n): types.SlidingWindow {\n const toObject: Record = {};\n\n const fromTargetTokens = common.getValueByPath(fromObject, ['targetTokens']);\n if (fromTargetTokens !== undefined && fromTargetTokens !== null) {\n common.setValueByPath(toObject, ['targetTokens'], fromTargetTokens);\n }\n\n return toObject;\n}\n\nfunction slidingWindowToVertex(\n fromObject: types.SlidingWindow,\n): types.SlidingWindow {\n const toObject: Record = {};\n\n const fromTargetTokens = common.getValueByPath(fromObject, ['targetTokens']);\n if (fromTargetTokens !== undefined && fromTargetTokens !== null) {\n common.setValueByPath(toObject, ['targetTokens'], fromTargetTokens);\n }\n\n return toObject;\n}\n\nfunction contextWindowCompressionToMldev(\n fromObject: types.ContextWindowCompressionConfig,\n): types.ContextWindowCompressionConfig {\n const toObject: Record = {};\n\n const fromTriggerTokens = common.getValueByPath(fromObject, [\n 'triggerTokens',\n ]);\n if (fromTriggerTokens !== undefined && fromTriggerTokens !== null) {\n common.setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);\n }\n\n const fromSlidingWindow = common.getValueByPath(fromObject, [\n 'slidingWindow',\n ]);\n if (fromSlidingWindow !== undefined && fromSlidingWindow !== null) {\n common.setValueByPath(\n toObject,\n ['slidingWindow'],\n slidingWindowToMldev(fromSlidingWindow),\n );\n }\n\n return toObject;\n}\n\nfunction contextWindowCompressionToVertex(\n fromObject: types.ContextWindowCompressionConfig,\n): types.ContextWindowCompressionConfig {\n const toObject: Record = {};\n\n const fromTriggerTokens = common.getValueByPath(fromObject, [\n 'triggerTokens',\n ]);\n if (fromTriggerTokens !== undefined && fromTriggerTokens !== null) {\n common.setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);\n }\n\n const fromSlidingWindow = common.getValueByPath(fromObject, [\n 'slidingWindow',\n ]);\n if (fromSlidingWindow !== undefined && fromSlidingWindow !== null) {\n common.setValueByPath(\n toObject,\n ['slidingWindow'],\n slidingWindowToVertex(fromSlidingWindow),\n );\n }\n\n return toObject;\n}\n\nfunction automaticActivityDetectionToMldev(\n fromObject: types.AutomaticActivityDetection,\n): types.AutomaticActivityDetection {\n const toObject: Record = {};\n\n const fromDisabled = common.getValueByPath(fromObject, ['disabled']);\n if (fromDisabled !== undefined && fromDisabled !== null) {\n common.setValueByPath(toObject, ['disabled'], fromDisabled);\n }\n\n const fromStartOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'startOfSpeechSensitivity',\n ]);\n if (\n fromStartOfSpeechSensitivity !== undefined &&\n fromStartOfSpeechSensitivity !== null\n ) {\n common.setValueByPath(\n toObject,\n ['startOfSpeechSensitivity'],\n fromStartOfSpeechSensitivity,\n );\n }\n\n const fromEndOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'endOfSpeechSensitivity',\n ]);\n if (\n fromEndOfSpeechSensitivity !== undefined &&\n fromEndOfSpeechSensitivity !== null\n ) {\n common.setValueByPath(\n toObject,\n ['endOfSpeechSensitivity'],\n fromEndOfSpeechSensitivity,\n );\n }\n\n const fromPrefixPaddingMs = common.getValueByPath(fromObject, [\n 'prefixPaddingMs',\n ]);\n if (fromPrefixPaddingMs !== undefined && fromPrefixPaddingMs !== null) {\n common.setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);\n }\n\n const fromSilenceDurationMs = common.getValueByPath(fromObject, [\n 'silenceDurationMs',\n ]);\n if (fromSilenceDurationMs !== undefined && fromSilenceDurationMs !== null) {\n common.setValueByPath(\n toObject,\n ['silenceDurationMs'],\n fromSilenceDurationMs,\n );\n }\n\n return toObject;\n}\n\nfunction automaticActivityDetectionToVertex(\n fromObject: types.AutomaticActivityDetection,\n): types.AutomaticActivityDetection {\n const toObject: Record = {};\n\n const fromDisabled = common.getValueByPath(fromObject, ['disabled']);\n if (fromDisabled !== undefined && fromDisabled !== null) {\n common.setValueByPath(toObject, ['disabled'], fromDisabled);\n }\n\n const fromStartOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'startOfSpeechSensitivity',\n ]);\n if (\n fromStartOfSpeechSensitivity !== undefined &&\n fromStartOfSpeechSensitivity !== null\n ) {\n common.setValueByPath(\n toObject,\n ['startOfSpeechSensitivity'],\n fromStartOfSpeechSensitivity,\n );\n }\n\n const fromEndOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'endOfSpeechSensitivity',\n ]);\n if (\n fromEndOfSpeechSensitivity !== undefined &&\n fromEndOfSpeechSensitivity !== null\n ) {\n common.setValueByPath(\n toObject,\n ['endOfSpeechSensitivity'],\n fromEndOfSpeechSensitivity,\n );\n }\n\n const fromPrefixPaddingMs = common.getValueByPath(fromObject, [\n 'prefixPaddingMs',\n ]);\n if (fromPrefixPaddingMs !== undefined && fromPrefixPaddingMs !== null) {\n common.setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);\n }\n\n const fromSilenceDurationMs = common.getValueByPath(fromObject, [\n 'silenceDurationMs',\n ]);\n if (fromSilenceDurationMs !== undefined && fromSilenceDurationMs !== null) {\n common.setValueByPath(\n toObject,\n ['silenceDurationMs'],\n fromSilenceDurationMs,\n );\n }\n\n return toObject;\n}\n\nfunction realtimeInputConfigToMldev(\n fromObject: types.RealtimeInputConfig,\n): types.RealtimeInputConfig {\n const toObject: Record = {};\n\n const fromAutomaticActivityDetection = common.getValueByPath(fromObject, [\n 'automaticActivityDetection',\n ]);\n if (\n fromAutomaticActivityDetection !== undefined &&\n fromAutomaticActivityDetection !== null\n ) {\n common.setValueByPath(\n toObject,\n ['automaticActivityDetection'],\n automaticActivityDetectionToMldev(fromAutomaticActivityDetection),\n );\n }\n\n const fromActivityHandling = common.getValueByPath(fromObject, [\n 'activityHandling',\n ]);\n if (fromActivityHandling !== undefined && fromActivityHandling !== null) {\n common.setValueByPath(toObject, ['activityHandling'], fromActivityHandling);\n }\n\n const fromTurnCoverage = common.getValueByPath(fromObject, ['turnCoverage']);\n if (fromTurnCoverage !== undefined && fromTurnCoverage !== null) {\n common.setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);\n }\n\n return toObject;\n}\n\nfunction realtimeInputConfigToVertex(\n fromObject: types.RealtimeInputConfig,\n): types.RealtimeInputConfig {\n const toObject: Record = {};\n\n const fromAutomaticActivityDetection = common.getValueByPath(fromObject, [\n 'automaticActivityDetection',\n ]);\n if (\n fromAutomaticActivityDetection !== undefined &&\n fromAutomaticActivityDetection !== null\n ) {\n common.setValueByPath(\n toObject,\n ['automaticActivityDetection'],\n automaticActivityDetectionToVertex(fromAutomaticActivityDetection),\n );\n }\n\n const fromActivityHandling = common.getValueByPath(fromObject, [\n 'activityHandling',\n ]);\n if (fromActivityHandling !== undefined && fromActivityHandling !== null) {\n common.setValueByPath(toObject, ['activityHandling'], fromActivityHandling);\n }\n\n const fromTurnCoverage = common.getValueByPath(fromObject, ['turnCoverage']);\n if (fromTurnCoverage !== undefined && fromTurnCoverage !== null) {\n common.setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);\n }\n\n return toObject;\n}\n\nfunction liveConnectConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveConnectConfig,\n): types.LiveClientSetup {\n const toObject: Record = {};\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (fromGenerationConfig !== undefined) {\n common.setValueByPath(toObject, ['generationConfig'], fromGenerationConfig);\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities !== undefined) {\n common.setValueByPath(\n toObject,\n ['generationConfig', 'responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig !== undefined) {\n common.setValueByPath(\n toObject,\n ['generationConfig', 'speechConfig'],\n fromSpeechConfig,\n );\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (fromSystemInstruction !== undefined && fromSystemInstruction !== null) {\n common.setValueByPath(\n toObject,\n ['systemInstruction'],\n contentToMldev(apiClient, fromSystemInstruction),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (\n fromTools !== undefined &&\n fromTools !== null &&\n Array.isArray(fromTools)\n ) {\n common.setValueByPath(\n toObject,\n ['tools'],\n fromTools.map((item: types.Tool) => {\n return toolToMldev(apiClient, item);\n }),\n );\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (fromSessionResumption !== undefined && fromSessionResumption !== null) {\n common.setValueByPath(\n toObject,\n ['sessionResumption'],\n liveClientSessionResumptionConfigToMldev(fromSessionResumption),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (\n fromContextWindowCompression !== undefined &&\n fromContextWindowCompression !== null\n ) {\n common.setValueByPath(\n toObject,\n ['contextWindowCompression'],\n contextWindowCompressionToMldev(fromContextWindowCompression),\n );\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (\n fromRealtimeInputConfig !== undefined &&\n fromRealtimeInputConfig !== null\n ) {\n common.setValueByPath(\n toObject,\n ['realtimeInputConfig'],\n realtimeInputConfigToMldev(fromRealtimeInputConfig),\n );\n }\n\n return toObject;\n}\n\nfunction liveConnectConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveConnectConfig,\n): types.LiveClientSetup {\n const toObject: Record = {};\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (fromGenerationConfig !== undefined) {\n common.setValueByPath(toObject, ['generationConfig'], fromGenerationConfig);\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities !== undefined) {\n common.setValueByPath(\n toObject,\n ['generationConfig', 'responseModalities'],\n fromResponseModalities,\n );\n } else {\n // Set default to AUDIO to align with MLDev API.\n common.setValueByPath(\n toObject,\n ['generationConfig', 'responseModalities'],\n ['AUDIO'],\n );\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig !== undefined) {\n common.setValueByPath(\n toObject,\n ['generationConfig', 'speechConfig'],\n fromSpeechConfig,\n );\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (fromSystemInstruction !== undefined && fromSystemInstruction !== null) {\n common.setValueByPath(\n toObject,\n ['systemInstruction'],\n contentToVertex(apiClient, fromSystemInstruction),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (\n fromTools !== undefined &&\n fromTools !== null &&\n Array.isArray(fromTools)\n ) {\n common.setValueByPath(\n toObject,\n ['tools'],\n fromTools.map((item: types.Tool) => {\n return toolToVertex(apiClient, item);\n }),\n );\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (fromSessionResumption !== undefined && fromSessionResumption !== null) {\n common.setValueByPath(\n toObject,\n ['sessionResumption'],\n liveClientSessionResumptionConfigToVertex(fromSessionResumption),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (\n fromContextWindowCompression !== undefined &&\n fromContextWindowCompression !== null\n ) {\n common.setValueByPath(\n toObject,\n ['contextWindowCompression'],\n contextWindowCompressionToVertex(fromContextWindowCompression),\n );\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (\n fromRealtimeInputConfig !== undefined &&\n fromRealtimeInputConfig !== null\n ) {\n common.setValueByPath(\n toObject,\n ['realtimeInputConfig'],\n realtimeInputConfigToVertex(fromRealtimeInputConfig),\n );\n }\n\n return toObject;\n}\n\nfunction liveServerContentFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerContent,\n): types.LiveServerContent {\n const toObject: Record = {};\n\n const fromModelTurn = common.getValueByPath(fromObject, ['modelTurn']);\n if (fromModelTurn !== undefined && fromModelTurn !== null) {\n common.setValueByPath(\n toObject,\n ['modelTurn'],\n contentFromMldev(apiClient, fromModelTurn),\n );\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete !== undefined) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n const fromInterrupted = common.getValueByPath(fromObject, ['interrupted']);\n if (fromInterrupted !== undefined) {\n common.setValueByPath(toObject, ['interrupted'], fromInterrupted);\n }\n\n const fromGenerationComplete = common.getValueByPath(fromObject, [\n 'generationComplete',\n ]);\n if (fromGenerationComplete != null) {\n common.setValueByPath(\n toObject,\n ['generationComplete'],\n fromGenerationComplete,\n );\n }\n\n return toObject;\n}\n\nfunction liveServerContentFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerContent,\n): types.LiveServerContent {\n const toObject: Record = {};\n\n const fromModelTurn = common.getValueByPath(fromObject, ['modelTurn']);\n if (fromModelTurn !== undefined && fromModelTurn !== null) {\n common.setValueByPath(\n toObject,\n ['modelTurn'],\n contentFromVertex(apiClient, fromModelTurn),\n );\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete !== undefined) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n const fromInterrupted = common.getValueByPath(fromObject, ['interrupted']);\n if (fromInterrupted !== undefined) {\n common.setValueByPath(toObject, ['interrupted'], fromInterrupted);\n }\n\n const fromGenerationComplete = common.getValueByPath(fromObject, [\n 'generationComplete',\n ]);\n if (fromGenerationComplete != null) {\n common.setValueByPath(\n toObject,\n ['generationComplete'],\n fromGenerationComplete,\n );\n }\n return toObject;\n}\n\nfunction functionCallFromMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCall,\n): types.FunctionCall {\n const toObject: Record = {};\n\n const fromId = common.getValueByPath(fromObject, ['id']);\n if (fromId !== undefined) {\n common.setValueByPath(toObject, ['id'], fromId);\n }\n\n const fromArgs = common.getValueByPath(fromObject, ['args']);\n if (fromArgs !== undefined) {\n common.setValueByPath(toObject, ['args'], fromArgs);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName !== undefined) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n return toObject;\n}\n\nfunction functionCallFromVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCall,\n): types.FunctionCall {\n const toObject: Record = {};\n\n const fromArgs = common.getValueByPath(fromObject, ['args']);\n if (fromArgs !== undefined) {\n common.setValueByPath(toObject, ['args'], fromArgs);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName !== undefined) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n return toObject;\n}\n\nfunction liveServerToolCallFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCall,\n): types.LiveServerToolCall {\n const toObject: Record = {};\n\n const fromFunctionCalls = common.getValueByPath(fromObject, [\n 'functionCalls',\n ]);\n if (\n fromFunctionCalls !== undefined &&\n fromFunctionCalls !== null &&\n Array.isArray(fromFunctionCalls)\n ) {\n common.setValueByPath(\n toObject,\n ['functionCalls'],\n fromFunctionCalls.map((item: types.FunctionCall) => {\n return functionCallFromMldev(apiClient, item);\n }),\n );\n }\n\n return toObject;\n}\n\nfunction liveServerToolCallFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCall,\n): types.LiveServerToolCall {\n const toObject: Record = {};\n\n const fromFunctionCalls = common.getValueByPath(fromObject, [\n 'functionCalls',\n ]);\n if (\n fromFunctionCalls !== undefined &&\n fromFunctionCalls !== null &&\n Array.isArray(fromFunctionCalls)\n ) {\n common.setValueByPath(\n toObject,\n ['functionCalls'],\n fromFunctionCalls.map((item: types.FunctionCall) => {\n return functionCallFromVertex(apiClient, item);\n }),\n );\n }\n\n return toObject;\n}\n\nfunction liveServerToolCallCancellationFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCallCancellation,\n): types.LiveServerToolCallCancellation {\n const toObject: Record = {};\n\n const fromIds = common.getValueByPath(fromObject, ['ids']);\n if (fromIds !== undefined) {\n common.setValueByPath(toObject, ['ids'], fromIds);\n }\n\n return toObject;\n}\n\nfunction liveServerToolCallCancellationFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCallCancellation,\n): types.LiveServerToolCallCancellation {\n const toObject: Record = {};\n\n const fromIds = common.getValueByPath(fromObject, ['ids']);\n if (fromIds !== undefined) {\n common.setValueByPath(toObject, ['ids'], fromIds);\n }\n\n return toObject;\n}\n\nfunction liveServerGoAwayFromMldev(\n fromObject: types.LiveServerGoAway,\n): types.LiveServerGoAway {\n const toObject: Record = {};\n\n const fromTimeLeft = common.getValueByPath(fromObject, ['timeLeft']);\n if (fromTimeLeft !== undefined) {\n common.setValueByPath(toObject, ['timeLeft'], fromTimeLeft);\n }\n\n return toObject;\n}\n\nfunction liveServerGoAwayFromVertex(\n fromObject: types.LiveServerGoAway,\n): types.LiveServerGoAway {\n const toObject: Record = {};\n\n const fromTimeLeft = common.getValueByPath(fromObject, ['timeLeft']);\n if (fromTimeLeft !== undefined) {\n common.setValueByPath(toObject, ['timeLeft'], fromTimeLeft);\n }\n\n return toObject;\n}\n\nfunction liveServerSessionResumptionUpdateFromMldev(\n fromObject: types.LiveServerSessionResumptionUpdate,\n): types.LiveServerSessionResumptionUpdate {\n const toObject: Record = {};\n\n const fromNewHandle = common.getValueByPath(fromObject, ['newHandle']);\n if (fromNewHandle !== undefined) {\n common.setValueByPath(toObject, ['newHandle'], fromNewHandle);\n }\n\n const fromResumable = common.getValueByPath(fromObject, ['resumable']);\n if (fromResumable !== undefined) {\n common.setValueByPath(toObject, ['resumable'], fromResumable);\n }\n\n const fromLastConsumedClientMessageIndex = common.getValueByPath(fromObject, [\n 'lastConsumedClientMessageIndex',\n ]);\n if (fromLastConsumedClientMessageIndex !== undefined) {\n common.setValueByPath(\n toObject,\n ['lastConsumedClientMessageIndex'],\n fromLastConsumedClientMessageIndex,\n );\n }\n\n return toObject;\n}\n\nfunction liveServerSessionResumptionUpdateFromVertex(\n fromObject: types.LiveServerSessionResumptionUpdate,\n): types.LiveServerSessionResumptionUpdate {\n const toObject: Record = {};\n\n const fromNewHandle = common.getValueByPath(fromObject, ['newHandle']);\n if (fromNewHandle !== undefined) {\n common.setValueByPath(toObject, ['newHandle'], fromNewHandle);\n }\n\n const fromResumable = common.getValueByPath(fromObject, ['resumable']);\n if (fromResumable !== undefined) {\n common.setValueByPath(toObject, ['resumable'], fromResumable);\n }\n\n const fromLastConsumedClientMessageIndex = common.getValueByPath(fromObject, [\n 'lastConsumedClientMessageIndex',\n ]);\n if (fromLastConsumedClientMessageIndex !== undefined) {\n common.setValueByPath(\n toObject,\n ['lastConsumedClientMessageIndex'],\n fromLastConsumedClientMessageIndex,\n );\n }\n\n return toObject;\n}\n\nfunction liveClientSessionResumptionConfigToMldev(\n fromObject: types.SessionResumptionConfig,\n): types.SessionResumptionConfig {\n const toObject: Record = {};\n\n const fromHandle = common.getValueByPath(fromObject, ['handle']);\n if (fromHandle !== undefined) {\n common.setValueByPath(toObject, ['handle'], fromHandle);\n }\n\n if (common.getValueByPath(fromObject, ['transparent']) !== undefined) {\n throw new Error('transparent parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nfunction liveClientSessionResumptionConfigToVertex(\n fromObject: types.SessionResumptionConfig,\n): types.SessionResumptionConfig {\n const toObject: Record = {};\n\n const fromHandle = common.getValueByPath(fromObject, ['handle']);\n if (fromHandle !== undefined) {\n common.setValueByPath(toObject, ['handle'], fromHandle);\n }\n\n const fromTransparent = common.getValueByPath(fromObject, ['transparent']);\n if (fromTransparent !== undefined) {\n common.setValueByPath(toObject, ['transparent'], fromTransparent);\n }\n\n return toObject;\n}\n\nexport function modalityTokenCountFromMldev(\n apiClient: ApiClient,\n fromObject: types.ModalityTokenCount,\n): types.ModalityTokenCount {\n const toObject: Record = {};\n\n const fromModality = common.getValueByPath(fromObject, ['modality']);\n if (fromModality != null) {\n common.setValueByPath(toObject, ['modality'], fromModality);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function usageMetadataFromMldev(\n apiClient: ApiClient,\n fromObject: types.UsageMetadata,\n): types.UsageMetadata {\n const toObject: Record = {};\n\n const fromPromptTokenCount = common.getValueByPath(fromObject, [\n 'promptTokenCount',\n ]);\n if (fromPromptTokenCount != null) {\n common.setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n const fromResponseTokenCount = common.getValueByPath(fromObject, [\n 'responseTokenCount',\n ]);\n if (fromResponseTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['responseTokenCount'],\n fromResponseTokenCount,\n );\n }\n\n const fromToolUsePromptTokenCount = common.getValueByPath(fromObject, [\n 'toolUsePromptTokenCount',\n ]);\n if (fromToolUsePromptTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokenCount'],\n fromToolUsePromptTokenCount,\n );\n }\n\n const fromThoughtsTokenCount = common.getValueByPath(fromObject, [\n 'thoughtsTokenCount',\n ]);\n if (fromThoughtsTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['thoughtsTokenCount'],\n fromThoughtsTokenCount,\n );\n }\n\n const fromTotalTokenCount = common.getValueByPath(fromObject, [\n 'totalTokenCount',\n ]);\n if (fromTotalTokenCount != null) {\n common.setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);\n }\n\n const fromPromptTokensDetails = common.getValueByPath(fromObject, [\n 'promptTokensDetails',\n ]);\n if (fromPromptTokensDetails != null) {\n if (Array.isArray(fromPromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails,\n );\n }\n }\n\n const fromCacheTokensDetails = common.getValueByPath(fromObject, [\n 'cacheTokensDetails',\n ]);\n if (fromCacheTokensDetails != null) {\n if (Array.isArray(fromCacheTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails,\n );\n }\n }\n\n const fromResponseTokensDetails = common.getValueByPath(fromObject, [\n 'responseTokensDetails',\n ]);\n if (fromResponseTokensDetails != null) {\n if (Array.isArray(fromResponseTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails,\n );\n }\n }\n\n const fromToolUsePromptTokensDetails = common.getValueByPath(fromObject, [\n 'toolUsePromptTokensDetails',\n ]);\n if (fromToolUsePromptTokensDetails != null) {\n if (Array.isArray(fromToolUsePromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails,\n );\n }\n }\n\n return toObject;\n}\n\nexport function modalityTokenCountFromVertex(\n apiClient: ApiClient,\n fromObject: types.ModalityTokenCount,\n): types.ModalityTokenCount {\n const toObject: Record = {};\n\n const fromModality = common.getValueByPath(fromObject, ['modality']);\n if (fromModality != null) {\n common.setValueByPath(toObject, ['modality'], fromModality);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function usageMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.UsageMetadata,\n): types.UsageMetadata {\n const toObject: Record = {};\n\n const fromPromptTokenCount = common.getValueByPath(fromObject, [\n 'promptTokenCount',\n ]);\n if (fromPromptTokenCount != null) {\n common.setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n const fromResponseTokenCount = common.getValueByPath(fromObject, [\n 'candidatesTokenCount',\n ]);\n if (fromResponseTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['responseTokenCount'],\n fromResponseTokenCount,\n );\n }\n\n const fromToolUsePromptTokenCount = common.getValueByPath(fromObject, [\n 'toolUsePromptTokenCount',\n ]);\n if (fromToolUsePromptTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokenCount'],\n fromToolUsePromptTokenCount,\n );\n }\n\n const fromThoughtsTokenCount = common.getValueByPath(fromObject, [\n 'thoughtsTokenCount',\n ]);\n if (fromThoughtsTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['thoughtsTokenCount'],\n fromThoughtsTokenCount,\n );\n }\n\n const fromTotalTokenCount = common.getValueByPath(fromObject, [\n 'totalTokenCount',\n ]);\n if (fromTotalTokenCount != null) {\n common.setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);\n }\n\n const fromPromptTokensDetails = common.getValueByPath(fromObject, [\n 'promptTokensDetails',\n ]);\n if (fromPromptTokensDetails != null) {\n if (Array.isArray(fromPromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails,\n );\n }\n }\n\n const fromCacheTokensDetails = common.getValueByPath(fromObject, [\n 'cacheTokensDetails',\n ]);\n if (fromCacheTokensDetails != null) {\n if (Array.isArray(fromCacheTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails,\n );\n }\n }\n\n const fromToolUsePromptTokensDetails = common.getValueByPath(fromObject, [\n 'toolUsePromptTokensDetails',\n ]);\n if (fromToolUsePromptTokensDetails != null) {\n if (Array.isArray(fromToolUsePromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails,\n );\n }\n }\n\n const fromResponseTokensDetails = common.getValueByPath(fromObject, [\n 'candidatesTokensDetails',\n ]);\n if (fromResponseTokensDetails != null) {\n if (Array.isArray(fromResponseTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails,\n );\n }\n }\n\n const fromTrafficType = common.getValueByPath(fromObject, ['trafficType']);\n if (fromTrafficType != null) {\n common.setValueByPath(toObject, ['trafficType'], fromTrafficType);\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Live client.\n *\n * @experimental\n */\n\nimport {ApiClient} from './_api_client';\nimport {Auth} from './_auth';\nimport * as t from './_transformers';\nimport {WebSocket, WebSocketCallbacks, WebSocketFactory} from './_websocket';\nimport * as converters from './converters/_live_converters';\nimport {contentToMldev, contentToVertex} from './converters/_models_converters';\nimport * as types from './types';\n\nconst FUNCTION_RESPONSE_REQUIRES_ID =\n 'FunctionResponse request must have an `id` field from the response of a ToolCall.FunctionalCalls in Google AI.';\n\n/**\n * Handles incoming messages from the WebSocket.\n *\n * @remarks\n * This function is responsible for parsing incoming messages, transforming them\n * into LiveServerMessages, and then calling the onmessage callback. Note that\n * the first message which is received from the server is a setupComplete\n * message.\n *\n * @param apiClient The ApiClient instance.\n * @param onmessage The user-provided onmessage callback (if any).\n * @param event The MessageEvent from the WebSocket.\n */\nasync function handleWebSocketMessage(\n apiClient: ApiClient,\n onmessage: (msg: types.LiveServerMessage) => void,\n event: MessageEvent,\n): Promise {\n let serverMessage: types.LiveServerMessage;\n let data: types.LiveServerMessage;\n if (event.data instanceof Blob) {\n data = JSON.parse(await event.data.text()) as types.LiveServerMessage;\n } else {\n data = JSON.parse(event.data) as types.LiveServerMessage;\n }\n if (apiClient.isVertexAI()) {\n serverMessage = converters.liveServerMessageFromVertex(apiClient, data);\n } else {\n serverMessage = converters.liveServerMessageFromMldev(apiClient, data);\n }\n\n onmessage(serverMessage);\n}\n\n/**\n Live class encapsulates the configuration for live interaction with the\n Generative Language API. It embeds ApiClient for general API settings.\n\n @experimental\n */\nexport class Live {\n constructor(\n private readonly apiClient: ApiClient,\n private readonly auth: Auth,\n private readonly webSocketFactory: WebSocketFactory,\n ) {}\n\n /**\n Establishes a connection to the specified model with the given\n configuration and returns a Session object representing that connection.\n\n @experimental\n\n @remarks\n If using the Gemini API, Live is currently only supported behind API\n version `v1alpha`. Ensure that the API version is set to `v1alpha` when\n initializing the SDK if relying on the Gemini API.\n\n @param params - The parameters for establishing a connection to the model.\n @return A live session.\n\n @example\n ```ts\n const session = await ai.live.connect({\n model: 'gemini-2.0-flash-exp',\n config: {\n responseModalities: [Modality.AUDIO],\n },\n callbacks: {\n onopen: () => {\n console.log('Connected to the socket.');\n },\n onmessage: (e: MessageEvent) => {\n console.log('Received message from the server: %s\\n', debug(e.data));\n },\n onerror: (e: ErrorEvent) => {\n console.log('Error occurred: %s\\n', debug(e.error));\n },\n onclose: (e: CloseEvent) => {\n console.log('Connection closed.');\n },\n },\n });\n ```\n */\n async connect(params: types.LiveConnectParameters): Promise {\n const websocketBaseUrl = this.apiClient.getWebsocketBaseUrl();\n const apiVersion = this.apiClient.getApiVersion();\n let url: string;\n const headers = mapToHeaders(this.apiClient.getDefaultHeaders());\n if (this.apiClient.isVertexAI()) {\n url = `${websocketBaseUrl}/ws/google.cloud.aiplatform.${\n apiVersion\n }.LlmBidiService/BidiGenerateContent`;\n await this.auth.addAuthHeaders(headers);\n } else {\n const apiKey = this.apiClient.getApiKey();\n url = `${websocketBaseUrl}/ws/google.ai.generativelanguage.${\n apiVersion\n }.GenerativeService.BidiGenerateContent?key=${apiKey}`;\n }\n\n let onopenResolve: (value: unknown) => void = () => {};\n const onopenPromise = new Promise((resolve: (value: unknown) => void) => {\n onopenResolve = resolve;\n });\n\n const callbacks: types.LiveCallbacks = params.callbacks;\n\n const onopenAwaitedCallback = function () {\n callbacks?.onopen?.();\n onopenResolve({});\n };\n\n const apiClient = this.apiClient;\n\n const websocketCallbacks: WebSocketCallbacks = {\n onopen: onopenAwaitedCallback,\n onmessage: (event: MessageEvent) => {\n void handleWebSocketMessage(apiClient, callbacks.onmessage, event);\n },\n onerror:\n callbacks?.onerror ??\n function (e: ErrorEvent) {\n void e;\n },\n onclose:\n callbacks?.onclose ??\n function (e: CloseEvent) {\n void e;\n },\n };\n\n const conn = this.webSocketFactory.create(\n url,\n headersToMap(headers),\n websocketCallbacks,\n );\n conn.connect();\n // Wait for the websocket to open before sending requests.\n await onopenPromise;\n\n let transformedModel = t.tModel(this.apiClient, params.model);\n if (\n this.apiClient.isVertexAI() &&\n transformedModel.startsWith('publishers/')\n ) {\n const project = this.apiClient.getProject();\n const location = this.apiClient.getLocation();\n transformedModel =\n `projects/${project}/locations/${location}/` + transformedModel;\n }\n\n let clientMessage: types.LiveClientMessage = {};\n const liveConnectParameters: types.LiveConnectParameters = {\n model: transformedModel,\n config: params.config,\n callbacks: params.callbacks,\n };\n if (this.apiClient.isVertexAI()) {\n clientMessage = converters.liveConnectParametersToVertex(\n this.apiClient,\n liveConnectParameters,\n );\n } else {\n clientMessage = converters.liveConnectParametersToMldev(\n this.apiClient,\n liveConnectParameters,\n );\n }\n conn.send(JSON.stringify(clientMessage));\n return new Session(conn, this.apiClient);\n }\n}\n\nconst defaultLiveSendClientContentParamerters: types.LiveSendClientContentParameters =\n {\n turnComplete: true,\n };\n\n/**\n Represents a connection to the API.\n\n @experimental\n */\nexport class Session {\n constructor(\n readonly conn: WebSocket,\n private readonly apiClient: ApiClient,\n ) {}\n\n private tLiveClientContent(\n apiClient: ApiClient,\n params: types.LiveSendClientContentParameters,\n ): types.LiveClientMessage {\n if (params.turns !== null && params.turns !== undefined) {\n let contents: types.Content[] = [];\n try {\n contents = t.tContents(\n apiClient,\n params.turns as types.ContentListUnion,\n );\n if (apiClient.isVertexAI()) {\n contents = contents.map((item) => contentToVertex(apiClient, item));\n } else {\n contents = contents.map((item) => contentToMldev(apiClient, item));\n }\n } catch {\n throw new Error(\n `Failed to parse client content \"turns\", type: '${typeof params.turns}'`,\n );\n }\n return {\n clientContent: {turns: contents, turnComplete: params.turnComplete},\n };\n }\n\n return {\n clientContent: {turnComplete: params.turnComplete},\n };\n }\n\n private tLiveClientRealtimeInput(\n apiClient: ApiClient,\n params: types.LiveSendRealtimeInputParameters,\n ): types.LiveClientMessage {\n let clientMessage: types.LiveClientMessage = {};\n if (!('media' in params) || !params.media) {\n throw new Error(\n `Failed to convert realtime input \"media\", type: '${typeof params.media}'`,\n );\n }\n\n // LiveClientRealtimeInput\n clientMessage = {\n realtimeInput: {\n mediaChunks: [params.media],\n activityStart: params.activityStart,\n activityEnd: params.activityEnd,\n },\n };\n return clientMessage;\n }\n\n private tLiveClienttToolResponse(\n apiClient: ApiClient,\n params: types.LiveSendToolResponseParameters,\n ): types.LiveClientMessage {\n let functionResponses: types.FunctionResponse[] = [];\n\n if (params.functionResponses == null) {\n throw new Error('functionResponses is required.');\n }\n\n if (!Array.isArray(params.functionResponses)) {\n functionResponses = [params.functionResponses];\n } else {\n functionResponses = params.functionResponses;\n }\n\n if (functionResponses.length === 0) {\n throw new Error('functionResponses is required.');\n }\n\n for (const functionResponse of functionResponses) {\n if (\n typeof functionResponse !== 'object' ||\n functionResponse === null ||\n !('name' in functionResponse) ||\n !('response' in functionResponse)\n ) {\n throw new Error(\n `Could not parse function response, type '${typeof functionResponse}'.`,\n );\n }\n if (!apiClient.isVertexAI() && !('id' in functionResponse)) {\n throw new Error(FUNCTION_RESPONSE_REQUIRES_ID);\n }\n }\n\n const clientMessage: types.LiveClientMessage = {\n toolResponse: {functionResponses: functionResponses},\n };\n return clientMessage;\n }\n\n /**\n Send a message over the established connection.\n\n @param params - Contains two **optional** properties, `turns` and\n `turnComplete`.\n\n - `turns` will be converted to a `Content[]`\n - `turnComplete: true` [default] indicates that you are done sending\n content and expect a response. If `turnComplete: false`, the server\n will wait for additional messages before starting generation.\n\n @experimental\n\n @remarks\n There are two ways to send messages to the live API:\n `sendClientContent` and `sendRealtimeInput`.\n\n `sendClientContent` messages are added to the model context **in order**.\n Having a conversation using `sendClientContent` messages is roughly\n equivalent to using the `Chat.sendMessageStream`, except that the state of\n the `chat` history is stored on the API server instead of locally.\n\n Because of `sendClientContent`'s order guarantee, the model cannot respons\n as quickly to `sendClientContent` messages as to `sendRealtimeInput`\n messages. This makes the biggest difference when sending objects that have\n significant preprocessing time (typically images).\n\n The `sendClientContent` message sends a `Content[]`\n which has more options than the `Blob` sent by `sendRealtimeInput`.\n\n So the main use-cases for `sendClientContent` over `sendRealtimeInput` are:\n\n - Sending anything that can't be represented as a `Blob` (text,\n `sendClientContent({turns=\"Hello?\"}`)).\n - Managing turns when not using audio input and voice activity detection.\n (`sendClientContent({turnComplete:true})` or the short form\n `sendClientContent()`)\n - Prefilling a conversation context\n ```\n sendClientContent({\n turns: [\n Content({role:user, parts:...}),\n Content({role:user, parts:...}),\n ...\n ]\n })\n ```\n @experimental\n */\n sendClientContent(params: types.LiveSendClientContentParameters) {\n params = {\n ...defaultLiveSendClientContentParamerters,\n ...params,\n };\n\n const clientMessage: types.LiveClientMessage = this.tLiveClientContent(\n this.apiClient,\n params,\n );\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Send a realtime message over the established connection.\n\n @param params - Contains one property, `media`.\n\n - `media` will be converted to a `Blob`\n\n @experimental\n\n @remarks\n Use `sendRealtimeInput` for realtime audio chunks and video frames (images).\n\n With `sendRealtimeInput` the api will respond to audio automatically\n based on voice activity detection (VAD).\n\n `sendRealtimeInput` is optimized for responsivness at the expense of\n deterministic ordering guarantees. Audio and video tokens are to the\n context when they become available.\n\n Note: The Call signature expects a `Blob` object, but only a subset\n of audio and image mimetypes are allowed.\n */\n sendRealtimeInput(params: types.LiveSendRealtimeInputParameters) {\n if (params.media == null) {\n throw new Error('Media is required.');\n }\n\n const clientMessage: types.LiveClientMessage =\n this.tLiveClientRealtimeInput(this.apiClient, params);\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Send a function response message over the established connection.\n\n @param params - Contains property `functionResponses`.\n\n - `functionResponses` will be converted to a `functionResponses[]`\n\n @remarks\n Use `sendFunctionResponse` to reply to `LiveServerToolCall` from the server.\n\n Use {@link types.LiveConnectConfig#tools} to configure the callable functions.\n\n @experimental\n */\n sendToolResponse(params: types.LiveSendToolResponseParameters) {\n if (params.functionResponses == null) {\n throw new Error('Tool response parameters are required.');\n }\n\n const clientMessage: types.LiveClientMessage =\n this.tLiveClienttToolResponse(this.apiClient, params);\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Terminates the WebSocket connection.\n\n @experimental\n\n @example\n ```ts\n const session = await ai.live.connect({\n model: 'gemini-2.0-flash-exp',\n config: {\n responseModalities: [Modality.AUDIO],\n }\n });\n\n session.close();\n ```\n */\n close() {\n this.conn.close();\n }\n}\n\n// Converts an headers object to a \"map\" object as expected by the WebSocket\n// constructor. We use this as the Auth interface works with Headers objects\n// while the WebSocket constructor takes a map.\nfunction headersToMap(headers: Headers): Record {\n const headerMap: Record = {};\n headers.forEach((value, key) => {\n headerMap[key] = value;\n });\n return headerMap;\n}\n\n// Converts a \"map\" object to a headers object. We use this as the Auth\n// interface works with Headers objects while the API client default headers\n// returns a map.\nfunction mapToHeaders(map: Record): Headers {\n const headers = new Headers();\n for (const [key, value] of Object.entries(map)) {\n headers.append(key, value);\n }\n return headers;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_models_converters';\nimport * as types from './types';\n\nexport class Models extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Makes an API request to generate content with a given model.\n *\n * For the `model` parameter, supported formats for Vertex AI API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The full resource name starts with 'projects/', for example:\n * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'\n * - The partial resource name with 'publishers/', for example:\n * 'publishers/google/models/gemini-2.0-flash' or\n * 'publishers/meta/models/llama-3.1-405b-instruct-maas'\n * - `/` separated publisher and model name, for example:\n * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas'\n *\n * For the `model` parameter, supported formats for Gemini API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The model name starts with 'models/', for example:\n * 'models/gemini-2.0-flash'\n * - For tuned models, the model name starts with 'tunedModels/',\n * for example:\n * 'tunedModels/1234567890123456789'\n *\n * Some models support multimodal input and output.\n *\n * @param params - The parameters for generating content.\n * @return The response from generating content.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents: 'why is the sky blue?',\n * config: {\n * candidateCount: 2,\n * }\n * });\n * console.log(response);\n * ```\n */\n generateContent = async (\n params: types.GenerateContentParameters,\n ): Promise => {\n return await this.generateContentInternal(params);\n };\n\n /**\n * Makes an API request to generate content with a given model and yields the\n * response in chunks.\n *\n * For the `model` parameter, supported formats for Vertex AI API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The full resource name starts with 'projects/', for example:\n * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'\n * - The partial resource name with 'publishers/', for example:\n * 'publishers/google/models/gemini-2.0-flash' or\n * 'publishers/meta/models/llama-3.1-405b-instruct-maas'\n * - `/` separated publisher and model name, for example:\n * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas'\n *\n * For the `model` parameter, supported formats for Gemini API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The model name starts with 'models/', for example:\n * 'models/gemini-2.0-flash'\n * - For tuned models, the model name starts with 'tunedModels/',\n * for example:\n * 'tunedModels/1234567890123456789'\n *\n * Some models support multimodal input and output.\n *\n * @param params - The parameters for generating content with streaming response.\n * @return The response from generating content.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContentStream({\n * model: 'gemini-2.0-flash',\n * contents: 'why is the sky blue?',\n * config: {\n * maxOutputTokens: 200,\n * }\n * });\n * for await (const chunk of response) {\n * console.log(chunk);\n * }\n * ```\n */\n generateContentStream = async (\n params: types.GenerateContentParameters,\n ): Promise> => {\n return await this.generateContentStreamInternal(params);\n };\n\n /**\n * Generates an image based on a text description and configuration.\n *\n * @param model - The model to use.\n * @param prompt - A text description of the image to generate.\n * @param [config] - The config for image generation.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await client.models.generateImages({\n * model: 'imagen-3.0-generate-002',\n * prompt: 'Robot holding a red skateboard',\n * config: {\n * numberOfImages: 1,\n * includeRaiReason: true,\n * },\n * });\n * console.log(response?.generatedImages?.[0]?.image?.imageBytes);\n * ```\n */\n generateImages = async (\n params: types.GenerateImagesParameters,\n ): Promise => {\n return await this.generateImagesInternal(params).then((apiResponse) => {\n let positivePromptSafetyAttributes;\n const generatedImages = [];\n\n if (apiResponse?.generatedImages) {\n for (const generatedImage of apiResponse.generatedImages) {\n if (\n generatedImage &&\n generatedImage?.safetyAttributes &&\n generatedImage?.safetyAttributes?.contentType === 'Positive Prompt'\n ) {\n positivePromptSafetyAttributes = generatedImage?.safetyAttributes;\n } else {\n generatedImages.push(generatedImage);\n }\n }\n }\n let response: types.GenerateImagesResponse;\n\n if (positivePromptSafetyAttributes) {\n response = {\n generatedImages: generatedImages,\n positivePromptSafetyAttributes: positivePromptSafetyAttributes,\n };\n } else {\n response = {\n generatedImages: generatedImages,\n };\n }\n return response;\n });\n };\n\n private async generateContentInternal(\n params: types.GenerateContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:generateContent',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateContentResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.generateContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:generateContent',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateContentResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n private async generateContentStreamInternal(\n params: types.GenerateContentParameters,\n ): Promise> {\n let response: Promise>;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:streamGenerateContent?alt=sse',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n const apiClient = this.apiClient;\n response = apiClient.requestStream({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n }) as Promise>;\n\n return response.then(async function* (\n apiResponse: AsyncGenerator,\n ) {\n for await (const chunk of apiResponse) {\n const resp = converters.generateContentResponseFromVertex(\n apiClient,\n chunk,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n yield typedResp;\n }\n });\n } else {\n const body = converters.generateContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:streamGenerateContent?alt=sse',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n const apiClient = this.apiClient;\n response = apiClient.requestStream({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n }) as Promise>;\n\n return response.then(async function* (\n apiResponse: AsyncGenerator,\n ) {\n for await (const chunk of apiResponse) {\n const resp = converters.generateContentResponseFromMldev(\n apiClient,\n chunk,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n yield typedResp;\n }\n });\n }\n }\n\n /**\n * Calculates embeddings for the given contents. Only text is supported.\n *\n * @param params - The parameters for embedding contents.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.embedContent({\n * model: 'text-embedding-004',\n * contents: [\n * 'What is your name?',\n * 'What is your favorite color?',\n * ],\n * config: {\n * outputDimensionality: 64,\n * },\n * });\n * console.log(response);\n * ```\n */\n async embedContent(\n params: types.EmbedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.embedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.embedContentResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.EmbedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.embedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:batchEmbedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.embedContentResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.EmbedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Generates an image based on a text description and configuration.\n *\n * @param params - The parameters for generating images.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateImages({\n * model: 'imagen-3.0-generate-002',\n * prompt: 'Robot holding a red skateboard',\n * config: {\n * numberOfImages: 1,\n * includeRaiReason: true,\n * },\n * });\n * console.log(response?.generatedImages?.[0]?.image?.imageBytes);\n * ```\n */\n private async generateImagesInternal(\n params: types.GenerateImagesParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateImagesParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateImagesResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateImagesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.generateImagesParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateImagesResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateImagesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Fetches information about a model by name.\n *\n * @example\n * ```ts\n * const modelInfo = await ai.models.get({model: 'gemini-2.0-flash'});\n * ```\n */\n async get(params: types.GetModelParameters): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getModelParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.modelFromVertex(this.apiClient, apiResponse);\n\n return resp as types.Model;\n });\n } else {\n const body = converters.getModelParametersToMldev(this.apiClient, params);\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.modelFromMldev(this.apiClient, apiResponse);\n\n return resp as types.Model;\n });\n }\n }\n\n /**\n * Counts the number of tokens in the given contents. Multimodal input is\n * supported for Gemini models.\n *\n * @param params - The parameters for counting tokens.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.countTokens({\n * model: 'gemini-2.0-flash',\n * contents: 'The quick brown fox jumps over the lazy dog.'\n * });\n * console.log(response);\n * ```\n */\n async countTokens(\n params: types.CountTokensParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.countTokensParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:countTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.countTokensResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.CountTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.countTokensParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:countTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.countTokensResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.CountTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Given a list of contents, returns a corresponding TokensInfo containing\n * the list of tokens and list of token ids.\n *\n * This method is not supported by the Gemini Developer API.\n *\n * @param params - The parameters for computing tokens.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.computeTokens({\n * model: 'gemini-2.0-flash',\n * contents: 'What is your name?'\n * });\n * console.log(response);\n * ```\n */\n async computeTokens(\n params: types.ComputeTokensParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.computeTokensParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:computeTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.computeTokensResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ComputeTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n throw new Error('This method is only supported by the Vertex AI.');\n }\n }\n\n /**\n * Generates videos based on a text description and configuration.\n *\n * @param params - The parameters for generating videos.\n * @return A Promise which allows you to track the progress and eventually retrieve the generated videos using the operations.get method.\n *\n * @example\n * ```ts\n * const operation = await ai.models.generateVideos({\n * model: 'veo-2.0-generate-001',\n * prompt: 'A neon hologram of a cat driving at top speed',\n * config: {\n * numberOfVideos: 1\n * });\n *\n * while (!operation.done) {\n * await new Promise(resolve => setTimeout(resolve, 10000));\n * operation = await ai.operations.getVideosOperation({operation: operation});\n * }\n *\n * console.log(operation.response?.generatedVideos?.[0]?.video?.uri);\n * ```\n */\n\n async generateVideos(\n params: types.GenerateVideosParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateVideosParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predictLongRunning',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n const body = converters.generateVideosParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predictLongRunning',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function getOperationParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'operationName'],\n fromOperationName,\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function getOperationParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'operationName'],\n fromOperationName,\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function fetchPredictOperationParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.FetchPredictOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(toObject, ['operationName'], fromOperationName);\n }\n\n const fromResourceName = common.getValueByPath(fromObject, ['resourceName']);\n if (fromResourceName != null) {\n common.setValueByPath(toObject, ['_url', 'resourceName'], fromResourceName);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function videoFromMldev(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['video', 'uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'video',\n 'encodedVideo',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['encoding']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromMldev(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, [\n 'generatedSamples',\n ]);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromMldev(apiClient, fromResponse),\n );\n }\n\n const fromResult = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResult != null) {\n common.setValueByPath(\n toObject,\n ['result'],\n generateVideosResponseFromMldev(apiClient, fromResult),\n );\n }\n\n return toObject;\n}\n\nexport function videoFromVertex(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromVertex(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, ['videos']);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromVertex(apiClient, fromResponse),\n );\n }\n\n const fromResult = common.getValueByPath(fromObject, ['response']);\n if (fromResult != null) {\n common.setValueByPath(\n toObject,\n ['result'],\n generateVideosResponseFromVertex(apiClient, fromResult),\n );\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_operations_converters';\nimport * as types from './types';\n\nexport class Operations extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Gets the status of a long-running operation.\n *\n * @param parameters The parameters for the get operation request.\n * @return The updated Operation object, with the latest status or result.\n */\n async getVideosOperation(\n parameters: types.OperationGetParameters,\n ): Promise {\n const operation = parameters.operation;\n const config = parameters.config;\n\n if (operation.name === undefined || operation.name === '') {\n throw new Error('Operation name is required.');\n }\n\n if (this.apiClient.isVertexAI()) {\n const resourceName = operation.name.split('/operations/')[0];\n var httpOptions: types.HttpOptions | undefined = undefined;\n\n if (config && 'httpOptions' in config) {\n httpOptions = config.httpOptions;\n }\n\n return this.fetchPredictVideosOperationInternal({\n operationName: operation.name,\n resourceName: resourceName,\n config: {httpOptions: httpOptions},\n });\n } else {\n return this.getVideosOperationInternal({\n operationName: operation.name,\n config: config,\n });\n }\n }\n\n private async getVideosOperationInternal(\n params: types.GetOperationParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getOperationParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{operationName}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n const body = converters.getOperationParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{operationName}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n }\n }\n\n private async fetchPredictVideosOperationInternal(\n params: types.FetchPredictOperationParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.fetchPredictOperationParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{resourceName}:fetchPredictOperation',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n throw new Error('This method is only supported by the Vertex AI.');\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {Auth} from './_auth';\nimport * as common from './_common';\nimport {Uploader} from './_uploader';\nimport {File, HttpOptions, HttpResponse, UploadFileConfig} from './types';\n\nconst CONTENT_TYPE_HEADER = 'Content-Type';\nconst SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';\nconst USER_AGENT_HEADER = 'User-Agent';\nconst GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';\nexport const SDK_VERSION = '0.8.0'; // x-release-please-version\nconst LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;\nconst VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';\nconst GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';\nconst responseLineRE = /^data: (.*)(?:\\n\\n|\\r\\r|\\r\\n\\r\\n)/;\n\n/**\n * Client errors raised by the GenAI API.\n */\nexport class ClientError extends Error {\n constructor(message: string, stackTrace?: string) {\n if (stackTrace) {\n super(message, {cause: stackTrace});\n } else {\n super(message, {cause: new Error().stack});\n }\n this.message = message;\n this.name = 'ClientError';\n }\n}\n\n/**\n * Server errors raised by the GenAI API.\n */\nexport class ServerError extends Error {\n constructor(message: string, stackTrace?: string) {\n if (stackTrace) {\n super(message, {cause: stackTrace});\n } else {\n super(message, {cause: new Error().stack});\n }\n this.message = message;\n this.name = 'ServerError';\n }\n}\n\n/**\n * Options for initializing the ApiClient. The ApiClient uses the parameters\n * for authentication purposes as well as to infer if SDK should send the\n * request to Vertex AI or Gemini API.\n */\nexport interface ApiClientInitOptions {\n /**\n * The object used for adding authentication headers to API requests.\n */\n auth: Auth;\n /**\n * The uploader to use for uploading files. This field is required for\n * creating a client, will be set through the Node_client or Web_client.\n */\n uploader: Uploader;\n /**\n * Optional. The Google Cloud project ID for Vertex AI users.\n * It is not the numeric project name.\n * If not provided, SDK will try to resolve it from runtime environment.\n */\n project?: string;\n /**\n * Optional. The Google Cloud project location for Vertex AI users.\n * If not provided, SDK will try to resolve it from runtime environment.\n */\n location?: string;\n /**\n * The API Key. This is required for Gemini API users.\n */\n apiKey?: string;\n /**\n * Optional. Set to true if you intend to call Vertex AI endpoints.\n * If unset, default SDK behavior is to call Gemini API.\n */\n vertexai?: boolean;\n /**\n * Optional. The API version for the endpoint.\n * If unset, SDK will choose a default api version.\n */\n apiVersion?: string;\n /**\n * Optional. A set of customizable configuration for HTTP requests.\n */\n httpOptions?: HttpOptions;\n /**\n * Optional. An extra string to append at the end of the User-Agent header.\n *\n * This can be used to e.g specify the runtime and its version.\n */\n userAgentExtra?: string;\n}\n\n/**\n * Represents the necessary information to send a request to an API endpoint.\n * This interface defines the structure for constructing and executing HTTP\n * requests.\n */\nexport interface HttpRequest {\n /**\n * URL path from the modules, this path is appended to the base API URL to\n * form the complete request URL.\n *\n * If you wish to set full URL, use httpOptions.baseUrl instead. Example to\n * set full URL in the request:\n *\n * const request: HttpRequest = {\n * path: '',\n * httpOptions: {\n * baseUrl: 'https://',\n * apiVersion: '',\n * },\n * httpMethod: 'GET',\n * };\n *\n * The result URL will be: https://\n *\n */\n path: string;\n /**\n * Optional query parameters to be appended to the request URL.\n */\n queryParams?: Record;\n /**\n * Optional request body in json string or Blob format, GET request doesn't\n * need a request body.\n */\n body?: string | Blob;\n /**\n * The HTTP method to be used for the request.\n */\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE';\n /**\n * Optional set of customizable configuration for HTTP requests.\n */\n httpOptions?: HttpOptions;\n}\n\n/**\n * The ApiClient class is used to send requests to the Gemini API or Vertex AI\n * endpoints.\n */\nexport class ApiClient {\n readonly clientOptions: ApiClientInitOptions;\n\n constructor(opts: ApiClientInitOptions) {\n this.clientOptions = {\n ...opts,\n project: opts.project,\n location: opts.location,\n apiKey: opts.apiKey,\n vertexai: opts.vertexai,\n };\n\n const initHttpOptions: HttpOptions = {};\n\n if (this.clientOptions.vertexai) {\n initHttpOptions.apiVersion =\n this.clientOptions.apiVersion ?? VERTEX_AI_API_DEFAULT_VERSION;\n // Assume that proj/api key validation occurs before they are passed in.\n if (this.getProject() || this.getLocation()) {\n initHttpOptions.baseUrl = `https://${this.clientOptions.location}-aiplatform.googleapis.com/`;\n this.clientOptions.apiKey = undefined; // unset API key.\n } else {\n initHttpOptions.baseUrl = `https://aiplatform.googleapis.com/`;\n this.clientOptions.project = undefined; // unset project.\n this.clientOptions.location = undefined; // unset location.\n }\n } else {\n initHttpOptions.apiVersion =\n this.clientOptions.apiVersion ?? GOOGLE_AI_API_DEFAULT_VERSION;\n initHttpOptions.baseUrl = `https://generativelanguage.googleapis.com/`;\n }\n\n initHttpOptions.headers = this.getDefaultHeaders();\n\n this.clientOptions.httpOptions = initHttpOptions;\n\n if (opts.httpOptions) {\n this.clientOptions.httpOptions = this.patchHttpOptions(\n initHttpOptions,\n opts.httpOptions,\n );\n }\n }\n\n isVertexAI(): boolean {\n return this.clientOptions.vertexai ?? false;\n }\n\n getProject() {\n return this.clientOptions.project;\n }\n\n getLocation() {\n return this.clientOptions.location;\n }\n\n getApiVersion() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.apiVersion !== undefined\n ) {\n return this.clientOptions.httpOptions.apiVersion;\n }\n throw new Error('API version is not set.');\n }\n\n getBaseUrl() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.baseUrl !== undefined\n ) {\n return this.clientOptions.httpOptions.baseUrl;\n }\n throw new Error('Base URL is not set.');\n }\n\n getRequestUrl() {\n return this.getRequestUrlInternal(this.clientOptions.httpOptions);\n }\n\n getHeaders() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.headers !== undefined\n ) {\n return this.clientOptions.httpOptions.headers;\n } else {\n throw new Error('Headers are not set.');\n }\n }\n\n private getRequestUrlInternal(httpOptions?: HttpOptions) {\n if (\n !httpOptions ||\n httpOptions.baseUrl === undefined ||\n httpOptions.apiVersion === undefined\n ) {\n throw new Error('HTTP options are not correctly set.');\n }\n const baseUrl = httpOptions.baseUrl.endsWith('/')\n ? httpOptions.baseUrl.slice(0, -1)\n : httpOptions.baseUrl;\n const urlElement: Array = [baseUrl];\n if (httpOptions.apiVersion && httpOptions.apiVersion !== '') {\n urlElement.push(httpOptions.apiVersion);\n }\n return urlElement.join('/');\n }\n\n getBaseResourcePath() {\n return `projects/${this.clientOptions.project}/locations/${\n this.clientOptions.location\n }`;\n }\n\n getApiKey() {\n return this.clientOptions.apiKey;\n }\n\n getWebsocketBaseUrl() {\n const baseUrl = this.getBaseUrl();\n const urlParts = new URL(baseUrl);\n urlParts.protocol = 'wss';\n return urlParts.toString();\n }\n\n setBaseUrl(url: string) {\n if (this.clientOptions.httpOptions) {\n this.clientOptions.httpOptions.baseUrl = url;\n } else {\n throw new Error('HTTP options are not correctly set.');\n }\n }\n\n private constructUrl(\n path: string,\n httpOptions: HttpOptions,\n prependProjectLocation: boolean,\n ): URL {\n const urlElement: Array = [this.getRequestUrlInternal(httpOptions)];\n if (prependProjectLocation) {\n urlElement.push(this.getBaseResourcePath());\n }\n if (path !== '') {\n urlElement.push(path);\n }\n const url = new URL(`${urlElement.join('/')}`);\n\n return url;\n }\n\n private shouldPrependVertexProjectPath(request: HttpRequest): boolean {\n if (this.clientOptions.apiKey) {\n return false;\n }\n if (!this.clientOptions.vertexai) {\n return false;\n }\n if (request.path.startsWith('projects/')) {\n // Assume the path already starts with\n // `projects//location/`.\n return false;\n }\n if (\n request.httpMethod === 'GET' &&\n request.path.startsWith('publishers/google/models')\n ) {\n // These paths are used by Vertex's models.get and models.list\n // calls. For base models Vertex does not accept a project/location\n // prefix (for tuned model the prefix is required).\n return false;\n }\n return true;\n }\n\n async request(request: HttpRequest): Promise {\n let patchedHttpOptions = this.clientOptions.httpOptions!;\n if (request.httpOptions) {\n patchedHttpOptions = this.patchHttpOptions(\n this.clientOptions.httpOptions!,\n request.httpOptions,\n );\n }\n\n const prependProjectLocation = this.shouldPrependVertexProjectPath(request);\n const url = this.constructUrl(\n request.path,\n patchedHttpOptions,\n prependProjectLocation,\n );\n if (request.queryParams) {\n for (const [key, value] of Object.entries(request.queryParams)) {\n url.searchParams.append(key, String(value));\n }\n }\n let requestInit: RequestInit = {};\n if (request.httpMethod === 'GET') {\n if (request.body && request.body !== '{}') {\n throw new Error(\n 'Request body should be empty for GET request, but got non empty request body',\n );\n }\n } else {\n requestInit.body = request.body;\n }\n requestInit = await this.includeExtraHttpOptionsToRequestInit(\n requestInit,\n patchedHttpOptions,\n );\n return this.unaryApiCall(url, requestInit, request.httpMethod);\n }\n\n private patchHttpOptions(\n baseHttpOptions: HttpOptions,\n requestHttpOptions: HttpOptions,\n ): HttpOptions {\n const patchedHttpOptions = JSON.parse(\n JSON.stringify(baseHttpOptions),\n ) as HttpOptions;\n\n for (const [key, value] of Object.entries(requestHttpOptions)) {\n // Records compile to objects.\n if (typeof value === 'object') {\n // @ts-expect-error TS2345TS7053: Element implicitly has an 'any' type\n // because expression of type 'string' can't be used to index type\n // 'HttpOptions'.\n patchedHttpOptions[key] = {...patchedHttpOptions[key], ...value};\n } else if (value !== undefined) {\n // @ts-expect-error TS2345TS7053: Element implicitly has an 'any' type\n // because expression of type 'string' can't be used to index type\n // 'HttpOptions'.\n patchedHttpOptions[key] = value;\n }\n }\n return patchedHttpOptions;\n }\n\n async requestStream(\n request: HttpRequest,\n // TODO: b/407059430 - Replace with HttpResponse.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): Promise {\n let patchedHttpOptions = this.clientOptions.httpOptions!;\n if (request.httpOptions) {\n patchedHttpOptions = this.patchHttpOptions(\n this.clientOptions.httpOptions!,\n request.httpOptions,\n );\n }\n\n const prependProjectLocation = this.shouldPrependVertexProjectPath(request);\n const url = this.constructUrl(\n request.path,\n patchedHttpOptions,\n prependProjectLocation,\n );\n if (!url.searchParams.has('alt') || url.searchParams.get('alt') !== 'sse') {\n url.searchParams.set('alt', 'sse');\n }\n let requestInit: RequestInit = {};\n requestInit.body = request.body;\n requestInit = await this.includeExtraHttpOptionsToRequestInit(\n requestInit,\n patchedHttpOptions,\n );\n return this.streamApiCall(url, requestInit, request.httpMethod);\n }\n\n private async includeExtraHttpOptionsToRequestInit(\n requestInit: RequestInit,\n httpOptions: HttpOptions,\n ): Promise {\n if (httpOptions && httpOptions.timeout && httpOptions.timeout > 0) {\n const abortController = new AbortController();\n const signal = abortController.signal;\n setTimeout(() => abortController.abort(), httpOptions.timeout);\n requestInit.signal = signal;\n }\n requestInit.headers = await this.getHeadersInternal(httpOptions);\n return requestInit;\n }\n\n private async unaryApiCall(\n url: URL,\n requestInit: RequestInit,\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE',\n ): Promise {\n return this.apiCall(url.toString(), {\n ...requestInit,\n method: httpMethod,\n })\n .then(async (response) => {\n await throwErrorIfNotOK(response);\n return new HttpResponse(response);\n })\n .catch((e) => {\n if (e instanceof Error) {\n throw e;\n } else {\n throw new Error(JSON.stringify(e));\n }\n });\n }\n\n private async streamApiCall(\n url: URL,\n requestInit: RequestInit,\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE',\n // TODO: b/407059430 - Replace with HttpResponse.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): Promise> {\n return this.apiCall(url.toString(), {\n ...requestInit,\n method: httpMethod,\n })\n .then(async (response) => {\n await throwErrorIfNotOK(response);\n return this.processStreamResponse(response);\n })\n .catch((e) => {\n if (e instanceof Error) {\n throw e;\n } else {\n throw new Error(JSON.stringify(e));\n }\n });\n }\n\n async *processStreamResponse(\n response: Response,\n // TODO: b/407059430 - Replace with HttpResponse.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): AsyncGenerator {\n const reader = response?.body?.getReader();\n const decoder = new TextDecoder('utf-8');\n if (!reader) {\n throw new Error('Response body is empty');\n }\n\n try {\n let buffer = '';\n while (true) {\n const {done, value} = await reader.read();\n if (done) {\n if (buffer.trim().length > 0) {\n throw new Error('Incomplete JSON segment at the end');\n }\n break;\n }\n const chunkString = decoder.decode(value);\n buffer += chunkString;\n let match = buffer.match(responseLineRE);\n while (match) {\n const processedChunkString = match[1];\n try {\n const chunkData = JSON.parse(processedChunkString);\n yield chunkData;\n buffer = buffer.slice(match[0].length);\n match = buffer.match(responseLineRE);\n } catch (e) {\n throw new Error(\n `exception parsing stream chunk ${processedChunkString}. ${e}`,\n );\n }\n }\n }\n } finally {\n reader.releaseLock();\n }\n }\n private async apiCall(\n url: string,\n requestInit: RequestInit,\n ): Promise {\n return fetch(url, requestInit).catch((e) => {\n throw new Error(`exception ${e} sending request`);\n });\n }\n\n getDefaultHeaders(): Record {\n const headers: Record = {};\n\n const versionHeaderValue =\n LIBRARY_LABEL + ' ' + this.clientOptions.userAgentExtra;\n\n headers[USER_AGENT_HEADER] = versionHeaderValue;\n headers[GOOGLE_API_CLIENT_HEADER] = versionHeaderValue;\n headers[CONTENT_TYPE_HEADER] = 'application/json';\n\n return headers;\n }\n\n private async getHeadersInternal(\n httpOptions: HttpOptions | undefined,\n ): Promise {\n const headers = new Headers();\n if (httpOptions && httpOptions.headers) {\n for (const [key, value] of Object.entries(httpOptions.headers)) {\n headers.append(key, value);\n }\n // Append a timeout header if it is set, note that the timeout option is\n // in milliseconds but the header is in seconds.\n if (httpOptions.timeout && httpOptions.timeout > 0) {\n headers.append(\n SERVER_TIMEOUT_HEADER,\n String(Math.ceil(httpOptions.timeout / 1000)),\n );\n }\n }\n await this.clientOptions.auth.addAuthHeaders(headers);\n return headers;\n }\n\n /**\n * Uploads a file asynchronously using Gemini API only, this is not supported\n * in Vertex AI.\n *\n * @param file The string path to the file to be uploaded or a Blob object.\n * @param config Optional parameters specified in the `UploadFileConfig`\n * interface. @see {@link UploadFileConfig}\n * @return A promise that resolves to a `File` object.\n * @throws An error if called on a Vertex AI client.\n * @throws An error if the `mimeType` is not provided and can not be inferred,\n */\n async uploadFile(\n file: string | Blob,\n config?: UploadFileConfig,\n ): Promise {\n const fileToUpload: File = {};\n if (config != null) {\n fileToUpload.mimeType = config.mimeType;\n fileToUpload.name = config.name;\n fileToUpload.displayName = config.displayName;\n }\n\n if (fileToUpload.name && !fileToUpload.name.startsWith('files/')) {\n fileToUpload.name = `files/${fileToUpload.name}`;\n }\n\n const uploader = this.clientOptions.uploader;\n const fileStat = await uploader.stat(file);\n fileToUpload.sizeBytes = String(fileStat.size);\n const mimeType = config?.mimeType ?? fileStat.type;\n if (mimeType === undefined || mimeType === '') {\n throw new Error(\n 'Can not determine mimeType. Please provide mimeType in the config.',\n );\n }\n fileToUpload.mimeType = mimeType;\n\n const uploadUrl = await this.fetchUploadUrl(fileToUpload, config);\n return uploader.upload(file, uploadUrl, this);\n }\n\n private async fetchUploadUrl(\n file: File,\n config?: UploadFileConfig,\n ): Promise {\n let httpOptions: HttpOptions = {};\n if (config?.httpOptions) {\n httpOptions = config.httpOptions;\n } else {\n httpOptions = {\n apiVersion: '', // api-version is set in the path.\n headers: {\n 'Content-Type': 'application/json',\n 'X-Goog-Upload-Protocol': 'resumable',\n 'X-Goog-Upload-Command': 'start',\n 'X-Goog-Upload-Header-Content-Length': `${file.sizeBytes}`,\n 'X-Goog-Upload-Header-Content-Type': `${file.mimeType}`,\n },\n };\n }\n\n const body: Record = {\n 'file': file,\n };\n const httpResponse = await this.request({\n path: common.formatMap(\n 'upload/v1beta/files',\n body['_url'] as Record,\n ),\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions,\n });\n\n if (!httpResponse || !httpResponse?.headers) {\n throw new Error(\n 'Server did not return an HttpResponse or the returned HttpResponse did not have headers.',\n );\n }\n\n const uploadUrl: string | undefined =\n httpResponse?.headers?.['x-goog-upload-url'];\n if (uploadUrl === undefined) {\n throw new Error(\n 'Failed to get upload url. Server did not return the x-google-upload-url in the headers',\n );\n }\n return uploadUrl;\n }\n}\n\nasync function throwErrorIfNotOK(response: Response | undefined) {\n if (response === undefined) {\n throw new ServerError('response is undefined');\n }\n if (!response.ok) {\n const status: number = response.status;\n const statusText: string = response.statusText;\n let errorBody: Record;\n if (response.headers.get('content-type')?.includes('application/json')) {\n errorBody = await response.json();\n } else {\n errorBody = {\n error: {\n message: 'exception parsing response',\n code: response.status,\n status: response.statusText,\n },\n };\n }\n const errorMessage = `got status: ${status} ${statusText}. ${JSON.stringify(\n errorBody,\n )}`;\n if (status >= 400 && status < 500) {\n const clientError = new ClientError(errorMessage);\n throw clientError;\n } else if (status >= 500 && status < 600) {\n const serverError = new ServerError(errorMessage);\n throw serverError;\n }\n throw new Error(errorMessage);\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {GoogleAuth, GoogleAuthOptions} from 'google-auth-library';\n\nimport {Auth} from '../_auth';\n\nexport const GOOGLE_API_KEY_HEADER = 'x-goog-api-key';\nconst REQUIRED_VERTEX_AI_SCOPE =\n 'https://www.googleapis.com/auth/cloud-platform';\n\nexport interface NodeAuthOptions {\n /**\n * The API Key. This is required for Gemini API users.\n */\n apiKey?: string;\n /**\n * Optional. These are the authentication options provided by google-auth-library for Vertex AI users.\n * Complete list of authentication options are documented in the\n * GoogleAuthOptions interface:\n * https://github.com/googleapis/google-auth-library-nodejs/blob/main/src/auth/googleauth.ts.\n */\n googleAuthOptions?: GoogleAuthOptions;\n}\n\nexport class NodeAuth implements Auth {\n private readonly googleAuth?: GoogleAuth;\n private readonly apiKey?: string;\n\n constructor(opts: NodeAuthOptions) {\n if (opts.apiKey !== undefined) {\n this.apiKey = opts.apiKey;\n return;\n }\n const vertexAuthOptions = buildGoogleAuthOptions(opts.googleAuthOptions);\n this.googleAuth = new GoogleAuth(vertexAuthOptions);\n }\n\n async addAuthHeaders(headers: Headers): Promise {\n if (this.apiKey !== undefined) {\n this.addKeyHeader(headers);\n return;\n }\n\n return this.addGoogleAuthHeaders(headers);\n }\n\n private addKeyHeader(headers: Headers) {\n if (headers.get(GOOGLE_API_KEY_HEADER) !== null) {\n return;\n }\n if (this.apiKey === undefined) {\n // This should never happen, this method is only called\n // when apiKey is set.\n throw new Error('Trying to set API key header but apiKey is not set');\n }\n headers.append(GOOGLE_API_KEY_HEADER, this.apiKey);\n }\n\n private async addGoogleAuthHeaders(headers: Headers): Promise {\n if (this.googleAuth === undefined) {\n // This should never happen, addGoogleAuthHeaders should only be\n // called when there is no apiKey set and in these cases googleAuth\n // is set.\n throw new Error(\n 'Trying to set google-auth headers but googleAuth is unset',\n );\n }\n const authHeaders = await this.googleAuth.getRequestHeaders();\n for (const key in authHeaders) {\n if (headers.get(key) !== null) {\n continue;\n }\n headers.append(key, authHeaders[key]);\n }\n }\n}\n\nfunction buildGoogleAuthOptions(\n googleAuthOptions?: GoogleAuthOptions,\n): GoogleAuthOptions {\n let authOptions: GoogleAuthOptions;\n if (!googleAuthOptions) {\n authOptions = {\n scopes: [REQUIRED_VERTEX_AI_SCOPE],\n };\n return authOptions;\n } else {\n authOptions = googleAuthOptions;\n if (!authOptions.scopes) {\n authOptions.scopes = [REQUIRED_VERTEX_AI_SCOPE];\n return authOptions;\n } else if (\n (typeof authOptions.scopes === 'string' &&\n authOptions.scopes !== REQUIRED_VERTEX_AI_SCOPE) ||\n (Array.isArray(authOptions.scopes) &&\n authOptions.scopes.indexOf(REQUIRED_VERTEX_AI_SCOPE) < 0)\n ) {\n throw new Error(\n `Invalid auth scopes. Scopes must include: ${REQUIRED_VERTEX_AI_SCOPE}`,\n );\n }\n return authOptions;\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport * as NodeWs from 'ws';\n\nimport {WebSocket, WebSocketCallbacks, WebSocketFactory} from '../_websocket';\n\nexport class NodeWebSocketFactory implements WebSocketFactory {\n create(\n url: string,\n headers: Record,\n callbacks: WebSocketCallbacks,\n ): WebSocket {\n return new NodeWebSocket(url, headers, callbacks);\n }\n}\n\nexport class NodeWebSocket implements WebSocket {\n private ws?: NodeWs.WebSocket;\n\n constructor(\n private readonly url: string,\n private readonly headers: Record,\n private readonly callbacks: WebSocketCallbacks,\n ) {}\n\n connect(): void {\n this.ws = new NodeWs.WebSocket(this.url, {headers: this.headers});\n\n this.ws.onopen = this.callbacks.onopen;\n this.ws.onerror = this.callbacks.onerror;\n this.ws.onclose = this.callbacks.onclose;\n this.ws.onmessage = this.callbacks.onmessage;\n }\n\n send(message: string) {\n if (this.ws === undefined) {\n throw new Error('WebSocket is not connected');\n }\n\n this.ws.send(message);\n }\n\n close() {\n if (this.ws === undefined) {\n throw new Error('WebSocket is not connected');\n }\n\n this.ws.close();\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {ApiClient} from '../_api_client';\nimport {FileStat, Uploader} from '../_uploader';\nimport {File, HttpResponse} from '../types';\n\nimport {crossError} from './_cross_error';\n\nexport const MAX_CHUNK_SIZE = 1024 * 1024 * 8; // bytes\nexport class CrossUploader implements Uploader {\n async upload(\n file: string | Blob,\n uploadUrl: string,\n apiClient: ApiClient,\n ): Promise {\n if (typeof file === 'string') {\n throw crossError();\n } else {\n return uploadBlob(file, uploadUrl, apiClient);\n }\n }\n\n async stat(file: string | Blob): Promise {\n if (typeof file === 'string') {\n throw crossError();\n } else {\n return getBlobStat(file);\n }\n }\n}\n\nexport async function uploadBlob(\n file: Blob,\n uploadUrl: string,\n apiClient: ApiClient,\n): Promise {\n let fileSize = 0;\n let offset = 0;\n let response: HttpResponse = new HttpResponse(new Response());\n let uploadCommand = 'upload';\n fileSize = file.size;\n while (offset < fileSize) {\n const chunkSize = Math.min(MAX_CHUNK_SIZE, fileSize - offset);\n const chunk = file.slice(offset, offset + chunkSize);\n if (offset + chunkSize >= fileSize) {\n uploadCommand += ', finalize';\n }\n response = await apiClient.request({\n path: '',\n body: chunk,\n httpMethod: 'POST',\n httpOptions: {\n apiVersion: '',\n baseUrl: uploadUrl,\n headers: {\n 'X-Goog-Upload-Command': uploadCommand,\n 'X-Goog-Upload-Offset': String(offset),\n 'Content-Length': String(chunkSize),\n },\n },\n });\n offset += chunkSize;\n // The `x-goog-upload-status` header field can be `active`, `final` and\n //`cancelled` in resposne.\n if (response?.headers?.['x-goog-upload-status'] !== 'active') {\n break;\n }\n // TODO(b/401391430) Investigate why the upload status is not finalized\n // even though all content has been uploaded.\n if (fileSize <= offset) {\n throw new Error(\n 'All content has been uploaded, but the upload status is not finalized.',\n );\n }\n }\n const responseJson = (await response?.json()) as Record<\n string,\n File | unknown\n >;\n if (response?.headers?.['x-goog-upload-status'] !== 'final') {\n throw new Error('Failed to upload file: Upload status is not finalized.');\n }\n return responseJson['file'] as File;\n}\n\nexport async function getBlobStat(file: Blob): Promise {\n const fileStat: FileStat = {size: file.size, type: file.type};\n return fileStat;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport * as fs from 'fs/promises';\n\nimport {ApiClient} from '../_api_client';\nimport {FileStat, Uploader} from '../_uploader';\nimport {\n MAX_CHUNK_SIZE,\n getBlobStat,\n uploadBlob,\n} from '../cross/_cross_uploader';\nimport {File, HttpResponse} from '../types';\n\nexport class NodeUploader implements Uploader {\n async stat(file: string | Blob): Promise {\n const fileStat: FileStat = {size: 0, type: undefined};\n if (typeof file === 'string') {\n const originalStat = await fs.stat(file);\n fileStat.size = originalStat.size;\n fileStat.type = this.inferMimeType(file);\n return fileStat;\n } else {\n return await getBlobStat(file);\n }\n }\n\n async upload(\n file: string | Blob,\n uploadUrl: string,\n apiClient: ApiClient,\n ): Promise {\n if (typeof file === 'string') {\n return await this.uploadFileFromPath(file, uploadUrl, apiClient);\n } else {\n return uploadBlob(file, uploadUrl, apiClient);\n }\n }\n\n /**\n * Infers the MIME type of a file based on its extension.\n *\n * @param filePath The path to the file.\n * @returns The MIME type of the file, or undefined if it cannot be inferred.\n */\n private inferMimeType(filePath: string): string | undefined {\n // Get the file extension.\n const fileExtension = filePath.slice(filePath.lastIndexOf('.') + 1);\n\n // Create a map of file extensions to MIME types.\n const mimeTypes: {[key: string]: string} = {\n 'aac': 'audio/aac',\n 'abw': 'application/x-abiword',\n 'arc': 'application/x-freearc',\n 'avi': 'video/x-msvideo',\n 'azw': 'application/vnd.amazon.ebook',\n 'bin': 'application/octet-stream',\n 'bmp': 'image/bmp',\n 'bz': 'application/x-bzip',\n 'bz2': 'application/x-bzip2',\n 'csh': 'application/x-csh',\n 'css': 'text/css',\n 'csv': 'text/csv',\n 'doc': 'application/msword',\n 'docx':\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n 'eot': 'application/vnd.ms-fontobject',\n 'epub': 'application/epub+zip',\n 'gz': 'application/gzip',\n 'gif': 'image/gif',\n 'htm': 'text/html',\n 'html': 'text/html',\n 'ico': 'image/vnd.microsoft.icon',\n 'ics': 'text/calendar',\n 'jar': 'application/java-archive',\n 'jpeg': 'image/jpeg',\n 'jpg': 'image/jpeg',\n 'js': 'text/javascript',\n 'json': 'application/json',\n 'jsonld': 'application/ld+json',\n 'kml': 'application/vnd.google-earth.kml+xml',\n 'kmz': 'application/vnd.google-earth.kmz+xml',\n 'mjs': 'text/javascript',\n 'mp3': 'audio/mpeg',\n 'mp4': 'video/mp4',\n 'mpeg': 'video/mpeg',\n 'mpkg': 'application/vnd.apple.installer+xml',\n 'odt': 'application/vnd.oasis.opendocument.text',\n 'oga': 'audio/ogg',\n 'ogv': 'video/ogg',\n 'ogx': 'application/ogg',\n 'opus': 'audio/opus',\n 'otf': 'font/otf',\n 'png': 'image/png',\n 'pdf': 'application/pdf',\n 'php': 'application/x-httpd-php',\n 'ppt': 'application/vnd.ms-powerpoint',\n 'pptx':\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n 'rar': 'application/vnd.rar',\n 'rtf': 'application/rtf',\n 'sh': 'application/x-sh',\n 'svg': 'image/svg+xml',\n 'swf': 'application/x-shockwave-flash',\n 'tar': 'application/x-tar',\n 'tif': 'image/tiff',\n 'tiff': 'image/tiff',\n 'ts': 'video/mp2t',\n 'ttf': 'font/ttf',\n 'txt': 'text/plain',\n 'vsd': 'application/vnd.visio',\n 'wav': 'audio/wav',\n 'weba': 'audio/webm',\n 'webm': 'video/webm',\n 'webp': 'image/webp',\n 'woff': 'font/woff',\n 'woff2': 'font/woff2',\n 'xhtml': 'application/xhtml+xml',\n 'xls': 'application/vnd.ms-excel',\n 'xlsx':\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n 'xml': 'application/xml',\n 'xul': 'application/vnd.mozilla.xul+xml',\n 'zip': 'application/zip',\n '3gp': 'video/3gpp',\n '3g2': 'video/3gpp2',\n '7z': 'application/x-7z-compressed',\n };\n\n // Look up the MIME type based on the file extension.\n const mimeType = mimeTypes[fileExtension.toLowerCase()];\n\n // Return the MIME type.\n return mimeType;\n }\n\n private async uploadFileFromPath(\n file: string,\n uploadUrl: string,\n apiClient: ApiClient,\n ): Promise {\n let fileSize = 0;\n let offset = 0;\n let response: HttpResponse = new HttpResponse(new Response());\n let uploadCommand = 'upload';\n let fileHandle: fs.FileHandle | undefined;\n try {\n fileHandle = await fs.open(file, 'r');\n if (!fileHandle) {\n throw new Error(`Failed to open file`);\n }\n fileSize = (await fileHandle.stat()).size;\n while (offset < fileSize) {\n const chunkSize = Math.min(MAX_CHUNK_SIZE, fileSize - offset);\n if (offset + chunkSize >= fileSize) {\n uploadCommand += ', finalize';\n }\n const buffer = new Uint8Array(chunkSize);\n const {bytesRead: bytesRead} = await fileHandle.read(\n buffer,\n 0,\n chunkSize,\n offset,\n );\n\n if (bytesRead !== chunkSize) {\n throw new Error(\n `Failed to read ${chunkSize} bytes from file at offset ${\n offset\n }. bytes actually read: ${bytesRead}`,\n );\n }\n\n const chunk = new Blob([buffer]);\n response = await apiClient.request({\n path: '',\n body: chunk,\n httpMethod: 'POST',\n httpOptions: {\n apiVersion: '',\n baseUrl: uploadUrl,\n headers: {\n 'X-Goog-Upload-Command': uploadCommand,\n 'X-Goog-Upload-Offset': String(offset),\n 'Content-Length': String(bytesRead),\n },\n },\n });\n offset += bytesRead;\n // The `x-goog-upload-status` header field can be `active`, `final` and\n //`cancelled` in resposne.\n if (response?.headers?.['x-goog-upload-status'] !== 'active') {\n break;\n }\n if (fileSize <= offset) {\n throw new Error(\n 'All content has been uploaded, but the upload status is not finalized.',\n );\n }\n }\n const responseJson = (await response?.json()) as Record<\n string,\n File | unknown\n >;\n if (response?.headers?.['x-goog-upload-status'] !== 'final') {\n throw new Error(\n 'Failed to upload file: Upload status is not finalized.',\n );\n }\n return responseJson['file'] as File;\n } finally {\n // Ensure the file handle is always closed\n if (fileHandle) {\n await fileHandle.close();\n }\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {GoogleAuthOptions} from 'google-auth-library';\n\nimport {ApiClient} from '../_api_client';\nimport {Caches} from '../caches';\nimport {Chats} from '../chats';\nimport {GoogleGenAIOptions} from '../client';\nimport {Files} from '../files';\nimport {Live} from '../live';\nimport {Models} from '../models';\nimport {NodeAuth} from '../node/_node_auth';\nimport {NodeWebSocketFactory} from '../node/_node_websocket';\nimport {Operations} from '../operations';\n\nimport {NodeUploader} from './_node_uploader';\n\nconst LANGUAGE_LABEL_PREFIX = 'gl-node/';\n\n/**\n * The Google GenAI SDK.\n *\n * @remarks\n * Provides access to the GenAI features through either the {@link\n * https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API} or\n * the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI\n * API}.\n *\n * The {@link GoogleGenAIOptions.vertexai} value determines which of the API\n * services to use.\n *\n * When using the Gemini API, a {@link GoogleGenAIOptions.apiKey} must also be\n * set. When using Vertex AI, both {@link GoogleGenAIOptions.project} and {@link\n * GoogleGenAIOptions.location} must be set, or a {@link\n * GoogleGenAIOptions.apiKey} must be set when using Express Mode.\n *\n * Explicitly passed in values in {@link GoogleGenAIOptions} will always take\n * precedence over environment variables. If both project/location and api_key\n * exist in the environment variables, the project/location will be used.\n *\n * @example\n * Initializing the SDK for using the Gemini API:\n * ```ts\n * import {GoogleGenAI} from '@google/genai';\n * const ai = new GoogleGenAI({apiKey: 'GEMINI_API_KEY'});\n * ```\n *\n * @example\n * Initializing the SDK for using the Vertex AI API:\n * ```ts\n * import {GoogleGenAI} from '@google/genai';\n * const ai = new GoogleGenAI({\n * vertexai: true,\n * project: 'PROJECT_ID',\n * location: 'PROJECT_LOCATION'\n * });\n * ```\n *\n */\nexport class GoogleGenAI {\n protected readonly apiClient: ApiClient;\n private readonly apiKey?: string;\n public readonly vertexai: boolean;\n private readonly googleAuthOptions?: GoogleAuthOptions;\n private readonly project?: string;\n private readonly location?: string;\n private readonly apiVersion?: string;\n readonly models: Models;\n readonly live: Live;\n readonly chats: Chats;\n readonly caches: Caches;\n readonly files: Files;\n readonly operations: Operations;\n\n constructor(options: GoogleGenAIOptions) {\n // Validate explicitly set initializer values.\n if ((options.project || options.location) && options.apiKey) {\n throw new Error(\n 'Project/location and API key are mutually exclusive in the client initializer.',\n );\n }\n\n this.vertexai =\n options.vertexai ?? getBooleanEnv('GOOGLE_GENAI_USE_VERTEXAI') ?? false;\n const envApiKey = getEnv('GOOGLE_API_KEY');\n const envProject = getEnv('GOOGLE_CLOUD_PROJECT');\n const envLocation = getEnv('GOOGLE_CLOUD_LOCATION');\n\n this.apiKey = options.apiKey ?? envApiKey;\n this.project = options.project ?? envProject;\n this.location = options.location ?? envLocation;\n\n // Handle when to use Vertex AI in express mode (api key)\n if (options.vertexai) {\n // Explicit api_key and explicit project/location already handled above.\n if ((envProject || envLocation) && options.apiKey) {\n // Explicit api_key takes precedence over implicit project/location.\n console.debug(\n 'The user provided Vertex AI API key will take precedence over' +\n ' the project/location from the environment variables.',\n );\n this.project = undefined;\n this.location = undefined;\n } else if ((options.project || options.location) && envApiKey) {\n // Explicit project/location takes precedence over implicit api_key.\n console.debug(\n 'The user provided project/location will take precedence over' +\n ' the API key from the environment variables.',\n );\n this.apiKey = undefined;\n } else if ((envProject || envLocation) && envApiKey) {\n // Implicit project/location takes precedence over implicit api_key.\n console.debug(\n 'The project/location from the environment variables will take' +\n ' precedence over the API key from the environment variables.',\n );\n this.apiKey = undefined;\n }\n }\n\n this.apiVersion = options.apiVersion;\n const auth = new NodeAuth({\n apiKey: this.apiKey,\n googleAuthOptions: options.googleAuthOptions,\n });\n this.apiClient = new ApiClient({\n auth: auth,\n project: this.project,\n location: this.location,\n apiVersion: this.apiVersion,\n apiKey: this.apiKey,\n vertexai: this.vertexai,\n httpOptions: options.httpOptions,\n userAgentExtra: LANGUAGE_LABEL_PREFIX + process.version,\n uploader: new NodeUploader(),\n });\n this.models = new Models(this.apiClient);\n this.live = new Live(this.apiClient, auth, new NodeWebSocketFactory());\n this.chats = new Chats(this.models, this.apiClient);\n this.caches = new Caches(this.apiClient);\n this.files = new Files(this.apiClient);\n this.operations = new Operations(this.apiClient);\n }\n}\n\nfunction getEnv(env: string): string | undefined {\n return process?.env?.[env]?.trim() ?? undefined;\n}\n\nfunction getBooleanEnv(env: string): boolean {\n return stringToBoolean(getEnv(env));\n}\n\nfunction stringToBoolean(str?: string): boolean {\n if (str === undefined) {\n return false;\n }\n return str.toLowerCase() === 'true';\n}\n"],"names":["partToMldev","common.getValueByPath","common.setValueByPath","contentToMldev","functionDeclarationToMldev","googleSearchToMldev","dynamicRetrievalConfigToMldev","googleSearchRetrievalToMldev","toolToMldev","functionCallingConfigToMldev","toolConfigToMldev","t.tContents","t.tContent","t.tCachesModel","t.tCachedContentName","partToVertex","contentToVertex","schemaToVertex","functionDeclarationToVertex","googleSearchToVertex","dynamicRetrievalConfigToVertex","googleSearchRetrievalToVertex","toolToVertex","functionCallingConfigToVertex","toolConfigToVertex","PagedItem","Outcome","Language","Type","HarmCategory","HarmBlockMethod","HarmBlockThreshold","Mode","FinishReason","HarmProbability","HarmSeverity","BlockedReason","TrafficType","Modality","MediaResolution","DynamicRetrievalConfigMode","FunctionCallingConfigMode","SafetyFilterLevel","PersonGeneration","ImagePromptLanguage","FileState","FileSource","MaskReferenceMode","ControlReferenceType","SubjectReferenceType","MediaModality","StartSensitivity","EndSensitivity","ActivityHandling","TurnCoverage","converters.createCachedContentParametersToVertex","common.formatMap","converters.cachedContentFromVertex","converters.createCachedContentParametersToMldev","converters.cachedContentFromMldev","converters.getCachedContentParametersToVertex","converters.getCachedContentParametersToMldev","converters.deleteCachedContentParametersToVertex","converters.deleteCachedContentResponseFromVertex","types.DeleteCachedContentResponse","converters.deleteCachedContentParametersToMldev","converters.deleteCachedContentResponseFromMldev","converters.updateCachedContentParametersToVertex","converters.updateCachedContentParametersToMldev","converters.listCachedContentsParametersToVertex","converters.listCachedContentsResponseFromVertex","types.ListCachedContentsResponse","converters.listCachedContentsParametersToMldev","converters.listCachedContentsResponseFromMldev","t.tFileName","converters.fileFromMldev","converters.listFilesParametersToMldev","converters.listFilesResponseFromMldev","types.ListFilesResponse","converters.createFileParametersToMldev","converters.createFileResponseFromMldev","types.CreateFileResponse","converters.getFileParametersToMldev","converters.deleteFileParametersToMldev","converters.deleteFileResponseFromMldev","types.DeleteFileResponse","t.tSchema","t.tTools","t.tTool","t.tSpeechConfig","t.tModel","t.tContentsForEmbed","t.tBytes","videoFromMldev","generatedVideoFromMldev","generateVideosResponseFromMldev","generateVideosOperationFromMldev","videoFromVertex","generatedVideoFromVertex","generateVideosResponseFromVertex","generateVideosOperationFromVertex","converters.liveServerMessageFromVertex","converters.liveServerMessageFromMldev","converters.liveConnectParametersToVertex","converters.liveConnectParametersToMldev","converters.generateContentParametersToVertex","converters.generateContentResponseFromVertex","types.GenerateContentResponse","converters.generateContentParametersToMldev","converters.generateContentResponseFromMldev","converters.embedContentParametersToVertex","converters.embedContentResponseFromVertex","types.EmbedContentResponse","converters.embedContentParametersToMldev","converters.embedContentResponseFromMldev","converters.generateImagesParametersToVertex","converters.generateImagesResponseFromVertex","types.GenerateImagesResponse","converters.generateImagesParametersToMldev","converters.generateImagesResponseFromMldev","converters.getModelParametersToVertex","converters.modelFromVertex","converters.getModelParametersToMldev","converters.modelFromMldev","converters.countTokensParametersToVertex","converters.countTokensResponseFromVertex","types.CountTokensResponse","converters.countTokensParametersToMldev","converters.countTokensResponseFromMldev","converters.computeTokensParametersToVertex","converters.computeTokensResponseFromVertex","types.ComputeTokensResponse","converters.generateVideosParametersToVertex","converters.generateVideosOperationFromVertex","converters.generateVideosParametersToMldev","converters.generateVideosOperationFromMldev","converters.getOperationParametersToVertex","converters.getOperationParametersToMldev","converters.fetchPredictOperationParametersToVertex","GoogleAuth","NodeWs","fs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AAIG;MAEU,UAAU,CAAA;AAAG;AAEV,SAAA,SAAS,CACvB,cAAsB,EACtB,QAAiC,EAAA;;IAGjC,MAAM,KAAK,GAAG,cAAc;;IAG5B,OAAO,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,GAAG,KAAI;AAClD,QAAA,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE;AACvD,YAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC;;AAE3B,YAAA,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE;AAClE;AAAM,aAAA;;AAEL,YAAA,MAAM,IAAI,KAAK,CAAC,QAAQ,GAAG,CAAA,wBAAA,CAA0B,CAAC;AACvD;AACH,KAAC,CAAC;AACJ;SAEgB,cAAc,CAC5B,IAA6B,EAC7B,IAAc,EACd,KAAc,EAAA;AAEd,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;AACxC,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC;AAEnB,QAAA,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;YACtB,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;AAChC,YAAA,IAAI,EAAE,OAAO,IAAI,IAAI,CAAC,EAAE;AACtB,gBAAA,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;oBACxB,IAAI,CAAC,OAAO,CAAC,GAAG,K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AS,CAAC;QACtC,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC;;AAEnD;AAED,SAAS,MAAM,CAAC,GAAW,EAAA;;AACzB,IAAA,OAAO,MAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,OAAO,KAAP,IAAA,IAAA,OAAO,uBAAP,OAAO,CAAE,GAAG,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAG,GAAG,CAAC,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,IAAI,EAAE,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAI,SAAS;AACjD;AAEA,SAAS,aAAa,CAAC,GAAW,EAAA;AAChC,IAAA,OAAO,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AACrC;AAEA,SAAS,eAAe,CAAC,GAAY,EAAA;IACnC,IAAI,GAAG,KAAK,SAAS,EAAE;AACrB,QAAA,OAAO,KAAK;AACb;AACD,IAAA,OAAO,GAAG,CAAC,WAAW,EAAE,KAAK,MAAM;AACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} +\ No newline at end of file ++{"version":3,"file":"index.js","sources":["../../src/_common.ts","../../src/_transformers.ts","../../src/converters/_caches_converters.ts","../../src/pagers.ts","../../src/types.ts","../../src/caches.ts","../../src/chats.ts","../../src/converters/_files_converters.ts","../../src/files.ts","../../src/converters/_live_converters.ts","../../src/converters/_models_converters.ts","../../src/live.ts","../../src/models.ts","../../src/converters/_operations_converters.ts","../../src/operations.ts","../../src/_api_client.ts","../../src/node/_node_auth.ts","../../src/node/_node_websocket.ts","../../src/cross/_cross_uploader.ts","../../src/node/_node_uploader.ts","../../src/node/node_client.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport class BaseModule {}\n\nexport function formatMap(\n templateString: string,\n valueMap: Record,\n): string {\n // Use a regular expression to find all placeholders in the template string\n const regex = /\\{([^}]+)\\}/g;\n\n // Replace each placeholder with its corresponding value from the valueMap\n return templateString.replace(regex, (match, key) => {\n if (Object.prototype.hasOwnProperty.call(valueMap, key)) {\n const value = valueMap[key];\n // Convert the value to a string if it's not a string already\n return value !== undefined && value !== null ? String(value) : '';\n } else {\n // Handle missing keys\n throw new Error(`Key '${key}' not found in valueMap.`);\n }\n });\n}\n\nexport function setValueByPath(\n data: Record,\n keys: string[],\n value: unknown,\n): void {\n for (let i = 0; i < keys.length - 1; i++) {\n const key = keys[i];\n\n if (key.endsWith('[]')) {\n const keyName = key.slice(0, -2);\n if (!(keyName in data)) {\n if (Array.isArray(value)) {\n data[keyName] = Array.from({length: value.length}, () => ({}));\n } else {\n throw new Error(`Value must be a list given an array path ${key}`);\n }\n }\n\n if (Array.isArray(data[keyName])) {\n const arrayData = data[keyName] as Array;\n\n if (Array.isArray(value)) {\n for (let j = 0; j < arrayData.length; j++) {\n const entry = arrayData[j] as Record;\n setValueByPath(entry, keys.slice(i + 1), value[j]);\n }\n } else {\n for (const d of arrayData) {\n setValueByPath(\n d as Record,\n keys.slice(i + 1),\n value,\n );\n }\n }\n }\n return;\n } else if (key.endsWith('[0]')) {\n const keyName = key.slice(0, -3);\n if (!(keyName in data)) {\n data[keyName] = [{}];\n }\n const arrayData = (data as Record)[keyName];\n setValueByPath(\n (arrayData as Array>)[0],\n keys.slice(i + 1),\n value,\n );\n return;\n }\n\n if (!data[key] || typeof data[key] !== 'object') {\n data[key] = {};\n }\n\n data = data[key] as Record;\n }\n\n const keyToSet = keys[keys.length - 1];\n const existingData = data[keyToSet];\n\n if (existingData !== undefined) {\n if (\n !value ||\n (typeof value === 'object' && Object.keys(value).length === 0)\n ) {\n return;\n }\n\n if (value === existingData) {\n return;\n }\n\n if (\n typeof existingData === 'object' &&\n typeof value === 'object' &&\n existingData !== null &&\n value !== null\n ) {\n Object.assign(existingData, value);\n } else {\n throw new Error(`Cannot set value for an existing key. Key: ${keyToSet}`);\n }\n } else {\n data[keyToSet] = value;\n }\n}\n\nexport function getValueByPath(data: unknown, keys: string[]): unknown {\n try {\n if (keys.length === 1 && keys[0] === '_self') {\n return data;\n }\n\n for (let i = 0; i < keys.length; i++) {\n if (typeof data !== 'object' || data === null) {\n return undefined;\n }\n\n const key = keys[i];\n if (key.endsWith('[]')) {\n const keyName = key.slice(0, -2);\n if (keyName in data) {\n const arrayData = (data as Record)[keyName];\n if (!Array.isArray(arrayData)) {\n return undefined;\n }\n return arrayData.map((d) => getValueByPath(d, keys.slice(i + 1)));\n } else {\n return undefined;\n }\n } else {\n data = (data as Record)[key];\n }\n }\n\n return data;\n } catch (error) {\n if (error instanceof TypeError) {\n return undefined;\n }\n throw error;\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ApiClient} from './_api_client';\nimport * as types from './types';\n\nexport function tModel(apiClient: ApiClient, model: string | unknown): string {\n if (!model || typeof model !== 'string') {\n throw new Error('model is required and must be a string');\n }\n\n if (apiClient.isVertexAI()) {\n if (\n model.startsWith('publishers/') ||\n model.startsWith('projects/') ||\n model.startsWith('models/')\n ) {\n return model;\n } else if (model.indexOf('/') >= 0) {\n const parts = model.split('/', 2);\n return `publishers/${parts[0]}/models/${parts[1]}`;\n } else {\n return `publishers/google/models/${model}`;\n }\n } else {\n if (model.startsWith('models/') || model.startsWith('tunedModels/')) {\n return model;\n } else {\n return `models/${model}`;\n }\n }\n}\n\nexport function tCachesModel(\n apiClient: ApiClient,\n model: string | unknown,\n): string {\n const transformedModel = tModel(apiClient, model as string);\n if (!transformedModel) {\n return '';\n }\n\n if (transformedModel.startsWith('publishers/') && apiClient.isVertexAI()) {\n // vertex caches only support model name start with projects.\n return `projects/${apiClient.getProject()}/locations/${apiClient.getLocation()}/${transformedModel}`;\n } else if (transformedModel.startsWith('models/') && apiClient.isVertexAI()) {\n return `projects/${apiClient.getProject()}/locations/${apiClient.getLocation()}/publishers/google/${transformedModel}`;\n } else {\n return transformedModel;\n }\n}\n\nexport function tPart(\n apiClient: ApiClient,\n origin?: types.PartUnion | null,\n): types.Part {\n if (origin === null || origin === undefined) {\n throw new Error('PartUnion is required');\n }\n if (typeof origin === 'object') {\n return origin;\n }\n if (typeof origin === 'string') {\n return {text: origin};\n }\n throw new Error(`Unsupported part type: ${typeof origin}`);\n}\n\nexport function tParts(\n apiClient: ApiClient,\n origin?: types.PartListUnion | null,\n): types.Part[] {\n if (\n origin === null ||\n origin === undefined ||\n (Array.isArray(origin) && origin.length === 0)\n ) {\n throw new Error('PartListUnion is required');\n }\n if (Array.isArray(origin)) {\n return origin.map((item) => tPart(apiClient, item as types.PartUnion)!);\n }\n return [tPart(apiClient, origin)!];\n}\n\nfunction _isContent(origin: unknown): boolean {\n return (\n origin !== null &&\n origin !== undefined &&\n typeof origin === 'object' &&\n 'parts' in origin &&\n Array.isArray(origin.parts)\n );\n}\n\nfunction _isFunctionCallPart(origin: unknown): boolean {\n return (\n origin !== null &&\n origin !== undefined &&\n typeof origin === 'object' &&\n 'functionCall' in origin\n );\n}\n\nfunction _isFunctionResponsePart(origin: unknown): boolean {\n return (\n origin !== null &&\n origin !== undefined &&\n typeof origin === 'object' &&\n 'functionResponse' in origin\n );\n}\n\nexport function tContent(\n apiClient: ApiClient,\n origin?: types.ContentUnion,\n): types.Content {\n if (origin === null || origin === undefined) {\n throw new Error('ContentUnion is required');\n }\n if (_isContent(origin)) {\n // _isContent is a utility function that checks if the\n // origin is a Content.\n return origin as types.Content;\n }\n\n return {\n role: 'user',\n parts: tParts(apiClient, origin as types.PartListUnion)!,\n };\n}\n\nexport function tContentsForEmbed(\n apiClient: ApiClient,\n origin: types.ContentListUnion,\n): types.ContentUnion[] {\n if (!origin) {\n return [];\n }\n if (apiClient.isVertexAI() && Array.isArray(origin)) {\n return origin.flatMap((item) => {\n const content = tContent(apiClient, item as types.ContentUnion);\n if (\n content.parts &&\n content.parts.length > 0 &&\n content.parts[0].text !== undefined\n ) {\n return [content.parts[0].text];\n }\n return [];\n });\n } else if (apiClient.isVertexAI()) {\n const content = tContent(apiClient, origin as types.ContentUnion);\n if (\n content.parts &&\n content.parts.length > 0 &&\n content.parts[0].text !== undefined\n ) {\n return [content.parts[0].text];\n }\n return [];\n }\n if (Array.isArray(origin)) {\n return origin.map(\n (item) => tContent(apiClient, item as types.ContentUnion)!,\n );\n }\n return [tContent(apiClient, origin as types.ContentUnion)!];\n}\n\nexport function tContents(\n apiClient: ApiClient,\n origin?: types.ContentListUnion,\n): types.Content[] {\n if (\n origin === null ||\n origin === undefined ||\n (Array.isArray(origin) && origin.length === 0)\n ) {\n throw new Error('contents are required');\n }\n if (!Array.isArray(origin)) {\n // If it's not an array, it's a single content or a single PartUnion.\n if (_isFunctionCallPart(origin) || _isFunctionResponsePart(origin)) {\n throw new Error(\n 'To specify functionCall or functionResponse parts, please wrap them in a Content object, specifying the role for them',\n );\n }\n return [tContent(apiClient, origin as types.ContentUnion)];\n }\n\n const result: types.Content[] = [];\n const accumulatedParts: types.PartUnion[] = [];\n const isContentArray = _isContent(origin[0]);\n\n for (const item of origin) {\n const isContent = _isContent(item);\n\n if (isContent != isContentArray) {\n throw new Error(\n 'Mixing Content and Parts is not supported, please group the parts into a the appropriate Content objects and specify the roles for them',\n );\n }\n\n if (isContent) {\n // `isContent` contains the result of _isContent, which is a utility\n // function that checks if the item is a Content.\n result.push(item as types.Content);\n } else if (_isFunctionCallPart(item) || _isFunctionResponsePart(item)) {\n throw new Error(\n 'To specify functionCall or functionResponse parts, please wrap them, and any other parts, in Content objects as appropriate, specifying the role for them',\n );\n } else {\n accumulatedParts.push(item as types.PartUnion);\n }\n }\n\n if (!isContentArray) {\n result.push({role: 'user', parts: tParts(apiClient, accumulatedParts)});\n }\n return result;\n}\n\nexport function processSchema(apiClient: ApiClient, schema: types.Schema) {\n if (!apiClient.isVertexAI()) {\n if ('default' in schema) {\n throw new Error(\n 'Default value is not supported in the response schema for the Gemini API.',\n );\n }\n }\n\n if ('anyOf' in schema) {\n if (schema['anyOf'] !== undefined) {\n for (const subSchema of schema['anyOf']) {\n processSchema(apiClient, subSchema);\n }\n }\n }\n\n if ('items' in schema) {\n if (schema['items'] !== undefined) {\n processSchema(apiClient, schema['items']);\n }\n }\n\n if ('properties' in schema) {\n if (schema['properties'] !== undefined) {\n for (const subSchema of Object.values(schema['properties'])) {\n processSchema(apiClient, subSchema);\n }\n }\n }\n}\n\nexport function tSchema(\n apiClient: ApiClient,\n schema: types.Schema,\n): types.Schema {\n processSchema(apiClient, schema);\n return schema;\n}\n\nexport function tSpeechConfig(\n apiClient: ApiClient,\n speechConfig: types.SpeechConfigUnion,\n): types.SpeechConfig {\n if (typeof speechConfig === 'object' && 'voiceConfig' in speechConfig) {\n return speechConfig;\n } else if (typeof speechConfig === 'string') {\n return {\n voiceConfig: {\n prebuiltVoiceConfig: {\n voiceName: speechConfig,\n },\n },\n };\n } else {\n throw new Error(`Unsupported speechConfig type: ${typeof speechConfig}`);\n }\n}\n\nexport function tTool(apiClient: ApiClient, tool: types.Tool): types.Tool {\n return tool;\n}\n\nexport function tTools(\n apiClient: ApiClient,\n tool: types.Tool[] | unknown,\n): types.Tool[] {\n if (!Array.isArray(tool)) {\n throw new Error('tool is required and must be an array of Tools');\n }\n return tool;\n}\n\n/**\n * Prepends resource name with project, location, resource_prefix if needed.\n *\n * @param client The API client.\n * @param resourceName The resource name.\n * @param resourcePrefix The resource prefix.\n * @param splitsAfterPrefix The number of splits after the prefix.\n * @returns The completed resource name.\n *\n * Examples:\n *\n * ```\n * resource_name = '123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = True\n * client.project = 'bar'\n * client.location = 'us-west1'\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns: 'projects/bar/locations/us-west1/cachedContents/123'\n * ```\n *\n * ```\n * resource_name = 'projects/foo/locations/us-central1/cachedContents/123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = True\n * client.project = 'bar'\n * client.location = 'us-west1'\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns: 'projects/foo/locations/us-central1/cachedContents/123'\n * ```\n *\n * ```\n * resource_name = '123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = False\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns 'cachedContents/123'\n * ```\n *\n * ```\n * resource_name = 'some/wrong/cachedContents/resource/name/123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = False\n * # client.vertexai = True\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * -> 'some/wrong/resource/name/123'\n * ```\n */\nfunction resourceName(\n client: ApiClient,\n resourceName: string,\n resourcePrefix: string,\n splitsAfterPrefix: number = 1,\n): string {\n const shouldAppendPrefix =\n !resourceName.startsWith(`${resourcePrefix}/`) &&\n resourceName.split('/').length === splitsAfterPrefix;\n if (client.isVertexAI()) {\n if (resourceName.startsWith('projects/')) {\n return resourceName;\n } else if (resourceName.startsWith('locations/')) {\n return `projects/${client.getProject()}/${resourceName}`;\n } else if (resourceName.startsWith(`${resourcePrefix}/`)) {\n return `projects/${client.getProject()}/locations/${client.getLocation()}/${resourceName}`;\n } else if (shouldAppendPrefix) {\n return `projects/${client.getProject()}/locations/${client.getLocation()}/${resourcePrefix}/${resourceName}`;\n } else {\n return resourceName;\n }\n }\n if (shouldAppendPrefix) {\n return `${resourcePrefix}/${resourceName}`;\n }\n return resourceName;\n}\n\nexport function tCachedContentName(\n apiClient: ApiClient,\n name: string | unknown,\n): string {\n if (typeof name !== 'string') {\n throw new Error('name must be a string');\n }\n return resourceName(apiClient, name, 'cachedContents');\n}\n\nexport function tTuningJobStatus(\n apiClient: ApiClient,\n status: string | unknown,\n): string {\n switch (status) {\n case 'STATE_UNSPECIFIED':\n return 'JOB_STATE_UNSPECIFIED';\n case 'CREATING':\n return 'JOB_STATE_RUNNING';\n case 'ACTIVE':\n return 'JOB_STATE_SUCCEEDED';\n case 'FAILED':\n return 'JOB_STATE_FAILED';\n default:\n return status as string;\n }\n}\n\nexport function tBytes(\n apiClient: ApiClient,\n fromImageBytes: string | unknown,\n): string {\n if (typeof fromImageBytes !== 'string') {\n throw new Error('fromImageBytes must be a string');\n }\n // TODO(b/389133914): Remove dummy bytes converter.\n return fromImageBytes;\n}\nexport function tFileName(\n apiClient: ApiClient,\n fromName: string | unknown,\n): string {\n if (typeof fromName !== 'string') {\n throw new Error('fromName must be a string');\n }\n // Remove the files/ prefx for MLdev urls to get the actual name of the file.\n if (fromName.startsWith('files/')) {\n return fromName.split('files/')[1];\n }\n return fromName;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function partToMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['videoMetadata']) !== undefined) {\n throw new Error('videoMetadata parameter is not supported in Gemini API.');\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToMldev(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['example']) !== undefined) {\n throw new Error('example parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['pattern']) !== undefined) {\n throw new Error('pattern parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['default']) !== undefined) {\n throw new Error('default parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxLength']) !== undefined) {\n throw new Error('maxLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minLength']) !== undefined) {\n throw new Error('minLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minProperties']) !== undefined) {\n throw new Error('minProperties parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxProperties']) !== undefined) {\n throw new Error('maxProperties parameter is not supported in Gemini API.');\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['response']) !== undefined) {\n throw new Error('response parameter is not supported in Gemini API.');\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToMldev(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToMldev(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n if (common.getValueByPath(fromObject, ['retrieval']) !== undefined) {\n throw new Error('retrieval parameter is not supported in Gemini API.');\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToMldev());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (parentObject !== undefined && fromDisplayName != null) {\n common.setValueByPath(parentObject, ['displayName'], fromDisplayName);\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (parentObject !== undefined && fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToMldev(apiClient, fromToolConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['model'],\n t.tCachesModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n createCachedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.DeleteCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n updateCachedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function listCachedContentsConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listCachedContentsParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listCachedContentsConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partToVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToVertex(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n const fromExample = common.getValueByPath(fromObject, ['example']);\n if (fromExample != null) {\n common.setValueByPath(toObject, ['example'], fromExample);\n }\n\n const fromPattern = common.getValueByPath(fromObject, ['pattern']);\n if (fromPattern != null) {\n common.setValueByPath(toObject, ['pattern'], fromPattern);\n }\n\n const fromDefault = common.getValueByPath(fromObject, ['default']);\n if (fromDefault != null) {\n common.setValueByPath(toObject, ['default'], fromDefault);\n }\n\n const fromMaxLength = common.getValueByPath(fromObject, ['maxLength']);\n if (fromMaxLength != null) {\n common.setValueByPath(toObject, ['maxLength'], fromMaxLength);\n }\n\n const fromMinLength = common.getValueByPath(fromObject, ['minLength']);\n if (fromMinLength != null) {\n common.setValueByPath(toObject, ['minLength'], fromMinLength);\n }\n\n const fromMinProperties = common.getValueByPath(fromObject, [\n 'minProperties',\n ]);\n if (fromMinProperties != null) {\n common.setValueByPath(toObject, ['minProperties'], fromMinProperties);\n }\n\n const fromMaxProperties = common.getValueByPath(fromObject, [\n 'maxProperties',\n ]);\n if (fromMaxProperties != null) {\n common.setValueByPath(toObject, ['maxProperties'], fromMaxProperties);\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n schemaToVertex(apiClient, fromResponse),\n );\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToVertex(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToVertex(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n const fromRetrieval = common.getValueByPath(fromObject, ['retrieval']);\n if (fromRetrieval != null) {\n common.setValueByPath(toObject, ['retrieval'], fromRetrieval);\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToVertex());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (parentObject !== undefined && fromDisplayName != null) {\n common.setValueByPath(parentObject, ['displayName'], fromDisplayName);\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (parentObject !== undefined && fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToVertex(apiClient, fromToolConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['model'],\n t.tCachesModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n createCachedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.DeleteCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n updateCachedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function listCachedContentsConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listCachedContentsParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listCachedContentsConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function cachedContentFromMldev(\n apiClient: ApiClient,\n fromObject: types.CachedContent,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (fromExpireTime != null) {\n common.setValueByPath(toObject, ['expireTime'], fromExpireTime);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentResponseFromMldev(): Record<\n string,\n unknown\n> {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function listCachedContentsResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromCachedContents = common.getValueByPath(fromObject, [\n 'cachedContents',\n ]);\n if (fromCachedContents != null) {\n if (Array.isArray(fromCachedContents)) {\n common.setValueByPath(\n toObject,\n ['cachedContents'],\n fromCachedContents.map((item) => {\n return cachedContentFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['cachedContents'], fromCachedContents);\n }\n }\n\n return toObject;\n}\n\nexport function cachedContentFromVertex(\n apiClient: ApiClient,\n fromObject: types.CachedContent,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (fromExpireTime != null) {\n common.setValueByPath(toObject, ['expireTime'], fromExpireTime);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentResponseFromVertex(): Record<\n string,\n unknown\n> {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function listCachedContentsResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromCachedContents = common.getValueByPath(fromObject, [\n 'cachedContents',\n ]);\n if (fromCachedContents != null) {\n if (Array.isArray(fromCachedContents)) {\n common.setValueByPath(\n toObject,\n ['cachedContents'],\n fromCachedContents.map((item) => {\n return cachedContentFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['cachedContents'], fromCachedContents);\n }\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Pagers for the GenAI List APIs.\n */\n\nexport enum PagedItem {\n PAGED_ITEM_BATCH_JOBS = 'batchJobs',\n PAGED_ITEM_MODELS = 'models',\n PAGED_ITEM_TUNING_JOBS = 'tuningJobs',\n PAGED_ITEM_FILES = 'files',\n PAGED_ITEM_CACHED_CONTENTS = 'cachedContents',\n}\n\ninterface PagedItemConfig {\n config?: {\n pageToken?: string;\n pageSize?: number;\n };\n}\n\ninterface PagedItemResponse {\n nextPageToken?: string;\n batchJobs?: T[];\n models?: T[];\n tuningJobs?: T[];\n files?: T[];\n cachedContents?: T[];\n}\n\n/**\n * Pager class for iterating through paginated results.\n */\nexport class Pager implements AsyncIterable {\n private nameInternal!: PagedItem;\n private pageInternal: T[] = [];\n private paramsInternal: PagedItemConfig = {};\n private pageInternalSize!: number;\n protected requestInternal!: (\n params: PagedItemConfig,\n ) => Promise>;\n protected idxInternal!: number;\n\n constructor(\n name: PagedItem,\n request: (params: PagedItemConfig) => Promise>,\n response: PagedItemResponse,\n params: PagedItemConfig,\n ) {\n this.requestInternal = request;\n this.init(name, response, params);\n }\n\n private init(\n name: PagedItem,\n response: PagedItemResponse,\n params: PagedItemConfig,\n ) {\n this.nameInternal = name;\n this.pageInternal = response[this.nameInternal] || [];\n this.idxInternal = 0;\n let requestParams: PagedItemConfig = {config: {}};\n if (!params) {\n requestParams = {config: {}};\n } else if (typeof params === 'object') {\n requestParams = {...params};\n } else {\n requestParams = params;\n }\n if (requestParams['config']) {\n requestParams['config']['pageToken'] = response['nextPageToken'];\n }\n this.paramsInternal = requestParams;\n this.pageInternalSize =\n requestParams['config']?.['pageSize'] ?? this.pageInternal.length;\n }\n\n private initNextPage(response: PagedItemResponse): void {\n this.init(this.nameInternal, response, this.paramsInternal);\n }\n\n /**\n * Returns the current page, which is a list of items.\n *\n * @remarks\n * The first page is retrieved when the pager is created. The returned list of\n * items could be a subset of the entire list.\n */\n get page(): T[] {\n return this.pageInternal;\n }\n\n /**\n * Returns the type of paged item (for example, ``batch_jobs``).\n */\n get name(): PagedItem {\n return this.nameInternal;\n }\n\n /**\n * Returns the length of the page fetched each time by this pager.\n *\n * @remarks\n * The number of items in the page is less than or equal to the page length.\n */\n get pageSize(): number {\n return this.pageInternalSize;\n }\n\n /**\n * Returns the parameters when making the API request for the next page.\n *\n * @remarks\n * Parameters contain a set of optional configs that can be\n * used to customize the API request. For example, the `pageToken` parameter\n * contains the token to request the next page.\n */\n get params(): PagedItemConfig {\n return this.paramsInternal;\n }\n\n /**\n * Returns the total number of items in the current page.\n */\n get pageLength(): number {\n return this.pageInternal.length;\n }\n\n /**\n * Returns the item at the given index.\n */\n getItem(index: number): T {\n return this.pageInternal[index];\n }\n\n /**\n * Returns an async iterator that support iterating through all items\n * retrieved from the API.\n *\n * @remarks\n * The iterator will automatically fetch the next page if there are more items\n * to fetch from the API.\n *\n * @example\n *\n * ```ts\n * const pager = await ai.files.list({config: {pageSize: 10}});\n * for await (const file of pager) {\n * console.log(file.name);\n * }\n * ```\n */\n [Symbol.asyncIterator](): AsyncIterator {\n return {\n next: async () => {\n if (this.idxInternal >= this.pageLength) {\n if (this.hasNextPage()) {\n await this.nextPage();\n } else {\n return {value: undefined, done: true};\n }\n }\n const item = this.getItem(this.idxInternal);\n this.idxInternal += 1;\n return {value: item, done: false};\n },\n return: async () => {\n return {value: undefined, done: true};\n },\n };\n }\n\n /**\n * Fetches the next page of items. This makes a new API request.\n *\n * @throws {Error} If there are no more pages to fetch.\n *\n * @example\n *\n * ```ts\n * const pager = await ai.files.list({config: {pageSize: 10}});\n * let page = pager.page;\n * while (true) {\n * for (const file of page) {\n * console.log(file.name);\n * }\n * if (!pager.hasNextPage()) {\n * break;\n * }\n * page = await pager.nextPage();\n * }\n * ```\n */\n async nextPage(): Promise {\n if (!this.hasNextPage()) {\n throw new Error('No more pages to fetch.');\n }\n const response = await this.requestInternal(this.params);\n this.initNextPage(response);\n return this.page;\n }\n\n /**\n * Returns true if there are more pages to fetch from the API.\n */\n hasNextPage(): boolean {\n if (this.params['config']?.['pageToken'] !== undefined) {\n return true;\n }\n return false;\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\n/** Required. Outcome of the code execution. */\nexport enum Outcome {\n OUTCOME_UNSPECIFIED = 'OUTCOME_UNSPECIFIED',\n OUTCOME_OK = 'OUTCOME_OK',\n OUTCOME_FAILED = 'OUTCOME_FAILED',\n OUTCOME_DEADLINE_EXCEEDED = 'OUTCOME_DEADLINE_EXCEEDED',\n}\n\n/** Required. Programming language of the `code`. */\nexport enum Language {\n LANGUAGE_UNSPECIFIED = 'LANGUAGE_UNSPECIFIED',\n PYTHON = 'PYTHON',\n}\n\n/** Optional. The type of the data. */\nexport enum Type {\n TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED',\n STRING = 'STRING',\n NUMBER = 'NUMBER',\n INTEGER = 'INTEGER',\n BOOLEAN = 'BOOLEAN',\n ARRAY = 'ARRAY',\n OBJECT = 'OBJECT',\n}\n\n/** Required. Harm category. */\nexport enum HarmCategory {\n HARM_CATEGORY_UNSPECIFIED = 'HARM_CATEGORY_UNSPECIFIED',\n HARM_CATEGORY_HATE_SPEECH = 'HARM_CATEGORY_HATE_SPEECH',\n HARM_CATEGORY_DANGEROUS_CONTENT = 'HARM_CATEGORY_DANGEROUS_CONTENT',\n HARM_CATEGORY_HARASSMENT = 'HARM_CATEGORY_HARASSMENT',\n HARM_CATEGORY_SEXUALLY_EXPLICIT = 'HARM_CATEGORY_SEXUALLY_EXPLICIT',\n HARM_CATEGORY_CIVIC_INTEGRITY = 'HARM_CATEGORY_CIVIC_INTEGRITY',\n}\n\n/** Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. */\nexport enum HarmBlockMethod {\n HARM_BLOCK_METHOD_UNSPECIFIED = 'HARM_BLOCK_METHOD_UNSPECIFIED',\n SEVERITY = 'SEVERITY',\n PROBABILITY = 'PROBABILITY',\n}\n\n/** Required. The harm block threshold. */\nexport enum HarmBlockThreshold {\n HARM_BLOCK_THRESHOLD_UNSPECIFIED = 'HARM_BLOCK_THRESHOLD_UNSPECIFIED',\n BLOCK_LOW_AND_ABOVE = 'BLOCK_LOW_AND_ABOVE',\n BLOCK_MEDIUM_AND_ABOVE = 'BLOCK_MEDIUM_AND_ABOVE',\n BLOCK_ONLY_HIGH = 'BLOCK_ONLY_HIGH',\n BLOCK_NONE = 'BLOCK_NONE',\n OFF = 'OFF',\n}\n\n/** The mode of the predictor to be used in dynamic retrieval. */\nexport enum Mode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n MODE_DYNAMIC = 'MODE_DYNAMIC',\n}\n\n/** Output only. The reason why the model stopped generating tokens.\n\n If empty, the model has not stopped generating the tokens.\n */\nexport enum FinishReason {\n FINISH_REASON_UNSPECIFIED = 'FINISH_REASON_UNSPECIFIED',\n STOP = 'STOP',\n MAX_TOKENS = 'MAX_TOKENS',\n SAFETY = 'SAFETY',\n RECITATION = 'RECITATION',\n OTHER = 'OTHER',\n BLOCKLIST = 'BLOCKLIST',\n PROHIBITED_CONTENT = 'PROHIBITED_CONTENT',\n SPII = 'SPII',\n MALFORMED_FUNCTION_CALL = 'MALFORMED_FUNCTION_CALL',\n IMAGE_SAFETY = 'IMAGE_SAFETY',\n}\n\n/** Output only. Harm probability levels in the content. */\nexport enum HarmProbability {\n HARM_PROBABILITY_UNSPECIFIED = 'HARM_PROBABILITY_UNSPECIFIED',\n NEGLIGIBLE = 'NEGLIGIBLE',\n LOW = 'LOW',\n MEDIUM = 'MEDIUM',\n HIGH = 'HIGH',\n}\n\n/** Output only. Harm severity levels in the content. */\nexport enum HarmSeverity {\n HARM_SEVERITY_UNSPECIFIED = 'HARM_SEVERITY_UNSPECIFIED',\n HARM_SEVERITY_NEGLIGIBLE = 'HARM_SEVERITY_NEGLIGIBLE',\n HARM_SEVERITY_LOW = 'HARM_SEVERITY_LOW',\n HARM_SEVERITY_MEDIUM = 'HARM_SEVERITY_MEDIUM',\n HARM_SEVERITY_HIGH = 'HARM_SEVERITY_HIGH',\n}\n\n/** Output only. Blocked reason. */\nexport enum BlockedReason {\n BLOCKED_REASON_UNSPECIFIED = 'BLOCKED_REASON_UNSPECIFIED',\n SAFETY = 'SAFETY',\n OTHER = 'OTHER',\n BLOCKLIST = 'BLOCKLIST',\n PROHIBITED_CONTENT = 'PROHIBITED_CONTENT',\n}\n\n/** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */\nexport enum TrafficType {\n TRAFFIC_TYPE_UNSPECIFIED = 'TRAFFIC_TYPE_UNSPECIFIED',\n ON_DEMAND = 'ON_DEMAND',\n PROVISIONED_THROUGHPUT = 'PROVISIONED_THROUGHPUT',\n}\n\n/** Server content modalities. */\nexport enum Modality {\n MODALITY_UNSPECIFIED = 'MODALITY_UNSPECIFIED',\n TEXT = 'TEXT',\n IMAGE = 'IMAGE',\n AUDIO = 'AUDIO',\n}\n\n/** The media resolution to use. */\nexport enum MediaResolution {\n MEDIA_RESOLUTION_UNSPECIFIED = 'MEDIA_RESOLUTION_UNSPECIFIED',\n MEDIA_RESOLUTION_LOW = 'MEDIA_RESOLUTION_LOW',\n MEDIA_RESOLUTION_MEDIUM = 'MEDIA_RESOLUTION_MEDIUM',\n MEDIA_RESOLUTION_HIGH = 'MEDIA_RESOLUTION_HIGH',\n}\n\n/** Options for feature selection preference. */\nexport enum FeatureSelectionPreference {\n FEATURE_SELECTION_PREFERENCE_UNSPECIFIED = 'FEATURE_SELECTION_PREFERENCE_UNSPECIFIED',\n PRIORITIZE_QUALITY = 'PRIORITIZE_QUALITY',\n BALANCED = 'BALANCED',\n PRIORITIZE_COST = 'PRIORITIZE_COST',\n}\n\n/** Config for the dynamic retrieval config mode. */\nexport enum DynamicRetrievalConfigMode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n MODE_DYNAMIC = 'MODE_DYNAMIC',\n}\n\n/** Config for the function calling config mode. */\nexport enum FunctionCallingConfigMode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n AUTO = 'AUTO',\n ANY = 'ANY',\n NONE = 'NONE',\n}\n\n/** Enum that controls the safety filter level for objectionable content. */\nexport enum SafetyFilterLevel {\n BLOCK_LOW_AND_ABOVE = 'BLOCK_LOW_AND_ABOVE',\n BLOCK_MEDIUM_AND_ABOVE = 'BLOCK_MEDIUM_AND_ABOVE',\n BLOCK_ONLY_HIGH = 'BLOCK_ONLY_HIGH',\n BLOCK_NONE = 'BLOCK_NONE',\n}\n\n/** Enum that controls the generation of people. */\nexport enum PersonGeneration {\n DONT_ALLOW = 'DONT_ALLOW',\n ALLOW_ADULT = 'ALLOW_ADULT',\n ALLOW_ALL = 'ALLOW_ALL',\n}\n\n/** Enum that specifies the language of the text in the prompt. */\nexport enum ImagePromptLanguage {\n auto = 'auto',\n en = 'en',\n ja = 'ja',\n ko = 'ko',\n hi = 'hi',\n}\n\n/** State for the lifecycle of a File. */\nexport enum FileState {\n STATE_UNSPECIFIED = 'STATE_UNSPECIFIED',\n PROCESSING = 'PROCESSING',\n ACTIVE = 'ACTIVE',\n FAILED = 'FAILED',\n}\n\n/** Source of the File. */\nexport enum FileSource {\n SOURCE_UNSPECIFIED = 'SOURCE_UNSPECIFIED',\n UPLOADED = 'UPLOADED',\n GENERATED = 'GENERATED',\n}\n\n/** Enum representing the mask mode of a mask reference image. */\nexport enum MaskReferenceMode {\n MASK_MODE_DEFAULT = 'MASK_MODE_DEFAULT',\n MASK_MODE_USER_PROVIDED = 'MASK_MODE_USER_PROVIDED',\n MASK_MODE_BACKGROUND = 'MASK_MODE_BACKGROUND',\n MASK_MODE_FOREGROUND = 'MASK_MODE_FOREGROUND',\n MASK_MODE_SEMANTIC = 'MASK_MODE_SEMANTIC',\n}\n\n/** Enum representing the control type of a control reference image. */\nexport enum ControlReferenceType {\n CONTROL_TYPE_DEFAULT = 'CONTROL_TYPE_DEFAULT',\n CONTROL_TYPE_CANNY = 'CONTROL_TYPE_CANNY',\n CONTROL_TYPE_SCRIBBLE = 'CONTROL_TYPE_SCRIBBLE',\n CONTROL_TYPE_FACE_MESH = 'CONTROL_TYPE_FACE_MESH',\n}\n\n/** Enum representing the subject type of a subject reference image. */\nexport enum SubjectReferenceType {\n SUBJECT_TYPE_DEFAULT = 'SUBJECT_TYPE_DEFAULT',\n SUBJECT_TYPE_PERSON = 'SUBJECT_TYPE_PERSON',\n SUBJECT_TYPE_ANIMAL = 'SUBJECT_TYPE_ANIMAL',\n SUBJECT_TYPE_PRODUCT = 'SUBJECT_TYPE_PRODUCT',\n}\n\n/** Server content modalities. */\nexport enum MediaModality {\n MODALITY_UNSPECIFIED = 'MODALITY_UNSPECIFIED',\n TEXT = 'TEXT',\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n AUDIO = 'AUDIO',\n DOCUMENT = 'DOCUMENT',\n}\n\n/** Start of speech sensitivity. */\nexport enum StartSensitivity {\n START_SENSITIVITY_UNSPECIFIED = 'START_SENSITIVITY_UNSPECIFIED',\n START_SENSITIVITY_HIGH = 'START_SENSITIVITY_HIGH',\n START_SENSITIVITY_LOW = 'START_SENSITIVITY_LOW',\n}\n\n/** End of speech sensitivity. */\nexport enum EndSensitivity {\n END_SENSITIVITY_UNSPECIFIED = 'END_SENSITIVITY_UNSPECIFIED',\n END_SENSITIVITY_HIGH = 'END_SENSITIVITY_HIGH',\n END_SENSITIVITY_LOW = 'END_SENSITIVITY_LOW',\n}\n\n/** The different ways of handling user activity. */\nexport enum ActivityHandling {\n ACTIVITY_HANDLING_UNSPECIFIED = 'ACTIVITY_HANDLING_UNSPECIFIED',\n START_OF_ACTIVITY_INTERRUPTS = 'START_OF_ACTIVITY_INTERRUPTS',\n NO_INTERRUPTION = 'NO_INTERRUPTION',\n}\n\n/** Options about which input is included in the user's turn. */\nexport enum TurnCoverage {\n TURN_COVERAGE_UNSPECIFIED = 'TURN_COVERAGE_UNSPECIFIED',\n TURN_INCLUDES_ONLY_ACTIVITY = 'TURN_INCLUDES_ONLY_ACTIVITY',\n TURN_INCLUDES_ALL_INPUT = 'TURN_INCLUDES_ALL_INPUT',\n}\n\n/** Metadata describes the input video content. */\nexport declare interface VideoMetadata {\n /** Optional. The end offset of the video. */\n endOffset?: string;\n /** Optional. The start offset of the video. */\n startOffset?: string;\n}\n\n/** Result of executing the [ExecutableCode]. Always follows a `part` containing the [ExecutableCode]. */\nexport declare interface CodeExecutionResult {\n /** Required. Outcome of the code execution. */\n outcome?: Outcome;\n /** Optional. Contains stdout when code execution is successful, stderr or other description otherwise. */\n output?: string;\n}\n\n/** Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the [FunctionDeclaration] tool and [FunctionCallingConfig] mode is set to [Mode.CODE]. */\nexport declare interface ExecutableCode {\n /** Required. The code to be executed. */\n code?: string;\n /** Required. Programming language of the `code`. */\n language?: Language;\n}\n\n/** URI based data. */\nexport declare interface FileData {\n /** Required. URI. */\n fileUri?: string;\n /** Required. The IANA standard MIME type of the source data. */\n mimeType?: string;\n}\n\n/** A function call. */\nexport declare interface FunctionCall {\n /** The unique id of the function call. If populated, the client to execute the\n `function_call` and return the response with the matching `id`. */\n id?: string;\n /** Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. */\n args?: Record;\n /** Required. The name of the function to call. Matches [FunctionDeclaration.name]. */\n name?: string;\n}\n\n/** A function response. */\nexport class FunctionResponse {\n /** The id of the function call this response is for. Populated by the client\n to match the corresponding function call `id`. */\n id?: string;\n /** Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. */\n name?: string;\n /** Required. The function response in JSON object format. Use \"output\" key to specify function output and \"error\" key to specify error details (if any). If \"output\" and \"error\" keys are not specified, then whole \"response\" is treated as function output. */\n response?: Record;\n}\n\n/** Content blob. */\nexport declare interface Blob {\n /** Required. Raw bytes. */\n data?: string;\n /** Required. The IANA standard MIME type of the source data. */\n mimeType?: string;\n}\n\n/** A datatype containing media content.\n\n Exactly one field within a Part should be set, representing the specific type\n of content being conveyed. Using multiple fields within the same `Part`\n instance is considered invalid.\n */\nexport declare interface Part {\n /** Metadata for a given video. */\n videoMetadata?: VideoMetadata;\n /** Indicates if the part is thought from the model. */\n thought?: boolean;\n /** Optional. Result of executing the [ExecutableCode]. */\n codeExecutionResult?: CodeExecutionResult;\n /** Optional. Code generated by the model that is meant to be executed. */\n executableCode?: ExecutableCode;\n /** Optional. URI based data. */\n fileData?: FileData;\n /** Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. */\n functionCall?: FunctionCall;\n /** Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. */\n functionResponse?: FunctionResponse;\n /** Optional. Inlined bytes data. */\n inlineData?: Blob;\n /** Optional. Text part (can be code). */\n text?: string;\n}\n/**\n * Creates a `Part` object from a `URI` string.\n */\nexport function createPartFromUri(uri: string, mimeType: string): Part {\n return {\n fileData: {\n fileUri: uri,\n mimeType: mimeType,\n },\n };\n}\n/**\n * Creates a `Part` object from a `text` string.\n */\nexport function createPartFromText(text: string): Part {\n return {\n text: text,\n };\n}\n/**\n * Creates a `Part` object from a `FunctionCall` object.\n */\nexport function createPartFromFunctionCall(\n name: string,\n args: Record,\n): Part {\n return {\n functionCall: {\n name: name,\n args: args,\n },\n };\n}\n/**\n * Creates a `Part` object from a `FunctionResponse` object.\n */\nexport function createPartFromFunctionResponse(\n id: string,\n name: string,\n response: Record,\n): Part {\n return {\n functionResponse: {\n id: id,\n name: name,\n response: response,\n },\n };\n}\n/**\n * Creates a `Part` object from a `base64` encoded `string`.\n */\nexport function createPartFromBase64(data: string, mimeType: string): Part {\n return {\n inlineData: {\n data: data,\n mimeType: mimeType,\n },\n };\n}\n/**\n * Creates a `Part` object from the `outcome` and `output` of a `CodeExecutionResult` object.\n */\nexport function createPartFromCodeExecutionResult(\n outcome: Outcome,\n output: string,\n): Part {\n return {\n codeExecutionResult: {\n outcome: outcome,\n output: output,\n },\n };\n}\n/**\n * Creates a `Part` object from the `code` and `language` of an `ExecutableCode` object.\n */\nexport function createPartFromExecutableCode(\n code: string,\n language: Language,\n): Part {\n return {\n executableCode: {\n code: code,\n language: language,\n },\n };\n}\n\n/** Contains the multi-part content of a message. */\nexport declare interface Content {\n /** List of parts that constitute a single message. Each part may have\n a different IANA MIME type. */\n parts?: Part[];\n /** Optional. The producer of the content. Must be either 'user' or\n 'model'. Useful to set for multi-turn conversations, otherwise can be\n empty. If role is not specified, SDK will determine the role. */\n role?: string;\n}\nfunction _isPart(obj: unknown): obj is Part {\n if (typeof obj === 'object' && obj !== null) {\n return (\n 'fileData' in obj ||\n 'text' in obj ||\n 'functionCall' in obj ||\n 'functionResponse' in obj ||\n 'inlineData' in obj ||\n 'videoMetadata' in obj ||\n 'codeExecutionResult' in obj ||\n 'executableCode' in obj\n );\n }\n return false;\n}\nfunction _toParts(partOrString: PartListUnion | string): Part[] {\n const parts: Part[] = [];\n if (typeof partOrString === 'string') {\n parts.push(createPartFromText(partOrString));\n } else if (_isPart(partOrString)) {\n parts.push(partOrString);\n } else if (Array.isArray(partOrString)) {\n if (partOrString.length === 0) {\n throw new Error('partOrString cannot be an empty array');\n }\n for (const part of partOrString) {\n if (typeof part === 'string') {\n parts.push(createPartFromText(part));\n } else if (_isPart(part)) {\n parts.push(part);\n } else {\n throw new Error('element in PartUnion must be a Part object or string');\n }\n }\n } else {\n throw new Error('partOrString must be a Part object, string, or array');\n }\n return parts;\n}\n/**\n * Creates a `Content` object with a user role from a `PartListUnion` object or `string`.\n */\nexport function createUserContent(\n partOrString: PartListUnion | string,\n): Content {\n return {\n role: 'user',\n parts: _toParts(partOrString),\n };\n}\n\n/**\n * Creates a `Content` object with a model role from a `PartListUnion` object or `string`.\n */\nexport function createModelContent(\n partOrString: PartListUnion | string,\n): Content {\n return {\n role: 'model',\n parts: _toParts(partOrString),\n };\n}\n/** HTTP options to be used in each of the requests. */\nexport declare interface HttpOptions {\n /** The base URL for the AI platform service endpoint. */\n baseUrl?: string;\n /** Specifies the version of the API to use. */\n apiVersion?: string;\n /** Additional HTTP headers to be sent with the request. */\n headers?: Record;\n /** Timeout for the request in milliseconds. */\n timeout?: number;\n /** Signal for the request. */\n signal?: AbortSignal;\n}\n\n/** Schema that defines the format of input and output data.\n\n Represents a select subset of an OpenAPI 3.0 schema object.\n */\nexport declare interface Schema {\n /** Optional. Example of the object. Will only populated when the object is the root. */\n example?: unknown;\n /** Optional. Pattern of the Type.STRING to restrict a string to a regular expression. */\n pattern?: string;\n /** Optional. Default value of the data. */\n default?: unknown;\n /** Optional. Maximum length of the Type.STRING */\n maxLength?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING */\n minLength?: string;\n /** Optional. Minimum number of the properties for Type.OBJECT. */\n minProperties?: string;\n /** Optional. Maximum number of the properties for Type.OBJECT. */\n maxProperties?: string;\n /** Optional. The value should be validated against any (one or more) of the subschemas in the list. */\n anyOf?: Schema[];\n /** Optional. The description of the data. */\n description?: string;\n /** Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:[\"EAST\", NORTH\", \"SOUTH\", \"WEST\"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:[\"101\", \"201\", \"301\"]} */\n enum?: string[];\n /** Optional. The format of the data. Supported formats: for NUMBER type: \"float\", \"double\" for INTEGER type: \"int32\", \"int64\" for STRING type: \"email\", \"byte\", etc */\n format?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. */\n items?: Schema;\n /** Optional. Maximum number of the elements for Type.ARRAY. */\n maxItems?: string;\n /** Optional. Maximum value of the Type.INTEGER and Type.NUMBER */\n maximum?: number;\n /** Optional. Minimum number of the elements for Type.ARRAY. */\n minItems?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER */\n minimum?: number;\n /** Optional. Indicates if the value may be null. */\n nullable?: boolean;\n /** Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. */\n properties?: Record;\n /** Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. */\n propertyOrdering?: string[];\n /** Optional. Required properties of Type.OBJECT. */\n required?: string[];\n /** Optional. The title of the Schema. */\n title?: string;\n /** Optional. The type of the data. */\n type?: Type;\n}\n\n/** Config for model selection. */\nexport declare interface ModelSelectionConfig {\n /** Options for feature selection preference. */\n featureSelectionPreference?: FeatureSelectionPreference;\n}\n\n/** Safety settings. */\nexport declare interface SafetySetting {\n /** Determines if the harm block method uses probability or probability\n and severity scores. */\n method?: HarmBlockMethod;\n /** Required. Harm category. */\n category?: HarmCategory;\n /** Required. The harm block threshold. */\n threshold?: HarmBlockThreshold;\n}\n\n/** Defines a function that the model can generate JSON inputs for.\n\n The inputs are based on `OpenAPI 3.0 specifications\n `_.\n */\nexport declare interface FunctionDeclaration {\n /** Describes the output from the function in the OpenAPI JSON Schema\n Object format. */\n response?: Schema;\n /** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */\n description?: string;\n /** Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. */\n name?: string;\n /** Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 */\n parameters?: Schema;\n}\n\n/** Tool to support Google Search in Model. Powered by Google. */\nexport declare interface GoogleSearch {}\n\n/** Describes the options to customize dynamic retrieval. */\nexport declare interface DynamicRetrievalConfig {\n /** The mode of the predictor to be used in dynamic retrieval. */\n mode?: DynamicRetrievalConfigMode;\n /** Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used. */\n dynamicThreshold?: number;\n}\n\n/** Tool to retrieve public web data for grounding, powered by Google. */\nexport declare interface GoogleSearchRetrieval {\n /** Specifies the dynamic retrieval configuration for the given source. */\n dynamicRetrievalConfig?: DynamicRetrievalConfig;\n}\n\n/** Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder */\nexport declare interface VertexAISearch {\n /** Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` */\n datastore?: string;\n /** Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` */\n engine?: string;\n}\n\n/** The definition of the Rag resource. */\nexport declare interface VertexRagStoreRagResource {\n /** Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` */\n ragCorpus?: string;\n /** Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field. */\n ragFileIds?: string[];\n}\n\n/** Config for filters. */\nexport declare interface RagRetrievalConfigFilter {\n /** Optional. String for metadata filtering. */\n metadataFilter?: string;\n /** Optional. Only returns contexts with vector distance smaller than the threshold. */\n vectorDistanceThreshold?: number;\n /** Optional. Only returns contexts with vector similarity larger than the threshold. */\n vectorSimilarityThreshold?: number;\n}\n\n/** Config for Hybrid Search. */\nexport declare interface RagRetrievalConfigHybridSearch {\n /** Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally. */\n alpha?: number;\n}\n\n/** Config for LlmRanker. */\nexport declare interface RagRetrievalConfigRankingLlmRanker {\n /** Optional. The model name used for ranking. Format: `gemini-1.5-pro` */\n modelName?: string;\n}\n\n/** Config for Rank Service. */\nexport declare interface RagRetrievalConfigRankingRankService {\n /** Optional. The model name of the rank service. Format: `semantic-ranker-512@latest` */\n modelName?: string;\n}\n\n/** Config for ranking and reranking. */\nexport declare interface RagRetrievalConfigRanking {\n /** Optional. Config for LlmRanker. */\n llmRanker?: RagRetrievalConfigRankingLlmRanker;\n /** Optional. Config for Rank Service. */\n rankService?: RagRetrievalConfigRankingRankService;\n}\n\n/** Specifies the context retrieval config. */\nexport declare interface RagRetrievalConfig {\n /** Optional. Config for filters. */\n filter?: RagRetrievalConfigFilter;\n /** Optional. Config for Hybrid Search. */\n hybridSearch?: RagRetrievalConfigHybridSearch;\n /** Optional. Config for ranking and reranking. */\n ranking?: RagRetrievalConfigRanking;\n /** Optional. The number of contexts to retrieve. */\n topK?: number;\n}\n\n/** Retrieve from Vertex RAG Store for grounding. */\nexport declare interface VertexRagStore {\n /** Optional. Deprecated. Please use rag_resources instead. */\n ragCorpora?: string[];\n /** Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. */\n ragResources?: VertexRagStoreRagResource[];\n /** Optional. The retrieval config for the Rag query. */\n ragRetrievalConfig?: RagRetrievalConfig;\n /** Optional. Number of top k results to return from the selected corpora. */\n similarityTopK?: number;\n /** Optional. Only return results with vector distance smaller than the threshold. */\n vectorDistanceThreshold?: number;\n}\n\n/** Defines a retrieval tool that model can call to access external knowledge. */\nexport declare interface Retrieval {\n /** Optional. Deprecated. This option is no longer supported. */\n disableAttribution?: boolean;\n /** Set to use data source powered by Vertex AI Search. */\n vertexAiSearch?: VertexAISearch;\n /** Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService. */\n vertexRagStore?: VertexRagStore;\n}\n\n/** Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. */\nexport declare interface ToolCodeExecution {}\n\n/** Tool details of a tool that the model may use to generate a response. */\nexport declare interface Tool {\n /** List of function declarations that the tool supports. */\n functionDeclarations?: FunctionDeclaration[];\n /** Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. */\n retrieval?: Retrieval;\n /** Optional. Google Search tool type. Specialized retrieval tool\n that is powered by Google Search. */\n googleSearch?: GoogleSearch;\n /** Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. */\n googleSearchRetrieval?: GoogleSearchRetrieval;\n /** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services. */\n codeExecution?: ToolCodeExecution;\n}\n\n/** Function calling config. */\nexport declare interface FunctionCallingConfig {\n /** Optional. Function calling mode. */\n mode?: FunctionCallingConfigMode;\n /** Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided. */\n allowedFunctionNames?: string[];\n}\n\n/** Tool config.\n\n This config is shared for all tools provided in the request.\n */\nexport declare interface ToolConfig {\n /** Optional. Function calling config. */\n functionCallingConfig?: FunctionCallingConfig;\n}\n\n/** The configuration for the prebuilt speaker to use. */\nexport declare interface PrebuiltVoiceConfig {\n /** The name of the prebuilt voice to use.\n */\n voiceName?: string;\n}\n\n/** The configuration for the voice to use. */\nexport declare interface VoiceConfig {\n /** The configuration for the speaker to use.\n */\n prebuiltVoiceConfig?: PrebuiltVoiceConfig;\n}\n\n/** The speech generation configuration. */\nexport declare interface SpeechConfig {\n /** The configuration for the speaker to use.\n */\n voiceConfig?: VoiceConfig;\n /** Language code (ISO 639. e.g. en-US) for the speech synthesization.\n Only available for Live API.\n */\n languageCode?: string;\n}\n\n/** The thinking features configuration. */\nexport declare interface ThinkingConfig {\n /** Indicates whether to include thoughts in the response. If true, thoughts are returned only if the model supports thought and thoughts are available.\n */\n includeThoughts?: boolean;\n /** Indicates the thinking budget in tokens.\n */\n thinkingBudget?: number;\n}\n\n/** When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. */\nexport declare interface GenerationConfigRoutingConfigAutoRoutingMode {\n /** The model routing preference. */\n modelRoutingPreference?:\n | 'UNKNOWN'\n | 'PRIORITIZE_QUALITY'\n | 'BALANCED'\n | 'PRIORITIZE_COST';\n}\n\n/** When manual routing is set, the specified model will be used directly. */\nexport declare interface GenerationConfigRoutingConfigManualRoutingMode {\n /** The model name to use. Only the public LLM models are accepted. e.g. 'gemini-1.5-pro-001'. */\n modelName?: string;\n}\n\n/** The configuration for routing the request to a specific model. */\nexport declare interface GenerationConfigRoutingConfig {\n /** Automated routing. */\n autoMode?: GenerationConfigRoutingConfigAutoRoutingMode;\n /** Manual routing. */\n manualMode?: GenerationConfigRoutingConfigManualRoutingMode;\n}\n\n/** Optional model configuration parameters.\n\n For more information, see `Content generation parameters\n `_.\n */\nexport declare interface GenerateContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Instructions for the model to steer it toward better performance.\n For example, \"Answer as concisely as possible\" or \"Don't use technical\n terms in your response\".\n */\n systemInstruction?: ContentUnion;\n /** Value that controls the degree of randomness in token selection.\n Lower temperatures are good for prompts that require a less open-ended or\n creative response, while higher temperatures can lead to more diverse or\n creative results.\n */\n temperature?: number;\n /** Tokens are selected from the most to least probable until the sum\n of their probabilities equals this value. Use a lower value for less\n random responses and a higher value for more random responses.\n */\n topP?: number;\n /** For each token selection step, the ``top_k`` tokens with the\n highest probabilities are sampled. Then tokens are further filtered based\n on ``top_p`` with the final token selected using temperature sampling. Use\n a lower number for less random responses and a higher number for more\n random responses.\n */\n topK?: number;\n /** Number of response variations to return.\n */\n candidateCount?: number;\n /** Maximum number of tokens that can be generated in the response.\n */\n maxOutputTokens?: number;\n /** List of strings that tells the model to stop generating text if one\n of the strings is encountered in the response.\n */\n stopSequences?: string[];\n /** Whether to return the log probabilities of the tokens that were\n chosen by the model at each step.\n */\n responseLogprobs?: boolean;\n /** Number of top candidate tokens to return the log probabilities for\n at each generation step.\n */\n logprobs?: number;\n /** Positive values penalize tokens that already appear in the\n generated text, increasing the probability of generating more diverse\n content.\n */\n presencePenalty?: number;\n /** Positive values penalize tokens that repeatedly appear in the\n generated text, increasing the probability of generating more diverse\n content.\n */\n frequencyPenalty?: number;\n /** When ``seed`` is fixed to a specific number, the model makes a best\n effort to provide the same response for repeated requests. By default, a\n random number is used.\n */\n seed?: number;\n /** Output response media type of the generated candidate text.\n */\n responseMimeType?: string;\n /** Schema that the generated candidate text must adhere to.\n */\n responseSchema?: SchemaUnion;\n /** Configuration for model router requests.\n */\n routingConfig?: GenerationConfigRoutingConfig;\n /** Configuration for model selection.\n */\n modelSelectionConfig?: ModelSelectionConfig;\n /** Safety settings in the request to block unsafe content in the\n response.\n */\n safetySettings?: SafetySetting[];\n /** Code that enables the system to interact with external systems to\n perform an action outside of the knowledge and scope of the model.\n */\n tools?: ToolListUnion;\n /** Associates model output to a specific function call.\n */\n toolConfig?: ToolConfig;\n /** Labels with user-defined metadata to break down billed charges. */\n labels?: Record;\n /** Resource name of a context cache that can be used in subsequent\n requests.\n */\n cachedContent?: string;\n /** The requested modalities of the response. Represents the set of\n modalities that the model can return.\n */\n responseModalities?: string[];\n /** If specified, the media resolution specified will be used.\n */\n mediaResolution?: MediaResolution;\n /** The speech generation configuration.\n */\n speechConfig?: SpeechConfigUnion;\n /** If enabled, audio timestamp will be included in the request to the\n model.\n */\n audioTimestamp?: boolean;\n /** The thinking features configuration.\n */\n thinkingConfig?: ThinkingConfig;\n}\n\n/** Config for models.generate_content parameters. */\nexport declare interface GenerateContentParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Content of the request.\n */\n contents: ContentListUnion;\n /** Configuration that contains optional model parameters.\n */\n config?: GenerateContentConfig;\n}\n\n/** Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp */\nexport declare interface GoogleTypeDate {\n /** Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */\n day?: number;\n /** Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */\n month?: number;\n /** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */\n year?: number;\n}\n\n/** Source attributions for content. */\nexport declare interface Citation {\n /** Output only. End index into the content. */\n endIndex?: number;\n /** Output only. License of the attribution. */\n license?: string;\n /** Output only. Publication date of the attribution. */\n publicationDate?: GoogleTypeDate;\n /** Output only. Start index into the content. */\n startIndex?: number;\n /** Output only. Title of the attribution. */\n title?: string;\n /** Output only. Url reference of the attribution. */\n uri?: string;\n}\n\n/** Citation information when the model quotes another source. */\nexport declare interface CitationMetadata {\n /** Contains citation information when the model directly quotes, at\n length, from another source. Can include traditional websites and code\n repositories.\n */\n citations?: Citation[];\n}\n\n/** Chunk from context retrieved by the retrieval tools. */\nexport declare interface GroundingChunkRetrievedContext {\n /** Text of the attribution. */\n text?: string;\n /** Title of the attribution. */\n title?: string;\n /** URI reference of the attribution. */\n uri?: string;\n}\n\n/** Chunk from the web. */\nexport declare interface GroundingChunkWeb {\n /** Domain of the (original) URI. */\n domain?: string;\n /** Title of the chunk. */\n title?: string;\n /** URI reference of the chunk. */\n uri?: string;\n}\n\n/** Grounding chunk. */\nexport declare interface GroundingChunk {\n /** Grounding chunk from context retrieved by the retrieval tools. */\n retrievedContext?: GroundingChunkRetrievedContext;\n /** Grounding chunk from the web. */\n web?: GroundingChunkWeb;\n}\n\n/** Segment of the content. */\nexport declare interface Segment {\n /** Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero. */\n endIndex?: number;\n /** Output only. The index of a Part object within its parent Content object. */\n partIndex?: number;\n /** Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero. */\n startIndex?: number;\n /** Output only. The text corresponding to the segment from the response. */\n text?: string;\n}\n\n/** Grounding support. */\nexport declare interface GroundingSupport {\n /** Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the grounding_chunk_indices. */\n confidenceScores?: number[];\n /** A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim. */\n groundingChunkIndices?: number[];\n /** Segment of the content this support belongs to. */\n segment?: Segment;\n}\n\n/** Metadata related to retrieval in the grounding flow. */\nexport declare interface RetrievalMetadata {\n /** Optional. Score indicating how likely information from Google Search could help answer the prompt. The score is in the range `[0, 1]`, where 0 is the least likely and 1 is the most likely. This score is only populated when Google Search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger Google Search. */\n googleSearchDynamicRetrievalScore?: number;\n}\n\n/** Google search entry point. */\nexport declare interface SearchEntryPoint {\n /** Optional. Web content snippet that can be embedded in a web page or an app webview. */\n renderedContent?: string;\n /** Optional. Base64 encoded JSON representing array of tuple. */\n sdkBlob?: string;\n}\n\n/** Metadata returned to client when grounding is enabled. */\nexport declare interface GroundingMetadata {\n /** List of supporting references retrieved from specified grounding source. */\n groundingChunks?: GroundingChunk[];\n /** Optional. List of grounding support. */\n groundingSupports?: GroundingSupport[];\n /** Optional. Output only. Retrieval metadata. */\n retrievalMetadata?: RetrievalMetadata;\n /** Optional. Queries executed by the retrieval tools. */\n retrievalQueries?: string[];\n /** Optional. Google search entry for the following-up web searches. */\n searchEntryPoint?: SearchEntryPoint;\n /** Optional. Web search queries for the following-up web search. */\n webSearchQueries?: string[];\n}\n\n/** Candidate for the logprobs token and score. */\nexport declare interface LogprobsResultCandidate {\n /** The candidate's log probability. */\n logProbability?: number;\n /** The candidate's token string value. */\n token?: string;\n /** The candidate's token id value. */\n tokenId?: number;\n}\n\n/** Candidates with top log probabilities at each decoding step. */\nexport declare interface LogprobsResultTopCandidates {\n /** Sorted by log probability in descending order. */\n candidates?: LogprobsResultCandidate[];\n}\n\n/** Logprobs Result */\nexport declare interface LogprobsResult {\n /** Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates. */\n chosenCandidates?: LogprobsResultCandidate[];\n /** Length = total number of decoding steps. */\n topCandidates?: LogprobsResultTopCandidates[];\n}\n\n/** Safety rating corresponding to the generated content. */\nexport declare interface SafetyRating {\n /** Output only. Indicates whether the content was filtered out because of this rating. */\n blocked?: boolean;\n /** Output only. Harm category. */\n category?: HarmCategory;\n /** Output only. Harm probability levels in the content. */\n probability?: HarmProbability;\n /** Output only. Harm probability score. */\n probabilityScore?: number;\n /** Output only. Harm severity levels in the content. */\n severity?: HarmSeverity;\n /** Output only. Harm severity score. */\n severityScore?: number;\n}\n\n/** A response candidate generated from the model. */\nexport declare interface Candidate {\n /** Contains the multi-part content of the response.\n */\n content?: Content;\n /** Source attribution of the generated content.\n */\n citationMetadata?: CitationMetadata;\n /** Describes the reason the model stopped generating tokens.\n */\n finishMessage?: string;\n /** Number of tokens for this candidate.\n */\n tokenCount?: number;\n /** The reason why the model stopped generating tokens.\n If empty, the model has not stopped generating the tokens.\n */\n finishReason?: FinishReason;\n /** Output only. Average log probability score of the candidate. */\n avgLogprobs?: number;\n /** Output only. Metadata specifies sources used to ground generated content. */\n groundingMetadata?: GroundingMetadata;\n /** Output only. Index of the candidate. */\n index?: number;\n /** Output only. Log-likelihood scores for the response tokens and top tokens */\n logprobsResult?: LogprobsResult;\n /** Output only. List of ratings for the safety of a response candidate. There is at most one rating per category. */\n safetyRatings?: SafetyRating[];\n}\n\n/** Content filter results for a prompt sent in the request. */\nexport class GenerateContentResponsePromptFeedback {\n /** Output only. Blocked reason. */\n blockReason?: BlockedReason;\n /** Output only. A readable block reason message. */\n blockReasonMessage?: string;\n /** Output only. Safety ratings. */\n safetyRatings?: SafetyRating[];\n}\n\n/** Represents token counting info for a single modality. */\nexport declare interface ModalityTokenCount {\n /** The modality associated with this token count. */\n modality?: MediaModality;\n /** Number of tokens. */\n tokenCount?: number;\n}\n\n/** Usage metadata about response(s). */\nexport class GenerateContentResponseUsageMetadata {\n /** Output only. List of modalities of the cached content in the request input. */\n cacheTokensDetails?: ModalityTokenCount[];\n /** Output only. Number of tokens in the cached part in the input (the cached content). */\n cachedContentTokenCount?: number;\n /** Number of tokens in the response(s). */\n candidatesTokenCount?: number;\n /** Output only. List of modalities that were returned in the response. */\n candidatesTokensDetails?: ModalityTokenCount[];\n /** Number of tokens in the request. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */\n promptTokenCount?: number;\n /** Output only. List of modalities that were processed in the request input. */\n promptTokensDetails?: ModalityTokenCount[];\n /** Output only. Number of tokens present in thoughts output. */\n thoughtsTokenCount?: number;\n /** Output only. Number of tokens present in tool-use prompt(s). */\n toolUsePromptTokenCount?: number;\n /** Output only. List of modalities that were processed for tool-use request inputs. */\n toolUsePromptTokensDetails?: ModalityTokenCount[];\n /** Total token count for prompt, response candidates, and tool-use prompts (if present). */\n totalTokenCount?: number;\n /** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */\n trafficType?: TrafficType;\n}\n\n/** Response message for PredictionService.GenerateContent. */\nexport class GenerateContentResponse {\n /** Response variations returned by the model.\n */\n candidates?: Candidate[];\n /** Timestamp when the request is made to the server.\n */\n createTime?: string;\n /** Identifier for each response.\n */\n responseId?: string;\n /** Output only. The model version used to generate the response. */\n modelVersion?: string;\n /** Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations. */\n promptFeedback?: GenerateContentResponsePromptFeedback;\n /** Usage metadata about the response(s). */\n usageMetadata?: GenerateContentResponseUsageMetadata;\n /**\n * Returns the concatenation of all text parts from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the text from the first\n * one will be returned.\n * If there are non-text parts in the response, the concatenation of all text\n * parts will be returned, and a warning will be logged.\n * If there are thought parts in the response, the concatenation of all text\n * parts excluding the thought parts will be returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'Why is the sky blue?',\n * });\n *\n * console.debug(response.text);\n * ```\n */\n get text(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning text from the first one.',\n );\n }\n let text = '';\n let anyTextPartText = false;\n const nonTextParts = [];\n for (const part of this.candidates?.[0]?.content?.parts ?? []) {\n for (const [fieldName, fieldValue] of Object.entries(part)) {\n if (\n fieldName !== 'text' &&\n fieldName !== 'thought' &&\n (fieldValue !== null || fieldValue !== undefined)\n ) {\n nonTextParts.push(fieldName);\n }\n }\n if (typeof part.text === 'string') {\n if (typeof part.thought === 'boolean' && part.thought) {\n continue;\n }\n anyTextPartText = true;\n text += part.text;\n }\n }\n if (nonTextParts.length > 0) {\n console.warn(\n `there are non-text parts ${nonTextParts} in the response, returning concatenation of all text parts. Please refer to the non text parts for a full response from model.`,\n );\n }\n // part.text === '' is different from part.text is null\n return anyTextPartText ? text : undefined;\n }\n\n /**\n * Returns the function calls from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the function calls from\n * the first one will be returned.\n * If there are no function calls in the response, undefined will be returned.\n *\n * @example\n * ```ts\n * const controlLightFunctionDeclaration: FunctionDeclaration = {\n * name: 'controlLight',\n * parameters: {\n * type: Type.OBJECT,\n * description: 'Set the brightness and color temperature of a room light.',\n * properties: {\n * brightness: {\n * type: Type.NUMBER,\n * description:\n * 'Light level from 0 to 100. Zero is off and 100 is full brightness.',\n * },\n * colorTemperature: {\n * type: Type.STRING,\n * description:\n * 'Color temperature of the light fixture which can be `daylight`, `cool` or `warm`.',\n * },\n * },\n * required: ['brightness', 'colorTemperature'],\n * };\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents: 'Dim the lights so the room feels cozy and warm.',\n * config: {\n * tools: [{functionDeclarations: [controlLightFunctionDeclaration]}],\n * toolConfig: {\n * functionCallingConfig: {\n * mode: FunctionCallingConfigMode.ANY,\n * allowedFunctionNames: ['controlLight'],\n * },\n * },\n * },\n * });\n * console.debug(JSON.stringify(response.functionCalls));\n * ```\n */\n get functionCalls(): FunctionCall[] | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning function calls from the first one.',\n );\n }\n const functionCalls = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.functionCall)\n .map((part) => part.functionCall)\n .filter(\n (functionCall): functionCall is FunctionCall =>\n functionCall !== undefined,\n );\n if (functionCalls?.length === 0) {\n return undefined;\n }\n return functionCalls;\n }\n /**\n * Returns the first executable code from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the executable code from\n * the first one will be returned.\n * If there are no executable code in the response, undefined will be\n * returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.'\n * config: {\n * tools: [{codeExecution: {}}],\n * },\n * });\n *\n * console.debug(response.executableCode);\n * ```\n */\n get executableCode(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning executable code from the first one.',\n );\n }\n const executableCode = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.executableCode)\n .map((part) => part.executableCode)\n .filter(\n (executableCode): executableCode is ExecutableCode =>\n executableCode !== undefined,\n );\n if (executableCode?.length === 0) {\n return undefined;\n }\n\n return executableCode?.[0]?.code;\n }\n /**\n * Returns the first code execution result from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the code execution result from\n * the first one will be returned.\n * If there are no code execution result in the response, undefined will be returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.'\n * config: {\n * tools: [{codeExecution: {}}],\n * },\n * });\n *\n * console.debug(response.codeExecutionResult);\n * ```\n */\n get codeExecutionResult(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning code execution result from the first one.',\n );\n }\n const codeExecutionResult = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.codeExecutionResult)\n .map((part) => part.codeExecutionResult)\n .filter(\n (codeExecutionResult): codeExecutionResult is CodeExecutionResult =>\n codeExecutionResult !== undefined,\n );\n if (codeExecutionResult?.length === 0) {\n return undefined;\n }\n return codeExecutionResult?.[0]?.output;\n }\n}\n\nexport /** Optional parameters for the embed_content method. */\ndeclare interface EmbedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Type of task for which the embedding will be used.\n */\n taskType?: string;\n /** Title for the text. Only applicable when TaskType is\n `RETRIEVAL_DOCUMENT`.\n */\n title?: string;\n /** Reduced dimension for the output embedding. If set,\n excessive values in the output embedding are truncated from the end.\n Supported by newer models since 2024 only. You cannot set this value if\n using the earlier model (`models/embedding-001`).\n */\n outputDimensionality?: number;\n /** Vertex API only. The MIME type of the input.\n */\n mimeType?: string;\n /** Vertex API only. Whether to silently truncate inputs longer than\n the max sequence length. If this option is set to false, oversized inputs\n will lead to an INVALID_ARGUMENT error, similar to other text APIs.\n */\n autoTruncate?: boolean;\n}\n\n/** Parameters for the embed_content method. */\nexport declare interface EmbedContentParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** The content to embed. Only the `parts.text` fields will be counted.\n */\n contents: ContentListUnion;\n /** Configuration that contains optional parameters.\n */\n config?: EmbedContentConfig;\n}\n\n/** Statistics of the input text associated with the result of content embedding. */\nexport declare interface ContentEmbeddingStatistics {\n /** Vertex API only. If the input text was truncated due to having\n a length longer than the allowed maximum input.\n */\n truncated?: boolean;\n /** Vertex API only. Number of tokens of the input text.\n */\n tokenCount?: number;\n}\n\n/** The embedding generated from an input content. */\nexport declare interface ContentEmbedding {\n /** A list of floats representing an embedding.\n */\n values?: number[];\n /** Vertex API only. Statistics of the input text associated with this\n embedding.\n */\n statistics?: ContentEmbeddingStatistics;\n}\n\n/** Request-level metadata for the Vertex Embed Content API. */\nexport declare interface EmbedContentMetadata {\n /** Vertex API only. The total number of billable characters included\n in the request.\n */\n billableCharacterCount?: number;\n}\n\n/** Response for the embed_content method. */\nexport class EmbedContentResponse {\n /** The embeddings for each request, in the same order as provided in\n the batch request.\n */\n embeddings?: ContentEmbedding[];\n /** Vertex API only. Metadata about the request.\n */\n metadata?: EmbedContentMetadata;\n}\n\n/** The config for generating an images. */\nexport declare interface GenerateImagesConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Cloud Storage URI used to store the generated images.\n */\n outputGcsUri?: string;\n /** Description of what to discourage in the generated images.\n */\n negativePrompt?: string;\n /** Number of images to generate.\n */\n numberOfImages?: number;\n /** Aspect ratio of the generated images.\n */\n aspectRatio?: string;\n /** Controls how much the model adheres to the text prompt. Large\n values increase output and prompt alignment, but may compromise image\n quality.\n */\n guidanceScale?: number;\n /** Random seed for image generation. This is not available when\n ``add_watermark`` is set to true.\n */\n seed?: number;\n /** Filter level for safety filtering.\n */\n safetyFilterLevel?: SafetyFilterLevel;\n /** Allows generation of people by the model.\n */\n personGeneration?: PersonGeneration;\n /** Whether to report the safety scores of each generated image and\n the positive prompt in the response.\n */\n includeSafetyAttributes?: boolean;\n /** Whether to include the Responsible AI filter reason if the image\n is filtered out of the response.\n */\n includeRaiReason?: boolean;\n /** Language of the text in the prompt.\n */\n language?: ImagePromptLanguage;\n /** MIME type of the generated image.\n */\n outputMimeType?: string;\n /** Compression quality of the generated image (for ``image/jpeg``\n only).\n */\n outputCompressionQuality?: number;\n /** Whether to add a watermark to the generated images.\n */\n addWatermark?: boolean;\n /** Whether to use the prompt rewriting logic.\n */\n enhancePrompt?: boolean;\n}\n\n/** The parameters for generating images. */\nexport declare interface GenerateImagesParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Text prompt that typically describes the images to output.\n */\n prompt: string;\n /** Configuration for generating images.\n */\n config?: GenerateImagesConfig;\n}\n\n/** An image. */\nexport declare interface Image {\n /** The Cloud Storage URI of the image. ``Image`` can contain a value\n for this field or the ``image_bytes`` field but not both.\n */\n gcsUri?: string;\n /** The image bytes data. ``Image`` can contain a value for this field\n or the ``gcs_uri`` field but not both.\n */\n imageBytes?: string;\n /** The MIME type of the image. */\n mimeType?: string;\n}\n\n/** Safety attributes of a GeneratedImage or the user-provided prompt. */\nexport declare interface SafetyAttributes {\n /** List of RAI categories.\n */\n categories?: string[];\n /** List of scores of each categories.\n */\n scores?: number[];\n /** Internal use only.\n */\n contentType?: string;\n}\n\n/** An output image. */\nexport declare interface GeneratedImage {\n /** The output image data.\n */\n image?: Image;\n /** Responsible AI filter reason if the image is filtered out of the\n response.\n */\n raiFilteredReason?: string;\n /** Safety attributes of the image. Lists of RAI categories and their\n scores of each content.\n */\n safetyAttributes?: SafetyAttributes;\n /** The rewritten prompt used for the image generation if the prompt\n enhancer is enabled.\n */\n enhancedPrompt?: string;\n}\n\n/** The output images response. */\nexport class GenerateImagesResponse {\n /** List of generated images.\n */\n generatedImages?: GeneratedImage[];\n /** Safety attributes of the positive prompt. Only populated if\n ``include_safety_attributes`` is set to True.\n */\n positivePromptSafetyAttributes?: SafetyAttributes;\n}\n\n/** Optional parameters for models.get method. */\nexport declare interface GetModelConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\nexport declare interface GetModelParameters {\n model: string;\n /** Optional parameters for the request. */\n config?: GetModelConfig;\n}\n\n/** An endpoint where you deploy models. */\nexport declare interface Endpoint {\n /** Resource name of the endpoint. */\n name?: string;\n /** ID of the model that's deployed to the endpoint. */\n deployedModelId?: string;\n}\n\n/** A tuned machine learning model. */\nexport declare interface TunedModelInfo {\n /** ID of the base model that you want to tune. */\n baseModel?: string;\n /** Date and time when the base model was created. */\n createTime?: string;\n /** Date and time when the base model was last updated. */\n updateTime?: string;\n}\n\n/** A trained machine learning model. */\nexport declare interface Model {\n /** Resource name of the model. */\n name?: string;\n /** Display name of the model. */\n displayName?: string;\n /** Description of the model. */\n description?: string;\n /** Version ID of the model. A new version is committed when a new\n model version is uploaded or trained under an existing model ID. The\n version ID is an auto-incrementing decimal number in string\n representation. */\n version?: string;\n /** List of deployed models created from this base model. Note that a\n model could have been deployed to endpoints in different locations. */\n endpoints?: Endpoint[];\n /** Labels with user-defined metadata to organize your models. */\n labels?: Record;\n /** Information about the tuned model from the base model. */\n tunedModelInfo?: TunedModelInfo;\n /** The maximum number of input tokens that the model can handle. */\n inputTokenLimit?: number;\n /** The maximum number of output tokens that the model can generate. */\n outputTokenLimit?: number;\n /** List of actions that are supported by the model. */\n supportedActions?: string[];\n}\n\n/** Generation config. */\nexport declare interface GenerationConfig {\n /** Optional. If enabled, audio timestamp will be included in the request to the model. */\n audioTimestamp?: boolean;\n /** Optional. Number of candidates to generate. */\n candidateCount?: number;\n /** Optional. Frequency penalties. */\n frequencyPenalty?: number;\n /** Optional. Logit probabilities. */\n logprobs?: number;\n /** Optional. The maximum number of output tokens to generate per message. */\n maxOutputTokens?: number;\n /** Optional. If specified, the media resolution specified will be used. */\n mediaResolution?: MediaResolution;\n /** Optional. Positive penalties. */\n presencePenalty?: number;\n /** Optional. If true, export the logprobs results in response. */\n responseLogprobs?: boolean;\n /** Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature. */\n responseMimeType?: string;\n /** Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response. */\n responseSchema?: Schema;\n /** Optional. Routing configuration. */\n routingConfig?: GenerationConfigRoutingConfig;\n /** Optional. Seed. */\n seed?: number;\n /** Optional. Stop sequences. */\n stopSequences?: string[];\n /** Optional. Controls the randomness of predictions. */\n temperature?: number;\n /** Optional. If specified, top-k sampling will be used. */\n topK?: number;\n /** Optional. If specified, nucleus sampling will be used. */\n topP?: number;\n}\n\n/** Config for the count_tokens method. */\nexport declare interface CountTokensConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Instructions for the model to steer it toward better performance.\n */\n systemInstruction?: ContentUnion;\n /** Code that enables the system to interact with external systems to\n perform an action outside of the knowledge and scope of the model.\n */\n tools?: Tool[];\n /** Configuration that the model uses to generate the response. Not\n supported by the Gemini Developer API.\n */\n generationConfig?: GenerationConfig;\n}\n\n/** Parameters for counting tokens. */\nexport declare interface CountTokensParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Input content. */\n contents: ContentListUnion;\n /** Configuration for counting tokens. */\n config?: CountTokensConfig;\n}\n\n/** Response for counting tokens. */\nexport class CountTokensResponse {\n /** Total number of tokens. */\n totalTokens?: number;\n /** Number of tokens in the cached part of the prompt (the cached content). */\n cachedContentTokenCount?: number;\n}\n\n/** Optional parameters for computing tokens. */\nexport declare interface ComputeTokensConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for computing tokens. */\nexport declare interface ComputeTokensParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Input content. */\n contents: ContentListUnion;\n /** Optional parameters for the request.\n */\n config?: ComputeTokensConfig;\n}\n\n/** Tokens info with a list of tokens and the corresponding list of token ids. */\nexport declare interface TokensInfo {\n /** Optional. Optional fields for the role from the corresponding Content. */\n role?: string;\n /** A list of token ids from the input. */\n tokenIds?: string[];\n /** A list of tokens from the input. */\n tokens?: string[];\n}\n\n/** Response for computing tokens. */\nexport class ComputeTokensResponse {\n /** Lists of tokens info from the input. A ComputeTokensRequest could have multiple instances with a prompt in each instance. We also need to return lists of tokens info for the request with multiple instances. */\n tokensInfo?: TokensInfo[];\n}\n\n/** Configuration for generating videos. */\nexport declare interface GenerateVideosConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Number of output videos. */\n numberOfVideos?: number;\n /** The gcs bucket where to save the generated videos. */\n outputGcsUri?: string;\n /** Frames per second for video generation. */\n fps?: number;\n /** Duration of the clip for video generation in seconds. */\n durationSeconds?: number;\n /** The RNG seed. If RNG seed is exactly same for each request with unchanged inputs, the prediction results will be consistent. Otherwise, a random RNG seed will be used each time to produce a different result. */\n seed?: number;\n /** The aspect ratio for the generated video. 16:9 (landscape) and 9:16 (portrait) are supported. */\n aspectRatio?: string;\n /** The resolution for the generated video. 1280x720, 1920x1080 are supported. */\n resolution?: string;\n /** Whether allow to generate person videos, and restrict to specific ages. Supported values are: dont_allow, allow_adult. */\n personGeneration?: string;\n /** The pubsub topic where to publish the video generation progress. */\n pubsubTopic?: string;\n /** Optional field in addition to the text content. Negative prompts can be explicitly stated here to help generate the video. */\n negativePrompt?: string;\n /** Whether to use the prompt rewriting logic. */\n enhancePrompt?: boolean;\n}\n\n/** Class that represents the parameters for generating an image. */\nexport declare interface GenerateVideosParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** The text prompt for generating the videos. Optional for image to video use cases. */\n prompt?: string;\n /** The input image for generating the videos.\n Optional if prompt is provided. */\n image?: Image;\n /** Configuration for generating videos. */\n config?: GenerateVideosConfig;\n}\n\n/** A generated video. */\nexport declare interface Video {\n /** Path to another storage. */\n uri?: string;\n /** Video bytes. */\n videoBytes?: string;\n /** Video encoding, for example \"video/mp4\". */\n mimeType?: string;\n}\n\n/** A generated video. */\nexport declare interface GeneratedVideo {\n /** The output video */\n video?: Video;\n}\n\n/** Response with generated videos. */\nexport class GenerateVideosResponse {\n /** List of the generated videos */\n generatedVideos?: GeneratedVideo[];\n /** Returns if any videos were filtered due to RAI policies. */\n raiMediaFilteredCount?: number;\n /** Returns rai failure reasons if any. */\n raiMediaFilteredReasons?: string[];\n}\n\n/** A video generation operation. */\nexport declare interface GenerateVideosOperation {\n /** The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. */\n name?: string;\n /** Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. */\n metadata?: Record;\n /** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */\n done?: boolean;\n /** The error result of the operation in case of failure or cancellation. */\n error?: Record;\n /** The generated videos. */\n response?: GenerateVideosResponse;\n}\n\n/** Optional configuration for cached content creation. */\nexport declare interface CreateCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: \"3.5s\". */\n ttl?: string;\n /** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */\n expireTime?: string;\n /** The user-generated meaningful display name of the cached content.\n */\n displayName?: string;\n /** The content to cache.\n */\n contents?: ContentListUnion;\n /** Developer set system instruction.\n */\n systemInstruction?: ContentUnion;\n /** A list of `Tools` the model may use to generate the next response.\n */\n tools?: Tool[];\n /** Configuration for the tools to use. This config is shared for all tools.\n */\n toolConfig?: ToolConfig;\n}\n\n/** Parameters for caches.create method. */\nexport declare interface CreateCachedContentParameters {\n /** ID of the model to use. Example: gemini-1.5-flash */\n model: string;\n /** Configuration that contains optional parameters.\n */\n config?: CreateCachedContentConfig;\n}\n\n/** Metadata on the usage of the cached content. */\nexport declare interface CachedContentUsageMetadata {\n /** Duration of audio in seconds. */\n audioDurationSeconds?: number;\n /** Number of images. */\n imageCount?: number;\n /** Number of text characters. */\n textCount?: number;\n /** Total number of tokens that the cached content consumes. */\n totalTokenCount?: number;\n /** Duration of video in seconds. */\n videoDurationSeconds?: number;\n}\n\n/** A resource used in LLM queries for users to explicitly specify what to cache. */\nexport declare interface CachedContent {\n /** The server-generated resource name of the cached content. */\n name?: string;\n /** The user-generated meaningful display name of the cached content. */\n displayName?: string;\n /** The name of the publisher model to use for cached content. */\n model?: string;\n /** Creation time of the cache entry. */\n createTime?: string;\n /** When the cache entry was last updated in UTC time. */\n updateTime?: string;\n /** Expiration time of the cached content. */\n expireTime?: string;\n /** Metadata on the usage of the cached content. */\n usageMetadata?: CachedContentUsageMetadata;\n}\n\n/** Optional parameters for caches.get method. */\nexport declare interface GetCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for caches.get method. */\nexport declare interface GetCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Optional parameters for the request.\n */\n config?: GetCachedContentConfig;\n}\n\n/** Optional parameters for caches.delete method. */\nexport declare interface DeleteCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for caches.delete method. */\nexport declare interface DeleteCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Optional parameters for the request.\n */\n config?: DeleteCachedContentConfig;\n}\n\n/** Empty response for caches.delete method. */\nexport class DeleteCachedContentResponse {}\n\n/** Optional parameters for caches.update method. */\nexport declare interface UpdateCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: \"3.5s\". */\n ttl?: string;\n /** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */\n expireTime?: string;\n}\n\nexport declare interface UpdateCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Configuration that contains optional parameters.\n */\n config?: UpdateCachedContentConfig;\n}\n\n/** Config for caches.list method. */\nexport declare interface ListCachedContentsConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n pageSize?: number;\n pageToken?: string;\n}\n\n/** Parameters for caches.list method. */\nexport declare interface ListCachedContentsParameters {\n /** Configuration that contains optional parameters.\n */\n config?: ListCachedContentsConfig;\n}\n\nexport class ListCachedContentsResponse {\n nextPageToken?: string;\n /** List of cached contents.\n */\n cachedContents?: CachedContent[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface ListFilesConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n pageSize?: number;\n pageToken?: string;\n}\n\n/** Generates the parameters for the list method. */\nexport declare interface ListFilesParameters {\n /** Used to override the default configuration. */\n config?: ListFilesConfig;\n}\n\n/** Status of a File that uses a common error model. */\nexport declare interface FileStatus {\n /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */\n details?: Record[];\n /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */\n message?: string;\n /** The status code. 0 for OK, 1 for CANCELLED */\n code?: number;\n}\n\n/** A file uploaded to the API. */\nexport declare interface File {\n /** The `File` resource name. The ID (name excluding the \"files/\" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be generated. Example: `files/123-456` */\n name?: string;\n /** Optional. The human-readable display name for the `File`. The display name must be no more than 512 characters in length, including spaces. Example: 'Welcome Image' */\n displayName?: string;\n /** Output only. MIME type of the file. */\n mimeType?: string;\n /** Output only. Size of the file in bytes. */\n sizeBytes?: string;\n /** Output only. The timestamp of when the `File` was created. */\n createTime?: string;\n /** Output only. The timestamp of when the `File` will be deleted. Only set if the `File` is scheduled to expire. */\n expirationTime?: string;\n /** Output only. The timestamp of when the `File` was last updated. */\n updateTime?: string;\n /** Output only. SHA-256 hash of the uploaded bytes. The hash value is encoded in base64 format. */\n sha256Hash?: string;\n /** Output only. The URI of the `File`. */\n uri?: string;\n /** Output only. The URI of the `File`, only set for downloadable (generated) files. */\n downloadUri?: string;\n /** Output only. Processing state of the File. */\n state?: FileState;\n /** Output only. The source of the `File`. */\n source?: FileSource;\n /** Output only. Metadata for a video. */\n videoMetadata?: Record;\n /** Output only. Error status if File processing failed. */\n error?: FileStatus;\n}\n\n/** Response for the list files method. */\nexport class ListFilesResponse {\n /** A token to retrieve next page of results. */\n nextPageToken?: string;\n /** The list of files. */\n files?: File[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface CreateFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the private _create method. */\nexport declare interface CreateFileParameters {\n /** The file to be uploaded.\n mime_type: (Required) The MIME type of the file. Must be provided.\n name: (Optional) The name of the file in the destination (e.g.\n 'files/sample-image').\n display_name: (Optional) The display name of the file.\n */\n file: File;\n /** Used to override the default configuration. */\n config?: CreateFileConfig;\n}\n\n/** A wrapper class for the http response. */\nexport class HttpResponse {\n /** Used to retain the processed HTTP headers in the response. */\n headers?: Record;\n /**\n * The original http response.\n */\n responseInternal: Response;\n\n constructor(response: Response) {\n // Process the headers.\n const headers: Record = {};\n for (const pair of response.headers.entries()) {\n headers[pair[0]] = pair[1];\n }\n this.headers = headers;\n\n // Keep the original response.\n this.responseInternal = response;\n }\n\n json(): Promise {\n return this.responseInternal.json();\n }\n}\n\n/** Callbacks for the live API. */\nexport interface LiveCallbacks {\n /**\n * Called when the websocket connection is established.\n */\n onopen?: (() => void) | null;\n /**\n * Called when a message is received from the server.\n */\n onmessage: (e: LiveServerMessage) => void;\n /**\n * Called when an error occurs.\n */\n onerror?: ((e: ErrorEvent) => void) | null;\n /**\n * Called when the websocket connection is closed.\n */\n onclose?: ((e: CloseEvent) => void) | null;\n}\n\n/** Parameters for the upload file method. */\nexport interface UploadFileParameters {\n /** The string path to the file to be uploaded or a Blob object. */\n file: string | globalThis.Blob;\n /** Configuration that contains optional parameters. */\n config?: UploadFileConfig;\n}\n/** Response for the create file method. */\nexport class CreateFileResponse {\n /** Used to retain the full HTTP response. */\n sdkHttpResponse?: HttpResponse;\n}\n\n/** Used to override the default configuration. */\nexport declare interface GetFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the get method. */\nexport declare interface GetFileParameters {\n /** The name identifier for the file to retrieve. */\n name: string;\n /** Used to override the default configuration. */\n config?: GetFileConfig;\n}\n\n/** Used to override the default configuration. */\nexport declare interface DeleteFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the get method. */\nexport declare interface DeleteFileParameters {\n /** The name identifier for the file to be deleted. */\n name: string;\n /** Used to override the default configuration. */\n config?: DeleteFileConfig;\n}\n\n/** Response for the delete file method. */\nexport class DeleteFileResponse {}\n\nexport declare interface GetOperationConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for the GET method. */\nexport declare interface GetOperationParameters {\n /** The server-assigned name for the operation. */\n operationName: string;\n /** Used to override the default configuration. */\n config?: GetOperationConfig;\n}\n\nexport declare interface FetchPredictOperationConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for the fetchPredictOperation method. */\nexport declare interface FetchPredictOperationParameters {\n /** The server-assigned name for the operation. */\n operationName: string;\n resourceName: string;\n /** Used to override the default configuration. */\n config?: FetchPredictOperationConfig;\n}\n\nexport declare interface TestTableItem {\n /** The name of the test. This is used to derive the replay id. */\n name?: string;\n /** The parameters to the test. Use pydantic models. */\n parameters?: Record;\n /** Expects an exception for MLDev matching the string. */\n exceptionIfMldev?: string;\n /** Expects an exception for Vertex matching the string. */\n exceptionIfVertex?: string;\n /** Use if you don't want to use the default replay id which is derived from the test name. */\n overrideReplayId?: string;\n /** True if the parameters contain an unsupported union type. This test will be skipped for languages that do not support the union type. */\n hasUnion?: boolean;\n /** When set to a reason string, this test will be skipped in the API mode. Use this flag for tests that can not be reproduced with the real API. E.g. a test that deletes a resource. */\n skipInApiMode?: string;\n /** Keys to ignore when comparing the request and response. This is useful for tests that are not deterministic. */\n ignoreKeys?: string[];\n}\n\nexport declare interface TestTableFile {\n comment?: string;\n testMethod?: string;\n parameterNames?: string[];\n testTable?: TestTableItem[];\n}\n\n/** Represents a single request in a replay. */\nexport declare interface ReplayRequest {\n method?: string;\n url?: string;\n headers?: Record;\n bodySegments?: Record[];\n}\n\n/** Represents a single response in a replay. */\nexport class ReplayResponse {\n statusCode?: number;\n headers?: Record;\n bodySegments?: Record[];\n sdkResponseSegments?: Record[];\n}\n\n/** Represents a single interaction, request and response in a replay. */\nexport declare interface ReplayInteraction {\n request?: ReplayRequest;\n response?: ReplayResponse;\n}\n\n/** Represents a recorded session. */\nexport declare interface ReplayFile {\n replayId?: string;\n interactions?: ReplayInteraction[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface UploadFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The name of the file in the destination (e.g., 'files/sample-image'. If not provided one will be generated. */\n name?: string;\n /** mime_type: The MIME type of the file. If not provided, it will be inferred from the file extension. */\n mimeType?: string;\n /** Optional display name of the file. */\n displayName?: string;\n}\n\n/** Used to override the default configuration. */\nexport declare interface DownloadFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Configuration for upscaling an image.\n\n For more information on this configuration, refer to\n the `Imagen API reference documentation\n `_.\n */\nexport declare interface UpscaleImageConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Whether to include a reason for filtered-out images in the\n response. */\n includeRaiReason?: boolean;\n /** The image format that the output should be saved as. */\n outputMimeType?: string;\n /** The level of compression if the ``output_mime_type`` is\n ``image/jpeg``. */\n outputCompressionQuality?: number;\n}\n\n/** User-facing config UpscaleImageParameters. */\nexport declare interface UpscaleImageParameters {\n /** The model to use. */\n model: string;\n /** The input image to upscale. */\n image: Image;\n /** The factor to upscale the image (x2 or x4). */\n upscaleFactor: string;\n /** Configuration for upscaling. */\n config?: UpscaleImageConfig;\n}\n\n/** A raw reference image.\n\n A raw reference image represents the base image to edit, provided by the user.\n It can optionally be provided in addition to a mask reference image or\n a style reference image.\n */\nexport declare interface RawReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n}\n\n/** Configuration for a Mask reference image. */\nexport declare interface MaskReferenceConfig {\n /** Prompts the model to generate a mask instead of you needing to\n provide one (unless MASK_MODE_USER_PROVIDED is used). */\n maskMode?: MaskReferenceMode;\n /** A list of up to 5 class ids to use for semantic segmentation.\n Automatically creates an image mask based on specific objects. */\n segmentationClasses?: number[];\n /** Dilation percentage of the mask provided.\n Float between 0 and 1. */\n maskDilation?: number;\n}\n\n/** A mask reference image.\n\n This encapsulates either a mask image provided by the user and configs for\n the user provided mask, or only config parameters for the model to generate\n a mask.\n\n A mask image is an image whose non-zero values indicate where to edit the base\n image. If the user provides a mask image, the mask must be in the same\n dimensions as the raw image.\n */\nexport declare interface MaskReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the mask reference image. */\n config?: MaskReferenceConfig;\n}\n\n/** Configuration for a Control reference image. */\nexport declare interface ControlReferenceConfig {\n /** The type of control reference image to use. */\n controlType?: ControlReferenceType;\n /** Defaults to False. When set to True, the control image will be\n computed by the model based on the control type. When set to False,\n the control image must be provided by the user. */\n enableControlImageComputation?: boolean;\n}\n\n/** A control reference image.\n\n The image of the control reference image is either a control image provided\n by the user, or a regular image which the backend will use to generate a\n control image of. In the case of the latter, the\n enable_control_image_computation field in the config should be set to True.\n\n A control image is an image that represents a sketch image of areas for the\n model to fill in based on the prompt.\n */\nexport declare interface ControlReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the control reference image. */\n config?: ControlReferenceConfig;\n}\n\n/** Configuration for a Style reference image. */\nexport declare interface StyleReferenceConfig {\n /** A text description of the style to use for the generated image. */\n styleDescription?: string;\n}\n\n/** A style reference image.\n\n This encapsulates a style reference image provided by the user, and\n additionally optional config parameters for the style reference image.\n\n A raw reference image can also be provided as a destination for the style to\n be applied to.\n */\nexport declare interface StyleReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the style reference image. */\n config?: StyleReferenceConfig;\n}\n\n/** Configuration for a Subject reference image. */\nexport declare interface SubjectReferenceConfig {\n /** The subject type of a subject reference image. */\n subjectType?: SubjectReferenceType;\n /** Subject description for the image. */\n subjectDescription?: string;\n}\n\n/** A subject reference image.\n\n This encapsulates a subject reference image provided by the user, and\n additionally optional config parameters for the subject reference image.\n\n A raw reference image can also be provided as a destination for the subject to\n be applied to.\n */\nexport declare interface SubjectReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the subject reference image. */\n config?: SubjectReferenceConfig;\n}\n\n/** Sent in response to a `LiveGenerateContentSetup` message from the client. */\nexport declare interface LiveServerSetupComplete {}\n\n/** Incremental server update generated by the model in response to client messages.\n\n Content is generated as quickly as possible, and not in real time. Clients\n may choose to buffer and play it out in real time.\n */\nexport declare interface LiveServerContent {\n /** The content that the model has generated as part of the current conversation with the user. */\n modelTurn?: Content;\n /** If true, indicates that the model is done generating. Generation will only start in response to additional client messages. Can be set alongside `content`, indicating that the `content` is the last in the turn. */\n turnComplete?: boolean;\n /** If true, indicates that a client message has interrupted current model generation. If the client is playing out the content in realtime, this is a good signal to stop and empty the current queue. */\n interrupted?: boolean;\n /** If true, indicates that the model is done generating. When model is\n interrupted while generating there will be no generation_complete message\n in interrupted turn, it will go through interrupted > turn_complete.\n When model assumes realtime playback there will be delay between\n generation_complete and turn_complete that is caused by model\n waiting for playback to finish. If true, indicates that the model\n has finished generating all content. This is a signal to the client\n that it can stop sending messages. */\n generationComplete?: boolean;\n}\n\n/** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */\nexport declare interface LiveServerToolCall {\n /** The function call to be executed. */\n functionCalls?: FunctionCall[];\n}\n\n/** Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled.\n\n If there were side-effects to those tool calls, clients may attempt to undo\n the tool calls. This message occurs only in cases where the clients interrupt\n server turns.\n */\nexport declare interface LiveServerToolCallCancellation {\n /** The ids of the tool calls to be cancelled. */\n ids?: string[];\n}\n\n/** Usage metadata about response(s). */\nexport declare interface UsageMetadata {\n /** Number of tokens in the prompt. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */\n promptTokenCount?: number;\n /** Number of tokens in the cached part of the prompt (the cached content). */\n cachedContentTokenCount?: number;\n /** Total number of tokens across all the generated response candidates. */\n responseTokenCount?: number;\n /** Number of tokens present in tool-use prompt(s). */\n toolUsePromptTokenCount?: number;\n /** Number of tokens of thoughts for thinking models. */\n thoughtsTokenCount?: number;\n /** Total token count for prompt, response candidates, and tool-use prompts(if present). */\n totalTokenCount?: number;\n /** List of modalities that were processed in the request input. */\n promptTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were processed in the cache input. */\n cacheTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were returned in the response. */\n responseTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were processed in the tool-use prompt. */\n toolUsePromptTokensDetails?: ModalityTokenCount[];\n /** Traffic type. This shows whether a request consumes Pay-As-You-Go\n or Provisioned Throughput quota. */\n trafficType?: TrafficType;\n}\n\n/** Server will not be able to service client soon. */\nexport declare interface LiveServerGoAway {\n /** The remaining time before the connection will be terminated as ABORTED. The minimal time returned here is specified differently together with the rate limits for a given model. */\n timeLeft?: string;\n}\n\n/** Update of the session resumption state.\n\n Only sent if `session_resumption` was set in the connection config.\n */\nexport declare interface LiveServerSessionResumptionUpdate {\n /** New handle that represents state that can be resumed. Empty if `resumable`=false. */\n newHandle?: string;\n /** True if session can be resumed at this point. It might be not possible to resume session at some points. In that case we send update empty new_handle and resumable=false. Example of such case could be model executing function calls or just generating. Resuming session (using previous session token) in such state will result in some data loss. */\n resumable?: boolean;\n /** Index of last message sent by client that is included in state represented by this SessionResumptionToken. Only sent when `SessionResumptionConfig.transparent` is set.\n\nPresence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `SessionResmumptionTokenUpdate`. This field will enable them to limit buffering (avoid keeping all requests in RAM).\n\nNote: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames arelikely not needed. */\n lastConsumedClientMessageIndex?: string;\n}\n\n/** Response message for API call. */\nexport declare interface LiveServerMessage {\n /** Sent in response to a `LiveClientSetup` message from the client. */\n setupComplete?: LiveServerSetupComplete;\n /** Content generated by the model in response to client messages. */\n serverContent?: LiveServerContent;\n /** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */\n toolCall?: LiveServerToolCall;\n /** Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled. */\n toolCallCancellation?: LiveServerToolCallCancellation;\n /** Usage metadata about model response(s). */\n usageMetadata?: UsageMetadata;\n /** Server will disconnect soon. */\n goAway?: LiveServerGoAway;\n /** Update of the session resumption state. */\n sessionResumptionUpdate?: LiveServerSessionResumptionUpdate;\n}\n\n/** Configures automatic detection of activity. */\nexport declare interface AutomaticActivityDetection {\n /** If enabled, detected voice and text input count as activity. If disabled, the client must send activity signals. */\n disabled?: boolean;\n /** Determines how likely speech is to be detected. */\n startOfSpeechSensitivity?: StartSensitivity;\n /** Determines how likely detected speech is ended. */\n endOfSpeechSensitivity?: EndSensitivity;\n /** The required duration of detected speech before start-of-speech is committed. The lower this value the more sensitive the start-of-speech detection is and the shorter speech can be recognized. However, this also increases the probability of false positives. */\n prefixPaddingMs?: number;\n /** The required duration of detected non-speech (e.g. silence) before end-of-speech is committed. The larger this value, the longer speech gaps can be without interrupting the user's activity but this will increase the model's latency. */\n silenceDurationMs?: number;\n}\n\n/** Marks the end of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface RealtimeInputConfig {\n /** If not set, automatic activity detection is enabled by default. If automatic voice detection is disabled, the client must send activity signals. */\n automaticActivityDetection?: AutomaticActivityDetection;\n /** Defines what effect activity has. */\n activityHandling?: ActivityHandling;\n /** Defines which input is included in the user's turn. */\n turnCoverage?: TurnCoverage;\n}\n\n/** Configuration of session resumption mechanism.\n\n Included in `LiveConnectConfig.session_resumption`. If included server\n will send `LiveServerSessionResumptionUpdate` messages.\n */\nexport declare interface SessionResumptionConfig {\n /** Session resumption handle of previous session (session to restore).\n\nIf not present new session will be started. */\n handle?: string;\n /** If set the server will send `last_consumed_client_message_index` in the `session_resumption_update` messages to allow for transparent reconnections. */\n transparent?: boolean;\n}\n\n/** Context window will be truncated by keeping only suffix of it.\n\n Context window will always be cut at start of USER role turn. System\n instructions and `BidiGenerateContentSetup.prefix_turns` will not be\n subject to the sliding window mechanism, they will always stay at the\n beginning of context window.\n */\nexport declare interface SlidingWindow {\n /** Session reduction target -- how many tokens we should keep. Window shortening operation has some latency costs, so we should avoid running it on every turn. Should be < trigger_tokens. If not set, trigger_tokens/2 is assumed. */\n targetTokens?: string;\n}\n\n/** Enables context window compression -- mechanism managing model context window so it does not exceed given length. */\nexport declare interface ContextWindowCompressionConfig {\n /** Number of tokens (before running turn) that triggers context window compression mechanism. */\n triggerTokens?: string;\n /** Sliding window compression mechanism. */\n slidingWindow?: SlidingWindow;\n}\n\n/** The audio transcription configuration in Setup. */\nexport declare interface AudioTranscriptionConfig {}\n\n/** Message contains configuration that will apply for the duration of the streaming session. */\nexport declare interface LiveClientSetup {\n /** \n The fully qualified name of the publisher model or tuned model endpoint to\n use.\n */\n model?: string;\n /** The generation configuration for the session.\n Note: only a subset of fields are supported.\n */\n generationConfig?: GenerationConfig;\n /** The user provided system instructions for the model.\n Note: only text should be used in parts and content in each part will be\n in a separate paragraph. */\n systemInstruction?: ContentUnion;\n /** A list of `Tools` the model may use to generate the next response.\n\n A `Tool` is a piece of code that enables the system to interact with\n external systems to perform an action, or set of actions, outside of\n knowledge and scope of the model. */\n tools?: ToolListUnion;\n /** Configures the realtime input behavior in BidiGenerateContent. */\n realtimeInputConfig?: RealtimeInputConfig;\n /** Configures session resumption mechanism.\n\n If included server will send SessionResumptionUpdate messages. */\n sessionResumption?: SessionResumptionConfig;\n /** Configures context window compression mechanism.\n\n If included, server will compress context window to fit into given length. */\n contextWindowCompression?: ContextWindowCompressionConfig;\n}\n\n/** Incremental update of the current conversation delivered from the client.\n\n All the content here will unconditionally be appended to the conversation\n history and used as part of the prompt to the model to generate content.\n\n A message here will interrupt any current model generation.\n */\nexport declare interface LiveClientContent {\n /** The content appended to the current conversation with the model.\n\n For single-turn queries, this is a single instance. For multi-turn\n queries, this is a repeated field that contains conversation history and\n latest request.\n */\n turns?: Content[];\n /** If true, indicates that the server content generation should start with\n the currently accumulated prompt. Otherwise, the server will await\n additional messages before starting generation. */\n turnComplete?: boolean;\n}\n\n/** Marks the start of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface ActivityStart {}\n\n/** Marks the end of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface ActivityEnd {}\n\n/** User input that is sent in real time.\n\n This is different from `LiveClientContent` in a few ways:\n\n - Can be sent continuously without interruption to model generation.\n - If there is a need to mix data interleaved across the\n `LiveClientContent` and the `LiveClientRealtimeInput`, server attempts to\n optimize for best response, but there are no guarantees.\n - End of turn is not explicitly specified, but is rather derived from user\n activity (for example, end of speech).\n - Even before the end of turn, the data is processed incrementally\n to optimize for a fast start of the response from the model.\n - Is always assumed to be the user's input (cannot be used to populate\n conversation history).\n */\nexport declare interface LiveClientRealtimeInput {\n /** Inlined bytes data for media input. */\n mediaChunks?: Blob[];\n /** Marks the start of user activity. */\n activityStart?: ActivityStart;\n /** Marks the end of user activity. */\n activityEnd?: ActivityEnd;\n}\n\n/** Client generated response to a `ToolCall` received from the server.\n\n Individual `FunctionResponse` objects are matched to the respective\n `FunctionCall` objects by the `id` field.\n\n Note that in the unary and server-streaming GenerateContent APIs function\n calling happens by exchanging the `Content` parts, while in the bidi\n GenerateContent APIs function calling happens over this dedicated set of\n messages.\n */\nexport class LiveClientToolResponse {\n /** The response to the function calls. */\n functionResponses?: FunctionResponse[];\n}\n\n/** Messages sent by the client in the API call. */\nexport declare interface LiveClientMessage {\n /** Message to be sent by the system when connecting to the API. SDK users should not send this message. */\n setup?: LiveClientSetup;\n /** Incremental update of the current conversation delivered from the client. */\n clientContent?: LiveClientContent;\n /** User input that is sent in real time. */\n realtimeInput?: LiveClientRealtimeInput;\n /** Response to a `ToolCallMessage` received from the server. */\n toolResponse?: LiveClientToolResponse;\n}\n\n/** Session config for the API connection. */\nexport declare interface LiveConnectConfig {\n /** The generation configuration for the session. */\n generationConfig?: GenerationConfig;\n /** The requested modalities of the response. Represents the set of\n modalities that the model can return. Defaults to AUDIO if not specified.\n */\n responseModalities?: Modality[];\n /** The speech generation configuration.\n */\n speechConfig?: SpeechConfig;\n /** The user provided system instructions for the model.\n Note: only text should be used in parts and content in each part will be\n in a separate paragraph. */\n systemInstruction?: ContentUnion;\n /** A list of `Tools` the model may use to generate the next response.\n\n A `Tool` is a piece of code that enables the system to interact with\n external systems to perform an action, or set of actions, outside of\n knowledge and scope of the model. */\n tools?: ToolListUnion;\n /** Configures session resumption mechanism.\n\nIf included the server will send SessionResumptionUpdate messages. */\n sessionResumption?: SessionResumptionConfig;\n /** Configures the realtime input behavior in BidiGenerateContent. */\n realtimeInputConfig?: RealtimeInputConfig;\n /** Configures context window compression mechanism.\n\n If included, server will compress context window to fit into given length. */\n contextWindowCompression?: ContextWindowCompressionConfig;\n}\n\n/** Parameters for connecting to the live API. */\nexport declare interface LiveConnectParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** callbacks */\n callbacks: LiveCallbacks;\n /** Optional configuration parameters for the request.\n */\n config?: LiveConnectConfig;\n}\n\n/** Parameters for initializing a new chat session.\n\n These parameters are used when creating a chat session with the\n `chats.create()` method.\n */\nexport declare interface CreateChatParameters {\n /** The name of the model to use for the chat session.\n\n For example: 'gemini-2.0-flash', 'gemini-1.5-pro', etc. See gemini API\n docs to find the available models.\n */\n model: string;\n /** Config for the entire chat session.\n\n This config applies to all requests within the session\n unless overridden by a per-request `config` in `SendMessageParameters`.\n */\n config?: GenerateContentConfig;\n /** The initial conversation history for the chat session.\n\n This allows you to start the chat with a pre-existing history. The history\n must be a list of `Content` alternating between 'user' and 'model' roles.\n It should start with a 'user' message.\n */\n history?: Content[];\n}\n\n/** Parameters for sending a message within a chat session.\n\n These parameters are used with the `chat.sendMessage()` method.\n */\nexport declare interface SendMessageParameters {\n /** The message to send to the model.\n\n The SDK will combine all parts into a single 'user' content to send to\n the model.\n */\n message: PartListUnion;\n /** Config for this specific request.\n\n Please note that the per-request config does not change the chat level\n config, nor inherit from it. If you intend to use some values from the\n chat's default config, you must explicitly copy them into this per-request\n config.\n */\n config?: GenerateContentConfig;\n}\n\n/** Parameters for sending client content to the live API. */\nexport declare interface LiveSendClientContentParameters {\n /** Client content to send to the session. */\n turns?: ContentListUnion;\n /** If true, indicates that the server content generation should start with\n the currently accumulated prompt. Otherwise, the server will await\n additional messages before starting generation. */\n turnComplete?: boolean;\n}\n\n/** Parameters for sending realtime input to the live API. */\nexport declare interface LiveSendRealtimeInputParameters {\n /** Realtime input to send to the session. */\n media: Blob;\n /** Marks the start of user activity. */\n activityStart?: ActivityStart;\n /** Marks the end of user activity. */\n activityEnd?: ActivityEnd;\n}\n\n/** Parameters for sending tool responses to the live API. */\nexport class LiveSendToolResponseParameters {\n /** Tool responses to send to the session. */\n functionResponses: FunctionResponse[] | FunctionResponse = [];\n}\n\n/** Parameters for the get method of the operations module. */\nexport declare interface OperationGetParameters {\n /** The operation to be retrieved. */\n operation: GenerateVideosOperation;\n /** Used to override the default configuration. */\n config?: GetOperationConfig;\n}\n\nexport type PartUnion = Part | string;\n\nexport type PartListUnion = PartUnion[] | PartUnion;\n\nexport type ContentUnion = Content | PartUnion[] | PartUnion;\n\nexport type ContentListUnion = Content | Content[] | PartUnion | PartUnion[];\n\nexport type SchemaUnion = Schema;\n\nexport type SpeechConfigUnion = SpeechConfig | string;\n\nexport type ToolListUnion = Tool[];\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_caches_converters';\nimport {PagedItem, Pager} from './pagers';\nimport * as types from './types';\n\nexport class Caches extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Lists cached content configurations.\n *\n * @param params - The parameters for the list request.\n * @return The paginated results of the list of cached contents.\n *\n * @example\n * ```ts\n * const cachedContents = await ai.caches.list({config: {'pageSize': 2}});\n * for (const cachedContent of cachedContents) {\n * console.log(cachedContent);\n * }\n * ```\n */\n list = async (\n params: types.ListCachedContentsParameters = {},\n ): Promise> => {\n return new Pager(\n PagedItem.PAGED_ITEM_CACHED_CONTENTS,\n (x: types.ListCachedContentsParameters) => this.listInternal(x),\n await this.listInternal(params),\n params,\n );\n };\n\n /**\n * Creates a cached contents resource.\n *\n * @remarks\n * Context caching is only supported for specific models. See [Gemini\n * Developer API reference](https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac)\n * and [Vertex AI reference](https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models)\n * for more information.\n *\n * @param params - The parameters for the create request.\n * @return The created cached content.\n *\n * @example\n * ```ts\n * const contents = ...; // Initialize the content to cache.\n * const response = await ai.caches.create({\n * model: 'gemini-1.5-flash',\n * config: {\n * 'contents': contents,\n * 'displayName': 'test cache',\n * 'systemInstruction': 'What is the sum of the two pdfs?',\n * 'ttl': '86400s',\n * }\n * });\n * ```\n */\n async create(\n params: types.CreateCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.createCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.createCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n /**\n * Gets cached content configurations.\n *\n * @param params - The parameters for the get request.\n * @return The cached content.\n *\n * @example\n * ```ts\n * await ai.caches.get({name: 'gemini-1.5-flash'});\n * ```\n */\n async get(\n params: types.GetCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.getCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n /**\n * Deletes cached content.\n *\n * @param params - The parameters for the delete request.\n * @return The empty response returned by the API.\n *\n * @example\n * ```ts\n * await ai.caches.delete({name: 'gemini-1.5-flash'});\n * ```\n */\n async delete(\n params: types.DeleteCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.deleteCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteCachedContentResponseFromVertex();\n const typedResp = new types.DeleteCachedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.deleteCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteCachedContentResponseFromMldev();\n const typedResp = new types.DeleteCachedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Updates cached content configurations.\n *\n * @param params - The parameters for the update request.\n * @return The updated cached content.\n *\n * @example\n * ```ts\n * const response = await ai.caches.update({\n * name: 'gemini-1.5-flash',\n * config: {'ttl': '7600s'}\n * });\n * ```\n */\n async update(\n params: types.UpdateCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.updateCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'PATCH',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.updateCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'PATCH',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n private async listInternal(\n params: types.ListCachedContentsParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.listCachedContentsParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listCachedContentsResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListCachedContentsResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.listCachedContentsParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listCachedContentsResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListCachedContentsResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ApiClient} from './_api_client';\nimport * as t from './_transformers';\nimport {Models} from './models';\nimport * as types from './types';\n\n/**\n * Returns true if the response is valid, false otherwise.\n */\nfunction isValidResponse(response: types.GenerateContentResponse): boolean {\n if (response.candidates == undefined || response.candidates.length === 0) {\n return false;\n }\n const content = response.candidates[0]?.content;\n if (content === undefined) {\n return false;\n }\n return isValidContent(content);\n}\n\nfunction isValidContent(content: types.Content): boolean {\n if (content.parts === undefined || content.parts.length === 0) {\n return false;\n }\n for (const part of content.parts) {\n if (part === undefined || Object.keys(part).length === 0) {\n return false;\n }\n if (part.text !== undefined && part.text === '') {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Validates the history contains the correct roles.\n *\n * @remarks\n * Expects the history to start with a user turn and then alternate between\n * user and model turns.\n *\n * @throws Error if the history does not start with a user turn.\n * @throws Error if the history contains an invalid role.\n */\nfunction validateHistory(history: types.Content[]) {\n // Empty history is valid.\n if (history.length === 0) {\n return;\n }\n if (history[0].role !== 'user') {\n throw new Error('History must start with a user turn.');\n }\n for (const content of history) {\n if (content.role !== 'user' && content.role !== 'model') {\n throw new Error(`Role must be user or model, but got ${content.role}.`);\n }\n }\n}\n\n/**\n * Extracts the curated (valid) history from a comprehensive history.\n *\n * @remarks\n * The model may sometimes generate invalid or empty contents(e.g., due to safty\n * filters or recitation). Extracting valid turns from the history\n * ensures that subsequent requests could be accpeted by the model.\n */\nfunction extractCuratedHistory(\n comprehensiveHistory: types.Content[],\n): types.Content[] {\n if (comprehensiveHistory === undefined || comprehensiveHistory.length === 0) {\n return [];\n }\n const curatedHistory: types.Content[] = [];\n const length = comprehensiveHistory.length;\n let i = 0;\n let userInput = comprehensiveHistory[0];\n while (i < length) {\n if (comprehensiveHistory[i].role === 'user') {\n userInput = comprehensiveHistory[i];\n i++;\n } else {\n const modelOutput: types.Content[] = [];\n let isValid = true;\n while (i < length && comprehensiveHistory[i].role === 'model') {\n modelOutput.push(comprehensiveHistory[i]);\n if (isValid && !isValidContent(comprehensiveHistory[i])) {\n isValid = false;\n }\n i++;\n }\n if (isValid) {\n curatedHistory.push(userInput);\n curatedHistory.push(...modelOutput);\n }\n }\n }\n return curatedHistory;\n}\n\n/**\n * A utility class to create a chat session.\n */\nexport class Chats {\n private readonly modelsModule: Models;\n private readonly apiClient: ApiClient;\n\n constructor(modelsModule: Models, apiClient: ApiClient) {\n this.modelsModule = modelsModule;\n this.apiClient = apiClient;\n }\n\n /**\n * Creates a new chat session.\n *\n * @remarks\n * The config in the params will be used for all requests within the chat\n * session unless overridden by a per-request `config` in\n * @see {@link types.SendMessageParameters#config}.\n *\n * @param params - Parameters for creating a chat session.\n * @returns A new chat session.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({\n * model: 'gemini-2.0-flash'\n * config: {\n * temperature: 0.5,\n * maxOutputTokens: 1024,\n * }\n * });\n * ```\n */\n create(params: types.CreateChatParameters) {\n return new Chat(\n this.apiClient,\n this.modelsModule,\n params.model,\n params.config,\n params.history,\n );\n }\n}\n\n/**\n * Chat session that enables sending messages to the model with previous\n * conversation context.\n *\n * @remarks\n * The session maintains all the turns between user and model.\n */\nexport class Chat {\n // A promise to represent the current state of the message being sent to the\n // model.\n private sendPromise: Promise = Promise.resolve();\n\n constructor(\n private readonly apiClient: ApiClient,\n private readonly modelsModule: Models,\n private readonly model: string,\n private readonly config: types.GenerateContentConfig = {},\n private history: types.Content[] = [],\n ) {\n validateHistory(history);\n }\n\n /**\n * Sends a message to the model and returns the response.\n *\n * @remarks\n * This method will wait for the previous message to be processed before\n * sending the next message.\n *\n * @see {@link Chat#sendMessageStream} for streaming method.\n * @param params - parameters for sending messages within a chat session.\n * @returns The model's response.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({model: 'gemini-2.0-flash'});\n * const response = await chat.sendMessage({\n * message: 'Why is the sky blue?'\n * });\n * console.log(response.text);\n * ```\n */\n async sendMessage(\n params: types.SendMessageParameters,\n ): Promise {\n await this.sendPromise;\n const inputContent = t.tContent(this.apiClient, params.message);\n const responsePromise = this.modelsModule.generateContent({\n model: this.model,\n contents: this.getHistory(true).concat(inputContent),\n config: params.config ?? this.config,\n });\n this.sendPromise = (async () => {\n const response = await responsePromise;\n const outputContent = response.candidates?.[0]?.content;\n const modelOutput = outputContent ? [outputContent] : [];\n this.recordHistory(inputContent, modelOutput);\n return;\n })();\n await this.sendPromise;\n return responsePromise;\n }\n\n /**\n * Sends a message to the model and returns the response in chunks.\n *\n * @remarks\n * This method will wait for the previous message to be processed before\n * sending the next message.\n *\n * @see {@link Chat#sendMessage} for non-streaming method.\n * @param params - parameters for sending the message.\n * @return The model's response.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({model: 'gemini-2.0-flash'});\n * const response = await chat.sendMessageStream({\n * message: 'Why is the sky blue?'\n * });\n * for await (const chunk of response) {\n * console.log(chunk.text);\n * }\n * ```\n */\n async sendMessageStream(\n params: types.SendMessageParameters,\n ): Promise> {\n await this.sendPromise;\n const inputContent = t.tContent(this.apiClient, params.message);\n const streamResponse = this.modelsModule.generateContentStream({\n model: this.model,\n contents: this.getHistory(true).concat(inputContent),\n config: params.config ?? this.config,\n });\n this.sendPromise = streamResponse.then(() => undefined);\n const response = await streamResponse;\n const result = this.processStreamResponse(response, inputContent);\n return result;\n }\n\n /**\n * Returns the chat history.\n *\n * @remarks\n * The history is a list of contents alternating between user and model.\n *\n * There are two types of history:\n * - The `curated history` contains only the valid turns between user and\n * model, which will be included in the subsequent requests sent to the model.\n * - The `comprehensive history` contains all turns, including invalid or\n * empty model outputs, providing a complete record of the history.\n *\n * The history is updated after receiving the response from the model,\n * for streaming response, it means receiving the last chunk of the response.\n *\n * The `comprehensive history` is returned by default. To get the `curated\n * history`, set the `curated` parameter to `true`.\n *\n * @param curated - whether to return the curated history or the comprehensive\n * history.\n * @return History contents alternating between user and model for the entire\n * chat session.\n */\n getHistory(curated: boolean = false): types.Content[] {\n return curated ? extractCuratedHistory(this.history) : this.history;\n }\n\n private async *processStreamResponse(\n streamResponse: AsyncGenerator,\n inputContent: types.Content,\n ) {\n const outputContent: types.Content[] = [];\n for await (const chunk of streamResponse) {\n if (isValidResponse(chunk)) {\n const content = chunk.candidates?.[0]?.content;\n if (content !== undefined) {\n outputContent.push(content);\n }\n }\n yield chunk;\n }\n this.recordHistory(inputContent, outputContent);\n }\n\n private recordHistory(\n userInput: types.Content,\n modelOutput: types.Content[],\n ) {\n let outputContents: types.Content[] = [];\n if (\n modelOutput.length > 0 &&\n modelOutput.every((content) => content.role === 'model')\n ) {\n outputContents = modelOutput;\n } else {\n // Appends an empty content when model returns empty response, so that the\n // history is always alternating between user and model.\n outputContents.push({\n role: 'model',\n parts: [],\n } as types.Content);\n }\n this.history.push(userInput);\n this.history.push(...outputContents);\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function listFilesConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listFilesParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listFilesConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function fileStatusToMldev(\n apiClient: ApiClient,\n fromObject: types.FileStatus,\n): Record {\n const toObject: Record = {};\n\n const fromDetails = common.getValueByPath(fromObject, ['details']);\n if (fromDetails != null) {\n common.setValueByPath(toObject, ['details'], fromDetails);\n }\n\n const fromMessage = common.getValueByPath(fromObject, ['message']);\n if (fromMessage != null) {\n common.setValueByPath(toObject, ['message'], fromMessage);\n }\n\n const fromCode = common.getValueByPath(fromObject, ['code']);\n if (fromCode != null) {\n common.setValueByPath(toObject, ['code'], fromCode);\n }\n\n return toObject;\n}\n\nexport function fileToMldev(\n apiClient: ApiClient,\n fromObject: types.File,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n const fromSizeBytes = common.getValueByPath(fromObject, ['sizeBytes']);\n if (fromSizeBytes != null) {\n common.setValueByPath(toObject, ['sizeBytes'], fromSizeBytes);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromExpirationTime = common.getValueByPath(fromObject, [\n 'expirationTime',\n ]);\n if (fromExpirationTime != null) {\n common.setValueByPath(toObject, ['expirationTime'], fromExpirationTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromSha256Hash = common.getValueByPath(fromObject, ['sha256Hash']);\n if (fromSha256Hash != null) {\n common.setValueByPath(toObject, ['sha256Hash'], fromSha256Hash);\n }\n\n const fromUri = common.getValueByPath(fromObject, ['uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromDownloadUri = common.getValueByPath(fromObject, ['downloadUri']);\n if (fromDownloadUri != null) {\n common.setValueByPath(toObject, ['downloadUri'], fromDownloadUri);\n }\n\n const fromState = common.getValueByPath(fromObject, ['state']);\n if (fromState != null) {\n common.setValueByPath(toObject, ['state'], fromState);\n }\n\n const fromSource = common.getValueByPath(fromObject, ['source']);\n if (fromSource != null) {\n common.setValueByPath(toObject, ['source'], fromSource);\n }\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(\n toObject,\n ['error'],\n fileStatusToMldev(apiClient, fromError),\n );\n }\n\n return toObject;\n}\n\nexport function createFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromFile = common.getValueByPath(fromObject, ['file']);\n if (fromFile != null) {\n common.setValueByPath(toObject, ['file'], fileToMldev(apiClient, fromFile));\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function getFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'file'],\n t.tFileName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.DeleteFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'file'],\n t.tFileName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function fileStatusFromMldev(\n apiClient: ApiClient,\n fromObject: types.FileStatus,\n): Record {\n const toObject: Record = {};\n\n const fromDetails = common.getValueByPath(fromObject, ['details']);\n if (fromDetails != null) {\n common.setValueByPath(toObject, ['details'], fromDetails);\n }\n\n const fromMessage = common.getValueByPath(fromObject, ['message']);\n if (fromMessage != null) {\n common.setValueByPath(toObject, ['message'], fromMessage);\n }\n\n const fromCode = common.getValueByPath(fromObject, ['code']);\n if (fromCode != null) {\n common.setValueByPath(toObject, ['code'], fromCode);\n }\n\n return toObject;\n}\n\nexport function fileFromMldev(\n apiClient: ApiClient,\n fromObject: types.File,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n const fromSizeBytes = common.getValueByPath(fromObject, ['sizeBytes']);\n if (fromSizeBytes != null) {\n common.setValueByPath(toObject, ['sizeBytes'], fromSizeBytes);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromExpirationTime = common.getValueByPath(fromObject, [\n 'expirationTime',\n ]);\n if (fromExpirationTime != null) {\n common.setValueByPath(toObject, ['expirationTime'], fromExpirationTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromSha256Hash = common.getValueByPath(fromObject, ['sha256Hash']);\n if (fromSha256Hash != null) {\n common.setValueByPath(toObject, ['sha256Hash'], fromSha256Hash);\n }\n\n const fromUri = common.getValueByPath(fromObject, ['uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromDownloadUri = common.getValueByPath(fromObject, ['downloadUri']);\n if (fromDownloadUri != null) {\n common.setValueByPath(toObject, ['downloadUri'], fromDownloadUri);\n }\n\n const fromState = common.getValueByPath(fromObject, ['state']);\n if (fromState != null) {\n common.setValueByPath(toObject, ['state'], fromState);\n }\n\n const fromSource = common.getValueByPath(fromObject, ['source']);\n if (fromSource != null) {\n common.setValueByPath(toObject, ['source'], fromSource);\n }\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(\n toObject,\n ['error'],\n fileStatusFromMldev(apiClient, fromError),\n );\n }\n\n return toObject;\n}\n\nexport function listFilesResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromFiles = common.getValueByPath(fromObject, ['files']);\n if (fromFiles != null) {\n if (Array.isArray(fromFiles)) {\n common.setValueByPath(\n toObject,\n ['files'],\n fromFiles.map((item) => {\n return fileFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['files'], fromFiles);\n }\n }\n\n return toObject;\n}\n\nexport function createFileResponseFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function deleteFileResponseFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_files_converters';\nimport {PagedItem, Pager} from './pagers';\nimport * as types from './types';\n\nexport class Files extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Lists all current project files from the service.\n *\n * @param params - The parameters for the list request\n * @return The paginated results of the list of files\n *\n * @example\n * The following code prints the names of all files from the service, the\n * size of each page is 10.\n *\n * ```ts\n * const listResponse = await ai.files.list({config: {'pageSize': 10}});\n * for await (const file of listResponse) {\n * console.log(file.name);\n * }\n * ```\n */\n list = async (\n params: types.ListFilesParameters = {},\n ): Promise> => {\n return new Pager(\n PagedItem.PAGED_ITEM_FILES,\n (x: types.ListFilesParameters) => this.listInternal(x),\n await this.listInternal(params),\n params,\n );\n };\n\n /**\n * Uploads a file asynchronously to the Gemini API.\n * This method is not available in Vertex AI.\n * Supported upload sources:\n * - Node.js: File path (string) or Blob object.\n * - Browser: Blob object (e.g., File).\n *\n * @remarks\n * The `mimeType` can be specified in the `config` parameter. If omitted:\n * - For file path (string) inputs, the `mimeType` will be inferred from the\n * file extension.\n * - For Blob object inputs, the `mimeType` will be set to the Blob's `type`\n * property.\n * Somex eamples for file extension to mimeType mapping:\n * .txt -> text/plain\n * .json -> application/json\n * .jpg -> image/jpeg\n * .png -> image/png\n * .mp3 -> audio/mpeg\n * .mp4 -> video/mp4\n *\n * This section can contain multiple paragraphs and code examples.\n *\n * @param params - Optional parameters specified in the\n * `types.UploadFileParameters` interface.\n * @see {@link types.UploadFileParameters#config} for the optional\n * config in the parameters.\n * @return A promise that resolves to a `types.File` object.\n * @throws An error if called on a Vertex AI client.\n * @throws An error if the `mimeType` is not provided and can not be inferred,\n * the `mimeType` can be provided in the `params.config` parameter.\n * @throws An error occurs if a suitable upload location cannot be established.\n *\n * @example\n * The following code uploads a file to Gemini API.\n *\n * ```ts\n * const file = await ai.files.upload({file: 'file.txt', config: {\n * mimeType: 'text/plain',\n * }});\n * console.log(file.name);\n * ```\n */\n async upload(params: types.UploadFileParameters): Promise {\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'Vertex AI does not support uploading files. You can share files through a GCS bucket.',\n );\n }\n\n return this.apiClient\n .uploadFile(params.file, params.config)\n .then((response) => {\n const file = converters.fileFromMldev(this.apiClient, response);\n return file as types.File;\n });\n }\n\n private async listInternal(\n params: types.ListFilesParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.listFilesParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap('files', body['_url'] as Record);\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listFilesResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListFilesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n private async createInternal(\n params: types.CreateFileParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.createFileParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'upload/v1beta/files',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.createFileResponseFromMldev();\n const typedResp = new types.CreateFileResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Retrieves the file information from the service.\n *\n * @param params - The parameters for the get request\n * @return The Promise that resolves to the types.File object requested.\n *\n * @example\n * ```ts\n * const config: GetFileParameters = {\n * name: fileName,\n * };\n * file = await ai.files.get(config);\n * console.log(file.name);\n * ```\n */\n async get(params: types.GetFileParameters): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.getFileParametersToMldev(this.apiClient, params);\n path = common.formatMap(\n 'files/{file}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.fileFromMldev(this.apiClient, apiResponse);\n\n return resp as types.File;\n });\n }\n }\n\n /**\n * Deletes a remotely stored file.\n *\n * @param params - The parameters for the delete request.\n * @return The DeleteFileResponse, the response for the delete method.\n *\n * @example\n * The following code deletes an example file named \"files/mehozpxf877d\".\n *\n * ```ts\n * await ai.files.delete({name: file.name});\n * ```\n */\n async delete(\n params: types.DeleteFileParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.deleteFileParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'files/{file}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteFileResponseFromMldev();\n const typedResp = new types.DeleteFileResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function partToMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['videoMetadata']) !== undefined) {\n throw new Error('videoMetadata parameter is not supported in Gemini API.');\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function partToVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function contentToVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToMldev(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['example']) !== undefined) {\n throw new Error('example parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['pattern']) !== undefined) {\n throw new Error('pattern parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['default']) !== undefined) {\n throw new Error('default parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxLength']) !== undefined) {\n throw new Error('maxLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minLength']) !== undefined) {\n throw new Error('minLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minProperties']) !== undefined) {\n throw new Error('minProperties parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxProperties']) !== undefined) {\n throw new Error('maxProperties parameter is not supported in Gemini API.');\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function schemaToVertex(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n const fromExample = common.getValueByPath(fromObject, ['example']);\n if (fromExample != null) {\n common.setValueByPath(toObject, ['example'], fromExample);\n }\n\n const fromPattern = common.getValueByPath(fromObject, ['pattern']);\n if (fromPattern != null) {\n common.setValueByPath(toObject, ['pattern'], fromPattern);\n }\n\n const fromDefault = common.getValueByPath(fromObject, ['default']);\n if (fromDefault != null) {\n common.setValueByPath(toObject, ['default'], fromDefault);\n }\n\n const fromMaxLength = common.getValueByPath(fromObject, ['maxLength']);\n if (fromMaxLength != null) {\n common.setValueByPath(toObject, ['maxLength'], fromMaxLength);\n }\n\n const fromMinLength = common.getValueByPath(fromObject, ['minLength']);\n if (fromMinLength != null) {\n common.setValueByPath(toObject, ['minLength'], fromMinLength);\n }\n\n const fromMinProperties = common.getValueByPath(fromObject, [\n 'minProperties',\n ]);\n if (fromMinProperties != null) {\n common.setValueByPath(toObject, ['minProperties'], fromMinProperties);\n }\n\n const fromMaxProperties = common.getValueByPath(fromObject, [\n 'maxProperties',\n ]);\n if (fromMaxProperties != null) {\n common.setValueByPath(toObject, ['maxProperties'], fromMaxProperties);\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['response']) !== undefined) {\n throw new Error('response parameter is not supported in Gemini API.');\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n schemaToVertex(apiClient, fromResponse),\n );\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function googleSearchToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToMldev(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToVertex(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToMldev(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n if (common.getValueByPath(fromObject, ['retrieval']) !== undefined) {\n throw new Error('retrieval parameter is not supported in Gemini API.');\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToMldev());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function toolToVertex(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n const fromRetrieval = common.getValueByPath(fromObject, ['retrieval']);\n if (fromRetrieval != null) {\n common.setValueByPath(toObject, ['retrieval'], fromRetrieval);\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToVertex());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function sessionResumptionConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.SessionResumptionConfig,\n): Record {\n const toObject: Record = {};\n\n const fromHandle = common.getValueByPath(fromObject, ['handle']);\n if (fromHandle != null) {\n common.setValueByPath(toObject, ['handle'], fromHandle);\n }\n\n if (common.getValueByPath(fromObject, ['transparent']) !== undefined) {\n throw new Error('transparent parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function sessionResumptionConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.SessionResumptionConfig,\n): Record {\n const toObject: Record = {};\n\n const fromHandle = common.getValueByPath(fromObject, ['handle']);\n if (fromHandle != null) {\n common.setValueByPath(toObject, ['handle'], fromHandle);\n }\n\n const fromTransparent = common.getValueByPath(fromObject, ['transparent']);\n if (fromTransparent != null) {\n common.setValueByPath(toObject, ['transparent'], fromTransparent);\n }\n\n return toObject;\n}\n\nexport function audioTranscriptionConfigToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function audioTranscriptionConfigToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function automaticActivityDetectionToMldev(\n apiClient: ApiClient,\n fromObject: types.AutomaticActivityDetection,\n): Record {\n const toObject: Record = {};\n\n const fromDisabled = common.getValueByPath(fromObject, ['disabled']);\n if (fromDisabled != null) {\n common.setValueByPath(toObject, ['disabled'], fromDisabled);\n }\n\n const fromStartOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'startOfSpeechSensitivity',\n ]);\n if (fromStartOfSpeechSensitivity != null) {\n common.setValueByPath(\n toObject,\n ['startOfSpeechSensitivity'],\n fromStartOfSpeechSensitivity,\n );\n }\n\n const fromEndOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'endOfSpeechSensitivity',\n ]);\n if (fromEndOfSpeechSensitivity != null) {\n common.setValueByPath(\n toObject,\n ['endOfSpeechSensitivity'],\n fromEndOfSpeechSensitivity,\n );\n }\n\n const fromPrefixPaddingMs = common.getValueByPath(fromObject, [\n 'prefixPaddingMs',\n ]);\n if (fromPrefixPaddingMs != null) {\n common.setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);\n }\n\n const fromSilenceDurationMs = common.getValueByPath(fromObject, [\n 'silenceDurationMs',\n ]);\n if (fromSilenceDurationMs != null) {\n common.setValueByPath(\n toObject,\n ['silenceDurationMs'],\n fromSilenceDurationMs,\n );\n }\n\n return toObject;\n}\n\nexport function automaticActivityDetectionToVertex(\n apiClient: ApiClient,\n fromObject: types.AutomaticActivityDetection,\n): Record {\n const toObject: Record = {};\n\n const fromDisabled = common.getValueByPath(fromObject, ['disabled']);\n if (fromDisabled != null) {\n common.setValueByPath(toObject, ['disabled'], fromDisabled);\n }\n\n const fromStartOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'startOfSpeechSensitivity',\n ]);\n if (fromStartOfSpeechSensitivity != null) {\n common.setValueByPath(\n toObject,\n ['startOfSpeechSensitivity'],\n fromStartOfSpeechSensitivity,\n );\n }\n\n const fromEndOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'endOfSpeechSensitivity',\n ]);\n if (fromEndOfSpeechSensitivity != null) {\n common.setValueByPath(\n toObject,\n ['endOfSpeechSensitivity'],\n fromEndOfSpeechSensitivity,\n );\n }\n\n const fromPrefixPaddingMs = common.getValueByPath(fromObject, [\n 'prefixPaddingMs',\n ]);\n if (fromPrefixPaddingMs != null) {\n common.setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);\n }\n\n const fromSilenceDurationMs = common.getValueByPath(fromObject, [\n 'silenceDurationMs',\n ]);\n if (fromSilenceDurationMs != null) {\n common.setValueByPath(\n toObject,\n ['silenceDurationMs'],\n fromSilenceDurationMs,\n );\n }\n\n return toObject;\n}\n\nexport function realtimeInputConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.RealtimeInputConfig,\n): Record {\n const toObject: Record = {};\n\n const fromAutomaticActivityDetection = common.getValueByPath(fromObject, [\n 'automaticActivityDetection',\n ]);\n if (fromAutomaticActivityDetection != null) {\n common.setValueByPath(\n toObject,\n ['automaticActivityDetection'],\n automaticActivityDetectionToMldev(\n apiClient,\n fromAutomaticActivityDetection,\n ),\n );\n }\n\n const fromActivityHandling = common.getValueByPath(fromObject, [\n 'activityHandling',\n ]);\n if (fromActivityHandling != null) {\n common.setValueByPath(toObject, ['activityHandling'], fromActivityHandling);\n }\n\n const fromTurnCoverage = common.getValueByPath(fromObject, ['turnCoverage']);\n if (fromTurnCoverage != null) {\n common.setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);\n }\n\n return toObject;\n}\n\nexport function realtimeInputConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.RealtimeInputConfig,\n): Record {\n const toObject: Record = {};\n\n const fromAutomaticActivityDetection = common.getValueByPath(fromObject, [\n 'automaticActivityDetection',\n ]);\n if (fromAutomaticActivityDetection != null) {\n common.setValueByPath(\n toObject,\n ['automaticActivityDetection'],\n automaticActivityDetectionToVertex(\n apiClient,\n fromAutomaticActivityDetection,\n ),\n );\n }\n\n const fromActivityHandling = common.getValueByPath(fromObject, [\n 'activityHandling',\n ]);\n if (fromActivityHandling != null) {\n common.setValueByPath(toObject, ['activityHandling'], fromActivityHandling);\n }\n\n const fromTurnCoverage = common.getValueByPath(fromObject, ['turnCoverage']);\n if (fromTurnCoverage != null) {\n common.setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);\n }\n\n return toObject;\n}\n\nexport function slidingWindowToMldev(\n apiClient: ApiClient,\n fromObject: types.SlidingWindow,\n): Record {\n const toObject: Record = {};\n\n const fromTargetTokens = common.getValueByPath(fromObject, ['targetTokens']);\n if (fromTargetTokens != null) {\n common.setValueByPath(toObject, ['targetTokens'], fromTargetTokens);\n }\n\n return toObject;\n}\n\nexport function slidingWindowToVertex(\n apiClient: ApiClient,\n fromObject: types.SlidingWindow,\n): Record {\n const toObject: Record = {};\n\n const fromTargetTokens = common.getValueByPath(fromObject, ['targetTokens']);\n if (fromTargetTokens != null) {\n common.setValueByPath(toObject, ['targetTokens'], fromTargetTokens);\n }\n\n return toObject;\n}\n\nexport function contextWindowCompressionConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ContextWindowCompressionConfig,\n): Record {\n const toObject: Record = {};\n\n const fromTriggerTokens = common.getValueByPath(fromObject, [\n 'triggerTokens',\n ]);\n if (fromTriggerTokens != null) {\n common.setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);\n }\n\n const fromSlidingWindow = common.getValueByPath(fromObject, [\n 'slidingWindow',\n ]);\n if (fromSlidingWindow != null) {\n common.setValueByPath(\n toObject,\n ['slidingWindow'],\n slidingWindowToMldev(apiClient, fromSlidingWindow),\n );\n }\n\n return toObject;\n}\n\nexport function contextWindowCompressionConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ContextWindowCompressionConfig,\n): Record {\n const toObject: Record = {};\n\n const fromTriggerTokens = common.getValueByPath(fromObject, [\n 'triggerTokens',\n ]);\n if (fromTriggerTokens != null) {\n common.setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);\n }\n\n const fromSlidingWindow = common.getValueByPath(fromObject, [\n 'slidingWindow',\n ]);\n if (fromSlidingWindow != null) {\n common.setValueByPath(\n toObject,\n ['slidingWindow'],\n slidingWindowToVertex(apiClient, fromSlidingWindow),\n );\n }\n\n return toObject;\n}\n\nexport function liveConnectConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveConnectConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (parentObject !== undefined && fromGenerationConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig'],\n fromGenerationConfig,\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (parentObject !== undefined && fromResponseModalities != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig', 'responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (parentObject !== undefined && fromSpeechConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig', 'speechConfig'],\n fromSpeechConfig,\n );\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['setup', 'tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToMldev(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['setup', 'tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (parentObject !== undefined && fromSessionResumption != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'sessionResumption'],\n sessionResumptionConfigToMldev(apiClient, fromSessionResumption),\n );\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (parentObject !== undefined && fromRealtimeInputConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'realtimeInputConfig'],\n realtimeInputConfigToMldev(apiClient, fromRealtimeInputConfig),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (parentObject !== undefined && fromContextWindowCompression != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'contextWindowCompression'],\n contextWindowCompressionConfigToMldev(\n apiClient,\n fromContextWindowCompression,\n ),\n );\n }\n\n return toObject;\n}\n\nexport function liveConnectConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveConnectConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (parentObject !== undefined && fromGenerationConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig'],\n fromGenerationConfig,\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (parentObject !== undefined && fromResponseModalities != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig', 'responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (parentObject !== undefined && fromSpeechConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig', 'speechConfig'],\n fromSpeechConfig,\n );\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['setup', 'tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToVertex(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['setup', 'tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (parentObject !== undefined && fromSessionResumption != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'sessionResumption'],\n sessionResumptionConfigToVertex(apiClient, fromSessionResumption),\n );\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (parentObject !== undefined && fromRealtimeInputConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'realtimeInputConfig'],\n realtimeInputConfigToVertex(apiClient, fromRealtimeInputConfig),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (parentObject !== undefined && fromContextWindowCompression != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'contextWindowCompression'],\n contextWindowCompressionConfigToVertex(\n apiClient,\n fromContextWindowCompression,\n ),\n );\n }\n\n return toObject;\n}\n\nexport function liveConnectParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveConnectParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['setup', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n liveConnectConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function liveConnectParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveConnectParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['setup', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n liveConnectConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function liveClientSetupToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveClientSetup,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (fromGenerationConfig != null) {\n common.setValueByPath(toObject, ['generationConfig'], fromGenerationConfig);\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (fromSystemInstruction != null) {\n common.setValueByPath(\n toObject,\n ['systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n toObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToMldev(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (fromRealtimeInputConfig != null) {\n common.setValueByPath(\n toObject,\n ['realtimeInputConfig'],\n realtimeInputConfigToMldev(apiClient, fromRealtimeInputConfig),\n );\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (fromSessionResumption != null) {\n common.setValueByPath(\n toObject,\n ['sessionResumption'],\n sessionResumptionConfigToMldev(apiClient, fromSessionResumption),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (fromContextWindowCompression != null) {\n common.setValueByPath(\n toObject,\n ['contextWindowCompression'],\n contextWindowCompressionConfigToMldev(\n apiClient,\n fromContextWindowCompression,\n ),\n );\n }\n\n return toObject;\n}\n\nexport function liveClientSetupToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveClientSetup,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (fromGenerationConfig != null) {\n common.setValueByPath(toObject, ['generationConfig'], fromGenerationConfig);\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (fromSystemInstruction != null) {\n common.setValueByPath(\n toObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n toObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToVertex(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (fromRealtimeInputConfig != null) {\n common.setValueByPath(\n toObject,\n ['realtimeInputConfig'],\n realtimeInputConfigToVertex(apiClient, fromRealtimeInputConfig),\n );\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (fromSessionResumption != null) {\n common.setValueByPath(\n toObject,\n ['sessionResumption'],\n sessionResumptionConfigToVertex(apiClient, fromSessionResumption),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (fromContextWindowCompression != null) {\n common.setValueByPath(\n toObject,\n ['contextWindowCompression'],\n contextWindowCompressionConfigToVertex(\n apiClient,\n fromContextWindowCompression,\n ),\n );\n }\n\n return toObject;\n}\n\nexport function liveClientContentToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveClientContent,\n): Record {\n const toObject: Record = {};\n\n const fromTurns = common.getValueByPath(fromObject, ['turns']);\n if (fromTurns != null) {\n if (Array.isArray(fromTurns)) {\n common.setValueByPath(\n toObject,\n ['turns'],\n fromTurns.map((item) => {\n return contentToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['turns'], fromTurns);\n }\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete != null) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n return toObject;\n}\n\nexport function liveClientContentToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveClientContent,\n): Record {\n const toObject: Record = {};\n\n const fromTurns = common.getValueByPath(fromObject, ['turns']);\n if (fromTurns != null) {\n if (Array.isArray(fromTurns)) {\n common.setValueByPath(\n toObject,\n ['turns'],\n fromTurns.map((item) => {\n return contentToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['turns'], fromTurns);\n }\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete != null) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n return toObject;\n}\n\nexport function activityStartToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function activityStartToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function activityEndToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function activityEndToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function liveClientRealtimeInputToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveClientRealtimeInput,\n): Record {\n const toObject: Record = {};\n\n const fromMediaChunks = common.getValueByPath(fromObject, ['mediaChunks']);\n if (fromMediaChunks != null) {\n common.setValueByPath(toObject, ['mediaChunks'], fromMediaChunks);\n }\n\n const fromActivityStart = common.getValueByPath(fromObject, [\n 'activityStart',\n ]);\n if (fromActivityStart != null) {\n common.setValueByPath(toObject, ['activityStart'], activityStartToMldev());\n }\n\n const fromActivityEnd = common.getValueByPath(fromObject, ['activityEnd']);\n if (fromActivityEnd != null) {\n common.setValueByPath(toObject, ['activityEnd'], activityEndToMldev());\n }\n\n return toObject;\n}\n\nexport function liveClientRealtimeInputToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveClientRealtimeInput,\n): Record {\n const toObject: Record = {};\n\n const fromMediaChunks = common.getValueByPath(fromObject, ['mediaChunks']);\n if (fromMediaChunks != null) {\n common.setValueByPath(toObject, ['mediaChunks'], fromMediaChunks);\n }\n\n const fromActivityStart = common.getValueByPath(fromObject, [\n 'activityStart',\n ]);\n if (fromActivityStart != null) {\n common.setValueByPath(toObject, ['activityStart'], activityStartToVertex());\n }\n\n const fromActivityEnd = common.getValueByPath(fromObject, ['activityEnd']);\n if (fromActivityEnd != null) {\n common.setValueByPath(toObject, ['activityEnd'], activityEndToVertex());\n }\n\n return toObject;\n}\n\nexport function functionResponseToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionResponse,\n): Record {\n const toObject: Record = {};\n\n const fromId = common.getValueByPath(fromObject, ['id']);\n if (fromId != null) {\n common.setValueByPath(toObject, ['id'], fromId);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(toObject, ['response'], fromResponse);\n }\n\n return toObject;\n}\n\nexport function functionResponseToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionResponse,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['id']) !== undefined) {\n throw new Error('id parameter is not supported in Vertex AI.');\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(toObject, ['response'], fromResponse);\n }\n\n return toObject;\n}\n\nexport function liveClientToolResponseToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveClientToolResponse,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionResponses = common.getValueByPath(fromObject, [\n 'functionResponses',\n ]);\n if (fromFunctionResponses != null) {\n if (Array.isArray(fromFunctionResponses)) {\n common.setValueByPath(\n toObject,\n ['functionResponses'],\n fromFunctionResponses.map((item) => {\n return functionResponseToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionResponses'],\n fromFunctionResponses,\n );\n }\n }\n\n return toObject;\n}\n\nexport function liveClientToolResponseToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveClientToolResponse,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionResponses = common.getValueByPath(fromObject, [\n 'functionResponses',\n ]);\n if (fromFunctionResponses != null) {\n if (Array.isArray(fromFunctionResponses)) {\n common.setValueByPath(\n toObject,\n ['functionResponses'],\n fromFunctionResponses.map((item) => {\n return functionResponseToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionResponses'],\n fromFunctionResponses,\n );\n }\n }\n\n return toObject;\n}\n\nexport function liveClientMessageToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveClientMessage,\n): Record {\n const toObject: Record = {};\n\n const fromSetup = common.getValueByPath(fromObject, ['setup']);\n if (fromSetup != null) {\n common.setValueByPath(\n toObject,\n ['setup'],\n liveClientSetupToMldev(apiClient, fromSetup),\n );\n }\n\n const fromClientContent = common.getValueByPath(fromObject, [\n 'clientContent',\n ]);\n if (fromClientContent != null) {\n common.setValueByPath(\n toObject,\n ['clientContent'],\n liveClientContentToMldev(apiClient, fromClientContent),\n );\n }\n\n const fromRealtimeInput = common.getValueByPath(fromObject, [\n 'realtimeInput',\n ]);\n if (fromRealtimeInput != null) {\n common.setValueByPath(\n toObject,\n ['realtimeInput'],\n liveClientRealtimeInputToMldev(apiClient, fromRealtimeInput),\n );\n }\n\n const fromToolResponse = common.getValueByPath(fromObject, ['toolResponse']);\n if (fromToolResponse != null) {\n common.setValueByPath(\n toObject,\n ['toolResponse'],\n liveClientToolResponseToMldev(apiClient, fromToolResponse),\n );\n }\n\n return toObject;\n}\n\nexport function liveClientMessageToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveClientMessage,\n): Record {\n const toObject: Record = {};\n\n const fromSetup = common.getValueByPath(fromObject, ['setup']);\n if (fromSetup != null) {\n common.setValueByPath(\n toObject,\n ['setup'],\n liveClientSetupToVertex(apiClient, fromSetup),\n );\n }\n\n const fromClientContent = common.getValueByPath(fromObject, [\n 'clientContent',\n ]);\n if (fromClientContent != null) {\n common.setValueByPath(\n toObject,\n ['clientContent'],\n liveClientContentToVertex(apiClient, fromClientContent),\n );\n }\n\n const fromRealtimeInput = common.getValueByPath(fromObject, [\n 'realtimeInput',\n ]);\n if (fromRealtimeInput != null) {\n common.setValueByPath(\n toObject,\n ['realtimeInput'],\n liveClientRealtimeInputToVertex(apiClient, fromRealtimeInput),\n );\n }\n\n const fromToolResponse = common.getValueByPath(fromObject, ['toolResponse']);\n if (fromToolResponse != null) {\n common.setValueByPath(\n toObject,\n ['toolResponse'],\n liveClientToolResponseToVertex(apiClient, fromToolResponse),\n );\n }\n\n return toObject;\n}\n\nexport function liveServerSetupCompleteFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function liveServerSetupCompleteFromVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function partFromMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function partFromVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentFromMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function contentFromVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function transcriptionFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function transcriptionFromVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function liveServerContentFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerContent,\n): Record {\n const toObject: Record = {};\n\n const fromModelTurn = common.getValueByPath(fromObject, ['modelTurn']);\n if (fromModelTurn != null) {\n common.setValueByPath(\n toObject,\n ['modelTurn'],\n contentFromMldev(apiClient, fromModelTurn),\n );\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete != null) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n const fromInterrupted = common.getValueByPath(fromObject, ['interrupted']);\n if (fromInterrupted != null) {\n common.setValueByPath(toObject, ['interrupted'], fromInterrupted);\n }\n\n const fromGenerationComplete = common.getValueByPath(fromObject, [\n 'generationComplete',\n ]);\n if (fromGenerationComplete != null) {\n common.setValueByPath(\n toObject,\n ['generationComplete'],\n fromGenerationComplete,\n );\n }\n\n return toObject;\n}\n\nexport function liveServerContentFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerContent,\n): Record {\n const toObject: Record = {};\n\n const fromModelTurn = common.getValueByPath(fromObject, ['modelTurn']);\n if (fromModelTurn != null) {\n common.setValueByPath(\n toObject,\n ['modelTurn'],\n contentFromVertex(apiClient, fromModelTurn),\n );\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete != null) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n const fromInterrupted = common.getValueByPath(fromObject, ['interrupted']);\n if (fromInterrupted != null) {\n common.setValueByPath(toObject, ['interrupted'], fromInterrupted);\n }\n\n const fromGenerationComplete = common.getValueByPath(fromObject, [\n 'generationComplete',\n ]);\n if (fromGenerationComplete != null) {\n common.setValueByPath(\n toObject,\n ['generationComplete'],\n fromGenerationComplete,\n );\n }\n\n return toObject;\n}\n\nexport function functionCallFromMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCall,\n): Record {\n const toObject: Record = {};\n\n const fromId = common.getValueByPath(fromObject, ['id']);\n if (fromId != null) {\n common.setValueByPath(toObject, ['id'], fromId);\n }\n\n const fromArgs = common.getValueByPath(fromObject, ['args']);\n if (fromArgs != null) {\n common.setValueByPath(toObject, ['args'], fromArgs);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n return toObject;\n}\n\nexport function functionCallFromVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCall,\n): Record {\n const toObject: Record = {};\n\n const fromArgs = common.getValueByPath(fromObject, ['args']);\n if (fromArgs != null) {\n common.setValueByPath(toObject, ['args'], fromArgs);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n return toObject;\n}\n\nexport function liveServerToolCallFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCall,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCalls = common.getValueByPath(fromObject, [\n 'functionCalls',\n ]);\n if (fromFunctionCalls != null) {\n if (Array.isArray(fromFunctionCalls)) {\n common.setValueByPath(\n toObject,\n ['functionCalls'],\n fromFunctionCalls.map((item) => {\n return functionCallFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['functionCalls'], fromFunctionCalls);\n }\n }\n\n return toObject;\n}\n\nexport function liveServerToolCallFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCall,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCalls = common.getValueByPath(fromObject, [\n 'functionCalls',\n ]);\n if (fromFunctionCalls != null) {\n if (Array.isArray(fromFunctionCalls)) {\n common.setValueByPath(\n toObject,\n ['functionCalls'],\n fromFunctionCalls.map((item) => {\n return functionCallFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['functionCalls'], fromFunctionCalls);\n }\n }\n\n return toObject;\n}\n\nexport function liveServerToolCallCancellationFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCallCancellation,\n): Record {\n const toObject: Record = {};\n\n const fromIds = common.getValueByPath(fromObject, ['ids']);\n if (fromIds != null) {\n common.setValueByPath(toObject, ['ids'], fromIds);\n }\n\n return toObject;\n}\n\nexport function liveServerToolCallCancellationFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCallCancellation,\n): Record {\n const toObject: Record = {};\n\n const fromIds = common.getValueByPath(fromObject, ['ids']);\n if (fromIds != null) {\n common.setValueByPath(toObject, ['ids'], fromIds);\n }\n\n return toObject;\n}\n\nexport function modalityTokenCountFromMldev(\n apiClient: ApiClient,\n fromObject: types.ModalityTokenCount,\n): Record {\n const toObject: Record = {};\n\n const fromModality = common.getValueByPath(fromObject, ['modality']);\n if (fromModality != null) {\n common.setValueByPath(toObject, ['modality'], fromModality);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function modalityTokenCountFromVertex(\n apiClient: ApiClient,\n fromObject: types.ModalityTokenCount,\n): Record {\n const toObject: Record = {};\n\n const fromModality = common.getValueByPath(fromObject, ['modality']);\n if (fromModality != null) {\n common.setValueByPath(toObject, ['modality'], fromModality);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function usageMetadataFromMldev(\n apiClient: ApiClient,\n fromObject: types.UsageMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromPromptTokenCount = common.getValueByPath(fromObject, [\n 'promptTokenCount',\n ]);\n if (fromPromptTokenCount != null) {\n common.setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n const fromResponseTokenCount = common.getValueByPath(fromObject, [\n 'responseTokenCount',\n ]);\n if (fromResponseTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['responseTokenCount'],\n fromResponseTokenCount,\n );\n }\n\n const fromToolUsePromptTokenCount = common.getValueByPath(fromObject, [\n 'toolUsePromptTokenCount',\n ]);\n if (fromToolUsePromptTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokenCount'],\n fromToolUsePromptTokenCount,\n );\n }\n\n const fromThoughtsTokenCount = common.getValueByPath(fromObject, [\n 'thoughtsTokenCount',\n ]);\n if (fromThoughtsTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['thoughtsTokenCount'],\n fromThoughtsTokenCount,\n );\n }\n\n const fromTotalTokenCount = common.getValueByPath(fromObject, [\n 'totalTokenCount',\n ]);\n if (fromTotalTokenCount != null) {\n common.setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);\n }\n\n const fromPromptTokensDetails = common.getValueByPath(fromObject, [\n 'promptTokensDetails',\n ]);\n if (fromPromptTokensDetails != null) {\n if (Array.isArray(fromPromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails,\n );\n }\n }\n\n const fromCacheTokensDetails = common.getValueByPath(fromObject, [\n 'cacheTokensDetails',\n ]);\n if (fromCacheTokensDetails != null) {\n if (Array.isArray(fromCacheTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails,\n );\n }\n }\n\n const fromResponseTokensDetails = common.getValueByPath(fromObject, [\n 'responseTokensDetails',\n ]);\n if (fromResponseTokensDetails != null) {\n if (Array.isArray(fromResponseTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails,\n );\n }\n }\n\n const fromToolUsePromptTokensDetails = common.getValueByPath(fromObject, [\n 'toolUsePromptTokensDetails',\n ]);\n if (fromToolUsePromptTokensDetails != null) {\n if (Array.isArray(fromToolUsePromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails,\n );\n }\n }\n\n return toObject;\n}\n\nexport function usageMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.UsageMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromPromptTokenCount = common.getValueByPath(fromObject, [\n 'promptTokenCount',\n ]);\n if (fromPromptTokenCount != null) {\n common.setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n const fromResponseTokenCount = common.getValueByPath(fromObject, [\n 'candidatesTokenCount',\n ]);\n if (fromResponseTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['responseTokenCount'],\n fromResponseTokenCount,\n );\n }\n\n const fromToolUsePromptTokenCount = common.getValueByPath(fromObject, [\n 'toolUsePromptTokenCount',\n ]);\n if (fromToolUsePromptTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokenCount'],\n fromToolUsePromptTokenCount,\n );\n }\n\n const fromThoughtsTokenCount = common.getValueByPath(fromObject, [\n 'thoughtsTokenCount',\n ]);\n if (fromThoughtsTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['thoughtsTokenCount'],\n fromThoughtsTokenCount,\n );\n }\n\n const fromTotalTokenCount = common.getValueByPath(fromObject, [\n 'totalTokenCount',\n ]);\n if (fromTotalTokenCount != null) {\n common.setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);\n }\n\n const fromPromptTokensDetails = common.getValueByPath(fromObject, [\n 'promptTokensDetails',\n ]);\n if (fromPromptTokensDetails != null) {\n if (Array.isArray(fromPromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails,\n );\n }\n }\n\n const fromCacheTokensDetails = common.getValueByPath(fromObject, [\n 'cacheTokensDetails',\n ]);\n if (fromCacheTokensDetails != null) {\n if (Array.isArray(fromCacheTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails,\n );\n }\n }\n\n const fromResponseTokensDetails = common.getValueByPath(fromObject, [\n 'candidatesTokensDetails',\n ]);\n if (fromResponseTokensDetails != null) {\n if (Array.isArray(fromResponseTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails,\n );\n }\n }\n\n const fromToolUsePromptTokensDetails = common.getValueByPath(fromObject, [\n 'toolUsePromptTokensDetails',\n ]);\n if (fromToolUsePromptTokensDetails != null) {\n if (Array.isArray(fromToolUsePromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails,\n );\n }\n }\n\n const fromTrafficType = common.getValueByPath(fromObject, ['trafficType']);\n if (fromTrafficType != null) {\n common.setValueByPath(toObject, ['trafficType'], fromTrafficType);\n }\n\n return toObject;\n}\n\nexport function liveServerGoAwayFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerGoAway,\n): Record {\n const toObject: Record = {};\n\n const fromTimeLeft = common.getValueByPath(fromObject, ['timeLeft']);\n if (fromTimeLeft != null) {\n common.setValueByPath(toObject, ['timeLeft'], fromTimeLeft);\n }\n\n return toObject;\n}\n\nexport function liveServerGoAwayFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerGoAway,\n): Record {\n const toObject: Record = {};\n\n const fromTimeLeft = common.getValueByPath(fromObject, ['timeLeft']);\n if (fromTimeLeft != null) {\n common.setValueByPath(toObject, ['timeLeft'], fromTimeLeft);\n }\n\n return toObject;\n}\n\nexport function liveServerSessionResumptionUpdateFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerSessionResumptionUpdate,\n): Record {\n const toObject: Record = {};\n\n const fromNewHandle = common.getValueByPath(fromObject, ['newHandle']);\n if (fromNewHandle != null) {\n common.setValueByPath(toObject, ['newHandle'], fromNewHandle);\n }\n\n const fromResumable = common.getValueByPath(fromObject, ['resumable']);\n if (fromResumable != null) {\n common.setValueByPath(toObject, ['resumable'], fromResumable);\n }\n\n const fromLastConsumedClientMessageIndex = common.getValueByPath(fromObject, [\n 'lastConsumedClientMessageIndex',\n ]);\n if (fromLastConsumedClientMessageIndex != null) {\n common.setValueByPath(\n toObject,\n ['lastConsumedClientMessageIndex'],\n fromLastConsumedClientMessageIndex,\n );\n }\n\n return toObject;\n}\n\nexport function liveServerSessionResumptionUpdateFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerSessionResumptionUpdate,\n): Record {\n const toObject: Record = {};\n\n const fromNewHandle = common.getValueByPath(fromObject, ['newHandle']);\n if (fromNewHandle != null) {\n common.setValueByPath(toObject, ['newHandle'], fromNewHandle);\n }\n\n const fromResumable = common.getValueByPath(fromObject, ['resumable']);\n if (fromResumable != null) {\n common.setValueByPath(toObject, ['resumable'], fromResumable);\n }\n\n const fromLastConsumedClientMessageIndex = common.getValueByPath(fromObject, [\n 'lastConsumedClientMessageIndex',\n ]);\n if (fromLastConsumedClientMessageIndex != null) {\n common.setValueByPath(\n toObject,\n ['lastConsumedClientMessageIndex'],\n fromLastConsumedClientMessageIndex,\n );\n }\n\n return toObject;\n}\n\nexport function liveServerMessageFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerMessage,\n): Record {\n const toObject: Record = {};\n\n const fromSetupComplete = common.getValueByPath(fromObject, [\n 'setupComplete',\n ]);\n if (fromSetupComplete != null) {\n common.setValueByPath(\n toObject,\n ['setupComplete'],\n liveServerSetupCompleteFromMldev(),\n );\n }\n\n const fromServerContent = common.getValueByPath(fromObject, [\n 'serverContent',\n ]);\n if (fromServerContent != null) {\n common.setValueByPath(\n toObject,\n ['serverContent'],\n liveServerContentFromMldev(apiClient, fromServerContent),\n );\n }\n\n const fromToolCall = common.getValueByPath(fromObject, ['toolCall']);\n if (fromToolCall != null) {\n common.setValueByPath(\n toObject,\n ['toolCall'],\n liveServerToolCallFromMldev(apiClient, fromToolCall),\n );\n }\n\n const fromToolCallCancellation = common.getValueByPath(fromObject, [\n 'toolCallCancellation',\n ]);\n if (fromToolCallCancellation != null) {\n common.setValueByPath(\n toObject,\n ['toolCallCancellation'],\n liveServerToolCallCancellationFromMldev(\n apiClient,\n fromToolCallCancellation,\n ),\n );\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(\n toObject,\n ['usageMetadata'],\n usageMetadataFromMldev(apiClient, fromUsageMetadata),\n );\n }\n\n const fromGoAway = common.getValueByPath(fromObject, ['goAway']);\n if (fromGoAway != null) {\n common.setValueByPath(\n toObject,\n ['goAway'],\n liveServerGoAwayFromMldev(apiClient, fromGoAway),\n );\n }\n\n const fromSessionResumptionUpdate = common.getValueByPath(fromObject, [\n 'sessionResumptionUpdate',\n ]);\n if (fromSessionResumptionUpdate != null) {\n common.setValueByPath(\n toObject,\n ['sessionResumptionUpdate'],\n liveServerSessionResumptionUpdateFromMldev(\n apiClient,\n fromSessionResumptionUpdate,\n ),\n );\n }\n\n return toObject;\n}\n\nexport function liveServerMessageFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerMessage,\n): Record {\n const toObject: Record = {};\n\n const fromSetupComplete = common.getValueByPath(fromObject, [\n 'setupComplete',\n ]);\n if (fromSetupComplete != null) {\n common.setValueByPath(\n toObject,\n ['setupComplete'],\n liveServerSetupCompleteFromVertex(),\n );\n }\n\n const fromServerContent = common.getValueByPath(fromObject, [\n 'serverContent',\n ]);\n if (fromServerContent != null) {\n common.setValueByPath(\n toObject,\n ['serverContent'],\n liveServerContentFromVertex(apiClient, fromServerContent),\n );\n }\n\n const fromToolCall = common.getValueByPath(fromObject, ['toolCall']);\n if (fromToolCall != null) {\n common.setValueByPath(\n toObject,\n ['toolCall'],\n liveServerToolCallFromVertex(apiClient, fromToolCall),\n );\n }\n\n const fromToolCallCancellation = common.getValueByPath(fromObject, [\n 'toolCallCancellation',\n ]);\n if (fromToolCallCancellation != null) {\n common.setValueByPath(\n toObject,\n ['toolCallCancellation'],\n liveServerToolCallCancellationFromVertex(\n apiClient,\n fromToolCallCancellation,\n ),\n );\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(\n toObject,\n ['usageMetadata'],\n usageMetadataFromVertex(apiClient, fromUsageMetadata),\n );\n }\n\n const fromGoAway = common.getValueByPath(fromObject, ['goAway']);\n if (fromGoAway != null) {\n common.setValueByPath(\n toObject,\n ['goAway'],\n liveServerGoAwayFromVertex(apiClient, fromGoAway),\n );\n }\n\n const fromSessionResumptionUpdate = common.getValueByPath(fromObject, [\n 'sessionResumptionUpdate',\n ]);\n if (fromSessionResumptionUpdate != null) {\n common.setValueByPath(\n toObject,\n ['sessionResumptionUpdate'],\n liveServerSessionResumptionUpdateFromVertex(\n apiClient,\n fromSessionResumptionUpdate,\n ),\n );\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function partToMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['videoMetadata']) !== undefined) {\n throw new Error('videoMetadata parameter is not supported in Gemini API.');\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToMldev(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['example']) !== undefined) {\n throw new Error('example parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['pattern']) !== undefined) {\n throw new Error('pattern parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['default']) !== undefined) {\n throw new Error('default parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxLength']) !== undefined) {\n throw new Error('maxLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minLength']) !== undefined) {\n throw new Error('minLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minProperties']) !== undefined) {\n throw new Error('minProperties parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxProperties']) !== undefined) {\n throw new Error('maxProperties parameter is not supported in Gemini API.');\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function modelSelectionConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ModelSelectionConfig,\n): Record {\n const toObject: Record = {};\n\n if (\n common.getValueByPath(fromObject, ['featureSelectionPreference']) !==\n undefined\n ) {\n throw new Error(\n 'featureSelectionPreference parameter is not supported in Gemini API.',\n );\n }\n\n return toObject;\n}\n\nexport function safetySettingToMldev(\n apiClient: ApiClient,\n fromObject: types.SafetySetting,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['method']) !== undefined) {\n throw new Error('method parameter is not supported in Gemini API.');\n }\n\n const fromCategory = common.getValueByPath(fromObject, ['category']);\n if (fromCategory != null) {\n common.setValueByPath(toObject, ['category'], fromCategory);\n }\n\n const fromThreshold = common.getValueByPath(fromObject, ['threshold']);\n if (fromThreshold != null) {\n common.setValueByPath(toObject, ['threshold'], fromThreshold);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['response']) !== undefined) {\n throw new Error('response parameter is not supported in Gemini API.');\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToMldev(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToMldev(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n if (common.getValueByPath(fromObject, ['retrieval']) !== undefined) {\n throw new Error('retrieval parameter is not supported in Gemini API.');\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToMldev());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function prebuiltVoiceConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.PrebuiltVoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceName = common.getValueByPath(fromObject, ['voiceName']);\n if (fromVoiceName != null) {\n common.setValueByPath(toObject, ['voiceName'], fromVoiceName);\n }\n\n return toObject;\n}\n\nexport function voiceConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.VoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromPrebuiltVoiceConfig = common.getValueByPath(fromObject, [\n 'prebuiltVoiceConfig',\n ]);\n if (fromPrebuiltVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['prebuiltVoiceConfig'],\n prebuiltVoiceConfigToMldev(apiClient, fromPrebuiltVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function speechConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.SpeechConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceConfig = common.getValueByPath(fromObject, ['voiceConfig']);\n if (fromVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['voiceConfig'],\n voiceConfigToMldev(apiClient, fromVoiceConfig),\n );\n }\n\n const fromLanguageCode = common.getValueByPath(fromObject, ['languageCode']);\n if (fromLanguageCode != null) {\n common.setValueByPath(toObject, ['languageCode'], fromLanguageCode);\n }\n\n return toObject;\n}\n\nexport function thinkingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ThinkingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromIncludeThoughts = common.getValueByPath(fromObject, [\n 'includeThoughts',\n ]);\n if (fromIncludeThoughts != null) {\n common.setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);\n }\n\n const fromThinkingBudget = common.getValueByPath(fromObject, [\n 'thinkingBudget',\n ]);\n if (fromThinkingBudget != null) {\n common.setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);\n }\n\n return toObject;\n}\n\nexport function generateContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTemperature = common.getValueByPath(fromObject, ['temperature']);\n if (fromTemperature != null) {\n common.setValueByPath(toObject, ['temperature'], fromTemperature);\n }\n\n const fromTopP = common.getValueByPath(fromObject, ['topP']);\n if (fromTopP != null) {\n common.setValueByPath(toObject, ['topP'], fromTopP);\n }\n\n const fromTopK = common.getValueByPath(fromObject, ['topK']);\n if (fromTopK != null) {\n common.setValueByPath(toObject, ['topK'], fromTopK);\n }\n\n const fromCandidateCount = common.getValueByPath(fromObject, [\n 'candidateCount',\n ]);\n if (fromCandidateCount != null) {\n common.setValueByPath(toObject, ['candidateCount'], fromCandidateCount);\n }\n\n const fromMaxOutputTokens = common.getValueByPath(fromObject, [\n 'maxOutputTokens',\n ]);\n if (fromMaxOutputTokens != null) {\n common.setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);\n }\n\n const fromStopSequences = common.getValueByPath(fromObject, [\n 'stopSequences',\n ]);\n if (fromStopSequences != null) {\n common.setValueByPath(toObject, ['stopSequences'], fromStopSequences);\n }\n\n const fromResponseLogprobs = common.getValueByPath(fromObject, [\n 'responseLogprobs',\n ]);\n if (fromResponseLogprobs != null) {\n common.setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);\n }\n\n const fromLogprobs = common.getValueByPath(fromObject, ['logprobs']);\n if (fromLogprobs != null) {\n common.setValueByPath(toObject, ['logprobs'], fromLogprobs);\n }\n\n const fromPresencePenalty = common.getValueByPath(fromObject, [\n 'presencePenalty',\n ]);\n if (fromPresencePenalty != null) {\n common.setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);\n }\n\n const fromFrequencyPenalty = common.getValueByPath(fromObject, [\n 'frequencyPenalty',\n ]);\n if (fromFrequencyPenalty != null) {\n common.setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (fromSeed != null) {\n common.setValueByPath(toObject, ['seed'], fromSeed);\n }\n\n const fromResponseMimeType = common.getValueByPath(fromObject, [\n 'responseMimeType',\n ]);\n if (fromResponseMimeType != null) {\n common.setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);\n }\n\n const fromResponseSchema = common.getValueByPath(fromObject, [\n 'responseSchema',\n ]);\n if (fromResponseSchema != null) {\n common.setValueByPath(\n toObject,\n ['responseSchema'],\n schemaToMldev(apiClient, t.tSchema(apiClient, fromResponseSchema)),\n );\n }\n\n if (common.getValueByPath(fromObject, ['routingConfig']) !== undefined) {\n throw new Error('routingConfig parameter is not supported in Gemini API.');\n }\n\n if (\n common.getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined\n ) {\n throw new Error(\n 'modelSelectionConfig parameter is not supported in Gemini API.',\n );\n }\n\n const fromSafetySettings = common.getValueByPath(fromObject, [\n 'safetySettings',\n ]);\n if (parentObject !== undefined && fromSafetySettings != null) {\n if (Array.isArray(fromSafetySettings)) {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings.map((item) => {\n return safetySettingToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings,\n );\n }\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToMldev(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToMldev(apiClient, fromToolConfig),\n );\n }\n\n if (common.getValueByPath(fromObject, ['labels']) !== undefined) {\n throw new Error('labels parameter is not supported in Gemini API.');\n }\n\n const fromCachedContent = common.getValueByPath(fromObject, [\n 'cachedContent',\n ]);\n if (parentObject !== undefined && fromCachedContent != null) {\n common.setValueByPath(\n parentObject,\n ['cachedContent'],\n t.tCachedContentName(apiClient, fromCachedContent),\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities != null) {\n common.setValueByPath(\n toObject,\n ['responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromMediaResolution = common.getValueByPath(fromObject, [\n 'mediaResolution',\n ]);\n if (fromMediaResolution != null) {\n common.setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig != null) {\n common.setValueByPath(\n toObject,\n ['speechConfig'],\n speechConfigToMldev(\n apiClient,\n t.tSpeechConfig(apiClient, fromSpeechConfig),\n ),\n );\n }\n\n if (common.getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {\n throw new Error('audioTimestamp parameter is not supported in Gemini API.');\n }\n\n const fromThinkingConfig = common.getValueByPath(fromObject, [\n 'thinkingConfig',\n ]);\n if (fromThinkingConfig != null) {\n common.setValueByPath(\n toObject,\n ['thinkingConfig'],\n thinkingConfigToMldev(apiClient, fromThinkingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function generateContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['generationConfig'],\n generateContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTaskType = common.getValueByPath(fromObject, ['taskType']);\n if (parentObject !== undefined && fromTaskType != null) {\n common.setValueByPath(\n parentObject,\n ['requests[]', 'taskType'],\n fromTaskType,\n );\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (parentObject !== undefined && fromTitle != null) {\n common.setValueByPath(parentObject, ['requests[]', 'title'], fromTitle);\n }\n\n const fromOutputDimensionality = common.getValueByPath(fromObject, [\n 'outputDimensionality',\n ]);\n if (parentObject !== undefined && fromOutputDimensionality != null) {\n common.setValueByPath(\n parentObject,\n ['requests[]', 'outputDimensionality'],\n fromOutputDimensionality,\n );\n }\n\n if (common.getValueByPath(fromObject, ['mimeType']) !== undefined) {\n throw new Error('mimeType parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['autoTruncate']) !== undefined) {\n throw new Error('autoTruncate parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function embedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n common.setValueByPath(\n toObject,\n ['requests[]', 'content'],\n t.tContentsForEmbed(apiClient, fromContents),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n embedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n const fromModelForEmbedContent = common.getValueByPath(fromObject, ['model']);\n if (fromModelForEmbedContent !== undefined) {\n common.setValueByPath(\n toObject,\n ['requests[]', 'model'],\n t.tModel(apiClient, fromModelForEmbedContent),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {\n throw new Error('outputGcsUri parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['negativePrompt']) !== undefined) {\n throw new Error('negativePrompt parameter is not supported in Gemini API.');\n }\n\n const fromNumberOfImages = common.getValueByPath(fromObject, [\n 'numberOfImages',\n ]);\n if (parentObject !== undefined && fromNumberOfImages != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfImages,\n );\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromGuidanceScale = common.getValueByPath(fromObject, [\n 'guidanceScale',\n ]);\n if (parentObject !== undefined && fromGuidanceScale != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'guidanceScale'],\n fromGuidanceScale,\n );\n }\n\n if (common.getValueByPath(fromObject, ['seed']) !== undefined) {\n throw new Error('seed parameter is not supported in Gemini API.');\n }\n\n const fromSafetyFilterLevel = common.getValueByPath(fromObject, [\n 'safetyFilterLevel',\n ]);\n if (parentObject !== undefined && fromSafetyFilterLevel != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'safetySetting'],\n fromSafetyFilterLevel,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromIncludeSafetyAttributes = common.getValueByPath(fromObject, [\n 'includeSafetyAttributes',\n ]);\n if (parentObject !== undefined && fromIncludeSafetyAttributes != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeSafetyAttributes'],\n fromIncludeSafetyAttributes,\n );\n }\n\n const fromIncludeRaiReason = common.getValueByPath(fromObject, [\n 'includeRaiReason',\n ]);\n if (parentObject !== undefined && fromIncludeRaiReason != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeRaiReason'],\n fromIncludeRaiReason,\n );\n }\n\n const fromLanguage = common.getValueByPath(fromObject, ['language']);\n if (parentObject !== undefined && fromLanguage != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'language'],\n fromLanguage,\n );\n }\n\n const fromOutputMimeType = common.getValueByPath(fromObject, [\n 'outputMimeType',\n ]);\n if (parentObject !== undefined && fromOutputMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'mimeType'],\n fromOutputMimeType,\n );\n }\n\n const fromOutputCompressionQuality = common.getValueByPath(fromObject, [\n 'outputCompressionQuality',\n ]);\n if (parentObject !== undefined && fromOutputCompressionQuality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'compressionQuality'],\n fromOutputCompressionQuality,\n );\n }\n\n if (common.getValueByPath(fromObject, ['addWatermark']) !== undefined) {\n throw new Error('addWatermark parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {\n throw new Error('enhancePrompt parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function generateImagesParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateImagesConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getModelParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetModelParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function countTokensConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensConfig,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['systemInstruction']) !== undefined) {\n throw new Error(\n 'systemInstruction parameter is not supported in Gemini API.',\n );\n }\n\n if (common.getValueByPath(fromObject, ['tools']) !== undefined) {\n throw new Error('tools parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['generationConfig']) !== undefined) {\n throw new Error(\n 'generationConfig parameter is not supported in Gemini API.',\n );\n }\n\n return toObject;\n}\n\nexport function countTokensParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n countTokensConfigToMldev(apiClient, fromConfig),\n );\n }\n\n return toObject;\n}\n\nexport function imageToMldev(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['gcsUri']) !== undefined) {\n throw new Error('gcsUri parameter is not supported in Gemini API.');\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, ['imageBytes']);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['bytesBase64Encoded'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generateVideosConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromNumberOfVideos = common.getValueByPath(fromObject, [\n 'numberOfVideos',\n ]);\n if (parentObject !== undefined && fromNumberOfVideos != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfVideos,\n );\n }\n\n if (common.getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {\n throw new Error('outputGcsUri parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['fps']) !== undefined) {\n throw new Error('fps parameter is not supported in Gemini API.');\n }\n\n const fromDurationSeconds = common.getValueByPath(fromObject, [\n 'durationSeconds',\n ]);\n if (parentObject !== undefined && fromDurationSeconds != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'durationSeconds'],\n fromDurationSeconds,\n );\n }\n\n if (common.getValueByPath(fromObject, ['seed']) !== undefined) {\n throw new Error('seed parameter is not supported in Gemini API.');\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n if (common.getValueByPath(fromObject, ['resolution']) !== undefined) {\n throw new Error('resolution parameter is not supported in Gemini API.');\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n if (common.getValueByPath(fromObject, ['pubsubTopic']) !== undefined) {\n throw new Error('pubsubTopic parameter is not supported in Gemini API.');\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n if (common.getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {\n throw new Error('enhancePrompt parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function generateVideosParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromImage = common.getValueByPath(fromObject, ['image']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['instances[0]', 'image'],\n imageToMldev(apiClient, fromImage),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateVideosConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partToVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToVertex(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n const fromExample = common.getValueByPath(fromObject, ['example']);\n if (fromExample != null) {\n common.setValueByPath(toObject, ['example'], fromExample);\n }\n\n const fromPattern = common.getValueByPath(fromObject, ['pattern']);\n if (fromPattern != null) {\n common.setValueByPath(toObject, ['pattern'], fromPattern);\n }\n\n const fromDefault = common.getValueByPath(fromObject, ['default']);\n if (fromDefault != null) {\n common.setValueByPath(toObject, ['default'], fromDefault);\n }\n\n const fromMaxLength = common.getValueByPath(fromObject, ['maxLength']);\n if (fromMaxLength != null) {\n common.setValueByPath(toObject, ['maxLength'], fromMaxLength);\n }\n\n const fromMinLength = common.getValueByPath(fromObject, ['minLength']);\n if (fromMinLength != null) {\n common.setValueByPath(toObject, ['minLength'], fromMinLength);\n }\n\n const fromMinProperties = common.getValueByPath(fromObject, [\n 'minProperties',\n ]);\n if (fromMinProperties != null) {\n common.setValueByPath(toObject, ['minProperties'], fromMinProperties);\n }\n\n const fromMaxProperties = common.getValueByPath(fromObject, [\n 'maxProperties',\n ]);\n if (fromMaxProperties != null) {\n common.setValueByPath(toObject, ['maxProperties'], fromMaxProperties);\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function modelSelectionConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ModelSelectionConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFeatureSelectionPreference = common.getValueByPath(fromObject, [\n 'featureSelectionPreference',\n ]);\n if (fromFeatureSelectionPreference != null) {\n common.setValueByPath(\n toObject,\n ['featureSelectionPreference'],\n fromFeatureSelectionPreference,\n );\n }\n\n return toObject;\n}\n\nexport function safetySettingToVertex(\n apiClient: ApiClient,\n fromObject: types.SafetySetting,\n): Record {\n const toObject: Record = {};\n\n const fromMethod = common.getValueByPath(fromObject, ['method']);\n if (fromMethod != null) {\n common.setValueByPath(toObject, ['method'], fromMethod);\n }\n\n const fromCategory = common.getValueByPath(fromObject, ['category']);\n if (fromCategory != null) {\n common.setValueByPath(toObject, ['category'], fromCategory);\n }\n\n const fromThreshold = common.getValueByPath(fromObject, ['threshold']);\n if (fromThreshold != null) {\n common.setValueByPath(toObject, ['threshold'], fromThreshold);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n schemaToVertex(apiClient, fromResponse),\n );\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToVertex(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToVertex(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n const fromRetrieval = common.getValueByPath(fromObject, ['retrieval']);\n if (fromRetrieval != null) {\n common.setValueByPath(toObject, ['retrieval'], fromRetrieval);\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToVertex());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function prebuiltVoiceConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.PrebuiltVoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceName = common.getValueByPath(fromObject, ['voiceName']);\n if (fromVoiceName != null) {\n common.setValueByPath(toObject, ['voiceName'], fromVoiceName);\n }\n\n return toObject;\n}\n\nexport function voiceConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.VoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromPrebuiltVoiceConfig = common.getValueByPath(fromObject, [\n 'prebuiltVoiceConfig',\n ]);\n if (fromPrebuiltVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['prebuiltVoiceConfig'],\n prebuiltVoiceConfigToVertex(apiClient, fromPrebuiltVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function speechConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.SpeechConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceConfig = common.getValueByPath(fromObject, ['voiceConfig']);\n if (fromVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['voiceConfig'],\n voiceConfigToVertex(apiClient, fromVoiceConfig),\n );\n }\n\n const fromLanguageCode = common.getValueByPath(fromObject, ['languageCode']);\n if (fromLanguageCode != null) {\n common.setValueByPath(toObject, ['languageCode'], fromLanguageCode);\n }\n\n return toObject;\n}\n\nexport function thinkingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ThinkingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromIncludeThoughts = common.getValueByPath(fromObject, [\n 'includeThoughts',\n ]);\n if (fromIncludeThoughts != null) {\n common.setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);\n }\n\n const fromThinkingBudget = common.getValueByPath(fromObject, [\n 'thinkingBudget',\n ]);\n if (fromThinkingBudget != null) {\n common.setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);\n }\n\n return toObject;\n}\n\nexport function generateContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTemperature = common.getValueByPath(fromObject, ['temperature']);\n if (fromTemperature != null) {\n common.setValueByPath(toObject, ['temperature'], fromTemperature);\n }\n\n const fromTopP = common.getValueByPath(fromObject, ['topP']);\n if (fromTopP != null) {\n common.setValueByPath(toObject, ['topP'], fromTopP);\n }\n\n const fromTopK = common.getValueByPath(fromObject, ['topK']);\n if (fromTopK != null) {\n common.setValueByPath(toObject, ['topK'], fromTopK);\n }\n\n const fromCandidateCount = common.getValueByPath(fromObject, [\n 'candidateCount',\n ]);\n if (fromCandidateCount != null) {\n common.setValueByPath(toObject, ['candidateCount'], fromCandidateCount);\n }\n\n const fromMaxOutputTokens = common.getValueByPath(fromObject, [\n 'maxOutputTokens',\n ]);\n if (fromMaxOutputTokens != null) {\n common.setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);\n }\n\n const fromStopSequences = common.getValueByPath(fromObject, [\n 'stopSequences',\n ]);\n if (fromStopSequences != null) {\n common.setValueByPath(toObject, ['stopSequences'], fromStopSequences);\n }\n\n const fromResponseLogprobs = common.getValueByPath(fromObject, [\n 'responseLogprobs',\n ]);\n if (fromResponseLogprobs != null) {\n common.setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);\n }\n\n const fromLogprobs = common.getValueByPath(fromObject, ['logprobs']);\n if (fromLogprobs != null) {\n common.setValueByPath(toObject, ['logprobs'], fromLogprobs);\n }\n\n const fromPresencePenalty = common.getValueByPath(fromObject, [\n 'presencePenalty',\n ]);\n if (fromPresencePenalty != null) {\n common.setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);\n }\n\n const fromFrequencyPenalty = common.getValueByPath(fromObject, [\n 'frequencyPenalty',\n ]);\n if (fromFrequencyPenalty != null) {\n common.setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (fromSeed != null) {\n common.setValueByPath(toObject, ['seed'], fromSeed);\n }\n\n const fromResponseMimeType = common.getValueByPath(fromObject, [\n 'responseMimeType',\n ]);\n if (fromResponseMimeType != null) {\n common.setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);\n }\n\n const fromResponseSchema = common.getValueByPath(fromObject, [\n 'responseSchema',\n ]);\n if (fromResponseSchema != null) {\n common.setValueByPath(\n toObject,\n ['responseSchema'],\n schemaToVertex(apiClient, t.tSchema(apiClient, fromResponseSchema)),\n );\n }\n\n const fromRoutingConfig = common.getValueByPath(fromObject, [\n 'routingConfig',\n ]);\n if (fromRoutingConfig != null) {\n common.setValueByPath(toObject, ['routingConfig'], fromRoutingConfig);\n }\n\n const fromModelSelectionConfig = common.getValueByPath(fromObject, [\n 'modelSelectionConfig',\n ]);\n if (fromModelSelectionConfig != null) {\n common.setValueByPath(\n toObject,\n ['modelConfig'],\n modelSelectionConfigToVertex(apiClient, fromModelSelectionConfig),\n );\n }\n\n const fromSafetySettings = common.getValueByPath(fromObject, [\n 'safetySettings',\n ]);\n if (parentObject !== undefined && fromSafetySettings != null) {\n if (Array.isArray(fromSafetySettings)) {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings.map((item) => {\n return safetySettingToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings,\n );\n }\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToVertex(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToVertex(apiClient, fromToolConfig),\n );\n }\n\n const fromLabels = common.getValueByPath(fromObject, ['labels']);\n if (parentObject !== undefined && fromLabels != null) {\n common.setValueByPath(parentObject, ['labels'], fromLabels);\n }\n\n const fromCachedContent = common.getValueByPath(fromObject, [\n 'cachedContent',\n ]);\n if (parentObject !== undefined && fromCachedContent != null) {\n common.setValueByPath(\n parentObject,\n ['cachedContent'],\n t.tCachedContentName(apiClient, fromCachedContent),\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities != null) {\n common.setValueByPath(\n toObject,\n ['responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromMediaResolution = common.getValueByPath(fromObject, [\n 'mediaResolution',\n ]);\n if (fromMediaResolution != null) {\n common.setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig != null) {\n common.setValueByPath(\n toObject,\n ['speechConfig'],\n speechConfigToVertex(\n apiClient,\n t.tSpeechConfig(apiClient, fromSpeechConfig),\n ),\n );\n }\n\n const fromAudioTimestamp = common.getValueByPath(fromObject, [\n 'audioTimestamp',\n ]);\n if (fromAudioTimestamp != null) {\n common.setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp);\n }\n\n const fromThinkingConfig = common.getValueByPath(fromObject, [\n 'thinkingConfig',\n ]);\n if (fromThinkingConfig != null) {\n common.setValueByPath(\n toObject,\n ['thinkingConfig'],\n thinkingConfigToVertex(apiClient, fromThinkingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function generateContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['generationConfig'],\n generateContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTaskType = common.getValueByPath(fromObject, ['taskType']);\n if (parentObject !== undefined && fromTaskType != null) {\n common.setValueByPath(\n parentObject,\n ['instances[]', 'task_type'],\n fromTaskType,\n );\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (parentObject !== undefined && fromTitle != null) {\n common.setValueByPath(parentObject, ['instances[]', 'title'], fromTitle);\n }\n\n const fromOutputDimensionality = common.getValueByPath(fromObject, [\n 'outputDimensionality',\n ]);\n if (parentObject !== undefined && fromOutputDimensionality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputDimensionality'],\n fromOutputDimensionality,\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (parentObject !== undefined && fromMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['instances[]', 'mimeType'],\n fromMimeType,\n );\n }\n\n const fromAutoTruncate = common.getValueByPath(fromObject, ['autoTruncate']);\n if (parentObject !== undefined && fromAutoTruncate != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'autoTruncate'],\n fromAutoTruncate,\n );\n }\n\n return toObject;\n}\n\nexport function embedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n common.setValueByPath(\n toObject,\n ['instances[]', 'content'],\n t.tContentsForEmbed(apiClient, fromContents),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n embedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromOutputGcsUri = common.getValueByPath(fromObject, ['outputGcsUri']);\n if (parentObject !== undefined && fromOutputGcsUri != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'storageUri'],\n fromOutputGcsUri,\n );\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n const fromNumberOfImages = common.getValueByPath(fromObject, [\n 'numberOfImages',\n ]);\n if (parentObject !== undefined && fromNumberOfImages != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfImages,\n );\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromGuidanceScale = common.getValueByPath(fromObject, [\n 'guidanceScale',\n ]);\n if (parentObject !== undefined && fromGuidanceScale != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'guidanceScale'],\n fromGuidanceScale,\n );\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (parentObject !== undefined && fromSeed != null) {\n common.setValueByPath(parentObject, ['parameters', 'seed'], fromSeed);\n }\n\n const fromSafetyFilterLevel = common.getValueByPath(fromObject, [\n 'safetyFilterLevel',\n ]);\n if (parentObject !== undefined && fromSafetyFilterLevel != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'safetySetting'],\n fromSafetyFilterLevel,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromIncludeSafetyAttributes = common.getValueByPath(fromObject, [\n 'includeSafetyAttributes',\n ]);\n if (parentObject !== undefined && fromIncludeSafetyAttributes != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeSafetyAttributes'],\n fromIncludeSafetyAttributes,\n );\n }\n\n const fromIncludeRaiReason = common.getValueByPath(fromObject, [\n 'includeRaiReason',\n ]);\n if (parentObject !== undefined && fromIncludeRaiReason != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeRaiReason'],\n fromIncludeRaiReason,\n );\n }\n\n const fromLanguage = common.getValueByPath(fromObject, ['language']);\n if (parentObject !== undefined && fromLanguage != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'language'],\n fromLanguage,\n );\n }\n\n const fromOutputMimeType = common.getValueByPath(fromObject, [\n 'outputMimeType',\n ]);\n if (parentObject !== undefined && fromOutputMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'mimeType'],\n fromOutputMimeType,\n );\n }\n\n const fromOutputCompressionQuality = common.getValueByPath(fromObject, [\n 'outputCompressionQuality',\n ]);\n if (parentObject !== undefined && fromOutputCompressionQuality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'compressionQuality'],\n fromOutputCompressionQuality,\n );\n }\n\n const fromAddWatermark = common.getValueByPath(fromObject, ['addWatermark']);\n if (parentObject !== undefined && fromAddWatermark != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'addWatermark'],\n fromAddWatermark,\n );\n }\n\n const fromEnhancePrompt = common.getValueByPath(fromObject, [\n 'enhancePrompt',\n ]);\n if (parentObject !== undefined && fromEnhancePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'enhancePrompt'],\n fromEnhancePrompt,\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateImagesConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getModelParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetModelParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function countTokensConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (parentObject !== undefined && fromGenerationConfig != null) {\n common.setValueByPath(\n parentObject,\n ['generationConfig'],\n fromGenerationConfig,\n );\n }\n\n return toObject;\n}\n\nexport function countTokensParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n countTokensConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function computeTokensParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.ComputeTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function imageToVertex(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromGcsUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromGcsUri != null) {\n common.setValueByPath(toObject, ['gcsUri'], fromGcsUri);\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, ['imageBytes']);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['bytesBase64Encoded'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generateVideosConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromNumberOfVideos = common.getValueByPath(fromObject, [\n 'numberOfVideos',\n ]);\n if (parentObject !== undefined && fromNumberOfVideos != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfVideos,\n );\n }\n\n const fromOutputGcsUri = common.getValueByPath(fromObject, ['outputGcsUri']);\n if (parentObject !== undefined && fromOutputGcsUri != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'storageUri'],\n fromOutputGcsUri,\n );\n }\n\n const fromFps = common.getValueByPath(fromObject, ['fps']);\n if (parentObject !== undefined && fromFps != null) {\n common.setValueByPath(parentObject, ['parameters', 'fps'], fromFps);\n }\n\n const fromDurationSeconds = common.getValueByPath(fromObject, [\n 'durationSeconds',\n ]);\n if (parentObject !== undefined && fromDurationSeconds != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'durationSeconds'],\n fromDurationSeconds,\n );\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (parentObject !== undefined && fromSeed != null) {\n common.setValueByPath(parentObject, ['parameters', 'seed'], fromSeed);\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromResolution = common.getValueByPath(fromObject, ['resolution']);\n if (parentObject !== undefined && fromResolution != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'resolution'],\n fromResolution,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromPubsubTopic = common.getValueByPath(fromObject, ['pubsubTopic']);\n if (parentObject !== undefined && fromPubsubTopic != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'pubsubTopic'],\n fromPubsubTopic,\n );\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n const fromEnhancePrompt = common.getValueByPath(fromObject, [\n 'enhancePrompt',\n ]);\n if (parentObject !== undefined && fromEnhancePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'enhancePrompt'],\n fromEnhancePrompt,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromImage = common.getValueByPath(fromObject, ['image']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['instances[0]', 'image'],\n imageToVertex(apiClient, fromImage),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateVideosConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partFromMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentFromMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function citationMetadataFromMldev(\n apiClient: ApiClient,\n fromObject: types.CitationMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromCitations = common.getValueByPath(fromObject, ['citationSources']);\n if (fromCitations != null) {\n common.setValueByPath(toObject, ['citations'], fromCitations);\n }\n\n return toObject;\n}\n\nexport function candidateFromMldev(\n apiClient: ApiClient,\n fromObject: types.Candidate,\n): Record {\n const toObject: Record = {};\n\n const fromContent = common.getValueByPath(fromObject, ['content']);\n if (fromContent != null) {\n common.setValueByPath(\n toObject,\n ['content'],\n contentFromMldev(apiClient, fromContent),\n );\n }\n\n const fromCitationMetadata = common.getValueByPath(fromObject, [\n 'citationMetadata',\n ]);\n if (fromCitationMetadata != null) {\n common.setValueByPath(\n toObject,\n ['citationMetadata'],\n citationMetadataFromMldev(apiClient, fromCitationMetadata),\n );\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n const fromFinishReason = common.getValueByPath(fromObject, ['finishReason']);\n if (fromFinishReason != null) {\n common.setValueByPath(toObject, ['finishReason'], fromFinishReason);\n }\n\n const fromAvgLogprobs = common.getValueByPath(fromObject, ['avgLogprobs']);\n if (fromAvgLogprobs != null) {\n common.setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);\n }\n\n const fromGroundingMetadata = common.getValueByPath(fromObject, [\n 'groundingMetadata',\n ]);\n if (fromGroundingMetadata != null) {\n common.setValueByPath(\n toObject,\n ['groundingMetadata'],\n fromGroundingMetadata,\n );\n }\n\n const fromIndex = common.getValueByPath(fromObject, ['index']);\n if (fromIndex != null) {\n common.setValueByPath(toObject, ['index'], fromIndex);\n }\n\n const fromLogprobsResult = common.getValueByPath(fromObject, [\n 'logprobsResult',\n ]);\n if (fromLogprobsResult != null) {\n common.setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult);\n }\n\n const fromSafetyRatings = common.getValueByPath(fromObject, [\n 'safetyRatings',\n ]);\n if (fromSafetyRatings != null) {\n common.setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings);\n }\n\n return toObject;\n}\n\nexport function generateContentResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromCandidates = common.getValueByPath(fromObject, ['candidates']);\n if (fromCandidates != null) {\n if (Array.isArray(fromCandidates)) {\n common.setValueByPath(\n toObject,\n ['candidates'],\n fromCandidates.map((item) => {\n return candidateFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['candidates'], fromCandidates);\n }\n }\n\n const fromModelVersion = common.getValueByPath(fromObject, ['modelVersion']);\n if (fromModelVersion != null) {\n common.setValueByPath(toObject, ['modelVersion'], fromModelVersion);\n }\n\n const fromPromptFeedback = common.getValueByPath(fromObject, [\n 'promptFeedback',\n ]);\n if (fromPromptFeedback != null) {\n common.setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingStatisticsFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function contentEmbeddingFromMldev(\n apiClient: ApiClient,\n fromObject: types.ContentEmbedding,\n): Record {\n const toObject: Record = {};\n\n const fromValues = common.getValueByPath(fromObject, ['values']);\n if (fromValues != null) {\n common.setValueByPath(toObject, ['values'], fromValues);\n }\n\n return toObject;\n}\n\nexport function embedContentMetadataFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function embedContentResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromEmbeddings = common.getValueByPath(fromObject, ['embeddings']);\n if (fromEmbeddings != null) {\n if (Array.isArray(fromEmbeddings)) {\n common.setValueByPath(\n toObject,\n ['embeddings'],\n fromEmbeddings.map((item) => {\n return contentEmbeddingFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['embeddings'], fromEmbeddings);\n }\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(\n toObject,\n ['metadata'],\n embedContentMetadataFromMldev(),\n );\n }\n\n return toObject;\n}\n\nexport function imageFromMldev(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromImageBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['imageBytes'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function safetyAttributesFromMldev(\n apiClient: ApiClient,\n fromObject: types.SafetyAttributes,\n): Record {\n const toObject: Record = {};\n\n const fromCategories = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'categories',\n ]);\n if (fromCategories != null) {\n common.setValueByPath(toObject, ['categories'], fromCategories);\n }\n\n const fromScores = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'scores',\n ]);\n if (fromScores != null) {\n common.setValueByPath(toObject, ['scores'], fromScores);\n }\n\n const fromContentType = common.getValueByPath(fromObject, ['contentType']);\n if (fromContentType != null) {\n common.setValueByPath(toObject, ['contentType'], fromContentType);\n }\n\n return toObject;\n}\n\nexport function generatedImageFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedImage,\n): Record {\n const toObject: Record = {};\n\n const fromImage = common.getValueByPath(fromObject, ['_self']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['image'],\n imageFromMldev(apiClient, fromImage),\n );\n }\n\n const fromRaiFilteredReason = common.getValueByPath(fromObject, [\n 'raiFilteredReason',\n ]);\n if (fromRaiFilteredReason != null) {\n common.setValueByPath(\n toObject,\n ['raiFilteredReason'],\n fromRaiFilteredReason,\n );\n }\n\n const fromSafetyAttributes = common.getValueByPath(fromObject, ['_self']);\n if (fromSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['safetyAttributes'],\n safetyAttributesFromMldev(apiClient, fromSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedImages = common.getValueByPath(fromObject, [\n 'predictions',\n ]);\n if (fromGeneratedImages != null) {\n if (Array.isArray(fromGeneratedImages)) {\n common.setValueByPath(\n toObject,\n ['generatedImages'],\n fromGeneratedImages.map((item) => {\n return generatedImageFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedImages'], fromGeneratedImages);\n }\n }\n\n const fromPositivePromptSafetyAttributes = common.getValueByPath(fromObject, [\n 'positivePromptSafetyAttributes',\n ]);\n if (fromPositivePromptSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['positivePromptSafetyAttributes'],\n safetyAttributesFromMldev(apiClient, fromPositivePromptSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function endpointFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function tunedModelInfoFromMldev(\n apiClient: ApiClient,\n fromObject: types.TunedModelInfo,\n): Record {\n const toObject: Record = {};\n\n const fromBaseModel = common.getValueByPath(fromObject, ['baseModel']);\n if (fromBaseModel != null) {\n common.setValueByPath(toObject, ['baseModel'], fromBaseModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n return toObject;\n}\n\nexport function modelFromMldev(\n apiClient: ApiClient,\n fromObject: types.Model,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromVersion = common.getValueByPath(fromObject, ['version']);\n if (fromVersion != null) {\n common.setValueByPath(toObject, ['version'], fromVersion);\n }\n\n const fromTunedModelInfo = common.getValueByPath(fromObject, ['_self']);\n if (fromTunedModelInfo != null) {\n common.setValueByPath(\n toObject,\n ['tunedModelInfo'],\n tunedModelInfoFromMldev(apiClient, fromTunedModelInfo),\n );\n }\n\n const fromInputTokenLimit = common.getValueByPath(fromObject, [\n 'inputTokenLimit',\n ]);\n if (fromInputTokenLimit != null) {\n common.setValueByPath(toObject, ['inputTokenLimit'], fromInputTokenLimit);\n }\n\n const fromOutputTokenLimit = common.getValueByPath(fromObject, [\n 'outputTokenLimit',\n ]);\n if (fromOutputTokenLimit != null) {\n common.setValueByPath(toObject, ['outputTokenLimit'], fromOutputTokenLimit);\n }\n\n const fromSupportedActions = common.getValueByPath(fromObject, [\n 'supportedGenerationMethods',\n ]);\n if (fromSupportedActions != null) {\n common.setValueByPath(toObject, ['supportedActions'], fromSupportedActions);\n }\n\n return toObject;\n}\n\nexport function countTokensResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTotalTokens = common.getValueByPath(fromObject, ['totalTokens']);\n if (fromTotalTokens != null) {\n common.setValueByPath(toObject, ['totalTokens'], fromTotalTokens);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n return toObject;\n}\n\nexport function videoFromMldev(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['video', 'uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'video',\n 'encodedVideo',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['encoding']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromMldev(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, [\n 'generatedSamples',\n ]);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromMldev(apiClient, fromResponse),\n );\n }\n\n return toObject;\n}\n\nexport function partFromVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentFromVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function citationMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.CitationMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromCitations = common.getValueByPath(fromObject, ['citations']);\n if (fromCitations != null) {\n common.setValueByPath(toObject, ['citations'], fromCitations);\n }\n\n return toObject;\n}\n\nexport function candidateFromVertex(\n apiClient: ApiClient,\n fromObject: types.Candidate,\n): Record {\n const toObject: Record = {};\n\n const fromContent = common.getValueByPath(fromObject, ['content']);\n if (fromContent != null) {\n common.setValueByPath(\n toObject,\n ['content'],\n contentFromVertex(apiClient, fromContent),\n );\n }\n\n const fromCitationMetadata = common.getValueByPath(fromObject, [\n 'citationMetadata',\n ]);\n if (fromCitationMetadata != null) {\n common.setValueByPath(\n toObject,\n ['citationMetadata'],\n citationMetadataFromVertex(apiClient, fromCitationMetadata),\n );\n }\n\n const fromFinishMessage = common.getValueByPath(fromObject, [\n 'finishMessage',\n ]);\n if (fromFinishMessage != null) {\n common.setValueByPath(toObject, ['finishMessage'], fromFinishMessage);\n }\n\n const fromFinishReason = common.getValueByPath(fromObject, ['finishReason']);\n if (fromFinishReason != null) {\n common.setValueByPath(toObject, ['finishReason'], fromFinishReason);\n }\n\n const fromAvgLogprobs = common.getValueByPath(fromObject, ['avgLogprobs']);\n if (fromAvgLogprobs != null) {\n common.setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);\n }\n\n const fromGroundingMetadata = common.getValueByPath(fromObject, [\n 'groundingMetadata',\n ]);\n if (fromGroundingMetadata != null) {\n common.setValueByPath(\n toObject,\n ['groundingMetadata'],\n fromGroundingMetadata,\n );\n }\n\n const fromIndex = common.getValueByPath(fromObject, ['index']);\n if (fromIndex != null) {\n common.setValueByPath(toObject, ['index'], fromIndex);\n }\n\n const fromLogprobsResult = common.getValueByPath(fromObject, [\n 'logprobsResult',\n ]);\n if (fromLogprobsResult != null) {\n common.setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult);\n }\n\n const fromSafetyRatings = common.getValueByPath(fromObject, [\n 'safetyRatings',\n ]);\n if (fromSafetyRatings != null) {\n common.setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings);\n }\n\n return toObject;\n}\n\nexport function generateContentResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromCandidates = common.getValueByPath(fromObject, ['candidates']);\n if (fromCandidates != null) {\n if (Array.isArray(fromCandidates)) {\n common.setValueByPath(\n toObject,\n ['candidates'],\n fromCandidates.map((item) => {\n return candidateFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['candidates'], fromCandidates);\n }\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromResponseId = common.getValueByPath(fromObject, ['responseId']);\n if (fromResponseId != null) {\n common.setValueByPath(toObject, ['responseId'], fromResponseId);\n }\n\n const fromModelVersion = common.getValueByPath(fromObject, ['modelVersion']);\n if (fromModelVersion != null) {\n common.setValueByPath(toObject, ['modelVersion'], fromModelVersion);\n }\n\n const fromPromptFeedback = common.getValueByPath(fromObject, [\n 'promptFeedback',\n ]);\n if (fromPromptFeedback != null) {\n common.setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingStatisticsFromVertex(\n apiClient: ApiClient,\n fromObject: types.ContentEmbeddingStatistics,\n): Record {\n const toObject: Record = {};\n\n const fromTruncated = common.getValueByPath(fromObject, ['truncated']);\n if (fromTruncated != null) {\n common.setValueByPath(toObject, ['truncated'], fromTruncated);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['token_count']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingFromVertex(\n apiClient: ApiClient,\n fromObject: types.ContentEmbedding,\n): Record {\n const toObject: Record = {};\n\n const fromValues = common.getValueByPath(fromObject, ['values']);\n if (fromValues != null) {\n common.setValueByPath(toObject, ['values'], fromValues);\n }\n\n const fromStatistics = common.getValueByPath(fromObject, ['statistics']);\n if (fromStatistics != null) {\n common.setValueByPath(\n toObject,\n ['statistics'],\n contentEmbeddingStatisticsFromVertex(apiClient, fromStatistics),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromBillableCharacterCount = common.getValueByPath(fromObject, [\n 'billableCharacterCount',\n ]);\n if (fromBillableCharacterCount != null) {\n common.setValueByPath(\n toObject,\n ['billableCharacterCount'],\n fromBillableCharacterCount,\n );\n }\n\n return toObject;\n}\n\nexport function embedContentResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromEmbeddings = common.getValueByPath(fromObject, [\n 'predictions[]',\n 'embeddings',\n ]);\n if (fromEmbeddings != null) {\n if (Array.isArray(fromEmbeddings)) {\n common.setValueByPath(\n toObject,\n ['embeddings'],\n fromEmbeddings.map((item) => {\n return contentEmbeddingFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['embeddings'], fromEmbeddings);\n }\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(\n toObject,\n ['metadata'],\n embedContentMetadataFromVertex(apiClient, fromMetadata),\n );\n }\n\n return toObject;\n}\n\nexport function imageFromVertex(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromGcsUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromGcsUri != null) {\n common.setValueByPath(toObject, ['gcsUri'], fromGcsUri);\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['imageBytes'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function safetyAttributesFromVertex(\n apiClient: ApiClient,\n fromObject: types.SafetyAttributes,\n): Record {\n const toObject: Record = {};\n\n const fromCategories = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'categories',\n ]);\n if (fromCategories != null) {\n common.setValueByPath(toObject, ['categories'], fromCategories);\n }\n\n const fromScores = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'scores',\n ]);\n if (fromScores != null) {\n common.setValueByPath(toObject, ['scores'], fromScores);\n }\n\n const fromContentType = common.getValueByPath(fromObject, ['contentType']);\n if (fromContentType != null) {\n common.setValueByPath(toObject, ['contentType'], fromContentType);\n }\n\n return toObject;\n}\n\nexport function generatedImageFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedImage,\n): Record {\n const toObject: Record = {};\n\n const fromImage = common.getValueByPath(fromObject, ['_self']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['image'],\n imageFromVertex(apiClient, fromImage),\n );\n }\n\n const fromRaiFilteredReason = common.getValueByPath(fromObject, [\n 'raiFilteredReason',\n ]);\n if (fromRaiFilteredReason != null) {\n common.setValueByPath(\n toObject,\n ['raiFilteredReason'],\n fromRaiFilteredReason,\n );\n }\n\n const fromSafetyAttributes = common.getValueByPath(fromObject, ['_self']);\n if (fromSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['safetyAttributes'],\n safetyAttributesFromVertex(apiClient, fromSafetyAttributes),\n );\n }\n\n const fromEnhancedPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromEnhancedPrompt != null) {\n common.setValueByPath(toObject, ['enhancedPrompt'], fromEnhancedPrompt);\n }\n\n return toObject;\n}\n\nexport function generateImagesResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedImages = common.getValueByPath(fromObject, [\n 'predictions',\n ]);\n if (fromGeneratedImages != null) {\n if (Array.isArray(fromGeneratedImages)) {\n common.setValueByPath(\n toObject,\n ['generatedImages'],\n fromGeneratedImages.map((item) => {\n return generatedImageFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedImages'], fromGeneratedImages);\n }\n }\n\n const fromPositivePromptSafetyAttributes = common.getValueByPath(fromObject, [\n 'positivePromptSafetyAttributes',\n ]);\n if (fromPositivePromptSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['positivePromptSafetyAttributes'],\n safetyAttributesFromVertex(apiClient, fromPositivePromptSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function endpointFromVertex(\n apiClient: ApiClient,\n fromObject: types.Endpoint,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['endpoint']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDeployedModelId = common.getValueByPath(fromObject, [\n 'deployedModelId',\n ]);\n if (fromDeployedModelId != null) {\n common.setValueByPath(toObject, ['deployedModelId'], fromDeployedModelId);\n }\n\n return toObject;\n}\n\nexport function tunedModelInfoFromVertex(\n apiClient: ApiClient,\n fromObject: types.TunedModelInfo,\n): Record {\n const toObject: Record = {};\n\n const fromBaseModel = common.getValueByPath(fromObject, [\n 'labels',\n 'google-vertex-llm-tuning-base-model-id',\n ]);\n if (fromBaseModel != null) {\n common.setValueByPath(toObject, ['baseModel'], fromBaseModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n return toObject;\n}\n\nexport function modelFromVertex(\n apiClient: ApiClient,\n fromObject: types.Model,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromVersion = common.getValueByPath(fromObject, ['versionId']);\n if (fromVersion != null) {\n common.setValueByPath(toObject, ['version'], fromVersion);\n }\n\n const fromEndpoints = common.getValueByPath(fromObject, ['deployedModels']);\n if (fromEndpoints != null) {\n if (Array.isArray(fromEndpoints)) {\n common.setValueByPath(\n toObject,\n ['endpoints'],\n fromEndpoints.map((item) => {\n return endpointFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['endpoints'], fromEndpoints);\n }\n }\n\n const fromLabels = common.getValueByPath(fromObject, ['labels']);\n if (fromLabels != null) {\n common.setValueByPath(toObject, ['labels'], fromLabels);\n }\n\n const fromTunedModelInfo = common.getValueByPath(fromObject, ['_self']);\n if (fromTunedModelInfo != null) {\n common.setValueByPath(\n toObject,\n ['tunedModelInfo'],\n tunedModelInfoFromVertex(apiClient, fromTunedModelInfo),\n );\n }\n\n return toObject;\n}\n\nexport function countTokensResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTotalTokens = common.getValueByPath(fromObject, ['totalTokens']);\n if (fromTotalTokens != null) {\n common.setValueByPath(toObject, ['totalTokens'], fromTotalTokens);\n }\n\n return toObject;\n}\n\nexport function computeTokensResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.ComputeTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTokensInfo = common.getValueByPath(fromObject, ['tokensInfo']);\n if (fromTokensInfo != null) {\n common.setValueByPath(toObject, ['tokensInfo'], fromTokensInfo);\n }\n\n return toObject;\n}\n\nexport function videoFromVertex(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromVertex(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, ['videos']);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromVertex(apiClient, fromResponse),\n );\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Live client.\n *\n * @experimental\n */\n\nimport {ApiClient} from './_api_client';\nimport {Auth} from './_auth';\nimport * as t from './_transformers';\nimport {WebSocket, WebSocketCallbacks, WebSocketFactory} from './_websocket';\nimport * as converters from './converters/_live_converters';\nimport {contentToMldev, contentToVertex} from './converters/_models_converters';\nimport * as types from './types';\n\nconst FUNCTION_RESPONSE_REQUIRES_ID =\n 'FunctionResponse request must have an `id` field from the response of a ToolCall.FunctionalCalls in Google AI.';\n\n/**\n * Handles incoming messages from the WebSocket.\n *\n * @remarks\n * This function is responsible for parsing incoming messages, transforming them\n * into LiveServerMessages, and then calling the onmessage callback. Note that\n * the first message which is received from the server is a setupComplete\n * message.\n *\n * @param apiClient The ApiClient instance.\n * @param onmessage The user-provided onmessage callback (if any).\n * @param event The MessageEvent from the WebSocket.\n */\nasync function handleWebSocketMessage(\n apiClient: ApiClient,\n onmessage: (msg: types.LiveServerMessage) => void,\n event: MessageEvent,\n): Promise {\n let serverMessage: types.LiveServerMessage;\n let data: types.LiveServerMessage;\n if (event.data instanceof Blob) {\n data = JSON.parse(await event.data.text()) as types.LiveServerMessage;\n } else {\n data = JSON.parse(event.data) as types.LiveServerMessage;\n }\n if (apiClient.isVertexAI()) {\n serverMessage = converters.liveServerMessageFromVertex(apiClient, data);\n } else {\n serverMessage = converters.liveServerMessageFromMldev(apiClient, data);\n }\n\n onmessage(serverMessage);\n}\n\n/**\n Live class encapsulates the configuration for live interaction with the\n Generative Language API. It embeds ApiClient for general API settings.\n\n @experimental\n */\nexport class Live {\n constructor(\n private readonly apiClient: ApiClient,\n private readonly auth: Auth,\n private readonly webSocketFactory: WebSocketFactory,\n ) {}\n\n /**\n Establishes a connection to the specified model with the given\n configuration and returns a Session object representing that connection.\n\n @experimental\n\n @remarks\n\n @param params - The parameters for establishing a connection to the model.\n @return A live session.\n\n @example\n ```ts\n let model: string;\n if (GOOGLE_GENAI_USE_VERTEXAI) {\n model = 'gemini-2.0-flash-live-preview-04-09';\n } else {\n model = 'gemini-2.0-flash-live-001';\n }\n const session = await ai.live.connect({\n model: model,\n config: {\n responseModalities: [Modality.AUDIO],\n },\n callbacks: {\n onopen: () => {\n console.log('Connected to the socket.');\n },\n onmessage: (e: MessageEvent) => {\n console.log('Received message from the server: %s\\n', debug(e.data));\n },\n onerror: (e: ErrorEvent) => {\n console.log('Error occurred: %s\\n', debug(e.error));\n },\n onclose: (e: CloseEvent) => {\n console.log('Connection closed.');\n },\n },\n });\n ```\n */\n async connect(params: types.LiveConnectParameters): Promise {\n const websocketBaseUrl = this.apiClient.getWebsocketBaseUrl();\n const apiVersion = this.apiClient.getApiVersion();\n let url: string;\n const headers = mapToHeaders(this.apiClient.getDefaultHeaders());\n if (this.apiClient.isVertexAI()) {\n url = `${websocketBaseUrl}/ws/google.cloud.aiplatform.${\n apiVersion\n }.LlmBidiService/BidiGenerateContent`;\n await this.auth.addAuthHeaders(headers);\n } else {\n const apiKey = this.apiClient.getApiKey();\n url = `${websocketBaseUrl}/ws/google.ai.generativelanguage.${\n apiVersion\n }.GenerativeService.BidiGenerateContent?key=${apiKey}`;\n }\n\n let onopenResolve: (value: unknown) => void = () => {};\n const onopenPromise = new Promise((resolve: (value: unknown) => void) => {\n onopenResolve = resolve;\n });\n\n const callbacks: types.LiveCallbacks = params.callbacks;\n\n const onopenAwaitedCallback = function () {\n callbacks?.onopen?.();\n onopenResolve({});\n };\n\n const apiClient = this.apiClient;\n\n const websocketCallbacks: WebSocketCallbacks = {\n onopen: onopenAwaitedCallback,\n onmessage: (event: MessageEvent) => {\n void handleWebSocketMessage(apiClient, callbacks.onmessage, event);\n },\n onerror:\n callbacks?.onerror ??\n function (e: ErrorEvent) {\n void e;\n },\n onclose:\n callbacks?.onclose ??\n function (e: CloseEvent) {\n void e;\n },\n };\n\n const conn = this.webSocketFactory.create(\n url,\n headersToMap(headers),\n websocketCallbacks,\n );\n conn.connect();\n // Wait for the websocket to open before sending requests.\n await onopenPromise;\n\n let transformedModel = t.tModel(this.apiClient, params.model);\n if (\n this.apiClient.isVertexAI() &&\n transformedModel.startsWith('publishers/')\n ) {\n const project = this.apiClient.getProject();\n const location = this.apiClient.getLocation();\n transformedModel =\n `projects/${project}/locations/${location}/` + transformedModel;\n }\n\n let clientMessage: Record = {};\n\n if (\n this.apiClient.isVertexAI() &&\n params.config?.responseModalities === undefined\n ) {\n // Set default to AUDIO to align with MLDev API.\n if (params.config === undefined) {\n params.config = {responseModalities: [types.Modality.AUDIO]};\n } else {\n params.config.responseModalities = [types.Modality.AUDIO];\n }\n }\n const liveConnectParameters: types.LiveConnectParameters = {\n model: transformedModel,\n config: params.config,\n callbacks: params.callbacks,\n };\n if (this.apiClient.isVertexAI()) {\n clientMessage = converters.liveConnectParametersToVertex(\n this.apiClient,\n liveConnectParameters,\n );\n } else {\n clientMessage = converters.liveConnectParametersToMldev(\n this.apiClient,\n liveConnectParameters,\n );\n }\n delete clientMessage['config'];\n conn.send(JSON.stringify(clientMessage));\n return new Session(conn, this.apiClient);\n }\n}\n\nconst defaultLiveSendClientContentParamerters: types.LiveSendClientContentParameters =\n {\n turnComplete: true,\n };\n\n/**\n Represents a connection to the API.\n\n @experimental\n */\nexport class Session {\n constructor(\n readonly conn: WebSocket,\n private readonly apiClient: ApiClient,\n ) {}\n\n private tLiveClientContent(\n apiClient: ApiClient,\n params: types.LiveSendClientContentParameters,\n ): types.LiveClientMessage {\n if (params.turns !== null && params.turns !== undefined) {\n let contents: types.Content[] = [];\n try {\n contents = t.tContents(\n apiClient,\n params.turns as types.ContentListUnion,\n );\n if (apiClient.isVertexAI()) {\n contents = contents.map((item) => contentToVertex(apiClient, item));\n } else {\n contents = contents.map((item) => contentToMldev(apiClient, item));\n }\n } catch {\n throw new Error(\n `Failed to parse client content \"turns\", type: '${typeof params.turns}'`,\n );\n }\n return {\n clientContent: {turns: contents, turnComplete: params.turnComplete},\n };\n }\n\n return {\n clientContent: {turnComplete: params.turnComplete},\n };\n }\n\n private tLiveClientRealtimeInput(\n apiClient: ApiClient,\n params: types.LiveSendRealtimeInputParameters,\n ): types.LiveClientMessage {\n let clientMessage: types.LiveClientMessage = {};\n if (!('media' in params) || !params.media) {\n throw new Error(\n `Failed to convert realtime input \"media\", type: '${typeof params.media}'`,\n );\n }\n\n // LiveClientRealtimeInput\n clientMessage = {\n realtimeInput: {\n mediaChunks: [params.media],\n activityStart: params.activityStart,\n activityEnd: params.activityEnd,\n },\n };\n return clientMessage;\n }\n\n private tLiveClienttToolResponse(\n apiClient: ApiClient,\n params: types.LiveSendToolResponseParameters,\n ): types.LiveClientMessage {\n let functionResponses: types.FunctionResponse[] = [];\n\n if (params.functionResponses == null) {\n throw new Error('functionResponses is required.');\n }\n\n if (!Array.isArray(params.functionResponses)) {\n functionResponses = [params.functionResponses];\n } else {\n functionResponses = params.functionResponses;\n }\n\n if (functionResponses.length === 0) {\n throw new Error('functionResponses is required.');\n }\n\n for (const functionResponse of functionResponses) {\n if (\n typeof functionResponse !== 'object' ||\n functionResponse === null ||\n !('name' in functionResponse) ||\n !('response' in functionResponse)\n ) {\n throw new Error(\n `Could not parse function response, type '${typeof functionResponse}'.`,\n );\n }\n if (!apiClient.isVertexAI() && !('id' in functionResponse)) {\n throw new Error(FUNCTION_RESPONSE_REQUIRES_ID);\n }\n }\n\n const clientMessage: types.LiveClientMessage = {\n toolResponse: {functionResponses: functionResponses},\n };\n return clientMessage;\n }\n\n /**\n Send a message over the established connection.\n\n @param params - Contains two **optional** properties, `turns` and\n `turnComplete`.\n\n - `turns` will be converted to a `Content[]`\n - `turnComplete: true` [default] indicates that you are done sending\n content and expect a response. If `turnComplete: false`, the server\n will wait for additional messages before starting generation.\n\n @experimental\n\n @remarks\n There are two ways to send messages to the live API:\n `sendClientContent` and `sendRealtimeInput`.\n\n `sendClientContent` messages are added to the model context **in order**.\n Having a conversation using `sendClientContent` messages is roughly\n equivalent to using the `Chat.sendMessageStream`, except that the state of\n the `chat` history is stored on the API server instead of locally.\n\n Because of `sendClientContent`'s order guarantee, the model cannot respons\n as quickly to `sendClientContent` messages as to `sendRealtimeInput`\n messages. This makes the biggest difference when sending objects that have\n significant preprocessing time (typically images).\n\n The `sendClientContent` message sends a `Content[]`\n which has more options than the `Blob` sent by `sendRealtimeInput`.\n\n So the main use-cases for `sendClientContent` over `sendRealtimeInput` are:\n\n - Sending anything that can't be represented as a `Blob` (text,\n `sendClientContent({turns=\"Hello?\"}`)).\n - Managing turns when not using audio input and voice activity detection.\n (`sendClientContent({turnComplete:true})` or the short form\n `sendClientContent()`)\n - Prefilling a conversation context\n ```\n sendClientContent({\n turns: [\n Content({role:user, parts:...}),\n Content({role:user, parts:...}),\n ...\n ]\n })\n ```\n @experimental\n */\n sendClientContent(params: types.LiveSendClientContentParameters) {\n params = {\n ...defaultLiveSendClientContentParamerters,\n ...params,\n };\n\n const clientMessage: types.LiveClientMessage = this.tLiveClientContent(\n this.apiClient,\n params,\n );\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Send a realtime message over the established connection.\n\n @param params - Contains one property, `media`.\n\n - `media` will be converted to a `Blob`\n\n @experimental\n\n @remarks\n Use `sendRealtimeInput` for realtime audio chunks and video frames (images).\n\n With `sendRealtimeInput` the api will respond to audio automatically\n based on voice activity detection (VAD).\n\n `sendRealtimeInput` is optimized for responsivness at the expense of\n deterministic ordering guarantees. Audio and video tokens are to the\n context when they become available.\n\n Note: The Call signature expects a `Blob` object, but only a subset\n of audio and image mimetypes are allowed.\n */\n sendRealtimeInput(params: types.LiveSendRealtimeInputParameters) {\n if (params.media == null) {\n throw new Error('Media is required.');\n }\n\n const clientMessage: types.LiveClientMessage =\n this.tLiveClientRealtimeInput(this.apiClient, params);\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Send a function response message over the established connection.\n\n @param params - Contains property `functionResponses`.\n\n - `functionResponses` will be converted to a `functionResponses[]`\n\n @remarks\n Use `sendFunctionResponse` to reply to `LiveServerToolCall` from the server.\n\n Use {@link types.LiveConnectConfig#tools} to configure the callable functions.\n\n @experimental\n */\n sendToolResponse(params: types.LiveSendToolResponseParameters) {\n if (params.functionResponses == null) {\n throw new Error('Tool response parameters are required.');\n }\n\n const clientMessage: types.LiveClientMessage =\n this.tLiveClienttToolResponse(this.apiClient, params);\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Terminates the WebSocket connection.\n\n @experimental\n\n @example\n ```ts\n let model: string;\n if (GOOGLE_GENAI_USE_VERTEXAI) {\n model = 'gemini-2.0-flash-live-preview-04-09';\n } else {\n model = 'gemini-2.0-flash-live-001';\n }\n const session = await ai.live.connect({\n model: model,\n config: {\n responseModalities: [Modality.AUDIO],\n }\n });\n\n session.close();\n ```\n */\n close() {\n this.conn.close();\n }\n}\n\n// Converts an headers object to a \"map\" object as expected by the WebSocket\n// constructor. We use this as the Auth interface works with Headers objects\n// while the WebSocket constructor takes a map.\nfunction headersToMap(headers: Headers): Record {\n const headerMap: Record = {};\n headers.forEach((value, key) => {\n headerMap[key] = value;\n });\n return headerMap;\n}\n\n// Converts a \"map\" object to a headers object. We use this as the Auth\n// interface works with Headers objects while the API client default headers\n// returns a map.\nfunction mapToHeaders(map: Record): Headers {\n const headers = new Headers();\n for (const [key, value] of Object.entries(map)) {\n headers.append(key, value);\n }\n return headers;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_models_converters';\nimport * as types from './types';\n\nexport class Models extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Makes an API request to generate content with a given model.\n *\n * For the `model` parameter, supported formats for Vertex AI API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The full resource name starts with 'projects/', for example:\n * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'\n * - The partial resource name with 'publishers/', for example:\n * 'publishers/google/models/gemini-2.0-flash' or\n * 'publishers/meta/models/llama-3.1-405b-instruct-maas'\n * - `/` separated publisher and model name, for example:\n * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas'\n *\n * For the `model` parameter, supported formats for Gemini API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The model name starts with 'models/', for example:\n * 'models/gemini-2.0-flash'\n * - For tuned models, the model name starts with 'tunedModels/',\n * for example:\n * 'tunedModels/1234567890123456789'\n *\n * Some models support multimodal input and output.\n *\n * @param params - The parameters for generating content.\n * @return The response from generating content.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents: 'why is the sky blue?',\n * config: {\n * candidateCount: 2,\n * }\n * });\n * console.log(response);\n * ```\n */\n generateContent = async (\n params: types.GenerateContentParameters,\n ): Promise => {\n return await this.generateContentInternal(params);\n };\n\n /**\n * Makes an API request to generate content with a given model and yields the\n * response in chunks.\n *\n * For the `model` parameter, supported formats for Vertex AI API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The full resource name starts with 'projects/', for example:\n * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'\n * - The partial resource name with 'publishers/', for example:\n * 'publishers/google/models/gemini-2.0-flash' or\n * 'publishers/meta/models/llama-3.1-405b-instruct-maas'\n * - `/` separated publisher and model name, for example:\n * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas'\n *\n * For the `model` parameter, supported formats for Gemini API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The model name starts with 'models/', for example:\n * 'models/gemini-2.0-flash'\n * - For tuned models, the model name starts with 'tunedModels/',\n * for example:\n * 'tunedModels/1234567890123456789'\n *\n * Some models support multimodal input and output.\n *\n * @param params - The parameters for generating content with streaming response.\n * @return The response from generating content.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContentStream({\n * model: 'gemini-2.0-flash',\n * contents: 'why is the sky blue?',\n * config: {\n * maxOutputTokens: 200,\n * }\n * });\n * for await (const chunk of response) {\n * console.log(chunk);\n * }\n * ```\n */\n generateContentStream = async (\n params: types.GenerateContentParameters,\n ): Promise> => {\n return await this.generateContentStreamInternal(params);\n };\n\n /**\n * Generates an image based on a text description and configuration.\n *\n * @param model - The model to use.\n * @param prompt - A text description of the image to generate.\n * @param [config] - The config for image generation.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await client.models.generateImages({\n * model: 'imagen-3.0-generate-002',\n * prompt: 'Robot holding a red skateboard',\n * config: {\n * numberOfImages: 1,\n * includeRaiReason: true,\n * },\n * });\n * console.log(response?.generatedImages?.[0]?.image?.imageBytes);\n * ```\n */\n generateImages = async (\n params: types.GenerateImagesParameters,\n ): Promise => {\n return await this.generateImagesInternal(params).then((apiResponse) => {\n let positivePromptSafetyAttributes;\n const generatedImages = [];\n\n if (apiResponse?.generatedImages) {\n for (const generatedImage of apiResponse.generatedImages) {\n if (\n generatedImage &&\n generatedImage?.safetyAttributes &&\n generatedImage?.safetyAttributes?.contentType === 'Positive Prompt'\n ) {\n positivePromptSafetyAttributes = generatedImage?.safetyAttributes;\n } else {\n generatedImages.push(generatedImage);\n }\n }\n }\n let response: types.GenerateImagesResponse;\n\n if (positivePromptSafetyAttributes) {\n response = {\n generatedImages: generatedImages,\n positivePromptSafetyAttributes: positivePromptSafetyAttributes,\n };\n } else {\n response = {\n generatedImages: generatedImages,\n };\n }\n return response;\n });\n };\n\n private async generateContentInternal(\n params: types.GenerateContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:generateContent',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateContentResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.generateContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:generateContent',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateContentResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n private async generateContentStreamInternal(\n params: types.GenerateContentParameters,\n ): Promise> {\n let response: Promise>;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:streamGenerateContent?alt=sse',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n const apiClient = this.apiClient;\n response = apiClient.requestStream({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n }) as Promise>;\n\n return response.then(async function* (\n apiResponse: AsyncGenerator,\n ) {\n for await (const chunk of apiResponse) {\n const resp = converters.generateContentResponseFromVertex(\n apiClient,\n (await chunk.json()) as types.GenerateContentResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n yield typedResp;\n }\n });\n } else {\n const body = converters.generateContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:streamGenerateContent?alt=sse',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n const apiClient = this.apiClient;\n response = apiClient.requestStream({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n }) as Promise>;\n\n return response.then(async function* (\n apiResponse: AsyncGenerator,\n ) {\n for await (const chunk of apiResponse) {\n const resp = converters.generateContentResponseFromMldev(\n apiClient,\n (await chunk.json()) as types.GenerateContentResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n yield typedResp;\n }\n });\n }\n }\n\n /**\n * Calculates embeddings for the given contents. Only text is supported.\n *\n * @param params - The parameters for embedding contents.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.embedContent({\n * model: 'text-embedding-004',\n * contents: [\n * 'What is your name?',\n * 'What is your favorite color?',\n * ],\n * config: {\n * outputDimensionality: 64,\n * },\n * });\n * console.log(response);\n * ```\n */\n async embedContent(\n params: types.EmbedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.embedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.embedContentResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.EmbedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.embedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:batchEmbedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.embedContentResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.EmbedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Generates an image based on a text description and configuration.\n *\n * @param params - The parameters for generating images.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateImages({\n * model: 'imagen-3.0-generate-002',\n * prompt: 'Robot holding a red skateboard',\n * config: {\n * numberOfImages: 1,\n * includeRaiReason: true,\n * },\n * });\n * console.log(response?.generatedImages?.[0]?.image?.imageBytes);\n * ```\n */\n private async generateImagesInternal(\n params: types.GenerateImagesParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateImagesParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateImagesResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateImagesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.generateImagesParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateImagesResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateImagesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Fetches information about a model by name.\n *\n * @example\n * ```ts\n * const modelInfo = await ai.models.get({model: 'gemini-2.0-flash'});\n * ```\n */\n async get(params: types.GetModelParameters): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getModelParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.modelFromVertex(this.apiClient, apiResponse);\n\n return resp as types.Model;\n });\n } else {\n const body = converters.getModelParametersToMldev(this.apiClient, params);\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.modelFromMldev(this.apiClient, apiResponse);\n\n return resp as types.Model;\n });\n }\n }\n\n /**\n * Counts the number of tokens in the given contents. Multimodal input is\n * supported for Gemini models.\n *\n * @param params - The parameters for counting tokens.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.countTokens({\n * model: 'gemini-2.0-flash',\n * contents: 'The quick brown fox jumps over the lazy dog.'\n * });\n * console.log(response);\n * ```\n */\n async countTokens(\n params: types.CountTokensParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.countTokensParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:countTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.countTokensResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.CountTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.countTokensParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:countTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.countTokensResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.CountTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Given a list of contents, returns a corresponding TokensInfo containing\n * the list of tokens and list of token ids.\n *\n * This method is not supported by the Gemini Developer API.\n *\n * @param params - The parameters for computing tokens.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.computeTokens({\n * model: 'gemini-2.0-flash',\n * contents: 'What is your name?'\n * });\n * console.log(response);\n * ```\n */\n async computeTokens(\n params: types.ComputeTokensParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.computeTokensParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:computeTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.computeTokensResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ComputeTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n throw new Error('This method is only supported by the Vertex AI.');\n }\n }\n\n /**\n * Generates videos based on a text description and configuration.\n *\n * @param params - The parameters for generating videos.\n * @return A Promise which allows you to track the progress and eventually retrieve the generated videos using the operations.get method.\n *\n * @example\n * ```ts\n * const operation = await ai.models.generateVideos({\n * model: 'veo-2.0-generate-001',\n * prompt: 'A neon hologram of a cat driving at top speed',\n * config: {\n * numberOfVideos: 1\n * });\n *\n * while (!operation.done) {\n * await new Promise(resolve => setTimeout(resolve, 10000));\n * operation = await ai.operations.getVideosOperation({operation: operation});\n * }\n *\n * console.log(operation.response?.generatedVideos?.[0]?.video?.uri);\n * ```\n */\n\n async generateVideos(\n params: types.GenerateVideosParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateVideosParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predictLongRunning',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n const body = converters.generateVideosParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predictLongRunning',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function getOperationParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'operationName'],\n fromOperationName,\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function getOperationParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'operationName'],\n fromOperationName,\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function fetchPredictOperationParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.FetchPredictOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(toObject, ['operationName'], fromOperationName);\n }\n\n const fromResourceName = common.getValueByPath(fromObject, ['resourceName']);\n if (fromResourceName != null) {\n common.setValueByPath(toObject, ['_url', 'resourceName'], fromResourceName);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function videoFromMldev(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['video', 'uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'video',\n 'encodedVideo',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['encoding']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromMldev(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, [\n 'generatedSamples',\n ]);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromMldev(apiClient, fromResponse),\n );\n }\n\n return toObject;\n}\n\nexport function videoFromVertex(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromVertex(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, ['videos']);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromVertex(apiClient, fromResponse),\n );\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_operations_converters';\nimport * as types from './types';\n\nexport class Operations extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Gets the status of a long-running operation.\n *\n * @param parameters The parameters for the get operation request.\n * @return The updated Operation object, with the latest status or result.\n */\n async getVideosOperation(\n parameters: types.OperationGetParameters,\n ): Promise {\n const operation = parameters.operation;\n const config = parameters.config;\n\n if (operation.name === undefined || operation.name === '') {\n throw new Error('Operation name is required.');\n }\n\n if (this.apiClient.isVertexAI()) {\n const resourceName = operation.name.split('/operations/')[0];\n let httpOptions: types.HttpOptions | undefined = undefined;\n\n if (config && 'httpOptions' in config) {\n httpOptions = config.httpOptions;\n }\n\n return this.fetchPredictVideosOperationInternal({\n operationName: operation.name,\n resourceName: resourceName,\n config: {httpOptions: httpOptions},\n });\n } else {\n return this.getVideosOperationInternal({\n operationName: operation.name,\n config: config,\n });\n }\n }\n\n private async getVideosOperationInternal(\n params: types.GetOperationParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getOperationParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{operationName}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n const body = converters.getOperationParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{operationName}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n }\n }\n\n private async fetchPredictVideosOperationInternal(\n params: types.FetchPredictOperationParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.fetchPredictOperationParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{resourceName}:fetchPredictOperation',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n throw new Error('This method is only supported by the Vertex AI.');\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {Auth} from './_auth';\nimport * as common from './_common';\nimport {Uploader} from './_uploader';\nimport {File, HttpOptions, HttpResponse, UploadFileConfig} from './types';\n\nconst CONTENT_TYPE_HEADER = 'Content-Type';\nconst SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';\nconst USER_AGENT_HEADER = 'User-Agent';\nconst GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';\nexport const SDK_VERSION = '0.8.0'; // x-release-please-version\nconst LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;\nconst VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';\nconst GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';\nconst responseLineRE = /^data: (.*)(?:\\n\\n|\\r\\r|\\r\\n\\r\\n)/;\n\n/**\n * Client errors raised by the GenAI API.\n */\nexport class ClientError extends Error {\n constructor(message: string, stackTrace?: string) {\n if (stackTrace) {\n super(message, {cause: stackTrace});\n } else {\n super(message, {cause: new Error().stack});\n }\n this.message = message;\n this.name = 'ClientError';\n }\n}\n\n/**\n * Server errors raised by the GenAI API.\n */\nexport class ServerError extends Error {\n constructor(message: string, stackTrace?: string) {\n if (stackTrace) {\n super(message, {cause: stackTrace});\n } else {\n super(message, {cause: new Error().stack});\n }\n this.message = message;\n this.name = 'ServerError';\n }\n}\n\n/**\n * Options for initializing the ApiClient. The ApiClient uses the parameters\n * for authentication purposes as well as to infer if SDK should send the\n * request to Vertex AI or Gemini API.\n */\nexport interface ApiClientInitOptions {\n /**\n * The object used for adding authentication headers to API requests.\n */\n auth: Auth;\n /**\n * The uploader to use for uploading files. This field is required for\n * creating a client, will be set through the Node_client or Web_client.\n */\n uploader: Uploader;\n /**\n * Optional. The Google Cloud project ID for Vertex AI users.\n * It is not the numeric project name.\n * If not provided, SDK will try to resolve it from runtime environment.\n */\n project?: string;\n /**\n * Optional. The Google Cloud project location for Vertex AI users.\n * If not provided, SDK will try to resolve it from runtime environment.\n */\n location?: string;\n /**\n * The API Key. This is required for Gemini API users.\n */\n apiKey?: string;\n /**\n * Optional. Set to true if you intend to call Vertex AI endpoints.\n * If unset, default SDK behavior is to call Gemini API.\n */\n vertexai?: boolean;\n /**\n * Optional. The API version for the endpoint.\n * If unset, SDK will choose a default api version.\n */\n apiVersion?: string;\n /**\n * Optional. A set of customizable configuration for HTTP requests.\n */\n httpOptions?: HttpOptions;\n /**\n * Optional. An extra string to append at the end of the User-Agent header.\n *\n * This can be used to e.g specify the runtime and its version.\n */\n userAgentExtra?: string;\n}\n\n/**\n * Represents the necessary information to send a request to an API endpoint.\n * This interface defines the structure for constructing and executing HTTP\n * requests.\n */\nexport interface HttpRequest {\n /**\n * URL path from the modules, this path is appended to the base API URL to\n * form the complete request URL.\n *\n * If you wish to set full URL, use httpOptions.baseUrl instead. Example to\n * set full URL in the request:\n *\n * const request: HttpRequest = {\n * path: '',\n * httpOptions: {\n * baseUrl: 'https://',\n * apiVersion: '',\n * },\n * httpMethod: 'GET',\n * };\n *\n * The result URL will be: https://\n *\n */\n path: string;\n /**\n * Optional query parameters to be appended to the request URL.\n */\n queryParams?: Record;\n /**\n * Optional request body in json string or Blob format, GET request doesn't\n * need a request body.\n */\n body?: string | Blob;\n /**\n * The HTTP method to be used for the request.\n */\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE';\n /**\n * Optional set of customizable configuration for HTTP requests.\n */\n httpOptions?: HttpOptions;\n}\n\n/**\n * The ApiClient class is used to send requests to the Gemini API or Vertex AI\n * endpoints.\n */\nexport class ApiClient {\n readonly clientOptions: ApiClientInitOptions;\n\n constructor(opts: ApiClientInitOptions) {\n this.clientOptions = {\n ...opts,\n project: opts.project,\n location: opts.location,\n apiKey: opts.apiKey,\n vertexai: opts.vertexai,\n };\n\n const initHttpOptions: HttpOptions = {};\n\n if (this.clientOptions.vertexai) {\n initHttpOptions.apiVersion =\n this.clientOptions.apiVersion ?? VERTEX_AI_API_DEFAULT_VERSION;\n // Assume that proj/api key validation occurs before they are passed in.\n if (this.getProject() || this.getLocation()) {\n initHttpOptions.baseUrl = `https://${this.clientOptions.location}-aiplatform.googleapis.com/`;\n this.clientOptions.apiKey = undefined; // unset API key.\n } else {\n initHttpOptions.baseUrl = `https://aiplatform.googleapis.com/`;\n this.clientOptions.project = undefined; // unset project.\n this.clientOptions.location = undefined; // unset location.\n }\n } else {\n initHttpOptions.apiVersion =\n this.clientOptions.apiVersion ?? GOOGLE_AI_API_DEFAULT_VERSION;\n initHttpOptions.baseUrl = `https://generativelanguage.googleapis.com/`;\n }\n\n initHttpOptions.headers = this.getDefaultHeaders();\n\n this.clientOptions.httpOptions = initHttpOptions;\n\n if (opts.httpOptions) {\n this.clientOptions.httpOptions = this.patchHttpOptions(\n initHttpOptions,\n opts.httpOptions,\n );\n }\n }\n\n isVertexAI(): boolean {\n return this.clientOptions.vertexai ?? false;\n }\n\n getProject() {\n return this.clientOptions.project;\n }\n\n getLocation() {\n return this.clientOptions.location;\n }\n\n getApiVersion() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.apiVersion !== undefined\n ) {\n return this.clientOptions.httpOptions.apiVersion;\n }\n throw new Error('API version is not set.');\n }\n\n getBaseUrl() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.baseUrl !== undefined\n ) {\n return this.clientOptions.httpOptions.baseUrl;\n }\n throw new Error('Base URL is not set.');\n }\n\n getRequestUrl() {\n return this.getRequestUrlInternal(this.clientOptions.httpOptions);\n }\n\n getHeaders() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.headers !== undefined\n ) {\n return this.clientOptions.httpOptions.headers;\n } else {\n throw new Error('Headers are not set.');\n }\n }\n\n private getRequestUrlInternal(httpOptions?: HttpOptions) {\n if (\n !httpOptions ||\n httpOptions.baseUrl === undefined ||\n httpOptions.apiVersion === undefined\n ) {\n throw new Error('HTTP options are not correctly set.');\n }\n const baseUrl = httpOptions.baseUrl.endsWith('/')\n ? httpOptions.baseUrl.slice(0, -1)\n : httpOptions.baseUrl;\n const urlElement: Array = [baseUrl];\n if (httpOptions.apiVersion && httpOptions.apiVersion !== '') {\n urlElement.push(httpOptions.apiVersion);\n }\n return urlElement.join('/');\n }\n\n getBaseResourcePath() {\n return `projects/${this.clientOptions.project}/locations/${\n this.clientOptions.location\n }`;\n }\n\n getApiKey() {\n return this.clientOptions.apiKey;\n }\n\n getWebsocketBaseUrl() {\n const baseUrl = this.getBaseUrl();\n const urlParts = new URL(baseUrl);\n urlParts.protocol = 'wss';\n return urlParts.toString();\n }\n\n setBaseUrl(url: string) {\n if (this.clientOptions.httpOptions) {\n this.clientOptions.httpOptions.baseUrl = url;\n } else {\n throw new Error('HTTP options are not correctly set.');\n }\n }\n\n private constructUrl(\n path: string,\n httpOptions: HttpOptions,\n prependProjectLocation: boolean,\n ): URL {\n const urlElement: Array = [this.getRequestUrlInternal(httpOptions)];\n if (prependProjectLocation) {\n urlElement.push(this.getBaseResourcePath());\n }\n if (path !== '') {\n urlElement.push(path);\n }\n const url = new URL(`${urlElement.join('/')}`);\n\n return url;\n }\n\n private shouldPrependVertexProjectPath(request: HttpRequest): boolean {\n if (this.clientOptions.apiKey) {\n return false;\n }\n if (!this.clientOptions.vertexai) {\n return false;\n }\n if (request.path.startsWith('projects/')) {\n // Assume the path already starts with\n // `projects//location/`.\n return false;\n }\n if (\n request.httpMethod === 'GET' &&\n request.path.startsWith('publishers/google/models')\n ) {\n // These paths are used by Vertex's models.get and models.list\n // calls. For base models Vertex does not accept a project/location\n // prefix (for tuned model the prefix is required).\n return false;\n }\n return true;\n }\n\n async request(request: HttpRequest): Promise {\n let patchedHttpOptions = this.clientOptions.httpOptions!;\n if (request.httpOptions) {\n patchedHttpOptions = this.patchHttpOptions(\n this.clientOptions.httpOptions!,\n request.httpOptions,\n );\n }\n\n const prependProjectLocation = this.shouldPrependVertexProjectPath(request);\n const url = this.constructUrl(\n request.path,\n patchedHttpOptions,\n prependProjectLocation,\n );\n if (request.queryParams) {\n for (const [key, value] of Object.entries(request.queryParams)) {\n url.searchParams.append(key, String(value));\n }\n }\n let requestInit: RequestInit = {};\n if (request.httpMethod === 'GET') {\n if (request.body && request.body !== '{}') {\n throw new Error(\n 'Request body should be empty for GET request, but got non empty request body',\n );\n }\n } else {\n requestInit.body = request.body;\n }\n requestInit = await this.includeExtraHttpOptionsToRequestInit(\n requestInit,\n patchedHttpOptions,\n );\n return this.unaryApiCall(url, requestInit, request.httpMethod);\n }\n\n private patchHttpOptions(\n baseHttpOptions: HttpOptions,\n requestHttpOptions: HttpOptions,\n ): HttpOptions {\n const patchedHttpOptions = JSON.parse(\n JSON.stringify(baseHttpOptions),\n ) as HttpOptions;\n\n for (const [key, value] of Object.entries(requestHttpOptions)) {\n // Records compile to objects.\n if (typeof value === 'object') {\n // @ts-expect-error TS2345TS7053: Element implicitly has an 'any' type\n // because expression of type 'string' can't be used to index type\n // 'HttpOptions'.\n patchedHttpOptions[key] = {...patchedHttpOptions[key], ...value};\n } else if (value !== undefined) {\n // @ts-expect-error TS2345TS7053: Element implicitly has an 'any' type\n // because expression of type 'string' can't be used to index type\n // 'HttpOptions'.\n patchedHttpOptions[key] = value;\n }\n }\n return patchedHttpOptions;\n }\n\n async requestStream(\n request: HttpRequest,\n ): Promise> {\n let patchedHttpOptions = this.clientOptions.httpOptions!;\n if (request.httpOptions) {\n patchedHttpOptions = this.patchHttpOptions(\n this.clientOptions.httpOptions!,\n request.httpOptions,\n );\n }\n\n const prependProjectLocation = this.shouldPrependVertexProjectPath(request);\n const url = this.constructUrl(\n request.path,\n patchedHttpOptions,\n prependProjectLocation,\n );\n if (!url.searchParams.has('alt') || url.searchParams.get('alt') !== 'sse') {\n url.searchParams.set('alt', 'sse');\n }\n let requestInit: RequestInit = {};\n requestInit.body = request.body;\n requestInit = await this.includeExtraHttpOptionsToRequestInit(\n requestInit,\n patchedHttpOptions,\n );\n return this.streamApiCall(url, requestInit, request.httpMethod);\n }\n\n private async includeExtraHttpOptionsToRequestInit(\n requestInit: RequestInit,\n httpOptions: HttpOptions,\n ): Promise {\n if (httpOptions && (httpOptions.signal || httpOptions.timeout && httpOptions?.timeout >= 0)) {\n const abortController = new AbortController();\n const signal = abortController.signal;\n if (httpOptions.timeout && httpOptions.timeout >= 0) {\n setTimeout(() => abortController.abort(), httpOptions.timeout);\n }\n if (httpOptions.signal) {\n httpOptions.signal?.addEventListener('abort', () => {\n abortController.abort();\n });\n }\n requestInit.signal = signal;\n }\n requestInit.headers = await this.getHeadersInternal(httpOptions);\n return requestInit;\n }\n\n private async unaryApiCall(\n url: URL,\n requestInit: RequestInit,\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE',\n ): Promise {\n return this.apiCall(url.toString(), {\n ...requestInit,\n method: httpMethod,\n })\n .then(async (response) => {\n await throwErrorIfNotOK(response);\n return new HttpResponse(response);\n })\n .catch((e) => {\n if (e instanceof Error) {\n throw e;\n } else {\n throw new Error(JSON.stringify(e));\n }\n });\n }\n\n private async streamApiCall(\n url: URL,\n requestInit: RequestInit,\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE',\n ): Promise> {\n return this.apiCall(url.toString(), {\n ...requestInit,\n method: httpMethod,\n })\n .then(async (response) => {\n await throwErrorIfNotOK(response);\n return this.processStreamResponse(response);\n })\n .catch((e) => {\n if (e instanceof Error) {\n throw e;\n } else {\n throw new Error(JSON.stringify(e));\n }\n });\n }\n\n async *processStreamResponse(\n response: Response,\n ): AsyncGenerator {\n const reader = response?.body?.getReader();\n const decoder = new TextDecoder('utf-8');\n if (!reader) {\n throw new Error('Response body is empty');\n }\n\n try {\n let buffer = '';\n while (true) {\n const {done, value} = await reader.read();\n if (done) {\n if (buffer.trim().length > 0) {\n throw new Error('Incomplete JSON segment at the end');\n }\n break;\n }\n const chunkString = decoder.decode(value);\n buffer += chunkString;\n let match = buffer.match(responseLineRE);\n while (match) {\n const processedChunkString = match[1];\n try {\n const partialResponse = new Response(processedChunkString, {\n headers: response?.headers,\n status: response?.status,\n statusText: response?.statusText,\n });\n yield new HttpResponse(partialResponse);\n buffer = buffer.slice(match[0].length);\n match = buffer.match(responseLineRE);\n } catch (e) {\n throw new Error(\n `exception parsing stream chunk ${processedChunkString}. ${e}`,\n );\n }\n }\n }\n } finally {\n reader.releaseLock();\n }\n }\n private async apiCall(\n url: string,\n requestInit: RequestInit,\n ): Promise {\n return fetch(url, requestInit).catch((e) => {\n throw new Error(`exception ${e} sending request`);\n });\n }\n\n getDefaultHeaders(): Record {\n const headers: Record = {};\n\n const versionHeaderValue =\n LIBRARY_LABEL + ' ' + this.clientOptions.userAgentExtra;\n\n headers[USER_AGENT_HEADER] = versionHeaderValue;\n headers[GOOGLE_API_CLIENT_HEADER] = versionHeaderValue;\n headers[CONTENT_TYPE_HEADER] = 'application/json';\n\n return headers;\n }\n\n private async getHeadersInternal(\n httpOptions: HttpOptions | undefined,\n ): Promise {\n const headers = new Headers();\n if (httpOptions && httpOptions.headers) {\n for (const [key, value] of Object.entries(httpOptions.headers)) {\n headers.append(key, value);\n }\n // Append a timeout header if it is set, note that the timeout option is\n // in milliseconds but the header is in seconds.\n if (httpOptions.timeout && httpOptions.timeout > 0) {\n headers.append(\n SERVER_TIMEOUT_HEADER,\n String(Math.ceil(httpOptions.timeout / 1000)),\n );\n }\n }\n await this.clientOptions.auth.addAuthHeaders(headers);\n return headers;\n }\n\n /**\n * Uploads a file asynchronously using Gemini API only, this is not supported\n * in Vertex AI.\n *\n * @param file The string path to the file to be uploaded or a Blob object.\n * @param config Optional parameters specified in the `UploadFileConfig`\n * interface. @see {@link UploadFileConfig}\n * @return A promise that resolves to a `File` object.\n * @throws An error if called on a Vertex AI client.\n * @throws An error if the `mimeType` is not provided and can not be inferred,\n */\n async uploadFile(\n file: string | Blob,\n config?: UploadFileConfig,\n ): Promise {\n const fileToUpload: File = {};\n if (config != null) {\n fileToUpload.mimeType = config.mimeType;\n fileToUpload.name = config.name;\n fileToUpload.displayName = config.displayName;\n }\n\n if (fileToUpload.name && !fileToUpload.name.startsWith('files/')) {\n fileToUpload.name = `files/${fileToUpload.name}`;\n }\n\n const uploader = this.clientOptions.uploader;\n const fileStat = await uploader.stat(file);\n fileToUpload.sizeBytes = String(fileStat.size);\n const mimeType = config?.mimeType ?? fileStat.type;\n if (mimeType === undefined || mimeType === '') {\n throw new Error(\n 'Can not determine mimeType. Please provide mimeType in the config.',\n );\n }\n fileToUpload.mimeType = mimeType;\n\n const uploadUrl = await this.fetchUploadUrl(fileToUpload, config);\n return uploader.upload(file, uploadUrl, this);\n }\n\n private async fetchUploadUrl(\n file: File,\n config?: UploadFileConfig,\n ): Promise {\n let httpOptions: HttpOptions = {};\n if (config?.httpOptions) {\n httpOptions = config.httpOptions;\n } else {\n httpOptions = {\n apiVersion: '', // api-version is set in the path.\n headers: {\n 'Content-Type': 'application/json',\n 'X-Goog-Upload-Protocol': 'resumable',\n 'X-Goog-Upload-Command': 'start',\n 'X-Goog-Upload-Header-Content-Length': `${file.sizeBytes}`,\n 'X-Goog-Upload-Header-Content-Type': `${file.mimeType}`,\n },\n };\n }\n\n const body: Record = {\n 'file': file,\n };\n const httpResponse = await this.request({\n path: common.formatMap(\n 'upload/v1beta/files',\n body['_url'] as Record,\n ),\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions,\n });\n\n if (!httpResponse || !httpResponse?.headers) {\n throw new Error(\n 'Server did not return an HttpResponse or the returned HttpResponse did not have headers.',\n );\n }\n\n const uploadUrl: string | undefined =\n httpResponse?.headers?.['x-goog-upload-url'];\n if (uploadUrl === undefined) {\n throw new Error(\n 'Failed to get upload url. Server did not return the x-google-upload-url in the headers',\n );\n }\n return uploadUrl;\n }\n}\n\nasync function throwErrorIfNotOK(response: Response | undefined) {\n if (response === undefined) {\n throw new ServerError('response is undefined');\n }\n if (!response.ok) {\n const status: number = response.status;\n const statusText: string = response.statusText;\n let errorBody: Record;\n if (response.headers.get('content-type')?.includes('application/json')) {\n errorBody = await response.json();\n } else {\n errorBody = {\n error: {\n message: 'exception parsing response',\n code: response.status,\n status: response.statusText,\n },\n };\n }\n const errorMessage = `got status: ${status} ${statusText}. ${JSON.stringify(\n errorBody,\n )}`;\n if (status >= 400 && status < 500) {\n const clientError = new ClientError(errorMessage);\n throw clientError;\n } else if (status >= 500 && status < 600) {\n const serverError = new ServerError(errorMessage);\n throw serverError;\n }\n throw new Error(errorMessage);\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {GoogleAuth, GoogleAuthOptions} from 'google-auth-library';\n\nimport {Auth} from '../_auth';\n\nexport const GOOGLE_API_KEY_HEADER = 'x-goog-api-key';\nconst REQUIRED_VERTEX_AI_SCOPE =\n 'https://www.googleapis.com/auth/cloud-platform';\n\nexport interface NodeAuthOptions {\n /**\n * The API Key. This is required for Gemini API users.\n */\n apiKey?: string;\n /**\n * Optional. These are the authentication options provided by google-auth-library for Vertex AI users.\n * Complete list of authentication options are documented in the\n * GoogleAuthOptions interface:\n * https://github.com/googleapis/google-auth-library-nodejs/blob/main/src/auth/googleauth.ts.\n */\n googleAuthOptions?: GoogleAuthOptions;\n}\n\nexport class NodeAuth implements Auth {\n private readonly googleAuth?: GoogleAuth;\n private readonly apiKey?: string;\n\n constructor(opts: NodeAuthOptions) {\n if (opts.apiKey !== undefined) {\n this.apiKey = opts.apiKey;\n return;\n }\n const vertexAuthOptions = buildGoogleAuthOptions(opts.googleAuthOptions);\n this.googleAuth = new GoogleAuth(vertexAuthOptions);\n }\n\n async addAuthHeaders(headers: Headers): Promise {\n if (this.apiKey !== undefined) {\n this.addKeyHeader(headers);\n return;\n }\n\n return this.addGoogleAuthHeaders(headers);\n }\n\n private addKeyHeader(headers: Headers) {\n if (headers.get(GOOGLE_API_KEY_HEADER) !== null) {\n return;\n }\n if (this.apiKey === undefined) {\n // This should never happen, this method is only called\n // when apiKey is set.\n throw new Error('Trying to set API key header but apiKey is not set');\n }\n headers.append(GOOGLE_API_KEY_HEADER, this.apiKey);\n }\n\n private async addGoogleAuthHeaders(headers: Headers): Promise {\n if (this.googleAuth === undefined) {\n // This should never happen, addGoogleAuthHeaders should only be\n // called when there is no apiKey set and in these cases googleAuth\n // is set.\n throw new Error(\n 'Trying to set google-auth headers but googleAuth is unset',\n );\n }\n const authHeaders = await this.googleAuth.getRequestHeaders();\n for (const key in authHeaders) {\n if (headers.get(key) !== null) {\n continue;\n }\n headers.append(key, authHeaders[key]);\n }\n }\n}\n\nfunction buildGoogleAuthOptions(\n googleAuthOptions?: GoogleAuthOptions,\n): GoogleAuthOptions {\n let authOptions: GoogleAuthOptions;\n if (!googleAuthOptions) {\n authOptions = {\n scopes: [REQUIRED_VERTEX_AI_SCOPE],\n };\n return authOptions;\n } else {\n authOptions = googleAuthOptions;\n if (!authOptions.scopes) {\n authOptions.scopes = [REQUIRED_VERTEX_AI_SCOPE];\n return authOptions;\n } else if (\n (typeof authOptions.scopes === 'string' &&\n authOptions.scopes !== REQUIRED_VERTEX_AI_SCOPE) ||\n (Array.isArray(authOptions.scopes) &&\n authOptions.scopes.indexOf(REQUIRED_VERTEX_AI_SCOPE) < 0)\n ) {\n throw new Error(\n `Invalid auth scopes. Scopes must include: ${REQUIRED_VERTEX_AI_SCOPE}`,\n );\n }\n return authOptions;\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport * as NodeWs from 'ws';\n\nimport {WebSocket, WebSocketCallbacks, WebSocketFactory} from '../_websocket';\n\nexport class NodeWebSocketFactory implements WebSocketFactory {\n create(\n url: string,\n headers: Record,\n callbacks: WebSocketCallbacks,\n ): WebSocket {\n return new NodeWebSocket(url, headers, callbacks);\n }\n}\n\nexport class NodeWebSocket implements WebSocket {\n private ws?: NodeWs.WebSocket;\n\n constructor(\n private readonly url: string,\n private readonly headers: Record,\n private readonly callbacks: WebSocketCallbacks,\n ) {}\n\n connect(): void {\n this.ws = new NodeWs.WebSocket(this.url, {headers: this.headers});\n\n this.ws.onopen = this.callbacks.onopen;\n this.ws.onerror = this.callbacks.onerror;\n this.ws.onclose = this.callbacks.onclose;\n this.ws.onmessage = this.callbacks.onmessage;\n }\n\n send(message: string) {\n if (this.ws === undefined) {\n throw new Error('WebSocket is not connected');\n }\n\n this.ws.send(message);\n }\n\n close() {\n if (this.ws === undefined) {\n throw new Error('WebSocket is not connected');\n }\n\n this.ws.close();\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {ApiClient} from '../_api_client';\nimport {FileStat, Uploader} from '../_uploader';\nimport {File, HttpResponse} from '../types';\n\nimport {crossError} from './_cross_error';\n\nexport const MAX_CHUNK_SIZE = 1024 * 1024 * 8; // bytes\nexport class CrossUploader implements Uploader {\n async upload(\n file: string | Blob,\n uploadUrl: string,\n apiClient: ApiClient,\n ): Promise {\n if (typeof file === 'string') {\n throw crossError();\n } else {\n return uploadBlob(file, uploadUrl, apiClient);\n }\n }\n\n async stat(file: string | Blob): Promise {\n if (typeof file === 'string') {\n throw crossError();\n } else {\n return getBlobStat(file);\n }\n }\n}\n\nexport async function uploadBlob(\n file: Blob,\n uploadUrl: string,\n apiClient: ApiClient,\n): Promise {\n let fileSize = 0;\n let offset = 0;\n let response: HttpResponse = new HttpResponse(new Response());\n let uploadCommand = 'upload';\n fileSize = file.size;\n while (offset < fileSize) {\n const chunkSize = Math.min(MAX_CHUNK_SIZE, fileSize - offset);\n const chunk = file.slice(offset, offset + chunkSize);\n if (offset + chunkSize >= fileSize) {\n uploadCommand += ', finalize';\n }\n response = await apiClient.request({\n path: '',\n body: chunk,\n httpMethod: 'POST',\n httpOptions: {\n apiVersion: '',\n baseUrl: uploadUrl,\n headers: {\n 'X-Goog-Upload-Command': uploadCommand,\n 'X-Goog-Upload-Offset': String(offset),\n 'Content-Length': String(chunkSize),\n },\n },\n });\n offset += chunkSize;\n // The `x-goog-upload-status` header field can be `active`, `final` and\n //`cancelled` in resposne.\n if (response?.headers?.['x-goog-upload-status'] !== 'active') {\n break;\n }\n // TODO(b/401391430) Investigate why the upload status is not finalized\n // even though all content has been uploaded.\n if (fileSize <= offset) {\n throw new Error(\n 'All content has been uploaded, but the upload status is not finalized.',\n );\n }\n }\n const responseJson = (await response?.json()) as Record<\n string,\n File | unknown\n >;\n if (response?.headers?.['x-goog-upload-status'] !== 'final') {\n throw new Error('Failed to upload file: Upload status is not finalized.');\n }\n return responseJson['file'] as File;\n}\n\nexport async function getBlobStat(file: Blob): Promise {\n const fileStat: FileStat = {size: file.size, type: file.type};\n return fileStat;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport * as fs from 'fs/promises';\n\nimport {ApiClient} from '../_api_client';\nimport {FileStat, Uploader} from '../_uploader';\nimport {\n MAX_CHUNK_SIZE,\n getBlobStat,\n uploadBlob,\n} from '../cross/_cross_uploader';\nimport {File, HttpResponse} from '../types';\n\nexport class NodeUploader implements Uploader {\n async stat(file: string | Blob): Promise {\n const fileStat: FileStat = {size: 0, type: undefined};\n if (typeof file === 'string') {\n const originalStat = await fs.stat(file);\n fileStat.size = originalStat.size;\n fileStat.type = this.inferMimeType(file);\n return fileStat;\n } else {\n return await getBlobStat(file);\n }\n }\n\n async upload(\n file: string | Blob,\n uploadUrl: string,\n apiClient: ApiClient,\n ): Promise {\n if (typeof file === 'string') {\n return await this.uploadFileFromPath(file, uploadUrl, apiClient);\n } else {\n return uploadBlob(file, uploadUrl, apiClient);\n }\n }\n\n /**\n * Infers the MIME type of a file based on its extension.\n *\n * @param filePath The path to the file.\n * @returns The MIME type of the file, or undefined if it cannot be inferred.\n */\n private inferMimeType(filePath: string): string | undefined {\n // Get the file extension.\n const fileExtension = filePath.slice(filePath.lastIndexOf('.') + 1);\n\n // Create a map of file extensions to MIME types.\n const mimeTypes: {[key: string]: string} = {\n 'aac': 'audio/aac',\n 'abw': 'application/x-abiword',\n 'arc': 'application/x-freearc',\n 'avi': 'video/x-msvideo',\n 'azw': 'application/vnd.amazon.ebook',\n 'bin': 'application/octet-stream',\n 'bmp': 'image/bmp',\n 'bz': 'application/x-bzip',\n 'bz2': 'application/x-bzip2',\n 'csh': 'application/x-csh',\n 'css': 'text/css',\n 'csv': 'text/csv',\n 'doc': 'application/msword',\n 'docx':\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n 'eot': 'application/vnd.ms-fontobject',\n 'epub': 'application/epub+zip',\n 'gz': 'application/gzip',\n 'gif': 'image/gif',\n 'htm': 'text/html',\n 'html': 'text/html',\n 'ico': 'image/vnd.microsoft.icon',\n 'ics': 'text/calendar',\n 'jar': 'application/java-archive',\n 'jpeg': 'image/jpeg',\n 'jpg': 'image/jpeg',\n 'js': 'text/javascript',\n 'json': 'application/json',\n 'jsonld': 'application/ld+json',\n 'kml': 'application/vnd.google-earth.kml+xml',\n 'kmz': 'application/vnd.google-earth.kmz+xml',\n 'mjs': 'text/javascript',\n 'mp3': 'audio/mpeg',\n 'mp4': 'video/mp4',\n 'mpeg': 'video/mpeg',\n 'mpkg': 'application/vnd.apple.installer+xml',\n 'odt': 'application/vnd.oasis.opendocument.text',\n 'oga': 'audio/ogg',\n 'ogv': 'video/ogg',\n 'ogx': 'application/ogg',\n 'opus': 'audio/opus',\n 'otf': 'font/otf',\n 'png': 'image/png',\n 'pdf': 'application/pdf',\n 'php': 'application/x-httpd-php',\n 'ppt': 'application/vnd.ms-powerpoint',\n 'pptx':\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n 'rar': 'application/vnd.rar',\n 'rtf': 'application/rtf',\n 'sh': 'application/x-sh',\n 'svg': 'image/svg+xml',\n 'swf': 'application/x-shockwave-flash',\n 'tar': 'application/x-tar',\n 'tif': 'image/tiff',\n 'tiff': 'image/tiff',\n 'ts': 'video/mp2t',\n 'ttf': 'font/ttf',\n 'txt': 'text/plain',\n 'vsd': 'application/vnd.visio',\n 'wav': 'audio/wav',\n 'weba': 'audio/webm',\n 'webm': 'video/webm',\n 'webp': 'image/webp',\n 'woff': 'font/woff',\n 'woff2': 'font/woff2',\n 'xhtml': 'application/xhtml+xml',\n 'xls': 'application/vnd.ms-excel',\n 'xlsx':\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n 'xml': 'application/xml',\n 'xul': 'application/vnd.mozilla.xul+xml',\n 'zip': 'application/zip',\n '3gp': 'video/3gpp',\n '3g2': 'video/3gpp2',\n '7z': 'application/x-7z-compressed',\n };\n\n // Look up the MIME type based on the file extension.\n const mimeType = mimeTypes[fileExtension.toLowerCase()];\n\n // Return the MIME type.\n return mimeType;\n }\n\n private async uploadFileFromPath(\n file: string,\n uploadUrl: string,\n apiClient: ApiClient,\n ): Promise {\n let fileSize = 0;\n let offset = 0;\n let response: HttpResponse = new HttpResponse(new Response());\n let uploadCommand = 'upload';\n let fileHandle: fs.FileHandle | undefined;\n try {\n fileHandle = await fs.open(file, 'r');\n if (!fileHandle) {\n throw new Error(`Failed to open file`);\n }\n fileSize = (await fileHandle.stat()).size;\n while (offset < fileSize) {\n const chunkSize = Math.min(MAX_CHUNK_SIZE, fileSize - offset);\n if (offset + chunkSize >= fileSize) {\n uploadCommand += ', finalize';\n }\n const buffer = new Uint8Array(chunkSize);\n const {bytesRead: bytesRead} = await fileHandle.read(\n buffer,\n 0,\n chunkSize,\n offset,\n );\n\n if (bytesRead !== chunkSize) {\n throw new Error(\n `Failed to read ${chunkSize} bytes from file at offset ${\n offset\n }. bytes actually read: ${bytesRead}`,\n );\n }\n\n const chunk = new Blob([buffer]);\n response = await apiClient.request({\n path: '',\n body: chunk,\n httpMethod: 'POST',\n httpOptions: {\n apiVersion: '',\n baseUrl: uploadUrl,\n headers: {\n 'X-Goog-Upload-Command': uploadCommand,\n 'X-Goog-Upload-Offset': String(offset),\n 'Content-Length': String(bytesRead),\n },\n },\n });\n offset += bytesRead;\n // The `x-goog-upload-status` header field can be `active`, `final` and\n //`cancelled` in resposne.\n if (response?.headers?.['x-goog-upload-status'] !== 'active') {\n break;\n }\n if (fileSize <= offset) {\n throw new Error(\n 'All content has been uploaded, but the upload status is not finalized.',\n );\n }\n }\n const responseJson = (await response?.json()) as Record<\n string,\n File | unknown\n >;\n if (response?.headers?.['x-goog-upload-status'] !== 'final') {\n throw new Error(\n 'Failed to upload file: Upload status is not finalized.',\n );\n }\n return responseJson['file'] as File;\n } finally {\n // Ensure the file handle is always closed\n if (fileHandle) {\n await fileHandle.close();\n }\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {GoogleAuthOptions} from 'google-auth-library';\n\nimport {ApiClient} from '../_api_client';\nimport {Caches} from '../caches';\nimport {Chats} from '../chats';\nimport {GoogleGenAIOptions} from '../client';\nimport {Files} from '../files';\nimport {Live} from '../live';\nimport {Models} from '../models';\nimport {NodeAuth} from '../node/_node_auth';\nimport {NodeWebSocketFactory} from '../node/_node_websocket';\nimport {Operations} from '../operations';\n\nimport {NodeUploader} from './_node_uploader';\n\nconst LANGUAGE_LABEL_PREFIX = 'gl-node/';\n\n/**\n * The Google GenAI SDK.\n *\n * @remarks\n * Provides access to the GenAI features through either the {@link\n * https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API} or\n * the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI\n * API}.\n *\n * The {@link GoogleGenAIOptions.vertexai} value determines which of the API\n * services to use.\n *\n * When using the Gemini API, a {@link GoogleGenAIOptions.apiKey} must also be\n * set. When using Vertex AI, both {@link GoogleGenAIOptions.project} and {@link\n * GoogleGenAIOptions.location} must be set, or a {@link\n * GoogleGenAIOptions.apiKey} must be set when using Express Mode.\n *\n * Explicitly passed in values in {@link GoogleGenAIOptions} will always take\n * precedence over environment variables. If both project/location and api_key\n * exist in the environment variables, the project/location will be used.\n *\n * @example\n * Initializing the SDK for using the Gemini API:\n * ```ts\n * import {GoogleGenAI} from '@google/genai';\n * const ai = new GoogleGenAI({apiKey: 'GEMINI_API_KEY'});\n * ```\n *\n * @example\n * Initializing the SDK for using the Vertex AI API:\n * ```ts\n * import {GoogleGenAI} from '@google/genai';\n * const ai = new GoogleGenAI({\n * vertexai: true,\n * project: 'PROJECT_ID',\n * location: 'PROJECT_LOCATION'\n * });\n * ```\n *\n */\nexport class GoogleGenAI {\n protected readonly apiClient: ApiClient;\n private readonly apiKey?: string;\n public readonly vertexai: boolean;\n private readonly googleAuthOptions?: GoogleAuthOptions;\n private readonly project?: string;\n private readonly location?: string;\n private readonly apiVersion?: string;\n readonly models: Models;\n readonly live: Live;\n readonly chats: Chats;\n readonly caches: Caches;\n readonly files: Files;\n readonly operations: Operations;\n\n constructor(options: GoogleGenAIOptions) {\n // Validate explicitly set initializer values.\n if ((options.project || options.location) && options.apiKey) {\n throw new Error(\n 'Project/location and API key are mutually exclusive in the client initializer.',\n );\n }\n\n this.vertexai =\n options.vertexai ?? getBooleanEnv('GOOGLE_GENAI_USE_VERTEXAI') ?? false;\n const envApiKey = getEnv('GOOGLE_API_KEY');\n const envProject = getEnv('GOOGLE_CLOUD_PROJECT');\n const envLocation = getEnv('GOOGLE_CLOUD_LOCATION');\n\n this.apiKey = options.apiKey ?? envApiKey;\n this.project = options.project ?? envProject;\n this.location = options.location ?? envLocation;\n\n // Handle when to use Vertex AI in express mode (api key)\n if (options.vertexai) {\n // Explicit api_key and explicit project/location already handled above.\n if ((envProject || envLocation) && options.apiKey) {\n // Explicit api_key takes precedence over implicit project/location.\n console.debug(\n 'The user provided Vertex AI API key will take precedence over' +\n ' the project/location from the environment variables.',\n );\n this.project = undefined;\n this.location = undefined;\n } else if ((options.project || options.location) && envApiKey) {\n // Explicit project/location takes precedence over implicit api_key.\n console.debug(\n 'The user provided project/location will take precedence over' +\n ' the API key from the environment variables.',\n );\n this.apiKey = undefined;\n } else if ((envProject || envLocation) && envApiKey) {\n // Implicit project/location takes precedence over implicit api_key.\n console.debug(\n 'The project/location from the environment variables will take' +\n ' precedence over the API key from the environment variables.',\n );\n this.apiKey = undefined;\n }\n }\n\n this.apiVersion = options.apiVersion;\n const auth = new NodeAuth({\n apiKey: this.apiKey,\n googleAuthOptions: options.googleAuthOptions,\n });\n this.apiClient = new ApiClient({\n auth: auth,\n project: this.project,\n location: this.location,\n apiVersion: this.apiVersion,\n apiKey: this.apiKey,\n vertexai: this.vertexai,\n httpOptions: options.httpOptions,\n userAgentExtra: LANGUAGE_LABEL_PREFIX + process.version,\n uploader: new NodeUploader(),\n });\n this.models = new Models(this.apiClient);\n this.live = new Live(this.apiClient, auth, new NodeWebSocketFactory());\n this.chats = new Chats(this.models, this.apiClient);\n this.caches = new Caches(this.apiClient);\n this.files = new Files(this.apiClient);\n this.operations = new Operations(this.apiClient);\n }\n}\n\nfunction getEnv(env: string): string | undefined {\n return process?.env?.[env]?.trim() ?? undefined;\n}\n\nfunction getBooleanEnv(env: string): boolean {\n return stringToBoolean(getEnv(env));\n}\n\nfunction stringToBoolean(str?: string): boolean {\n if (str === undefined) {\n return false;\n }\n return str.toLowerCase() === 'true';\n}\n"],"names":["partToMldev","common.getValueByPath","common.setValueByPath","contentToMldev","functionDeclarationToMldev","googleSearchToMldev","dynamicRetrievalConfigToMldev","googleSearchRetrievalToMldev","toolToMldev","functionCallingConfigToMldev","toolConfigToMldev","t.tContents","t.tContent","t.tCachesModel","t.tCachedContentName","partToVertex","contentToVertex","schemaToVertex","functionDeclarationToVertex","googleSearchToVertex","dynamicRetrievalConfigToVertex","googleSearchRetrievalToVertex","toolToVertex","functionCallingConfigToVertex","toolConfigToVertex","PagedItem","Outcome","Language","Type","HarmCategory","HarmBlockMethod","HarmBlockThreshold","Mode","FinishReason","HarmProbability","HarmSeverity","BlockedReason","TrafficType","Modality","MediaResolution","FeatureSelectionPreference","DynamicRetrievalConfigMode","FunctionCallingConfigMode","SafetyFilterLevel","PersonGeneration","ImagePromptLanguage","FileState","FileSource","MaskReferenceMode","ControlReferenceType","SubjectReferenceType","MediaModality","StartSensitivity","EndSensitivity","ActivityHandling","TurnCoverage","converters.createCachedContentParametersToVertex","common.formatMap","converters.cachedContentFromVertex","converters.createCachedContentParametersToMldev","converters.cachedContentFromMldev","converters.getCachedContentParametersToVertex","converters.getCachedContentParametersToMldev","converters.deleteCachedContentParametersToVertex","converters.deleteCachedContentResponseFromVertex","types.DeleteCachedContentResponse","converters.deleteCachedContentParametersToMldev","converters.deleteCachedContentResponseFromMldev","converters.updateCachedContentParametersToVertex","converters.updateCachedContentParametersToMldev","converters.listCachedContentsParametersToVertex","converters.listCachedContentsResponseFromVertex","types.ListCachedContentsResponse","converters.listCachedContentsParametersToMldev","converters.listCachedContentsResponseFromMldev","t.tFileName","converters.fileFromMldev","converters.listFilesParametersToMldev","converters.listFilesResponseFromMldev","types.ListFilesResponse","converters.createFileParametersToMldev","converters.createFileResponseFromMldev","types.CreateFileResponse","converters.getFileParametersToMldev","converters.deleteFileParametersToMldev","converters.deleteFileResponseFromMldev","types.DeleteFileResponse","t.tTools","t.tTool","t.tModel","partFromMldev","partFromVertex","contentFromMldev","contentFromVertex","t.tSchema","t.tSpeechConfig","t.tContentsForEmbed","t.tBytes","videoFromMldev","generatedVideoFromMldev","generateVideosResponseFromMldev","generateVideosOperationFromMldev","videoFromVertex","generatedVideoFromVertex","generateVideosResponseFromVertex","generateVideosOperationFromVertex","converters.liveServerMessageFromVertex","converters.liveServerMessageFromMldev","types.Modality","converters.liveConnectParametersToVertex","converters.liveConnectParametersToMldev","converters.generateContentParametersToVertex","converters.generateContentResponseFromVertex","types.GenerateContentResponse","converters.generateContentParametersToMldev","converters.generateContentResponseFromMldev","converters.embedContentParametersToVertex","converters.embedContentResponseFromVertex","types.EmbedContentResponse","converters.embedContentParametersToMldev","converters.embedContentResponseFromMldev","converters.generateImagesParametersToVertex","converters.generateImagesResponseFromVertex","types.GenerateImagesResponse","converters.generateImagesParametersToMldev","converters.generateImagesResponseFromMldev","converters.getModelParametersToVertex","converters.modelFromVertex","converters.getModelParametersToMldev","converters.modelFromMldev","converters.countTokensParametersToVertex","converters.countTokensResponseFromVertex","types.CountTokensResponse","converters.countTokensParametersToMldev","converters.countTokensResponseFromMldev","converters.computeTokensParametersToVertex","converters.computeTokensResponseFromVertex","types.ComputeTokensResponse","converters.generateVideosParametersToVertex","converters.generateVideosOperationFromVertex","converters.generateVideosParametersToMldev","converters.generateVideosOperationFromMldev","converters.getOperationParametersToVertex","converters.getOperationParametersToMldev","converters.fetchPredictOperationParametersToVertex","GoogleAuth","NodeWs","fs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AAIG;MAEU,UAAU,CAAA;AAAG;AAEV,SAAA,SAAS,CACvB,cAAsB,EACtB,QAAiC,EAAA;;IAGjC,MAAM,KAAK,GAAG,cAAc;;IAG5B,OAAO,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,GAAG,KAAI;AAClD,QAAA,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE;AACvD,YAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC;;AAE3B,YAAA,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE;AAClE;AAAM,aAAA;;AAEL,YAAA,M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,GAAG,KAAK,SAAS,EAAE;AACrB,QAAA,OAAO,KAAK;AACb;AACD,IAAA,OAAO,GAAG,CAAC,WAAW,EAAE,KAAK,MAAM;AACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} +\ No newline at end of file +diff --git a/dist/node/node.d.ts b/dist/node/node.d.ts +index bda6f4ea8a30ee3c3832e596860b15d7d5df2742..66d22e2528b69765eac7c0f57b77b1e70f2f0108 100644 +--- a/dist/node/node.d.ts ++++ b/dist/node/node.d.ts +@@ -46,11 +46,11 @@ declare class ApiClient { + private shouldPrependVertexProjectPath; + request(request: HttpRequest): Promise; + private patchHttpOptions; +- requestStream(request: HttpRequest): Promise; ++ requestStream(request: HttpRequest): Promise>; + private includeExtraHttpOptionsToRequestInit; + private unaryApiCall; + private streamApiCall; +- processStreamResponse(response: Response): AsyncGenerator; ++ processStreamResponse(response: Response): AsyncGenerator; + private apiCall; + getDefaultHeaders(): Record; + private getHeadersInternal; +@@ -237,8 +237,8 @@ export declare class Caches extends BaseModule { + * + * @remarks + * Context caching is only supported for specific models. See [Gemini +- * Developer API reference] (https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac) +- * and [Vertex AI reference] (https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models) ++ * Developer API reference](https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac) ++ * and [Vertex AI reference](https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models) + * for more information. + * + * @param params - The parameters for the create request. +@@ -540,7 +540,7 @@ export declare interface ContentEmbeddingStatistics { + tokenCount?: number; + } + +-export declare type ContentListUnion = ContentUnion[] | ContentUnion; ++export declare type ContentListUnion = Content | Content[] | PartUnion | PartUnion[]; + + export declare type ContentUnion = Content | PartUnion[] | PartUnion; + +@@ -897,6 +897,14 @@ export declare interface ExecutableCode { + language?: Language; + } + ++/** Options for feature selection preference. */ ++export declare enum FeatureSelectionPreference { ++ FEATURE_SELECTION_PREFERENCE_UNSPECIFIED = "FEATURE_SELECTION_PREFERENCE_UNSPECIFIED", ++ PRIORITIZE_QUALITY = "PRIORITIZE_QUALITY", ++ BALANCED = "BALANCED", ++ PRIORITIZE_COST = "PRIORITIZE_COST" ++} ++ + export declare interface FetchPredictOperationConfig { + /** Used to override HTTP request options. */ + httpOptions?: HttpOptions; +@@ -1239,6 +1247,9 @@ export declare interface GenerateContentConfig { + /** Configuration for model router requests. + */ + routingConfig?: GenerationConfigRoutingConfig; ++ /** Configuration for model selection. ++ */ ++ modelSelectionConfig?: ModelSelectionConfig; + /** Safety settings in the request to block unsafe content in the + response. + */ +@@ -1989,6 +2000,8 @@ export declare interface HttpOptions { + headers?: Record; + /** Timeout for the request in milliseconds. */ + timeout?: number; ++ /** Signal for the request. */ ++ signal?: AbortSignal; + } + + /** +@@ -2140,17 +2153,20 @@ export declare class Live { + @experimental + + @remarks +- If using the Gemini API, Live is currently only supported behind API +- version `v1alpha`. Ensure that the API version is set to `v1alpha` when +- initializing the SDK if relying on the Gemini API. + + @param params - The parameters for establishing a connection to the model. + @return A live session. + + @example + ```ts ++ let model: string; ++ if (GOOGLE_GENAI_USE_VERTEXAI) { ++ model = 'gemini-2.0-flash-live-preview-04-09'; ++ } else { ++ model = 'gemini-2.0-flash-live-001'; ++ } + const session = await ai.live.connect({ +- model: 'gemini-2.0-flash-exp', ++ model: model, + config: { + responseModalities: [Modality.AUDIO], + }, +@@ -2265,7 +2281,7 @@ export declare interface LiveClientSetup { + /** The user provided system instructions for the model. + Note: only text should be used in parts and content in each part will be + in a separate paragraph. */ +- systemInstruction?: Content; ++ systemInstruction?: ContentUnion; + /** A list of `Tools` the model may use to generate the next response. + + A `Tool` is a piece of code that enables the system to interact with +@@ -2313,7 +2329,7 @@ export declare interface LiveConnectConfig { + /** The user provided system instructions for the model. + Note: only text should be used in parts and content in each part will be + in a separate paragraph. */ +- systemInstruction?: Content; ++ systemInstruction?: ContentUnion; + /** A list of `Tools` the model may use to generate the next response. + + A `Tool` is a piece of code that enables the system to interact with +@@ -2811,6 +2827,12 @@ export declare class Models extends BaseModule { + generateVideos(params: types.GenerateVideosParameters): Promise; + } + ++/** Config for model selection. */ ++export declare interface ModelSelectionConfig { ++ /** Options for feature selection preference. */ ++ featureSelectionPreference?: FeatureSelectionPreference; ++} ++ + /** Parameters for the get method of the operations module. */ + export declare interface OperationGetParameters { + /** The operation to be retrieved. */ +@@ -3018,6 +3040,54 @@ export declare interface PrebuiltVoiceConfig { + voiceName?: string; + } + ++/** Specifies the context retrieval config. */ ++export declare interface RagRetrievalConfig { ++ /** Optional. Config for filters. */ ++ filter?: RagRetrievalConfigFilter; ++ /** Optional. Config for Hybrid Search. */ ++ hybridSearch?: RagRetrievalConfigHybridSearch; ++ /** Optional. Config for ranking and reranking. */ ++ ranking?: RagRetrievalConfigRanking; ++ /** Optional. The number of contexts to retrieve. */ ++ topK?: number; ++} ++ ++/** Config for filters. */ ++export declare interface RagRetrievalConfigFilter { ++ /** Optional. String for metadata filtering. */ ++ metadataFilter?: string; ++ /** Optional. Only returns contexts with vector distance smaller than the threshold. */ ++ vectorDistanceThreshold?: number; ++ /** Optional. Only returns contexts with vector similarity larger than the threshold. */ ++ vectorSimilarityThreshold?: number; ++} ++ ++/** Config for Hybrid Search. */ ++export declare interface RagRetrievalConfigHybridSearch { ++ /** Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally. */ ++ alpha?: number; ++} ++ ++/** Config for ranking and reranking. */ ++export declare interface RagRetrievalConfigRanking { ++ /** Optional. Config for LlmRanker. */ ++ llmRanker?: RagRetrievalConfigRankingLlmRanker; ++ /** Optional. Config for Rank Service. */ ++ rankService?: RagRetrievalConfigRankingRankService; ++} ++ ++/** Config for LlmRanker. */ ++export declare interface RagRetrievalConfigRankingLlmRanker { ++ /** Optional. The model name used for ranking. Format: `gemini-1.5-pro` */ ++ modelName?: string; ++} ++ ++/** Config for Rank Service. */ ++export declare interface RagRetrievalConfigRankingRankService { ++ /** Optional. The model name of the rank service. Format: `semantic-ranker-512@latest` */ ++ modelName?: string; ++} ++ + /** A raw reference image. + + A raw reference image represents the base image to edit, provided by the user. +@@ -3340,8 +3410,14 @@ export declare class Session { + + @example + ```ts ++ let model: string; ++ if (GOOGLE_GENAI_USE_VERTEXAI) { ++ model = 'gemini-2.0-flash-live-preview-04-09'; ++ } else { ++ model = 'gemini-2.0-flash-live-001'; ++ } + const session = await ai.live.connect({ +- model: 'gemini-2.0-flash-exp', ++ model: model, + config: { + responseModalities: [Modality.AUDIO], + } +@@ -3384,6 +3460,10 @@ export declare interface SpeechConfig { + /** The configuration for the speaker to use. + */ + voiceConfig?: VoiceConfig; ++ /** Language code (ISO 639. e.g. en-US) for the speech synthesization. ++ Only available for Live API. ++ */ ++ languageCode?: string; + } + + export declare type SpeechConfigUnion = SpeechConfig | string; +@@ -3591,6 +3671,7 @@ declare namespace types { + TrafficType, + Modality, + MediaResolution, ++ FeatureSelectionPreference, + DynamicRetrievalConfigMode, + FunctionCallingConfigMode, + SafetyFilterLevel, +@@ -3617,6 +3698,7 @@ declare namespace types { + Content, + HttpOptions, + Schema, ++ ModelSelectionConfig, + SafetySetting, + FunctionDeclaration, + GoogleSearch, +@@ -3624,6 +3706,12 @@ declare namespace types { + GoogleSearchRetrieval, + VertexAISearch, + VertexRagStoreRagResource, ++ RagRetrievalConfigFilter, ++ RagRetrievalConfigHybridSearch, ++ RagRetrievalConfigRankingLlmRanker, ++ RagRetrievalConfigRankingRankService, ++ RagRetrievalConfigRanking, ++ RagRetrievalConfig, + VertexRagStore, + Retrieval, + ToolCodeExecution, +@@ -3756,6 +3844,7 @@ declare namespace types { + SessionResumptionConfig, + SlidingWindow, + ContextWindowCompressionConfig, ++ AudioTranscriptionConfig, + LiveClientSetup, + LiveClientContent, + ActivityStart, +@@ -3763,7 +3852,6 @@ declare namespace types { + LiveClientRealtimeInput, + LiveClientToolResponse, + LiveClientMessage, +- AudioTranscriptionConfig, + LiveConnectConfig, + LiveConnectParameters, + CreateChatParameters, +@@ -3916,6 +4004,8 @@ export declare interface VertexRagStore { + ragCorpora?: string[]; + /** Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. */ + ragResources?: VertexRagStoreRagResource[]; ++ /** Optional. The retrieval config for the Rag query. */ ++ ragRetrievalConfig?: RagRetrievalConfig; + /** Optional. Number of top k results to return from the selected corpora. */ + similarityTopK?: number; + /** Optional. Only return results with vector distance smaller than the threshold. */ +diff --git a/dist/node/src/_api_client.d.ts b/dist/node/src/_api_client.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..aa103389ef39fbd7e0e33ba5232bfa113f20b373 +--- /dev/null ++++ b/dist/node/src/_api_client.d.ts +@@ -0,0 +1,161 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { Auth } from './_auth'; ++import { Uploader } from './_uploader'; ++import { File, HttpOptions, HttpResponse, UploadFileConfig } from './types'; ++export declare const SDK_VERSION = "0.8.0"; ++/** ++ * Client errors raised by the GenAI API. ++ */ ++export declare class ClientError extends Error { ++ constructor(message: string, stackTrace?: string); ++} ++/** ++ * Server errors raised by the GenAI API. ++ */ ++export declare class ServerError extends Error { ++ constructor(message: string, stackTrace?: string); ++} ++/** ++ * Options for initializing the ApiClient. The ApiClient uses the parameters ++ * for authentication purposes as well as to infer if SDK should send the ++ * request to Vertex AI or Gemini API. ++ */ ++export interface ApiClientInitOptions { ++ /** ++ * The object used for adding authentication headers to API requests. ++ */ ++ auth: Auth; ++ /** ++ * The uploader to use for uploading files. This field is required for ++ * creating a client, will be set through the Node_client or Web_client. ++ */ ++ uploader: Uploader; ++ /** ++ * Optional. The Google Cloud project ID for Vertex AI users. ++ * It is not the numeric project name. ++ * If not provided, SDK will try to resolve it from runtime environment. ++ */ ++ project?: string; ++ /** ++ * Optional. The Google Cloud project location for Vertex AI users. ++ * If not provided, SDK will try to resolve it from runtime environment. ++ */ ++ location?: string; ++ /** ++ * The API Key. This is required for Gemini API users. ++ */ ++ apiKey?: string; ++ /** ++ * Optional. Set to true if you intend to call Vertex AI endpoints. ++ * If unset, default SDK behavior is to call Gemini API. ++ */ ++ vertexai?: boolean; ++ /** ++ * Optional. The API version for the endpoint. ++ * If unset, SDK will choose a default api version. ++ */ ++ apiVersion?: string; ++ /** ++ * Optional. A set of customizable configuration for HTTP requests. ++ */ ++ httpOptions?: HttpOptions; ++ /** ++ * Optional. An extra string to append at the end of the User-Agent header. ++ * ++ * This can be used to e.g specify the runtime and its version. ++ */ ++ userAgentExtra?: string; ++} ++/** ++ * Represents the necessary information to send a request to an API endpoint. ++ * This interface defines the structure for constructing and executing HTTP ++ * requests. ++ */ ++export interface HttpRequest { ++ /** ++ * URL path from the modules, this path is appended to the base API URL to ++ * form the complete request URL. ++ * ++ * If you wish to set full URL, use httpOptions.baseUrl instead. Example to ++ * set full URL in the request: ++ * ++ * const request: HttpRequest = { ++ * path: '', ++ * httpOptions: { ++ * baseUrl: 'https://', ++ * apiVersion: '', ++ * }, ++ * httpMethod: 'GET', ++ * }; ++ * ++ * The result URL will be: https:// ++ * ++ */ ++ path: string; ++ /** ++ * Optional query parameters to be appended to the request URL. ++ */ ++ queryParams?: Record; ++ /** ++ * Optional request body in json string or Blob format, GET request doesn't ++ * need a request body. ++ */ ++ body?: string | Blob; ++ /** ++ * The HTTP method to be used for the request. ++ */ ++ httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE'; ++ /** ++ * Optional set of customizable configuration for HTTP requests. ++ */ ++ httpOptions?: HttpOptions; ++} ++/** ++ * The ApiClient class is used to send requests to the Gemini API or Vertex AI ++ * endpoints. ++ */ ++export declare class ApiClient { ++ readonly clientOptions: ApiClientInitOptions; ++ constructor(opts: ApiClientInitOptions); ++ isVertexAI(): boolean; ++ getProject(): string | undefined; ++ getLocation(): string | undefined; ++ getApiVersion(): string; ++ getBaseUrl(): string; ++ getRequestUrl(): string; ++ getHeaders(): Record; ++ private getRequestUrlInternal; ++ getBaseResourcePath(): string; ++ getApiKey(): string | undefined; ++ getWebsocketBaseUrl(): string; ++ setBaseUrl(url: string): void; ++ private constructUrl; ++ private shouldPrependVertexProjectPath; ++ request(request: HttpRequest): Promise; ++ private patchHttpOptions; ++ requestStream(request: HttpRequest): Promise>; ++ private includeExtraHttpOptionsToRequestInit; ++ private unaryApiCall; ++ private streamApiCall; ++ processStreamResponse(response: Response): AsyncGenerator; ++ private apiCall; ++ getDefaultHeaders(): Record; ++ private getHeadersInternal; ++ /** ++ * Uploads a file asynchronously using Gemini API only, this is not supported ++ * in Vertex AI. ++ * ++ * @param file The string path to the file to be uploaded or a Blob object. ++ * @param config Optional parameters specified in the `UploadFileConfig` ++ * interface. @see {@link UploadFileConfig} ++ * @return A promise that resolves to a `File` object. ++ * @throws An error if called on a Vertex AI client. ++ * @throws An error if the `mimeType` is not provided and can not be inferred, ++ */ ++ uploadFile(file: string | Blob, config?: UploadFileConfig): Promise; ++ private fetchUploadUrl; ++} +diff --git a/dist/node/src/_auth.d.ts b/dist/node/src/_auth.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..de021e522e6d5b527e198cea1212ab62586f32b6 +--- /dev/null ++++ b/dist/node/src/_auth.d.ts +@@ -0,0 +1,16 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++/** ++ * The Auth interface is used to authenticate with the API service. ++ */ ++export interface Auth { ++ /** ++ * Sets the headers needed to authenticate with the API service. ++ * ++ * @param headers - The Headers object that will be updated with the authentication headers. ++ */ ++ addAuthHeaders(headers: Headers): Promise; ++} +diff --git a/dist/node/src/_common.d.ts b/dist/node/src/_common.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..98ad405d7bb8d9c2f5addd076cf8ff7f46c9433d +--- /dev/null ++++ b/dist/node/src/_common.d.ts +@@ -0,0 +1,10 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++export declare class BaseModule { ++} ++export declare function formatMap(templateString: string, valueMap: Record): string; ++export declare function setValueByPath(data: Record, keys: string[], value: unknown): void; ++export declare function getValueByPath(data: unknown, keys: string[]): unknown; +diff --git a/dist/node/src/_transformers.d.ts b/dist/node/src/_transformers.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..956b7ae202abfa3fecf2cc5512b5766cc7561a9c +--- /dev/null ++++ b/dist/node/src/_transformers.d.ts +@@ -0,0 +1,23 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from './_api_client'; ++import * as types from './types'; ++export declare function tModel(apiClient: ApiClient, model: string | unknown): string; ++export declare function tCachesModel(apiClient: ApiClient, model: string | unknown): string; ++export declare function tPart(apiClient: ApiClient, origin?: types.PartUnion | null): types.Part; ++export declare function tParts(apiClient: ApiClient, origin?: types.PartListUnion | null): types.Part[]; ++export declare function tContent(apiClient: ApiClient, origin?: types.ContentUnion): types.Content; ++export declare function tContentsForEmbed(apiClient: ApiClient, origin: types.ContentListUnion): types.ContentUnion[]; ++export declare function tContents(apiClient: ApiClient, origin?: types.ContentListUnion): types.Content[]; ++export declare function processSchema(apiClient: ApiClient, schema: types.Schema): void; ++export declare function tSchema(apiClient: ApiClient, schema: types.Schema): types.Schema; ++export declare function tSpeechConfig(apiClient: ApiClient, speechConfig: types.SpeechConfigUnion): types.SpeechConfig; ++export declare function tTool(apiClient: ApiClient, tool: types.Tool): types.Tool; ++export declare function tTools(apiClient: ApiClient, tool: types.Tool[] | unknown): types.Tool[]; ++export declare function tCachedContentName(apiClient: ApiClient, name: string | unknown): string; ++export declare function tTuningJobStatus(apiClient: ApiClient, status: string | unknown): string; ++export declare function tBytes(apiClient: ApiClient, fromImageBytes: string | unknown): string; ++export declare function tFileName(apiClient: ApiClient, fromName: string | unknown): string; +diff --git a/dist/node/src/_uploader.d.ts b/dist/node/src/_uploader.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..4748f50fa4b52ac0406aa9c5d41efca34577b68a +--- /dev/null ++++ b/dist/node/src/_uploader.d.ts +@@ -0,0 +1,45 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from './_api_client'; ++import { File } from './types'; ++/** ++ * Represents the size and mimeType of a file. The information is used to ++ * request the upload URL from the https://generativelanguage.googleapis.com/upload/v1beta/files endpoint. ++ * This interface defines the structure for constructing and executing HTTP ++ * requests. ++ */ ++export interface FileStat { ++ /** ++ * The size of the file in bytes. ++ */ ++ size: number; ++ /** ++ * The MIME type of the file. ++ */ ++ type: string | undefined; ++} ++export interface Uploader { ++ /** ++ * Uploads a file to the given upload url. ++ * ++ * @param file The file to upload. file is in string type or a Blob. ++ * @param uploadUrl The upload URL as a string is where the file will be ++ * uploaded to. The uploadUrl must be a url that was returned by the ++ * https://generativelanguage.googleapis.com/upload/v1beta/files endpoint ++ * @param apiClient The ApiClient to use for uploading. ++ * @return A Promise that resolves to types.File. ++ */ ++ upload(file: string | Blob, uploadUrl: string, apiClient: ApiClient): Promise; ++ /** ++ * Returns the file's mimeType and the size of a given file. If the file is a ++ * string path, the file type is determined by the file extension. If the ++ * file's type cannot be determined, the type will be set to undefined. ++ * ++ * @param file The file to get the stat for. Can be a string path or a Blob. ++ * @return A Promise that resolves to the file stat of the given file. ++ */ ++ stat(file: string | Blob): Promise; ++} +diff --git a/dist/node/src/_websocket.d.ts b/dist/node/src/_websocket.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..f6902022c8d744f3044b8785deaae54bcdb013d1 +--- /dev/null ++++ b/dist/node/src/_websocket.d.ts +@@ -0,0 +1,31 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++export interface WebSocketCallbacks { ++ onopen: () => void; ++ onerror: (e: any) => void; ++ onmessage: (e: any) => void; ++ onclose: (e: any) => void; ++} ++export interface WebSocket { ++ /** ++ * Connects the socket to the server. ++ */ ++ connect(): void; ++ /** ++ * Sends a message to the server. ++ */ ++ send(message: string): void; ++ /** ++ * Closes the socket connection. ++ */ ++ close(): void; ++} ++export interface WebSocketFactory { ++ /** ++ * Returns a new WebSocket instance. ++ */ ++ create(url: string, headers: Record, callbacks: WebSocketCallbacks): WebSocket; ++} +diff --git a/dist/node/src/caches.d.ts b/dist/node/src/caches.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..a8ecb7e3ef3f6e75055b6893fa84a07a193b8e78 +--- /dev/null ++++ b/dist/node/src/caches.d.ts +@@ -0,0 +1,95 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from './_api_client'; ++import { BaseModule } from './_common'; ++import { Pager } from './pagers'; ++import * as types from './types'; ++export declare class Caches extends BaseModule { ++ private readonly apiClient; ++ constructor(apiClient: ApiClient); ++ /** ++ * Lists cached content configurations. ++ * ++ * @param params - The parameters for the list request. ++ * @return The paginated results of the list of cached contents. ++ * ++ * @example ++ * ```ts ++ * const cachedContents = await ai.caches.list({config: {'pageSize': 2}}); ++ * for (const cachedContent of cachedContents) { ++ * console.log(cachedContent); ++ * } ++ * ``` ++ */ ++ list: (params?: types.ListCachedContentsParameters) => Promise>; ++ /** ++ * Creates a cached contents resource. ++ * ++ * @remarks ++ * Context caching is only supported for specific models. See [Gemini ++ * Developer API reference](https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac) ++ * and [Vertex AI reference](https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models) ++ * for more information. ++ * ++ * @param params - The parameters for the create request. ++ * @return The created cached content. ++ * ++ * @example ++ * ```ts ++ * const contents = ...; // Initialize the content to cache. ++ * const response = await ai.caches.create({ ++ * model: 'gemini-1.5-flash', ++ * config: { ++ * 'contents': contents, ++ * 'displayName': 'test cache', ++ * 'systemInstruction': 'What is the sum of the two pdfs?', ++ * 'ttl': '86400s', ++ * } ++ * }); ++ * ``` ++ */ ++ create(params: types.CreateCachedContentParameters): Promise; ++ /** ++ * Gets cached content configurations. ++ * ++ * @param params - The parameters for the get request. ++ * @return The cached content. ++ * ++ * @example ++ * ```ts ++ * await ai.caches.get({name: 'gemini-1.5-flash'}); ++ * ``` ++ */ ++ get(params: types.GetCachedContentParameters): Promise; ++ /** ++ * Deletes cached content. ++ * ++ * @param params - The parameters for the delete request. ++ * @return The empty response returned by the API. ++ * ++ * @example ++ * ```ts ++ * await ai.caches.delete({name: 'gemini-1.5-flash'}); ++ * ``` ++ */ ++ delete(params: types.DeleteCachedContentParameters): Promise; ++ /** ++ * Updates cached content configurations. ++ * ++ * @param params - The parameters for the update request. ++ * @return The updated cached content. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.caches.update({ ++ * name: 'gemini-1.5-flash', ++ * config: {'ttl': '7600s'} ++ * }); ++ * ``` ++ */ ++ update(params: types.UpdateCachedContentParameters): Promise; ++ private listInternal; ++} +diff --git a/dist/node/src/chats.d.ts b/dist/node/src/chats.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..01a69818bfd74e3763a49eb107620353e0b1efec +--- /dev/null ++++ b/dist/node/src/chats.d.ts +@@ -0,0 +1,125 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from './_api_client'; ++import { Models } from './models'; ++import * as types from './types'; ++/** ++ * A utility class to create a chat session. ++ */ ++export declare class Chats { ++ private readonly modelsModule; ++ private readonly apiClient; ++ constructor(modelsModule: Models, apiClient: ApiClient); ++ /** ++ * Creates a new chat session. ++ * ++ * @remarks ++ * The config in the params will be used for all requests within the chat ++ * session unless overridden by a per-request `config` in ++ * @see {@link types.SendMessageParameters#config}. ++ * ++ * @param params - Parameters for creating a chat session. ++ * @returns A new chat session. ++ * ++ * @example ++ * ```ts ++ * const chat = ai.chats.create({ ++ * model: 'gemini-2.0-flash' ++ * config: { ++ * temperature: 0.5, ++ * maxOutputTokens: 1024, ++ * } ++ * }); ++ * ``` ++ */ ++ create(params: types.CreateChatParameters): Chat; ++} ++/** ++ * Chat session that enables sending messages to the model with previous ++ * conversation context. ++ * ++ * @remarks ++ * The session maintains all the turns between user and model. ++ */ ++export declare class Chat { ++ private readonly apiClient; ++ private readonly modelsModule; ++ private readonly model; ++ private readonly config; ++ private history; ++ private sendPromise; ++ constructor(apiClient: ApiClient, modelsModule: Models, model: string, config?: types.GenerateContentConfig, history?: types.Content[]); ++ /** ++ * Sends a message to the model and returns the response. ++ * ++ * @remarks ++ * This method will wait for the previous message to be processed before ++ * sending the next message. ++ * ++ * @see {@link Chat#sendMessageStream} for streaming method. ++ * @param params - parameters for sending messages within a chat session. ++ * @returns The model's response. ++ * ++ * @example ++ * ```ts ++ * const chat = ai.chats.create({model: 'gemini-2.0-flash'}); ++ * const response = await chat.sendMessage({ ++ * message: 'Why is the sky blue?' ++ * }); ++ * console.log(response.text); ++ * ``` ++ */ ++ sendMessage(params: types.SendMessageParameters): Promise; ++ /** ++ * Sends a message to the model and returns the response in chunks. ++ * ++ * @remarks ++ * This method will wait for the previous message to be processed before ++ * sending the next message. ++ * ++ * @see {@link Chat#sendMessage} for non-streaming method. ++ * @param params - parameters for sending the message. ++ * @return The model's response. ++ * ++ * @example ++ * ```ts ++ * const chat = ai.chats.create({model: 'gemini-2.0-flash'}); ++ * const response = await chat.sendMessageStream({ ++ * message: 'Why is the sky blue?' ++ * }); ++ * for await (const chunk of response) { ++ * console.log(chunk.text); ++ * } ++ * ``` ++ */ ++ sendMessageStream(params: types.SendMessageParameters): Promise>; ++ /** ++ * Returns the chat history. ++ * ++ * @remarks ++ * The history is a list of contents alternating between user and model. ++ * ++ * There are two types of history: ++ * - The `curated history` contains only the valid turns between user and ++ * model, which will be included in the subsequent requests sent to the model. ++ * - The `comprehensive history` contains all turns, including invalid or ++ * empty model outputs, providing a complete record of the history. ++ * ++ * The history is updated after receiving the response from the model, ++ * for streaming response, it means receiving the last chunk of the response. ++ * ++ * The `comprehensive history` is returned by default. To get the `curated ++ * history`, set the `curated` parameter to `true`. ++ * ++ * @param curated - whether to return the curated history or the comprehensive ++ * history. ++ * @return History contents alternating between user and model for the entire ++ * chat session. ++ */ ++ getHistory(curated?: boolean): types.Content[]; ++ private processStreamResponse; ++ private recordHistory; ++} +diff --git a/dist/node/src/client.d.ts b/dist/node/src/client.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..dcf26703bf6778a79dacee27fe50c0c05cf3d3af +--- /dev/null ++++ b/dist/node/src/client.d.ts +@@ -0,0 +1,118 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { GoogleAuthOptions } from 'google-auth-library'; ++import { ApiClient } from './_api_client'; ++import { Caches } from './caches'; ++import { Chats } from './chats'; ++import { Files } from './files'; ++import { Live } from './live'; ++import { Models } from './models'; ++import { Operations } from './operations'; ++import { HttpOptions } from './types'; ++/** ++ * Google Gen AI SDK's configuration options. ++ * ++ * See {@link GoogleGenAI} for usage samples. ++ */ ++export interface GoogleGenAIOptions { ++ /** ++ * Optional. Determines whether to use the Vertex AI or the Gemini API. ++ * ++ * @remarks ++ * When true, the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI API} will used. ++ * When false, the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API} will be used. ++ * ++ * If unset, default SDK behavior is to use the Gemini API service. ++ */ ++ vertexai?: boolean; ++ /** ++ * Optional. The Google Cloud project ID for Vertex AI clients. ++ * ++ * @remarks ++ * Only supported on Node runtimes, ignored on browser runtimes. ++ */ ++ project?: string; ++ /** ++ * Optional. The Google Cloud project region for Vertex AI clients. ++ * ++ * @remarks ++ * Only supported on Node runtimes, ignored on browser runtimes. ++ * ++ */ ++ location?: string; ++ /** ++ * The API Key, required for Gemini API clients. ++ * ++ * @remarks ++ * Required on browser runtimes. ++ */ ++ apiKey?: string; ++ /** ++ * Optional. The API version to use. ++ * ++ * @remarks ++ * If unset, the default API version will be used. ++ */ ++ apiVersion?: string; ++ /** ++ * Optional. Authentication options defined by the by google-auth-library for Vertex AI clients. ++ * ++ * @remarks ++ * @see {@link https://github.com/googleapis/google-auth-library-nodejs/blob/v9.15.0/src/auth/googleauth.ts | GoogleAuthOptions interface in google-auth-library-nodejs}. ++ * ++ * Only supported on Node runtimes, ignored on browser runtimes. ++ * ++ */ ++ googleAuthOptions?: GoogleAuthOptions; ++ /** ++ * Optional. A set of customizable configuration for HTTP requests. ++ */ ++ httpOptions?: HttpOptions; ++} ++/** ++ * The Google GenAI SDK. ++ * ++ * @remarks ++ * Provides access to the GenAI features through either the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API} ++ * or the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI API}. ++ * ++ * The {@link GoogleGenAIOptions.vertexai} value determines which of the API services to use. ++ * ++ * When using the Gemini API, a {@link GoogleGenAIOptions.apiKey} must also be set, ++ * when using Vertex AI {@link GoogleGenAIOptions.project} and {@link GoogleGenAIOptions.location} must also be set. ++ * ++ * @example ++ * Initializing the SDK for using the Gemini API: ++ * ```ts ++ * import {GoogleGenAI} from '@google/genai'; ++ * const ai = new GoogleGenAI({apiKey: 'GEMINI_API_KEY'}); ++ * ``` ++ * ++ * @example ++ * Initializing the SDK for using the Vertex AI API: ++ * ```ts ++ * import {GoogleGenAI} from '@google/genai'; ++ * const ai = new GoogleGenAI({ ++ * vertexai: true, ++ * project: 'PROJECT_ID', ++ * location: 'PROJECT_LOCATION' ++ * }); ++ * ``` ++ * ++ */ ++export declare class GoogleGenAI { ++ protected readonly apiClient: ApiClient; ++ private readonly apiKey?; ++ readonly vertexai: boolean; ++ private readonly apiVersion?; ++ readonly models: Models; ++ readonly live: Live; ++ readonly chats: Chats; ++ readonly caches: Caches; ++ readonly files: Files; ++ readonly operations: Operations; ++ constructor(options: GoogleGenAIOptions); ++} +diff --git a/dist/node/src/converters/_caches_converters.d.ts b/dist/node/src/converters/_caches_converters.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..5f6b08f412a8df4003a6ff93f36f273e3c6c9d79 +--- /dev/null ++++ b/dist/node/src/converters/_caches_converters.d.ts +@@ -0,0 +1,49 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import * as types from '../types'; ++export declare function partToMldev(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentToMldev(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function schemaToMldev(apiClient: ApiClient, fromObject: types.Schema): Record; ++export declare function functionDeclarationToMldev(apiClient: ApiClient, fromObject: types.FunctionDeclaration): Record; ++export declare function googleSearchToMldev(): Record; ++export declare function dynamicRetrievalConfigToMldev(apiClient: ApiClient, fromObject: types.DynamicRetrievalConfig): Record; ++export declare function googleSearchRetrievalToMldev(apiClient: ApiClient, fromObject: types.GoogleSearchRetrieval): Record; ++export declare function toolToMldev(apiClient: ApiClient, fromObject: types.Tool): Record; ++export declare function functionCallingConfigToMldev(apiClient: ApiClient, fromObject: types.FunctionCallingConfig): Record; ++export declare function toolConfigToMldev(apiClient: ApiClient, fromObject: types.ToolConfig): Record; ++export declare function createCachedContentConfigToMldev(apiClient: ApiClient, fromObject: types.CreateCachedContentConfig, parentObject: Record): Record; ++export declare function createCachedContentParametersToMldev(apiClient: ApiClient, fromObject: types.CreateCachedContentParameters): Record; ++export declare function getCachedContentParametersToMldev(apiClient: ApiClient, fromObject: types.GetCachedContentParameters): Record; ++export declare function deleteCachedContentParametersToMldev(apiClient: ApiClient, fromObject: types.DeleteCachedContentParameters): Record; ++export declare function updateCachedContentConfigToMldev(apiClient: ApiClient, fromObject: types.UpdateCachedContentConfig, parentObject: Record): Record; ++export declare function updateCachedContentParametersToMldev(apiClient: ApiClient, fromObject: types.UpdateCachedContentParameters): Record; ++export declare function listCachedContentsConfigToMldev(apiClient: ApiClient, fromObject: types.ListCachedContentsConfig, parentObject: Record): Record; ++export declare function listCachedContentsParametersToMldev(apiClient: ApiClient, fromObject: types.ListCachedContentsParameters): Record; ++export declare function partToVertex(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentToVertex(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function schemaToVertex(apiClient: ApiClient, fromObject: types.Schema): Record; ++export declare function functionDeclarationToVertex(apiClient: ApiClient, fromObject: types.FunctionDeclaration): Record; ++export declare function googleSearchToVertex(): Record; ++export declare function dynamicRetrievalConfigToVertex(apiClient: ApiClient, fromObject: types.DynamicRetrievalConfig): Record; ++export declare function googleSearchRetrievalToVertex(apiClient: ApiClient, fromObject: types.GoogleSearchRetrieval): Record; ++export declare function toolToVertex(apiClient: ApiClient, fromObject: types.Tool): Record; ++export declare function functionCallingConfigToVertex(apiClient: ApiClient, fromObject: types.FunctionCallingConfig): Record; ++export declare function toolConfigToVertex(apiClient: ApiClient, fromObject: types.ToolConfig): Record; ++export declare function createCachedContentConfigToVertex(apiClient: ApiClient, fromObject: types.CreateCachedContentConfig, parentObject: Record): Record; ++export declare function createCachedContentParametersToVertex(apiClient: ApiClient, fromObject: types.CreateCachedContentParameters): Record; ++export declare function getCachedContentParametersToVertex(apiClient: ApiClient, fromObject: types.GetCachedContentParameters): Record; ++export declare function deleteCachedContentParametersToVertex(apiClient: ApiClient, fromObject: types.DeleteCachedContentParameters): Record; ++export declare function updateCachedContentConfigToVertex(apiClient: ApiClient, fromObject: types.UpdateCachedContentConfig, parentObject: Record): Record; ++export declare function updateCachedContentParametersToVertex(apiClient: ApiClient, fromObject: types.UpdateCachedContentParameters): Record; ++export declare function listCachedContentsConfigToVertex(apiClient: ApiClient, fromObject: types.ListCachedContentsConfig, parentObject: Record): Record; ++export declare function listCachedContentsParametersToVertex(apiClient: ApiClient, fromObject: types.ListCachedContentsParameters): Record; ++export declare function cachedContentFromMldev(apiClient: ApiClient, fromObject: types.CachedContent): Record; ++export declare function deleteCachedContentResponseFromMldev(): Record; ++export declare function listCachedContentsResponseFromMldev(apiClient: ApiClient, fromObject: types.ListCachedContentsResponse): Record; ++export declare function cachedContentFromVertex(apiClient: ApiClient, fromObject: types.CachedContent): Record; ++export declare function deleteCachedContentResponseFromVertex(): Record; ++export declare function listCachedContentsResponseFromVertex(apiClient: ApiClient, fromObject: types.ListCachedContentsResponse): Record; +diff --git a/dist/node/src/converters/_files_converters.d.ts b/dist/node/src/converters/_files_converters.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..ff5196bff283098c33b9e8cd49b37914c4130e92 +--- /dev/null ++++ b/dist/node/src/converters/_files_converters.d.ts +@@ -0,0 +1,19 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import * as types from '../types'; ++export declare function listFilesConfigToMldev(apiClient: ApiClient, fromObject: types.ListFilesConfig, parentObject: Record): Record; ++export declare function listFilesParametersToMldev(apiClient: ApiClient, fromObject: types.ListFilesParameters): Record; ++export declare function fileStatusToMldev(apiClient: ApiClient, fromObject: types.FileStatus): Record; ++export declare function fileToMldev(apiClient: ApiClient, fromObject: types.File): Record; ++export declare function createFileParametersToMldev(apiClient: ApiClient, fromObject: types.CreateFileParameters): Record; ++export declare function getFileParametersToMldev(apiClient: ApiClient, fromObject: types.GetFileParameters): Record; ++export declare function deleteFileParametersToMldev(apiClient: ApiClient, fromObject: types.DeleteFileParameters): Record; ++export declare function fileStatusFromMldev(apiClient: ApiClient, fromObject: types.FileStatus): Record; ++export declare function fileFromMldev(apiClient: ApiClient, fromObject: types.File): Record; ++export declare function listFilesResponseFromMldev(apiClient: ApiClient, fromObject: types.ListFilesResponse): Record; ++export declare function createFileResponseFromMldev(): Record; ++export declare function deleteFileResponseFromMldev(): Record; +diff --git a/dist/node/src/converters/_live_converters.d.ts b/dist/node/src/converters/_live_converters.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..809a88a2ad2eb59aaca17ca5a66b4768bb7f74d1 +--- /dev/null ++++ b/dist/node/src/converters/_live_converters.d.ts +@@ -0,0 +1,81 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import * as types from '../types'; ++export declare function partToMldev(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function partToVertex(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentToMldev(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function contentToVertex(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function schemaToMldev(apiClient: ApiClient, fromObject: types.Schema): Record; ++export declare function schemaToVertex(apiClient: ApiClient, fromObject: types.Schema): Record; ++export declare function functionDeclarationToMldev(apiClient: ApiClient, fromObject: types.FunctionDeclaration): Record; ++export declare function functionDeclarationToVertex(apiClient: ApiClient, fromObject: types.FunctionDeclaration): Record; ++export declare function googleSearchToMldev(): Record; ++export declare function googleSearchToVertex(): Record; ++export declare function dynamicRetrievalConfigToMldev(apiClient: ApiClient, fromObject: types.DynamicRetrievalConfig): Record; ++export declare function dynamicRetrievalConfigToVertex(apiClient: ApiClient, fromObject: types.DynamicRetrievalConfig): Record; ++export declare function googleSearchRetrievalToMldev(apiClient: ApiClient, fromObject: types.GoogleSearchRetrieval): Record; ++export declare function googleSearchRetrievalToVertex(apiClient: ApiClient, fromObject: types.GoogleSearchRetrieval): Record; ++export declare function toolToMldev(apiClient: ApiClient, fromObject: types.Tool): Record; ++export declare function toolToVertex(apiClient: ApiClient, fromObject: types.Tool): Record; ++export declare function sessionResumptionConfigToMldev(apiClient: ApiClient, fromObject: types.SessionResumptionConfig): Record; ++export declare function sessionResumptionConfigToVertex(apiClient: ApiClient, fromObject: types.SessionResumptionConfig): Record; ++export declare function audioTranscriptionConfigToMldev(): Record; ++export declare function audioTranscriptionConfigToVertex(): Record; ++export declare function automaticActivityDetectionToMldev(apiClient: ApiClient, fromObject: types.AutomaticActivityDetection): Record; ++export declare function automaticActivityDetectionToVertex(apiClient: ApiClient, fromObject: types.AutomaticActivityDetection): Record; ++export declare function realtimeInputConfigToMldev(apiClient: ApiClient, fromObject: types.RealtimeInputConfig): Record; ++export declare function realtimeInputConfigToVertex(apiClient: ApiClient, fromObject: types.RealtimeInputConfig): Record; ++export declare function slidingWindowToMldev(apiClient: ApiClient, fromObject: types.SlidingWindow): Record; ++export declare function slidingWindowToVertex(apiClient: ApiClient, fromObject: types.SlidingWindow): Record; ++export declare function contextWindowCompressionConfigToMldev(apiClient: ApiClient, fromObject: types.ContextWindowCompressionConfig): Record; ++export declare function contextWindowCompressionConfigToVertex(apiClient: ApiClient, fromObject: types.ContextWindowCompressionConfig): Record; ++export declare function liveConnectConfigToMldev(apiClient: ApiClient, fromObject: types.LiveConnectConfig, parentObject: Record): Record; ++export declare function liveConnectConfigToVertex(apiClient: ApiClient, fromObject: types.LiveConnectConfig, parentObject: Record): Record; ++export declare function liveConnectParametersToMldev(apiClient: ApiClient, fromObject: types.LiveConnectParameters): Record; ++export declare function liveConnectParametersToVertex(apiClient: ApiClient, fromObject: types.LiveConnectParameters): Record; ++export declare function liveClientSetupToMldev(apiClient: ApiClient, fromObject: types.LiveClientSetup): Record; ++export declare function liveClientSetupToVertex(apiClient: ApiClient, fromObject: types.LiveClientSetup): Record; ++export declare function liveClientContentToMldev(apiClient: ApiClient, fromObject: types.LiveClientContent): Record; ++export declare function liveClientContentToVertex(apiClient: ApiClient, fromObject: types.LiveClientContent): Record; ++export declare function activityStartToMldev(): Record; ++export declare function activityStartToVertex(): Record; ++export declare function activityEndToMldev(): Record; ++export declare function activityEndToVertex(): Record; ++export declare function liveClientRealtimeInputToMldev(apiClient: ApiClient, fromObject: types.LiveClientRealtimeInput): Record; ++export declare function liveClientRealtimeInputToVertex(apiClient: ApiClient, fromObject: types.LiveClientRealtimeInput): Record; ++export declare function functionResponseToMldev(apiClient: ApiClient, fromObject: types.FunctionResponse): Record; ++export declare function functionResponseToVertex(apiClient: ApiClient, fromObject: types.FunctionResponse): Record; ++export declare function liveClientToolResponseToMldev(apiClient: ApiClient, fromObject: types.LiveClientToolResponse): Record; ++export declare function liveClientToolResponseToVertex(apiClient: ApiClient, fromObject: types.LiveClientToolResponse): Record; ++export declare function liveClientMessageToMldev(apiClient: ApiClient, fromObject: types.LiveClientMessage): Record; ++export declare function liveClientMessageToVertex(apiClient: ApiClient, fromObject: types.LiveClientMessage): Record; ++export declare function liveServerSetupCompleteFromMldev(): Record; ++export declare function liveServerSetupCompleteFromVertex(): Record; ++export declare function partFromMldev(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function partFromVertex(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentFromMldev(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function contentFromVertex(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function transcriptionFromMldev(): Record; ++export declare function transcriptionFromVertex(): Record; ++export declare function liveServerContentFromMldev(apiClient: ApiClient, fromObject: types.LiveServerContent): Record; ++export declare function liveServerContentFromVertex(apiClient: ApiClient, fromObject: types.LiveServerContent): Record; ++export declare function functionCallFromMldev(apiClient: ApiClient, fromObject: types.FunctionCall): Record; ++export declare function functionCallFromVertex(apiClient: ApiClient, fromObject: types.FunctionCall): Record; ++export declare function liveServerToolCallFromMldev(apiClient: ApiClient, fromObject: types.LiveServerToolCall): Record; ++export declare function liveServerToolCallFromVertex(apiClient: ApiClient, fromObject: types.LiveServerToolCall): Record; ++export declare function liveServerToolCallCancellationFromMldev(apiClient: ApiClient, fromObject: types.LiveServerToolCallCancellation): Record; ++export declare function liveServerToolCallCancellationFromVertex(apiClient: ApiClient, fromObject: types.LiveServerToolCallCancellation): Record; ++export declare function modalityTokenCountFromMldev(apiClient: ApiClient, fromObject: types.ModalityTokenCount): Record; ++export declare function modalityTokenCountFromVertex(apiClient: ApiClient, fromObject: types.ModalityTokenCount): Record; ++export declare function usageMetadataFromMldev(apiClient: ApiClient, fromObject: types.UsageMetadata): Record; ++export declare function usageMetadataFromVertex(apiClient: ApiClient, fromObject: types.UsageMetadata): Record; ++export declare function liveServerGoAwayFromMldev(apiClient: ApiClient, fromObject: types.LiveServerGoAway): Record; ++export declare function liveServerGoAwayFromVertex(apiClient: ApiClient, fromObject: types.LiveServerGoAway): Record; ++export declare function liveServerSessionResumptionUpdateFromMldev(apiClient: ApiClient, fromObject: types.LiveServerSessionResumptionUpdate): Record; ++export declare function liveServerSessionResumptionUpdateFromVertex(apiClient: ApiClient, fromObject: types.LiveServerSessionResumptionUpdate): Record; ++export declare function liveServerMessageFromMldev(apiClient: ApiClient, fromObject: types.LiveServerMessage): Record; ++export declare function liveServerMessageFromVertex(apiClient: ApiClient, fromObject: types.LiveServerMessage): Record; +diff --git a/dist/node/src/converters/_models_converters.d.ts b/dist/node/src/converters/_models_converters.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..333adc776bd14c467e38a13af1b980533606957b +--- /dev/null ++++ b/dist/node/src/converters/_models_converters.d.ts +@@ -0,0 +1,107 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import * as types from '../types'; ++export declare function partToMldev(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentToMldev(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function schemaToMldev(apiClient: ApiClient, fromObject: types.Schema): Record; ++export declare function modelSelectionConfigToMldev(apiClient: ApiClient, fromObject: types.ModelSelectionConfig): Record; ++export declare function safetySettingToMldev(apiClient: ApiClient, fromObject: types.SafetySetting): Record; ++export declare function functionDeclarationToMldev(apiClient: ApiClient, fromObject: types.FunctionDeclaration): Record; ++export declare function googleSearchToMldev(): Record; ++export declare function dynamicRetrievalConfigToMldev(apiClient: ApiClient, fromObject: types.DynamicRetrievalConfig): Record; ++export declare function googleSearchRetrievalToMldev(apiClient: ApiClient, fromObject: types.GoogleSearchRetrieval): Record; ++export declare function toolToMldev(apiClient: ApiClient, fromObject: types.Tool): Record; ++export declare function functionCallingConfigToMldev(apiClient: ApiClient, fromObject: types.FunctionCallingConfig): Record; ++export declare function toolConfigToMldev(apiClient: ApiClient, fromObject: types.ToolConfig): Record; ++export declare function prebuiltVoiceConfigToMldev(apiClient: ApiClient, fromObject: types.PrebuiltVoiceConfig): Record; ++export declare function voiceConfigToMldev(apiClient: ApiClient, fromObject: types.VoiceConfig): Record; ++export declare function speechConfigToMldev(apiClient: ApiClient, fromObject: types.SpeechConfig): Record; ++export declare function thinkingConfigToMldev(apiClient: ApiClient, fromObject: types.ThinkingConfig): Record; ++export declare function generateContentConfigToMldev(apiClient: ApiClient, fromObject: types.GenerateContentConfig, parentObject: Record): Record; ++export declare function generateContentParametersToMldev(apiClient: ApiClient, fromObject: types.GenerateContentParameters): Record; ++export declare function embedContentConfigToMldev(apiClient: ApiClient, fromObject: types.EmbedContentConfig, parentObject: Record): Record; ++export declare function embedContentParametersToMldev(apiClient: ApiClient, fromObject: types.EmbedContentParameters): Record; ++export declare function generateImagesConfigToMldev(apiClient: ApiClient, fromObject: types.GenerateImagesConfig, parentObject: Record): Record; ++export declare function generateImagesParametersToMldev(apiClient: ApiClient, fromObject: types.GenerateImagesParameters): Record; ++export declare function getModelParametersToMldev(apiClient: ApiClient, fromObject: types.GetModelParameters): Record; ++export declare function countTokensConfigToMldev(apiClient: ApiClient, fromObject: types.CountTokensConfig): Record; ++export declare function countTokensParametersToMldev(apiClient: ApiClient, fromObject: types.CountTokensParameters): Record; ++export declare function imageToMldev(apiClient: ApiClient, fromObject: types.Image): Record; ++export declare function generateVideosConfigToMldev(apiClient: ApiClient, fromObject: types.GenerateVideosConfig, parentObject: Record): Record; ++export declare function generateVideosParametersToMldev(apiClient: ApiClient, fromObject: types.GenerateVideosParameters): Record; ++export declare function partToVertex(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentToVertex(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function schemaToVertex(apiClient: ApiClient, fromObject: types.Schema): Record; ++export declare function modelSelectionConfigToVertex(apiClient: ApiClient, fromObject: types.ModelSelectionConfig): Record; ++export declare function safetySettingToVertex(apiClient: ApiClient, fromObject: types.SafetySetting): Record; ++export declare function functionDeclarationToVertex(apiClient: ApiClient, fromObject: types.FunctionDeclaration): Record; ++export declare function googleSearchToVertex(): Record; ++export declare function dynamicRetrievalConfigToVertex(apiClient: ApiClient, fromObject: types.DynamicRetrievalConfig): Record; ++export declare function googleSearchRetrievalToVertex(apiClient: ApiClient, fromObject: types.GoogleSearchRetrieval): Record; ++export declare function toolToVertex(apiClient: ApiClient, fromObject: types.Tool): Record; ++export declare function functionCallingConfigToVertex(apiClient: ApiClient, fromObject: types.FunctionCallingConfig): Record; ++export declare function toolConfigToVertex(apiClient: ApiClient, fromObject: types.ToolConfig): Record; ++export declare function prebuiltVoiceConfigToVertex(apiClient: ApiClient, fromObject: types.PrebuiltVoiceConfig): Record; ++export declare function voiceConfigToVertex(apiClient: ApiClient, fromObject: types.VoiceConfig): Record; ++export declare function speechConfigToVertex(apiClient: ApiClient, fromObject: types.SpeechConfig): Record; ++export declare function thinkingConfigToVertex(apiClient: ApiClient, fromObject: types.ThinkingConfig): Record; ++export declare function generateContentConfigToVertex(apiClient: ApiClient, fromObject: types.GenerateContentConfig, parentObject: Record): Record; ++export declare function generateContentParametersToVertex(apiClient: ApiClient, fromObject: types.GenerateContentParameters): Record; ++export declare function embedContentConfigToVertex(apiClient: ApiClient, fromObject: types.EmbedContentConfig, parentObject: Record): Record; ++export declare function embedContentParametersToVertex(apiClient: ApiClient, fromObject: types.EmbedContentParameters): Record; ++export declare function generateImagesConfigToVertex(apiClient: ApiClient, fromObject: types.GenerateImagesConfig, parentObject: Record): Record; ++export declare function generateImagesParametersToVertex(apiClient: ApiClient, fromObject: types.GenerateImagesParameters): Record; ++export declare function getModelParametersToVertex(apiClient: ApiClient, fromObject: types.GetModelParameters): Record; ++export declare function countTokensConfigToVertex(apiClient: ApiClient, fromObject: types.CountTokensConfig, parentObject: Record): Record; ++export declare function countTokensParametersToVertex(apiClient: ApiClient, fromObject: types.CountTokensParameters): Record; ++export declare function computeTokensParametersToVertex(apiClient: ApiClient, fromObject: types.ComputeTokensParameters): Record; ++export declare function imageToVertex(apiClient: ApiClient, fromObject: types.Image): Record; ++export declare function generateVideosConfigToVertex(apiClient: ApiClient, fromObject: types.GenerateVideosConfig, parentObject: Record): Record; ++export declare function generateVideosParametersToVertex(apiClient: ApiClient, fromObject: types.GenerateVideosParameters): Record; ++export declare function partFromMldev(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentFromMldev(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function citationMetadataFromMldev(apiClient: ApiClient, fromObject: types.CitationMetadata): Record; ++export declare function candidateFromMldev(apiClient: ApiClient, fromObject: types.Candidate): Record; ++export declare function generateContentResponseFromMldev(apiClient: ApiClient, fromObject: types.GenerateContentResponse): Record; ++export declare function contentEmbeddingStatisticsFromMldev(): Record; ++export declare function contentEmbeddingFromMldev(apiClient: ApiClient, fromObject: types.ContentEmbedding): Record; ++export declare function embedContentMetadataFromMldev(): Record; ++export declare function embedContentResponseFromMldev(apiClient: ApiClient, fromObject: types.EmbedContentResponse): Record; ++export declare function imageFromMldev(apiClient: ApiClient, fromObject: types.Image): Record; ++export declare function safetyAttributesFromMldev(apiClient: ApiClient, fromObject: types.SafetyAttributes): Record; ++export declare function generatedImageFromMldev(apiClient: ApiClient, fromObject: types.GeneratedImage): Record; ++export declare function generateImagesResponseFromMldev(apiClient: ApiClient, fromObject: types.GenerateImagesResponse): Record; ++export declare function endpointFromMldev(): Record; ++export declare function tunedModelInfoFromMldev(apiClient: ApiClient, fromObject: types.TunedModelInfo): Record; ++export declare function modelFromMldev(apiClient: ApiClient, fromObject: types.Model): Record; ++export declare function countTokensResponseFromMldev(apiClient: ApiClient, fromObject: types.CountTokensResponse): Record; ++export declare function videoFromMldev(apiClient: ApiClient, fromObject: types.Video): Record; ++export declare function generatedVideoFromMldev(apiClient: ApiClient, fromObject: types.GeneratedVideo): Record; ++export declare function generateVideosResponseFromMldev(apiClient: ApiClient, fromObject: types.GenerateVideosResponse): Record; ++export declare function generateVideosOperationFromMldev(apiClient: ApiClient, fromObject: types.GenerateVideosOperation): Record; ++export declare function partFromVertex(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentFromVertex(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function citationMetadataFromVertex(apiClient: ApiClient, fromObject: types.CitationMetadata): Record; ++export declare function candidateFromVertex(apiClient: ApiClient, fromObject: types.Candidate): Record; ++export declare function generateContentResponseFromVertex(apiClient: ApiClient, fromObject: types.GenerateContentResponse): Record; ++export declare function contentEmbeddingStatisticsFromVertex(apiClient: ApiClient, fromObject: types.ContentEmbeddingStatistics): Record; ++export declare function contentEmbeddingFromVertex(apiClient: ApiClient, fromObject: types.ContentEmbedding): Record; ++export declare function embedContentMetadataFromVertex(apiClient: ApiClient, fromObject: types.EmbedContentMetadata): Record; ++export declare function embedContentResponseFromVertex(apiClient: ApiClient, fromObject: types.EmbedContentResponse): Record; ++export declare function imageFromVertex(apiClient: ApiClient, fromObject: types.Image): Record; ++export declare function safetyAttributesFromVertex(apiClient: ApiClient, fromObject: types.SafetyAttributes): Record; ++export declare function generatedImageFromVertex(apiClient: ApiClient, fromObject: types.GeneratedImage): Record; ++export declare function generateImagesResponseFromVertex(apiClient: ApiClient, fromObject: types.GenerateImagesResponse): Record; ++export declare function endpointFromVertex(apiClient: ApiClient, fromObject: types.Endpoint): Record; ++export declare function tunedModelInfoFromVertex(apiClient: ApiClient, fromObject: types.TunedModelInfo): Record; ++export declare function modelFromVertex(apiClient: ApiClient, fromObject: types.Model): Record; ++export declare function countTokensResponseFromVertex(apiClient: ApiClient, fromObject: types.CountTokensResponse): Record; ++export declare function computeTokensResponseFromVertex(apiClient: ApiClient, fromObject: types.ComputeTokensResponse): Record; ++export declare function videoFromVertex(apiClient: ApiClient, fromObject: types.Video): Record; ++export declare function generatedVideoFromVertex(apiClient: ApiClient, fromObject: types.GeneratedVideo): Record; ++export declare function generateVideosResponseFromVertex(apiClient: ApiClient, fromObject: types.GenerateVideosResponse): Record; ++export declare function generateVideosOperationFromVertex(apiClient: ApiClient, fromObject: types.GenerateVideosOperation): Record; +diff --git a/dist/node/src/converters/_operations_converters.d.ts b/dist/node/src/converters/_operations_converters.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..00fabb987cc151833cd5656216dfc4f2a78e9533 +--- /dev/null ++++ b/dist/node/src/converters/_operations_converters.d.ts +@@ -0,0 +1,18 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import * as types from '../types'; ++export declare function getOperationParametersToMldev(apiClient: ApiClient, fromObject: types.GetOperationParameters): Record; ++export declare function getOperationParametersToVertex(apiClient: ApiClient, fromObject: types.GetOperationParameters): Record; ++export declare function fetchPredictOperationParametersToVertex(apiClient: ApiClient, fromObject: types.FetchPredictOperationParameters): Record; ++export declare function videoFromMldev(apiClient: ApiClient, fromObject: types.Video): Record; ++export declare function generatedVideoFromMldev(apiClient: ApiClient, fromObject: types.GeneratedVideo): Record; ++export declare function generateVideosResponseFromMldev(apiClient: ApiClient, fromObject: types.GenerateVideosResponse): Record; ++export declare function generateVideosOperationFromMldev(apiClient: ApiClient, fromObject: types.GenerateVideosOperation): Record; ++export declare function videoFromVertex(apiClient: ApiClient, fromObject: types.Video): Record; ++export declare function generatedVideoFromVertex(apiClient: ApiClient, fromObject: types.GeneratedVideo): Record; ++export declare function generateVideosResponseFromVertex(apiClient: ApiClient, fromObject: types.GenerateVideosResponse): Record; ++export declare function generateVideosOperationFromVertex(apiClient: ApiClient, fromObject: types.GenerateVideosOperation): Record; +diff --git a/dist/node/src/cross/_cross_error.d.ts b/dist/node/src/cross/_cross_error.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..d74c1c8d6dc211bbc9e99c0cd3ed5460be5ee611 +--- /dev/null ++++ b/dist/node/src/cross/_cross_error.d.ts +@@ -0,0 +1,6 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++export declare function crossError(): Error; +diff --git a/dist/node/src/cross/_cross_uploader.d.ts b/dist/node/src/cross/_cross_uploader.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..fa7423bdf25d94b69408076c96bfcfd0310546a2 +--- /dev/null ++++ b/dist/node/src/cross/_cross_uploader.d.ts +@@ -0,0 +1,15 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import { FileStat, Uploader } from '../_uploader'; ++import { File } from '../types'; ++export declare const MAX_CHUNK_SIZE: number; ++export declare class CrossUploader implements Uploader { ++ upload(file: string | Blob, uploadUrl: string, apiClient: ApiClient): Promise; ++ stat(file: string | Blob): Promise; ++} ++export declare function uploadBlob(file: Blob, uploadUrl: string, apiClient: ApiClient): Promise; ++export declare function getBlobStat(file: Blob): Promise; +diff --git a/dist/node/src/cross/_cross_websocket.d.ts b/dist/node/src/cross/_cross_websocket.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..d3a0532b85c77d512dfc717e7adb591579e985a8 +--- /dev/null ++++ b/dist/node/src/cross/_cross_websocket.d.ts +@@ -0,0 +1,9 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { WebSocketCallbacks, WebSocketFactory, WebSocket as Ws } from '../_websocket'; ++export declare class CrossWebSocketFactory implements WebSocketFactory { ++ create(url: string, headers: Record, callbacks: WebSocketCallbacks): Ws; ++} +diff --git a/dist/node/src/files.d.ts b/dist/node/src/files.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..326a8bc473ea971f46bf687f158416121a7d8d91 +--- /dev/null ++++ b/dist/node/src/files.d.ts +@@ -0,0 +1,107 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from './_api_client'; ++import { BaseModule } from './_common'; ++import { Pager } from './pagers'; ++import * as types from './types'; ++export declare class Files extends BaseModule { ++ private readonly apiClient; ++ constructor(apiClient: ApiClient); ++ /** ++ * Lists all current project files from the service. ++ * ++ * @param params - The parameters for the list request ++ * @return The paginated results of the list of files ++ * ++ * @example ++ * The following code prints the names of all files from the service, the ++ * size of each page is 10. ++ * ++ * ```ts ++ * const listResponse = await ai.files.list({config: {'pageSize': 10}}); ++ * for await (const file of listResponse) { ++ * console.log(file.name); ++ * } ++ * ``` ++ */ ++ list: (params?: types.ListFilesParameters) => Promise>; ++ /** ++ * Uploads a file asynchronously to the Gemini API. ++ * This method is not available in Vertex AI. ++ * Supported upload sources: ++ * - Node.js: File path (string) or Blob object. ++ * - Browser: Blob object (e.g., File). ++ * ++ * @remarks ++ * The `mimeType` can be specified in the `config` parameter. If omitted: ++ * - For file path (string) inputs, the `mimeType` will be inferred from the ++ * file extension. ++ * - For Blob object inputs, the `mimeType` will be set to the Blob's `type` ++ * property. ++ * Somex eamples for file extension to mimeType mapping: ++ * .txt -> text/plain ++ * .json -> application/json ++ * .jpg -> image/jpeg ++ * .png -> image/png ++ * .mp3 -> audio/mpeg ++ * .mp4 -> video/mp4 ++ * ++ * This section can contain multiple paragraphs and code examples. ++ * ++ * @param params - Optional parameters specified in the ++ * `types.UploadFileParameters` interface. ++ * @see {@link types.UploadFileParameters#config} for the optional ++ * config in the parameters. ++ * @return A promise that resolves to a `types.File` object. ++ * @throws An error if called on a Vertex AI client. ++ * @throws An error if the `mimeType` is not provided and can not be inferred, ++ * the `mimeType` can be provided in the `params.config` parameter. ++ * @throws An error occurs if a suitable upload location cannot be established. ++ * ++ * @example ++ * The following code uploads a file to Gemini API. ++ * ++ * ```ts ++ * const file = await ai.files.upload({file: 'file.txt', config: { ++ * mimeType: 'text/plain', ++ * }}); ++ * console.log(file.name); ++ * ``` ++ */ ++ upload(params: types.UploadFileParameters): Promise; ++ private listInternal; ++ private createInternal; ++ /** ++ * Retrieves the file information from the service. ++ * ++ * @param params - The parameters for the get request ++ * @return The Promise that resolves to the types.File object requested. ++ * ++ * @example ++ * ```ts ++ * const config: GetFileParameters = { ++ * name: fileName, ++ * }; ++ * file = await ai.files.get(config); ++ * console.log(file.name); ++ * ``` ++ */ ++ get(params: types.GetFileParameters): Promise; ++ /** ++ * Deletes a remotely stored file. ++ * ++ * @param params - The parameters for the delete request. ++ * @return The DeleteFileResponse, the response for the delete method. ++ * ++ * @example ++ * The following code deletes an example file named "files/mehozpxf877d". ++ * ++ * ```ts ++ * await ai.files.delete({name: file.name}); ++ * ``` ++ */ ++ delete(params: types.DeleteFileParameters): Promise; ++} +diff --git a/dist/node/src/index.d.ts b/dist/node/src/index.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..ec347c72b2137135de417c16bbf1dff55e05e5c1 +--- /dev/null ++++ b/dist/node/src/index.d.ts +@@ -0,0 +1,14 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++export * from './caches'; ++export * from './chats'; ++export { GoogleGenAI, GoogleGenAIOptions } from './client'; ++export { Files } from './files'; ++export * from './live'; ++export { Models } from './models'; ++export { Operations } from './operations'; ++export { PagedItem, Pager } from './pagers'; ++export * from './types'; +diff --git a/dist/node/src/live.d.ts b/dist/node/src/live.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..a34c163ddba7cca84ab471ef8376c754035ad4fb +--- /dev/null ++++ b/dist/node/src/live.d.ts +@@ -0,0 +1,193 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++/** ++ * Live client. ++ * ++ * @experimental ++ */ ++import { ApiClient } from './_api_client'; ++import { Auth } from './_auth'; ++import { WebSocket, WebSocketFactory } from './_websocket'; ++import * as types from './types'; ++/** ++ Live class encapsulates the configuration for live interaction with the ++ Generative Language API. It embeds ApiClient for general API settings. ++ ++ @experimental ++ */ ++export declare class Live { ++ private readonly apiClient; ++ private readonly auth; ++ private readonly webSocketFactory; ++ constructor(apiClient: ApiClient, auth: Auth, webSocketFactory: WebSocketFactory); ++ /** ++ Establishes a connection to the specified model with the given ++ configuration and returns a Session object representing that connection. ++ ++ @experimental ++ ++ @remarks ++ ++ @param params - The parameters for establishing a connection to the model. ++ @return A live session. ++ ++ @example ++ ```ts ++ let model: string; ++ if (GOOGLE_GENAI_USE_VERTEXAI) { ++ model = 'gemini-2.0-flash-live-preview-04-09'; ++ } else { ++ model = 'gemini-2.0-flash-live-001'; ++ } ++ const session = await ai.live.connect({ ++ model: model, ++ config: { ++ responseModalities: [Modality.AUDIO], ++ }, ++ callbacks: { ++ onopen: () => { ++ console.log('Connected to the socket.'); ++ }, ++ onmessage: (e: MessageEvent) => { ++ console.log('Received message from the server: %s\n', debug(e.data)); ++ }, ++ onerror: (e: ErrorEvent) => { ++ console.log('Error occurred: %s\n', debug(e.error)); ++ }, ++ onclose: (e: CloseEvent) => { ++ console.log('Connection closed.'); ++ }, ++ }, ++ }); ++ ``` ++ */ ++ connect(params: types.LiveConnectParameters): Promise; ++} ++/** ++ Represents a connection to the API. ++ ++ @experimental ++ */ ++export declare class Session { ++ readonly conn: WebSocket; ++ private readonly apiClient; ++ constructor(conn: WebSocket, apiClient: ApiClient); ++ private tLiveClientContent; ++ private tLiveClientRealtimeInput; ++ private tLiveClienttToolResponse; ++ /** ++ Send a message over the established connection. ++ ++ @param params - Contains two **optional** properties, `turns` and ++ `turnComplete`. ++ ++ - `turns` will be converted to a `Content[]` ++ - `turnComplete: true` [default] indicates that you are done sending ++ content and expect a response. If `turnComplete: false`, the server ++ will wait for additional messages before starting generation. ++ ++ @experimental ++ ++ @remarks ++ There are two ways to send messages to the live API: ++ `sendClientContent` and `sendRealtimeInput`. ++ ++ `sendClientContent` messages are added to the model context **in order**. ++ Having a conversation using `sendClientContent` messages is roughly ++ equivalent to using the `Chat.sendMessageStream`, except that the state of ++ the `chat` history is stored on the API server instead of locally. ++ ++ Because of `sendClientContent`'s order guarantee, the model cannot respons ++ as quickly to `sendClientContent` messages as to `sendRealtimeInput` ++ messages. This makes the biggest difference when sending objects that have ++ significant preprocessing time (typically images). ++ ++ The `sendClientContent` message sends a `Content[]` ++ which has more options than the `Blob` sent by `sendRealtimeInput`. ++ ++ So the main use-cases for `sendClientContent` over `sendRealtimeInput` are: ++ ++ - Sending anything that can't be represented as a `Blob` (text, ++ `sendClientContent({turns="Hello?"}`)). ++ - Managing turns when not using audio input and voice activity detection. ++ (`sendClientContent({turnComplete:true})` or the short form ++ `sendClientContent()`) ++ - Prefilling a conversation context ++ ``` ++ sendClientContent({ ++ turns: [ ++ Content({role:user, parts:...}), ++ Content({role:user, parts:...}), ++ ... ++ ] ++ }) ++ ``` ++ @experimental ++ */ ++ sendClientContent(params: types.LiveSendClientContentParameters): void; ++ /** ++ Send a realtime message over the established connection. ++ ++ @param params - Contains one property, `media`. ++ ++ - `media` will be converted to a `Blob` ++ ++ @experimental ++ ++ @remarks ++ Use `sendRealtimeInput` for realtime audio chunks and video frames (images). ++ ++ With `sendRealtimeInput` the api will respond to audio automatically ++ based on voice activity detection (VAD). ++ ++ `sendRealtimeInput` is optimized for responsivness at the expense of ++ deterministic ordering guarantees. Audio and video tokens are to the ++ context when they become available. ++ ++ Note: The Call signature expects a `Blob` object, but only a subset ++ of audio and image mimetypes are allowed. ++ */ ++ sendRealtimeInput(params: types.LiveSendRealtimeInputParameters): void; ++ /** ++ Send a function response message over the established connection. ++ ++ @param params - Contains property `functionResponses`. ++ ++ - `functionResponses` will be converted to a `functionResponses[]` ++ ++ @remarks ++ Use `sendFunctionResponse` to reply to `LiveServerToolCall` from the server. ++ ++ Use {@link types.LiveConnectConfig#tools} to configure the callable functions. ++ ++ @experimental ++ */ ++ sendToolResponse(params: types.LiveSendToolResponseParameters): void; ++ /** ++ Terminates the WebSocket connection. ++ ++ @experimental ++ ++ @example ++ ```ts ++ let model: string; ++ if (GOOGLE_GENAI_USE_VERTEXAI) { ++ model = 'gemini-2.0-flash-live-preview-04-09'; ++ } else { ++ model = 'gemini-2.0-flash-live-001'; ++ } ++ const session = await ai.live.connect({ ++ model: model, ++ config: { ++ responseModalities: [Modality.AUDIO], ++ } ++ }); ++ ++ session.close(); ++ ``` ++ */ ++ close(): void; ++} +diff --git a/dist/node/src/models.d.ts b/dist/node/src/models.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..b522f982b69c8e86b179802a672b61bdb99de804 +--- /dev/null ++++ b/dist/node/src/models.d.ts +@@ -0,0 +1,228 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from './_api_client'; ++import { BaseModule } from './_common'; ++import * as types from './types'; ++export declare class Models extends BaseModule { ++ private readonly apiClient; ++ constructor(apiClient: ApiClient); ++ /** ++ * Makes an API request to generate content with a given model. ++ * ++ * For the `model` parameter, supported formats for Vertex AI API include: ++ * - The Gemini model ID, for example: 'gemini-2.0-flash' ++ * - The full resource name starts with 'projects/', for example: ++ * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash' ++ * - The partial resource name with 'publishers/', for example: ++ * 'publishers/google/models/gemini-2.0-flash' or ++ * 'publishers/meta/models/llama-3.1-405b-instruct-maas' ++ * - `/` separated publisher and model name, for example: ++ * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas' ++ * ++ * For the `model` parameter, supported formats for Gemini API include: ++ * - The Gemini model ID, for example: 'gemini-2.0-flash' ++ * - The model name starts with 'models/', for example: ++ * 'models/gemini-2.0-flash' ++ * - For tuned models, the model name starts with 'tunedModels/', ++ * for example: ++ * 'tunedModels/1234567890123456789' ++ * ++ * Some models support multimodal input and output. ++ * ++ * @param params - The parameters for generating content. ++ * @return The response from generating content. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.generateContent({ ++ * model: 'gemini-2.0-flash', ++ * contents: 'why is the sky blue?', ++ * config: { ++ * candidateCount: 2, ++ * } ++ * }); ++ * console.log(response); ++ * ``` ++ */ ++ generateContent: (params: types.GenerateContentParameters) => Promise; ++ /** ++ * Makes an API request to generate content with a given model and yields the ++ * response in chunks. ++ * ++ * For the `model` parameter, supported formats for Vertex AI API include: ++ * - The Gemini model ID, for example: 'gemini-2.0-flash' ++ * - The full resource name starts with 'projects/', for example: ++ * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash' ++ * - The partial resource name with 'publishers/', for example: ++ * 'publishers/google/models/gemini-2.0-flash' or ++ * 'publishers/meta/models/llama-3.1-405b-instruct-maas' ++ * - `/` separated publisher and model name, for example: ++ * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas' ++ * ++ * For the `model` parameter, supported formats for Gemini API include: ++ * - The Gemini model ID, for example: 'gemini-2.0-flash' ++ * - The model name starts with 'models/', for example: ++ * 'models/gemini-2.0-flash' ++ * - For tuned models, the model name starts with 'tunedModels/', ++ * for example: ++ * 'tunedModels/1234567890123456789' ++ * ++ * Some models support multimodal input and output. ++ * ++ * @param params - The parameters for generating content with streaming response. ++ * @return The response from generating content. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.generateContentStream({ ++ * model: 'gemini-2.0-flash', ++ * contents: 'why is the sky blue?', ++ * config: { ++ * maxOutputTokens: 200, ++ * } ++ * }); ++ * for await (const chunk of response) { ++ * console.log(chunk); ++ * } ++ * ``` ++ */ ++ generateContentStream: (params: types.GenerateContentParameters) => Promise>; ++ /** ++ * Generates an image based on a text description and configuration. ++ * ++ * @param model - The model to use. ++ * @param prompt - A text description of the image to generate. ++ * @param [config] - The config for image generation. ++ * @return The response from the API. ++ * ++ * @example ++ * ```ts ++ * const response = await client.models.generateImages({ ++ * model: 'imagen-3.0-generate-002', ++ * prompt: 'Robot holding a red skateboard', ++ * config: { ++ * numberOfImages: 1, ++ * includeRaiReason: true, ++ * }, ++ * }); ++ * console.log(response?.generatedImages?.[0]?.image?.imageBytes); ++ * ``` ++ */ ++ generateImages: (params: types.GenerateImagesParameters) => Promise; ++ private generateContentInternal; ++ private generateContentStreamInternal; ++ /** ++ * Calculates embeddings for the given contents. Only text is supported. ++ * ++ * @param params - The parameters for embedding contents. ++ * @return The response from the API. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.embedContent({ ++ * model: 'text-embedding-004', ++ * contents: [ ++ * 'What is your name?', ++ * 'What is your favorite color?', ++ * ], ++ * config: { ++ * outputDimensionality: 64, ++ * }, ++ * }); ++ * console.log(response); ++ * ``` ++ */ ++ embedContent(params: types.EmbedContentParameters): Promise; ++ /** ++ * Generates an image based on a text description and configuration. ++ * ++ * @param params - The parameters for generating images. ++ * @return The response from the API. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.generateImages({ ++ * model: 'imagen-3.0-generate-002', ++ * prompt: 'Robot holding a red skateboard', ++ * config: { ++ * numberOfImages: 1, ++ * includeRaiReason: true, ++ * }, ++ * }); ++ * console.log(response?.generatedImages?.[0]?.image?.imageBytes); ++ * ``` ++ */ ++ private generateImagesInternal; ++ /** ++ * Fetches information about a model by name. ++ * ++ * @example ++ * ```ts ++ * const modelInfo = await ai.models.get({model: 'gemini-2.0-flash'}); ++ * ``` ++ */ ++ get(params: types.GetModelParameters): Promise; ++ /** ++ * Counts the number of tokens in the given contents. Multimodal input is ++ * supported for Gemini models. ++ * ++ * @param params - The parameters for counting tokens. ++ * @return The response from the API. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.countTokens({ ++ * model: 'gemini-2.0-flash', ++ * contents: 'The quick brown fox jumps over the lazy dog.' ++ * }); ++ * console.log(response); ++ * ``` ++ */ ++ countTokens(params: types.CountTokensParameters): Promise; ++ /** ++ * Given a list of contents, returns a corresponding TokensInfo containing ++ * the list of tokens and list of token ids. ++ * ++ * This method is not supported by the Gemini Developer API. ++ * ++ * @param params - The parameters for computing tokens. ++ * @return The response from the API. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.computeTokens({ ++ * model: 'gemini-2.0-flash', ++ * contents: 'What is your name?' ++ * }); ++ * console.log(response); ++ * ``` ++ */ ++ computeTokens(params: types.ComputeTokensParameters): Promise; ++ /** ++ * Generates videos based on a text description and configuration. ++ * ++ * @param params - The parameters for generating videos. ++ * @return A Promise which allows you to track the progress and eventually retrieve the generated videos using the operations.get method. ++ * ++ * @example ++ * ```ts ++ * const operation = await ai.models.generateVideos({ ++ * model: 'veo-2.0-generate-001', ++ * prompt: 'A neon hologram of a cat driving at top speed', ++ * config: { ++ * numberOfVideos: 1 ++ * }); ++ * ++ * while (!operation.done) { ++ * await new Promise(resolve => setTimeout(resolve, 10000)); ++ * operation = await ai.operations.getVideosOperation({operation: operation}); ++ * } ++ * ++ * console.log(operation.response?.generatedVideos?.[0]?.video?.uri); ++ * ``` ++ */ ++ generateVideos(params: types.GenerateVideosParameters): Promise; ++} +diff --git a/dist/node/src/node/_node_auth.d.ts b/dist/node/src/node/_node_auth.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..a7f568233f3e259b9d8bf75f6eac6e8f872cb3e3 +--- /dev/null ++++ b/dist/node/src/node/_node_auth.d.ts +@@ -0,0 +1,29 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { GoogleAuthOptions } from 'google-auth-library'; ++import { Auth } from '../_auth'; ++export declare const GOOGLE_API_KEY_HEADER = "x-goog-api-key"; ++export interface NodeAuthOptions { ++ /** ++ * The API Key. This is required for Gemini API users. ++ */ ++ apiKey?: string; ++ /** ++ * Optional. These are the authentication options provided by google-auth-library for Vertex AI users. ++ * Complete list of authentication options are documented in the ++ * GoogleAuthOptions interface: ++ * https://github.com/googleapis/google-auth-library-nodejs/blob/main/src/auth/googleauth.ts. ++ */ ++ googleAuthOptions?: GoogleAuthOptions; ++} ++export declare class NodeAuth implements Auth { ++ private readonly googleAuth?; ++ private readonly apiKey?; ++ constructor(opts: NodeAuthOptions); ++ addAuthHeaders(headers: Headers): Promise; ++ private addKeyHeader; ++ private addGoogleAuthHeaders; ++} +diff --git a/dist/node/src/node/_node_uploader.d.ts b/dist/node/src/node/_node_uploader.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..844e9ed4f67f561d04fe65af9a954ed5e325665f +--- /dev/null ++++ b/dist/node/src/node/_node_uploader.d.ts +@@ -0,0 +1,15 @@ ++import { ApiClient } from '../_api_client'; ++import { FileStat, Uploader } from '../_uploader'; ++import { File } from '../types'; ++export declare class NodeUploader implements Uploader { ++ stat(file: string | Blob): Promise; ++ upload(file: string | Blob, uploadUrl: string, apiClient: ApiClient): Promise; ++ /** ++ * Infers the MIME type of a file based on its extension. ++ * ++ * @param filePath The path to the file. ++ * @returns The MIME type of the file, or undefined if it cannot be inferred. ++ */ ++ private inferMimeType; ++ private uploadFileFromPath; ++} +diff --git a/dist/node/src/node/_node_websocket.d.ts b/dist/node/src/node/_node_websocket.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..93fcf40047ea0aea656afaf80992e90b62051b7e +--- /dev/null ++++ b/dist/node/src/node/_node_websocket.d.ts +@@ -0,0 +1,19 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { WebSocket, WebSocketCallbacks, WebSocketFactory } from '../_websocket'; ++export declare class NodeWebSocketFactory implements WebSocketFactory { ++ create(url: string, headers: Record, callbacks: WebSocketCallbacks): WebSocket; ++} ++export declare class NodeWebSocket implements WebSocket { ++ private readonly url; ++ private readonly headers; ++ private readonly callbacks; ++ private ws?; ++ constructor(url: string, headers: Record, callbacks: WebSocketCallbacks); ++ connect(): void; ++ send(message: string): void; ++ close(): void; ++} +diff --git a/dist/node/src/node/index.d.ts b/dist/node/src/node/index.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..07cfb97fcdf382d38a46cab34bd0bababde4b720 +--- /dev/null ++++ b/dist/node/src/node/index.d.ts +@@ -0,0 +1,15 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++export * from '../caches'; ++export * from '../chats'; ++export { GoogleGenAIOptions } from '../client'; ++export { Files } from '../files'; ++export * from '../live'; ++export { Models } from '../models'; ++export { Operations } from '../operations'; ++export { PagedItem, Pager } from '../pagers'; ++export * from '../types'; ++export * from './node_client'; +diff --git a/dist/node/src/node/node_client.d.ts b/dist/node/src/node/node_client.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..e4be6ea06cff9a10955bcf9e242d07b448ab21de +--- /dev/null ++++ b/dist/node/src/node/node_client.d.ts +@@ -0,0 +1,69 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import { Caches } from '../caches'; ++import { Chats } from '../chats'; ++import { GoogleGenAIOptions } from '../client'; ++import { Files } from '../files'; ++import { Live } from '../live'; ++import { Models } from '../models'; ++import { Operations } from '../operations'; ++/** ++ * The Google GenAI SDK. ++ * ++ * @remarks ++ * Provides access to the GenAI features through either the {@link ++ * https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API} or ++ * the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI ++ * API}. ++ * ++ * The {@link GoogleGenAIOptions.vertexai} value determines which of the API ++ * services to use. ++ * ++ * When using the Gemini API, a {@link GoogleGenAIOptions.apiKey} must also be ++ * set. When using Vertex AI, both {@link GoogleGenAIOptions.project} and {@link ++ * GoogleGenAIOptions.location} must be set, or a {@link ++ * GoogleGenAIOptions.apiKey} must be set when using Express Mode. ++ * ++ * Explicitly passed in values in {@link GoogleGenAIOptions} will always take ++ * precedence over environment variables. If both project/location and api_key ++ * exist in the environment variables, the project/location will be used. ++ * ++ * @example ++ * Initializing the SDK for using the Gemini API: ++ * ```ts ++ * import {GoogleGenAI} from '@google/genai'; ++ * const ai = new GoogleGenAI({apiKey: 'GEMINI_API_KEY'}); ++ * ``` ++ * ++ * @example ++ * Initializing the SDK for using the Vertex AI API: ++ * ```ts ++ * import {GoogleGenAI} from '@google/genai'; ++ * const ai = new GoogleGenAI({ ++ * vertexai: true, ++ * project: 'PROJECT_ID', ++ * location: 'PROJECT_LOCATION' ++ * }); ++ * ``` ++ * ++ */ ++export declare class GoogleGenAI { ++ protected readonly apiClient: ApiClient; ++ private readonly apiKey?; ++ readonly vertexai: boolean; ++ private readonly googleAuthOptions?; ++ private readonly project?; ++ private readonly location?; ++ private readonly apiVersion?; ++ readonly models: Models; ++ readonly live: Live; ++ readonly chats: Chats; ++ readonly caches: Caches; ++ readonly files: Files; ++ readonly operations: Operations; ++ constructor(options: GoogleGenAIOptions); ++} +diff --git a/dist/node/src/operations.d.ts b/dist/node/src/operations.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..c5a50188569e8819405f88440c00d138b391bc19 +--- /dev/null ++++ b/dist/node/src/operations.d.ts +@@ -0,0 +1,21 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from './_api_client'; ++import { BaseModule } from './_common'; ++import * as types from './types'; ++export declare class Operations extends BaseModule { ++ private readonly apiClient; ++ constructor(apiClient: ApiClient); ++ /** ++ * Gets the status of a long-running operation. ++ * ++ * @param parameters The parameters for the get operation request. ++ * @return The updated Operation object, with the latest status or result. ++ */ ++ getVideosOperation(parameters: types.OperationGetParameters): Promise; ++ private getVideosOperationInternal; ++ private fetchPredictVideosOperationInternal; ++} +diff --git a/dist/node/src/pagers.d.ts b/dist/node/src/pagers.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..8c26d3b985a4ed47fcae0c63e6b1efc55dab0b52 +--- /dev/null ++++ b/dist/node/src/pagers.d.ts +@@ -0,0 +1,124 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++/** ++ * Pagers for the GenAI List APIs. ++ */ ++export declare enum PagedItem { ++ PAGED_ITEM_BATCH_JOBS = "batchJobs", ++ PAGED_ITEM_MODELS = "models", ++ PAGED_ITEM_TUNING_JOBS = "tuningJobs", ++ PAGED_ITEM_FILES = "files", ++ PAGED_ITEM_CACHED_CONTENTS = "cachedContents" ++} ++interface PagedItemConfig { ++ config?: { ++ pageToken?: string; ++ pageSize?: number; ++ }; ++} ++interface PagedItemResponse { ++ nextPageToken?: string; ++ batchJobs?: T[]; ++ models?: T[]; ++ tuningJobs?: T[]; ++ files?: T[]; ++ cachedContents?: T[]; ++} ++/** ++ * Pager class for iterating through paginated results. ++ */ ++export declare class Pager implements AsyncIterable { ++ private nameInternal; ++ private pageInternal; ++ private paramsInternal; ++ private pageInternalSize; ++ protected requestInternal: (params: PagedItemConfig) => Promise>; ++ protected idxInternal: number; ++ constructor(name: PagedItem, request: (params: PagedItemConfig) => Promise>, response: PagedItemResponse, params: PagedItemConfig); ++ private init; ++ private initNextPage; ++ /** ++ * Returns the current page, which is a list of items. ++ * ++ * @remarks ++ * The first page is retrieved when the pager is created. The returned list of ++ * items could be a subset of the entire list. ++ */ ++ get page(): T[]; ++ /** ++ * Returns the type of paged item (for example, ``batch_jobs``). ++ */ ++ get name(): PagedItem; ++ /** ++ * Returns the length of the page fetched each time by this pager. ++ * ++ * @remarks ++ * The number of items in the page is less than or equal to the page length. ++ */ ++ get pageSize(): number; ++ /** ++ * Returns the parameters when making the API request for the next page. ++ * ++ * @remarks ++ * Parameters contain a set of optional configs that can be ++ * used to customize the API request. For example, the `pageToken` parameter ++ * contains the token to request the next page. ++ */ ++ get params(): PagedItemConfig; ++ /** ++ * Returns the total number of items in the current page. ++ */ ++ get pageLength(): number; ++ /** ++ * Returns the item at the given index. ++ */ ++ getItem(index: number): T; ++ /** ++ * Returns an async iterator that support iterating through all items ++ * retrieved from the API. ++ * ++ * @remarks ++ * The iterator will automatically fetch the next page if there are more items ++ * to fetch from the API. ++ * ++ * @example ++ * ++ * ```ts ++ * const pager = await ai.files.list({config: {pageSize: 10}}); ++ * for await (const file of pager) { ++ * console.log(file.name); ++ * } ++ * ``` ++ */ ++ [Symbol.asyncIterator](): AsyncIterator; ++ /** ++ * Fetches the next page of items. This makes a new API request. ++ * ++ * @throws {Error} If there are no more pages to fetch. ++ * ++ * @example ++ * ++ * ```ts ++ * const pager = await ai.files.list({config: {pageSize: 10}}); ++ * let page = pager.page; ++ * while (true) { ++ * for (const file of page) { ++ * console.log(file.name); ++ * } ++ * if (!pager.hasNextPage()) { ++ * break; ++ * } ++ * page = await pager.nextPage(); ++ * } ++ * ``` ++ */ ++ nextPage(): Promise; ++ /** ++ * Returns true if there are more pages to fetch from the API. ++ */ ++ hasNextPage(): boolean; ++} ++export {}; +diff --git a/dist/node/src/schema_helper.d.ts b/dist/node/src/schema_helper.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..b6a875ec8ca1530964075663d3a338edb2c0204d +--- /dev/null ++++ b/dist/node/src/schema_helper.d.ts +@@ -0,0 +1,8 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { z } from 'zod'; ++import { Schema } from './types'; ++export declare function zodToGoogleGenAISchema(isVertexAI: boolean, schema: z.ZodObject): Schema; +diff --git a/dist/node/src/types.d.ts b/dist/node/src/types.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..ef6f1c16b1fd1e43ff796dc1e3b209450ff8bd18 +--- /dev/null ++++ b/dist/node/src/types.d.ts +@@ -0,0 +1,2425 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++/** Required. Outcome of the code execution. */ ++export declare enum Outcome { ++ OUTCOME_UNSPECIFIED = "OUTCOME_UNSPECIFIED", ++ OUTCOME_OK = "OUTCOME_OK", ++ OUTCOME_FAILED = "OUTCOME_FAILED", ++ OUTCOME_DEADLINE_EXCEEDED = "OUTCOME_DEADLINE_EXCEEDED" ++} ++/** Required. Programming language of the `code`. */ ++export declare enum Language { ++ LANGUAGE_UNSPECIFIED = "LANGUAGE_UNSPECIFIED", ++ PYTHON = "PYTHON" ++} ++/** Optional. The type of the data. */ ++export declare enum Type { ++ TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED", ++ STRING = "STRING", ++ NUMBER = "NUMBER", ++ INTEGER = "INTEGER", ++ BOOLEAN = "BOOLEAN", ++ ARRAY = "ARRAY", ++ OBJECT = "OBJECT" ++} ++/** Required. Harm category. */ ++export declare enum HarmCategory { ++ HARM_CATEGORY_UNSPECIFIED = "HARM_CATEGORY_UNSPECIFIED", ++ HARM_CATEGORY_HATE_SPEECH = "HARM_CATEGORY_HATE_SPEECH", ++ HARM_CATEGORY_DANGEROUS_CONTENT = "HARM_CATEGORY_DANGEROUS_CONTENT", ++ HARM_CATEGORY_HARASSMENT = "HARM_CATEGORY_HARASSMENT", ++ HARM_CATEGORY_SEXUALLY_EXPLICIT = "HARM_CATEGORY_SEXUALLY_EXPLICIT", ++ HARM_CATEGORY_CIVIC_INTEGRITY = "HARM_CATEGORY_CIVIC_INTEGRITY" ++} ++/** Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. */ ++export declare enum HarmBlockMethod { ++ HARM_BLOCK_METHOD_UNSPECIFIED = "HARM_BLOCK_METHOD_UNSPECIFIED", ++ SEVERITY = "SEVERITY", ++ PROBABILITY = "PROBABILITY" ++} ++/** Required. The harm block threshold. */ ++export declare enum HarmBlockThreshold { ++ HARM_BLOCK_THRESHOLD_UNSPECIFIED = "HARM_BLOCK_THRESHOLD_UNSPECIFIED", ++ BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE", ++ BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE", ++ BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH", ++ BLOCK_NONE = "BLOCK_NONE", ++ OFF = "OFF" ++} ++/** The mode of the predictor to be used in dynamic retrieval. */ ++export declare enum Mode { ++ MODE_UNSPECIFIED = "MODE_UNSPECIFIED", ++ MODE_DYNAMIC = "MODE_DYNAMIC" ++} ++/** Output only. The reason why the model stopped generating tokens. ++ ++ If empty, the model has not stopped generating the tokens. ++ */ ++export declare enum FinishReason { ++ FINISH_REASON_UNSPECIFIED = "FINISH_REASON_UNSPECIFIED", ++ STOP = "STOP", ++ MAX_TOKENS = "MAX_TOKENS", ++ SAFETY = "SAFETY", ++ RECITATION = "RECITATION", ++ OTHER = "OTHER", ++ BLOCKLIST = "BLOCKLIST", ++ PROHIBITED_CONTENT = "PROHIBITED_CONTENT", ++ SPII = "SPII", ++ MALFORMED_FUNCTION_CALL = "MALFORMED_FUNCTION_CALL", ++ IMAGE_SAFETY = "IMAGE_SAFETY" ++} ++/** Output only. Harm probability levels in the content. */ ++export declare enum HarmProbability { ++ HARM_PROBABILITY_UNSPECIFIED = "HARM_PROBABILITY_UNSPECIFIED", ++ NEGLIGIBLE = "NEGLIGIBLE", ++ LOW = "LOW", ++ MEDIUM = "MEDIUM", ++ HIGH = "HIGH" ++} ++/** Output only. Harm severity levels in the content. */ ++export declare enum HarmSeverity { ++ HARM_SEVERITY_UNSPECIFIED = "HARM_SEVERITY_UNSPECIFIED", ++ HARM_SEVERITY_NEGLIGIBLE = "HARM_SEVERITY_NEGLIGIBLE", ++ HARM_SEVERITY_LOW = "HARM_SEVERITY_LOW", ++ HARM_SEVERITY_MEDIUM = "HARM_SEVERITY_MEDIUM", ++ HARM_SEVERITY_HIGH = "HARM_SEVERITY_HIGH" ++} ++/** Output only. Blocked reason. */ ++export declare enum BlockedReason { ++ BLOCKED_REASON_UNSPECIFIED = "BLOCKED_REASON_UNSPECIFIED", ++ SAFETY = "SAFETY", ++ OTHER = "OTHER", ++ BLOCKLIST = "BLOCKLIST", ++ PROHIBITED_CONTENT = "PROHIBITED_CONTENT" ++} ++/** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */ ++export declare enum TrafficType { ++ TRAFFIC_TYPE_UNSPECIFIED = "TRAFFIC_TYPE_UNSPECIFIED", ++ ON_DEMAND = "ON_DEMAND", ++ PROVISIONED_THROUGHPUT = "PROVISIONED_THROUGHPUT" ++} ++/** Server content modalities. */ ++export declare enum Modality { ++ MODALITY_UNSPECIFIED = "MODALITY_UNSPECIFIED", ++ TEXT = "TEXT", ++ IMAGE = "IMAGE", ++ AUDIO = "AUDIO" ++} ++/** The media resolution to use. */ ++export declare enum MediaResolution { ++ MEDIA_RESOLUTION_UNSPECIFIED = "MEDIA_RESOLUTION_UNSPECIFIED", ++ MEDIA_RESOLUTION_LOW = "MEDIA_RESOLUTION_LOW", ++ MEDIA_RESOLUTION_MEDIUM = "MEDIA_RESOLUTION_MEDIUM", ++ MEDIA_RESOLUTION_HIGH = "MEDIA_RESOLUTION_HIGH" ++} ++/** Options for feature selection preference. */ ++export declare enum FeatureSelectionPreference { ++ FEATURE_SELECTION_PREFERENCE_UNSPECIFIED = "FEATURE_SELECTION_PREFERENCE_UNSPECIFIED", ++ PRIORITIZE_QUALITY = "PRIORITIZE_QUALITY", ++ BALANCED = "BALANCED", ++ PRIORITIZE_COST = "PRIORITIZE_COST" ++} ++/** Config for the dynamic retrieval config mode. */ ++export declare enum DynamicRetrievalConfigMode { ++ MODE_UNSPECIFIED = "MODE_UNSPECIFIED", ++ MODE_DYNAMIC = "MODE_DYNAMIC" ++} ++/** Config for the function calling config mode. */ ++export declare enum FunctionCallingConfigMode { ++ MODE_UNSPECIFIED = "MODE_UNSPECIFIED", ++ AUTO = "AUTO", ++ ANY = "ANY", ++ NONE = "NONE" ++} ++/** Enum that controls the safety filter level for objectionable content. */ ++export declare enum SafetyFilterLevel { ++ BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE", ++ BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE", ++ BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH", ++ BLOCK_NONE = "BLOCK_NONE" ++} ++/** Enum that controls the generation of people. */ ++export declare enum PersonGeneration { ++ DONT_ALLOW = "DONT_ALLOW", ++ ALLOW_ADULT = "ALLOW_ADULT", ++ ALLOW_ALL = "ALLOW_ALL" ++} ++/** Enum that specifies the language of the text in the prompt. */ ++export declare enum ImagePromptLanguage { ++ auto = "auto", ++ en = "en", ++ ja = "ja", ++ ko = "ko", ++ hi = "hi" ++} ++/** State for the lifecycle of a File. */ ++export declare enum FileState { ++ STATE_UNSPECIFIED = "STATE_UNSPECIFIED", ++ PROCESSING = "PROCESSING", ++ ACTIVE = "ACTIVE", ++ FAILED = "FAILED" ++} ++/** Source of the File. */ ++export declare enum FileSource { ++ SOURCE_UNSPECIFIED = "SOURCE_UNSPECIFIED", ++ UPLOADED = "UPLOADED", ++ GENERATED = "GENERATED" ++} ++/** Enum representing the mask mode of a mask reference image. */ ++export declare enum MaskReferenceMode { ++ MASK_MODE_DEFAULT = "MASK_MODE_DEFAULT", ++ MASK_MODE_USER_PROVIDED = "MASK_MODE_USER_PROVIDED", ++ MASK_MODE_BACKGROUND = "MASK_MODE_BACKGROUND", ++ MASK_MODE_FOREGROUND = "MASK_MODE_FOREGROUND", ++ MASK_MODE_SEMANTIC = "MASK_MODE_SEMANTIC" ++} ++/** Enum representing the control type of a control reference image. */ ++export declare enum ControlReferenceType { ++ CONTROL_TYPE_DEFAULT = "CONTROL_TYPE_DEFAULT", ++ CONTROL_TYPE_CANNY = "CONTROL_TYPE_CANNY", ++ CONTROL_TYPE_SCRIBBLE = "CONTROL_TYPE_SCRIBBLE", ++ CONTROL_TYPE_FACE_MESH = "CONTROL_TYPE_FACE_MESH" ++} ++/** Enum representing the subject type of a subject reference image. */ ++export declare enum SubjectReferenceType { ++ SUBJECT_TYPE_DEFAULT = "SUBJECT_TYPE_DEFAULT", ++ SUBJECT_TYPE_PERSON = "SUBJECT_TYPE_PERSON", ++ SUBJECT_TYPE_ANIMAL = "SUBJECT_TYPE_ANIMAL", ++ SUBJECT_TYPE_PRODUCT = "SUBJECT_TYPE_PRODUCT" ++} ++/** Server content modalities. */ ++export declare enum MediaModality { ++ MODALITY_UNSPECIFIED = "MODALITY_UNSPECIFIED", ++ TEXT = "TEXT", ++ IMAGE = "IMAGE", ++ VIDEO = "VIDEO", ++ AUDIO = "AUDIO", ++ DOCUMENT = "DOCUMENT" ++} ++/** Start of speech sensitivity. */ ++export declare enum StartSensitivity { ++ START_SENSITIVITY_UNSPECIFIED = "START_SENSITIVITY_UNSPECIFIED", ++ START_SENSITIVITY_HIGH = "START_SENSITIVITY_HIGH", ++ START_SENSITIVITY_LOW = "START_SENSITIVITY_LOW" ++} ++/** End of speech sensitivity. */ ++export declare enum EndSensitivity { ++ END_SENSITIVITY_UNSPECIFIED = "END_SENSITIVITY_UNSPECIFIED", ++ END_SENSITIVITY_HIGH = "END_SENSITIVITY_HIGH", ++ END_SENSITIVITY_LOW = "END_SENSITIVITY_LOW" ++} ++/** The different ways of handling user activity. */ ++export declare enum ActivityHandling { ++ ACTIVITY_HANDLING_UNSPECIFIED = "ACTIVITY_HANDLING_UNSPECIFIED", ++ START_OF_ACTIVITY_INTERRUPTS = "START_OF_ACTIVITY_INTERRUPTS", ++ NO_INTERRUPTION = "NO_INTERRUPTION" ++} ++/** Options about which input is included in the user's turn. */ ++export declare enum TurnCoverage { ++ TURN_COVERAGE_UNSPECIFIED = "TURN_COVERAGE_UNSPECIFIED", ++ TURN_INCLUDES_ONLY_ACTIVITY = "TURN_INCLUDES_ONLY_ACTIVITY", ++ TURN_INCLUDES_ALL_INPUT = "TURN_INCLUDES_ALL_INPUT" ++} ++/** Metadata describes the input video content. */ ++export declare interface VideoMetadata { ++ /** Optional. The end offset of the video. */ ++ endOffset?: string; ++ /** Optional. The start offset of the video. */ ++ startOffset?: string; ++} ++/** Result of executing the [ExecutableCode]. Always follows a `part` containing the [ExecutableCode]. */ ++export declare interface CodeExecutionResult { ++ /** Required. Outcome of the code execution. */ ++ outcome?: Outcome; ++ /** Optional. Contains stdout when code execution is successful, stderr or other description otherwise. */ ++ output?: string; ++} ++/** Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the [FunctionDeclaration] tool and [FunctionCallingConfig] mode is set to [Mode.CODE]. */ ++export declare interface ExecutableCode { ++ /** Required. The code to be executed. */ ++ code?: string; ++ /** Required. Programming language of the `code`. */ ++ language?: Language; ++} ++/** URI based data. */ ++export declare interface FileData { ++ /** Required. URI. */ ++ fileUri?: string; ++ /** Required. The IANA standard MIME type of the source data. */ ++ mimeType?: string; ++} ++/** A function call. */ ++export declare interface FunctionCall { ++ /** The unique id of the function call. If populated, the client to execute the ++ `function_call` and return the response with the matching `id`. */ ++ id?: string; ++ /** Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. */ ++ args?: Record; ++ /** Required. The name of the function to call. Matches [FunctionDeclaration.name]. */ ++ name?: string; ++} ++/** A function response. */ ++export declare class FunctionResponse { ++ /** The id of the function call this response is for. Populated by the client ++ to match the corresponding function call `id`. */ ++ id?: string; ++ /** Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. */ ++ name?: string; ++ /** Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. */ ++ response?: Record; ++} ++/** Content blob. */ ++export declare interface Blob { ++ /** Required. Raw bytes. */ ++ data?: string; ++ /** Required. The IANA standard MIME type of the source data. */ ++ mimeType?: string; ++} ++/** A datatype containing media content. ++ ++ Exactly one field within a Part should be set, representing the specific type ++ of content being conveyed. Using multiple fields within the same `Part` ++ instance is considered invalid. ++ */ ++export declare interface Part { ++ /** Metadata for a given video. */ ++ videoMetadata?: VideoMetadata; ++ /** Indicates if the part is thought from the model. */ ++ thought?: boolean; ++ /** Optional. Result of executing the [ExecutableCode]. */ ++ codeExecutionResult?: CodeExecutionResult; ++ /** Optional. Code generated by the model that is meant to be executed. */ ++ executableCode?: ExecutableCode; ++ /** Optional. URI based data. */ ++ fileData?: FileData; ++ /** Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. */ ++ functionCall?: FunctionCall; ++ /** Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. */ ++ functionResponse?: FunctionResponse; ++ /** Optional. Inlined bytes data. */ ++ inlineData?: Blob; ++ /** Optional. Text part (can be code). */ ++ text?: string; ++} ++/** ++ * Creates a `Part` object from a `URI` string. ++ */ ++export declare function createPartFromUri(uri: string, mimeType: string): Part; ++/** ++ * Creates a `Part` object from a `text` string. ++ */ ++export declare function createPartFromText(text: string): Part; ++/** ++ * Creates a `Part` object from a `FunctionCall` object. ++ */ ++export declare function createPartFromFunctionCall(name: string, args: Record): Part; ++/** ++ * Creates a `Part` object from a `FunctionResponse` object. ++ */ ++export declare function createPartFromFunctionResponse(id: string, name: string, response: Record): Part; ++/** ++ * Creates a `Part` object from a `base64` encoded `string`. ++ */ ++export declare function createPartFromBase64(data: string, mimeType: string): Part; ++/** ++ * Creates a `Part` object from the `outcome` and `output` of a `CodeExecutionResult` object. ++ */ ++export declare function createPartFromCodeExecutionResult(outcome: Outcome, output: string): Part; ++/** ++ * Creates a `Part` object from the `code` and `language` of an `ExecutableCode` object. ++ */ ++export declare function createPartFromExecutableCode(code: string, language: Language): Part; ++/** Contains the multi-part content of a message. */ ++export declare interface Content { ++ /** List of parts that constitute a single message. Each part may have ++ a different IANA MIME type. */ ++ parts?: Part[]; ++ /** Optional. The producer of the content. Must be either 'user' or ++ 'model'. Useful to set for multi-turn conversations, otherwise can be ++ empty. If role is not specified, SDK will determine the role. */ ++ role?: string; ++} ++/** ++ * Creates a `Content` object with a user role from a `PartListUnion` object or `string`. ++ */ ++export declare function createUserContent(partOrString: PartListUnion | string): Content; ++/** ++ * Creates a `Content` object with a model role from a `PartListUnion` object or `string`. ++ */ ++export declare function createModelContent(partOrString: PartListUnion | string): Content; ++/** HTTP options to be used in each of the requests. */ ++export declare interface HttpOptions { ++ /** The base URL for the AI platform service endpoint. */ ++ baseUrl?: string; ++ /** Specifies the version of the API to use. */ ++ apiVersion?: string; ++ /** Additional HTTP headers to be sent with the request. */ ++ headers?: Record; ++ /** Timeout for the request in milliseconds. */ ++ timeout?: number; ++ /** Signal for the request. */ ++ signal?: AbortSignal; ++} ++/** Schema that defines the format of input and output data. ++ ++ Represents a select subset of an OpenAPI 3.0 schema object. ++ */ ++export declare interface Schema { ++ /** Optional. Example of the object. Will only populated when the object is the root. */ ++ example?: unknown; ++ /** Optional. Pattern of the Type.STRING to restrict a string to a regular expression. */ ++ pattern?: string; ++ /** Optional. Default value of the data. */ ++ default?: unknown; ++ /** Optional. Maximum length of the Type.STRING */ ++ maxLength?: string; ++ /** Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING */ ++ minLength?: string; ++ /** Optional. Minimum number of the properties for Type.OBJECT. */ ++ minProperties?: string; ++ /** Optional. Maximum number of the properties for Type.OBJECT. */ ++ maxProperties?: string; ++ /** Optional. The value should be validated against any (one or more) of the subschemas in the list. */ ++ anyOf?: Schema[]; ++ /** Optional. The description of the data. */ ++ description?: string; ++ /** Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} */ ++ enum?: string[]; ++ /** Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc */ ++ format?: string; ++ /** Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. */ ++ items?: Schema; ++ /** Optional. Maximum number of the elements for Type.ARRAY. */ ++ maxItems?: string; ++ /** Optional. Maximum value of the Type.INTEGER and Type.NUMBER */ ++ maximum?: number; ++ /** Optional. Minimum number of the elements for Type.ARRAY. */ ++ minItems?: string; ++ /** Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER */ ++ minimum?: number; ++ /** Optional. Indicates if the value may be null. */ ++ nullable?: boolean; ++ /** Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. */ ++ properties?: Record; ++ /** Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. */ ++ propertyOrdering?: string[]; ++ /** Optional. Required properties of Type.OBJECT. */ ++ required?: string[]; ++ /** Optional. The title of the Schema. */ ++ title?: string; ++ /** Optional. The type of the data. */ ++ type?: Type; ++} ++/** Config for model selection. */ ++export declare interface ModelSelectionConfig { ++ /** Options for feature selection preference. */ ++ featureSelectionPreference?: FeatureSelectionPreference; ++} ++/** Safety settings. */ ++export declare interface SafetySetting { ++ /** Determines if the harm block method uses probability or probability ++ and severity scores. */ ++ method?: HarmBlockMethod; ++ /** Required. Harm category. */ ++ category?: HarmCategory; ++ /** Required. The harm block threshold. */ ++ threshold?: HarmBlockThreshold; ++} ++/** Defines a function that the model can generate JSON inputs for. ++ ++ The inputs are based on `OpenAPI 3.0 specifications ++ `_. ++ */ ++export declare interface FunctionDeclaration { ++ /** Describes the output from the function in the OpenAPI JSON Schema ++ Object format. */ ++ response?: Schema; ++ /** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */ ++ description?: string; ++ /** Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. */ ++ name?: string; ++ /** Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 */ ++ parameters?: Schema; ++} ++/** Tool to support Google Search in Model. Powered by Google. */ ++export declare interface GoogleSearch { ++} ++/** Describes the options to customize dynamic retrieval. */ ++export declare interface DynamicRetrievalConfig { ++ /** The mode of the predictor to be used in dynamic retrieval. */ ++ mode?: DynamicRetrievalConfigMode; ++ /** Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used. */ ++ dynamicThreshold?: number; ++} ++/** Tool to retrieve public web data for grounding, powered by Google. */ ++export declare interface GoogleSearchRetrieval { ++ /** Specifies the dynamic retrieval configuration for the given source. */ ++ dynamicRetrievalConfig?: DynamicRetrievalConfig; ++} ++/** Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder */ ++export declare interface VertexAISearch { ++ /** Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` */ ++ datastore?: string; ++ /** Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` */ ++ engine?: string; ++} ++/** The definition of the Rag resource. */ ++export declare interface VertexRagStoreRagResource { ++ /** Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` */ ++ ragCorpus?: string; ++ /** Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field. */ ++ ragFileIds?: string[]; ++} ++/** Config for filters. */ ++export declare interface RagRetrievalConfigFilter { ++ /** Optional. String for metadata filtering. */ ++ metadataFilter?: string; ++ /** Optional. Only returns contexts with vector distance smaller than the threshold. */ ++ vectorDistanceThreshold?: number; ++ /** Optional. Only returns contexts with vector similarity larger than the threshold. */ ++ vectorSimilarityThreshold?: number; ++} ++/** Config for Hybrid Search. */ ++export declare interface RagRetrievalConfigHybridSearch { ++ /** Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally. */ ++ alpha?: number; ++} ++/** Config for LlmRanker. */ ++export declare interface RagRetrievalConfigRankingLlmRanker { ++ /** Optional. The model name used for ranking. Format: `gemini-1.5-pro` */ ++ modelName?: string; ++} ++/** Config for Rank Service. */ ++export declare interface RagRetrievalConfigRankingRankService { ++ /** Optional. The model name of the rank service. Format: `semantic-ranker-512@latest` */ ++ modelName?: string; ++} ++/** Config for ranking and reranking. */ ++export declare interface RagRetrievalConfigRanking { ++ /** Optional. Config for LlmRanker. */ ++ llmRanker?: RagRetrievalConfigRankingLlmRanker; ++ /** Optional. Config for Rank Service. */ ++ rankService?: RagRetrievalConfigRankingRankService; ++} ++/** Specifies the context retrieval config. */ ++export declare interface RagRetrievalConfig { ++ /** Optional. Config for filters. */ ++ filter?: RagRetrievalConfigFilter; ++ /** Optional. Config for Hybrid Search. */ ++ hybridSearch?: RagRetrievalConfigHybridSearch; ++ /** Optional. Config for ranking and reranking. */ ++ ranking?: RagRetrievalConfigRanking; ++ /** Optional. The number of contexts to retrieve. */ ++ topK?: number; ++} ++/** Retrieve from Vertex RAG Store for grounding. */ ++export declare interface VertexRagStore { ++ /** Optional. Deprecated. Please use rag_resources instead. */ ++ ragCorpora?: string[]; ++ /** Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. */ ++ ragResources?: VertexRagStoreRagResource[]; ++ /** Optional. The retrieval config for the Rag query. */ ++ ragRetrievalConfig?: RagRetrievalConfig; ++ /** Optional. Number of top k results to return from the selected corpora. */ ++ similarityTopK?: number; ++ /** Optional. Only return results with vector distance smaller than the threshold. */ ++ vectorDistanceThreshold?: number; ++} ++/** Defines a retrieval tool that model can call to access external knowledge. */ ++export declare interface Retrieval { ++ /** Optional. Deprecated. This option is no longer supported. */ ++ disableAttribution?: boolean; ++ /** Set to use data source powered by Vertex AI Search. */ ++ vertexAiSearch?: VertexAISearch; ++ /** Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService. */ ++ vertexRagStore?: VertexRagStore; ++} ++/** Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. */ ++export declare interface ToolCodeExecution { ++} ++/** Tool details of a tool that the model may use to generate a response. */ ++export declare interface Tool { ++ /** List of function declarations that the tool supports. */ ++ functionDeclarations?: FunctionDeclaration[]; ++ /** Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. */ ++ retrieval?: Retrieval; ++ /** Optional. Google Search tool type. Specialized retrieval tool ++ that is powered by Google Search. */ ++ googleSearch?: GoogleSearch; ++ /** Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. */ ++ googleSearchRetrieval?: GoogleSearchRetrieval; ++ /** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services. */ ++ codeExecution?: ToolCodeExecution; ++} ++/** Function calling config. */ ++export declare interface FunctionCallingConfig { ++ /** Optional. Function calling mode. */ ++ mode?: FunctionCallingConfigMode; ++ /** Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided. */ ++ allowedFunctionNames?: string[]; ++} ++/** Tool config. ++ ++ This config is shared for all tools provided in the request. ++ */ ++export declare interface ToolConfig { ++ /** Optional. Function calling config. */ ++ functionCallingConfig?: FunctionCallingConfig; ++} ++/** The configuration for the prebuilt speaker to use. */ ++export declare interface PrebuiltVoiceConfig { ++ /** The name of the prebuilt voice to use. ++ */ ++ voiceName?: string; ++} ++/** The configuration for the voice to use. */ ++export declare interface VoiceConfig { ++ /** The configuration for the speaker to use. ++ */ ++ prebuiltVoiceConfig?: PrebuiltVoiceConfig; ++} ++/** The speech generation configuration. */ ++export declare interface SpeechConfig { ++ /** The configuration for the speaker to use. ++ */ ++ voiceConfig?: VoiceConfig; ++ /** Language code (ISO 639. e.g. en-US) for the speech synthesization. ++ Only available for Live API. ++ */ ++ languageCode?: string; ++} ++/** The thinking features configuration. */ ++export declare interface ThinkingConfig { ++ /** Indicates whether to include thoughts in the response. If true, thoughts are returned only if the model supports thought and thoughts are available. ++ */ ++ includeThoughts?: boolean; ++ /** Indicates the thinking budget in tokens. ++ */ ++ thinkingBudget?: number; ++} ++/** When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. */ ++export declare interface GenerationConfigRoutingConfigAutoRoutingMode { ++ /** The model routing preference. */ ++ modelRoutingPreference?: 'UNKNOWN' | 'PRIORITIZE_QUALITY' | 'BALANCED' | 'PRIORITIZE_COST'; ++} ++/** When manual routing is set, the specified model will be used directly. */ ++export declare interface GenerationConfigRoutingConfigManualRoutingMode { ++ /** The model name to use. Only the public LLM models are accepted. e.g. 'gemini-1.5-pro-001'. */ ++ modelName?: string; ++} ++/** The configuration for routing the request to a specific model. */ ++export declare interface GenerationConfigRoutingConfig { ++ /** Automated routing. */ ++ autoMode?: GenerationConfigRoutingConfigAutoRoutingMode; ++ /** Manual routing. */ ++ manualMode?: GenerationConfigRoutingConfigManualRoutingMode; ++} ++/** Optional model configuration parameters. ++ ++ For more information, see `Content generation parameters ++ `_. ++ */ ++export declare interface GenerateContentConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** Instructions for the model to steer it toward better performance. ++ For example, "Answer as concisely as possible" or "Don't use technical ++ terms in your response". ++ */ ++ systemInstruction?: ContentUnion; ++ /** Value that controls the degree of randomness in token selection. ++ Lower temperatures are good for prompts that require a less open-ended or ++ creative response, while higher temperatures can lead to more diverse or ++ creative results. ++ */ ++ temperature?: number; ++ /** Tokens are selected from the most to least probable until the sum ++ of their probabilities equals this value. Use a lower value for less ++ random responses and a higher value for more random responses. ++ */ ++ topP?: number; ++ /** For each token selection step, the ``top_k`` tokens with the ++ highest probabilities are sampled. Then tokens are further filtered based ++ on ``top_p`` with the final token selected using temperature sampling. Use ++ a lower number for less random responses and a higher number for more ++ random responses. ++ */ ++ topK?: number; ++ /** Number of response variations to return. ++ */ ++ candidateCount?: number; ++ /** Maximum number of tokens that can be generated in the response. ++ */ ++ maxOutputTokens?: number; ++ /** List of strings that tells the model to stop generating text if one ++ of the strings is encountered in the response. ++ */ ++ stopSequences?: string[]; ++ /** Whether to return the log probabilities of the tokens that were ++ chosen by the model at each step. ++ */ ++ responseLogprobs?: boolean; ++ /** Number of top candidate tokens to return the log probabilities for ++ at each generation step. ++ */ ++ logprobs?: number; ++ /** Positive values penalize tokens that already appear in the ++ generated text, increasing the probability of generating more diverse ++ content. ++ */ ++ presencePenalty?: number; ++ /** Positive values penalize tokens that repeatedly appear in the ++ generated text, increasing the probability of generating more diverse ++ content. ++ */ ++ frequencyPenalty?: number; ++ /** When ``seed`` is fixed to a specific number, the model makes a best ++ effort to provide the same response for repeated requests. By default, a ++ random number is used. ++ */ ++ seed?: number; ++ /** Output response media type of the generated candidate text. ++ */ ++ responseMimeType?: string; ++ /** Schema that the generated candidate text must adhere to. ++ */ ++ responseSchema?: SchemaUnion; ++ /** Configuration for model router requests. ++ */ ++ routingConfig?: GenerationConfigRoutingConfig; ++ /** Configuration for model selection. ++ */ ++ modelSelectionConfig?: ModelSelectionConfig; ++ /** Safety settings in the request to block unsafe content in the ++ response. ++ */ ++ safetySettings?: SafetySetting[]; ++ /** Code that enables the system to interact with external systems to ++ perform an action outside of the knowledge and scope of the model. ++ */ ++ tools?: ToolListUnion; ++ /** Associates model output to a specific function call. ++ */ ++ toolConfig?: ToolConfig; ++ /** Labels with user-defined metadata to break down billed charges. */ ++ labels?: Record; ++ /** Resource name of a context cache that can be used in subsequent ++ requests. ++ */ ++ cachedContent?: string; ++ /** The requested modalities of the response. Represents the set of ++ modalities that the model can return. ++ */ ++ responseModalities?: string[]; ++ /** If specified, the media resolution specified will be used. ++ */ ++ mediaResolution?: MediaResolution; ++ /** The speech generation configuration. ++ */ ++ speechConfig?: SpeechConfigUnion; ++ /** If enabled, audio timestamp will be included in the request to the ++ model. ++ */ ++ audioTimestamp?: boolean; ++ /** The thinking features configuration. ++ */ ++ thinkingConfig?: ThinkingConfig; ++} ++/** Config for models.generate_content parameters. */ ++export declare interface GenerateContentParameters { ++ /** ID of the model to use. For a list of models, see `Google models ++ `_. */ ++ model: string; ++ /** Content of the request. ++ */ ++ contents: ContentListUnion; ++ /** Configuration that contains optional model parameters. ++ */ ++ config?: GenerateContentConfig; ++} ++/** Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp */ ++export declare interface GoogleTypeDate { ++ /** Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */ ++ day?: number; ++ /** Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */ ++ month?: number; ++ /** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */ ++ year?: number; ++} ++/** Source attributions for content. */ ++export declare interface Citation { ++ /** Output only. End index into the content. */ ++ endIndex?: number; ++ /** Output only. License of the attribution. */ ++ license?: string; ++ /** Output only. Publication date of the attribution. */ ++ publicationDate?: GoogleTypeDate; ++ /** Output only. Start index into the content. */ ++ startIndex?: number; ++ /** Output only. Title of the attribution. */ ++ title?: string; ++ /** Output only. Url reference of the attribution. */ ++ uri?: string; ++} ++/** Citation information when the model quotes another source. */ ++export declare interface CitationMetadata { ++ /** Contains citation information when the model directly quotes, at ++ length, from another source. Can include traditional websites and code ++ repositories. ++ */ ++ citations?: Citation[]; ++} ++/** Chunk from context retrieved by the retrieval tools. */ ++export declare interface GroundingChunkRetrievedContext { ++ /** Text of the attribution. */ ++ text?: string; ++ /** Title of the attribution. */ ++ title?: string; ++ /** URI reference of the attribution. */ ++ uri?: string; ++} ++/** Chunk from the web. */ ++export declare interface GroundingChunkWeb { ++ /** Domain of the (original) URI. */ ++ domain?: string; ++ /** Title of the chunk. */ ++ title?: string; ++ /** URI reference of the chunk. */ ++ uri?: string; ++} ++/** Grounding chunk. */ ++export declare interface GroundingChunk { ++ /** Grounding chunk from context retrieved by the retrieval tools. */ ++ retrievedContext?: GroundingChunkRetrievedContext; ++ /** Grounding chunk from the web. */ ++ web?: GroundingChunkWeb; ++} ++/** Segment of the content. */ ++export declare interface Segment { ++ /** Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero. */ ++ endIndex?: number; ++ /** Output only. The index of a Part object within its parent Content object. */ ++ partIndex?: number; ++ /** Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero. */ ++ startIndex?: number; ++ /** Output only. The text corresponding to the segment from the response. */ ++ text?: string; ++} ++/** Grounding support. */ ++export declare interface GroundingSupport { ++ /** Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the grounding_chunk_indices. */ ++ confidenceScores?: number[]; ++ /** A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim. */ ++ groundingChunkIndices?: number[]; ++ /** Segment of the content this support belongs to. */ ++ segment?: Segment; ++} ++/** Metadata related to retrieval in the grounding flow. */ ++export declare interface RetrievalMetadata { ++ /** Optional. Score indicating how likely information from Google Search could help answer the prompt. The score is in the range `[0, 1]`, where 0 is the least likely and 1 is the most likely. This score is only populated when Google Search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger Google Search. */ ++ googleSearchDynamicRetrievalScore?: number; ++} ++/** Google search entry point. */ ++export declare interface SearchEntryPoint { ++ /** Optional. Web content snippet that can be embedded in a web page or an app webview. */ ++ renderedContent?: string; ++ /** Optional. Base64 encoded JSON representing array of tuple. */ ++ sdkBlob?: string; ++} ++/** Metadata returned to client when grounding is enabled. */ ++export declare interface GroundingMetadata { ++ /** List of supporting references retrieved from specified grounding source. */ ++ groundingChunks?: GroundingChunk[]; ++ /** Optional. List of grounding support. */ ++ groundingSupports?: GroundingSupport[]; ++ /** Optional. Output only. Retrieval metadata. */ ++ retrievalMetadata?: RetrievalMetadata; ++ /** Optional. Queries executed by the retrieval tools. */ ++ retrievalQueries?: string[]; ++ /** Optional. Google search entry for the following-up web searches. */ ++ searchEntryPoint?: SearchEntryPoint; ++ /** Optional. Web search queries for the following-up web search. */ ++ webSearchQueries?: string[]; ++} ++/** Candidate for the logprobs token and score. */ ++export declare interface LogprobsResultCandidate { ++ /** The candidate's log probability. */ ++ logProbability?: number; ++ /** The candidate's token string value. */ ++ token?: string; ++ /** The candidate's token id value. */ ++ tokenId?: number; ++} ++/** Candidates with top log probabilities at each decoding step. */ ++export declare interface LogprobsResultTopCandidates { ++ /** Sorted by log probability in descending order. */ ++ candidates?: LogprobsResultCandidate[]; ++} ++/** Logprobs Result */ ++export declare interface LogprobsResult { ++ /** Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates. */ ++ chosenCandidates?: LogprobsResultCandidate[]; ++ /** Length = total number of decoding steps. */ ++ topCandidates?: LogprobsResultTopCandidates[]; ++} ++/** Safety rating corresponding to the generated content. */ ++export declare interface SafetyRating { ++ /** Output only. Indicates whether the content was filtered out because of this rating. */ ++ blocked?: boolean; ++ /** Output only. Harm category. */ ++ category?: HarmCategory; ++ /** Output only. Harm probability levels in the content. */ ++ probability?: HarmProbability; ++ /** Output only. Harm probability score. */ ++ probabilityScore?: number; ++ /** Output only. Harm severity levels in the content. */ ++ severity?: HarmSeverity; ++ /** Output only. Harm severity score. */ ++ severityScore?: number; ++} ++/** A response candidate generated from the model. */ ++export declare interface Candidate { ++ /** Contains the multi-part content of the response. ++ */ ++ content?: Content; ++ /** Source attribution of the generated content. ++ */ ++ citationMetadata?: CitationMetadata; ++ /** Describes the reason the model stopped generating tokens. ++ */ ++ finishMessage?: string; ++ /** Number of tokens for this candidate. ++ */ ++ tokenCount?: number; ++ /** The reason why the model stopped generating tokens. ++ If empty, the model has not stopped generating the tokens. ++ */ ++ finishReason?: FinishReason; ++ /** Output only. Average log probability score of the candidate. */ ++ avgLogprobs?: number; ++ /** Output only. Metadata specifies sources used to ground generated content. */ ++ groundingMetadata?: GroundingMetadata; ++ /** Output only. Index of the candidate. */ ++ index?: number; ++ /** Output only. Log-likelihood scores for the response tokens and top tokens */ ++ logprobsResult?: LogprobsResult; ++ /** Output only. List of ratings for the safety of a response candidate. There is at most one rating per category. */ ++ safetyRatings?: SafetyRating[]; ++} ++/** Content filter results for a prompt sent in the request. */ ++export declare class GenerateContentResponsePromptFeedback { ++ /** Output only. Blocked reason. */ ++ blockReason?: BlockedReason; ++ /** Output only. A readable block reason message. */ ++ blockReasonMessage?: string; ++ /** Output only. Safety ratings. */ ++ safetyRatings?: SafetyRating[]; ++} ++/** Represents token counting info for a single modality. */ ++export declare interface ModalityTokenCount { ++ /** The modality associated with this token count. */ ++ modality?: MediaModality; ++ /** Number of tokens. */ ++ tokenCount?: number; ++} ++/** Usage metadata about response(s). */ ++export declare class GenerateContentResponseUsageMetadata { ++ /** Output only. List of modalities of the cached content in the request input. */ ++ cacheTokensDetails?: ModalityTokenCount[]; ++ /** Output only. Number of tokens in the cached part in the input (the cached content). */ ++ cachedContentTokenCount?: number; ++ /** Number of tokens in the response(s). */ ++ candidatesTokenCount?: number; ++ /** Output only. List of modalities that were returned in the response. */ ++ candidatesTokensDetails?: ModalityTokenCount[]; ++ /** Number of tokens in the request. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */ ++ promptTokenCount?: number; ++ /** Output only. List of modalities that were processed in the request input. */ ++ promptTokensDetails?: ModalityTokenCount[]; ++ /** Output only. Number of tokens present in thoughts output. */ ++ thoughtsTokenCount?: number; ++ /** Output only. Number of tokens present in tool-use prompt(s). */ ++ toolUsePromptTokenCount?: number; ++ /** Output only. List of modalities that were processed for tool-use request inputs. */ ++ toolUsePromptTokensDetails?: ModalityTokenCount[]; ++ /** Total token count for prompt, response candidates, and tool-use prompts (if present). */ ++ totalTokenCount?: number; ++ /** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */ ++ trafficType?: TrafficType; ++} ++/** Response message for PredictionService.GenerateContent. */ ++export declare class GenerateContentResponse { ++ /** Response variations returned by the model. ++ */ ++ candidates?: Candidate[]; ++ /** Timestamp when the request is made to the server. ++ */ ++ createTime?: string; ++ /** Identifier for each response. ++ */ ++ responseId?: string; ++ /** Output only. The model version used to generate the response. */ ++ modelVersion?: string; ++ /** Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations. */ ++ promptFeedback?: GenerateContentResponsePromptFeedback; ++ /** Usage metadata about the response(s). */ ++ usageMetadata?: GenerateContentResponseUsageMetadata; ++ /** ++ * Returns the concatenation of all text parts from the first candidate in the response. ++ * ++ * @remarks ++ * If there are multiple candidates in the response, the text from the first ++ * one will be returned. ++ * If there are non-text parts in the response, the concatenation of all text ++ * parts will be returned, and a warning will be logged. ++ * If there are thought parts in the response, the concatenation of all text ++ * parts excluding the thought parts will be returned. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.generateContent({ ++ * model: 'gemini-2.0-flash', ++ * contents: ++ * 'Why is the sky blue?', ++ * }); ++ * ++ * console.debug(response.text); ++ * ``` ++ */ ++ get text(): string | undefined; ++ /** ++ * Returns the function calls from the first candidate in the response. ++ * ++ * @remarks ++ * If there are multiple candidates in the response, the function calls from ++ * the first one will be returned. ++ * If there are no function calls in the response, undefined will be returned. ++ * ++ * @example ++ * ```ts ++ * const controlLightFunctionDeclaration: FunctionDeclaration = { ++ * name: 'controlLight', ++ * parameters: { ++ * type: Type.OBJECT, ++ * description: 'Set the brightness and color temperature of a room light.', ++ * properties: { ++ * brightness: { ++ * type: Type.NUMBER, ++ * description: ++ * 'Light level from 0 to 100. Zero is off and 100 is full brightness.', ++ * }, ++ * colorTemperature: { ++ * type: Type.STRING, ++ * description: ++ * 'Color temperature of the light fixture which can be `daylight`, `cool` or `warm`.', ++ * }, ++ * }, ++ * required: ['brightness', 'colorTemperature'], ++ * }; ++ * const response = await ai.models.generateContent({ ++ * model: 'gemini-2.0-flash', ++ * contents: 'Dim the lights so the room feels cozy and warm.', ++ * config: { ++ * tools: [{functionDeclarations: [controlLightFunctionDeclaration]}], ++ * toolConfig: { ++ * functionCallingConfig: { ++ * mode: FunctionCallingConfigMode.ANY, ++ * allowedFunctionNames: ['controlLight'], ++ * }, ++ * }, ++ * }, ++ * }); ++ * console.debug(JSON.stringify(response.functionCalls)); ++ * ``` ++ */ ++ get functionCalls(): FunctionCall[] | undefined; ++ /** ++ * Returns the first executable code from the first candidate in the response. ++ * ++ * @remarks ++ * If there are multiple candidates in the response, the executable code from ++ * the first one will be returned. ++ * If there are no executable code in the response, undefined will be ++ * returned. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.generateContent({ ++ * model: 'gemini-2.0-flash', ++ * contents: ++ * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.' ++ * config: { ++ * tools: [{codeExecution: {}}], ++ * }, ++ * }); ++ * ++ * console.debug(response.executableCode); ++ * ``` ++ */ ++ get executableCode(): string | undefined; ++ /** ++ * Returns the first code execution result from the first candidate in the response. ++ * ++ * @remarks ++ * If there are multiple candidates in the response, the code execution result from ++ * the first one will be returned. ++ * If there are no code execution result in the response, undefined will be returned. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.generateContent({ ++ * model: 'gemini-2.0-flash', ++ * contents: ++ * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.' ++ * config: { ++ * tools: [{codeExecution: {}}], ++ * }, ++ * }); ++ * ++ * console.debug(response.codeExecutionResult); ++ * ``` ++ */ ++ get codeExecutionResult(): string | undefined; ++} ++export /** Optional parameters for the embed_content method. */ declare interface EmbedContentConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** Type of task for which the embedding will be used. ++ */ ++ taskType?: string; ++ /** Title for the text. Only applicable when TaskType is ++ `RETRIEVAL_DOCUMENT`. ++ */ ++ title?: string; ++ /** Reduced dimension for the output embedding. If set, ++ excessive values in the output embedding are truncated from the end. ++ Supported by newer models since 2024 only. You cannot set this value if ++ using the earlier model (`models/embedding-001`). ++ */ ++ outputDimensionality?: number; ++ /** Vertex API only. The MIME type of the input. ++ */ ++ mimeType?: string; ++ /** Vertex API only. Whether to silently truncate inputs longer than ++ the max sequence length. If this option is set to false, oversized inputs ++ will lead to an INVALID_ARGUMENT error, similar to other text APIs. ++ */ ++ autoTruncate?: boolean; ++} ++/** Parameters for the embed_content method. */ ++export declare interface EmbedContentParameters { ++ /** ID of the model to use. For a list of models, see `Google models ++ `_. */ ++ model: string; ++ /** The content to embed. Only the `parts.text` fields will be counted. ++ */ ++ contents: ContentListUnion; ++ /** Configuration that contains optional parameters. ++ */ ++ config?: EmbedContentConfig; ++} ++/** Statistics of the input text associated with the result of content embedding. */ ++export declare interface ContentEmbeddingStatistics { ++ /** Vertex API only. If the input text was truncated due to having ++ a length longer than the allowed maximum input. ++ */ ++ truncated?: boolean; ++ /** Vertex API only. Number of tokens of the input text. ++ */ ++ tokenCount?: number; ++} ++/** The embedding generated from an input content. */ ++export declare interface ContentEmbedding { ++ /** A list of floats representing an embedding. ++ */ ++ values?: number[]; ++ /** Vertex API only. Statistics of the input text associated with this ++ embedding. ++ */ ++ statistics?: ContentEmbeddingStatistics; ++} ++/** Request-level metadata for the Vertex Embed Content API. */ ++export declare interface EmbedContentMetadata { ++ /** Vertex API only. The total number of billable characters included ++ in the request. ++ */ ++ billableCharacterCount?: number; ++} ++/** Response for the embed_content method. */ ++export declare class EmbedContentResponse { ++ /** The embeddings for each request, in the same order as provided in ++ the batch request. ++ */ ++ embeddings?: ContentEmbedding[]; ++ /** Vertex API only. Metadata about the request. ++ */ ++ metadata?: EmbedContentMetadata; ++} ++/** The config for generating an images. */ ++export declare interface GenerateImagesConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** Cloud Storage URI used to store the generated images. ++ */ ++ outputGcsUri?: string; ++ /** Description of what to discourage in the generated images. ++ */ ++ negativePrompt?: string; ++ /** Number of images to generate. ++ */ ++ numberOfImages?: number; ++ /** Aspect ratio of the generated images. ++ */ ++ aspectRatio?: string; ++ /** Controls how much the model adheres to the text prompt. Large ++ values increase output and prompt alignment, but may compromise image ++ quality. ++ */ ++ guidanceScale?: number; ++ /** Random seed for image generation. This is not available when ++ ``add_watermark`` is set to true. ++ */ ++ seed?: number; ++ /** Filter level for safety filtering. ++ */ ++ safetyFilterLevel?: SafetyFilterLevel; ++ /** Allows generation of people by the model. ++ */ ++ personGeneration?: PersonGeneration; ++ /** Whether to report the safety scores of each generated image and ++ the positive prompt in the response. ++ */ ++ includeSafetyAttributes?: boolean; ++ /** Whether to include the Responsible AI filter reason if the image ++ is filtered out of the response. ++ */ ++ includeRaiReason?: boolean; ++ /** Language of the text in the prompt. ++ */ ++ language?: ImagePromptLanguage; ++ /** MIME type of the generated image. ++ */ ++ outputMimeType?: string; ++ /** Compression quality of the generated image (for ``image/jpeg`` ++ only). ++ */ ++ outputCompressionQuality?: number; ++ /** Whether to add a watermark to the generated images. ++ */ ++ addWatermark?: boolean; ++ /** Whether to use the prompt rewriting logic. ++ */ ++ enhancePrompt?: boolean; ++} ++/** The parameters for generating images. */ ++export declare interface GenerateImagesParameters { ++ /** ID of the model to use. For a list of models, see `Google models ++ `_. */ ++ model: string; ++ /** Text prompt that typically describes the images to output. ++ */ ++ prompt: string; ++ /** Configuration for generating images. ++ */ ++ config?: GenerateImagesConfig; ++} ++/** An image. */ ++export declare interface Image { ++ /** The Cloud Storage URI of the image. ``Image`` can contain a value ++ for this field or the ``image_bytes`` field but not both. ++ */ ++ gcsUri?: string; ++ /** The image bytes data. ``Image`` can contain a value for this field ++ or the ``gcs_uri`` field but not both. ++ */ ++ imageBytes?: string; ++ /** The MIME type of the image. */ ++ mimeType?: string; ++} ++/** Safety attributes of a GeneratedImage or the user-provided prompt. */ ++export declare interface SafetyAttributes { ++ /** List of RAI categories. ++ */ ++ categories?: string[]; ++ /** List of scores of each categories. ++ */ ++ scores?: number[]; ++ /** Internal use only. ++ */ ++ contentType?: string; ++} ++/** An output image. */ ++export declare interface GeneratedImage { ++ /** The output image data. ++ */ ++ image?: Image; ++ /** Responsible AI filter reason if the image is filtered out of the ++ response. ++ */ ++ raiFilteredReason?: string; ++ /** Safety attributes of the image. Lists of RAI categories and their ++ scores of each content. ++ */ ++ safetyAttributes?: SafetyAttributes; ++ /** The rewritten prompt used for the image generation if the prompt ++ enhancer is enabled. ++ */ ++ enhancedPrompt?: string; ++} ++/** The output images response. */ ++export declare class GenerateImagesResponse { ++ /** List of generated images. ++ */ ++ generatedImages?: GeneratedImage[]; ++ /** Safety attributes of the positive prompt. Only populated if ++ ``include_safety_attributes`` is set to True. ++ */ ++ positivePromptSafetyAttributes?: SafetyAttributes; ++} ++/** Optional parameters for models.get method. */ ++export declare interface GetModelConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++export declare interface GetModelParameters { ++ model: string; ++ /** Optional parameters for the request. */ ++ config?: GetModelConfig; ++} ++/** An endpoint where you deploy models. */ ++export declare interface Endpoint { ++ /** Resource name of the endpoint. */ ++ name?: string; ++ /** ID of the model that's deployed to the endpoint. */ ++ deployedModelId?: string; ++} ++/** A tuned machine learning model. */ ++export declare interface TunedModelInfo { ++ /** ID of the base model that you want to tune. */ ++ baseModel?: string; ++ /** Date and time when the base model was created. */ ++ createTime?: string; ++ /** Date and time when the base model was last updated. */ ++ updateTime?: string; ++} ++/** A trained machine learning model. */ ++export declare interface Model { ++ /** Resource name of the model. */ ++ name?: string; ++ /** Display name of the model. */ ++ displayName?: string; ++ /** Description of the model. */ ++ description?: string; ++ /** Version ID of the model. A new version is committed when a new ++ model version is uploaded or trained under an existing model ID. The ++ version ID is an auto-incrementing decimal number in string ++ representation. */ ++ version?: string; ++ /** List of deployed models created from this base model. Note that a ++ model could have been deployed to endpoints in different locations. */ ++ endpoints?: Endpoint[]; ++ /** Labels with user-defined metadata to organize your models. */ ++ labels?: Record; ++ /** Information about the tuned model from the base model. */ ++ tunedModelInfo?: TunedModelInfo; ++ /** The maximum number of input tokens that the model can handle. */ ++ inputTokenLimit?: number; ++ /** The maximum number of output tokens that the model can generate. */ ++ outputTokenLimit?: number; ++ /** List of actions that are supported by the model. */ ++ supportedActions?: string[]; ++} ++/** Generation config. */ ++export declare interface GenerationConfig { ++ /** Optional. If enabled, audio timestamp will be included in the request to the model. */ ++ audioTimestamp?: boolean; ++ /** Optional. Number of candidates to generate. */ ++ candidateCount?: number; ++ /** Optional. Frequency penalties. */ ++ frequencyPenalty?: number; ++ /** Optional. Logit probabilities. */ ++ logprobs?: number; ++ /** Optional. The maximum number of output tokens to generate per message. */ ++ maxOutputTokens?: number; ++ /** Optional. If specified, the media resolution specified will be used. */ ++ mediaResolution?: MediaResolution; ++ /** Optional. Positive penalties. */ ++ presencePenalty?: number; ++ /** Optional. If true, export the logprobs results in response. */ ++ responseLogprobs?: boolean; ++ /** Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature. */ ++ responseMimeType?: string; ++ /** Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response. */ ++ responseSchema?: Schema; ++ /** Optional. Routing configuration. */ ++ routingConfig?: GenerationConfigRoutingConfig; ++ /** Optional. Seed. */ ++ seed?: number; ++ /** Optional. Stop sequences. */ ++ stopSequences?: string[]; ++ /** Optional. Controls the randomness of predictions. */ ++ temperature?: number; ++ /** Optional. If specified, top-k sampling will be used. */ ++ topK?: number; ++ /** Optional. If specified, nucleus sampling will be used. */ ++ topP?: number; ++} ++/** Config for the count_tokens method. */ ++export declare interface CountTokensConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** Instructions for the model to steer it toward better performance. ++ */ ++ systemInstruction?: ContentUnion; ++ /** Code that enables the system to interact with external systems to ++ perform an action outside of the knowledge and scope of the model. ++ */ ++ tools?: Tool[]; ++ /** Configuration that the model uses to generate the response. Not ++ supported by the Gemini Developer API. ++ */ ++ generationConfig?: GenerationConfig; ++} ++/** Parameters for counting tokens. */ ++export declare interface CountTokensParameters { ++ /** ID of the model to use. For a list of models, see `Google models ++ `_. */ ++ model: string; ++ /** Input content. */ ++ contents: ContentListUnion; ++ /** Configuration for counting tokens. */ ++ config?: CountTokensConfig; ++} ++/** Response for counting tokens. */ ++export declare class CountTokensResponse { ++ /** Total number of tokens. */ ++ totalTokens?: number; ++ /** Number of tokens in the cached part of the prompt (the cached content). */ ++ cachedContentTokenCount?: number; ++} ++/** Optional parameters for computing tokens. */ ++export declare interface ComputeTokensConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Parameters for computing tokens. */ ++export declare interface ComputeTokensParameters { ++ /** ID of the model to use. For a list of models, see `Google models ++ `_. */ ++ model: string; ++ /** Input content. */ ++ contents: ContentListUnion; ++ /** Optional parameters for the request. ++ */ ++ config?: ComputeTokensConfig; ++} ++/** Tokens info with a list of tokens and the corresponding list of token ids. */ ++export declare interface TokensInfo { ++ /** Optional. Optional fields for the role from the corresponding Content. */ ++ role?: string; ++ /** A list of token ids from the input. */ ++ tokenIds?: string[]; ++ /** A list of tokens from the input. */ ++ tokens?: string[]; ++} ++/** Response for computing tokens. */ ++export declare class ComputeTokensResponse { ++ /** Lists of tokens info from the input. A ComputeTokensRequest could have multiple instances with a prompt in each instance. We also need to return lists of tokens info for the request with multiple instances. */ ++ tokensInfo?: TokensInfo[]; ++} ++/** Configuration for generating videos. */ ++export declare interface GenerateVideosConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** Number of output videos. */ ++ numberOfVideos?: number; ++ /** The gcs bucket where to save the generated videos. */ ++ outputGcsUri?: string; ++ /** Frames per second for video generation. */ ++ fps?: number; ++ /** Duration of the clip for video generation in seconds. */ ++ durationSeconds?: number; ++ /** The RNG seed. If RNG seed is exactly same for each request with unchanged inputs, the prediction results will be consistent. Otherwise, a random RNG seed will be used each time to produce a different result. */ ++ seed?: number; ++ /** The aspect ratio for the generated video. 16:9 (landscape) and 9:16 (portrait) are supported. */ ++ aspectRatio?: string; ++ /** The resolution for the generated video. 1280x720, 1920x1080 are supported. */ ++ resolution?: string; ++ /** Whether allow to generate person videos, and restrict to specific ages. Supported values are: dont_allow, allow_adult. */ ++ personGeneration?: string; ++ /** The pubsub topic where to publish the video generation progress. */ ++ pubsubTopic?: string; ++ /** Optional field in addition to the text content. Negative prompts can be explicitly stated here to help generate the video. */ ++ negativePrompt?: string; ++ /** Whether to use the prompt rewriting logic. */ ++ enhancePrompt?: boolean; ++} ++/** Class that represents the parameters for generating an image. */ ++export declare interface GenerateVideosParameters { ++ /** ID of the model to use. For a list of models, see `Google models ++ `_. */ ++ model: string; ++ /** The text prompt for generating the videos. Optional for image to video use cases. */ ++ prompt?: string; ++ /** The input image for generating the videos. ++ Optional if prompt is provided. */ ++ image?: Image; ++ /** Configuration for generating videos. */ ++ config?: GenerateVideosConfig; ++} ++/** A generated video. */ ++export declare interface Video { ++ /** Path to another storage. */ ++ uri?: string; ++ /** Video bytes. */ ++ videoBytes?: string; ++ /** Video encoding, for example "video/mp4". */ ++ mimeType?: string; ++} ++/** A generated video. */ ++export declare interface GeneratedVideo { ++ /** The output video */ ++ video?: Video; ++} ++/** Response with generated videos. */ ++export declare class GenerateVideosResponse { ++ /** List of the generated videos */ ++ generatedVideos?: GeneratedVideo[]; ++ /** Returns if any videos were filtered due to RAI policies. */ ++ raiMediaFilteredCount?: number; ++ /** Returns rai failure reasons if any. */ ++ raiMediaFilteredReasons?: string[]; ++} ++/** A video generation operation. */ ++export declare interface GenerateVideosOperation { ++ /** The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. */ ++ name?: string; ++ /** Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. */ ++ metadata?: Record; ++ /** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */ ++ done?: boolean; ++ /** The error result of the operation in case of failure or cancellation. */ ++ error?: Record; ++ /** The generated videos. */ ++ response?: GenerateVideosResponse; ++} ++/** Optional configuration for cached content creation. */ ++export declare interface CreateCachedContentConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: "3.5s". */ ++ ttl?: string; ++ /** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */ ++ expireTime?: string; ++ /** The user-generated meaningful display name of the cached content. ++ */ ++ displayName?: string; ++ /** The content to cache. ++ */ ++ contents?: ContentListUnion; ++ /** Developer set system instruction. ++ */ ++ systemInstruction?: ContentUnion; ++ /** A list of `Tools` the model may use to generate the next response. ++ */ ++ tools?: Tool[]; ++ /** Configuration for the tools to use. This config is shared for all tools. ++ */ ++ toolConfig?: ToolConfig; ++} ++/** Parameters for caches.create method. */ ++export declare interface CreateCachedContentParameters { ++ /** ID of the model to use. Example: gemini-1.5-flash */ ++ model: string; ++ /** Configuration that contains optional parameters. ++ */ ++ config?: CreateCachedContentConfig; ++} ++/** Metadata on the usage of the cached content. */ ++export declare interface CachedContentUsageMetadata { ++ /** Duration of audio in seconds. */ ++ audioDurationSeconds?: number; ++ /** Number of images. */ ++ imageCount?: number; ++ /** Number of text characters. */ ++ textCount?: number; ++ /** Total number of tokens that the cached content consumes. */ ++ totalTokenCount?: number; ++ /** Duration of video in seconds. */ ++ videoDurationSeconds?: number; ++} ++/** A resource used in LLM queries for users to explicitly specify what to cache. */ ++export declare interface CachedContent { ++ /** The server-generated resource name of the cached content. */ ++ name?: string; ++ /** The user-generated meaningful display name of the cached content. */ ++ displayName?: string; ++ /** The name of the publisher model to use for cached content. */ ++ model?: string; ++ /** Creation time of the cache entry. */ ++ createTime?: string; ++ /** When the cache entry was last updated in UTC time. */ ++ updateTime?: string; ++ /** Expiration time of the cached content. */ ++ expireTime?: string; ++ /** Metadata on the usage of the cached content. */ ++ usageMetadata?: CachedContentUsageMetadata; ++} ++/** Optional parameters for caches.get method. */ ++export declare interface GetCachedContentConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Parameters for caches.get method. */ ++export declare interface GetCachedContentParameters { ++ /** The server-generated resource name of the cached content. ++ */ ++ name: string; ++ /** Optional parameters for the request. ++ */ ++ config?: GetCachedContentConfig; ++} ++/** Optional parameters for caches.delete method. */ ++export declare interface DeleteCachedContentConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Parameters for caches.delete method. */ ++export declare interface DeleteCachedContentParameters { ++ /** The server-generated resource name of the cached content. ++ */ ++ name: string; ++ /** Optional parameters for the request. ++ */ ++ config?: DeleteCachedContentConfig; ++} ++/** Empty response for caches.delete method. */ ++export declare class DeleteCachedContentResponse { ++} ++/** Optional parameters for caches.update method. */ ++export declare interface UpdateCachedContentConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: "3.5s". */ ++ ttl?: string; ++ /** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */ ++ expireTime?: string; ++} ++export declare interface UpdateCachedContentParameters { ++ /** The server-generated resource name of the cached content. ++ */ ++ name: string; ++ /** Configuration that contains optional parameters. ++ */ ++ config?: UpdateCachedContentConfig; ++} ++/** Config for caches.list method. */ ++export declare interface ListCachedContentsConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ pageSize?: number; ++ pageToken?: string; ++} ++/** Parameters for caches.list method. */ ++export declare interface ListCachedContentsParameters { ++ /** Configuration that contains optional parameters. ++ */ ++ config?: ListCachedContentsConfig; ++} ++export declare class ListCachedContentsResponse { ++ nextPageToken?: string; ++ /** List of cached contents. ++ */ ++ cachedContents?: CachedContent[]; ++} ++/** Used to override the default configuration. */ ++export declare interface ListFilesConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ pageSize?: number; ++ pageToken?: string; ++} ++/** Generates the parameters for the list method. */ ++export declare interface ListFilesParameters { ++ /** Used to override the default configuration. */ ++ config?: ListFilesConfig; ++} ++/** Status of a File that uses a common error model. */ ++export declare interface FileStatus { ++ /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */ ++ details?: Record[]; ++ /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */ ++ message?: string; ++ /** The status code. 0 for OK, 1 for CANCELLED */ ++ code?: number; ++} ++/** A file uploaded to the API. */ ++export declare interface File { ++ /** The `File` resource name. The ID (name excluding the "files/" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be generated. Example: `files/123-456` */ ++ name?: string; ++ /** Optional. The human-readable display name for the `File`. The display name must be no more than 512 characters in length, including spaces. Example: 'Welcome Image' */ ++ displayName?: string; ++ /** Output only. MIME type of the file. */ ++ mimeType?: string; ++ /** Output only. Size of the file in bytes. */ ++ sizeBytes?: string; ++ /** Output only. The timestamp of when the `File` was created. */ ++ createTime?: string; ++ /** Output only. The timestamp of when the `File` will be deleted. Only set if the `File` is scheduled to expire. */ ++ expirationTime?: string; ++ /** Output only. The timestamp of when the `File` was last updated. */ ++ updateTime?: string; ++ /** Output only. SHA-256 hash of the uploaded bytes. The hash value is encoded in base64 format. */ ++ sha256Hash?: string; ++ /** Output only. The URI of the `File`. */ ++ uri?: string; ++ /** Output only. The URI of the `File`, only set for downloadable (generated) files. */ ++ downloadUri?: string; ++ /** Output only. Processing state of the File. */ ++ state?: FileState; ++ /** Output only. The source of the `File`. */ ++ source?: FileSource; ++ /** Output only. Metadata for a video. */ ++ videoMetadata?: Record; ++ /** Output only. Error status if File processing failed. */ ++ error?: FileStatus; ++} ++/** Response for the list files method. */ ++export declare class ListFilesResponse { ++ /** A token to retrieve next page of results. */ ++ nextPageToken?: string; ++ /** The list of files. */ ++ files?: File[]; ++} ++/** Used to override the default configuration. */ ++export declare interface CreateFileConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Generates the parameters for the private _create method. */ ++export declare interface CreateFileParameters { ++ /** The file to be uploaded. ++ mime_type: (Required) The MIME type of the file. Must be provided. ++ name: (Optional) The name of the file in the destination (e.g. ++ 'files/sample-image'). ++ display_name: (Optional) The display name of the file. ++ */ ++ file: File; ++ /** Used to override the default configuration. */ ++ config?: CreateFileConfig; ++} ++/** A wrapper class for the http response. */ ++export declare class HttpResponse { ++ /** Used to retain the processed HTTP headers in the response. */ ++ headers?: Record; ++ /** ++ * The original http response. ++ */ ++ responseInternal: Response; ++ constructor(response: Response); ++ json(): Promise; ++} ++/** Callbacks for the live API. */ ++export interface LiveCallbacks { ++ /** ++ * Called when the websocket connection is established. ++ */ ++ onopen?: (() => void) | null; ++ /** ++ * Called when a message is received from the server. ++ */ ++ onmessage: (e: LiveServerMessage) => void; ++ /** ++ * Called when an error occurs. ++ */ ++ onerror?: ((e: ErrorEvent) => void) | null; ++ /** ++ * Called when the websocket connection is closed. ++ */ ++ onclose?: ((e: CloseEvent) => void) | null; ++} ++/** Parameters for the upload file method. */ ++export interface UploadFileParameters { ++ /** The string path to the file to be uploaded or a Blob object. */ ++ file: string | globalThis.Blob; ++ /** Configuration that contains optional parameters. */ ++ config?: UploadFileConfig; ++} ++/** Response for the create file method. */ ++export declare class CreateFileResponse { ++ /** Used to retain the full HTTP response. */ ++ sdkHttpResponse?: HttpResponse; ++} ++/** Used to override the default configuration. */ ++export declare interface GetFileConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Generates the parameters for the get method. */ ++export declare interface GetFileParameters { ++ /** The name identifier for the file to retrieve. */ ++ name: string; ++ /** Used to override the default configuration. */ ++ config?: GetFileConfig; ++} ++/** Used to override the default configuration. */ ++export declare interface DeleteFileConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Generates the parameters for the get method. */ ++export declare interface DeleteFileParameters { ++ /** The name identifier for the file to be deleted. */ ++ name: string; ++ /** Used to override the default configuration. */ ++ config?: DeleteFileConfig; ++} ++/** Response for the delete file method. */ ++export declare class DeleteFileResponse { ++} ++export declare interface GetOperationConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Parameters for the GET method. */ ++export declare interface GetOperationParameters { ++ /** The server-assigned name for the operation. */ ++ operationName: string; ++ /** Used to override the default configuration. */ ++ config?: GetOperationConfig; ++} ++export declare interface FetchPredictOperationConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Parameters for the fetchPredictOperation method. */ ++export declare interface FetchPredictOperationParameters { ++ /** The server-assigned name for the operation. */ ++ operationName: string; ++ resourceName: string; ++ /** Used to override the default configuration. */ ++ config?: FetchPredictOperationConfig; ++} ++export declare interface TestTableItem { ++ /** The name of the test. This is used to derive the replay id. */ ++ name?: string; ++ /** The parameters to the test. Use pydantic models. */ ++ parameters?: Record; ++ /** Expects an exception for MLDev matching the string. */ ++ exceptionIfMldev?: string; ++ /** Expects an exception for Vertex matching the string. */ ++ exceptionIfVertex?: string; ++ /** Use if you don't want to use the default replay id which is derived from the test name. */ ++ overrideReplayId?: string; ++ /** True if the parameters contain an unsupported union type. This test will be skipped for languages that do not support the union type. */ ++ hasUnion?: boolean; ++ /** When set to a reason string, this test will be skipped in the API mode. Use this flag for tests that can not be reproduced with the real API. E.g. a test that deletes a resource. */ ++ skipInApiMode?: string; ++ /** Keys to ignore when comparing the request and response. This is useful for tests that are not deterministic. */ ++ ignoreKeys?: string[]; ++} ++export declare interface TestTableFile { ++ comment?: string; ++ testMethod?: string; ++ parameterNames?: string[]; ++ testTable?: TestTableItem[]; ++} ++/** Represents a single request in a replay. */ ++export declare interface ReplayRequest { ++ method?: string; ++ url?: string; ++ headers?: Record; ++ bodySegments?: Record[]; ++} ++/** Represents a single response in a replay. */ ++export declare class ReplayResponse { ++ statusCode?: number; ++ headers?: Record; ++ bodySegments?: Record[]; ++ sdkResponseSegments?: Record[]; ++} ++/** Represents a single interaction, request and response in a replay. */ ++export declare interface ReplayInteraction { ++ request?: ReplayRequest; ++ response?: ReplayResponse; ++} ++/** Represents a recorded session. */ ++export declare interface ReplayFile { ++ replayId?: string; ++ interactions?: ReplayInteraction[]; ++} ++/** Used to override the default configuration. */ ++export declare interface UploadFileConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** The name of the file in the destination (e.g., 'files/sample-image'. If not provided one will be generated. */ ++ name?: string; ++ /** mime_type: The MIME type of the file. If not provided, it will be inferred from the file extension. */ ++ mimeType?: string; ++ /** Optional display name of the file. */ ++ displayName?: string; ++} ++/** Used to override the default configuration. */ ++export declare interface DownloadFileConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Configuration for upscaling an image. ++ ++ For more information on this configuration, refer to ++ the `Imagen API reference documentation ++ `_. ++ */ ++export declare interface UpscaleImageConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** Whether to include a reason for filtered-out images in the ++ response. */ ++ includeRaiReason?: boolean; ++ /** The image format that the output should be saved as. */ ++ outputMimeType?: string; ++ /** The level of compression if the ``output_mime_type`` is ++ ``image/jpeg``. */ ++ outputCompressionQuality?: number; ++} ++/** User-facing config UpscaleImageParameters. */ ++export declare interface UpscaleImageParameters { ++ /** The model to use. */ ++ model: string; ++ /** The input image to upscale. */ ++ image: Image; ++ /** The factor to upscale the image (x2 or x4). */ ++ upscaleFactor: string; ++ /** Configuration for upscaling. */ ++ config?: UpscaleImageConfig; ++} ++/** A raw reference image. ++ ++ A raw reference image represents the base image to edit, provided by the user. ++ It can optionally be provided in addition to a mask reference image or ++ a style reference image. ++ */ ++export declare interface RawReferenceImage { ++ /** The reference image for the editing operation. */ ++ referenceImage?: Image; ++ /** The id of the reference image. */ ++ referenceId?: number; ++ /** The type of the reference image. Only set by the SDK. */ ++ referenceType?: string; ++} ++/** Configuration for a Mask reference image. */ ++export declare interface MaskReferenceConfig { ++ /** Prompts the model to generate a mask instead of you needing to ++ provide one (unless MASK_MODE_USER_PROVIDED is used). */ ++ maskMode?: MaskReferenceMode; ++ /** A list of up to 5 class ids to use for semantic segmentation. ++ Automatically creates an image mask based on specific objects. */ ++ segmentationClasses?: number[]; ++ /** Dilation percentage of the mask provided. ++ Float between 0 and 1. */ ++ maskDilation?: number; ++} ++/** A mask reference image. ++ ++ This encapsulates either a mask image provided by the user and configs for ++ the user provided mask, or only config parameters for the model to generate ++ a mask. ++ ++ A mask image is an image whose non-zero values indicate where to edit the base ++ image. If the user provides a mask image, the mask must be in the same ++ dimensions as the raw image. ++ */ ++export declare interface MaskReferenceImage { ++ /** The reference image for the editing operation. */ ++ referenceImage?: Image; ++ /** The id of the reference image. */ ++ referenceId?: number; ++ /** The type of the reference image. Only set by the SDK. */ ++ referenceType?: string; ++ /** Configuration for the mask reference image. */ ++ config?: MaskReferenceConfig; ++} ++/** Configuration for a Control reference image. */ ++export declare interface ControlReferenceConfig { ++ /** The type of control reference image to use. */ ++ controlType?: ControlReferenceType; ++ /** Defaults to False. When set to True, the control image will be ++ computed by the model based on the control type. When set to False, ++ the control image must be provided by the user. */ ++ enableControlImageComputation?: boolean; ++} ++/** A control reference image. ++ ++ The image of the control reference image is either a control image provided ++ by the user, or a regular image which the backend will use to generate a ++ control image of. In the case of the latter, the ++ enable_control_image_computation field in the config should be set to True. ++ ++ A control image is an image that represents a sketch image of areas for the ++ model to fill in based on the prompt. ++ */ ++export declare interface ControlReferenceImage { ++ /** The reference image for the editing operation. */ ++ referenceImage?: Image; ++ /** The id of the reference image. */ ++ referenceId?: number; ++ /** The type of the reference image. Only set by the SDK. */ ++ referenceType?: string; ++ /** Configuration for the control reference image. */ ++ config?: ControlReferenceConfig; ++} ++/** Configuration for a Style reference image. */ ++export declare interface StyleReferenceConfig { ++ /** A text description of the style to use for the generated image. */ ++ styleDescription?: string; ++} ++/** A style reference image. ++ ++ This encapsulates a style reference image provided by the user, and ++ additionally optional config parameters for the style reference image. ++ ++ A raw reference image can also be provided as a destination for the style to ++ be applied to. ++ */ ++export declare interface StyleReferenceImage { ++ /** The reference image for the editing operation. */ ++ referenceImage?: Image; ++ /** The id of the reference image. */ ++ referenceId?: number; ++ /** The type of the reference image. Only set by the SDK. */ ++ referenceType?: string; ++ /** Configuration for the style reference image. */ ++ config?: StyleReferenceConfig; ++} ++/** Configuration for a Subject reference image. */ ++export declare interface SubjectReferenceConfig { ++ /** The subject type of a subject reference image. */ ++ subjectType?: SubjectReferenceType; ++ /** Subject description for the image. */ ++ subjectDescription?: string; ++} ++/** A subject reference image. ++ ++ This encapsulates a subject reference image provided by the user, and ++ additionally optional config parameters for the subject reference image. ++ ++ A raw reference image can also be provided as a destination for the subject to ++ be applied to. ++ */ ++export declare interface SubjectReferenceImage { ++ /** The reference image for the editing operation. */ ++ referenceImage?: Image; ++ /** The id of the reference image. */ ++ referenceId?: number; ++ /** The type of the reference image. Only set by the SDK. */ ++ referenceType?: string; ++ /** Configuration for the subject reference image. */ ++ config?: SubjectReferenceConfig; ++} ++/** Sent in response to a `LiveGenerateContentSetup` message from the client. */ ++export declare interface LiveServerSetupComplete { ++} ++/** Incremental server update generated by the model in response to client messages. ++ ++ Content is generated as quickly as possible, and not in real time. Clients ++ may choose to buffer and play it out in real time. ++ */ ++export declare interface LiveServerContent { ++ /** The content that the model has generated as part of the current conversation with the user. */ ++ modelTurn?: Content; ++ /** If true, indicates that the model is done generating. Generation will only start in response to additional client messages. Can be set alongside `content`, indicating that the `content` is the last in the turn. */ ++ turnComplete?: boolean; ++ /** If true, indicates that a client message has interrupted current model generation. If the client is playing out the content in realtime, this is a good signal to stop and empty the current queue. */ ++ interrupted?: boolean; ++ /** If true, indicates that the model is done generating. When model is ++ interrupted while generating there will be no generation_complete message ++ in interrupted turn, it will go through interrupted > turn_complete. ++ When model assumes realtime playback there will be delay between ++ generation_complete and turn_complete that is caused by model ++ waiting for playback to finish. If true, indicates that the model ++ has finished generating all content. This is a signal to the client ++ that it can stop sending messages. */ ++ generationComplete?: boolean; ++} ++/** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */ ++export declare interface LiveServerToolCall { ++ /** The function call to be executed. */ ++ functionCalls?: FunctionCall[]; ++} ++/** Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled. ++ ++ If there were side-effects to those tool calls, clients may attempt to undo ++ the tool calls. This message occurs only in cases where the clients interrupt ++ server turns. ++ */ ++export declare interface LiveServerToolCallCancellation { ++ /** The ids of the tool calls to be cancelled. */ ++ ids?: string[]; ++} ++/** Usage metadata about response(s). */ ++export declare interface UsageMetadata { ++ /** Number of tokens in the prompt. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */ ++ promptTokenCount?: number; ++ /** Number of tokens in the cached part of the prompt (the cached content). */ ++ cachedContentTokenCount?: number; ++ /** Total number of tokens across all the generated response candidates. */ ++ responseTokenCount?: number; ++ /** Number of tokens present in tool-use prompt(s). */ ++ toolUsePromptTokenCount?: number; ++ /** Number of tokens of thoughts for thinking models. */ ++ thoughtsTokenCount?: number; ++ /** Total token count for prompt, response candidates, and tool-use prompts(if present). */ ++ totalTokenCount?: number; ++ /** List of modalities that were processed in the request input. */ ++ promptTokensDetails?: ModalityTokenCount[]; ++ /** List of modalities that were processed in the cache input. */ ++ cacheTokensDetails?: ModalityTokenCount[]; ++ /** List of modalities that were returned in the response. */ ++ responseTokensDetails?: ModalityTokenCount[]; ++ /** List of modalities that were processed in the tool-use prompt. */ ++ toolUsePromptTokensDetails?: ModalityTokenCount[]; ++ /** Traffic type. This shows whether a request consumes Pay-As-You-Go ++ or Provisioned Throughput quota. */ ++ trafficType?: TrafficType; ++} ++/** Server will not be able to service client soon. */ ++export declare interface LiveServerGoAway { ++ /** The remaining time before the connection will be terminated as ABORTED. The minimal time returned here is specified differently together with the rate limits for a given model. */ ++ timeLeft?: string; ++} ++/** Update of the session resumption state. ++ ++ Only sent if `session_resumption` was set in the connection config. ++ */ ++export declare interface LiveServerSessionResumptionUpdate { ++ /** New handle that represents state that can be resumed. Empty if `resumable`=false. */ ++ newHandle?: string; ++ /** True if session can be resumed at this point. It might be not possible to resume session at some points. In that case we send update empty new_handle and resumable=false. Example of such case could be model executing function calls or just generating. Resuming session (using previous session token) in such state will result in some data loss. */ ++ resumable?: boolean; ++ /** Index of last message sent by client that is included in state represented by this SessionResumptionToken. Only sent when `SessionResumptionConfig.transparent` is set. ++ ++ Presence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `SessionResmumptionTokenUpdate`. This field will enable them to limit buffering (avoid keeping all requests in RAM). ++ ++ Note: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames arelikely not needed. */ ++ lastConsumedClientMessageIndex?: string; ++} ++/** Response message for API call. */ ++export declare interface LiveServerMessage { ++ /** Sent in response to a `LiveClientSetup` message from the client. */ ++ setupComplete?: LiveServerSetupComplete; ++ /** Content generated by the model in response to client messages. */ ++ serverContent?: LiveServerContent; ++ /** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */ ++ toolCall?: LiveServerToolCall; ++ /** Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled. */ ++ toolCallCancellation?: LiveServerToolCallCancellation; ++ /** Usage metadata about model response(s). */ ++ usageMetadata?: UsageMetadata; ++ /** Server will disconnect soon. */ ++ goAway?: LiveServerGoAway; ++ /** Update of the session resumption state. */ ++ sessionResumptionUpdate?: LiveServerSessionResumptionUpdate; ++} ++/** Configures automatic detection of activity. */ ++export declare interface AutomaticActivityDetection { ++ /** If enabled, detected voice and text input count as activity. If disabled, the client must send activity signals. */ ++ disabled?: boolean; ++ /** Determines how likely speech is to be detected. */ ++ startOfSpeechSensitivity?: StartSensitivity; ++ /** Determines how likely detected speech is ended. */ ++ endOfSpeechSensitivity?: EndSensitivity; ++ /** The required duration of detected speech before start-of-speech is committed. The lower this value the more sensitive the start-of-speech detection is and the shorter speech can be recognized. However, this also increases the probability of false positives. */ ++ prefixPaddingMs?: number; ++ /** The required duration of detected non-speech (e.g. silence) before end-of-speech is committed. The larger this value, the longer speech gaps can be without interrupting the user's activity but this will increase the model's latency. */ ++ silenceDurationMs?: number; ++} ++/** Marks the end of user activity. ++ ++ This can only be sent if automatic (i.e. server-side) activity detection is ++ disabled. ++ */ ++export declare interface RealtimeInputConfig { ++ /** If not set, automatic activity detection is enabled by default. If automatic voice detection is disabled, the client must send activity signals. */ ++ automaticActivityDetection?: AutomaticActivityDetection; ++ /** Defines what effect activity has. */ ++ activityHandling?: ActivityHandling; ++ /** Defines which input is included in the user's turn. */ ++ turnCoverage?: TurnCoverage; ++} ++/** Configuration of session resumption mechanism. ++ ++ Included in `LiveConnectConfig.session_resumption`. If included server ++ will send `LiveServerSessionResumptionUpdate` messages. ++ */ ++export declare interface SessionResumptionConfig { ++ /** Session resumption handle of previous session (session to restore). ++ ++ If not present new session will be started. */ ++ handle?: string; ++ /** If set the server will send `last_consumed_client_message_index` in the `session_resumption_update` messages to allow for transparent reconnections. */ ++ transparent?: boolean; ++} ++/** Context window will be truncated by keeping only suffix of it. ++ ++ Context window will always be cut at start of USER role turn. System ++ instructions and `BidiGenerateContentSetup.prefix_turns` will not be ++ subject to the sliding window mechanism, they will always stay at the ++ beginning of context window. ++ */ ++export declare interface SlidingWindow { ++ /** Session reduction target -- how many tokens we should keep. Window shortening operation has some latency costs, so we should avoid running it on every turn. Should be < trigger_tokens. If not set, trigger_tokens/2 is assumed. */ ++ targetTokens?: string; ++} ++/** Enables context window compression -- mechanism managing model context window so it does not exceed given length. */ ++export declare interface ContextWindowCompressionConfig { ++ /** Number of tokens (before running turn) that triggers context window compression mechanism. */ ++ triggerTokens?: string; ++ /** Sliding window compression mechanism. */ ++ slidingWindow?: SlidingWindow; ++} ++/** The audio transcription configuration in Setup. */ ++export declare interface AudioTranscriptionConfig { ++} ++/** Message contains configuration that will apply for the duration of the streaming session. */ ++export declare interface LiveClientSetup { ++ /** ++ The fully qualified name of the publisher model or tuned model endpoint to ++ use. ++ */ ++ model?: string; ++ /** The generation configuration for the session. ++ Note: only a subset of fields are supported. ++ */ ++ generationConfig?: GenerationConfig; ++ /** The user provided system instructions for the model. ++ Note: only text should be used in parts and content in each part will be ++ in a separate paragraph. */ ++ systemInstruction?: ContentUnion; ++ /** A list of `Tools` the model may use to generate the next response. ++ ++ A `Tool` is a piece of code that enables the system to interact with ++ external systems to perform an action, or set of actions, outside of ++ knowledge and scope of the model. */ ++ tools?: ToolListUnion; ++ /** Configures the realtime input behavior in BidiGenerateContent. */ ++ realtimeInputConfig?: RealtimeInputConfig; ++ /** Configures session resumption mechanism. ++ ++ If included server will send SessionResumptionUpdate messages. */ ++ sessionResumption?: SessionResumptionConfig; ++ /** Configures context window compression mechanism. ++ ++ If included, server will compress context window to fit into given length. */ ++ contextWindowCompression?: ContextWindowCompressionConfig; ++} ++/** Incremental update of the current conversation delivered from the client. ++ ++ All the content here will unconditionally be appended to the conversation ++ history and used as part of the prompt to the model to generate content. ++ ++ A message here will interrupt any current model generation. ++ */ ++export declare interface LiveClientContent { ++ /** The content appended to the current conversation with the model. ++ ++ For single-turn queries, this is a single instance. For multi-turn ++ queries, this is a repeated field that contains conversation history and ++ latest request. ++ */ ++ turns?: Content[]; ++ /** If true, indicates that the server content generation should start with ++ the currently accumulated prompt. Otherwise, the server will await ++ additional messages before starting generation. */ ++ turnComplete?: boolean; ++} ++/** Marks the start of user activity. ++ ++ This can only be sent if automatic (i.e. server-side) activity detection is ++ disabled. ++ */ ++export declare interface ActivityStart { ++} ++/** Marks the end of user activity. ++ ++ This can only be sent if automatic (i.e. server-side) activity detection is ++ disabled. ++ */ ++export declare interface ActivityEnd { ++} ++/** User input that is sent in real time. ++ ++ This is different from `LiveClientContent` in a few ways: ++ ++ - Can be sent continuously without interruption to model generation. ++ - If there is a need to mix data interleaved across the ++ `LiveClientContent` and the `LiveClientRealtimeInput`, server attempts to ++ optimize for best response, but there are no guarantees. ++ - End of turn is not explicitly specified, but is rather derived from user ++ activity (for example, end of speech). ++ - Even before the end of turn, the data is processed incrementally ++ to optimize for a fast start of the response from the model. ++ - Is always assumed to be the user's input (cannot be used to populate ++ conversation history). ++ */ ++export declare interface LiveClientRealtimeInput { ++ /** Inlined bytes data for media input. */ ++ mediaChunks?: Blob[]; ++ /** Marks the start of user activity. */ ++ activityStart?: ActivityStart; ++ /** Marks the end of user activity. */ ++ activityEnd?: ActivityEnd; ++} ++/** Client generated response to a `ToolCall` received from the server. ++ ++ Individual `FunctionResponse` objects are matched to the respective ++ `FunctionCall` objects by the `id` field. ++ ++ Note that in the unary and server-streaming GenerateContent APIs function ++ calling happens by exchanging the `Content` parts, while in the bidi ++ GenerateContent APIs function calling happens over this dedicated set of ++ messages. ++ */ ++export declare class LiveClientToolResponse { ++ /** The response to the function calls. */ ++ functionResponses?: FunctionResponse[]; ++} ++/** Messages sent by the client in the API call. */ ++export declare interface LiveClientMessage { ++ /** Message to be sent by the system when connecting to the API. SDK users should not send this message. */ ++ setup?: LiveClientSetup; ++ /** Incremental update of the current conversation delivered from the client. */ ++ clientContent?: LiveClientContent; ++ /** User input that is sent in real time. */ ++ realtimeInput?: LiveClientRealtimeInput; ++ /** Response to a `ToolCallMessage` received from the server. */ ++ toolResponse?: LiveClientToolResponse; ++} ++/** Session config for the API connection. */ ++export declare interface LiveConnectConfig { ++ /** The generation configuration for the session. */ ++ generationConfig?: GenerationConfig; ++ /** The requested modalities of the response. Represents the set of ++ modalities that the model can return. Defaults to AUDIO if not specified. ++ */ ++ responseModalities?: Modality[]; ++ /** The speech generation configuration. ++ */ ++ speechConfig?: SpeechConfig; ++ /** The user provided system instructions for the model. ++ Note: only text should be used in parts and content in each part will be ++ in a separate paragraph. */ ++ systemInstruction?: ContentUnion; ++ /** A list of `Tools` the model may use to generate the next response. ++ ++ A `Tool` is a piece of code that enables the system to interact with ++ external systems to perform an action, or set of actions, outside of ++ knowledge and scope of the model. */ ++ tools?: ToolListUnion; ++ /** Configures session resumption mechanism. ++ ++ If included the server will send SessionResumptionUpdate messages. */ ++ sessionResumption?: SessionResumptionConfig; ++ /** Configures the realtime input behavior in BidiGenerateContent. */ ++ realtimeInputConfig?: RealtimeInputConfig; ++ /** Configures context window compression mechanism. ++ ++ If included, server will compress context window to fit into given length. */ ++ contextWindowCompression?: ContextWindowCompressionConfig; ++} ++/** Parameters for connecting to the live API. */ ++export declare interface LiveConnectParameters { ++ /** ID of the model to use. For a list of models, see `Google models ++ `_. */ ++ model: string; ++ /** callbacks */ ++ callbacks: LiveCallbacks; ++ /** Optional configuration parameters for the request. ++ */ ++ config?: LiveConnectConfig; ++} ++/** Parameters for initializing a new chat session. ++ ++ These parameters are used when creating a chat session with the ++ `chats.create()` method. ++ */ ++export declare interface CreateChatParameters { ++ /** The name of the model to use for the chat session. ++ ++ For example: 'gemini-2.0-flash', 'gemini-1.5-pro', etc. See gemini API ++ docs to find the available models. ++ */ ++ model: string; ++ /** Config for the entire chat session. ++ ++ This config applies to all requests within the session ++ unless overridden by a per-request `config` in `SendMessageParameters`. ++ */ ++ config?: GenerateContentConfig; ++ /** The initial conversation history for the chat session. ++ ++ This allows you to start the chat with a pre-existing history. The history ++ must be a list of `Content` alternating between 'user' and 'model' roles. ++ It should start with a 'user' message. ++ */ ++ history?: Content[]; ++} ++/** Parameters for sending a message within a chat session. ++ ++ These parameters are used with the `chat.sendMessage()` method. ++ */ ++export declare interface SendMessageParameters { ++ /** The message to send to the model. ++ ++ The SDK will combine all parts into a single 'user' content to send to ++ the model. ++ */ ++ message: PartListUnion; ++ /** Config for this specific request. ++ ++ Please note that the per-request config does not change the chat level ++ config, nor inherit from it. If you intend to use some values from the ++ chat's default config, you must explicitly copy them into this per-request ++ config. ++ */ ++ config?: GenerateContentConfig; ++} ++/** Parameters for sending client content to the live API. */ ++export declare interface LiveSendClientContentParameters { ++ /** Client content to send to the session. */ ++ turns?: ContentListUnion; ++ /** If true, indicates that the server content generation should start with ++ the currently accumulated prompt. Otherwise, the server will await ++ additional messages before starting generation. */ ++ turnComplete?: boolean; ++} ++/** Parameters for sending realtime input to the live API. */ ++export declare interface LiveSendRealtimeInputParameters { ++ /** Realtime input to send to the session. */ ++ media: Blob; ++ /** Marks the start of user activity. */ ++ activityStart?: ActivityStart; ++ /** Marks the end of user activity. */ ++ activityEnd?: ActivityEnd; ++} ++/** Parameters for sending tool responses to the live API. */ ++export declare class LiveSendToolResponseParameters { ++ /** Tool responses to send to the session. */ ++ functionResponses: FunctionResponse[] | FunctionResponse; ++} ++/** Parameters for the get method of the operations module. */ ++export declare interface OperationGetParameters { ++ /** The operation to be retrieved. */ ++ operation: GenerateVideosOperation; ++ /** Used to override the default configuration. */ ++ config?: GetOperationConfig; ++} ++export type PartUnion = Part | string; ++export type PartListUnion = PartUnion[] | PartUnion; ++export type ContentUnion = Content | PartUnion[] | PartUnion; ++export type ContentListUnion = Content | Content[] | PartUnion | PartUnion[]; ++export type SchemaUnion = Schema; ++export type SpeechConfigUnion = SpeechConfig | string; ++export type ToolListUnion = Tool[]; +diff --git a/dist/node/src/web/_browser_uploader.d.ts b/dist/node/src/web/_browser_uploader.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..e3397e3a8cb937cd13fe5a1487808fade9a47844 +--- /dev/null ++++ b/dist/node/src/web/_browser_uploader.d.ts +@@ -0,0 +1,12 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import { FileStat, Uploader } from '../_uploader'; ++import { File } from '../types'; ++export declare class BrowserUploader implements Uploader { ++ upload(file: string | Blob, uploadUrl: string, apiClient: ApiClient): Promise; ++ stat(file: string | Blob): Promise; ++} +diff --git a/dist/node/src/web/_browser_websocket.d.ts b/dist/node/src/web/_browser_websocket.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..f7d343165a48766c9a7bf013924e3acd4d0f0ba1 +--- /dev/null ++++ b/dist/node/src/web/_browser_websocket.d.ts +@@ -0,0 +1,19 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { WebSocketCallbacks, WebSocketFactory, WebSocket as Ws } from '../_websocket'; ++export declare class BrowserWebSocketFactory implements WebSocketFactory { ++ create(url: string, headers: Record, callbacks: WebSocketCallbacks): Ws; ++} ++export declare class BrowserWebSocket implements Ws { ++ private readonly url; ++ private readonly headers; ++ private readonly callbacks; ++ private ws?; ++ constructor(url: string, headers: Record, callbacks: WebSocketCallbacks); ++ connect(): void; ++ send(message: string): void; ++ close(): void; ++} +diff --git a/dist/node/src/web/_web_auth.d.ts b/dist/node/src/web/_web_auth.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..f5bfea2ad0fc6c27fc05c98b6dd7775bc97209d7 +--- /dev/null ++++ b/dist/node/src/web/_web_auth.d.ts +@@ -0,0 +1,12 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { Auth } from '../_auth'; ++export declare const GOOGLE_API_KEY_HEADER = "x-goog-api-key"; ++export declare class WebAuth implements Auth { ++ private readonly apiKey; ++ constructor(apiKey: string); ++ addAuthHeaders(headers: Headers): Promise; ++} +diff --git a/dist/node/src/web/index.d.ts b/dist/node/src/web/index.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..7f13c95f443a06be27a459c5c56e90415bfebf85 +--- /dev/null ++++ b/dist/node/src/web/index.d.ts +@@ -0,0 +1,15 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++export * from '../caches'; ++export * from '../chats'; ++export { GoogleGenAIOptions } from '../client'; ++export { Files } from '../files'; ++export * from '../live'; ++export { Models } from '../models'; ++export { Operations } from '../operations'; ++export { PagedItem, Pager } from '../pagers'; ++export * from '../types'; ++export * from './web_client'; +diff --git a/dist/node/src/web/web_client.d.ts b/dist/node/src/web/web_client.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..008b8be929a02392e3fb0997412a619985f23d33 +--- /dev/null ++++ b/dist/node/src/web/web_client.d.ts +@@ -0,0 +1,62 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import { Caches } from '../caches'; ++import { Chats } from '../chats'; ++import { GoogleGenAIOptions } from '../client'; ++import { Files } from '../files'; ++import { Live } from '../live'; ++import { Models } from '../models'; ++import { Operations } from '../operations'; ++/** ++ * The Google GenAI SDK. ++ * ++ * @remarks ++ * Provides access to the GenAI features through either the {@link ++ * https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API} or ++ * the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI ++ * API}. ++ * ++ * The {@link GoogleGenAIOptions.vertexai} value determines which of the API ++ * services to use. ++ * ++ * When using the Gemini API, a {@link GoogleGenAIOptions.apiKey} must also be ++ * set. When using Vertex AI, currently only {@link GoogleGenAIOptions.apiKey} ++ * is supported via Express mode. {@link GoogleGenAIOptions.project} and {@link ++ * GoogleGenAIOptions.location} should not be set. ++ * ++ * @example ++ * Initializing the SDK for using the Gemini API: ++ * ```ts ++ * import {GoogleGenAI} from '@google/genai'; ++ * const ai = new GoogleGenAI({apiKey: 'GEMINI_API_KEY'}); ++ * ``` ++ * ++ * @example ++ * Initializing the SDK for using the Vertex AI API: ++ * ```ts ++ * import {GoogleGenAI} from '@google/genai'; ++ * const ai = new GoogleGenAI({ ++ * vertexai: true, ++ * project: 'PROJECT_ID', ++ * location: 'PROJECT_LOCATION' ++ * }); ++ * ``` ++ * ++ */ ++export declare class GoogleGenAI { ++ protected readonly apiClient: ApiClient; ++ private readonly apiKey?; ++ readonly vertexai: boolean; ++ private readonly apiVersion?; ++ readonly models: Models; ++ readonly live: Live; ++ readonly chats: Chats; ++ readonly caches: Caches; ++ readonly files: Files; ++ readonly operations: Operations; ++ constructor(options: GoogleGenAIOptions); ++} +diff --git a/dist/node/tsdoc-metadata.json b/dist/node/tsdoc-metadata.json +new file mode 100644 +index 0000000000000000000000000000000000000000..53df58127701f2ee2bf59192ced518d91ffda2af +--- /dev/null ++++ b/dist/node/tsdoc-metadata.json +@@ -0,0 +1,11 @@ ++// This file is read by tools that parse documentation comments conforming to the TSDoc standard. ++// It should be published with your NPM package. It should not be tracked by Git. ++{ ++ "tsdocVersion": "0.12", ++ "toolPackages": [ ++ { ++ "packageName": "@microsoft/api-extractor", ++ "packageVersion": "7.50.1" ++ } ++ ] ++} +diff --git a/dist/src/_api_client.d.ts b/dist/src/_api_client.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..aa103389ef39fbd7e0e33ba5232bfa113f20b373 +--- /dev/null ++++ b/dist/src/_api_client.d.ts +@@ -0,0 +1,161 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { Auth } from './_auth'; ++import { Uploader } from './_uploader'; ++import { File, HttpOptions, HttpResponse, UploadFileConfig } from './types'; ++export declare const SDK_VERSION = "0.8.0"; ++/** ++ * Client errors raised by the GenAI API. ++ */ ++export declare class ClientError extends Error { ++ constructor(message: string, stackTrace?: string); ++} ++/** ++ * Server errors raised by the GenAI API. ++ */ ++export declare class ServerError extends Error { ++ constructor(message: string, stackTrace?: string); ++} ++/** ++ * Options for initializing the ApiClient. The ApiClient uses the parameters ++ * for authentication purposes as well as to infer if SDK should send the ++ * request to Vertex AI or Gemini API. ++ */ ++export interface ApiClientInitOptions { ++ /** ++ * The object used for adding authentication headers to API requests. ++ */ ++ auth: Auth; ++ /** ++ * The uploader to use for uploading files. This field is required for ++ * creating a client, will be set through the Node_client or Web_client. ++ */ ++ uploader: Uploader; ++ /** ++ * Optional. The Google Cloud project ID for Vertex AI users. ++ * It is not the numeric project name. ++ * If not provided, SDK will try to resolve it from runtime environment. ++ */ ++ project?: string; ++ /** ++ * Optional. The Google Cloud project location for Vertex AI users. ++ * If not provided, SDK will try to resolve it from runtime environment. ++ */ ++ location?: string; ++ /** ++ * The API Key. This is required for Gemini API users. ++ */ ++ apiKey?: string; ++ /** ++ * Optional. Set to true if you intend to call Vertex AI endpoints. ++ * If unset, default SDK behavior is to call Gemini API. ++ */ ++ vertexai?: boolean; ++ /** ++ * Optional. The API version for the endpoint. ++ * If unset, SDK will choose a default api version. ++ */ ++ apiVersion?: string; ++ /** ++ * Optional. A set of customizable configuration for HTTP requests. ++ */ ++ httpOptions?: HttpOptions; ++ /** ++ * Optional. An extra string to append at the end of the User-Agent header. ++ * ++ * This can be used to e.g specify the runtime and its version. ++ */ ++ userAgentExtra?: string; ++} ++/** ++ * Represents the necessary information to send a request to an API endpoint. ++ * This interface defines the structure for constructing and executing HTTP ++ * requests. ++ */ ++export interface HttpRequest { ++ /** ++ * URL path from the modules, this path is appended to the base API URL to ++ * form the complete request URL. ++ * ++ * If you wish to set full URL, use httpOptions.baseUrl instead. Example to ++ * set full URL in the request: ++ * ++ * const request: HttpRequest = { ++ * path: '', ++ * httpOptions: { ++ * baseUrl: 'https://', ++ * apiVersion: '', ++ * }, ++ * httpMethod: 'GET', ++ * }; ++ * ++ * The result URL will be: https:// ++ * ++ */ ++ path: string; ++ /** ++ * Optional query parameters to be appended to the request URL. ++ */ ++ queryParams?: Record; ++ /** ++ * Optional request body in json string or Blob format, GET request doesn't ++ * need a request body. ++ */ ++ body?: string | Blob; ++ /** ++ * The HTTP method to be used for the request. ++ */ ++ httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE'; ++ /** ++ * Optional set of customizable configuration for HTTP requests. ++ */ ++ httpOptions?: HttpOptions; ++} ++/** ++ * The ApiClient class is used to send requests to the Gemini API or Vertex AI ++ * endpoints. ++ */ ++export declare class ApiClient { ++ readonly clientOptions: ApiClientInitOptions; ++ constructor(opts: ApiClientInitOptions); ++ isVertexAI(): boolean; ++ getProject(): string | undefined; ++ getLocation(): string | undefined; ++ getApiVersion(): string; ++ getBaseUrl(): string; ++ getRequestUrl(): string; ++ getHeaders(): Record; ++ private getRequestUrlInternal; ++ getBaseResourcePath(): string; ++ getApiKey(): string | undefined; ++ getWebsocketBaseUrl(): string; ++ setBaseUrl(url: string): void; ++ private constructUrl; ++ private shouldPrependVertexProjectPath; ++ request(request: HttpRequest): Promise; ++ private patchHttpOptions; ++ requestStream(request: HttpRequest): Promise>; ++ private includeExtraHttpOptionsToRequestInit; ++ private unaryApiCall; ++ private streamApiCall; ++ processStreamResponse(response: Response): AsyncGenerator; ++ private apiCall; ++ getDefaultHeaders(): Record; ++ private getHeadersInternal; ++ /** ++ * Uploads a file asynchronously using Gemini API only, this is not supported ++ * in Vertex AI. ++ * ++ * @param file The string path to the file to be uploaded or a Blob object. ++ * @param config Optional parameters specified in the `UploadFileConfig` ++ * interface. @see {@link UploadFileConfig} ++ * @return A promise that resolves to a `File` object. ++ * @throws An error if called on a Vertex AI client. ++ * @throws An error if the `mimeType` is not provided and can not be inferred, ++ */ ++ uploadFile(file: string | Blob, config?: UploadFileConfig): Promise; ++ private fetchUploadUrl; ++} +diff --git a/dist/src/_auth.d.ts b/dist/src/_auth.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..de021e522e6d5b527e198cea1212ab62586f32b6 +--- /dev/null ++++ b/dist/src/_auth.d.ts +@@ -0,0 +1,16 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++/** ++ * The Auth interface is used to authenticate with the API service. ++ */ ++export interface Auth { ++ /** ++ * Sets the headers needed to authenticate with the API service. ++ * ++ * @param headers - The Headers object that will be updated with the authentication headers. ++ */ ++ addAuthHeaders(headers: Headers): Promise; ++} +diff --git a/dist/src/_common.d.ts b/dist/src/_common.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..98ad405d7bb8d9c2f5addd076cf8ff7f46c9433d +--- /dev/null ++++ b/dist/src/_common.d.ts +@@ -0,0 +1,10 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++export declare class BaseModule { ++} ++export declare function formatMap(templateString: string, valueMap: Record): string; ++export declare function setValueByPath(data: Record, keys: string[], value: unknown): void; ++export declare function getValueByPath(data: unknown, keys: string[]): unknown; +diff --git a/dist/src/_transformers.d.ts b/dist/src/_transformers.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..956b7ae202abfa3fecf2cc5512b5766cc7561a9c +--- /dev/null ++++ b/dist/src/_transformers.d.ts +@@ -0,0 +1,23 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from './_api_client'; ++import * as types from './types'; ++export declare function tModel(apiClient: ApiClient, model: string | unknown): string; ++export declare function tCachesModel(apiClient: ApiClient, model: string | unknown): string; ++export declare function tPart(apiClient: ApiClient, origin?: types.PartUnion | null): types.Part; ++export declare function tParts(apiClient: ApiClient, origin?: types.PartListUnion | null): types.Part[]; ++export declare function tContent(apiClient: ApiClient, origin?: types.ContentUnion): types.Content; ++export declare function tContentsForEmbed(apiClient: ApiClient, origin: types.ContentListUnion): types.ContentUnion[]; ++export declare function tContents(apiClient: ApiClient, origin?: types.ContentListUnion): types.Content[]; ++export declare function processSchema(apiClient: ApiClient, schema: types.Schema): void; ++export declare function tSchema(apiClient: ApiClient, schema: types.Schema): types.Schema; ++export declare function tSpeechConfig(apiClient: ApiClient, speechConfig: types.SpeechConfigUnion): types.SpeechConfig; ++export declare function tTool(apiClient: ApiClient, tool: types.Tool): types.Tool; ++export declare function tTools(apiClient: ApiClient, tool: types.Tool[] | unknown): types.Tool[]; ++export declare function tCachedContentName(apiClient: ApiClient, name: string | unknown): string; ++export declare function tTuningJobStatus(apiClient: ApiClient, status: string | unknown): string; ++export declare function tBytes(apiClient: ApiClient, fromImageBytes: string | unknown): string; ++export declare function tFileName(apiClient: ApiClient, fromName: string | unknown): string; +diff --git a/dist/src/_uploader.d.ts b/dist/src/_uploader.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..4748f50fa4b52ac0406aa9c5d41efca34577b68a +--- /dev/null ++++ b/dist/src/_uploader.d.ts +@@ -0,0 +1,45 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from './_api_client'; ++import { File } from './types'; ++/** ++ * Represents the size and mimeType of a file. The information is used to ++ * request the upload URL from the https://generativelanguage.googleapis.com/upload/v1beta/files endpoint. ++ * This interface defines the structure for constructing and executing HTTP ++ * requests. ++ */ ++export interface FileStat { ++ /** ++ * The size of the file in bytes. ++ */ ++ size: number; ++ /** ++ * The MIME type of the file. ++ */ ++ type: string | undefined; ++} ++export interface Uploader { ++ /** ++ * Uploads a file to the given upload url. ++ * ++ * @param file The file to upload. file is in string type or a Blob. ++ * @param uploadUrl The upload URL as a string is where the file will be ++ * uploaded to. The uploadUrl must be a url that was returned by the ++ * https://generativelanguage.googleapis.com/upload/v1beta/files endpoint ++ * @param apiClient The ApiClient to use for uploading. ++ * @return A Promise that resolves to types.File. ++ */ ++ upload(file: string | Blob, uploadUrl: string, apiClient: ApiClient): Promise; ++ /** ++ * Returns the file's mimeType and the size of a given file. If the file is a ++ * string path, the file type is determined by the file extension. If the ++ * file's type cannot be determined, the type will be set to undefined. ++ * ++ * @param file The file to get the stat for. Can be a string path or a Blob. ++ * @return A Promise that resolves to the file stat of the given file. ++ */ ++ stat(file: string | Blob): Promise; ++} +diff --git a/dist/src/_websocket.d.ts b/dist/src/_websocket.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..f6902022c8d744f3044b8785deaae54bcdb013d1 +--- /dev/null ++++ b/dist/src/_websocket.d.ts +@@ -0,0 +1,31 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++export interface WebSocketCallbacks { ++ onopen: () => void; ++ onerror: (e: any) => void; ++ onmessage: (e: any) => void; ++ onclose: (e: any) => void; ++} ++export interface WebSocket { ++ /** ++ * Connects the socket to the server. ++ */ ++ connect(): void; ++ /** ++ * Sends a message to the server. ++ */ ++ send(message: string): void; ++ /** ++ * Closes the socket connection. ++ */ ++ close(): void; ++} ++export interface WebSocketFactory { ++ /** ++ * Returns a new WebSocket instance. ++ */ ++ create(url: string, headers: Record, callbacks: WebSocketCallbacks): WebSocket; ++} +diff --git a/dist/src/caches.d.ts b/dist/src/caches.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..a8ecb7e3ef3f6e75055b6893fa84a07a193b8e78 +--- /dev/null ++++ b/dist/src/caches.d.ts +@@ -0,0 +1,95 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from './_api_client'; ++import { BaseModule } from './_common'; ++import { Pager } from './pagers'; ++import * as types from './types'; ++export declare class Caches extends BaseModule { ++ private readonly apiClient; ++ constructor(apiClient: ApiClient); ++ /** ++ * Lists cached content configurations. ++ * ++ * @param params - The parameters for the list request. ++ * @return The paginated results of the list of cached contents. ++ * ++ * @example ++ * ```ts ++ * const cachedContents = await ai.caches.list({config: {'pageSize': 2}}); ++ * for (const cachedContent of cachedContents) { ++ * console.log(cachedContent); ++ * } ++ * ``` ++ */ ++ list: (params?: types.ListCachedContentsParameters) => Promise>; ++ /** ++ * Creates a cached contents resource. ++ * ++ * @remarks ++ * Context caching is only supported for specific models. See [Gemini ++ * Developer API reference](https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac) ++ * and [Vertex AI reference](https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models) ++ * for more information. ++ * ++ * @param params - The parameters for the create request. ++ * @return The created cached content. ++ * ++ * @example ++ * ```ts ++ * const contents = ...; // Initialize the content to cache. ++ * const response = await ai.caches.create({ ++ * model: 'gemini-1.5-flash', ++ * config: { ++ * 'contents': contents, ++ * 'displayName': 'test cache', ++ * 'systemInstruction': 'What is the sum of the two pdfs?', ++ * 'ttl': '86400s', ++ * } ++ * }); ++ * ``` ++ */ ++ create(params: types.CreateCachedContentParameters): Promise; ++ /** ++ * Gets cached content configurations. ++ * ++ * @param params - The parameters for the get request. ++ * @return The cached content. ++ * ++ * @example ++ * ```ts ++ * await ai.caches.get({name: 'gemini-1.5-flash'}); ++ * ``` ++ */ ++ get(params: types.GetCachedContentParameters): Promise; ++ /** ++ * Deletes cached content. ++ * ++ * @param params - The parameters for the delete request. ++ * @return The empty response returned by the API. ++ * ++ * @example ++ * ```ts ++ * await ai.caches.delete({name: 'gemini-1.5-flash'}); ++ * ``` ++ */ ++ delete(params: types.DeleteCachedContentParameters): Promise; ++ /** ++ * Updates cached content configurations. ++ * ++ * @param params - The parameters for the update request. ++ * @return The updated cached content. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.caches.update({ ++ * name: 'gemini-1.5-flash', ++ * config: {'ttl': '7600s'} ++ * }); ++ * ``` ++ */ ++ update(params: types.UpdateCachedContentParameters): Promise; ++ private listInternal; ++} +diff --git a/dist/src/chats.d.ts b/dist/src/chats.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..01a69818bfd74e3763a49eb107620353e0b1efec +--- /dev/null ++++ b/dist/src/chats.d.ts +@@ -0,0 +1,125 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from './_api_client'; ++import { Models } from './models'; ++import * as types from './types'; ++/** ++ * A utility class to create a chat session. ++ */ ++export declare class Chats { ++ private readonly modelsModule; ++ private readonly apiClient; ++ constructor(modelsModule: Models, apiClient: ApiClient); ++ /** ++ * Creates a new chat session. ++ * ++ * @remarks ++ * The config in the params will be used for all requests within the chat ++ * session unless overridden by a per-request `config` in ++ * @see {@link types.SendMessageParameters#config}. ++ * ++ * @param params - Parameters for creating a chat session. ++ * @returns A new chat session. ++ * ++ * @example ++ * ```ts ++ * const chat = ai.chats.create({ ++ * model: 'gemini-2.0-flash' ++ * config: { ++ * temperature: 0.5, ++ * maxOutputTokens: 1024, ++ * } ++ * }); ++ * ``` ++ */ ++ create(params: types.CreateChatParameters): Chat; ++} ++/** ++ * Chat session that enables sending messages to the model with previous ++ * conversation context. ++ * ++ * @remarks ++ * The session maintains all the turns between user and model. ++ */ ++export declare class Chat { ++ private readonly apiClient; ++ private readonly modelsModule; ++ private readonly model; ++ private readonly config; ++ private history; ++ private sendPromise; ++ constructor(apiClient: ApiClient, modelsModule: Models, model: string, config?: types.GenerateContentConfig, history?: types.Content[]); ++ /** ++ * Sends a message to the model and returns the response. ++ * ++ * @remarks ++ * This method will wait for the previous message to be processed before ++ * sending the next message. ++ * ++ * @see {@link Chat#sendMessageStream} for streaming method. ++ * @param params - parameters for sending messages within a chat session. ++ * @returns The model's response. ++ * ++ * @example ++ * ```ts ++ * const chat = ai.chats.create({model: 'gemini-2.0-flash'}); ++ * const response = await chat.sendMessage({ ++ * message: 'Why is the sky blue?' ++ * }); ++ * console.log(response.text); ++ * ``` ++ */ ++ sendMessage(params: types.SendMessageParameters): Promise; ++ /** ++ * Sends a message to the model and returns the response in chunks. ++ * ++ * @remarks ++ * This method will wait for the previous message to be processed before ++ * sending the next message. ++ * ++ * @see {@link Chat#sendMessage} for non-streaming method. ++ * @param params - parameters for sending the message. ++ * @return The model's response. ++ * ++ * @example ++ * ```ts ++ * const chat = ai.chats.create({model: 'gemini-2.0-flash'}); ++ * const response = await chat.sendMessageStream({ ++ * message: 'Why is the sky blue?' ++ * }); ++ * for await (const chunk of response) { ++ * console.log(chunk.text); ++ * } ++ * ``` ++ */ ++ sendMessageStream(params: types.SendMessageParameters): Promise>; ++ /** ++ * Returns the chat history. ++ * ++ * @remarks ++ * The history is a list of contents alternating between user and model. ++ * ++ * There are two types of history: ++ * - The `curated history` contains only the valid turns between user and ++ * model, which will be included in the subsequent requests sent to the model. ++ * - The `comprehensive history` contains all turns, including invalid or ++ * empty model outputs, providing a complete record of the history. ++ * ++ * The history is updated after receiving the response from the model, ++ * for streaming response, it means receiving the last chunk of the response. ++ * ++ * The `comprehensive history` is returned by default. To get the `curated ++ * history`, set the `curated` parameter to `true`. ++ * ++ * @param curated - whether to return the curated history or the comprehensive ++ * history. ++ * @return History contents alternating between user and model for the entire ++ * chat session. ++ */ ++ getHistory(curated?: boolean): types.Content[]; ++ private processStreamResponse; ++ private recordHistory; ++} +diff --git a/dist/src/client.d.ts b/dist/src/client.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..dcf26703bf6778a79dacee27fe50c0c05cf3d3af +--- /dev/null ++++ b/dist/src/client.d.ts +@@ -0,0 +1,118 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { GoogleAuthOptions } from 'google-auth-library'; ++import { ApiClient } from './_api_client'; ++import { Caches } from './caches'; ++import { Chats } from './chats'; ++import { Files } from './files'; ++import { Live } from './live'; ++import { Models } from './models'; ++import { Operations } from './operations'; ++import { HttpOptions } from './types'; ++/** ++ * Google Gen AI SDK's configuration options. ++ * ++ * See {@link GoogleGenAI} for usage samples. ++ */ ++export interface GoogleGenAIOptions { ++ /** ++ * Optional. Determines whether to use the Vertex AI or the Gemini API. ++ * ++ * @remarks ++ * When true, the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI API} will used. ++ * When false, the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API} will be used. ++ * ++ * If unset, default SDK behavior is to use the Gemini API service. ++ */ ++ vertexai?: boolean; ++ /** ++ * Optional. The Google Cloud project ID for Vertex AI clients. ++ * ++ * @remarks ++ * Only supported on Node runtimes, ignored on browser runtimes. ++ */ ++ project?: string; ++ /** ++ * Optional. The Google Cloud project region for Vertex AI clients. ++ * ++ * @remarks ++ * Only supported on Node runtimes, ignored on browser runtimes. ++ * ++ */ ++ location?: string; ++ /** ++ * The API Key, required for Gemini API clients. ++ * ++ * @remarks ++ * Required on browser runtimes. ++ */ ++ apiKey?: string; ++ /** ++ * Optional. The API version to use. ++ * ++ * @remarks ++ * If unset, the default API version will be used. ++ */ ++ apiVersion?: string; ++ /** ++ * Optional. Authentication options defined by the by google-auth-library for Vertex AI clients. ++ * ++ * @remarks ++ * @see {@link https://github.com/googleapis/google-auth-library-nodejs/blob/v9.15.0/src/auth/googleauth.ts | GoogleAuthOptions interface in google-auth-library-nodejs}. ++ * ++ * Only supported on Node runtimes, ignored on browser runtimes. ++ * ++ */ ++ googleAuthOptions?: GoogleAuthOptions; ++ /** ++ * Optional. A set of customizable configuration for HTTP requests. ++ */ ++ httpOptions?: HttpOptions; ++} ++/** ++ * The Google GenAI SDK. ++ * ++ * @remarks ++ * Provides access to the GenAI features through either the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API} ++ * or the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI API}. ++ * ++ * The {@link GoogleGenAIOptions.vertexai} value determines which of the API services to use. ++ * ++ * When using the Gemini API, a {@link GoogleGenAIOptions.apiKey} must also be set, ++ * when using Vertex AI {@link GoogleGenAIOptions.project} and {@link GoogleGenAIOptions.location} must also be set. ++ * ++ * @example ++ * Initializing the SDK for using the Gemini API: ++ * ```ts ++ * import {GoogleGenAI} from '@google/genai'; ++ * const ai = new GoogleGenAI({apiKey: 'GEMINI_API_KEY'}); ++ * ``` ++ * ++ * @example ++ * Initializing the SDK for using the Vertex AI API: ++ * ```ts ++ * import {GoogleGenAI} from '@google/genai'; ++ * const ai = new GoogleGenAI({ ++ * vertexai: true, ++ * project: 'PROJECT_ID', ++ * location: 'PROJECT_LOCATION' ++ * }); ++ * ``` ++ * ++ */ ++export declare class GoogleGenAI { ++ protected readonly apiClient: ApiClient; ++ private readonly apiKey?; ++ readonly vertexai: boolean; ++ private readonly apiVersion?; ++ readonly models: Models; ++ readonly live: Live; ++ readonly chats: Chats; ++ readonly caches: Caches; ++ readonly files: Files; ++ readonly operations: Operations; ++ constructor(options: GoogleGenAIOptions); ++} +diff --git a/dist/src/converters/_caches_converters.d.ts b/dist/src/converters/_caches_converters.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..5f6b08f412a8df4003a6ff93f36f273e3c6c9d79 +--- /dev/null ++++ b/dist/src/converters/_caches_converters.d.ts +@@ -0,0 +1,49 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import * as types from '../types'; ++export declare function partToMldev(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentToMldev(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function schemaToMldev(apiClient: ApiClient, fromObject: types.Schema): Record; ++export declare function functionDeclarationToMldev(apiClient: ApiClient, fromObject: types.FunctionDeclaration): Record; ++export declare function googleSearchToMldev(): Record; ++export declare function dynamicRetrievalConfigToMldev(apiClient: ApiClient, fromObject: types.DynamicRetrievalConfig): Record; ++export declare function googleSearchRetrievalToMldev(apiClient: ApiClient, fromObject: types.GoogleSearchRetrieval): Record; ++export declare function toolToMldev(apiClient: ApiClient, fromObject: types.Tool): Record; ++export declare function functionCallingConfigToMldev(apiClient: ApiClient, fromObject: types.FunctionCallingConfig): Record; ++export declare function toolConfigToMldev(apiClient: ApiClient, fromObject: types.ToolConfig): Record; ++export declare function createCachedContentConfigToMldev(apiClient: ApiClient, fromObject: types.CreateCachedContentConfig, parentObject: Record): Record; ++export declare function createCachedContentParametersToMldev(apiClient: ApiClient, fromObject: types.CreateCachedContentParameters): Record; ++export declare function getCachedContentParametersToMldev(apiClient: ApiClient, fromObject: types.GetCachedContentParameters): Record; ++export declare function deleteCachedContentParametersToMldev(apiClient: ApiClient, fromObject: types.DeleteCachedContentParameters): Record; ++export declare function updateCachedContentConfigToMldev(apiClient: ApiClient, fromObject: types.UpdateCachedContentConfig, parentObject: Record): Record; ++export declare function updateCachedContentParametersToMldev(apiClient: ApiClient, fromObject: types.UpdateCachedContentParameters): Record; ++export declare function listCachedContentsConfigToMldev(apiClient: ApiClient, fromObject: types.ListCachedContentsConfig, parentObject: Record): Record; ++export declare function listCachedContentsParametersToMldev(apiClient: ApiClient, fromObject: types.ListCachedContentsParameters): Record; ++export declare function partToVertex(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentToVertex(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function schemaToVertex(apiClient: ApiClient, fromObject: types.Schema): Record; ++export declare function functionDeclarationToVertex(apiClient: ApiClient, fromObject: types.FunctionDeclaration): Record; ++export declare function googleSearchToVertex(): Record; ++export declare function dynamicRetrievalConfigToVertex(apiClient: ApiClient, fromObject: types.DynamicRetrievalConfig): Record; ++export declare function googleSearchRetrievalToVertex(apiClient: ApiClient, fromObject: types.GoogleSearchRetrieval): Record; ++export declare function toolToVertex(apiClient: ApiClient, fromObject: types.Tool): Record; ++export declare function functionCallingConfigToVertex(apiClient: ApiClient, fromObject: types.FunctionCallingConfig): Record; ++export declare function toolConfigToVertex(apiClient: ApiClient, fromObject: types.ToolConfig): Record; ++export declare function createCachedContentConfigToVertex(apiClient: ApiClient, fromObject: types.CreateCachedContentConfig, parentObject: Record): Record; ++export declare function createCachedContentParametersToVertex(apiClient: ApiClient, fromObject: types.CreateCachedContentParameters): Record; ++export declare function getCachedContentParametersToVertex(apiClient: ApiClient, fromObject: types.GetCachedContentParameters): Record; ++export declare function deleteCachedContentParametersToVertex(apiClient: ApiClient, fromObject: types.DeleteCachedContentParameters): Record; ++export declare function updateCachedContentConfigToVertex(apiClient: ApiClient, fromObject: types.UpdateCachedContentConfig, parentObject: Record): Record; ++export declare function updateCachedContentParametersToVertex(apiClient: ApiClient, fromObject: types.UpdateCachedContentParameters): Record; ++export declare function listCachedContentsConfigToVertex(apiClient: ApiClient, fromObject: types.ListCachedContentsConfig, parentObject: Record): Record; ++export declare function listCachedContentsParametersToVertex(apiClient: ApiClient, fromObject: types.ListCachedContentsParameters): Record; ++export declare function cachedContentFromMldev(apiClient: ApiClient, fromObject: types.CachedContent): Record; ++export declare function deleteCachedContentResponseFromMldev(): Record; ++export declare function listCachedContentsResponseFromMldev(apiClient: ApiClient, fromObject: types.ListCachedContentsResponse): Record; ++export declare function cachedContentFromVertex(apiClient: ApiClient, fromObject: types.CachedContent): Record; ++export declare function deleteCachedContentResponseFromVertex(): Record; ++export declare function listCachedContentsResponseFromVertex(apiClient: ApiClient, fromObject: types.ListCachedContentsResponse): Record; +diff --git a/dist/src/converters/_files_converters.d.ts b/dist/src/converters/_files_converters.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..ff5196bff283098c33b9e8cd49b37914c4130e92 +--- /dev/null ++++ b/dist/src/converters/_files_converters.d.ts +@@ -0,0 +1,19 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import * as types from '../types'; ++export declare function listFilesConfigToMldev(apiClient: ApiClient, fromObject: types.ListFilesConfig, parentObject: Record): Record; ++export declare function listFilesParametersToMldev(apiClient: ApiClient, fromObject: types.ListFilesParameters): Record; ++export declare function fileStatusToMldev(apiClient: ApiClient, fromObject: types.FileStatus): Record; ++export declare function fileToMldev(apiClient: ApiClient, fromObject: types.File): Record; ++export declare function createFileParametersToMldev(apiClient: ApiClient, fromObject: types.CreateFileParameters): Record; ++export declare function getFileParametersToMldev(apiClient: ApiClient, fromObject: types.GetFileParameters): Record; ++export declare function deleteFileParametersToMldev(apiClient: ApiClient, fromObject: types.DeleteFileParameters): Record; ++export declare function fileStatusFromMldev(apiClient: ApiClient, fromObject: types.FileStatus): Record; ++export declare function fileFromMldev(apiClient: ApiClient, fromObject: types.File): Record; ++export declare function listFilesResponseFromMldev(apiClient: ApiClient, fromObject: types.ListFilesResponse): Record; ++export declare function createFileResponseFromMldev(): Record; ++export declare function deleteFileResponseFromMldev(): Record; +diff --git a/dist/src/converters/_live_converters.d.ts b/dist/src/converters/_live_converters.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..809a88a2ad2eb59aaca17ca5a66b4768bb7f74d1 +--- /dev/null ++++ b/dist/src/converters/_live_converters.d.ts +@@ -0,0 +1,81 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import * as types from '../types'; ++export declare function partToMldev(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function partToVertex(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentToMldev(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function contentToVertex(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function schemaToMldev(apiClient: ApiClient, fromObject: types.Schema): Record; ++export declare function schemaToVertex(apiClient: ApiClient, fromObject: types.Schema): Record; ++export declare function functionDeclarationToMldev(apiClient: ApiClient, fromObject: types.FunctionDeclaration): Record; ++export declare function functionDeclarationToVertex(apiClient: ApiClient, fromObject: types.FunctionDeclaration): Record; ++export declare function googleSearchToMldev(): Record; ++export declare function googleSearchToVertex(): Record; ++export declare function dynamicRetrievalConfigToMldev(apiClient: ApiClient, fromObject: types.DynamicRetrievalConfig): Record; ++export declare function dynamicRetrievalConfigToVertex(apiClient: ApiClient, fromObject: types.DynamicRetrievalConfig): Record; ++export declare function googleSearchRetrievalToMldev(apiClient: ApiClient, fromObject: types.GoogleSearchRetrieval): Record; ++export declare function googleSearchRetrievalToVertex(apiClient: ApiClient, fromObject: types.GoogleSearchRetrieval): Record; ++export declare function toolToMldev(apiClient: ApiClient, fromObject: types.Tool): Record; ++export declare function toolToVertex(apiClient: ApiClient, fromObject: types.Tool): Record; ++export declare function sessionResumptionConfigToMldev(apiClient: ApiClient, fromObject: types.SessionResumptionConfig): Record; ++export declare function sessionResumptionConfigToVertex(apiClient: ApiClient, fromObject: types.SessionResumptionConfig): Record; ++export declare function audioTranscriptionConfigToMldev(): Record; ++export declare function audioTranscriptionConfigToVertex(): Record; ++export declare function automaticActivityDetectionToMldev(apiClient: ApiClient, fromObject: types.AutomaticActivityDetection): Record; ++export declare function automaticActivityDetectionToVertex(apiClient: ApiClient, fromObject: types.AutomaticActivityDetection): Record; ++export declare function realtimeInputConfigToMldev(apiClient: ApiClient, fromObject: types.RealtimeInputConfig): Record; ++export declare function realtimeInputConfigToVertex(apiClient: ApiClient, fromObject: types.RealtimeInputConfig): Record; ++export declare function slidingWindowToMldev(apiClient: ApiClient, fromObject: types.SlidingWindow): Record; ++export declare function slidingWindowToVertex(apiClient: ApiClient, fromObject: types.SlidingWindow): Record; ++export declare function contextWindowCompressionConfigToMldev(apiClient: ApiClient, fromObject: types.ContextWindowCompressionConfig): Record; ++export declare function contextWindowCompressionConfigToVertex(apiClient: ApiClient, fromObject: types.ContextWindowCompressionConfig): Record; ++export declare function liveConnectConfigToMldev(apiClient: ApiClient, fromObject: types.LiveConnectConfig, parentObject: Record): Record; ++export declare function liveConnectConfigToVertex(apiClient: ApiClient, fromObject: types.LiveConnectConfig, parentObject: Record): Record; ++export declare function liveConnectParametersToMldev(apiClient: ApiClient, fromObject: types.LiveConnectParameters): Record; ++export declare function liveConnectParametersToVertex(apiClient: ApiClient, fromObject: types.LiveConnectParameters): Record; ++export declare function liveClientSetupToMldev(apiClient: ApiClient, fromObject: types.LiveClientSetup): Record; ++export declare function liveClientSetupToVertex(apiClient: ApiClient, fromObject: types.LiveClientSetup): Record; ++export declare function liveClientContentToMldev(apiClient: ApiClient, fromObject: types.LiveClientContent): Record; ++export declare function liveClientContentToVertex(apiClient: ApiClient, fromObject: types.LiveClientContent): Record; ++export declare function activityStartToMldev(): Record; ++export declare function activityStartToVertex(): Record; ++export declare function activityEndToMldev(): Record; ++export declare function activityEndToVertex(): Record; ++export declare function liveClientRealtimeInputToMldev(apiClient: ApiClient, fromObject: types.LiveClientRealtimeInput): Record; ++export declare function liveClientRealtimeInputToVertex(apiClient: ApiClient, fromObject: types.LiveClientRealtimeInput): Record; ++export declare function functionResponseToMldev(apiClient: ApiClient, fromObject: types.FunctionResponse): Record; ++export declare function functionResponseToVertex(apiClient: ApiClient, fromObject: types.FunctionResponse): Record; ++export declare function liveClientToolResponseToMldev(apiClient: ApiClient, fromObject: types.LiveClientToolResponse): Record; ++export declare function liveClientToolResponseToVertex(apiClient: ApiClient, fromObject: types.LiveClientToolResponse): Record; ++export declare function liveClientMessageToMldev(apiClient: ApiClient, fromObject: types.LiveClientMessage): Record; ++export declare function liveClientMessageToVertex(apiClient: ApiClient, fromObject: types.LiveClientMessage): Record; ++export declare function liveServerSetupCompleteFromMldev(): Record; ++export declare function liveServerSetupCompleteFromVertex(): Record; ++export declare function partFromMldev(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function partFromVertex(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentFromMldev(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function contentFromVertex(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function transcriptionFromMldev(): Record; ++export declare function transcriptionFromVertex(): Record; ++export declare function liveServerContentFromMldev(apiClient: ApiClient, fromObject: types.LiveServerContent): Record; ++export declare function liveServerContentFromVertex(apiClient: ApiClient, fromObject: types.LiveServerContent): Record; ++export declare function functionCallFromMldev(apiClient: ApiClient, fromObject: types.FunctionCall): Record; ++export declare function functionCallFromVertex(apiClient: ApiClient, fromObject: types.FunctionCall): Record; ++export declare function liveServerToolCallFromMldev(apiClient: ApiClient, fromObject: types.LiveServerToolCall): Record; ++export declare function liveServerToolCallFromVertex(apiClient: ApiClient, fromObject: types.LiveServerToolCall): Record; ++export declare function liveServerToolCallCancellationFromMldev(apiClient: ApiClient, fromObject: types.LiveServerToolCallCancellation): Record; ++export declare function liveServerToolCallCancellationFromVertex(apiClient: ApiClient, fromObject: types.LiveServerToolCallCancellation): Record; ++export declare function modalityTokenCountFromMldev(apiClient: ApiClient, fromObject: types.ModalityTokenCount): Record; ++export declare function modalityTokenCountFromVertex(apiClient: ApiClient, fromObject: types.ModalityTokenCount): Record; ++export declare function usageMetadataFromMldev(apiClient: ApiClient, fromObject: types.UsageMetadata): Record; ++export declare function usageMetadataFromVertex(apiClient: ApiClient, fromObject: types.UsageMetadata): Record; ++export declare function liveServerGoAwayFromMldev(apiClient: ApiClient, fromObject: types.LiveServerGoAway): Record; ++export declare function liveServerGoAwayFromVertex(apiClient: ApiClient, fromObject: types.LiveServerGoAway): Record; ++export declare function liveServerSessionResumptionUpdateFromMldev(apiClient: ApiClient, fromObject: types.LiveServerSessionResumptionUpdate): Record; ++export declare function liveServerSessionResumptionUpdateFromVertex(apiClient: ApiClient, fromObject: types.LiveServerSessionResumptionUpdate): Record; ++export declare function liveServerMessageFromMldev(apiClient: ApiClient, fromObject: types.LiveServerMessage): Record; ++export declare function liveServerMessageFromVertex(apiClient: ApiClient, fromObject: types.LiveServerMessage): Record; +diff --git a/dist/src/converters/_models_converters.d.ts b/dist/src/converters/_models_converters.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..333adc776bd14c467e38a13af1b980533606957b +--- /dev/null ++++ b/dist/src/converters/_models_converters.d.ts +@@ -0,0 +1,107 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import * as types from '../types'; ++export declare function partToMldev(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentToMldev(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function schemaToMldev(apiClient: ApiClient, fromObject: types.Schema): Record; ++export declare function modelSelectionConfigToMldev(apiClient: ApiClient, fromObject: types.ModelSelectionConfig): Record; ++export declare function safetySettingToMldev(apiClient: ApiClient, fromObject: types.SafetySetting): Record; ++export declare function functionDeclarationToMldev(apiClient: ApiClient, fromObject: types.FunctionDeclaration): Record; ++export declare function googleSearchToMldev(): Record; ++export declare function dynamicRetrievalConfigToMldev(apiClient: ApiClient, fromObject: types.DynamicRetrievalConfig): Record; ++export declare function googleSearchRetrievalToMldev(apiClient: ApiClient, fromObject: types.GoogleSearchRetrieval): Record; ++export declare function toolToMldev(apiClient: ApiClient, fromObject: types.Tool): Record; ++export declare function functionCallingConfigToMldev(apiClient: ApiClient, fromObject: types.FunctionCallingConfig): Record; ++export declare function toolConfigToMldev(apiClient: ApiClient, fromObject: types.ToolConfig): Record; ++export declare function prebuiltVoiceConfigToMldev(apiClient: ApiClient, fromObject: types.PrebuiltVoiceConfig): Record; ++export declare function voiceConfigToMldev(apiClient: ApiClient, fromObject: types.VoiceConfig): Record; ++export declare function speechConfigToMldev(apiClient: ApiClient, fromObject: types.SpeechConfig): Record; ++export declare function thinkingConfigToMldev(apiClient: ApiClient, fromObject: types.ThinkingConfig): Record; ++export declare function generateContentConfigToMldev(apiClient: ApiClient, fromObject: types.GenerateContentConfig, parentObject: Record): Record; ++export declare function generateContentParametersToMldev(apiClient: ApiClient, fromObject: types.GenerateContentParameters): Record; ++export declare function embedContentConfigToMldev(apiClient: ApiClient, fromObject: types.EmbedContentConfig, parentObject: Record): Record; ++export declare function embedContentParametersToMldev(apiClient: ApiClient, fromObject: types.EmbedContentParameters): Record; ++export declare function generateImagesConfigToMldev(apiClient: ApiClient, fromObject: types.GenerateImagesConfig, parentObject: Record): Record; ++export declare function generateImagesParametersToMldev(apiClient: ApiClient, fromObject: types.GenerateImagesParameters): Record; ++export declare function getModelParametersToMldev(apiClient: ApiClient, fromObject: types.GetModelParameters): Record; ++export declare function countTokensConfigToMldev(apiClient: ApiClient, fromObject: types.CountTokensConfig): Record; ++export declare function countTokensParametersToMldev(apiClient: ApiClient, fromObject: types.CountTokensParameters): Record; ++export declare function imageToMldev(apiClient: ApiClient, fromObject: types.Image): Record; ++export declare function generateVideosConfigToMldev(apiClient: ApiClient, fromObject: types.GenerateVideosConfig, parentObject: Record): Record; ++export declare function generateVideosParametersToMldev(apiClient: ApiClient, fromObject: types.GenerateVideosParameters): Record; ++export declare function partToVertex(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentToVertex(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function schemaToVertex(apiClient: ApiClient, fromObject: types.Schema): Record; ++export declare function modelSelectionConfigToVertex(apiClient: ApiClient, fromObject: types.ModelSelectionConfig): Record; ++export declare function safetySettingToVertex(apiClient: ApiClient, fromObject: types.SafetySetting): Record; ++export declare function functionDeclarationToVertex(apiClient: ApiClient, fromObject: types.FunctionDeclaration): Record; ++export declare function googleSearchToVertex(): Record; ++export declare function dynamicRetrievalConfigToVertex(apiClient: ApiClient, fromObject: types.DynamicRetrievalConfig): Record; ++export declare function googleSearchRetrievalToVertex(apiClient: ApiClient, fromObject: types.GoogleSearchRetrieval): Record; ++export declare function toolToVertex(apiClient: ApiClient, fromObject: types.Tool): Record; ++export declare function functionCallingConfigToVertex(apiClient: ApiClient, fromObject: types.FunctionCallingConfig): Record; ++export declare function toolConfigToVertex(apiClient: ApiClient, fromObject: types.ToolConfig): Record; ++export declare function prebuiltVoiceConfigToVertex(apiClient: ApiClient, fromObject: types.PrebuiltVoiceConfig): Record; ++export declare function voiceConfigToVertex(apiClient: ApiClient, fromObject: types.VoiceConfig): Record; ++export declare function speechConfigToVertex(apiClient: ApiClient, fromObject: types.SpeechConfig): Record; ++export declare function thinkingConfigToVertex(apiClient: ApiClient, fromObject: types.ThinkingConfig): Record; ++export declare function generateContentConfigToVertex(apiClient: ApiClient, fromObject: types.GenerateContentConfig, parentObject: Record): Record; ++export declare function generateContentParametersToVertex(apiClient: ApiClient, fromObject: types.GenerateContentParameters): Record; ++export declare function embedContentConfigToVertex(apiClient: ApiClient, fromObject: types.EmbedContentConfig, parentObject: Record): Record; ++export declare function embedContentParametersToVertex(apiClient: ApiClient, fromObject: types.EmbedContentParameters): Record; ++export declare function generateImagesConfigToVertex(apiClient: ApiClient, fromObject: types.GenerateImagesConfig, parentObject: Record): Record; ++export declare function generateImagesParametersToVertex(apiClient: ApiClient, fromObject: types.GenerateImagesParameters): Record; ++export declare function getModelParametersToVertex(apiClient: ApiClient, fromObject: types.GetModelParameters): Record; ++export declare function countTokensConfigToVertex(apiClient: ApiClient, fromObject: types.CountTokensConfig, parentObject: Record): Record; ++export declare function countTokensParametersToVertex(apiClient: ApiClient, fromObject: types.CountTokensParameters): Record; ++export declare function computeTokensParametersToVertex(apiClient: ApiClient, fromObject: types.ComputeTokensParameters): Record; ++export declare function imageToVertex(apiClient: ApiClient, fromObject: types.Image): Record; ++export declare function generateVideosConfigToVertex(apiClient: ApiClient, fromObject: types.GenerateVideosConfig, parentObject: Record): Record; ++export declare function generateVideosParametersToVertex(apiClient: ApiClient, fromObject: types.GenerateVideosParameters): Record; ++export declare function partFromMldev(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentFromMldev(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function citationMetadataFromMldev(apiClient: ApiClient, fromObject: types.CitationMetadata): Record; ++export declare function candidateFromMldev(apiClient: ApiClient, fromObject: types.Candidate): Record; ++export declare function generateContentResponseFromMldev(apiClient: ApiClient, fromObject: types.GenerateContentResponse): Record; ++export declare function contentEmbeddingStatisticsFromMldev(): Record; ++export declare function contentEmbeddingFromMldev(apiClient: ApiClient, fromObject: types.ContentEmbedding): Record; ++export declare function embedContentMetadataFromMldev(): Record; ++export declare function embedContentResponseFromMldev(apiClient: ApiClient, fromObject: types.EmbedContentResponse): Record; ++export declare function imageFromMldev(apiClient: ApiClient, fromObject: types.Image): Record; ++export declare function safetyAttributesFromMldev(apiClient: ApiClient, fromObject: types.SafetyAttributes): Record; ++export declare function generatedImageFromMldev(apiClient: ApiClient, fromObject: types.GeneratedImage): Record; ++export declare function generateImagesResponseFromMldev(apiClient: ApiClient, fromObject: types.GenerateImagesResponse): Record; ++export declare function endpointFromMldev(): Record; ++export declare function tunedModelInfoFromMldev(apiClient: ApiClient, fromObject: types.TunedModelInfo): Record; ++export declare function modelFromMldev(apiClient: ApiClient, fromObject: types.Model): Record; ++export declare function countTokensResponseFromMldev(apiClient: ApiClient, fromObject: types.CountTokensResponse): Record; ++export declare function videoFromMldev(apiClient: ApiClient, fromObject: types.Video): Record; ++export declare function generatedVideoFromMldev(apiClient: ApiClient, fromObject: types.GeneratedVideo): Record; ++export declare function generateVideosResponseFromMldev(apiClient: ApiClient, fromObject: types.GenerateVideosResponse): Record; ++export declare function generateVideosOperationFromMldev(apiClient: ApiClient, fromObject: types.GenerateVideosOperation): Record; ++export declare function partFromVertex(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentFromVertex(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function citationMetadataFromVertex(apiClient: ApiClient, fromObject: types.CitationMetadata): Record; ++export declare function candidateFromVertex(apiClient: ApiClient, fromObject: types.Candidate): Record; ++export declare function generateContentResponseFromVertex(apiClient: ApiClient, fromObject: types.GenerateContentResponse): Record; ++export declare function contentEmbeddingStatisticsFromVertex(apiClient: ApiClient, fromObject: types.ContentEmbeddingStatistics): Record; ++export declare function contentEmbeddingFromVertex(apiClient: ApiClient, fromObject: types.ContentEmbedding): Record; ++export declare function embedContentMetadataFromVertex(apiClient: ApiClient, fromObject: types.EmbedContentMetadata): Record; ++export declare function embedContentResponseFromVertex(apiClient: ApiClient, fromObject: types.EmbedContentResponse): Record; ++export declare function imageFromVertex(apiClient: ApiClient, fromObject: types.Image): Record; ++export declare function safetyAttributesFromVertex(apiClient: ApiClient, fromObject: types.SafetyAttributes): Record; ++export declare function generatedImageFromVertex(apiClient: ApiClient, fromObject: types.GeneratedImage): Record; ++export declare function generateImagesResponseFromVertex(apiClient: ApiClient, fromObject: types.GenerateImagesResponse): Record; ++export declare function endpointFromVertex(apiClient: ApiClient, fromObject: types.Endpoint): Record; ++export declare function tunedModelInfoFromVertex(apiClient: ApiClient, fromObject: types.TunedModelInfo): Record; ++export declare function modelFromVertex(apiClient: ApiClient, fromObject: types.Model): Record; ++export declare function countTokensResponseFromVertex(apiClient: ApiClient, fromObject: types.CountTokensResponse): Record; ++export declare function computeTokensResponseFromVertex(apiClient: ApiClient, fromObject: types.ComputeTokensResponse): Record; ++export declare function videoFromVertex(apiClient: ApiClient, fromObject: types.Video): Record; ++export declare function generatedVideoFromVertex(apiClient: ApiClient, fromObject: types.GeneratedVideo): Record; ++export declare function generateVideosResponseFromVertex(apiClient: ApiClient, fromObject: types.GenerateVideosResponse): Record; ++export declare function generateVideosOperationFromVertex(apiClient: ApiClient, fromObject: types.GenerateVideosOperation): Record; +diff --git a/dist/src/converters/_operations_converters.d.ts b/dist/src/converters/_operations_converters.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..00fabb987cc151833cd5656216dfc4f2a78e9533 +--- /dev/null ++++ b/dist/src/converters/_operations_converters.d.ts +@@ -0,0 +1,18 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import * as types from '../types'; ++export declare function getOperationParametersToMldev(apiClient: ApiClient, fromObject: types.GetOperationParameters): Record; ++export declare function getOperationParametersToVertex(apiClient: ApiClient, fromObject: types.GetOperationParameters): Record; ++export declare function fetchPredictOperationParametersToVertex(apiClient: ApiClient, fromObject: types.FetchPredictOperationParameters): Record; ++export declare function videoFromMldev(apiClient: ApiClient, fromObject: types.Video): Record; ++export declare function generatedVideoFromMldev(apiClient: ApiClient, fromObject: types.GeneratedVideo): Record; ++export declare function generateVideosResponseFromMldev(apiClient: ApiClient, fromObject: types.GenerateVideosResponse): Record; ++export declare function generateVideosOperationFromMldev(apiClient: ApiClient, fromObject: types.GenerateVideosOperation): Record; ++export declare function videoFromVertex(apiClient: ApiClient, fromObject: types.Video): Record; ++export declare function generatedVideoFromVertex(apiClient: ApiClient, fromObject: types.GeneratedVideo): Record; ++export declare function generateVideosResponseFromVertex(apiClient: ApiClient, fromObject: types.GenerateVideosResponse): Record; ++export declare function generateVideosOperationFromVertex(apiClient: ApiClient, fromObject: types.GenerateVideosOperation): Record; +diff --git a/dist/src/cross/_cross_error.d.ts b/dist/src/cross/_cross_error.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..d74c1c8d6dc211bbc9e99c0cd3ed5460be5ee611 +--- /dev/null ++++ b/dist/src/cross/_cross_error.d.ts +@@ -0,0 +1,6 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++export declare function crossError(): Error; +diff --git a/dist/src/cross/_cross_uploader.d.ts b/dist/src/cross/_cross_uploader.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..fa7423bdf25d94b69408076c96bfcfd0310546a2 +--- /dev/null ++++ b/dist/src/cross/_cross_uploader.d.ts +@@ -0,0 +1,15 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import { FileStat, Uploader } from '../_uploader'; ++import { File } from '../types'; ++export declare const MAX_CHUNK_SIZE: number; ++export declare class CrossUploader implements Uploader { ++ upload(file: string | Blob, uploadUrl: string, apiClient: ApiClient): Promise; ++ stat(file: string | Blob): Promise; ++} ++export declare function uploadBlob(file: Blob, uploadUrl: string, apiClient: ApiClient): Promise; ++export declare function getBlobStat(file: Blob): Promise; +diff --git a/dist/src/cross/_cross_websocket.d.ts b/dist/src/cross/_cross_websocket.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..d3a0532b85c77d512dfc717e7adb591579e985a8 +--- /dev/null ++++ b/dist/src/cross/_cross_websocket.d.ts +@@ -0,0 +1,9 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { WebSocketCallbacks, WebSocketFactory, WebSocket as Ws } from '../_websocket'; ++export declare class CrossWebSocketFactory implements WebSocketFactory { ++ create(url: string, headers: Record, callbacks: WebSocketCallbacks): Ws; ++} +diff --git a/dist/src/files.d.ts b/dist/src/files.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..326a8bc473ea971f46bf687f158416121a7d8d91 +--- /dev/null ++++ b/dist/src/files.d.ts +@@ -0,0 +1,107 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from './_api_client'; ++import { BaseModule } from './_common'; ++import { Pager } from './pagers'; ++import * as types from './types'; ++export declare class Files extends BaseModule { ++ private readonly apiClient; ++ constructor(apiClient: ApiClient); ++ /** ++ * Lists all current project files from the service. ++ * ++ * @param params - The parameters for the list request ++ * @return The paginated results of the list of files ++ * ++ * @example ++ * The following code prints the names of all files from the service, the ++ * size of each page is 10. ++ * ++ * ```ts ++ * const listResponse = await ai.files.list({config: {'pageSize': 10}}); ++ * for await (const file of listResponse) { ++ * console.log(file.name); ++ * } ++ * ``` ++ */ ++ list: (params?: types.ListFilesParameters) => Promise>; ++ /** ++ * Uploads a file asynchronously to the Gemini API. ++ * This method is not available in Vertex AI. ++ * Supported upload sources: ++ * - Node.js: File path (string) or Blob object. ++ * - Browser: Blob object (e.g., File). ++ * ++ * @remarks ++ * The `mimeType` can be specified in the `config` parameter. If omitted: ++ * - For file path (string) inputs, the `mimeType` will be inferred from the ++ * file extension. ++ * - For Blob object inputs, the `mimeType` will be set to the Blob's `type` ++ * property. ++ * Somex eamples for file extension to mimeType mapping: ++ * .txt -> text/plain ++ * .json -> application/json ++ * .jpg -> image/jpeg ++ * .png -> image/png ++ * .mp3 -> audio/mpeg ++ * .mp4 -> video/mp4 ++ * ++ * This section can contain multiple paragraphs and code examples. ++ * ++ * @param params - Optional parameters specified in the ++ * `types.UploadFileParameters` interface. ++ * @see {@link types.UploadFileParameters#config} for the optional ++ * config in the parameters. ++ * @return A promise that resolves to a `types.File` object. ++ * @throws An error if called on a Vertex AI client. ++ * @throws An error if the `mimeType` is not provided and can not be inferred, ++ * the `mimeType` can be provided in the `params.config` parameter. ++ * @throws An error occurs if a suitable upload location cannot be established. ++ * ++ * @example ++ * The following code uploads a file to Gemini API. ++ * ++ * ```ts ++ * const file = await ai.files.upload({file: 'file.txt', config: { ++ * mimeType: 'text/plain', ++ * }}); ++ * console.log(file.name); ++ * ``` ++ */ ++ upload(params: types.UploadFileParameters): Promise; ++ private listInternal; ++ private createInternal; ++ /** ++ * Retrieves the file information from the service. ++ * ++ * @param params - The parameters for the get request ++ * @return The Promise that resolves to the types.File object requested. ++ * ++ * @example ++ * ```ts ++ * const config: GetFileParameters = { ++ * name: fileName, ++ * }; ++ * file = await ai.files.get(config); ++ * console.log(file.name); ++ * ``` ++ */ ++ get(params: types.GetFileParameters): Promise; ++ /** ++ * Deletes a remotely stored file. ++ * ++ * @param params - The parameters for the delete request. ++ * @return The DeleteFileResponse, the response for the delete method. ++ * ++ * @example ++ * The following code deletes an example file named "files/mehozpxf877d". ++ * ++ * ```ts ++ * await ai.files.delete({name: file.name}); ++ * ``` ++ */ ++ delete(params: types.DeleteFileParameters): Promise; ++} +diff --git a/dist/src/index.d.ts b/dist/src/index.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..ec347c72b2137135de417c16bbf1dff55e05e5c1 +--- /dev/null ++++ b/dist/src/index.d.ts +@@ -0,0 +1,14 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++export * from './caches'; ++export * from './chats'; ++export { GoogleGenAI, GoogleGenAIOptions } from './client'; ++export { Files } from './files'; ++export * from './live'; ++export { Models } from './models'; ++export { Operations } from './operations'; ++export { PagedItem, Pager } from './pagers'; ++export * from './types'; +diff --git a/dist/src/live.d.ts b/dist/src/live.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..a34c163ddba7cca84ab471ef8376c754035ad4fb +--- /dev/null ++++ b/dist/src/live.d.ts +@@ -0,0 +1,193 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++/** ++ * Live client. ++ * ++ * @experimental ++ */ ++import { ApiClient } from './_api_client'; ++import { Auth } from './_auth'; ++import { WebSocket, WebSocketFactory } from './_websocket'; ++import * as types from './types'; ++/** ++ Live class encapsulates the configuration for live interaction with the ++ Generative Language API. It embeds ApiClient for general API settings. ++ ++ @experimental ++ */ ++export declare class Live { ++ private readonly apiClient; ++ private readonly auth; ++ private readonly webSocketFactory; ++ constructor(apiClient: ApiClient, auth: Auth, webSocketFactory: WebSocketFactory); ++ /** ++ Establishes a connection to the specified model with the given ++ configuration and returns a Session object representing that connection. ++ ++ @experimental ++ ++ @remarks ++ ++ @param params - The parameters for establishing a connection to the model. ++ @return A live session. ++ ++ @example ++ ```ts ++ let model: string; ++ if (GOOGLE_GENAI_USE_VERTEXAI) { ++ model = 'gemini-2.0-flash-live-preview-04-09'; ++ } else { ++ model = 'gemini-2.0-flash-live-001'; ++ } ++ const session = await ai.live.connect({ ++ model: model, ++ config: { ++ responseModalities: [Modality.AUDIO], ++ }, ++ callbacks: { ++ onopen: () => { ++ console.log('Connected to the socket.'); ++ }, ++ onmessage: (e: MessageEvent) => { ++ console.log('Received message from the server: %s\n', debug(e.data)); ++ }, ++ onerror: (e: ErrorEvent) => { ++ console.log('Error occurred: %s\n', debug(e.error)); ++ }, ++ onclose: (e: CloseEvent) => { ++ console.log('Connection closed.'); ++ }, ++ }, ++ }); ++ ``` ++ */ ++ connect(params: types.LiveConnectParameters): Promise; ++} ++/** ++ Represents a connection to the API. ++ ++ @experimental ++ */ ++export declare class Session { ++ readonly conn: WebSocket; ++ private readonly apiClient; ++ constructor(conn: WebSocket, apiClient: ApiClient); ++ private tLiveClientContent; ++ private tLiveClientRealtimeInput; ++ private tLiveClienttToolResponse; ++ /** ++ Send a message over the established connection. ++ ++ @param params - Contains two **optional** properties, `turns` and ++ `turnComplete`. ++ ++ - `turns` will be converted to a `Content[]` ++ - `turnComplete: true` [default] indicates that you are done sending ++ content and expect a response. If `turnComplete: false`, the server ++ will wait for additional messages before starting generation. ++ ++ @experimental ++ ++ @remarks ++ There are two ways to send messages to the live API: ++ `sendClientContent` and `sendRealtimeInput`. ++ ++ `sendClientContent` messages are added to the model context **in order**. ++ Having a conversation using `sendClientContent` messages is roughly ++ equivalent to using the `Chat.sendMessageStream`, except that the state of ++ the `chat` history is stored on the API server instead of locally. ++ ++ Because of `sendClientContent`'s order guarantee, the model cannot respons ++ as quickly to `sendClientContent` messages as to `sendRealtimeInput` ++ messages. This makes the biggest difference when sending objects that have ++ significant preprocessing time (typically images). ++ ++ The `sendClientContent` message sends a `Content[]` ++ which has more options than the `Blob` sent by `sendRealtimeInput`. ++ ++ So the main use-cases for `sendClientContent` over `sendRealtimeInput` are: ++ ++ - Sending anything that can't be represented as a `Blob` (text, ++ `sendClientContent({turns="Hello?"}`)). ++ - Managing turns when not using audio input and voice activity detection. ++ (`sendClientContent({turnComplete:true})` or the short form ++ `sendClientContent()`) ++ - Prefilling a conversation context ++ ``` ++ sendClientContent({ ++ turns: [ ++ Content({role:user, parts:...}), ++ Content({role:user, parts:...}), ++ ... ++ ] ++ }) ++ ``` ++ @experimental ++ */ ++ sendClientContent(params: types.LiveSendClientContentParameters): void; ++ /** ++ Send a realtime message over the established connection. ++ ++ @param params - Contains one property, `media`. ++ ++ - `media` will be converted to a `Blob` ++ ++ @experimental ++ ++ @remarks ++ Use `sendRealtimeInput` for realtime audio chunks and video frames (images). ++ ++ With `sendRealtimeInput` the api will respond to audio automatically ++ based on voice activity detection (VAD). ++ ++ `sendRealtimeInput` is optimized for responsivness at the expense of ++ deterministic ordering guarantees. Audio and video tokens are to the ++ context when they become available. ++ ++ Note: The Call signature expects a `Blob` object, but only a subset ++ of audio and image mimetypes are allowed. ++ */ ++ sendRealtimeInput(params: types.LiveSendRealtimeInputParameters): void; ++ /** ++ Send a function response message over the established connection. ++ ++ @param params - Contains property `functionResponses`. ++ ++ - `functionResponses` will be converted to a `functionResponses[]` ++ ++ @remarks ++ Use `sendFunctionResponse` to reply to `LiveServerToolCall` from the server. ++ ++ Use {@link types.LiveConnectConfig#tools} to configure the callable functions. ++ ++ @experimental ++ */ ++ sendToolResponse(params: types.LiveSendToolResponseParameters): void; ++ /** ++ Terminates the WebSocket connection. ++ ++ @experimental ++ ++ @example ++ ```ts ++ let model: string; ++ if (GOOGLE_GENAI_USE_VERTEXAI) { ++ model = 'gemini-2.0-flash-live-preview-04-09'; ++ } else { ++ model = 'gemini-2.0-flash-live-001'; ++ } ++ const session = await ai.live.connect({ ++ model: model, ++ config: { ++ responseModalities: [Modality.AUDIO], ++ } ++ }); ++ ++ session.close(); ++ ``` ++ */ ++ close(): void; ++} +diff --git a/dist/src/models.d.ts b/dist/src/models.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..b522f982b69c8e86b179802a672b61bdb99de804 +--- /dev/null ++++ b/dist/src/models.d.ts +@@ -0,0 +1,228 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from './_api_client'; ++import { BaseModule } from './_common'; ++import * as types from './types'; ++export declare class Models extends BaseModule { ++ private readonly apiClient; ++ constructor(apiClient: ApiClient); ++ /** ++ * Makes an API request to generate content with a given model. ++ * ++ * For the `model` parameter, supported formats for Vertex AI API include: ++ * - The Gemini model ID, for example: 'gemini-2.0-flash' ++ * - The full resource name starts with 'projects/', for example: ++ * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash' ++ * - The partial resource name with 'publishers/', for example: ++ * 'publishers/google/models/gemini-2.0-flash' or ++ * 'publishers/meta/models/llama-3.1-405b-instruct-maas' ++ * - `/` separated publisher and model name, for example: ++ * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas' ++ * ++ * For the `model` parameter, supported formats for Gemini API include: ++ * - The Gemini model ID, for example: 'gemini-2.0-flash' ++ * - The model name starts with 'models/', for example: ++ * 'models/gemini-2.0-flash' ++ * - For tuned models, the model name starts with 'tunedModels/', ++ * for example: ++ * 'tunedModels/1234567890123456789' ++ * ++ * Some models support multimodal input and output. ++ * ++ * @param params - The parameters for generating content. ++ * @return The response from generating content. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.generateContent({ ++ * model: 'gemini-2.0-flash', ++ * contents: 'why is the sky blue?', ++ * config: { ++ * candidateCount: 2, ++ * } ++ * }); ++ * console.log(response); ++ * ``` ++ */ ++ generateContent: (params: types.GenerateContentParameters) => Promise; ++ /** ++ * Makes an API request to generate content with a given model and yields the ++ * response in chunks. ++ * ++ * For the `model` parameter, supported formats for Vertex AI API include: ++ * - The Gemini model ID, for example: 'gemini-2.0-flash' ++ * - The full resource name starts with 'projects/', for example: ++ * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash' ++ * - The partial resource name with 'publishers/', for example: ++ * 'publishers/google/models/gemini-2.0-flash' or ++ * 'publishers/meta/models/llama-3.1-405b-instruct-maas' ++ * - `/` separated publisher and model name, for example: ++ * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas' ++ * ++ * For the `model` parameter, supported formats for Gemini API include: ++ * - The Gemini model ID, for example: 'gemini-2.0-flash' ++ * - The model name starts with 'models/', for example: ++ * 'models/gemini-2.0-flash' ++ * - For tuned models, the model name starts with 'tunedModels/', ++ * for example: ++ * 'tunedModels/1234567890123456789' ++ * ++ * Some models support multimodal input and output. ++ * ++ * @param params - The parameters for generating content with streaming response. ++ * @return The response from generating content. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.generateContentStream({ ++ * model: 'gemini-2.0-flash', ++ * contents: 'why is the sky blue?', ++ * config: { ++ * maxOutputTokens: 200, ++ * } ++ * }); ++ * for await (const chunk of response) { ++ * console.log(chunk); ++ * } ++ * ``` ++ */ ++ generateContentStream: (params: types.GenerateContentParameters) => Promise>; ++ /** ++ * Generates an image based on a text description and configuration. ++ * ++ * @param model - The model to use. ++ * @param prompt - A text description of the image to generate. ++ * @param [config] - The config for image generation. ++ * @return The response from the API. ++ * ++ * @example ++ * ```ts ++ * const response = await client.models.generateImages({ ++ * model: 'imagen-3.0-generate-002', ++ * prompt: 'Robot holding a red skateboard', ++ * config: { ++ * numberOfImages: 1, ++ * includeRaiReason: true, ++ * }, ++ * }); ++ * console.log(response?.generatedImages?.[0]?.image?.imageBytes); ++ * ``` ++ */ ++ generateImages: (params: types.GenerateImagesParameters) => Promise; ++ private generateContentInternal; ++ private generateContentStreamInternal; ++ /** ++ * Calculates embeddings for the given contents. Only text is supported. ++ * ++ * @param params - The parameters for embedding contents. ++ * @return The response from the API. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.embedContent({ ++ * model: 'text-embedding-004', ++ * contents: [ ++ * 'What is your name?', ++ * 'What is your favorite color?', ++ * ], ++ * config: { ++ * outputDimensionality: 64, ++ * }, ++ * }); ++ * console.log(response); ++ * ``` ++ */ ++ embedContent(params: types.EmbedContentParameters): Promise; ++ /** ++ * Generates an image based on a text description and configuration. ++ * ++ * @param params - The parameters for generating images. ++ * @return The response from the API. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.generateImages({ ++ * model: 'imagen-3.0-generate-002', ++ * prompt: 'Robot holding a red skateboard', ++ * config: { ++ * numberOfImages: 1, ++ * includeRaiReason: true, ++ * }, ++ * }); ++ * console.log(response?.generatedImages?.[0]?.image?.imageBytes); ++ * ``` ++ */ ++ private generateImagesInternal; ++ /** ++ * Fetches information about a model by name. ++ * ++ * @example ++ * ```ts ++ * const modelInfo = await ai.models.get({model: 'gemini-2.0-flash'}); ++ * ``` ++ */ ++ get(params: types.GetModelParameters): Promise; ++ /** ++ * Counts the number of tokens in the given contents. Multimodal input is ++ * supported for Gemini models. ++ * ++ * @param params - The parameters for counting tokens. ++ * @return The response from the API. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.countTokens({ ++ * model: 'gemini-2.0-flash', ++ * contents: 'The quick brown fox jumps over the lazy dog.' ++ * }); ++ * console.log(response); ++ * ``` ++ */ ++ countTokens(params: types.CountTokensParameters): Promise; ++ /** ++ * Given a list of contents, returns a corresponding TokensInfo containing ++ * the list of tokens and list of token ids. ++ * ++ * This method is not supported by the Gemini Developer API. ++ * ++ * @param params - The parameters for computing tokens. ++ * @return The response from the API. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.computeTokens({ ++ * model: 'gemini-2.0-flash', ++ * contents: 'What is your name?' ++ * }); ++ * console.log(response); ++ * ``` ++ */ ++ computeTokens(params: types.ComputeTokensParameters): Promise; ++ /** ++ * Generates videos based on a text description and configuration. ++ * ++ * @param params - The parameters for generating videos. ++ * @return A Promise which allows you to track the progress and eventually retrieve the generated videos using the operations.get method. ++ * ++ * @example ++ * ```ts ++ * const operation = await ai.models.generateVideos({ ++ * model: 'veo-2.0-generate-001', ++ * prompt: 'A neon hologram of a cat driving at top speed', ++ * config: { ++ * numberOfVideos: 1 ++ * }); ++ * ++ * while (!operation.done) { ++ * await new Promise(resolve => setTimeout(resolve, 10000)); ++ * operation = await ai.operations.getVideosOperation({operation: operation}); ++ * } ++ * ++ * console.log(operation.response?.generatedVideos?.[0]?.video?.uri); ++ * ``` ++ */ ++ generateVideos(params: types.GenerateVideosParameters): Promise; ++} +diff --git a/dist/src/node/_node_auth.d.ts b/dist/src/node/_node_auth.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..a7f568233f3e259b9d8bf75f6eac6e8f872cb3e3 +--- /dev/null ++++ b/dist/src/node/_node_auth.d.ts +@@ -0,0 +1,29 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { GoogleAuthOptions } from 'google-auth-library'; ++import { Auth } from '../_auth'; ++export declare const GOOGLE_API_KEY_HEADER = "x-goog-api-key"; ++export interface NodeAuthOptions { ++ /** ++ * The API Key. This is required for Gemini API users. ++ */ ++ apiKey?: string; ++ /** ++ * Optional. These are the authentication options provided by google-auth-library for Vertex AI users. ++ * Complete list of authentication options are documented in the ++ * GoogleAuthOptions interface: ++ * https://github.com/googleapis/google-auth-library-nodejs/blob/main/src/auth/googleauth.ts. ++ */ ++ googleAuthOptions?: GoogleAuthOptions; ++} ++export declare class NodeAuth implements Auth { ++ private readonly googleAuth?; ++ private readonly apiKey?; ++ constructor(opts: NodeAuthOptions); ++ addAuthHeaders(headers: Headers): Promise; ++ private addKeyHeader; ++ private addGoogleAuthHeaders; ++} +diff --git a/dist/src/node/_node_uploader.d.ts b/dist/src/node/_node_uploader.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..844e9ed4f67f561d04fe65af9a954ed5e325665f +--- /dev/null ++++ b/dist/src/node/_node_uploader.d.ts +@@ -0,0 +1,15 @@ ++import { ApiClient } from '../_api_client'; ++import { FileStat, Uploader } from '../_uploader'; ++import { File } from '../types'; ++export declare class NodeUploader implements Uploader { ++ stat(file: string | Blob): Promise; ++ upload(file: string | Blob, uploadUrl: string, apiClient: ApiClient): Promise; ++ /** ++ * Infers the MIME type of a file based on its extension. ++ * ++ * @param filePath The path to the file. ++ * @returns The MIME type of the file, or undefined if it cannot be inferred. ++ */ ++ private inferMimeType; ++ private uploadFileFromPath; ++} +diff --git a/dist/src/node/_node_websocket.d.ts b/dist/src/node/_node_websocket.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..93fcf40047ea0aea656afaf80992e90b62051b7e +--- /dev/null ++++ b/dist/src/node/_node_websocket.d.ts +@@ -0,0 +1,19 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { WebSocket, WebSocketCallbacks, WebSocketFactory } from '../_websocket'; ++export declare class NodeWebSocketFactory implements WebSocketFactory { ++ create(url: string, headers: Record, callbacks: WebSocketCallbacks): WebSocket; ++} ++export declare class NodeWebSocket implements WebSocket { ++ private readonly url; ++ private readonly headers; ++ private readonly callbacks; ++ private ws?; ++ constructor(url: string, headers: Record, callbacks: WebSocketCallbacks); ++ connect(): void; ++ send(message: string): void; ++ close(): void; ++} +diff --git a/dist/src/node/index.d.ts b/dist/src/node/index.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..07cfb97fcdf382d38a46cab34bd0bababde4b720 +--- /dev/null ++++ b/dist/src/node/index.d.ts +@@ -0,0 +1,15 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++export * from '../caches'; ++export * from '../chats'; ++export { GoogleGenAIOptions } from '../client'; ++export { Files } from '../files'; ++export * from '../live'; ++export { Models } from '../models'; ++export { Operations } from '../operations'; ++export { PagedItem, Pager } from '../pagers'; ++export * from '../types'; ++export * from './node_client'; +diff --git a/dist/src/node/node_client.d.ts b/dist/src/node/node_client.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..e4be6ea06cff9a10955bcf9e242d07b448ab21de +--- /dev/null ++++ b/dist/src/node/node_client.d.ts +@@ -0,0 +1,69 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import { Caches } from '../caches'; ++import { Chats } from '../chats'; ++import { GoogleGenAIOptions } from '../client'; ++import { Files } from '../files'; ++import { Live } from '../live'; ++import { Models } from '../models'; ++import { Operations } from '../operations'; ++/** ++ * The Google GenAI SDK. ++ * ++ * @remarks ++ * Provides access to the GenAI features through either the {@link ++ * https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API} or ++ * the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI ++ * API}. ++ * ++ * The {@link GoogleGenAIOptions.vertexai} value determines which of the API ++ * services to use. ++ * ++ * When using the Gemini API, a {@link GoogleGenAIOptions.apiKey} must also be ++ * set. When using Vertex AI, both {@link GoogleGenAIOptions.project} and {@link ++ * GoogleGenAIOptions.location} must be set, or a {@link ++ * GoogleGenAIOptions.apiKey} must be set when using Express Mode. ++ * ++ * Explicitly passed in values in {@link GoogleGenAIOptions} will always take ++ * precedence over environment variables. If both project/location and api_key ++ * exist in the environment variables, the project/location will be used. ++ * ++ * @example ++ * Initializing the SDK for using the Gemini API: ++ * ```ts ++ * import {GoogleGenAI} from '@google/genai'; ++ * const ai = new GoogleGenAI({apiKey: 'GEMINI_API_KEY'}); ++ * ``` ++ * ++ * @example ++ * Initializing the SDK for using the Vertex AI API: ++ * ```ts ++ * import {GoogleGenAI} from '@google/genai'; ++ * const ai = new GoogleGenAI({ ++ * vertexai: true, ++ * project: 'PROJECT_ID', ++ * location: 'PROJECT_LOCATION' ++ * }); ++ * ``` ++ * ++ */ ++export declare class GoogleGenAI { ++ protected readonly apiClient: ApiClient; ++ private readonly apiKey?; ++ readonly vertexai: boolean; ++ private readonly googleAuthOptions?; ++ private readonly project?; ++ private readonly location?; ++ private readonly apiVersion?; ++ readonly models: Models; ++ readonly live: Live; ++ readonly chats: Chats; ++ readonly caches: Caches; ++ readonly files: Files; ++ readonly operations: Operations; ++ constructor(options: GoogleGenAIOptions); ++} +diff --git a/dist/src/operations.d.ts b/dist/src/operations.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..c5a50188569e8819405f88440c00d138b391bc19 +--- /dev/null ++++ b/dist/src/operations.d.ts +@@ -0,0 +1,21 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from './_api_client'; ++import { BaseModule } from './_common'; ++import * as types from './types'; ++export declare class Operations extends BaseModule { ++ private readonly apiClient; ++ constructor(apiClient: ApiClient); ++ /** ++ * Gets the status of a long-running operation. ++ * ++ * @param parameters The parameters for the get operation request. ++ * @return The updated Operation object, with the latest status or result. ++ */ ++ getVideosOperation(parameters: types.OperationGetParameters): Promise; ++ private getVideosOperationInternal; ++ private fetchPredictVideosOperationInternal; ++} +diff --git a/dist/src/pagers.d.ts b/dist/src/pagers.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..8c26d3b985a4ed47fcae0c63e6b1efc55dab0b52 +--- /dev/null ++++ b/dist/src/pagers.d.ts +@@ -0,0 +1,124 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++/** ++ * Pagers for the GenAI List APIs. ++ */ ++export declare enum PagedItem { ++ PAGED_ITEM_BATCH_JOBS = "batchJobs", ++ PAGED_ITEM_MODELS = "models", ++ PAGED_ITEM_TUNING_JOBS = "tuningJobs", ++ PAGED_ITEM_FILES = "files", ++ PAGED_ITEM_CACHED_CONTENTS = "cachedContents" ++} ++interface PagedItemConfig { ++ config?: { ++ pageToken?: string; ++ pageSize?: number; ++ }; ++} ++interface PagedItemResponse { ++ nextPageToken?: string; ++ batchJobs?: T[]; ++ models?: T[]; ++ tuningJobs?: T[]; ++ files?: T[]; ++ cachedContents?: T[]; ++} ++/** ++ * Pager class for iterating through paginated results. ++ */ ++export declare class Pager implements AsyncIterable { ++ private nameInternal; ++ private pageInternal; ++ private paramsInternal; ++ private pageInternalSize; ++ protected requestInternal: (params: PagedItemConfig) => Promise>; ++ protected idxInternal: number; ++ constructor(name: PagedItem, request: (params: PagedItemConfig) => Promise>, response: PagedItemResponse, params: PagedItemConfig); ++ private init; ++ private initNextPage; ++ /** ++ * Returns the current page, which is a list of items. ++ * ++ * @remarks ++ * The first page is retrieved when the pager is created. The returned list of ++ * items could be a subset of the entire list. ++ */ ++ get page(): T[]; ++ /** ++ * Returns the type of paged item (for example, ``batch_jobs``). ++ */ ++ get name(): PagedItem; ++ /** ++ * Returns the length of the page fetched each time by this pager. ++ * ++ * @remarks ++ * The number of items in the page is less than or equal to the page length. ++ */ ++ get pageSize(): number; ++ /** ++ * Returns the parameters when making the API request for the next page. ++ * ++ * @remarks ++ * Parameters contain a set of optional configs that can be ++ * used to customize the API request. For example, the `pageToken` parameter ++ * contains the token to request the next page. ++ */ ++ get params(): PagedItemConfig; ++ /** ++ * Returns the total number of items in the current page. ++ */ ++ get pageLength(): number; ++ /** ++ * Returns the item at the given index. ++ */ ++ getItem(index: number): T; ++ /** ++ * Returns an async iterator that support iterating through all items ++ * retrieved from the API. ++ * ++ * @remarks ++ * The iterator will automatically fetch the next page if there are more items ++ * to fetch from the API. ++ * ++ * @example ++ * ++ * ```ts ++ * const pager = await ai.files.list({config: {pageSize: 10}}); ++ * for await (const file of pager) { ++ * console.log(file.name); ++ * } ++ * ``` ++ */ ++ [Symbol.asyncIterator](): AsyncIterator; ++ /** ++ * Fetches the next page of items. This makes a new API request. ++ * ++ * @throws {Error} If there are no more pages to fetch. ++ * ++ * @example ++ * ++ * ```ts ++ * const pager = await ai.files.list({config: {pageSize: 10}}); ++ * let page = pager.page; ++ * while (true) { ++ * for (const file of page) { ++ * console.log(file.name); ++ * } ++ * if (!pager.hasNextPage()) { ++ * break; ++ * } ++ * page = await pager.nextPage(); ++ * } ++ * ``` ++ */ ++ nextPage(): Promise; ++ /** ++ * Returns true if there are more pages to fetch from the API. ++ */ ++ hasNextPage(): boolean; ++} ++export {}; +diff --git a/dist/src/schema_helper.d.ts b/dist/src/schema_helper.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..b6a875ec8ca1530964075663d3a338edb2c0204d +--- /dev/null ++++ b/dist/src/schema_helper.d.ts +@@ -0,0 +1,8 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { z } from 'zod'; ++import { Schema } from './types'; ++export declare function zodToGoogleGenAISchema(isVertexAI: boolean, schema: z.ZodObject): Schema; +diff --git a/dist/src/types.d.ts b/dist/src/types.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..ef6f1c16b1fd1e43ff796dc1e3b209450ff8bd18 +--- /dev/null ++++ b/dist/src/types.d.ts +@@ -0,0 +1,2425 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++/** Required. Outcome of the code execution. */ ++export declare enum Outcome { ++ OUTCOME_UNSPECIFIED = "OUTCOME_UNSPECIFIED", ++ OUTCOME_OK = "OUTCOME_OK", ++ OUTCOME_FAILED = "OUTCOME_FAILED", ++ OUTCOME_DEADLINE_EXCEEDED = "OUTCOME_DEADLINE_EXCEEDED" ++} ++/** Required. Programming language of the `code`. */ ++export declare enum Language { ++ LANGUAGE_UNSPECIFIED = "LANGUAGE_UNSPECIFIED", ++ PYTHON = "PYTHON" ++} ++/** Optional. The type of the data. */ ++export declare enum Type { ++ TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED", ++ STRING = "STRING", ++ NUMBER = "NUMBER", ++ INTEGER = "INTEGER", ++ BOOLEAN = "BOOLEAN", ++ ARRAY = "ARRAY", ++ OBJECT = "OBJECT" ++} ++/** Required. Harm category. */ ++export declare enum HarmCategory { ++ HARM_CATEGORY_UNSPECIFIED = "HARM_CATEGORY_UNSPECIFIED", ++ HARM_CATEGORY_HATE_SPEECH = "HARM_CATEGORY_HATE_SPEECH", ++ HARM_CATEGORY_DANGEROUS_CONTENT = "HARM_CATEGORY_DANGEROUS_CONTENT", ++ HARM_CATEGORY_HARASSMENT = "HARM_CATEGORY_HARASSMENT", ++ HARM_CATEGORY_SEXUALLY_EXPLICIT = "HARM_CATEGORY_SEXUALLY_EXPLICIT", ++ HARM_CATEGORY_CIVIC_INTEGRITY = "HARM_CATEGORY_CIVIC_INTEGRITY" ++} ++/** Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. */ ++export declare enum HarmBlockMethod { ++ HARM_BLOCK_METHOD_UNSPECIFIED = "HARM_BLOCK_METHOD_UNSPECIFIED", ++ SEVERITY = "SEVERITY", ++ PROBABILITY = "PROBABILITY" ++} ++/** Required. The harm block threshold. */ ++export declare enum HarmBlockThreshold { ++ HARM_BLOCK_THRESHOLD_UNSPECIFIED = "HARM_BLOCK_THRESHOLD_UNSPECIFIED", ++ BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE", ++ BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE", ++ BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH", ++ BLOCK_NONE = "BLOCK_NONE", ++ OFF = "OFF" ++} ++/** The mode of the predictor to be used in dynamic retrieval. */ ++export declare enum Mode { ++ MODE_UNSPECIFIED = "MODE_UNSPECIFIED", ++ MODE_DYNAMIC = "MODE_DYNAMIC" ++} ++/** Output only. The reason why the model stopped generating tokens. ++ ++ If empty, the model has not stopped generating the tokens. ++ */ ++export declare enum FinishReason { ++ FINISH_REASON_UNSPECIFIED = "FINISH_REASON_UNSPECIFIED", ++ STOP = "STOP", ++ MAX_TOKENS = "MAX_TOKENS", ++ SAFETY = "SAFETY", ++ RECITATION = "RECITATION", ++ OTHER = "OTHER", ++ BLOCKLIST = "BLOCKLIST", ++ PROHIBITED_CONTENT = "PROHIBITED_CONTENT", ++ SPII = "SPII", ++ MALFORMED_FUNCTION_CALL = "MALFORMED_FUNCTION_CALL", ++ IMAGE_SAFETY = "IMAGE_SAFETY" ++} ++/** Output only. Harm probability levels in the content. */ ++export declare enum HarmProbability { ++ HARM_PROBABILITY_UNSPECIFIED = "HARM_PROBABILITY_UNSPECIFIED", ++ NEGLIGIBLE = "NEGLIGIBLE", ++ LOW = "LOW", ++ MEDIUM = "MEDIUM", ++ HIGH = "HIGH" ++} ++/** Output only. Harm severity levels in the content. */ ++export declare enum HarmSeverity { ++ HARM_SEVERITY_UNSPECIFIED = "HARM_SEVERITY_UNSPECIFIED", ++ HARM_SEVERITY_NEGLIGIBLE = "HARM_SEVERITY_NEGLIGIBLE", ++ HARM_SEVERITY_LOW = "HARM_SEVERITY_LOW", ++ HARM_SEVERITY_MEDIUM = "HARM_SEVERITY_MEDIUM", ++ HARM_SEVERITY_HIGH = "HARM_SEVERITY_HIGH" ++} ++/** Output only. Blocked reason. */ ++export declare enum BlockedReason { ++ BLOCKED_REASON_UNSPECIFIED = "BLOCKED_REASON_UNSPECIFIED", ++ SAFETY = "SAFETY", ++ OTHER = "OTHER", ++ BLOCKLIST = "BLOCKLIST", ++ PROHIBITED_CONTENT = "PROHIBITED_CONTENT" ++} ++/** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */ ++export declare enum TrafficType { ++ TRAFFIC_TYPE_UNSPECIFIED = "TRAFFIC_TYPE_UNSPECIFIED", ++ ON_DEMAND = "ON_DEMAND", ++ PROVISIONED_THROUGHPUT = "PROVISIONED_THROUGHPUT" ++} ++/** Server content modalities. */ ++export declare enum Modality { ++ MODALITY_UNSPECIFIED = "MODALITY_UNSPECIFIED", ++ TEXT = "TEXT", ++ IMAGE = "IMAGE", ++ AUDIO = "AUDIO" ++} ++/** The media resolution to use. */ ++export declare enum MediaResolution { ++ MEDIA_RESOLUTION_UNSPECIFIED = "MEDIA_RESOLUTION_UNSPECIFIED", ++ MEDIA_RESOLUTION_LOW = "MEDIA_RESOLUTION_LOW", ++ MEDIA_RESOLUTION_MEDIUM = "MEDIA_RESOLUTION_MEDIUM", ++ MEDIA_RESOLUTION_HIGH = "MEDIA_RESOLUTION_HIGH" ++} ++/** Options for feature selection preference. */ ++export declare enum FeatureSelectionPreference { ++ FEATURE_SELECTION_PREFERENCE_UNSPECIFIED = "FEATURE_SELECTION_PREFERENCE_UNSPECIFIED", ++ PRIORITIZE_QUALITY = "PRIORITIZE_QUALITY", ++ BALANCED = "BALANCED", ++ PRIORITIZE_COST = "PRIORITIZE_COST" ++} ++/** Config for the dynamic retrieval config mode. */ ++export declare enum DynamicRetrievalConfigMode { ++ MODE_UNSPECIFIED = "MODE_UNSPECIFIED", ++ MODE_DYNAMIC = "MODE_DYNAMIC" ++} ++/** Config for the function calling config mode. */ ++export declare enum FunctionCallingConfigMode { ++ MODE_UNSPECIFIED = "MODE_UNSPECIFIED", ++ AUTO = "AUTO", ++ ANY = "ANY", ++ NONE = "NONE" ++} ++/** Enum that controls the safety filter level for objectionable content. */ ++export declare enum SafetyFilterLevel { ++ BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE", ++ BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE", ++ BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH", ++ BLOCK_NONE = "BLOCK_NONE" ++} ++/** Enum that controls the generation of people. */ ++export declare enum PersonGeneration { ++ DONT_ALLOW = "DONT_ALLOW", ++ ALLOW_ADULT = "ALLOW_ADULT", ++ ALLOW_ALL = "ALLOW_ALL" ++} ++/** Enum that specifies the language of the text in the prompt. */ ++export declare enum ImagePromptLanguage { ++ auto = "auto", ++ en = "en", ++ ja = "ja", ++ ko = "ko", ++ hi = "hi" ++} ++/** State for the lifecycle of a File. */ ++export declare enum FileState { ++ STATE_UNSPECIFIED = "STATE_UNSPECIFIED", ++ PROCESSING = "PROCESSING", ++ ACTIVE = "ACTIVE", ++ FAILED = "FAILED" ++} ++/** Source of the File. */ ++export declare enum FileSource { ++ SOURCE_UNSPECIFIED = "SOURCE_UNSPECIFIED", ++ UPLOADED = "UPLOADED", ++ GENERATED = "GENERATED" ++} ++/** Enum representing the mask mode of a mask reference image. */ ++export declare enum MaskReferenceMode { ++ MASK_MODE_DEFAULT = "MASK_MODE_DEFAULT", ++ MASK_MODE_USER_PROVIDED = "MASK_MODE_USER_PROVIDED", ++ MASK_MODE_BACKGROUND = "MASK_MODE_BACKGROUND", ++ MASK_MODE_FOREGROUND = "MASK_MODE_FOREGROUND", ++ MASK_MODE_SEMANTIC = "MASK_MODE_SEMANTIC" ++} ++/** Enum representing the control type of a control reference image. */ ++export declare enum ControlReferenceType { ++ CONTROL_TYPE_DEFAULT = "CONTROL_TYPE_DEFAULT", ++ CONTROL_TYPE_CANNY = "CONTROL_TYPE_CANNY", ++ CONTROL_TYPE_SCRIBBLE = "CONTROL_TYPE_SCRIBBLE", ++ CONTROL_TYPE_FACE_MESH = "CONTROL_TYPE_FACE_MESH" ++} ++/** Enum representing the subject type of a subject reference image. */ ++export declare enum SubjectReferenceType { ++ SUBJECT_TYPE_DEFAULT = "SUBJECT_TYPE_DEFAULT", ++ SUBJECT_TYPE_PERSON = "SUBJECT_TYPE_PERSON", ++ SUBJECT_TYPE_ANIMAL = "SUBJECT_TYPE_ANIMAL", ++ SUBJECT_TYPE_PRODUCT = "SUBJECT_TYPE_PRODUCT" ++} ++/** Server content modalities. */ ++export declare enum MediaModality { ++ MODALITY_UNSPECIFIED = "MODALITY_UNSPECIFIED", ++ TEXT = "TEXT", ++ IMAGE = "IMAGE", ++ VIDEO = "VIDEO", ++ AUDIO = "AUDIO", ++ DOCUMENT = "DOCUMENT" ++} ++/** Start of speech sensitivity. */ ++export declare enum StartSensitivity { ++ START_SENSITIVITY_UNSPECIFIED = "START_SENSITIVITY_UNSPECIFIED", ++ START_SENSITIVITY_HIGH = "START_SENSITIVITY_HIGH", ++ START_SENSITIVITY_LOW = "START_SENSITIVITY_LOW" ++} ++/** End of speech sensitivity. */ ++export declare enum EndSensitivity { ++ END_SENSITIVITY_UNSPECIFIED = "END_SENSITIVITY_UNSPECIFIED", ++ END_SENSITIVITY_HIGH = "END_SENSITIVITY_HIGH", ++ END_SENSITIVITY_LOW = "END_SENSITIVITY_LOW" ++} ++/** The different ways of handling user activity. */ ++export declare enum ActivityHandling { ++ ACTIVITY_HANDLING_UNSPECIFIED = "ACTIVITY_HANDLING_UNSPECIFIED", ++ START_OF_ACTIVITY_INTERRUPTS = "START_OF_ACTIVITY_INTERRUPTS", ++ NO_INTERRUPTION = "NO_INTERRUPTION" ++} ++/** Options about which input is included in the user's turn. */ ++export declare enum TurnCoverage { ++ TURN_COVERAGE_UNSPECIFIED = "TURN_COVERAGE_UNSPECIFIED", ++ TURN_INCLUDES_ONLY_ACTIVITY = "TURN_INCLUDES_ONLY_ACTIVITY", ++ TURN_INCLUDES_ALL_INPUT = "TURN_INCLUDES_ALL_INPUT" ++} ++/** Metadata describes the input video content. */ ++export declare interface VideoMetadata { ++ /** Optional. The end offset of the video. */ ++ endOffset?: string; ++ /** Optional. The start offset of the video. */ ++ startOffset?: string; ++} ++/** Result of executing the [ExecutableCode]. Always follows a `part` containing the [ExecutableCode]. */ ++export declare interface CodeExecutionResult { ++ /** Required. Outcome of the code execution. */ ++ outcome?: Outcome; ++ /** Optional. Contains stdout when code execution is successful, stderr or other description otherwise. */ ++ output?: string; ++} ++/** Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the [FunctionDeclaration] tool and [FunctionCallingConfig] mode is set to [Mode.CODE]. */ ++export declare interface ExecutableCode { ++ /** Required. The code to be executed. */ ++ code?: string; ++ /** Required. Programming language of the `code`. */ ++ language?: Language; ++} ++/** URI based data. */ ++export declare interface FileData { ++ /** Required. URI. */ ++ fileUri?: string; ++ /** Required. The IANA standard MIME type of the source data. */ ++ mimeType?: string; ++} ++/** A function call. */ ++export declare interface FunctionCall { ++ /** The unique id of the function call. If populated, the client to execute the ++ `function_call` and return the response with the matching `id`. */ ++ id?: string; ++ /** Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. */ ++ args?: Record; ++ /** Required. The name of the function to call. Matches [FunctionDeclaration.name]. */ ++ name?: string; ++} ++/** A function response. */ ++export declare class FunctionResponse { ++ /** The id of the function call this response is for. Populated by the client ++ to match the corresponding function call `id`. */ ++ id?: string; ++ /** Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. */ ++ name?: string; ++ /** Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. */ ++ response?: Record; ++} ++/** Content blob. */ ++export declare interface Blob { ++ /** Required. Raw bytes. */ ++ data?: string; ++ /** Required. The IANA standard MIME type of the source data. */ ++ mimeType?: string; ++} ++/** A datatype containing media content. ++ ++ Exactly one field within a Part should be set, representing the specific type ++ of content being conveyed. Using multiple fields within the same `Part` ++ instance is considered invalid. ++ */ ++export declare interface Part { ++ /** Metadata for a given video. */ ++ videoMetadata?: VideoMetadata; ++ /** Indicates if the part is thought from the model. */ ++ thought?: boolean; ++ /** Optional. Result of executing the [ExecutableCode]. */ ++ codeExecutionResult?: CodeExecutionResult; ++ /** Optional. Code generated by the model that is meant to be executed. */ ++ executableCode?: ExecutableCode; ++ /** Optional. URI based data. */ ++ fileData?: FileData; ++ /** Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. */ ++ functionCall?: FunctionCall; ++ /** Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. */ ++ functionResponse?: FunctionResponse; ++ /** Optional. Inlined bytes data. */ ++ inlineData?: Blob; ++ /** Optional. Text part (can be code). */ ++ text?: string; ++} ++/** ++ * Creates a `Part` object from a `URI` string. ++ */ ++export declare function createPartFromUri(uri: string, mimeType: string): Part; ++/** ++ * Creates a `Part` object from a `text` string. ++ */ ++export declare function createPartFromText(text: string): Part; ++/** ++ * Creates a `Part` object from a `FunctionCall` object. ++ */ ++export declare function createPartFromFunctionCall(name: string, args: Record): Part; ++/** ++ * Creates a `Part` object from a `FunctionResponse` object. ++ */ ++export declare function createPartFromFunctionResponse(id: string, name: string, response: Record): Part; ++/** ++ * Creates a `Part` object from a `base64` encoded `string`. ++ */ ++export declare function createPartFromBase64(data: string, mimeType: string): Part; ++/** ++ * Creates a `Part` object from the `outcome` and `output` of a `CodeExecutionResult` object. ++ */ ++export declare function createPartFromCodeExecutionResult(outcome: Outcome, output: string): Part; ++/** ++ * Creates a `Part` object from the `code` and `language` of an `ExecutableCode` object. ++ */ ++export declare function createPartFromExecutableCode(code: string, language: Language): Part; ++/** Contains the multi-part content of a message. */ ++export declare interface Content { ++ /** List of parts that constitute a single message. Each part may have ++ a different IANA MIME type. */ ++ parts?: Part[]; ++ /** Optional. The producer of the content. Must be either 'user' or ++ 'model'. Useful to set for multi-turn conversations, otherwise can be ++ empty. If role is not specified, SDK will determine the role. */ ++ role?: string; ++} ++/** ++ * Creates a `Content` object with a user role from a `PartListUnion` object or `string`. ++ */ ++export declare function createUserContent(partOrString: PartListUnion | string): Content; ++/** ++ * Creates a `Content` object with a model role from a `PartListUnion` object or `string`. ++ */ ++export declare function createModelContent(partOrString: PartListUnion | string): Content; ++/** HTTP options to be used in each of the requests. */ ++export declare interface HttpOptions { ++ /** The base URL for the AI platform service endpoint. */ ++ baseUrl?: string; ++ /** Specifies the version of the API to use. */ ++ apiVersion?: string; ++ /** Additional HTTP headers to be sent with the request. */ ++ headers?: Record; ++ /** Timeout for the request in milliseconds. */ ++ timeout?: number; ++ /** Signal for the request. */ ++ signal?: AbortSignal; ++} ++/** Schema that defines the format of input and output data. ++ ++ Represents a select subset of an OpenAPI 3.0 schema object. ++ */ ++export declare interface Schema { ++ /** Optional. Example of the object. Will only populated when the object is the root. */ ++ example?: unknown; ++ /** Optional. Pattern of the Type.STRING to restrict a string to a regular expression. */ ++ pattern?: string; ++ /** Optional. Default value of the data. */ ++ default?: unknown; ++ /** Optional. Maximum length of the Type.STRING */ ++ maxLength?: string; ++ /** Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING */ ++ minLength?: string; ++ /** Optional. Minimum number of the properties for Type.OBJECT. */ ++ minProperties?: string; ++ /** Optional. Maximum number of the properties for Type.OBJECT. */ ++ maxProperties?: string; ++ /** Optional. The value should be validated against any (one or more) of the subschemas in the list. */ ++ anyOf?: Schema[]; ++ /** Optional. The description of the data. */ ++ description?: string; ++ /** Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} */ ++ enum?: string[]; ++ /** Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc */ ++ format?: string; ++ /** Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. */ ++ items?: Schema; ++ /** Optional. Maximum number of the elements for Type.ARRAY. */ ++ maxItems?: string; ++ /** Optional. Maximum value of the Type.INTEGER and Type.NUMBER */ ++ maximum?: number; ++ /** Optional. Minimum number of the elements for Type.ARRAY. */ ++ minItems?: string; ++ /** Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER */ ++ minimum?: number; ++ /** Optional. Indicates if the value may be null. */ ++ nullable?: boolean; ++ /** Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. */ ++ properties?: Record; ++ /** Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. */ ++ propertyOrdering?: string[]; ++ /** Optional. Required properties of Type.OBJECT. */ ++ required?: string[]; ++ /** Optional. The title of the Schema. */ ++ title?: string; ++ /** Optional. The type of the data. */ ++ type?: Type; ++} ++/** Config for model selection. */ ++export declare interface ModelSelectionConfig { ++ /** Options for feature selection preference. */ ++ featureSelectionPreference?: FeatureSelectionPreference; ++} ++/** Safety settings. */ ++export declare interface SafetySetting { ++ /** Determines if the harm block method uses probability or probability ++ and severity scores. */ ++ method?: HarmBlockMethod; ++ /** Required. Harm category. */ ++ category?: HarmCategory; ++ /** Required. The harm block threshold. */ ++ threshold?: HarmBlockThreshold; ++} ++/** Defines a function that the model can generate JSON inputs for. ++ ++ The inputs are based on `OpenAPI 3.0 specifications ++ `_. ++ */ ++export declare interface FunctionDeclaration { ++ /** Describes the output from the function in the OpenAPI JSON Schema ++ Object format. */ ++ response?: Schema; ++ /** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */ ++ description?: string; ++ /** Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. */ ++ name?: string; ++ /** Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 */ ++ parameters?: Schema; ++} ++/** Tool to support Google Search in Model. Powered by Google. */ ++export declare interface GoogleSearch { ++} ++/** Describes the options to customize dynamic retrieval. */ ++export declare interface DynamicRetrievalConfig { ++ /** The mode of the predictor to be used in dynamic retrieval. */ ++ mode?: DynamicRetrievalConfigMode; ++ /** Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used. */ ++ dynamicThreshold?: number; ++} ++/** Tool to retrieve public web data for grounding, powered by Google. */ ++export declare interface GoogleSearchRetrieval { ++ /** Specifies the dynamic retrieval configuration for the given source. */ ++ dynamicRetrievalConfig?: DynamicRetrievalConfig; ++} ++/** Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder */ ++export declare interface VertexAISearch { ++ /** Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` */ ++ datastore?: string; ++ /** Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` */ ++ engine?: string; ++} ++/** The definition of the Rag resource. */ ++export declare interface VertexRagStoreRagResource { ++ /** Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` */ ++ ragCorpus?: string; ++ /** Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field. */ ++ ragFileIds?: string[]; ++} ++/** Config for filters. */ ++export declare interface RagRetrievalConfigFilter { ++ /** Optional. String for metadata filtering. */ ++ metadataFilter?: string; ++ /** Optional. Only returns contexts with vector distance smaller than the threshold. */ ++ vectorDistanceThreshold?: number; ++ /** Optional. Only returns contexts with vector similarity larger than the threshold. */ ++ vectorSimilarityThreshold?: number; ++} ++/** Config for Hybrid Search. */ ++export declare interface RagRetrievalConfigHybridSearch { ++ /** Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally. */ ++ alpha?: number; ++} ++/** Config for LlmRanker. */ ++export declare interface RagRetrievalConfigRankingLlmRanker { ++ /** Optional. The model name used for ranking. Format: `gemini-1.5-pro` */ ++ modelName?: string; ++} ++/** Config for Rank Service. */ ++export declare interface RagRetrievalConfigRankingRankService { ++ /** Optional. The model name of the rank service. Format: `semantic-ranker-512@latest` */ ++ modelName?: string; ++} ++/** Config for ranking and reranking. */ ++export declare interface RagRetrievalConfigRanking { ++ /** Optional. Config for LlmRanker. */ ++ llmRanker?: RagRetrievalConfigRankingLlmRanker; ++ /** Optional. Config for Rank Service. */ ++ rankService?: RagRetrievalConfigRankingRankService; ++} ++/** Specifies the context retrieval config. */ ++export declare interface RagRetrievalConfig { ++ /** Optional. Config for filters. */ ++ filter?: RagRetrievalConfigFilter; ++ /** Optional. Config for Hybrid Search. */ ++ hybridSearch?: RagRetrievalConfigHybridSearch; ++ /** Optional. Config for ranking and reranking. */ ++ ranking?: RagRetrievalConfigRanking; ++ /** Optional. The number of contexts to retrieve. */ ++ topK?: number; ++} ++/** Retrieve from Vertex RAG Store for grounding. */ ++export declare interface VertexRagStore { ++ /** Optional. Deprecated. Please use rag_resources instead. */ ++ ragCorpora?: string[]; ++ /** Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. */ ++ ragResources?: VertexRagStoreRagResource[]; ++ /** Optional. The retrieval config for the Rag query. */ ++ ragRetrievalConfig?: RagRetrievalConfig; ++ /** Optional. Number of top k results to return from the selected corpora. */ ++ similarityTopK?: number; ++ /** Optional. Only return results with vector distance smaller than the threshold. */ ++ vectorDistanceThreshold?: number; ++} ++/** Defines a retrieval tool that model can call to access external knowledge. */ ++export declare interface Retrieval { ++ /** Optional. Deprecated. This option is no longer supported. */ ++ disableAttribution?: boolean; ++ /** Set to use data source powered by Vertex AI Search. */ ++ vertexAiSearch?: VertexAISearch; ++ /** Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService. */ ++ vertexRagStore?: VertexRagStore; ++} ++/** Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. */ ++export declare interface ToolCodeExecution { ++} ++/** Tool details of a tool that the model may use to generate a response. */ ++export declare interface Tool { ++ /** List of function declarations that the tool supports. */ ++ functionDeclarations?: FunctionDeclaration[]; ++ /** Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. */ ++ retrieval?: Retrieval; ++ /** Optional. Google Search tool type. Specialized retrieval tool ++ that is powered by Google Search. */ ++ googleSearch?: GoogleSearch; ++ /** Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. */ ++ googleSearchRetrieval?: GoogleSearchRetrieval; ++ /** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services. */ ++ codeExecution?: ToolCodeExecution; ++} ++/** Function calling config. */ ++export declare interface FunctionCallingConfig { ++ /** Optional. Function calling mode. */ ++ mode?: FunctionCallingConfigMode; ++ /** Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided. */ ++ allowedFunctionNames?: string[]; ++} ++/** Tool config. ++ ++ This config is shared for all tools provided in the request. ++ */ ++export declare interface ToolConfig { ++ /** Optional. Function calling config. */ ++ functionCallingConfig?: FunctionCallingConfig; ++} ++/** The configuration for the prebuilt speaker to use. */ ++export declare interface PrebuiltVoiceConfig { ++ /** The name of the prebuilt voice to use. ++ */ ++ voiceName?: string; ++} ++/** The configuration for the voice to use. */ ++export declare interface VoiceConfig { ++ /** The configuration for the speaker to use. ++ */ ++ prebuiltVoiceConfig?: PrebuiltVoiceConfig; ++} ++/** The speech generation configuration. */ ++export declare interface SpeechConfig { ++ /** The configuration for the speaker to use. ++ */ ++ voiceConfig?: VoiceConfig; ++ /** Language code (ISO 639. e.g. en-US) for the speech synthesization. ++ Only available for Live API. ++ */ ++ languageCode?: string; ++} ++/** The thinking features configuration. */ ++export declare interface ThinkingConfig { ++ /** Indicates whether to include thoughts in the response. If true, thoughts are returned only if the model supports thought and thoughts are available. ++ */ ++ includeThoughts?: boolean; ++ /** Indicates the thinking budget in tokens. ++ */ ++ thinkingBudget?: number; ++} ++/** When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. */ ++export declare interface GenerationConfigRoutingConfigAutoRoutingMode { ++ /** The model routing preference. */ ++ modelRoutingPreference?: 'UNKNOWN' | 'PRIORITIZE_QUALITY' | 'BALANCED' | 'PRIORITIZE_COST'; ++} ++/** When manual routing is set, the specified model will be used directly. */ ++export declare interface GenerationConfigRoutingConfigManualRoutingMode { ++ /** The model name to use. Only the public LLM models are accepted. e.g. 'gemini-1.5-pro-001'. */ ++ modelName?: string; ++} ++/** The configuration for routing the request to a specific model. */ ++export declare interface GenerationConfigRoutingConfig { ++ /** Automated routing. */ ++ autoMode?: GenerationConfigRoutingConfigAutoRoutingMode; ++ /** Manual routing. */ ++ manualMode?: GenerationConfigRoutingConfigManualRoutingMode; ++} ++/** Optional model configuration parameters. ++ ++ For more information, see `Content generation parameters ++ `_. ++ */ ++export declare interface GenerateContentConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** Instructions for the model to steer it toward better performance. ++ For example, "Answer as concisely as possible" or "Don't use technical ++ terms in your response". ++ */ ++ systemInstruction?: ContentUnion; ++ /** Value that controls the degree of randomness in token selection. ++ Lower temperatures are good for prompts that require a less open-ended or ++ creative response, while higher temperatures can lead to more diverse or ++ creative results. ++ */ ++ temperature?: number; ++ /** Tokens are selected from the most to least probable until the sum ++ of their probabilities equals this value. Use a lower value for less ++ random responses and a higher value for more random responses. ++ */ ++ topP?: number; ++ /** For each token selection step, the ``top_k`` tokens with the ++ highest probabilities are sampled. Then tokens are further filtered based ++ on ``top_p`` with the final token selected using temperature sampling. Use ++ a lower number for less random responses and a higher number for more ++ random responses. ++ */ ++ topK?: number; ++ /** Number of response variations to return. ++ */ ++ candidateCount?: number; ++ /** Maximum number of tokens that can be generated in the response. ++ */ ++ maxOutputTokens?: number; ++ /** List of strings that tells the model to stop generating text if one ++ of the strings is encountered in the response. ++ */ ++ stopSequences?: string[]; ++ /** Whether to return the log probabilities of the tokens that were ++ chosen by the model at each step. ++ */ ++ responseLogprobs?: boolean; ++ /** Number of top candidate tokens to return the log probabilities for ++ at each generation step. ++ */ ++ logprobs?: number; ++ /** Positive values penalize tokens that already appear in the ++ generated text, increasing the probability of generating more diverse ++ content. ++ */ ++ presencePenalty?: number; ++ /** Positive values penalize tokens that repeatedly appear in the ++ generated text, increasing the probability of generating more diverse ++ content. ++ */ ++ frequencyPenalty?: number; ++ /** When ``seed`` is fixed to a specific number, the model makes a best ++ effort to provide the same response for repeated requests. By default, a ++ random number is used. ++ */ ++ seed?: number; ++ /** Output response media type of the generated candidate text. ++ */ ++ responseMimeType?: string; ++ /** Schema that the generated candidate text must adhere to. ++ */ ++ responseSchema?: SchemaUnion; ++ /** Configuration for model router requests. ++ */ ++ routingConfig?: GenerationConfigRoutingConfig; ++ /** Configuration for model selection. ++ */ ++ modelSelectionConfig?: ModelSelectionConfig; ++ /** Safety settings in the request to block unsafe content in the ++ response. ++ */ ++ safetySettings?: SafetySetting[]; ++ /** Code that enables the system to interact with external systems to ++ perform an action outside of the knowledge and scope of the model. ++ */ ++ tools?: ToolListUnion; ++ /** Associates model output to a specific function call. ++ */ ++ toolConfig?: ToolConfig; ++ /** Labels with user-defined metadata to break down billed charges. */ ++ labels?: Record; ++ /** Resource name of a context cache that can be used in subsequent ++ requests. ++ */ ++ cachedContent?: string; ++ /** The requested modalities of the response. Represents the set of ++ modalities that the model can return. ++ */ ++ responseModalities?: string[]; ++ /** If specified, the media resolution specified will be used. ++ */ ++ mediaResolution?: MediaResolution; ++ /** The speech generation configuration. ++ */ ++ speechConfig?: SpeechConfigUnion; ++ /** If enabled, audio timestamp will be included in the request to the ++ model. ++ */ ++ audioTimestamp?: boolean; ++ /** The thinking features configuration. ++ */ ++ thinkingConfig?: ThinkingConfig; ++} ++/** Config for models.generate_content parameters. */ ++export declare interface GenerateContentParameters { ++ /** ID of the model to use. For a list of models, see `Google models ++ `_. */ ++ model: string; ++ /** Content of the request. ++ */ ++ contents: ContentListUnion; ++ /** Configuration that contains optional model parameters. ++ */ ++ config?: GenerateContentConfig; ++} ++/** Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp */ ++export declare interface GoogleTypeDate { ++ /** Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */ ++ day?: number; ++ /** Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */ ++ month?: number; ++ /** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */ ++ year?: number; ++} ++/** Source attributions for content. */ ++export declare interface Citation { ++ /** Output only. End index into the content. */ ++ endIndex?: number; ++ /** Output only. License of the attribution. */ ++ license?: string; ++ /** Output only. Publication date of the attribution. */ ++ publicationDate?: GoogleTypeDate; ++ /** Output only. Start index into the content. */ ++ startIndex?: number; ++ /** Output only. Title of the attribution. */ ++ title?: string; ++ /** Output only. Url reference of the attribution. */ ++ uri?: string; ++} ++/** Citation information when the model quotes another source. */ ++export declare interface CitationMetadata { ++ /** Contains citation information when the model directly quotes, at ++ length, from another source. Can include traditional websites and code ++ repositories. ++ */ ++ citations?: Citation[]; ++} ++/** Chunk from context retrieved by the retrieval tools. */ ++export declare interface GroundingChunkRetrievedContext { ++ /** Text of the attribution. */ ++ text?: string; ++ /** Title of the attribution. */ ++ title?: string; ++ /** URI reference of the attribution. */ ++ uri?: string; ++} ++/** Chunk from the web. */ ++export declare interface GroundingChunkWeb { ++ /** Domain of the (original) URI. */ ++ domain?: string; ++ /** Title of the chunk. */ ++ title?: string; ++ /** URI reference of the chunk. */ ++ uri?: string; ++} ++/** Grounding chunk. */ ++export declare interface GroundingChunk { ++ /** Grounding chunk from context retrieved by the retrieval tools. */ ++ retrievedContext?: GroundingChunkRetrievedContext; ++ /** Grounding chunk from the web. */ ++ web?: GroundingChunkWeb; ++} ++/** Segment of the content. */ ++export declare interface Segment { ++ /** Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero. */ ++ endIndex?: number; ++ /** Output only. The index of a Part object within its parent Content object. */ ++ partIndex?: number; ++ /** Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero. */ ++ startIndex?: number; ++ /** Output only. The text corresponding to the segment from the response. */ ++ text?: string; ++} ++/** Grounding support. */ ++export declare interface GroundingSupport { ++ /** Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the grounding_chunk_indices. */ ++ confidenceScores?: number[]; ++ /** A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim. */ ++ groundingChunkIndices?: number[]; ++ /** Segment of the content this support belongs to. */ ++ segment?: Segment; ++} ++/** Metadata related to retrieval in the grounding flow. */ ++export declare interface RetrievalMetadata { ++ /** Optional. Score indicating how likely information from Google Search could help answer the prompt. The score is in the range `[0, 1]`, where 0 is the least likely and 1 is the most likely. This score is only populated when Google Search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger Google Search. */ ++ googleSearchDynamicRetrievalScore?: number; ++} ++/** Google search entry point. */ ++export declare interface SearchEntryPoint { ++ /** Optional. Web content snippet that can be embedded in a web page or an app webview. */ ++ renderedContent?: string; ++ /** Optional. Base64 encoded JSON representing array of tuple. */ ++ sdkBlob?: string; ++} ++/** Metadata returned to client when grounding is enabled. */ ++export declare interface GroundingMetadata { ++ /** List of supporting references retrieved from specified grounding source. */ ++ groundingChunks?: GroundingChunk[]; ++ /** Optional. List of grounding support. */ ++ groundingSupports?: GroundingSupport[]; ++ /** Optional. Output only. Retrieval metadata. */ ++ retrievalMetadata?: RetrievalMetadata; ++ /** Optional. Queries executed by the retrieval tools. */ ++ retrievalQueries?: string[]; ++ /** Optional. Google search entry for the following-up web searches. */ ++ searchEntryPoint?: SearchEntryPoint; ++ /** Optional. Web search queries for the following-up web search. */ ++ webSearchQueries?: string[]; ++} ++/** Candidate for the logprobs token and score. */ ++export declare interface LogprobsResultCandidate { ++ /** The candidate's log probability. */ ++ logProbability?: number; ++ /** The candidate's token string value. */ ++ token?: string; ++ /** The candidate's token id value. */ ++ tokenId?: number; ++} ++/** Candidates with top log probabilities at each decoding step. */ ++export declare interface LogprobsResultTopCandidates { ++ /** Sorted by log probability in descending order. */ ++ candidates?: LogprobsResultCandidate[]; ++} ++/** Logprobs Result */ ++export declare interface LogprobsResult { ++ /** Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates. */ ++ chosenCandidates?: LogprobsResultCandidate[]; ++ /** Length = total number of decoding steps. */ ++ topCandidates?: LogprobsResultTopCandidates[]; ++} ++/** Safety rating corresponding to the generated content. */ ++export declare interface SafetyRating { ++ /** Output only. Indicates whether the content was filtered out because of this rating. */ ++ blocked?: boolean; ++ /** Output only. Harm category. */ ++ category?: HarmCategory; ++ /** Output only. Harm probability levels in the content. */ ++ probability?: HarmProbability; ++ /** Output only. Harm probability score. */ ++ probabilityScore?: number; ++ /** Output only. Harm severity levels in the content. */ ++ severity?: HarmSeverity; ++ /** Output only. Harm severity score. */ ++ severityScore?: number; ++} ++/** A response candidate generated from the model. */ ++export declare interface Candidate { ++ /** Contains the multi-part content of the response. ++ */ ++ content?: Content; ++ /** Source attribution of the generated content. ++ */ ++ citationMetadata?: CitationMetadata; ++ /** Describes the reason the model stopped generating tokens. ++ */ ++ finishMessage?: string; ++ /** Number of tokens for this candidate. ++ */ ++ tokenCount?: number; ++ /** The reason why the model stopped generating tokens. ++ If empty, the model has not stopped generating the tokens. ++ */ ++ finishReason?: FinishReason; ++ /** Output only. Average log probability score of the candidate. */ ++ avgLogprobs?: number; ++ /** Output only. Metadata specifies sources used to ground generated content. */ ++ groundingMetadata?: GroundingMetadata; ++ /** Output only. Index of the candidate. */ ++ index?: number; ++ /** Output only. Log-likelihood scores for the response tokens and top tokens */ ++ logprobsResult?: LogprobsResult; ++ /** Output only. List of ratings for the safety of a response candidate. There is at most one rating per category. */ ++ safetyRatings?: SafetyRating[]; ++} ++/** Content filter results for a prompt sent in the request. */ ++export declare class GenerateContentResponsePromptFeedback { ++ /** Output only. Blocked reason. */ ++ blockReason?: BlockedReason; ++ /** Output only. A readable block reason message. */ ++ blockReasonMessage?: string; ++ /** Output only. Safety ratings. */ ++ safetyRatings?: SafetyRating[]; ++} ++/** Represents token counting info for a single modality. */ ++export declare interface ModalityTokenCount { ++ /** The modality associated with this token count. */ ++ modality?: MediaModality; ++ /** Number of tokens. */ ++ tokenCount?: number; ++} ++/** Usage metadata about response(s). */ ++export declare class GenerateContentResponseUsageMetadata { ++ /** Output only. List of modalities of the cached content in the request input. */ ++ cacheTokensDetails?: ModalityTokenCount[]; ++ /** Output only. Number of tokens in the cached part in the input (the cached content). */ ++ cachedContentTokenCount?: number; ++ /** Number of tokens in the response(s). */ ++ candidatesTokenCount?: number; ++ /** Output only. List of modalities that were returned in the response. */ ++ candidatesTokensDetails?: ModalityTokenCount[]; ++ /** Number of tokens in the request. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */ ++ promptTokenCount?: number; ++ /** Output only. List of modalities that were processed in the request input. */ ++ promptTokensDetails?: ModalityTokenCount[]; ++ /** Output only. Number of tokens present in thoughts output. */ ++ thoughtsTokenCount?: number; ++ /** Output only. Number of tokens present in tool-use prompt(s). */ ++ toolUsePromptTokenCount?: number; ++ /** Output only. List of modalities that were processed for tool-use request inputs. */ ++ toolUsePromptTokensDetails?: ModalityTokenCount[]; ++ /** Total token count for prompt, response candidates, and tool-use prompts (if present). */ ++ totalTokenCount?: number; ++ /** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */ ++ trafficType?: TrafficType; ++} ++/** Response message for PredictionService.GenerateContent. */ ++export declare class GenerateContentResponse { ++ /** Response variations returned by the model. ++ */ ++ candidates?: Candidate[]; ++ /** Timestamp when the request is made to the server. ++ */ ++ createTime?: string; ++ /** Identifier for each response. ++ */ ++ responseId?: string; ++ /** Output only. The model version used to generate the response. */ ++ modelVersion?: string; ++ /** Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations. */ ++ promptFeedback?: GenerateContentResponsePromptFeedback; ++ /** Usage metadata about the response(s). */ ++ usageMetadata?: GenerateContentResponseUsageMetadata; ++ /** ++ * Returns the concatenation of all text parts from the first candidate in the response. ++ * ++ * @remarks ++ * If there are multiple candidates in the response, the text from the first ++ * one will be returned. ++ * If there are non-text parts in the response, the concatenation of all text ++ * parts will be returned, and a warning will be logged. ++ * If there are thought parts in the response, the concatenation of all text ++ * parts excluding the thought parts will be returned. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.generateContent({ ++ * model: 'gemini-2.0-flash', ++ * contents: ++ * 'Why is the sky blue?', ++ * }); ++ * ++ * console.debug(response.text); ++ * ``` ++ */ ++ get text(): string | undefined; ++ /** ++ * Returns the function calls from the first candidate in the response. ++ * ++ * @remarks ++ * If there are multiple candidates in the response, the function calls from ++ * the first one will be returned. ++ * If there are no function calls in the response, undefined will be returned. ++ * ++ * @example ++ * ```ts ++ * const controlLightFunctionDeclaration: FunctionDeclaration = { ++ * name: 'controlLight', ++ * parameters: { ++ * type: Type.OBJECT, ++ * description: 'Set the brightness and color temperature of a room light.', ++ * properties: { ++ * brightness: { ++ * type: Type.NUMBER, ++ * description: ++ * 'Light level from 0 to 100. Zero is off and 100 is full brightness.', ++ * }, ++ * colorTemperature: { ++ * type: Type.STRING, ++ * description: ++ * 'Color temperature of the light fixture which can be `daylight`, `cool` or `warm`.', ++ * }, ++ * }, ++ * required: ['brightness', 'colorTemperature'], ++ * }; ++ * const response = await ai.models.generateContent({ ++ * model: 'gemini-2.0-flash', ++ * contents: 'Dim the lights so the room feels cozy and warm.', ++ * config: { ++ * tools: [{functionDeclarations: [controlLightFunctionDeclaration]}], ++ * toolConfig: { ++ * functionCallingConfig: { ++ * mode: FunctionCallingConfigMode.ANY, ++ * allowedFunctionNames: ['controlLight'], ++ * }, ++ * }, ++ * }, ++ * }); ++ * console.debug(JSON.stringify(response.functionCalls)); ++ * ``` ++ */ ++ get functionCalls(): FunctionCall[] | undefined; ++ /** ++ * Returns the first executable code from the first candidate in the response. ++ * ++ * @remarks ++ * If there are multiple candidates in the response, the executable code from ++ * the first one will be returned. ++ * If there are no executable code in the response, undefined will be ++ * returned. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.generateContent({ ++ * model: 'gemini-2.0-flash', ++ * contents: ++ * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.' ++ * config: { ++ * tools: [{codeExecution: {}}], ++ * }, ++ * }); ++ * ++ * console.debug(response.executableCode); ++ * ``` ++ */ ++ get executableCode(): string | undefined; ++ /** ++ * Returns the first code execution result from the first candidate in the response. ++ * ++ * @remarks ++ * If there are multiple candidates in the response, the code execution result from ++ * the first one will be returned. ++ * If there are no code execution result in the response, undefined will be returned. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.generateContent({ ++ * model: 'gemini-2.0-flash', ++ * contents: ++ * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.' ++ * config: { ++ * tools: [{codeExecution: {}}], ++ * }, ++ * }); ++ * ++ * console.debug(response.codeExecutionResult); ++ * ``` ++ */ ++ get codeExecutionResult(): string | undefined; ++} ++export /** Optional parameters for the embed_content method. */ declare interface EmbedContentConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** Type of task for which the embedding will be used. ++ */ ++ taskType?: string; ++ /** Title for the text. Only applicable when TaskType is ++ `RETRIEVAL_DOCUMENT`. ++ */ ++ title?: string; ++ /** Reduced dimension for the output embedding. If set, ++ excessive values in the output embedding are truncated from the end. ++ Supported by newer models since 2024 only. You cannot set this value if ++ using the earlier model (`models/embedding-001`). ++ */ ++ outputDimensionality?: number; ++ /** Vertex API only. The MIME type of the input. ++ */ ++ mimeType?: string; ++ /** Vertex API only. Whether to silently truncate inputs longer than ++ the max sequence length. If this option is set to false, oversized inputs ++ will lead to an INVALID_ARGUMENT error, similar to other text APIs. ++ */ ++ autoTruncate?: boolean; ++} ++/** Parameters for the embed_content method. */ ++export declare interface EmbedContentParameters { ++ /** ID of the model to use. For a list of models, see `Google models ++ `_. */ ++ model: string; ++ /** The content to embed. Only the `parts.text` fields will be counted. ++ */ ++ contents: ContentListUnion; ++ /** Configuration that contains optional parameters. ++ */ ++ config?: EmbedContentConfig; ++} ++/** Statistics of the input text associated with the result of content embedding. */ ++export declare interface ContentEmbeddingStatistics { ++ /** Vertex API only. If the input text was truncated due to having ++ a length longer than the allowed maximum input. ++ */ ++ truncated?: boolean; ++ /** Vertex API only. Number of tokens of the input text. ++ */ ++ tokenCount?: number; ++} ++/** The embedding generated from an input content. */ ++export declare interface ContentEmbedding { ++ /** A list of floats representing an embedding. ++ */ ++ values?: number[]; ++ /** Vertex API only. Statistics of the input text associated with this ++ embedding. ++ */ ++ statistics?: ContentEmbeddingStatistics; ++} ++/** Request-level metadata for the Vertex Embed Content API. */ ++export declare interface EmbedContentMetadata { ++ /** Vertex API only. The total number of billable characters included ++ in the request. ++ */ ++ billableCharacterCount?: number; ++} ++/** Response for the embed_content method. */ ++export declare class EmbedContentResponse { ++ /** The embeddings for each request, in the same order as provided in ++ the batch request. ++ */ ++ embeddings?: ContentEmbedding[]; ++ /** Vertex API only. Metadata about the request. ++ */ ++ metadata?: EmbedContentMetadata; ++} ++/** The config for generating an images. */ ++export declare interface GenerateImagesConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** Cloud Storage URI used to store the generated images. ++ */ ++ outputGcsUri?: string; ++ /** Description of what to discourage in the generated images. ++ */ ++ negativePrompt?: string; ++ /** Number of images to generate. ++ */ ++ numberOfImages?: number; ++ /** Aspect ratio of the generated images. ++ */ ++ aspectRatio?: string; ++ /** Controls how much the model adheres to the text prompt. Large ++ values increase output and prompt alignment, but may compromise image ++ quality. ++ */ ++ guidanceScale?: number; ++ /** Random seed for image generation. This is not available when ++ ``add_watermark`` is set to true. ++ */ ++ seed?: number; ++ /** Filter level for safety filtering. ++ */ ++ safetyFilterLevel?: SafetyFilterLevel; ++ /** Allows generation of people by the model. ++ */ ++ personGeneration?: PersonGeneration; ++ /** Whether to report the safety scores of each generated image and ++ the positive prompt in the response. ++ */ ++ includeSafetyAttributes?: boolean; ++ /** Whether to include the Responsible AI filter reason if the image ++ is filtered out of the response. ++ */ ++ includeRaiReason?: boolean; ++ /** Language of the text in the prompt. ++ */ ++ language?: ImagePromptLanguage; ++ /** MIME type of the generated image. ++ */ ++ outputMimeType?: string; ++ /** Compression quality of the generated image (for ``image/jpeg`` ++ only). ++ */ ++ outputCompressionQuality?: number; ++ /** Whether to add a watermark to the generated images. ++ */ ++ addWatermark?: boolean; ++ /** Whether to use the prompt rewriting logic. ++ */ ++ enhancePrompt?: boolean; ++} ++/** The parameters for generating images. */ ++export declare interface GenerateImagesParameters { ++ /** ID of the model to use. For a list of models, see `Google models ++ `_. */ ++ model: string; ++ /** Text prompt that typically describes the images to output. ++ */ ++ prompt: string; ++ /** Configuration for generating images. ++ */ ++ config?: GenerateImagesConfig; ++} ++/** An image. */ ++export declare interface Image { ++ /** The Cloud Storage URI of the image. ``Image`` can contain a value ++ for this field or the ``image_bytes`` field but not both. ++ */ ++ gcsUri?: string; ++ /** The image bytes data. ``Image`` can contain a value for this field ++ or the ``gcs_uri`` field but not both. ++ */ ++ imageBytes?: string; ++ /** The MIME type of the image. */ ++ mimeType?: string; ++} ++/** Safety attributes of a GeneratedImage or the user-provided prompt. */ ++export declare interface SafetyAttributes { ++ /** List of RAI categories. ++ */ ++ categories?: string[]; ++ /** List of scores of each categories. ++ */ ++ scores?: number[]; ++ /** Internal use only. ++ */ ++ contentType?: string; ++} ++/** An output image. */ ++export declare interface GeneratedImage { ++ /** The output image data. ++ */ ++ image?: Image; ++ /** Responsible AI filter reason if the image is filtered out of the ++ response. ++ */ ++ raiFilteredReason?: string; ++ /** Safety attributes of the image. Lists of RAI categories and their ++ scores of each content. ++ */ ++ safetyAttributes?: SafetyAttributes; ++ /** The rewritten prompt used for the image generation if the prompt ++ enhancer is enabled. ++ */ ++ enhancedPrompt?: string; ++} ++/** The output images response. */ ++export declare class GenerateImagesResponse { ++ /** List of generated images. ++ */ ++ generatedImages?: GeneratedImage[]; ++ /** Safety attributes of the positive prompt. Only populated if ++ ``include_safety_attributes`` is set to True. ++ */ ++ positivePromptSafetyAttributes?: SafetyAttributes; ++} ++/** Optional parameters for models.get method. */ ++export declare interface GetModelConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++export declare interface GetModelParameters { ++ model: string; ++ /** Optional parameters for the request. */ ++ config?: GetModelConfig; ++} ++/** An endpoint where you deploy models. */ ++export declare interface Endpoint { ++ /** Resource name of the endpoint. */ ++ name?: string; ++ /** ID of the model that's deployed to the endpoint. */ ++ deployedModelId?: string; ++} ++/** A tuned machine learning model. */ ++export declare interface TunedModelInfo { ++ /** ID of the base model that you want to tune. */ ++ baseModel?: string; ++ /** Date and time when the base model was created. */ ++ createTime?: string; ++ /** Date and time when the base model was last updated. */ ++ updateTime?: string; ++} ++/** A trained machine learning model. */ ++export declare interface Model { ++ /** Resource name of the model. */ ++ name?: string; ++ /** Display name of the model. */ ++ displayName?: string; ++ /** Description of the model. */ ++ description?: string; ++ /** Version ID of the model. A new version is committed when a new ++ model version is uploaded or trained under an existing model ID. The ++ version ID is an auto-incrementing decimal number in string ++ representation. */ ++ version?: string; ++ /** List of deployed models created from this base model. Note that a ++ model could have been deployed to endpoints in different locations. */ ++ endpoints?: Endpoint[]; ++ /** Labels with user-defined metadata to organize your models. */ ++ labels?: Record; ++ /** Information about the tuned model from the base model. */ ++ tunedModelInfo?: TunedModelInfo; ++ /** The maximum number of input tokens that the model can handle. */ ++ inputTokenLimit?: number; ++ /** The maximum number of output tokens that the model can generate. */ ++ outputTokenLimit?: number; ++ /** List of actions that are supported by the model. */ ++ supportedActions?: string[]; ++} ++/** Generation config. */ ++export declare interface GenerationConfig { ++ /** Optional. If enabled, audio timestamp will be included in the request to the model. */ ++ audioTimestamp?: boolean; ++ /** Optional. Number of candidates to generate. */ ++ candidateCount?: number; ++ /** Optional. Frequency penalties. */ ++ frequencyPenalty?: number; ++ /** Optional. Logit probabilities. */ ++ logprobs?: number; ++ /** Optional. The maximum number of output tokens to generate per message. */ ++ maxOutputTokens?: number; ++ /** Optional. If specified, the media resolution specified will be used. */ ++ mediaResolution?: MediaResolution; ++ /** Optional. Positive penalties. */ ++ presencePenalty?: number; ++ /** Optional. If true, export the logprobs results in response. */ ++ responseLogprobs?: boolean; ++ /** Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature. */ ++ responseMimeType?: string; ++ /** Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response. */ ++ responseSchema?: Schema; ++ /** Optional. Routing configuration. */ ++ routingConfig?: GenerationConfigRoutingConfig; ++ /** Optional. Seed. */ ++ seed?: number; ++ /** Optional. Stop sequences. */ ++ stopSequences?: string[]; ++ /** Optional. Controls the randomness of predictions. */ ++ temperature?: number; ++ /** Optional. If specified, top-k sampling will be used. */ ++ topK?: number; ++ /** Optional. If specified, nucleus sampling will be used. */ ++ topP?: number; ++} ++/** Config for the count_tokens method. */ ++export declare interface CountTokensConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** Instructions for the model to steer it toward better performance. ++ */ ++ systemInstruction?: ContentUnion; ++ /** Code that enables the system to interact with external systems to ++ perform an action outside of the knowledge and scope of the model. ++ */ ++ tools?: Tool[]; ++ /** Configuration that the model uses to generate the response. Not ++ supported by the Gemini Developer API. ++ */ ++ generationConfig?: GenerationConfig; ++} ++/** Parameters for counting tokens. */ ++export declare interface CountTokensParameters { ++ /** ID of the model to use. For a list of models, see `Google models ++ `_. */ ++ model: string; ++ /** Input content. */ ++ contents: ContentListUnion; ++ /** Configuration for counting tokens. */ ++ config?: CountTokensConfig; ++} ++/** Response for counting tokens. */ ++export declare class CountTokensResponse { ++ /** Total number of tokens. */ ++ totalTokens?: number; ++ /** Number of tokens in the cached part of the prompt (the cached content). */ ++ cachedContentTokenCount?: number; ++} ++/** Optional parameters for computing tokens. */ ++export declare interface ComputeTokensConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Parameters for computing tokens. */ ++export declare interface ComputeTokensParameters { ++ /** ID of the model to use. For a list of models, see `Google models ++ `_. */ ++ model: string; ++ /** Input content. */ ++ contents: ContentListUnion; ++ /** Optional parameters for the request. ++ */ ++ config?: ComputeTokensConfig; ++} ++/** Tokens info with a list of tokens and the corresponding list of token ids. */ ++export declare interface TokensInfo { ++ /** Optional. Optional fields for the role from the corresponding Content. */ ++ role?: string; ++ /** A list of token ids from the input. */ ++ tokenIds?: string[]; ++ /** A list of tokens from the input. */ ++ tokens?: string[]; ++} ++/** Response for computing tokens. */ ++export declare class ComputeTokensResponse { ++ /** Lists of tokens info from the input. A ComputeTokensRequest could have multiple instances with a prompt in each instance. We also need to return lists of tokens info for the request with multiple instances. */ ++ tokensInfo?: TokensInfo[]; ++} ++/** Configuration for generating videos. */ ++export declare interface GenerateVideosConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** Number of output videos. */ ++ numberOfVideos?: number; ++ /** The gcs bucket where to save the generated videos. */ ++ outputGcsUri?: string; ++ /** Frames per second for video generation. */ ++ fps?: number; ++ /** Duration of the clip for video generation in seconds. */ ++ durationSeconds?: number; ++ /** The RNG seed. If RNG seed is exactly same for each request with unchanged inputs, the prediction results will be consistent. Otherwise, a random RNG seed will be used each time to produce a different result. */ ++ seed?: number; ++ /** The aspect ratio for the generated video. 16:9 (landscape) and 9:16 (portrait) are supported. */ ++ aspectRatio?: string; ++ /** The resolution for the generated video. 1280x720, 1920x1080 are supported. */ ++ resolution?: string; ++ /** Whether allow to generate person videos, and restrict to specific ages. Supported values are: dont_allow, allow_adult. */ ++ personGeneration?: string; ++ /** The pubsub topic where to publish the video generation progress. */ ++ pubsubTopic?: string; ++ /** Optional field in addition to the text content. Negative prompts can be explicitly stated here to help generate the video. */ ++ negativePrompt?: string; ++ /** Whether to use the prompt rewriting logic. */ ++ enhancePrompt?: boolean; ++} ++/** Class that represents the parameters for generating an image. */ ++export declare interface GenerateVideosParameters { ++ /** ID of the model to use. For a list of models, see `Google models ++ `_. */ ++ model: string; ++ /** The text prompt for generating the videos. Optional for image to video use cases. */ ++ prompt?: string; ++ /** The input image for generating the videos. ++ Optional if prompt is provided. */ ++ image?: Image; ++ /** Configuration for generating videos. */ ++ config?: GenerateVideosConfig; ++} ++/** A generated video. */ ++export declare interface Video { ++ /** Path to another storage. */ ++ uri?: string; ++ /** Video bytes. */ ++ videoBytes?: string; ++ /** Video encoding, for example "video/mp4". */ ++ mimeType?: string; ++} ++/** A generated video. */ ++export declare interface GeneratedVideo { ++ /** The output video */ ++ video?: Video; ++} ++/** Response with generated videos. */ ++export declare class GenerateVideosResponse { ++ /** List of the generated videos */ ++ generatedVideos?: GeneratedVideo[]; ++ /** Returns if any videos were filtered due to RAI policies. */ ++ raiMediaFilteredCount?: number; ++ /** Returns rai failure reasons if any. */ ++ raiMediaFilteredReasons?: string[]; ++} ++/** A video generation operation. */ ++export declare interface GenerateVideosOperation { ++ /** The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. */ ++ name?: string; ++ /** Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. */ ++ metadata?: Record; ++ /** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */ ++ done?: boolean; ++ /** The error result of the operation in case of failure or cancellation. */ ++ error?: Record; ++ /** The generated videos. */ ++ response?: GenerateVideosResponse; ++} ++/** Optional configuration for cached content creation. */ ++export declare interface CreateCachedContentConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: "3.5s". */ ++ ttl?: string; ++ /** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */ ++ expireTime?: string; ++ /** The user-generated meaningful display name of the cached content. ++ */ ++ displayName?: string; ++ /** The content to cache. ++ */ ++ contents?: ContentListUnion; ++ /** Developer set system instruction. ++ */ ++ systemInstruction?: ContentUnion; ++ /** A list of `Tools` the model may use to generate the next response. ++ */ ++ tools?: Tool[]; ++ /** Configuration for the tools to use. This config is shared for all tools. ++ */ ++ toolConfig?: ToolConfig; ++} ++/** Parameters for caches.create method. */ ++export declare interface CreateCachedContentParameters { ++ /** ID of the model to use. Example: gemini-1.5-flash */ ++ model: string; ++ /** Configuration that contains optional parameters. ++ */ ++ config?: CreateCachedContentConfig; ++} ++/** Metadata on the usage of the cached content. */ ++export declare interface CachedContentUsageMetadata { ++ /** Duration of audio in seconds. */ ++ audioDurationSeconds?: number; ++ /** Number of images. */ ++ imageCount?: number; ++ /** Number of text characters. */ ++ textCount?: number; ++ /** Total number of tokens that the cached content consumes. */ ++ totalTokenCount?: number; ++ /** Duration of video in seconds. */ ++ videoDurationSeconds?: number; ++} ++/** A resource used in LLM queries for users to explicitly specify what to cache. */ ++export declare interface CachedContent { ++ /** The server-generated resource name of the cached content. */ ++ name?: string; ++ /** The user-generated meaningful display name of the cached content. */ ++ displayName?: string; ++ /** The name of the publisher model to use for cached content. */ ++ model?: string; ++ /** Creation time of the cache entry. */ ++ createTime?: string; ++ /** When the cache entry was last updated in UTC time. */ ++ updateTime?: string; ++ /** Expiration time of the cached content. */ ++ expireTime?: string; ++ /** Metadata on the usage of the cached content. */ ++ usageMetadata?: CachedContentUsageMetadata; ++} ++/** Optional parameters for caches.get method. */ ++export declare interface GetCachedContentConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Parameters for caches.get method. */ ++export declare interface GetCachedContentParameters { ++ /** The server-generated resource name of the cached content. ++ */ ++ name: string; ++ /** Optional parameters for the request. ++ */ ++ config?: GetCachedContentConfig; ++} ++/** Optional parameters for caches.delete method. */ ++export declare interface DeleteCachedContentConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Parameters for caches.delete method. */ ++export declare interface DeleteCachedContentParameters { ++ /** The server-generated resource name of the cached content. ++ */ ++ name: string; ++ /** Optional parameters for the request. ++ */ ++ config?: DeleteCachedContentConfig; ++} ++/** Empty response for caches.delete method. */ ++export declare class DeleteCachedContentResponse { ++} ++/** Optional parameters for caches.update method. */ ++export declare interface UpdateCachedContentConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: "3.5s". */ ++ ttl?: string; ++ /** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */ ++ expireTime?: string; ++} ++export declare interface UpdateCachedContentParameters { ++ /** The server-generated resource name of the cached content. ++ */ ++ name: string; ++ /** Configuration that contains optional parameters. ++ */ ++ config?: UpdateCachedContentConfig; ++} ++/** Config for caches.list method. */ ++export declare interface ListCachedContentsConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ pageSize?: number; ++ pageToken?: string; ++} ++/** Parameters for caches.list method. */ ++export declare interface ListCachedContentsParameters { ++ /** Configuration that contains optional parameters. ++ */ ++ config?: ListCachedContentsConfig; ++} ++export declare class ListCachedContentsResponse { ++ nextPageToken?: string; ++ /** List of cached contents. ++ */ ++ cachedContents?: CachedContent[]; ++} ++/** Used to override the default configuration. */ ++export declare interface ListFilesConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ pageSize?: number; ++ pageToken?: string; ++} ++/** Generates the parameters for the list method. */ ++export declare interface ListFilesParameters { ++ /** Used to override the default configuration. */ ++ config?: ListFilesConfig; ++} ++/** Status of a File that uses a common error model. */ ++export declare interface FileStatus { ++ /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */ ++ details?: Record[]; ++ /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */ ++ message?: string; ++ /** The status code. 0 for OK, 1 for CANCELLED */ ++ code?: number; ++} ++/** A file uploaded to the API. */ ++export declare interface File { ++ /** The `File` resource name. The ID (name excluding the "files/" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be generated. Example: `files/123-456` */ ++ name?: string; ++ /** Optional. The human-readable display name for the `File`. The display name must be no more than 512 characters in length, including spaces. Example: 'Welcome Image' */ ++ displayName?: string; ++ /** Output only. MIME type of the file. */ ++ mimeType?: string; ++ /** Output only. Size of the file in bytes. */ ++ sizeBytes?: string; ++ /** Output only. The timestamp of when the `File` was created. */ ++ createTime?: string; ++ /** Output only. The timestamp of when the `File` will be deleted. Only set if the `File` is scheduled to expire. */ ++ expirationTime?: string; ++ /** Output only. The timestamp of when the `File` was last updated. */ ++ updateTime?: string; ++ /** Output only. SHA-256 hash of the uploaded bytes. The hash value is encoded in base64 format. */ ++ sha256Hash?: string; ++ /** Output only. The URI of the `File`. */ ++ uri?: string; ++ /** Output only. The URI of the `File`, only set for downloadable (generated) files. */ ++ downloadUri?: string; ++ /** Output only. Processing state of the File. */ ++ state?: FileState; ++ /** Output only. The source of the `File`. */ ++ source?: FileSource; ++ /** Output only. Metadata for a video. */ ++ videoMetadata?: Record; ++ /** Output only. Error status if File processing failed. */ ++ error?: FileStatus; ++} ++/** Response for the list files method. */ ++export declare class ListFilesResponse { ++ /** A token to retrieve next page of results. */ ++ nextPageToken?: string; ++ /** The list of files. */ ++ files?: File[]; ++} ++/** Used to override the default configuration. */ ++export declare interface CreateFileConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Generates the parameters for the private _create method. */ ++export declare interface CreateFileParameters { ++ /** The file to be uploaded. ++ mime_type: (Required) The MIME type of the file. Must be provided. ++ name: (Optional) The name of the file in the destination (e.g. ++ 'files/sample-image'). ++ display_name: (Optional) The display name of the file. ++ */ ++ file: File; ++ /** Used to override the default configuration. */ ++ config?: CreateFileConfig; ++} ++/** A wrapper class for the http response. */ ++export declare class HttpResponse { ++ /** Used to retain the processed HTTP headers in the response. */ ++ headers?: Record; ++ /** ++ * The original http response. ++ */ ++ responseInternal: Response; ++ constructor(response: Response); ++ json(): Promise; ++} ++/** Callbacks for the live API. */ ++export interface LiveCallbacks { ++ /** ++ * Called when the websocket connection is established. ++ */ ++ onopen?: (() => void) | null; ++ /** ++ * Called when a message is received from the server. ++ */ ++ onmessage: (e: LiveServerMessage) => void; ++ /** ++ * Called when an error occurs. ++ */ ++ onerror?: ((e: ErrorEvent) => void) | null; ++ /** ++ * Called when the websocket connection is closed. ++ */ ++ onclose?: ((e: CloseEvent) => void) | null; ++} ++/** Parameters for the upload file method. */ ++export interface UploadFileParameters { ++ /** The string path to the file to be uploaded or a Blob object. */ ++ file: string | globalThis.Blob; ++ /** Configuration that contains optional parameters. */ ++ config?: UploadFileConfig; ++} ++/** Response for the create file method. */ ++export declare class CreateFileResponse { ++ /** Used to retain the full HTTP response. */ ++ sdkHttpResponse?: HttpResponse; ++} ++/** Used to override the default configuration. */ ++export declare interface GetFileConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Generates the parameters for the get method. */ ++export declare interface GetFileParameters { ++ /** The name identifier for the file to retrieve. */ ++ name: string; ++ /** Used to override the default configuration. */ ++ config?: GetFileConfig; ++} ++/** Used to override the default configuration. */ ++export declare interface DeleteFileConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Generates the parameters for the get method. */ ++export declare interface DeleteFileParameters { ++ /** The name identifier for the file to be deleted. */ ++ name: string; ++ /** Used to override the default configuration. */ ++ config?: DeleteFileConfig; ++} ++/** Response for the delete file method. */ ++export declare class DeleteFileResponse { ++} ++export declare interface GetOperationConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Parameters for the GET method. */ ++export declare interface GetOperationParameters { ++ /** The server-assigned name for the operation. */ ++ operationName: string; ++ /** Used to override the default configuration. */ ++ config?: GetOperationConfig; ++} ++export declare interface FetchPredictOperationConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Parameters for the fetchPredictOperation method. */ ++export declare interface FetchPredictOperationParameters { ++ /** The server-assigned name for the operation. */ ++ operationName: string; ++ resourceName: string; ++ /** Used to override the default configuration. */ ++ config?: FetchPredictOperationConfig; ++} ++export declare interface TestTableItem { ++ /** The name of the test. This is used to derive the replay id. */ ++ name?: string; ++ /** The parameters to the test. Use pydantic models. */ ++ parameters?: Record; ++ /** Expects an exception for MLDev matching the string. */ ++ exceptionIfMldev?: string; ++ /** Expects an exception for Vertex matching the string. */ ++ exceptionIfVertex?: string; ++ /** Use if you don't want to use the default replay id which is derived from the test name. */ ++ overrideReplayId?: string; ++ /** True if the parameters contain an unsupported union type. This test will be skipped for languages that do not support the union type. */ ++ hasUnion?: boolean; ++ /** When set to a reason string, this test will be skipped in the API mode. Use this flag for tests that can not be reproduced with the real API. E.g. a test that deletes a resource. */ ++ skipInApiMode?: string; ++ /** Keys to ignore when comparing the request and response. This is useful for tests that are not deterministic. */ ++ ignoreKeys?: string[]; ++} ++export declare interface TestTableFile { ++ comment?: string; ++ testMethod?: string; ++ parameterNames?: string[]; ++ testTable?: TestTableItem[]; ++} ++/** Represents a single request in a replay. */ ++export declare interface ReplayRequest { ++ method?: string; ++ url?: string; ++ headers?: Record; ++ bodySegments?: Record[]; ++} ++/** Represents a single response in a replay. */ ++export declare class ReplayResponse { ++ statusCode?: number; ++ headers?: Record; ++ bodySegments?: Record[]; ++ sdkResponseSegments?: Record[]; ++} ++/** Represents a single interaction, request and response in a replay. */ ++export declare interface ReplayInteraction { ++ request?: ReplayRequest; ++ response?: ReplayResponse; ++} ++/** Represents a recorded session. */ ++export declare interface ReplayFile { ++ replayId?: string; ++ interactions?: ReplayInteraction[]; ++} ++/** Used to override the default configuration. */ ++export declare interface UploadFileConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** The name of the file in the destination (e.g., 'files/sample-image'. If not provided one will be generated. */ ++ name?: string; ++ /** mime_type: The MIME type of the file. If not provided, it will be inferred from the file extension. */ ++ mimeType?: string; ++ /** Optional display name of the file. */ ++ displayName?: string; ++} ++/** Used to override the default configuration. */ ++export declare interface DownloadFileConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Configuration for upscaling an image. ++ ++ For more information on this configuration, refer to ++ the `Imagen API reference documentation ++ `_. ++ */ ++export declare interface UpscaleImageConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** Whether to include a reason for filtered-out images in the ++ response. */ ++ includeRaiReason?: boolean; ++ /** The image format that the output should be saved as. */ ++ outputMimeType?: string; ++ /** The level of compression if the ``output_mime_type`` is ++ ``image/jpeg``. */ ++ outputCompressionQuality?: number; ++} ++/** User-facing config UpscaleImageParameters. */ ++export declare interface UpscaleImageParameters { ++ /** The model to use. */ ++ model: string; ++ /** The input image to upscale. */ ++ image: Image; ++ /** The factor to upscale the image (x2 or x4). */ ++ upscaleFactor: string; ++ /** Configuration for upscaling. */ ++ config?: UpscaleImageConfig; ++} ++/** A raw reference image. ++ ++ A raw reference image represents the base image to edit, provided by the user. ++ It can optionally be provided in addition to a mask reference image or ++ a style reference image. ++ */ ++export declare interface RawReferenceImage { ++ /** The reference image for the editing operation. */ ++ referenceImage?: Image; ++ /** The id of the reference image. */ ++ referenceId?: number; ++ /** The type of the reference image. Only set by the SDK. */ ++ referenceType?: string; ++} ++/** Configuration for a Mask reference image. */ ++export declare interface MaskReferenceConfig { ++ /** Prompts the model to generate a mask instead of you needing to ++ provide one (unless MASK_MODE_USER_PROVIDED is used). */ ++ maskMode?: MaskReferenceMode; ++ /** A list of up to 5 class ids to use for semantic segmentation. ++ Automatically creates an image mask based on specific objects. */ ++ segmentationClasses?: number[]; ++ /** Dilation percentage of the mask provided. ++ Float between 0 and 1. */ ++ maskDilation?: number; ++} ++/** A mask reference image. ++ ++ This encapsulates either a mask image provided by the user and configs for ++ the user provided mask, or only config parameters for the model to generate ++ a mask. ++ ++ A mask image is an image whose non-zero values indicate where to edit the base ++ image. If the user provides a mask image, the mask must be in the same ++ dimensions as the raw image. ++ */ ++export declare interface MaskReferenceImage { ++ /** The reference image for the editing operation. */ ++ referenceImage?: Image; ++ /** The id of the reference image. */ ++ referenceId?: number; ++ /** The type of the reference image. Only set by the SDK. */ ++ referenceType?: string; ++ /** Configuration for the mask reference image. */ ++ config?: MaskReferenceConfig; ++} ++/** Configuration for a Control reference image. */ ++export declare interface ControlReferenceConfig { ++ /** The type of control reference image to use. */ ++ controlType?: ControlReferenceType; ++ /** Defaults to False. When set to True, the control image will be ++ computed by the model based on the control type. When set to False, ++ the control image must be provided by the user. */ ++ enableControlImageComputation?: boolean; ++} ++/** A control reference image. ++ ++ The image of the control reference image is either a control image provided ++ by the user, or a regular image which the backend will use to generate a ++ control image of. In the case of the latter, the ++ enable_control_image_computation field in the config should be set to True. ++ ++ A control image is an image that represents a sketch image of areas for the ++ model to fill in based on the prompt. ++ */ ++export declare interface ControlReferenceImage { ++ /** The reference image for the editing operation. */ ++ referenceImage?: Image; ++ /** The id of the reference image. */ ++ referenceId?: number; ++ /** The type of the reference image. Only set by the SDK. */ ++ referenceType?: string; ++ /** Configuration for the control reference image. */ ++ config?: ControlReferenceConfig; ++} ++/** Configuration for a Style reference image. */ ++export declare interface StyleReferenceConfig { ++ /** A text description of the style to use for the generated image. */ ++ styleDescription?: string; ++} ++/** A style reference image. ++ ++ This encapsulates a style reference image provided by the user, and ++ additionally optional config parameters for the style reference image. ++ ++ A raw reference image can also be provided as a destination for the style to ++ be applied to. ++ */ ++export declare interface StyleReferenceImage { ++ /** The reference image for the editing operation. */ ++ referenceImage?: Image; ++ /** The id of the reference image. */ ++ referenceId?: number; ++ /** The type of the reference image. Only set by the SDK. */ ++ referenceType?: string; ++ /** Configuration for the style reference image. */ ++ config?: StyleReferenceConfig; ++} ++/** Configuration for a Subject reference image. */ ++export declare interface SubjectReferenceConfig { ++ /** The subject type of a subject reference image. */ ++ subjectType?: SubjectReferenceType; ++ /** Subject description for the image. */ ++ subjectDescription?: string; ++} ++/** A subject reference image. ++ ++ This encapsulates a subject reference image provided by the user, and ++ additionally optional config parameters for the subject reference image. ++ ++ A raw reference image can also be provided as a destination for the subject to ++ be applied to. ++ */ ++export declare interface SubjectReferenceImage { ++ /** The reference image for the editing operation. */ ++ referenceImage?: Image; ++ /** The id of the reference image. */ ++ referenceId?: number; ++ /** The type of the reference image. Only set by the SDK. */ ++ referenceType?: string; ++ /** Configuration for the subject reference image. */ ++ config?: SubjectReferenceConfig; ++} ++/** Sent in response to a `LiveGenerateContentSetup` message from the client. */ ++export declare interface LiveServerSetupComplete { ++} ++/** Incremental server update generated by the model in response to client messages. ++ ++ Content is generated as quickly as possible, and not in real time. Clients ++ may choose to buffer and play it out in real time. ++ */ ++export declare interface LiveServerContent { ++ /** The content that the model has generated as part of the current conversation with the user. */ ++ modelTurn?: Content; ++ /** If true, indicates that the model is done generating. Generation will only start in response to additional client messages. Can be set alongside `content`, indicating that the `content` is the last in the turn. */ ++ turnComplete?: boolean; ++ /** If true, indicates that a client message has interrupted current model generation. If the client is playing out the content in realtime, this is a good signal to stop and empty the current queue. */ ++ interrupted?: boolean; ++ /** If true, indicates that the model is done generating. When model is ++ interrupted while generating there will be no generation_complete message ++ in interrupted turn, it will go through interrupted > turn_complete. ++ When model assumes realtime playback there will be delay between ++ generation_complete and turn_complete that is caused by model ++ waiting for playback to finish. If true, indicates that the model ++ has finished generating all content. This is a signal to the client ++ that it can stop sending messages. */ ++ generationComplete?: boolean; ++} ++/** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */ ++export declare interface LiveServerToolCall { ++ /** The function call to be executed. */ ++ functionCalls?: FunctionCall[]; ++} ++/** Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled. ++ ++ If there were side-effects to those tool calls, clients may attempt to undo ++ the tool calls. This message occurs only in cases where the clients interrupt ++ server turns. ++ */ ++export declare interface LiveServerToolCallCancellation { ++ /** The ids of the tool calls to be cancelled. */ ++ ids?: string[]; ++} ++/** Usage metadata about response(s). */ ++export declare interface UsageMetadata { ++ /** Number of tokens in the prompt. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */ ++ promptTokenCount?: number; ++ /** Number of tokens in the cached part of the prompt (the cached content). */ ++ cachedContentTokenCount?: number; ++ /** Total number of tokens across all the generated response candidates. */ ++ responseTokenCount?: number; ++ /** Number of tokens present in tool-use prompt(s). */ ++ toolUsePromptTokenCount?: number; ++ /** Number of tokens of thoughts for thinking models. */ ++ thoughtsTokenCount?: number; ++ /** Total token count for prompt, response candidates, and tool-use prompts(if present). */ ++ totalTokenCount?: number; ++ /** List of modalities that were processed in the request input. */ ++ promptTokensDetails?: ModalityTokenCount[]; ++ /** List of modalities that were processed in the cache input. */ ++ cacheTokensDetails?: ModalityTokenCount[]; ++ /** List of modalities that were returned in the response. */ ++ responseTokensDetails?: ModalityTokenCount[]; ++ /** List of modalities that were processed in the tool-use prompt. */ ++ toolUsePromptTokensDetails?: ModalityTokenCount[]; ++ /** Traffic type. This shows whether a request consumes Pay-As-You-Go ++ or Provisioned Throughput quota. */ ++ trafficType?: TrafficType; ++} ++/** Server will not be able to service client soon. */ ++export declare interface LiveServerGoAway { ++ /** The remaining time before the connection will be terminated as ABORTED. The minimal time returned here is specified differently together with the rate limits for a given model. */ ++ timeLeft?: string; ++} ++/** Update of the session resumption state. ++ ++ Only sent if `session_resumption` was set in the connection config. ++ */ ++export declare interface LiveServerSessionResumptionUpdate { ++ /** New handle that represents state that can be resumed. Empty if `resumable`=false. */ ++ newHandle?: string; ++ /** True if session can be resumed at this point. It might be not possible to resume session at some points. In that case we send update empty new_handle and resumable=false. Example of such case could be model executing function calls or just generating. Resuming session (using previous session token) in such state will result in some data loss. */ ++ resumable?: boolean; ++ /** Index of last message sent by client that is included in state represented by this SessionResumptionToken. Only sent when `SessionResumptionConfig.transparent` is set. ++ ++ Presence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `SessionResmumptionTokenUpdate`. This field will enable them to limit buffering (avoid keeping all requests in RAM). ++ ++ Note: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames arelikely not needed. */ ++ lastConsumedClientMessageIndex?: string; ++} ++/** Response message for API call. */ ++export declare interface LiveServerMessage { ++ /** Sent in response to a `LiveClientSetup` message from the client. */ ++ setupComplete?: LiveServerSetupComplete; ++ /** Content generated by the model in response to client messages. */ ++ serverContent?: LiveServerContent; ++ /** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */ ++ toolCall?: LiveServerToolCall; ++ /** Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled. */ ++ toolCallCancellation?: LiveServerToolCallCancellation; ++ /** Usage metadata about model response(s). */ ++ usageMetadata?: UsageMetadata; ++ /** Server will disconnect soon. */ ++ goAway?: LiveServerGoAway; ++ /** Update of the session resumption state. */ ++ sessionResumptionUpdate?: LiveServerSessionResumptionUpdate; ++} ++/** Configures automatic detection of activity. */ ++export declare interface AutomaticActivityDetection { ++ /** If enabled, detected voice and text input count as activity. If disabled, the client must send activity signals. */ ++ disabled?: boolean; ++ /** Determines how likely speech is to be detected. */ ++ startOfSpeechSensitivity?: StartSensitivity; ++ /** Determines how likely detected speech is ended. */ ++ endOfSpeechSensitivity?: EndSensitivity; ++ /** The required duration of detected speech before start-of-speech is committed. The lower this value the more sensitive the start-of-speech detection is and the shorter speech can be recognized. However, this also increases the probability of false positives. */ ++ prefixPaddingMs?: number; ++ /** The required duration of detected non-speech (e.g. silence) before end-of-speech is committed. The larger this value, the longer speech gaps can be without interrupting the user's activity but this will increase the model's latency. */ ++ silenceDurationMs?: number; ++} ++/** Marks the end of user activity. ++ ++ This can only be sent if automatic (i.e. server-side) activity detection is ++ disabled. ++ */ ++export declare interface RealtimeInputConfig { ++ /** If not set, automatic activity detection is enabled by default. If automatic voice detection is disabled, the client must send activity signals. */ ++ automaticActivityDetection?: AutomaticActivityDetection; ++ /** Defines what effect activity has. */ ++ activityHandling?: ActivityHandling; ++ /** Defines which input is included in the user's turn. */ ++ turnCoverage?: TurnCoverage; ++} ++/** Configuration of session resumption mechanism. ++ ++ Included in `LiveConnectConfig.session_resumption`. If included server ++ will send `LiveServerSessionResumptionUpdate` messages. ++ */ ++export declare interface SessionResumptionConfig { ++ /** Session resumption handle of previous session (session to restore). ++ ++ If not present new session will be started. */ ++ handle?: string; ++ /** If set the server will send `last_consumed_client_message_index` in the `session_resumption_update` messages to allow for transparent reconnections. */ ++ transparent?: boolean; ++} ++/** Context window will be truncated by keeping only suffix of it. ++ ++ Context window will always be cut at start of USER role turn. System ++ instructions and `BidiGenerateContentSetup.prefix_turns` will not be ++ subject to the sliding window mechanism, they will always stay at the ++ beginning of context window. ++ */ ++export declare interface SlidingWindow { ++ /** Session reduction target -- how many tokens we should keep. Window shortening operation has some latency costs, so we should avoid running it on every turn. Should be < trigger_tokens. If not set, trigger_tokens/2 is assumed. */ ++ targetTokens?: string; ++} ++/** Enables context window compression -- mechanism managing model context window so it does not exceed given length. */ ++export declare interface ContextWindowCompressionConfig { ++ /** Number of tokens (before running turn) that triggers context window compression mechanism. */ ++ triggerTokens?: string; ++ /** Sliding window compression mechanism. */ ++ slidingWindow?: SlidingWindow; ++} ++/** The audio transcription configuration in Setup. */ ++export declare interface AudioTranscriptionConfig { ++} ++/** Message contains configuration that will apply for the duration of the streaming session. */ ++export declare interface LiveClientSetup { ++ /** ++ The fully qualified name of the publisher model or tuned model endpoint to ++ use. ++ */ ++ model?: string; ++ /** The generation configuration for the session. ++ Note: only a subset of fields are supported. ++ */ ++ generationConfig?: GenerationConfig; ++ /** The user provided system instructions for the model. ++ Note: only text should be used in parts and content in each part will be ++ in a separate paragraph. */ ++ systemInstruction?: ContentUnion; ++ /** A list of `Tools` the model may use to generate the next response. ++ ++ A `Tool` is a piece of code that enables the system to interact with ++ external systems to perform an action, or set of actions, outside of ++ knowledge and scope of the model. */ ++ tools?: ToolListUnion; ++ /** Configures the realtime input behavior in BidiGenerateContent. */ ++ realtimeInputConfig?: RealtimeInputConfig; ++ /** Configures session resumption mechanism. ++ ++ If included server will send SessionResumptionUpdate messages. */ ++ sessionResumption?: SessionResumptionConfig; ++ /** Configures context window compression mechanism. ++ ++ If included, server will compress context window to fit into given length. */ ++ contextWindowCompression?: ContextWindowCompressionConfig; ++} ++/** Incremental update of the current conversation delivered from the client. ++ ++ All the content here will unconditionally be appended to the conversation ++ history and used as part of the prompt to the model to generate content. ++ ++ A message here will interrupt any current model generation. ++ */ ++export declare interface LiveClientContent { ++ /** The content appended to the current conversation with the model. ++ ++ For single-turn queries, this is a single instance. For multi-turn ++ queries, this is a repeated field that contains conversation history and ++ latest request. ++ */ ++ turns?: Content[]; ++ /** If true, indicates that the server content generation should start with ++ the currently accumulated prompt. Otherwise, the server will await ++ additional messages before starting generation. */ ++ turnComplete?: boolean; ++} ++/** Marks the start of user activity. ++ ++ This can only be sent if automatic (i.e. server-side) activity detection is ++ disabled. ++ */ ++export declare interface ActivityStart { ++} ++/** Marks the end of user activity. ++ ++ This can only be sent if automatic (i.e. server-side) activity detection is ++ disabled. ++ */ ++export declare interface ActivityEnd { ++} ++/** User input that is sent in real time. ++ ++ This is different from `LiveClientContent` in a few ways: ++ ++ - Can be sent continuously without interruption to model generation. ++ - If there is a need to mix data interleaved across the ++ `LiveClientContent` and the `LiveClientRealtimeInput`, server attempts to ++ optimize for best response, but there are no guarantees. ++ - End of turn is not explicitly specified, but is rather derived from user ++ activity (for example, end of speech). ++ - Even before the end of turn, the data is processed incrementally ++ to optimize for a fast start of the response from the model. ++ - Is always assumed to be the user's input (cannot be used to populate ++ conversation history). ++ */ ++export declare interface LiveClientRealtimeInput { ++ /** Inlined bytes data for media input. */ ++ mediaChunks?: Blob[]; ++ /** Marks the start of user activity. */ ++ activityStart?: ActivityStart; ++ /** Marks the end of user activity. */ ++ activityEnd?: ActivityEnd; ++} ++/** Client generated response to a `ToolCall` received from the server. ++ ++ Individual `FunctionResponse` objects are matched to the respective ++ `FunctionCall` objects by the `id` field. ++ ++ Note that in the unary and server-streaming GenerateContent APIs function ++ calling happens by exchanging the `Content` parts, while in the bidi ++ GenerateContent APIs function calling happens over this dedicated set of ++ messages. ++ */ ++export declare class LiveClientToolResponse { ++ /** The response to the function calls. */ ++ functionResponses?: FunctionResponse[]; ++} ++/** Messages sent by the client in the API call. */ ++export declare interface LiveClientMessage { ++ /** Message to be sent by the system when connecting to the API. SDK users should not send this message. */ ++ setup?: LiveClientSetup; ++ /** Incremental update of the current conversation delivered from the client. */ ++ clientContent?: LiveClientContent; ++ /** User input that is sent in real time. */ ++ realtimeInput?: LiveClientRealtimeInput; ++ /** Response to a `ToolCallMessage` received from the server. */ ++ toolResponse?: LiveClientToolResponse; ++} ++/** Session config for the API connection. */ ++export declare interface LiveConnectConfig { ++ /** The generation configuration for the session. */ ++ generationConfig?: GenerationConfig; ++ /** The requested modalities of the response. Represents the set of ++ modalities that the model can return. Defaults to AUDIO if not specified. ++ */ ++ responseModalities?: Modality[]; ++ /** The speech generation configuration. ++ */ ++ speechConfig?: SpeechConfig; ++ /** The user provided system instructions for the model. ++ Note: only text should be used in parts and content in each part will be ++ in a separate paragraph. */ ++ systemInstruction?: ContentUnion; ++ /** A list of `Tools` the model may use to generate the next response. ++ ++ A `Tool` is a piece of code that enables the system to interact with ++ external systems to perform an action, or set of actions, outside of ++ knowledge and scope of the model. */ ++ tools?: ToolListUnion; ++ /** Configures session resumption mechanism. ++ ++ If included the server will send SessionResumptionUpdate messages. */ ++ sessionResumption?: SessionResumptionConfig; ++ /** Configures the realtime input behavior in BidiGenerateContent. */ ++ realtimeInputConfig?: RealtimeInputConfig; ++ /** Configures context window compression mechanism. ++ ++ If included, server will compress context window to fit into given length. */ ++ contextWindowCompression?: ContextWindowCompressionConfig; ++} ++/** Parameters for connecting to the live API. */ ++export declare interface LiveConnectParameters { ++ /** ID of the model to use. For a list of models, see `Google models ++ `_. */ ++ model: string; ++ /** callbacks */ ++ callbacks: LiveCallbacks; ++ /** Optional configuration parameters for the request. ++ */ ++ config?: LiveConnectConfig; ++} ++/** Parameters for initializing a new chat session. ++ ++ These parameters are used when creating a chat session with the ++ `chats.create()` method. ++ */ ++export declare interface CreateChatParameters { ++ /** The name of the model to use for the chat session. ++ ++ For example: 'gemini-2.0-flash', 'gemini-1.5-pro', etc. See gemini API ++ docs to find the available models. ++ */ ++ model: string; ++ /** Config for the entire chat session. ++ ++ This config applies to all requests within the session ++ unless overridden by a per-request `config` in `SendMessageParameters`. ++ */ ++ config?: GenerateContentConfig; ++ /** The initial conversation history for the chat session. ++ ++ This allows you to start the chat with a pre-existing history. The history ++ must be a list of `Content` alternating between 'user' and 'model' roles. ++ It should start with a 'user' message. ++ */ ++ history?: Content[]; ++} ++/** Parameters for sending a message within a chat session. ++ ++ These parameters are used with the `chat.sendMessage()` method. ++ */ ++export declare interface SendMessageParameters { ++ /** The message to send to the model. ++ ++ The SDK will combine all parts into a single 'user' content to send to ++ the model. ++ */ ++ message: PartListUnion; ++ /** Config for this specific request. ++ ++ Please note that the per-request config does not change the chat level ++ config, nor inherit from it. If you intend to use some values from the ++ chat's default config, you must explicitly copy them into this per-request ++ config. ++ */ ++ config?: GenerateContentConfig; ++} ++/** Parameters for sending client content to the live API. */ ++export declare interface LiveSendClientContentParameters { ++ /** Client content to send to the session. */ ++ turns?: ContentListUnion; ++ /** If true, indicates that the server content generation should start with ++ the currently accumulated prompt. Otherwise, the server will await ++ additional messages before starting generation. */ ++ turnComplete?: boolean; ++} ++/** Parameters for sending realtime input to the live API. */ ++export declare interface LiveSendRealtimeInputParameters { ++ /** Realtime input to send to the session. */ ++ media: Blob; ++ /** Marks the start of user activity. */ ++ activityStart?: ActivityStart; ++ /** Marks the end of user activity. */ ++ activityEnd?: ActivityEnd; ++} ++/** Parameters for sending tool responses to the live API. */ ++export declare class LiveSendToolResponseParameters { ++ /** Tool responses to send to the session. */ ++ functionResponses: FunctionResponse[] | FunctionResponse; ++} ++/** Parameters for the get method of the operations module. */ ++export declare interface OperationGetParameters { ++ /** The operation to be retrieved. */ ++ operation: GenerateVideosOperation; ++ /** Used to override the default configuration. */ ++ config?: GetOperationConfig; ++} ++export type PartUnion = Part | string; ++export type PartListUnion = PartUnion[] | PartUnion; ++export type ContentUnion = Content | PartUnion[] | PartUnion; ++export type ContentListUnion = Content | Content[] | PartUnion | PartUnion[]; ++export type SchemaUnion = Schema; ++export type SpeechConfigUnion = SpeechConfig | string; ++export type ToolListUnion = Tool[]; +diff --git a/dist/src/web/_browser_uploader.d.ts b/dist/src/web/_browser_uploader.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..e3397e3a8cb937cd13fe5a1487808fade9a47844 +--- /dev/null ++++ b/dist/src/web/_browser_uploader.d.ts +@@ -0,0 +1,12 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import { FileStat, Uploader } from '../_uploader'; ++import { File } from '../types'; ++export declare class BrowserUploader implements Uploader { ++ upload(file: string | Blob, uploadUrl: string, apiClient: ApiClient): Promise; ++ stat(file: string | Blob): Promise; ++} +diff --git a/dist/src/web/_browser_websocket.d.ts b/dist/src/web/_browser_websocket.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..f7d343165a48766c9a7bf013924e3acd4d0f0ba1 +--- /dev/null ++++ b/dist/src/web/_browser_websocket.d.ts +@@ -0,0 +1,19 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { WebSocketCallbacks, WebSocketFactory, WebSocket as Ws } from '../_websocket'; ++export declare class BrowserWebSocketFactory implements WebSocketFactory { ++ create(url: string, headers: Record, callbacks: WebSocketCallbacks): Ws; ++} ++export declare class BrowserWebSocket implements Ws { ++ private readonly url; ++ private readonly headers; ++ private readonly callbacks; ++ private ws?; ++ constructor(url: string, headers: Record, callbacks: WebSocketCallbacks); ++ connect(): void; ++ send(message: string): void; ++ close(): void; ++} +diff --git a/dist/src/web/_web_auth.d.ts b/dist/src/web/_web_auth.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..f5bfea2ad0fc6c27fc05c98b6dd7775bc97209d7 +--- /dev/null ++++ b/dist/src/web/_web_auth.d.ts +@@ -0,0 +1,12 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { Auth } from '../_auth'; ++export declare const GOOGLE_API_KEY_HEADER = "x-goog-api-key"; ++export declare class WebAuth implements Auth { ++ private readonly apiKey; ++ constructor(apiKey: string); ++ addAuthHeaders(headers: Headers): Promise; ++} +diff --git a/dist/src/web/index.d.ts b/dist/src/web/index.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..7f13c95f443a06be27a459c5c56e90415bfebf85 +--- /dev/null ++++ b/dist/src/web/index.d.ts +@@ -0,0 +1,15 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++export * from '../caches'; ++export * from '../chats'; ++export { GoogleGenAIOptions } from '../client'; ++export { Files } from '../files'; ++export * from '../live'; ++export { Models } from '../models'; ++export { Operations } from '../operations'; ++export { PagedItem, Pager } from '../pagers'; ++export * from '../types'; ++export * from './web_client'; +diff --git a/dist/src/web/web_client.d.ts b/dist/src/web/web_client.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..008b8be929a02392e3fb0997412a619985f23d33 +--- /dev/null ++++ b/dist/src/web/web_client.d.ts +@@ -0,0 +1,62 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import { Caches } from '../caches'; ++import { Chats } from '../chats'; ++import { GoogleGenAIOptions } from '../client'; ++import { Files } from '../files'; ++import { Live } from '../live'; ++import { Models } from '../models'; ++import { Operations } from '../operations'; ++/** ++ * The Google GenAI SDK. ++ * ++ * @remarks ++ * Provides access to the GenAI features through either the {@link ++ * https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API} or ++ * the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI ++ * API}. ++ * ++ * The {@link GoogleGenAIOptions.vertexai} value determines which of the API ++ * services to use. ++ * ++ * When using the Gemini API, a {@link GoogleGenAIOptions.apiKey} must also be ++ * set. When using Vertex AI, currently only {@link GoogleGenAIOptions.apiKey} ++ * is supported via Express mode. {@link GoogleGenAIOptions.project} and {@link ++ * GoogleGenAIOptions.location} should not be set. ++ * ++ * @example ++ * Initializing the SDK for using the Gemini API: ++ * ```ts ++ * import {GoogleGenAI} from '@google/genai'; ++ * const ai = new GoogleGenAI({apiKey: 'GEMINI_API_KEY'}); ++ * ``` ++ * ++ * @example ++ * Initializing the SDK for using the Vertex AI API: ++ * ```ts ++ * import {GoogleGenAI} from '@google/genai'; ++ * const ai = new GoogleGenAI({ ++ * vertexai: true, ++ * project: 'PROJECT_ID', ++ * location: 'PROJECT_LOCATION' ++ * }); ++ * ``` ++ * ++ */ ++export declare class GoogleGenAI { ++ protected readonly apiClient: ApiClient; ++ private readonly apiKey?; ++ readonly vertexai: boolean; ++ private readonly apiVersion?; ++ readonly models: Models; ++ readonly live: Live; ++ readonly chats: Chats; ++ readonly caches: Caches; ++ readonly files: Files; ++ readonly operations: Operations; ++ constructor(options: GoogleGenAIOptions); ++} +diff --git a/dist/tsdoc-metadata.json b/dist/tsdoc-metadata.json +new file mode 100644 +index 0000000000000000000000000000000000000000..53df58127701f2ee2bf59192ced518d91ffda2af +--- /dev/null ++++ b/dist/tsdoc-metadata.json +@@ -0,0 +1,11 @@ ++// This file is read by tools that parse documentation comments conforming to the TSDoc standard. ++// It should be published with your NPM package. It should not be tracked by Git. ++{ ++ "tsdocVersion": "0.12", ++ "toolPackages": [ ++ { ++ "packageName": "@microsoft/api-extractor", ++ "packageVersion": "7.50.1" ++ } ++ ] ++} +diff --git a/dist/web/index.mjs b/dist/web/index.mjs +index f79e32a4d3ab10b8c140a904adabe1c6b09aa865..6fdc6f5060570ff177557e89967518d5a0e325b0 100644 +--- a/dist/web/index.mjs ++++ b/dist/web/index.mjs +@@ -209,44 +209,25 @@ function _isFunctionCallPart(origin) { + typeof origin === 'object' && + 'functionCall' in origin); + } +-function _isUserPart(origin) { +- if (origin === null || origin === undefined) { +- return false; +- } +- if (_isFunctionCallPart(origin)) { +- return false; +- } +- return true; +-} +-function _areUserParts(origin) { +- if (origin === null || +- origin === undefined || +- (Array.isArray(origin) && origin.length === 0)) { +- return false; +- } +- return origin.every(_isUserPart); ++function _isFunctionResponsePart(origin) { ++ return (origin !== null && ++ origin !== undefined && ++ typeof origin === 'object' && ++ 'functionResponse' in origin); + } + function tContent(apiClient, origin) { + if (origin === null || origin === undefined) { + throw new Error('ContentUnion is required'); + } + if (_isContent(origin)) { +- // @ts-expect-error: _isContent is a utility function that checks if the ++ // _isContent is a utility function that checks if the + // origin is a Content. + return origin; + } +- if (_isUserPart(origin)) { +- return { +- role: 'user', +- parts: tParts(apiClient, origin), +- }; +- } +- else { +- return { +- role: 'model', +- parts: tParts(apiClient, origin), +- }; +- } ++ return { ++ role: 'user', ++ parts: tParts(apiClient, origin), ++ }; + } + function tContentsForEmbed(apiClient, origin) { + if (!origin) { +@@ -277,34 +258,6 @@ function tContentsForEmbed(apiClient, origin) { + } + return [tContent(apiClient, origin)]; + } +-function _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts) { +- if (accumulatedParts.length === 0) { +- return; +- } +- if (_areUserParts(accumulatedParts)) { +- result.push({ +- role: 'user', +- parts: tParts(apiClient, accumulatedParts), +- }); +- } +- else { +- result.push({ +- role: 'model', +- parts: tParts(apiClient, accumulatedParts), +- }); +- } +- accumulatedParts.length = 0; // clear the array inplace +-} +-function _handleCurrentPart(apiClient, result, accumulatedParts, currentPart) { +- if (_isUserPart(currentPart) === _areUserParts(accumulatedParts)) { +- accumulatedParts.push(currentPart); +- } +- else { +- _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts); +- accumulatedParts.length = 0; +- accumulatedParts.push(currentPart); +- } +-} + function tContents(apiClient, origin) { + if (origin === null || + origin === undefined || +@@ -312,35 +265,35 @@ function tContents(apiClient, origin) { + throw new Error('contents are required'); + } + if (!Array.isArray(origin)) { ++ // If it's not an array, it's a single content or a single PartUnion. ++ if (_isFunctionCallPart(origin) || _isFunctionResponsePart(origin)) { ++ throw new Error('To specify functionCall or functionResponse parts, please wrap them in a Content object, specifying the role for them'); ++ } + return [tContent(apiClient, origin)]; + } + const result = []; + const accumulatedParts = []; +- for (const content of origin) { +- if (_isContent(content)) { +- _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts); +- // @ts-expect-error: content is a Content here +- result.push(content); +- } +- else if (typeof content === 'string' || +- (typeof content === 'object' && !Array.isArray(content))) { +- // @ts-expect-error: content is a part here +- _handleCurrentPart(apiClient, result, accumulatedParts, content); +- } +- else if (Array.isArray(content)) { +- // if there're consecutive user parts before the list, +- // convert to UserContent and append to result +- _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts); +- result.push({ +- role: 'user', +- parts: tParts(apiClient, content), +- }); ++ const isContentArray = _isContent(origin[0]); ++ for (const item of origin) { ++ const isContent = _isContent(item); ++ if (isContent != isContentArray) { ++ throw new Error('Mixing Content and Parts is not supported, please group the parts into a the appropriate Content objects and specify the roles for them'); ++ } ++ if (isContent) { ++ // `isContent` contains the result of _isContent, which is a utility ++ // function that checks if the item is a Content. ++ result.push(item); ++ } ++ else if (_isFunctionCallPart(item) || _isFunctionResponsePart(item)) { ++ throw new Error('To specify functionCall or functionResponse parts, please wrap them, and any other parts, in Content objects as appropriate, specifying the role for them'); + } + else { +- throw new Error(`Unsupported content type: ${typeof content}`); ++ accumulatedParts.push(item); + } + } +- _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts); ++ if (!isContentArray) { ++ result.push({ role: 'user', parts: tParts(apiClient, accumulatedParts) }); ++ } + return result; + } + function processSchema(apiClient, schema) { +@@ -505,7 +458,7 @@ function tFileName(apiClient, fromName) { + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +-function partToMldev$1(apiClient, fromObject) { ++function partToMldev$2(apiClient, fromObject) { + const toObject = {}; + if (getValueByPath(fromObject, ['videoMetadata']) !== undefined) { + throw new Error('videoMetadata parameter is not supported in Gemini API.'); +@@ -550,13 +503,13 @@ function partToMldev$1(apiClient, fromObject) { + } + return toObject; + } +-function contentToMldev$1(apiClient, fromObject) { ++function contentToMldev$2(apiClient, fromObject) { + const toObject = {}; + const fromParts = getValueByPath(fromObject, ['parts']); + if (fromParts != null) { + if (Array.isArray(fromParts)) { + setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partToMldev$1(apiClient, item); ++ return partToMldev$2(apiClient, item); + })); + } + else { +@@ -569,7 +522,7 @@ function contentToMldev$1(apiClient, fromObject) { + } + return toObject; + } +-function functionDeclarationToMldev$1(apiClient, fromObject) { ++function functionDeclarationToMldev$2(apiClient, fromObject) { + const toObject = {}; + if (getValueByPath(fromObject, ['response']) !== undefined) { + throw new Error('response parameter is not supported in Gemini API.'); +@@ -588,11 +541,11 @@ function functionDeclarationToMldev$1(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchToMldev$1() { ++function googleSearchToMldev$2() { + const toObject = {}; + return toObject; + } +-function dynamicRetrievalConfigToMldev$1(apiClient, fromObject) { ++function dynamicRetrievalConfigToMldev$2(apiClient, fromObject) { + const toObject = {}; + const fromMode = getValueByPath(fromObject, ['mode']); + if (fromMode != null) { +@@ -606,17 +559,17 @@ function dynamicRetrievalConfigToMldev$1(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchRetrievalToMldev$1(apiClient, fromObject) { ++function googleSearchRetrievalToMldev$2(apiClient, fromObject) { + const toObject = {}; + const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ + 'dynamicRetrievalConfig', + ]); + if (fromDynamicRetrievalConfig != null) { +- setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev$1(apiClient, fromDynamicRetrievalConfig)); ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev$2(apiClient, fromDynamicRetrievalConfig)); + } + return toObject; + } +-function toolToMldev$1(apiClient, fromObject) { ++function toolToMldev$2(apiClient, fromObject) { + const toObject = {}; + const fromFunctionDeclarations = getValueByPath(fromObject, [ + 'functionDeclarations', +@@ -624,7 +577,7 @@ function toolToMldev$1(apiClient, fromObject) { + if (fromFunctionDeclarations != null) { + if (Array.isArray(fromFunctionDeclarations)) { + setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { +- return functionDeclarationToMldev$1(apiClient, item); ++ return functionDeclarationToMldev$2(apiClient, item); + })); + } + else { +@@ -636,13 +589,13 @@ function toolToMldev$1(apiClient, fromObject) { + } + const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); + if (fromGoogleSearch != null) { +- setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$1()); ++ setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$2()); + } + const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ + 'googleSearchRetrieval', + ]); + if (fromGoogleSearchRetrieval != null) { +- setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev$1(apiClient, fromGoogleSearchRetrieval)); ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev$2(apiClient, fromGoogleSearchRetrieval)); + } + const fromCodeExecution = getValueByPath(fromObject, [ + 'codeExecution', +@@ -694,7 +647,7 @@ function createCachedContentConfigToMldev(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromContents != null) { + if (Array.isArray(fromContents)) { + setValueByPath(parentObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToMldev$1(apiClient, item); ++ return contentToMldev$2(apiClient, item); + }))); + } + else { +@@ -705,13 +658,13 @@ function createCachedContentConfigToMldev(apiClient, fromObject, parentObject) { + 'systemInstruction', + ]); + if (parentObject !== undefined && fromSystemInstruction != null) { +- setValueByPath(parentObject, ['systemInstruction'], contentToMldev$1(apiClient, tContent(apiClient, fromSystemInstruction))); ++ setValueByPath(parentObject, ['systemInstruction'], contentToMldev$2(apiClient, tContent(apiClient, fromSystemInstruction))); + } + const fromTools = getValueByPath(fromObject, ['tools']); + if (parentObject !== undefined && fromTools != null) { + if (Array.isArray(fromTools)) { + setValueByPath(parentObject, ['tools'], fromTools.map((item) => { +- return toolToMldev$1(apiClient, item); ++ return toolToMldev$2(apiClient, item); + })); + } + else { +@@ -804,7 +757,7 @@ function listCachedContentsParametersToMldev(apiClient, fromObject) { + } + return toObject; + } +-function partToVertex$1(apiClient, fromObject) { ++function partToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromVideoMetadata = getValueByPath(fromObject, [ + 'videoMetadata', +@@ -852,13 +805,13 @@ function partToVertex$1(apiClient, fromObject) { + } + return toObject; + } +-function contentToVertex$1(apiClient, fromObject) { ++function contentToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromParts = getValueByPath(fromObject, ['parts']); + if (fromParts != null) { + if (Array.isArray(fromParts)) { + setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partToVertex$1(apiClient, item); ++ return partToVertex$2(apiClient, item); + })); + } + else { +@@ -871,7 +824,7 @@ function contentToVertex$1(apiClient, fromObject) { + } + return toObject; + } +-function schemaToVertex$1(apiClient, fromObject) { ++function schemaToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromExample = getValueByPath(fromObject, ['example']); + if (fromExample != null) { +@@ -969,11 +922,11 @@ function schemaToVertex$1(apiClient, fromObject) { + } + return toObject; + } +-function functionDeclarationToVertex$1(apiClient, fromObject) { ++function functionDeclarationToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromResponse = getValueByPath(fromObject, ['response']); + if (fromResponse != null) { +- setValueByPath(toObject, ['response'], schemaToVertex$1(apiClient, fromResponse)); ++ setValueByPath(toObject, ['response'], schemaToVertex$2(apiClient, fromResponse)); + } + const fromDescription = getValueByPath(fromObject, ['description']); + if (fromDescription != null) { +@@ -989,11 +942,11 @@ function functionDeclarationToVertex$1(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchToVertex$1() { ++function googleSearchToVertex$2() { + const toObject = {}; + return toObject; + } +-function dynamicRetrievalConfigToVertex$1(apiClient, fromObject) { ++function dynamicRetrievalConfigToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromMode = getValueByPath(fromObject, ['mode']); + if (fromMode != null) { +@@ -1007,17 +960,17 @@ function dynamicRetrievalConfigToVertex$1(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchRetrievalToVertex$1(apiClient, fromObject) { ++function googleSearchRetrievalToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ + 'dynamicRetrievalConfig', + ]); + if (fromDynamicRetrievalConfig != null) { +- setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$1(apiClient, fromDynamicRetrievalConfig)); ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$2(apiClient, fromDynamicRetrievalConfig)); + } + return toObject; + } +-function toolToVertex$1(apiClient, fromObject) { ++function toolToVertex$2(apiClient, fromObject) { + const toObject = {}; + const fromFunctionDeclarations = getValueByPath(fromObject, [ + 'functionDeclarations', +@@ -1025,7 +978,7 @@ function toolToVertex$1(apiClient, fromObject) { + if (fromFunctionDeclarations != null) { + if (Array.isArray(fromFunctionDeclarations)) { + setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { +- return functionDeclarationToVertex$1(apiClient, item); ++ return functionDeclarationToVertex$2(apiClient, item); + })); + } + else { +@@ -1038,13 +991,13 @@ function toolToVertex$1(apiClient, fromObject) { + } + const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); + if (fromGoogleSearch != null) { +- setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$1()); ++ setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$2()); + } + const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ + 'googleSearchRetrieval', + ]); + if (fromGoogleSearchRetrieval != null) { +- setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$1(apiClient, fromGoogleSearchRetrieval)); ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$2(apiClient, fromGoogleSearchRetrieval)); + } + const fromCodeExecution = getValueByPath(fromObject, [ + 'codeExecution', +@@ -1096,7 +1049,7 @@ function createCachedContentConfigToVertex(apiClient, fromObject, parentObject) + if (parentObject !== undefined && fromContents != null) { + if (Array.isArray(fromContents)) { + setValueByPath(parentObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToVertex$1(apiClient, item); ++ return contentToVertex$2(apiClient, item); + }))); + } + else { +@@ -1107,13 +1060,13 @@ function createCachedContentConfigToVertex(apiClient, fromObject, parentObject) + 'systemInstruction', + ]); + if (parentObject !== undefined && fromSystemInstruction != null) { +- setValueByPath(parentObject, ['systemInstruction'], contentToVertex$1(apiClient, tContent(apiClient, fromSystemInstruction))); ++ setValueByPath(parentObject, ['systemInstruction'], contentToVertex$2(apiClient, tContent(apiClient, fromSystemInstruction))); + } + const fromTools = getValueByPath(fromObject, ['tools']); + if (parentObject !== undefined && fromTools != null) { + if (Array.isArray(fromTools)) { + setValueByPath(parentObject, ['tools'], fromTools.map((item) => { +- return toolToVertex$1(apiClient, item); ++ return toolToVertex$2(apiClient, item); + })); + } + else { +@@ -1638,6 +1591,14 @@ var MediaResolution; + MediaResolution["MEDIA_RESOLUTION_MEDIUM"] = "MEDIA_RESOLUTION_MEDIUM"; + MediaResolution["MEDIA_RESOLUTION_HIGH"] = "MEDIA_RESOLUTION_HIGH"; + })(MediaResolution || (MediaResolution = {})); ++/** Options for feature selection preference. */ ++var FeatureSelectionPreference; ++(function (FeatureSelectionPreference) { ++ FeatureSelectionPreference["FEATURE_SELECTION_PREFERENCE_UNSPECIFIED"] = "FEATURE_SELECTION_PREFERENCE_UNSPECIFIED"; ++ FeatureSelectionPreference["PRIORITIZE_QUALITY"] = "PRIORITIZE_QUALITY"; ++ FeatureSelectionPreference["BALANCED"] = "BALANCED"; ++ FeatureSelectionPreference["PRIORITIZE_COST"] = "PRIORITIZE_COST"; ++})(FeatureSelectionPreference || (FeatureSelectionPreference = {})); + /** Config for the dynamic retrieval config mode. */ + var DynamicRetrievalConfigMode; + (function (DynamicRetrievalConfigMode) { +@@ -2188,8 +2149,8 @@ class Caches extends BaseModule { + * + * @remarks + * Context caching is only supported for specific models. See [Gemini +- * Developer API reference] (https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac) +- * and [Vertex AI reference] (https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models) ++ * Developer API reference](https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac) ++ * and [Vertex AI reference](https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models) + * for more information. + * + * @param params - The parameters for the create request. +@@ -3115,12 +3076,8 @@ function listFilesResponseFromMldev(apiClient, fromObject) { + } + return toObject; + } +-function createFileResponseFromMldev(apiClient, fromObject) { ++function createFileResponseFromMldev() { + const toObject = {}; +- const fromHttpHeaders = getValueByPath(fromObject, ['httpHeaders']); +- if (fromHttpHeaders != null) { +- setValueByPath(toObject, ['httpHeaders'], fromHttpHeaders); +- } + return toObject; + } + function deleteFileResponseFromMldev() { +@@ -3272,8 +3229,8 @@ class Files extends BaseModule { + .then((httpResponse) => { + return httpResponse.json(); + }); +- return response.then((apiResponse) => { +- const resp = createFileResponseFromMldev(this.apiClient, apiResponse); ++ return response.then(() => { ++ const resp = createFileResponseFromMldev(); + const typedResp = new CreateFileResponse(); + Object.assign(typedResp, resp); + return typedResp; +@@ -3381,7 +3338,7 @@ class Files extends BaseModule { + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ +-function partToMldev(apiClient, fromObject) { ++function partToMldev$1(apiClient, fromObject) { + const toObject = {}; + if (getValueByPath(fromObject, ['videoMetadata']) !== undefined) { + throw new Error('videoMetadata parameter is not supported in Gemini API.'); +@@ -3426,13 +3383,61 @@ function partToMldev(apiClient, fromObject) { + } + return toObject; + } +-function contentToMldev(apiClient, fromObject) { ++function partToVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromVideoMetadata = getValueByPath(fromObject, [ ++ 'videoMetadata', ++ ]); ++ if (fromVideoMetadata != null) { ++ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); ++ } ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); ++ } ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', ++ ]); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); ++ } ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', ++ ]); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); ++ } ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); ++ } ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); ++ } ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', ++ ]); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); ++ } ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); ++ } ++ const fromText = getValueByPath(fromObject, ['text']); ++ if (fromText != null) { ++ setValueByPath(toObject, ['text'], fromText); ++ } ++ return toObject; ++} ++function contentToMldev$1(apiClient, fromObject) { + const toObject = {}; + const fromParts = getValueByPath(fromObject, ['parts']); + if (fromParts != null) { + if (Array.isArray(fromParts)) { + setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partToMldev(apiClient, item); ++ return partToMldev$1(apiClient, item); + })); + } + else { +@@ -3445,28 +3450,58 @@ function contentToMldev(apiClient, fromObject) { + } + return toObject; + } +-function schemaToMldev(apiClient, fromObject) { ++function contentToVertex$1(apiClient, fromObject) { + const toObject = {}; +- if (getValueByPath(fromObject, ['example']) !== undefined) { +- throw new Error('example parameter is not supported in Gemini API.'); ++ const fromParts = getValueByPath(fromObject, ['parts']); ++ if (fromParts != null) { ++ if (Array.isArray(fromParts)) { ++ setValueByPath(toObject, ['parts'], fromParts.map((item) => { ++ return partToVertex$1(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['parts'], fromParts); ++ } + } +- if (getValueByPath(fromObject, ['pattern']) !== undefined) { +- throw new Error('pattern parameter is not supported in Gemini API.'); ++ const fromRole = getValueByPath(fromObject, ['role']); ++ if (fromRole != null) { ++ setValueByPath(toObject, ['role'], fromRole); + } +- if (getValueByPath(fromObject, ['default']) !== undefined) { +- throw new Error('default parameter is not supported in Gemini API.'); ++ return toObject; ++} ++function schemaToVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromExample = getValueByPath(fromObject, ['example']); ++ if (fromExample != null) { ++ setValueByPath(toObject, ['example'], fromExample); + } +- if (getValueByPath(fromObject, ['maxLength']) !== undefined) { +- throw new Error('maxLength parameter is not supported in Gemini API.'); ++ const fromPattern = getValueByPath(fromObject, ['pattern']); ++ if (fromPattern != null) { ++ setValueByPath(toObject, ['pattern'], fromPattern); + } +- if (getValueByPath(fromObject, ['minLength']) !== undefined) { +- throw new Error('minLength parameter is not supported in Gemini API.'); ++ const fromDefault = getValueByPath(fromObject, ['default']); ++ if (fromDefault != null) { ++ setValueByPath(toObject, ['default'], fromDefault); + } +- if (getValueByPath(fromObject, ['minProperties']) !== undefined) { +- throw new Error('minProperties parameter is not supported in Gemini API.'); ++ const fromMaxLength = getValueByPath(fromObject, ['maxLength']); ++ if (fromMaxLength != null) { ++ setValueByPath(toObject, ['maxLength'], fromMaxLength); + } +- if (getValueByPath(fromObject, ['maxProperties']) !== undefined) { +- throw new Error('maxProperties parameter is not supported in Gemini API.'); ++ const fromMinLength = getValueByPath(fromObject, ['minLength']); ++ if (fromMinLength != null) { ++ setValueByPath(toObject, ['minLength'], fromMinLength); ++ } ++ const fromMinProperties = getValueByPath(fromObject, [ ++ 'minProperties', ++ ]); ++ if (fromMinProperties != null) { ++ setValueByPath(toObject, ['minProperties'], fromMinProperties); ++ } ++ const fromMaxProperties = getValueByPath(fromObject, [ ++ 'maxProperties', ++ ]); ++ if (fromMaxProperties != null) { ++ setValueByPath(toObject, ['maxProperties'], fromMaxProperties); + } + const fromAnyOf = getValueByPath(fromObject, ['anyOf']); + if (fromAnyOf != null) { +@@ -3532,25 +3567,30 @@ function schemaToMldev(apiClient, fromObject) { + } + return toObject; + } +-function safetySettingToMldev(apiClient, fromObject) { ++function functionDeclarationToMldev$1(apiClient, fromObject) { + const toObject = {}; +- if (getValueByPath(fromObject, ['method']) !== undefined) { +- throw new Error('method parameter is not supported in Gemini API.'); ++ if (getValueByPath(fromObject, ['response']) !== undefined) { ++ throw new Error('response parameter is not supported in Gemini API.'); + } +- const fromCategory = getValueByPath(fromObject, ['category']); +- if (fromCategory != null) { +- setValueByPath(toObject, ['category'], fromCategory); ++ const fromDescription = getValueByPath(fromObject, ['description']); ++ if (fromDescription != null) { ++ setValueByPath(toObject, ['description'], fromDescription); + } +- const fromThreshold = getValueByPath(fromObject, ['threshold']); +- if (fromThreshold != null) { +- setValueByPath(toObject, ['threshold'], fromThreshold); ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); ++ } ++ const fromParameters = getValueByPath(fromObject, ['parameters']); ++ if (fromParameters != null) { ++ setValueByPath(toObject, ['parameters'], fromParameters); + } + return toObject; + } +-function functionDeclarationToMldev(apiClient, fromObject) { ++function functionDeclarationToVertex$1(apiClient, fromObject) { + const toObject = {}; +- if (getValueByPath(fromObject, ['response']) !== undefined) { +- throw new Error('response parameter is not supported in Gemini API.'); ++ const fromResponse = getValueByPath(fromObject, ['response']); ++ if (fromResponse != null) { ++ setValueByPath(toObject, ['response'], schemaToVertex$1(apiClient, fromResponse)); + } + const fromDescription = getValueByPath(fromObject, ['description']); + if (fromDescription != null) { +@@ -3566,11 +3606,15 @@ function functionDeclarationToMldev(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchToMldev() { ++function googleSearchToMldev$1() { + const toObject = {}; + return toObject; + } +-function dynamicRetrievalConfigToMldev(apiClient, fromObject) { ++function googleSearchToVertex$1() { ++ const toObject = {}; ++ return toObject; ++} ++function dynamicRetrievalConfigToMldev$1(apiClient, fromObject) { + const toObject = {}; + const fromMode = getValueByPath(fromObject, ['mode']); + if (fromMode != null) { +@@ -3584,17 +3628,41 @@ function dynamicRetrievalConfigToMldev(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchRetrievalToMldev(apiClient, fromObject) { ++function dynamicRetrievalConfigToVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromMode = getValueByPath(fromObject, ['mode']); ++ if (fromMode != null) { ++ setValueByPath(toObject, ['mode'], fromMode); ++ } ++ const fromDynamicThreshold = getValueByPath(fromObject, [ ++ 'dynamicThreshold', ++ ]); ++ if (fromDynamicThreshold != null) { ++ setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold); ++ } ++ return toObject; ++} ++function googleSearchRetrievalToMldev$1(apiClient, fromObject) { + const toObject = {}; + const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ + 'dynamicRetrievalConfig', + ]); + if (fromDynamicRetrievalConfig != null) { +- setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig)); ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev$1(apiClient, fromDynamicRetrievalConfig)); + } + return toObject; + } +-function toolToMldev(apiClient, fromObject) { ++function googleSearchRetrievalToVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ ++ 'dynamicRetrievalConfig', ++ ]); ++ if (fromDynamicRetrievalConfig != null) { ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$1(apiClient, fromDynamicRetrievalConfig)); ++ } ++ return toObject; ++} ++function toolToMldev$1(apiClient, fromObject) { + const toObject = {}; + const fromFunctionDeclarations = getValueByPath(fromObject, [ + 'functionDeclarations', +@@ -3602,7 +3670,7 @@ function toolToMldev(apiClient, fromObject) { + if (fromFunctionDeclarations != null) { + if (Array.isArray(fromFunctionDeclarations)) { + setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { +- return functionDeclarationToMldev(apiClient, item); ++ return functionDeclarationToMldev$1(apiClient, item); + })); + } + else { +@@ -3614,13 +3682,13 @@ function toolToMldev(apiClient, fromObject) { + } + const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); + if (fromGoogleSearch != null) { +- setValueByPath(toObject, ['googleSearch'], googleSearchToMldev()); ++ setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$1()); + } + const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ + 'googleSearchRetrieval', + ]); + if (fromGoogleSearchRetrieval != null) { +- setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval)); ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev$1(apiClient, fromGoogleSearchRetrieval)); + } + const fromCodeExecution = getValueByPath(fromObject, [ + 'codeExecution', +@@ -3630,561 +3698,1016 @@ function toolToMldev(apiClient, fromObject) { + } + return toObject; + } +-function functionCallingConfigToMldev(apiClient, fromObject) { ++function toolToVertex$1(apiClient, fromObject) { + const toObject = {}; +- const fromMode = getValueByPath(fromObject, ['mode']); +- if (fromMode != null) { +- setValueByPath(toObject, ['mode'], fromMode); ++ const fromFunctionDeclarations = getValueByPath(fromObject, [ ++ 'functionDeclarations', ++ ]); ++ if (fromFunctionDeclarations != null) { ++ if (Array.isArray(fromFunctionDeclarations)) { ++ setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { ++ return functionDeclarationToVertex$1(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations); ++ } + } +- const fromAllowedFunctionNames = getValueByPath(fromObject, [ +- 'allowedFunctionNames', ++ const fromRetrieval = getValueByPath(fromObject, ['retrieval']); ++ if (fromRetrieval != null) { ++ setValueByPath(toObject, ['retrieval'], fromRetrieval); ++ } ++ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); ++ if (fromGoogleSearch != null) { ++ setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$1()); ++ } ++ const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ ++ 'googleSearchRetrieval', + ]); +- if (fromAllowedFunctionNames != null) { +- setValueByPath(toObject, ['allowedFunctionNames'], fromAllowedFunctionNames); ++ if (fromGoogleSearchRetrieval != null) { ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$1(apiClient, fromGoogleSearchRetrieval)); ++ } ++ const fromCodeExecution = getValueByPath(fromObject, [ ++ 'codeExecution', ++ ]); ++ if (fromCodeExecution != null) { ++ setValueByPath(toObject, ['codeExecution'], fromCodeExecution); + } + return toObject; + } +-function toolConfigToMldev(apiClient, fromObject) { ++function sessionResumptionConfigToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromFunctionCallingConfig = getValueByPath(fromObject, [ +- 'functionCallingConfig', +- ]); +- if (fromFunctionCallingConfig != null) { +- setValueByPath(toObject, ['functionCallingConfig'], functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig)); ++ const fromHandle = getValueByPath(fromObject, ['handle']); ++ if (fromHandle != null) { ++ setValueByPath(toObject, ['handle'], fromHandle); ++ } ++ if (getValueByPath(fromObject, ['transparent']) !== undefined) { ++ throw new Error('transparent parameter is not supported in Gemini API.'); + } + return toObject; + } +-function prebuiltVoiceConfigToMldev(apiClient, fromObject) { ++function sessionResumptionConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromVoiceName = getValueByPath(fromObject, ['voiceName']); +- if (fromVoiceName != null) { +- setValueByPath(toObject, ['voiceName'], fromVoiceName); ++ const fromHandle = getValueByPath(fromObject, ['handle']); ++ if (fromHandle != null) { ++ setValueByPath(toObject, ['handle'], fromHandle); ++ } ++ const fromTransparent = getValueByPath(fromObject, ['transparent']); ++ if (fromTransparent != null) { ++ setValueByPath(toObject, ['transparent'], fromTransparent); + } + return toObject; + } +-function voiceConfigToMldev(apiClient, fromObject) { ++function automaticActivityDetectionToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [ +- 'prebuiltVoiceConfig', ++ const fromDisabled = getValueByPath(fromObject, ['disabled']); ++ if (fromDisabled != null) { ++ setValueByPath(toObject, ['disabled'], fromDisabled); ++ } ++ const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [ ++ 'startOfSpeechSensitivity', + ]); +- if (fromPrebuiltVoiceConfig != null) { +- setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToMldev(apiClient, fromPrebuiltVoiceConfig)); ++ if (fromStartOfSpeechSensitivity != null) { ++ setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity); ++ } ++ const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [ ++ 'endOfSpeechSensitivity', ++ ]); ++ if (fromEndOfSpeechSensitivity != null) { ++ setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity); ++ } ++ const fromPrefixPaddingMs = getValueByPath(fromObject, [ ++ 'prefixPaddingMs', ++ ]); ++ if (fromPrefixPaddingMs != null) { ++ setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs); ++ } ++ const fromSilenceDurationMs = getValueByPath(fromObject, [ ++ 'silenceDurationMs', ++ ]); ++ if (fromSilenceDurationMs != null) { ++ setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs); + } + return toObject; + } +-function speechConfigToMldev(apiClient, fromObject) { ++function automaticActivityDetectionToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']); +- if (fromVoiceConfig != null) { +- setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev(apiClient, fromVoiceConfig)); ++ const fromDisabled = getValueByPath(fromObject, ['disabled']); ++ if (fromDisabled != null) { ++ setValueByPath(toObject, ['disabled'], fromDisabled); ++ } ++ const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [ ++ 'startOfSpeechSensitivity', ++ ]); ++ if (fromStartOfSpeechSensitivity != null) { ++ setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity); ++ } ++ const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [ ++ 'endOfSpeechSensitivity', ++ ]); ++ if (fromEndOfSpeechSensitivity != null) { ++ setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity); ++ } ++ const fromPrefixPaddingMs = getValueByPath(fromObject, [ ++ 'prefixPaddingMs', ++ ]); ++ if (fromPrefixPaddingMs != null) { ++ setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs); ++ } ++ const fromSilenceDurationMs = getValueByPath(fromObject, [ ++ 'silenceDurationMs', ++ ]); ++ if (fromSilenceDurationMs != null) { ++ setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs); + } + return toObject; + } +-function thinkingConfigToMldev(apiClient, fromObject) { ++function realtimeInputConfigToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromIncludeThoughts = getValueByPath(fromObject, [ +- 'includeThoughts', ++ const fromAutomaticActivityDetection = getValueByPath(fromObject, [ ++ 'automaticActivityDetection', + ]); +- if (fromIncludeThoughts != null) { +- setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts); ++ if (fromAutomaticActivityDetection != null) { ++ setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToMldev(apiClient, fromAutomaticActivityDetection)); + } +- const fromThinkingBudget = getValueByPath(fromObject, [ +- 'thinkingBudget', ++ const fromActivityHandling = getValueByPath(fromObject, [ ++ 'activityHandling', + ]); +- if (fromThinkingBudget != null) { +- setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget); ++ if (fromActivityHandling != null) { ++ setValueByPath(toObject, ['activityHandling'], fromActivityHandling); ++ } ++ const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']); ++ if (fromTurnCoverage != null) { ++ setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage); + } + return toObject; + } +-function generateContentConfigToMldev(apiClient, fromObject, parentObject) { ++function realtimeInputConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromSystemInstruction = getValueByPath(fromObject, [ +- 'systemInstruction', ++ const fromAutomaticActivityDetection = getValueByPath(fromObject, [ ++ 'automaticActivityDetection', + ]); +- if (parentObject !== undefined && fromSystemInstruction != null) { +- setValueByPath(parentObject, ['systemInstruction'], contentToMldev(apiClient, tContent(apiClient, fromSystemInstruction))); +- } +- const fromTemperature = getValueByPath(fromObject, ['temperature']); +- if (fromTemperature != null) { +- setValueByPath(toObject, ['temperature'], fromTemperature); ++ if (fromAutomaticActivityDetection != null) { ++ setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToVertex(apiClient, fromAutomaticActivityDetection)); + } +- const fromTopP = getValueByPath(fromObject, ['topP']); +- if (fromTopP != null) { +- setValueByPath(toObject, ['topP'], fromTopP); ++ const fromActivityHandling = getValueByPath(fromObject, [ ++ 'activityHandling', ++ ]); ++ if (fromActivityHandling != null) { ++ setValueByPath(toObject, ['activityHandling'], fromActivityHandling); + } +- const fromTopK = getValueByPath(fromObject, ['topK']); +- if (fromTopK != null) { +- setValueByPath(toObject, ['topK'], fromTopK); ++ const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']); ++ if (fromTurnCoverage != null) { ++ setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage); + } +- const fromCandidateCount = getValueByPath(fromObject, [ +- 'candidateCount', +- ]); +- if (fromCandidateCount != null) { +- setValueByPath(toObject, ['candidateCount'], fromCandidateCount); ++ return toObject; ++} ++function slidingWindowToMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']); ++ if (fromTargetTokens != null) { ++ setValueByPath(toObject, ['targetTokens'], fromTargetTokens); + } +- const fromMaxOutputTokens = getValueByPath(fromObject, [ +- 'maxOutputTokens', +- ]); +- if (fromMaxOutputTokens != null) { +- setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens); ++ return toObject; ++} ++function slidingWindowToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']); ++ if (fromTargetTokens != null) { ++ setValueByPath(toObject, ['targetTokens'], fromTargetTokens); + } +- const fromStopSequences = getValueByPath(fromObject, [ +- 'stopSequences', ++ return toObject; ++} ++function contextWindowCompressionConfigToMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTriggerTokens = getValueByPath(fromObject, [ ++ 'triggerTokens', + ]); +- if (fromStopSequences != null) { +- setValueByPath(toObject, ['stopSequences'], fromStopSequences); ++ if (fromTriggerTokens != null) { ++ setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens); + } +- const fromResponseLogprobs = getValueByPath(fromObject, [ +- 'responseLogprobs', ++ const fromSlidingWindow = getValueByPath(fromObject, [ ++ 'slidingWindow', + ]); +- if (fromResponseLogprobs != null) { +- setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs); +- } +- const fromLogprobs = getValueByPath(fromObject, ['logprobs']); +- if (fromLogprobs != null) { +- setValueByPath(toObject, ['logprobs'], fromLogprobs); ++ if (fromSlidingWindow != null) { ++ setValueByPath(toObject, ['slidingWindow'], slidingWindowToMldev(apiClient, fromSlidingWindow)); + } +- const fromPresencePenalty = getValueByPath(fromObject, [ +- 'presencePenalty', ++ return toObject; ++} ++function contextWindowCompressionConfigToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTriggerTokens = getValueByPath(fromObject, [ ++ 'triggerTokens', + ]); +- if (fromPresencePenalty != null) { +- setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty); ++ if (fromTriggerTokens != null) { ++ setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens); + } +- const fromFrequencyPenalty = getValueByPath(fromObject, [ +- 'frequencyPenalty', ++ const fromSlidingWindow = getValueByPath(fromObject, [ ++ 'slidingWindow', + ]); +- if (fromFrequencyPenalty != null) { +- setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty); +- } +- const fromSeed = getValueByPath(fromObject, ['seed']); +- if (fromSeed != null) { +- setValueByPath(toObject, ['seed'], fromSeed); ++ if (fromSlidingWindow != null) { ++ setValueByPath(toObject, ['slidingWindow'], slidingWindowToVertex(apiClient, fromSlidingWindow)); + } +- const fromResponseMimeType = getValueByPath(fromObject, [ +- 'responseMimeType', ++ return toObject; ++} ++function liveConnectConfigToMldev(apiClient, fromObject, parentObject) { ++ const toObject = {}; ++ const fromGenerationConfig = getValueByPath(fromObject, [ ++ 'generationConfig', + ]); +- if (fromResponseMimeType != null) { +- setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType); ++ if (parentObject !== undefined && fromGenerationConfig != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig); + } +- const fromResponseSchema = getValueByPath(fromObject, [ +- 'responseSchema', ++ const fromResponseModalities = getValueByPath(fromObject, [ ++ 'responseModalities', + ]); +- if (fromResponseSchema != null) { +- setValueByPath(toObject, ['responseSchema'], schemaToMldev(apiClient, tSchema(apiClient, fromResponseSchema))); ++ if (parentObject !== undefined && fromResponseModalities != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities); + } +- if (getValueByPath(fromObject, ['routingConfig']) !== undefined) { +- throw new Error('routingConfig parameter is not supported in Gemini API.'); ++ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); ++ if (parentObject !== undefined && fromSpeechConfig != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], fromSpeechConfig); + } +- const fromSafetySettings = getValueByPath(fromObject, [ +- 'safetySettings', ++ const fromSystemInstruction = getValueByPath(fromObject, [ ++ 'systemInstruction', + ]); +- if (parentObject !== undefined && fromSafetySettings != null) { +- if (Array.isArray(fromSafetySettings)) { +- setValueByPath(parentObject, ['safetySettings'], fromSafetySettings.map((item) => { +- return safetySettingToMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(parentObject, ['safetySettings'], fromSafetySettings); +- } ++ if (parentObject !== undefined && fromSystemInstruction != null) { ++ setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToMldev$1(apiClient, tContent(apiClient, fromSystemInstruction))); + } + const fromTools = getValueByPath(fromObject, ['tools']); + if (parentObject !== undefined && fromTools != null) { + if (Array.isArray(fromTools)) { +- setValueByPath(parentObject, ['tools'], tTools(apiClient, tTools(apiClient, fromTools).map((item) => { +- return toolToMldev(apiClient, tTool(apiClient, item)); ++ setValueByPath(parentObject, ['setup', 'tools'], tTools(apiClient, tTools(apiClient, fromTools).map((item) => { ++ return toolToMldev$1(apiClient, tTool(apiClient, item)); + }))); + } + else { +- setValueByPath(parentObject, ['tools'], tTools(apiClient, fromTools)); ++ setValueByPath(parentObject, ['setup', 'tools'], tTools(apiClient, fromTools)); + } + } +- const fromToolConfig = getValueByPath(fromObject, ['toolConfig']); +- if (parentObject !== undefined && fromToolConfig != null) { +- setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev(apiClient, fromToolConfig)); ++ const fromSessionResumption = getValueByPath(fromObject, [ ++ 'sessionResumption', ++ ]); ++ if (parentObject !== undefined && fromSessionResumption != null) { ++ setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToMldev(apiClient, fromSessionResumption)); + } +- if (getValueByPath(fromObject, ['labels']) !== undefined) { +- throw new Error('labels parameter is not supported in Gemini API.'); ++ const fromRealtimeInputConfig = getValueByPath(fromObject, [ ++ 'realtimeInputConfig', ++ ]); ++ if (parentObject !== undefined && fromRealtimeInputConfig != null) { ++ setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToMldev(apiClient, fromRealtimeInputConfig)); + } +- const fromCachedContent = getValueByPath(fromObject, [ +- 'cachedContent', ++ const fromContextWindowCompression = getValueByPath(fromObject, [ ++ 'contextWindowCompression', + ]); +- if (parentObject !== undefined && fromCachedContent != null) { +- setValueByPath(parentObject, ['cachedContent'], tCachedContentName(apiClient, fromCachedContent)); ++ if (parentObject !== undefined && fromContextWindowCompression != null) { ++ setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToMldev(apiClient, fromContextWindowCompression)); + } +- const fromResponseModalities = getValueByPath(fromObject, [ +- 'responseModalities', ++ return toObject; ++} ++function liveConnectConfigToVertex(apiClient, fromObject, parentObject) { ++ const toObject = {}; ++ const fromGenerationConfig = getValueByPath(fromObject, [ ++ 'generationConfig', + ]); +- if (fromResponseModalities != null) { +- setValueByPath(toObject, ['responseModalities'], fromResponseModalities); ++ if (parentObject !== undefined && fromGenerationConfig != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig); + } +- const fromMediaResolution = getValueByPath(fromObject, [ +- 'mediaResolution', ++ const fromResponseModalities = getValueByPath(fromObject, [ ++ 'responseModalities', + ]); +- if (fromMediaResolution != null) { +- setValueByPath(toObject, ['mediaResolution'], fromMediaResolution); ++ if (parentObject !== undefined && fromResponseModalities != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities); + } + const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); +- if (fromSpeechConfig != null) { +- setValueByPath(toObject, ['speechConfig'], speechConfigToMldev(apiClient, tSpeechConfig(apiClient, fromSpeechConfig))); ++ if (parentObject !== undefined && fromSpeechConfig != null) { ++ setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], fromSpeechConfig); + } +- if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) { +- throw new Error('audioTimestamp parameter is not supported in Gemini API.'); +- } +- const fromThinkingConfig = getValueByPath(fromObject, [ +- 'thinkingConfig', ++ const fromSystemInstruction = getValueByPath(fromObject, [ ++ 'systemInstruction', + ]); +- if (fromThinkingConfig != null) { +- setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev(apiClient, fromThinkingConfig)); +- } +- return toObject; +-} +-function generateContentParametersToMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); ++ if (parentObject !== undefined && fromSystemInstruction != null) { ++ setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToVertex$1(apiClient, tContent(apiClient, fromSystemInstruction))); + } +- const fromContents = getValueByPath(fromObject, ['contents']); +- if (fromContents != null) { +- if (Array.isArray(fromContents)) { +- setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToMldev(apiClient, item); ++ const fromTools = getValueByPath(fromObject, ['tools']); ++ if (parentObject !== undefined && fromTools != null) { ++ if (Array.isArray(fromTools)) { ++ setValueByPath(parentObject, ['setup', 'tools'], tTools(apiClient, tTools(apiClient, fromTools).map((item) => { ++ return toolToVertex$1(apiClient, tTool(apiClient, item)); + }))); + } + else { +- setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); ++ setValueByPath(parentObject, ['setup', 'tools'], tTools(apiClient, fromTools)); + } + } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['generationConfig'], generateContentConfigToMldev(apiClient, fromConfig, toObject)); +- } +- return toObject; +-} +-function embedContentConfigToMldev(apiClient, fromObject, parentObject) { +- const toObject = {}; +- const fromTaskType = getValueByPath(fromObject, ['taskType']); +- if (parentObject !== undefined && fromTaskType != null) { +- setValueByPath(parentObject, ['requests[]', 'taskType'], fromTaskType); ++ const fromSessionResumption = getValueByPath(fromObject, [ ++ 'sessionResumption', ++ ]); ++ if (parentObject !== undefined && fromSessionResumption != null) { ++ setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToVertex(apiClient, fromSessionResumption)); + } +- const fromTitle = getValueByPath(fromObject, ['title']); +- if (parentObject !== undefined && fromTitle != null) { +- setValueByPath(parentObject, ['requests[]', 'title'], fromTitle); ++ const fromRealtimeInputConfig = getValueByPath(fromObject, [ ++ 'realtimeInputConfig', ++ ]); ++ if (parentObject !== undefined && fromRealtimeInputConfig != null) { ++ setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToVertex(apiClient, fromRealtimeInputConfig)); + } +- const fromOutputDimensionality = getValueByPath(fromObject, [ +- 'outputDimensionality', ++ const fromContextWindowCompression = getValueByPath(fromObject, [ ++ 'contextWindowCompression', + ]); +- if (parentObject !== undefined && fromOutputDimensionality != null) { +- setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality); ++ if (parentObject !== undefined && fromContextWindowCompression != null) { ++ setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToVertex(apiClient, fromContextWindowCompression)); + } +- if (getValueByPath(fromObject, ['mimeType']) !== undefined) { +- throw new Error('mimeType parameter is not supported in Gemini API.'); ++ return toObject; ++} ++function liveConnectParametersToMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel)); + } +- if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) { +- throw new Error('autoTruncate parameter is not supported in Gemini API.'); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], liveConnectConfigToMldev(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function embedContentParametersToMldev(apiClient, fromObject) { ++function liveConnectParametersToVertex(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); +- } +- const fromContents = getValueByPath(fromObject, ['contents']); +- if (fromContents != null) { +- setValueByPath(toObject, ['requests[]', 'content'], tContentsForEmbed(apiClient, fromContents)); ++ setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel)); + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['config'], embedContentConfigToMldev(apiClient, fromConfig, toObject)); +- } +- const fromModelForEmbedContent = getValueByPath(fromObject, ['model']); +- if (fromModelForEmbedContent !== undefined) { +- setValueByPath(toObject, ['requests[]', 'model'], tModel(apiClient, fromModelForEmbedContent)); ++ setValueByPath(toObject, ['config'], liveConnectConfigToVertex(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function generateImagesConfigToMldev(apiClient, fromObject, parentObject) { ++function liveServerSetupCompleteFromMldev() { + const toObject = {}; +- if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) { +- throw new Error('outputGcsUri parameter is not supported in Gemini API.'); ++ return toObject; ++} ++function liveServerSetupCompleteFromVertex() { ++ const toObject = {}; ++ return toObject; ++} ++function partFromMldev$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); + } +- if (getValueByPath(fromObject, ['negativePrompt']) !== undefined) { +- throw new Error('negativePrompt parameter is not supported in Gemini API.'); ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', ++ ]); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); + } +- const fromNumberOfImages = getValueByPath(fromObject, [ +- 'numberOfImages', ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', + ]); +- if (parentObject !== undefined && fromNumberOfImages != null) { +- setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfImages); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); + } +- const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']); +- if (parentObject !== undefined && fromAspectRatio != null) { +- setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio); ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); + } +- const fromGuidanceScale = getValueByPath(fromObject, [ +- 'guidanceScale', ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); ++ } ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', + ]); +- if (parentObject !== undefined && fromGuidanceScale != null) { +- setValueByPath(parentObject, ['parameters', 'guidanceScale'], fromGuidanceScale); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); + } +- if (getValueByPath(fromObject, ['seed']) !== undefined) { +- throw new Error('seed parameter is not supported in Gemini API.'); ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); + } +- const fromSafetyFilterLevel = getValueByPath(fromObject, [ +- 'safetyFilterLevel', +- ]); +- if (parentObject !== undefined && fromSafetyFilterLevel != null) { +- setValueByPath(parentObject, ['parameters', 'safetySetting'], fromSafetyFilterLevel); ++ const fromText = getValueByPath(fromObject, ['text']); ++ if (fromText != null) { ++ setValueByPath(toObject, ['text'], fromText); + } +- const fromPersonGeneration = getValueByPath(fromObject, [ +- 'personGeneration', ++ return toObject; ++} ++function partFromVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromVideoMetadata = getValueByPath(fromObject, [ ++ 'videoMetadata', + ]); +- if (parentObject !== undefined && fromPersonGeneration != null) { +- setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration); ++ if (fromVideoMetadata != null) { ++ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); + } +- const fromIncludeSafetyAttributes = getValueByPath(fromObject, [ +- 'includeSafetyAttributes', ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); ++ } ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', + ]); +- if (parentObject !== undefined && fromIncludeSafetyAttributes != null) { +- setValueByPath(parentObject, ['parameters', 'includeSafetyAttributes'], fromIncludeSafetyAttributes); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); + } +- const fromIncludeRaiReason = getValueByPath(fromObject, [ +- 'includeRaiReason', ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', + ]); +- if (parentObject !== undefined && fromIncludeRaiReason != null) { +- setValueByPath(parentObject, ['parameters', 'includeRaiReason'], fromIncludeRaiReason); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); + } +- const fromLanguage = getValueByPath(fromObject, ['language']); +- if (parentObject !== undefined && fromLanguage != null) { +- setValueByPath(parentObject, ['parameters', 'language'], fromLanguage); ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); + } +- const fromOutputMimeType = getValueByPath(fromObject, [ +- 'outputMimeType', +- ]); +- if (parentObject !== undefined && fromOutputMimeType != null) { +- setValueByPath(parentObject, ['parameters', 'outputOptions', 'mimeType'], fromOutputMimeType); ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); + } +- const fromOutputCompressionQuality = getValueByPath(fromObject, [ +- 'outputCompressionQuality', ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', + ]); +- if (parentObject !== undefined && fromOutputCompressionQuality != null) { +- setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); + } +- if (getValueByPath(fromObject, ['addWatermark']) !== undefined) { +- throw new Error('addWatermark parameter is not supported in Gemini API.'); ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); + } +- if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) { +- throw new Error('enhancePrompt parameter is not supported in Gemini API.'); ++ const fromText = getValueByPath(fromObject, ['text']); ++ if (fromText != null) { ++ setValueByPath(toObject, ['text'], fromText); + } + return toObject; + } +-function generateImagesParametersToMldev(apiClient, fromObject) { ++function contentFromMldev$1(apiClient, fromObject) { + const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); +- } +- const fromPrompt = getValueByPath(fromObject, ['prompt']); +- if (fromPrompt != null) { +- setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt); ++ const fromParts = getValueByPath(fromObject, ['parts']); ++ if (fromParts != null) { ++ if (Array.isArray(fromParts)) { ++ setValueByPath(toObject, ['parts'], fromParts.map((item) => { ++ return partFromMldev$1(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['parts'], fromParts); ++ } + } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['config'], generateImagesConfigToMldev(apiClient, fromConfig, toObject)); ++ const fromRole = getValueByPath(fromObject, ['role']); ++ if (fromRole != null) { ++ setValueByPath(toObject, ['role'], fromRole); + } + return toObject; + } +-function getModelParametersToMldev(apiClient, fromObject) { ++function contentFromVertex$1(apiClient, fromObject) { + const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'name'], tModel(apiClient, fromModel)); +- } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['config'], fromConfig); ++ const fromParts = getValueByPath(fromObject, ['parts']); ++ if (fromParts != null) { ++ if (Array.isArray(fromParts)) { ++ setValueByPath(toObject, ['parts'], fromParts.map((item) => { ++ return partFromVertex$1(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['parts'], fromParts); ++ } ++ } ++ const fromRole = getValueByPath(fromObject, ['role']); ++ if (fromRole != null) { ++ setValueByPath(toObject, ['role'], fromRole); + } + return toObject; + } +-function countTokensConfigToMldev(apiClient, fromObject) { ++function liveServerContentFromMldev(apiClient, fromObject) { + const toObject = {}; +- if (getValueByPath(fromObject, ['systemInstruction']) !== undefined) { +- throw new Error('systemInstruction parameter is not supported in Gemini API.'); ++ const fromModelTurn = getValueByPath(fromObject, ['modelTurn']); ++ if (fromModelTurn != null) { ++ setValueByPath(toObject, ['modelTurn'], contentFromMldev$1(apiClient, fromModelTurn)); + } +- if (getValueByPath(fromObject, ['tools']) !== undefined) { +- throw new Error('tools parameter is not supported in Gemini API.'); ++ const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']); ++ if (fromTurnComplete != null) { ++ setValueByPath(toObject, ['turnComplete'], fromTurnComplete); + } +- if (getValueByPath(fromObject, ['generationConfig']) !== undefined) { +- throw new Error('generationConfig parameter is not supported in Gemini API.'); ++ const fromInterrupted = getValueByPath(fromObject, ['interrupted']); ++ if (fromInterrupted != null) { ++ setValueByPath(toObject, ['interrupted'], fromInterrupted); ++ } ++ const fromGenerationComplete = getValueByPath(fromObject, [ ++ 'generationComplete', ++ ]); ++ if (fromGenerationComplete != null) { ++ setValueByPath(toObject, ['generationComplete'], fromGenerationComplete); + } + return toObject; + } +-function countTokensParametersToMldev(apiClient, fromObject) { ++function liveServerContentFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); ++ const fromModelTurn = getValueByPath(fromObject, ['modelTurn']); ++ if (fromModelTurn != null) { ++ setValueByPath(toObject, ['modelTurn'], contentFromVertex$1(apiClient, fromModelTurn)); + } +- const fromContents = getValueByPath(fromObject, ['contents']); +- if (fromContents != null) { +- if (Array.isArray(fromContents)) { +- setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToMldev(apiClient, item); +- }))); +- } +- else { +- setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); +- } ++ const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']); ++ if (fromTurnComplete != null) { ++ setValueByPath(toObject, ['turnComplete'], fromTurnComplete); + } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['config'], countTokensConfigToMldev(apiClient, fromConfig)); ++ const fromInterrupted = getValueByPath(fromObject, ['interrupted']); ++ if (fromInterrupted != null) { ++ setValueByPath(toObject, ['interrupted'], fromInterrupted); ++ } ++ const fromGenerationComplete = getValueByPath(fromObject, [ ++ 'generationComplete', ++ ]); ++ if (fromGenerationComplete != null) { ++ setValueByPath(toObject, ['generationComplete'], fromGenerationComplete); + } + return toObject; + } +-function imageToMldev(apiClient, fromObject) { ++function functionCallFromMldev(apiClient, fromObject) { + const toObject = {}; +- if (getValueByPath(fromObject, ['gcsUri']) !== undefined) { +- throw new Error('gcsUri parameter is not supported in Gemini API.'); ++ const fromId = getValueByPath(fromObject, ['id']); ++ if (fromId != null) { ++ setValueByPath(toObject, ['id'], fromId); + } +- const fromImageBytes = getValueByPath(fromObject, ['imageBytes']); +- if (fromImageBytes != null) { +- setValueByPath(toObject, ['bytesBase64Encoded'], tBytes(apiClient, fromImageBytes)); ++ const fromArgs = getValueByPath(fromObject, ['args']); ++ if (fromArgs != null) { ++ setValueByPath(toObject, ['args'], fromArgs); + } +- const fromMimeType = getValueByPath(fromObject, ['mimeType']); +- if (fromMimeType != null) { +- setValueByPath(toObject, ['mimeType'], fromMimeType); ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); + } + return toObject; + } +-function generateVideosConfigToMldev(apiClient, fromObject, parentObject) { ++function functionCallFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromNumberOfVideos = getValueByPath(fromObject, [ +- 'numberOfVideos', +- ]); +- if (parentObject !== undefined && fromNumberOfVideos != null) { +- setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfVideos); +- } +- if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) { +- throw new Error('outputGcsUri parameter is not supported in Gemini API.'); ++ const fromArgs = getValueByPath(fromObject, ['args']); ++ if (fromArgs != null) { ++ setValueByPath(toObject, ['args'], fromArgs); + } +- if (getValueByPath(fromObject, ['fps']) !== undefined) { +- throw new Error('fps parameter is not supported in Gemini API.'); ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); + } +- const fromDurationSeconds = getValueByPath(fromObject, [ +- 'durationSeconds', ++ return toObject; ++} ++function liveServerToolCallFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromFunctionCalls = getValueByPath(fromObject, [ ++ 'functionCalls', + ]); +- if (parentObject !== undefined && fromDurationSeconds != null) { +- setValueByPath(parentObject, ['parameters', 'durationSeconds'], fromDurationSeconds); +- } +- if (getValueByPath(fromObject, ['seed']) !== undefined) { +- throw new Error('seed parameter is not supported in Gemini API.'); +- } +- const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']); +- if (parentObject !== undefined && fromAspectRatio != null) { +- setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio); +- } +- if (getValueByPath(fromObject, ['resolution']) !== undefined) { +- throw new Error('resolution parameter is not supported in Gemini API.'); ++ if (fromFunctionCalls != null) { ++ if (Array.isArray(fromFunctionCalls)) { ++ setValueByPath(toObject, ['functionCalls'], fromFunctionCalls.map((item) => { ++ return functionCallFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['functionCalls'], fromFunctionCalls); ++ } + } +- const fromPersonGeneration = getValueByPath(fromObject, [ +- 'personGeneration', ++ return toObject; ++} ++function liveServerToolCallFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromFunctionCalls = getValueByPath(fromObject, [ ++ 'functionCalls', + ]); +- if (parentObject !== undefined && fromPersonGeneration != null) { +- setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration); +- } +- if (getValueByPath(fromObject, ['pubsubTopic']) !== undefined) { +- throw new Error('pubsubTopic parameter is not supported in Gemini API.'); ++ if (fromFunctionCalls != null) { ++ if (Array.isArray(fromFunctionCalls)) { ++ setValueByPath(toObject, ['functionCalls'], fromFunctionCalls.map((item) => { ++ return functionCallFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['functionCalls'], fromFunctionCalls); ++ } + } +- const fromNegativePrompt = getValueByPath(fromObject, [ +- 'negativePrompt', +- ]); +- if (parentObject !== undefined && fromNegativePrompt != null) { +- setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt); ++ return toObject; ++} ++function liveServerToolCallCancellationFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromIds = getValueByPath(fromObject, ['ids']); ++ if (fromIds != null) { ++ setValueByPath(toObject, ['ids'], fromIds); + } +- if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) { +- throw new Error('enhancePrompt parameter is not supported in Gemini API.'); ++ return toObject; ++} ++function liveServerToolCallCancellationFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromIds = getValueByPath(fromObject, ['ids']); ++ if (fromIds != null) { ++ setValueByPath(toObject, ['ids'], fromIds); + } + return toObject; + } +-function generateVideosParametersToMldev(apiClient, fromObject) { ++function modalityTokenCountFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); ++ const fromModality = getValueByPath(fromObject, ['modality']); ++ if (fromModality != null) { ++ setValueByPath(toObject, ['modality'], fromModality); + } +- const fromPrompt = getValueByPath(fromObject, ['prompt']); +- if (fromPrompt != null) { +- setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt); ++ const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); ++ if (fromTokenCount != null) { ++ setValueByPath(toObject, ['tokenCount'], fromTokenCount); + } +- const fromImage = getValueByPath(fromObject, ['image']); +- if (fromImage != null) { +- setValueByPath(toObject, ['instances[0]', 'image'], imageToMldev(apiClient, fromImage)); ++ return toObject; ++} ++function modalityTokenCountFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromModality = getValueByPath(fromObject, ['modality']); ++ if (fromModality != null) { ++ setValueByPath(toObject, ['modality'], fromModality); + } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['config'], generateVideosConfigToMldev(apiClient, fromConfig, toObject)); ++ const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); ++ if (fromTokenCount != null) { ++ setValueByPath(toObject, ['tokenCount'], fromTokenCount); + } + return toObject; + } +-function partToVertex(apiClient, fromObject) { ++function usageMetadataFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromVideoMetadata = getValueByPath(fromObject, [ +- 'videoMetadata', ++ const fromPromptTokenCount = getValueByPath(fromObject, [ ++ 'promptTokenCount', + ]); +- if (fromVideoMetadata != null) { +- setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); +- } +- const fromThought = getValueByPath(fromObject, ['thought']); +- if (fromThought != null) { +- setValueByPath(toObject, ['thought'], fromThought); ++ if (fromPromptTokenCount != null) { ++ setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount); + } +- const fromCodeExecutionResult = getValueByPath(fromObject, [ +- 'codeExecutionResult', ++ const fromCachedContentTokenCount = getValueByPath(fromObject, [ ++ 'cachedContentTokenCount', + ]); +- if (fromCodeExecutionResult != null) { +- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); ++ if (fromCachedContentTokenCount != null) { ++ setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); + } +- const fromExecutableCode = getValueByPath(fromObject, [ +- 'executableCode', ++ const fromResponseTokenCount = getValueByPath(fromObject, [ ++ 'responseTokenCount', + ]); +- if (fromExecutableCode != null) { +- setValueByPath(toObject, ['executableCode'], fromExecutableCode); ++ if (fromResponseTokenCount != null) { ++ setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount); + } +- const fromFileData = getValueByPath(fromObject, ['fileData']); +- if (fromFileData != null) { +- setValueByPath(toObject, ['fileData'], fromFileData); ++ const fromToolUsePromptTokenCount = getValueByPath(fromObject, [ ++ 'toolUsePromptTokenCount', ++ ]); ++ if (fromToolUsePromptTokenCount != null) { ++ setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount); + } +- const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); +- if (fromFunctionCall != null) { +- setValueByPath(toObject, ['functionCall'], fromFunctionCall); ++ const fromThoughtsTokenCount = getValueByPath(fromObject, [ ++ 'thoughtsTokenCount', ++ ]); ++ if (fromThoughtsTokenCount != null) { ++ setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount); + } +- const fromFunctionResponse = getValueByPath(fromObject, [ +- 'functionResponse', ++ const fromTotalTokenCount = getValueByPath(fromObject, [ ++ 'totalTokenCount', + ]); +- if (fromFunctionResponse != null) { +- setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); ++ if (fromTotalTokenCount != null) { ++ setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount); + } +- const fromInlineData = getValueByPath(fromObject, ['inlineData']); +- if (fromInlineData != null) { +- setValueByPath(toObject, ['inlineData'], fromInlineData); ++ const fromPromptTokensDetails = getValueByPath(fromObject, [ ++ 'promptTokensDetails', ++ ]); ++ if (fromPromptTokensDetails != null) { ++ if (Array.isArray(fromPromptTokensDetails)) { ++ setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails.map((item) => { ++ return modalityTokenCountFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails); ++ } + } +- const fromText = getValueByPath(fromObject, ['text']); ++ const fromCacheTokensDetails = getValueByPath(fromObject, [ ++ 'cacheTokensDetails', ++ ]); ++ if (fromCacheTokensDetails != null) { ++ if (Array.isArray(fromCacheTokensDetails)) { ++ setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails.map((item) => { ++ return modalityTokenCountFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails); ++ } ++ } ++ const fromResponseTokensDetails = getValueByPath(fromObject, [ ++ 'responseTokensDetails', ++ ]); ++ if (fromResponseTokensDetails != null) { ++ if (Array.isArray(fromResponseTokensDetails)) { ++ setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails.map((item) => { ++ return modalityTokenCountFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails); ++ } ++ } ++ const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [ ++ 'toolUsePromptTokensDetails', ++ ]); ++ if (fromToolUsePromptTokensDetails != null) { ++ if (Array.isArray(fromToolUsePromptTokensDetails)) { ++ setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails.map((item) => { ++ return modalityTokenCountFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails); ++ } ++ } ++ return toObject; ++} ++function usageMetadataFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromPromptTokenCount = getValueByPath(fromObject, [ ++ 'promptTokenCount', ++ ]); ++ if (fromPromptTokenCount != null) { ++ setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount); ++ } ++ const fromCachedContentTokenCount = getValueByPath(fromObject, [ ++ 'cachedContentTokenCount', ++ ]); ++ if (fromCachedContentTokenCount != null) { ++ setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); ++ } ++ const fromResponseTokenCount = getValueByPath(fromObject, [ ++ 'candidatesTokenCount', ++ ]); ++ if (fromResponseTokenCount != null) { ++ setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount); ++ } ++ const fromToolUsePromptTokenCount = getValueByPath(fromObject, [ ++ 'toolUsePromptTokenCount', ++ ]); ++ if (fromToolUsePromptTokenCount != null) { ++ setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount); ++ } ++ const fromThoughtsTokenCount = getValueByPath(fromObject, [ ++ 'thoughtsTokenCount', ++ ]); ++ if (fromThoughtsTokenCount != null) { ++ setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount); ++ } ++ const fromTotalTokenCount = getValueByPath(fromObject, [ ++ 'totalTokenCount', ++ ]); ++ if (fromTotalTokenCount != null) { ++ setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount); ++ } ++ const fromPromptTokensDetails = getValueByPath(fromObject, [ ++ 'promptTokensDetails', ++ ]); ++ if (fromPromptTokensDetails != null) { ++ if (Array.isArray(fromPromptTokensDetails)) { ++ setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails.map((item) => { ++ return modalityTokenCountFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails); ++ } ++ } ++ const fromCacheTokensDetails = getValueByPath(fromObject, [ ++ 'cacheTokensDetails', ++ ]); ++ if (fromCacheTokensDetails != null) { ++ if (Array.isArray(fromCacheTokensDetails)) { ++ setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails.map((item) => { ++ return modalityTokenCountFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails); ++ } ++ } ++ const fromResponseTokensDetails = getValueByPath(fromObject, [ ++ 'candidatesTokensDetails', ++ ]); ++ if (fromResponseTokensDetails != null) { ++ if (Array.isArray(fromResponseTokensDetails)) { ++ setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails.map((item) => { ++ return modalityTokenCountFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails); ++ } ++ } ++ const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [ ++ 'toolUsePromptTokensDetails', ++ ]); ++ if (fromToolUsePromptTokensDetails != null) { ++ if (Array.isArray(fromToolUsePromptTokensDetails)) { ++ setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails.map((item) => { ++ return modalityTokenCountFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails); ++ } ++ } ++ const fromTrafficType = getValueByPath(fromObject, ['trafficType']); ++ if (fromTrafficType != null) { ++ setValueByPath(toObject, ['trafficType'], fromTrafficType); ++ } ++ return toObject; ++} ++function liveServerGoAwayFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']); ++ if (fromTimeLeft != null) { ++ setValueByPath(toObject, ['timeLeft'], fromTimeLeft); ++ } ++ return toObject; ++} ++function liveServerGoAwayFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']); ++ if (fromTimeLeft != null) { ++ setValueByPath(toObject, ['timeLeft'], fromTimeLeft); ++ } ++ return toObject; ++} ++function liveServerSessionResumptionUpdateFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromNewHandle = getValueByPath(fromObject, ['newHandle']); ++ if (fromNewHandle != null) { ++ setValueByPath(toObject, ['newHandle'], fromNewHandle); ++ } ++ const fromResumable = getValueByPath(fromObject, ['resumable']); ++ if (fromResumable != null) { ++ setValueByPath(toObject, ['resumable'], fromResumable); ++ } ++ const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [ ++ 'lastConsumedClientMessageIndex', ++ ]); ++ if (fromLastConsumedClientMessageIndex != null) { ++ setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex); ++ } ++ return toObject; ++} ++function liveServerSessionResumptionUpdateFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromNewHandle = getValueByPath(fromObject, ['newHandle']); ++ if (fromNewHandle != null) { ++ setValueByPath(toObject, ['newHandle'], fromNewHandle); ++ } ++ const fromResumable = getValueByPath(fromObject, ['resumable']); ++ if (fromResumable != null) { ++ setValueByPath(toObject, ['resumable'], fromResumable); ++ } ++ const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [ ++ 'lastConsumedClientMessageIndex', ++ ]); ++ if (fromLastConsumedClientMessageIndex != null) { ++ setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex); ++ } ++ return toObject; ++} ++function liveServerMessageFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromSetupComplete = getValueByPath(fromObject, [ ++ 'setupComplete', ++ ]); ++ if (fromSetupComplete != null) { ++ setValueByPath(toObject, ['setupComplete'], liveServerSetupCompleteFromMldev()); ++ } ++ const fromServerContent = getValueByPath(fromObject, [ ++ 'serverContent', ++ ]); ++ if (fromServerContent != null) { ++ setValueByPath(toObject, ['serverContent'], liveServerContentFromMldev(apiClient, fromServerContent)); ++ } ++ const fromToolCall = getValueByPath(fromObject, ['toolCall']); ++ if (fromToolCall != null) { ++ setValueByPath(toObject, ['toolCall'], liveServerToolCallFromMldev(apiClient, fromToolCall)); ++ } ++ const fromToolCallCancellation = getValueByPath(fromObject, [ ++ 'toolCallCancellation', ++ ]); ++ if (fromToolCallCancellation != null) { ++ setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromMldev(apiClient, fromToolCallCancellation)); ++ } ++ const fromUsageMetadata = getValueByPath(fromObject, [ ++ 'usageMetadata', ++ ]); ++ if (fromUsageMetadata != null) { ++ setValueByPath(toObject, ['usageMetadata'], usageMetadataFromMldev(apiClient, fromUsageMetadata)); ++ } ++ const fromGoAway = getValueByPath(fromObject, ['goAway']); ++ if (fromGoAway != null) { ++ setValueByPath(toObject, ['goAway'], liveServerGoAwayFromMldev(apiClient, fromGoAway)); ++ } ++ const fromSessionResumptionUpdate = getValueByPath(fromObject, [ ++ 'sessionResumptionUpdate', ++ ]); ++ if (fromSessionResumptionUpdate != null) { ++ setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromMldev(apiClient, fromSessionResumptionUpdate)); ++ } ++ return toObject; ++} ++function liveServerMessageFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromSetupComplete = getValueByPath(fromObject, [ ++ 'setupComplete', ++ ]); ++ if (fromSetupComplete != null) { ++ setValueByPath(toObject, ['setupComplete'], liveServerSetupCompleteFromVertex()); ++ } ++ const fromServerContent = getValueByPath(fromObject, [ ++ 'serverContent', ++ ]); ++ if (fromServerContent != null) { ++ setValueByPath(toObject, ['serverContent'], liveServerContentFromVertex(apiClient, fromServerContent)); ++ } ++ const fromToolCall = getValueByPath(fromObject, ['toolCall']); ++ if (fromToolCall != null) { ++ setValueByPath(toObject, ['toolCall'], liveServerToolCallFromVertex(apiClient, fromToolCall)); ++ } ++ const fromToolCallCancellation = getValueByPath(fromObject, [ ++ 'toolCallCancellation', ++ ]); ++ if (fromToolCallCancellation != null) { ++ setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromVertex(apiClient, fromToolCallCancellation)); ++ } ++ const fromUsageMetadata = getValueByPath(fromObject, [ ++ 'usageMetadata', ++ ]); ++ if (fromUsageMetadata != null) { ++ setValueByPath(toObject, ['usageMetadata'], usageMetadataFromVertex(apiClient, fromUsageMetadata)); ++ } ++ const fromGoAway = getValueByPath(fromObject, ['goAway']); ++ if (fromGoAway != null) { ++ setValueByPath(toObject, ['goAway'], liveServerGoAwayFromVertex(apiClient, fromGoAway)); ++ } ++ const fromSessionResumptionUpdate = getValueByPath(fromObject, [ ++ 'sessionResumptionUpdate', ++ ]); ++ if (fromSessionResumptionUpdate != null) { ++ setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromVertex(apiClient, fromSessionResumptionUpdate)); ++ } ++ return toObject; ++} ++ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++function partToMldev(apiClient, fromObject) { ++ const toObject = {}; ++ if (getValueByPath(fromObject, ['videoMetadata']) !== undefined) { ++ throw new Error('videoMetadata parameter is not supported in Gemini API.'); ++ } ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); ++ } ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', ++ ]); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); ++ } ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', ++ ]); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); ++ } ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); ++ } ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); ++ } ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', ++ ]); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); ++ } ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); ++ } ++ const fromText = getValueByPath(fromObject, ['text']); + if (fromText != null) { + setValueByPath(toObject, ['text'], fromText); + } + return toObject; + } +-function contentToVertex(apiClient, fromObject) { ++function contentToMldev(apiClient, fromObject) { + const toObject = {}; + const fromParts = getValueByPath(fromObject, ['parts']); + if (fromParts != null) { + if (Array.isArray(fromParts)) { + setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partToVertex(apiClient, item); ++ return partToMldev(apiClient, item); + })); + } + else { +@@ -4197,39 +4720,28 @@ function contentToVertex(apiClient, fromObject) { + } + return toObject; + } +-function schemaToVertex(apiClient, fromObject) { ++function schemaToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromExample = getValueByPath(fromObject, ['example']); +- if (fromExample != null) { +- setValueByPath(toObject, ['example'], fromExample); ++ if (getValueByPath(fromObject, ['example']) !== undefined) { ++ throw new Error('example parameter is not supported in Gemini API.'); + } +- const fromPattern = getValueByPath(fromObject, ['pattern']); +- if (fromPattern != null) { +- setValueByPath(toObject, ['pattern'], fromPattern); ++ if (getValueByPath(fromObject, ['pattern']) !== undefined) { ++ throw new Error('pattern parameter is not supported in Gemini API.'); + } +- const fromDefault = getValueByPath(fromObject, ['default']); +- if (fromDefault != null) { +- setValueByPath(toObject, ['default'], fromDefault); ++ if (getValueByPath(fromObject, ['default']) !== undefined) { ++ throw new Error('default parameter is not supported in Gemini API.'); + } +- const fromMaxLength = getValueByPath(fromObject, ['maxLength']); +- if (fromMaxLength != null) { +- setValueByPath(toObject, ['maxLength'], fromMaxLength); ++ if (getValueByPath(fromObject, ['maxLength']) !== undefined) { ++ throw new Error('maxLength parameter is not supported in Gemini API.'); + } +- const fromMinLength = getValueByPath(fromObject, ['minLength']); +- if (fromMinLength != null) { +- setValueByPath(toObject, ['minLength'], fromMinLength); ++ if (getValueByPath(fromObject, ['minLength']) !== undefined) { ++ throw new Error('minLength parameter is not supported in Gemini API.'); + } +- const fromMinProperties = getValueByPath(fromObject, [ +- 'minProperties', +- ]); +- if (fromMinProperties != null) { +- setValueByPath(toObject, ['minProperties'], fromMinProperties); ++ if (getValueByPath(fromObject, ['minProperties']) !== undefined) { ++ throw new Error('minProperties parameter is not supported in Gemini API.'); + } +- const fromMaxProperties = getValueByPath(fromObject, [ +- 'maxProperties', +- ]); +- if (fromMaxProperties != null) { +- setValueByPath(toObject, ['maxProperties'], fromMaxProperties); ++ if (getValueByPath(fromObject, ['maxProperties']) !== undefined) { ++ throw new Error('maxProperties parameter is not supported in Gemini API.'); + } + const fromAnyOf = getValueByPath(fromObject, ['anyOf']); + if (fromAnyOf != null) { +@@ -4295,11 +4807,10 @@ function schemaToVertex(apiClient, fromObject) { + } + return toObject; + } +-function safetySettingToVertex(apiClient, fromObject) { ++function safetySettingToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromMethod = getValueByPath(fromObject, ['method']); +- if (fromMethod != null) { +- setValueByPath(toObject, ['method'], fromMethod); ++ if (getValueByPath(fromObject, ['method']) !== undefined) { ++ throw new Error('method parameter is not supported in Gemini API.'); + } + const fromCategory = getValueByPath(fromObject, ['category']); + if (fromCategory != null) { +@@ -4311,11 +4822,10 @@ function safetySettingToVertex(apiClient, fromObject) { + } + return toObject; + } +-function functionDeclarationToVertex(apiClient, fromObject) { ++function functionDeclarationToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromResponse = getValueByPath(fromObject, ['response']); +- if (fromResponse != null) { +- setValueByPath(toObject, ['response'], schemaToVertex(apiClient, fromResponse)); ++ if (getValueByPath(fromObject, ['response']) !== undefined) { ++ throw new Error('response parameter is not supported in Gemini API.'); + } + const fromDescription = getValueByPath(fromObject, ['description']); + if (fromDescription != null) { +@@ -4331,11 +4841,11 @@ function functionDeclarationToVertex(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchToVertex() { ++function googleSearchToMldev() { + const toObject = {}; + return toObject; + } +-function dynamicRetrievalConfigToVertex(apiClient, fromObject) { ++function dynamicRetrievalConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromMode = getValueByPath(fromObject, ['mode']); + if (fromMode != null) { +@@ -4349,17 +4859,17 @@ function dynamicRetrievalConfigToVertex(apiClient, fromObject) { + } + return toObject; + } +-function googleSearchRetrievalToVertex(apiClient, fromObject) { ++function googleSearchRetrievalToMldev(apiClient, fromObject) { + const toObject = {}; + const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ + 'dynamicRetrievalConfig', + ]); + if (fromDynamicRetrievalConfig != null) { +- setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig)); ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig)); + } + return toObject; + } +-function toolToVertex(apiClient, fromObject) { ++function toolToMldev(apiClient, fromObject) { + const toObject = {}; + const fromFunctionDeclarations = getValueByPath(fromObject, [ + 'functionDeclarations', +@@ -4367,26 +4877,25 @@ function toolToVertex(apiClient, fromObject) { + if (fromFunctionDeclarations != null) { + if (Array.isArray(fromFunctionDeclarations)) { + setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { +- return functionDeclarationToVertex(apiClient, item); ++ return functionDeclarationToMldev(apiClient, item); + })); + } + else { + setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations); + } + } +- const fromRetrieval = getValueByPath(fromObject, ['retrieval']); +- if (fromRetrieval != null) { +- setValueByPath(toObject, ['retrieval'], fromRetrieval); ++ if (getValueByPath(fromObject, ['retrieval']) !== undefined) { ++ throw new Error('retrieval parameter is not supported in Gemini API.'); + } + const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); + if (fromGoogleSearch != null) { +- setValueByPath(toObject, ['googleSearch'], googleSearchToVertex()); ++ setValueByPath(toObject, ['googleSearch'], googleSearchToMldev()); + } + const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ + 'googleSearchRetrieval', + ]); + if (fromGoogleSearchRetrieval != null) { +- setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval)); ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval)); + } + const fromCodeExecution = getValueByPath(fromObject, [ + 'codeExecution', +@@ -4396,7 +4905,7 @@ function toolToVertex(apiClient, fromObject) { + } + return toObject; + } +-function functionCallingConfigToVertex(apiClient, fromObject) { ++function functionCallingConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromMode = getValueByPath(fromObject, ['mode']); + if (fromMode != null) { +@@ -4410,17 +4919,17 @@ function functionCallingConfigToVertex(apiClient, fromObject) { + } + return toObject; + } +-function toolConfigToVertex(apiClient, fromObject) { ++function toolConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromFunctionCallingConfig = getValueByPath(fromObject, [ + 'functionCallingConfig', + ]); + if (fromFunctionCallingConfig != null) { +- setValueByPath(toObject, ['functionCallingConfig'], functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig)); ++ setValueByPath(toObject, ['functionCallingConfig'], functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig)); + } + return toObject; + } +-function prebuiltVoiceConfigToVertex(apiClient, fromObject) { ++function prebuiltVoiceConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromVoiceName = getValueByPath(fromObject, ['voiceName']); + if (fromVoiceName != null) { +@@ -4428,25 +4937,29 @@ function prebuiltVoiceConfigToVertex(apiClient, fromObject) { + } + return toObject; + } +-function voiceConfigToVertex(apiClient, fromObject) { ++function voiceConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [ + 'prebuiltVoiceConfig', + ]); + if (fromPrebuiltVoiceConfig != null) { +- setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToVertex(apiClient, fromPrebuiltVoiceConfig)); ++ setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToMldev(apiClient, fromPrebuiltVoiceConfig)); + } + return toObject; + } +-function speechConfigToVertex(apiClient, fromObject) { ++function speechConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']); + if (fromVoiceConfig != null) { +- setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(apiClient, fromVoiceConfig)); ++ setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev(apiClient, fromVoiceConfig)); ++ } ++ const fromLanguageCode = getValueByPath(fromObject, ['languageCode']); ++ if (fromLanguageCode != null) { ++ setValueByPath(toObject, ['languageCode'], fromLanguageCode); + } + return toObject; + } +-function thinkingConfigToVertex(apiClient, fromObject) { ++function thinkingConfigToMldev(apiClient, fromObject) { + const toObject = {}; + const fromIncludeThoughts = getValueByPath(fromObject, [ + 'includeThoughts', +@@ -4462,13 +4975,13 @@ function thinkingConfigToVertex(apiClient, fromObject) { + } + return toObject; + } +-function generateContentConfigToVertex(apiClient, fromObject, parentObject) { ++function generateContentConfigToMldev(apiClient, fromObject, parentObject) { + const toObject = {}; + const fromSystemInstruction = getValueByPath(fromObject, [ + 'systemInstruction', + ]); + if (parentObject !== undefined && fromSystemInstruction != null) { +- setValueByPath(parentObject, ['systemInstruction'], contentToVertex(apiClient, tContent(apiClient, fromSystemInstruction))); ++ setValueByPath(parentObject, ['systemInstruction'], contentToMldev(apiClient, tContent(apiClient, fromSystemInstruction))); + } + const fromTemperature = getValueByPath(fromObject, ['temperature']); + if (fromTemperature != null) { +@@ -4536,13 +5049,13 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + 'responseSchema', + ]); + if (fromResponseSchema != null) { +- setValueByPath(toObject, ['responseSchema'], schemaToVertex(apiClient, tSchema(apiClient, fromResponseSchema))); ++ setValueByPath(toObject, ['responseSchema'], schemaToMldev(apiClient, tSchema(apiClient, fromResponseSchema))); + } +- const fromRoutingConfig = getValueByPath(fromObject, [ +- 'routingConfig', +- ]); +- if (fromRoutingConfig != null) { +- setValueByPath(toObject, ['routingConfig'], fromRoutingConfig); ++ if (getValueByPath(fromObject, ['routingConfig']) !== undefined) { ++ throw new Error('routingConfig parameter is not supported in Gemini API.'); ++ } ++ if (getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined) { ++ throw new Error('modelSelectionConfig parameter is not supported in Gemini API.'); + } + const fromSafetySettings = getValueByPath(fromObject, [ + 'safetySettings', +@@ -4550,7 +5063,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromSafetySettings != null) { + if (Array.isArray(fromSafetySettings)) { + setValueByPath(parentObject, ['safetySettings'], fromSafetySettings.map((item) => { +- return safetySettingToVertex(apiClient, item); ++ return safetySettingToMldev(apiClient, item); + })); + } + else { +@@ -4561,7 +5074,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromTools != null) { + if (Array.isArray(fromTools)) { + setValueByPath(parentObject, ['tools'], tTools(apiClient, tTools(apiClient, fromTools).map((item) => { +- return toolToVertex(apiClient, tTool(apiClient, item)); ++ return toolToMldev(apiClient, tTool(apiClient, item)); + }))); + } + else { +@@ -4570,11 +5083,10 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + } + const fromToolConfig = getValueByPath(fromObject, ['toolConfig']); + if (parentObject !== undefined && fromToolConfig != null) { +- setValueByPath(parentObject, ['toolConfig'], toolConfigToVertex(apiClient, fromToolConfig)); ++ setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev(apiClient, fromToolConfig)); + } +- const fromLabels = getValueByPath(fromObject, ['labels']); +- if (parentObject !== undefined && fromLabels != null) { +- setValueByPath(parentObject, ['labels'], fromLabels); ++ if (getValueByPath(fromObject, ['labels']) !== undefined) { ++ throw new Error('labels parameter is not supported in Gemini API.'); + } + const fromCachedContent = getValueByPath(fromObject, [ + 'cachedContent', +@@ -4596,23 +5108,20 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + } + const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); + if (fromSpeechConfig != null) { +- setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(apiClient, tSpeechConfig(apiClient, fromSpeechConfig))); ++ setValueByPath(toObject, ['speechConfig'], speechConfigToMldev(apiClient, tSpeechConfig(apiClient, fromSpeechConfig))); + } +- const fromAudioTimestamp = getValueByPath(fromObject, [ +- 'audioTimestamp', +- ]); +- if (fromAudioTimestamp != null) { +- setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp); ++ if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) { ++ throw new Error('audioTimestamp parameter is not supported in Gemini API.'); + } + const fromThinkingConfig = getValueByPath(fromObject, [ + 'thinkingConfig', + ]); + if (fromThinkingConfig != null) { +- setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToVertex(apiClient, fromThinkingConfig)); ++ setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev(apiClient, fromThinkingConfig)); + } + return toObject; + } +-function generateContentParametersToVertex(apiClient, fromObject) { ++function generateContentParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -4622,7 +5131,7 @@ function generateContentParametersToVertex(apiClient, fromObject) { + if (fromContents != null) { + if (Array.isArray(fromContents)) { + setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToVertex(apiClient, item); ++ return contentToMldev(apiClient, item); + }))); + } + else { +@@ -4631,37 +5140,35 @@ function generateContentParametersToVertex(apiClient, fromObject) { + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['generationConfig'], generateContentConfigToVertex(apiClient, fromConfig, toObject)); ++ setValueByPath(toObject, ['generationConfig'], generateContentConfigToMldev(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function embedContentConfigToVertex(apiClient, fromObject, parentObject) { ++function embedContentConfigToMldev(apiClient, fromObject, parentObject) { + const toObject = {}; + const fromTaskType = getValueByPath(fromObject, ['taskType']); + if (parentObject !== undefined && fromTaskType != null) { +- setValueByPath(parentObject, ['instances[]', 'task_type'], fromTaskType); ++ setValueByPath(parentObject, ['requests[]', 'taskType'], fromTaskType); + } + const fromTitle = getValueByPath(fromObject, ['title']); + if (parentObject !== undefined && fromTitle != null) { +- setValueByPath(parentObject, ['instances[]', 'title'], fromTitle); ++ setValueByPath(parentObject, ['requests[]', 'title'], fromTitle); + } + const fromOutputDimensionality = getValueByPath(fromObject, [ + 'outputDimensionality', + ]); + if (parentObject !== undefined && fromOutputDimensionality != null) { +- setValueByPath(parentObject, ['parameters', 'outputDimensionality'], fromOutputDimensionality); ++ setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality); + } +- const fromMimeType = getValueByPath(fromObject, ['mimeType']); +- if (parentObject !== undefined && fromMimeType != null) { +- setValueByPath(parentObject, ['instances[]', 'mimeType'], fromMimeType); ++ if (getValueByPath(fromObject, ['mimeType']) !== undefined) { ++ throw new Error('mimeType parameter is not supported in Gemini API.'); + } +- const fromAutoTruncate = getValueByPath(fromObject, ['autoTruncate']); +- if (parentObject !== undefined && fromAutoTruncate != null) { +- setValueByPath(parentObject, ['parameters', 'autoTruncate'], fromAutoTruncate); ++ if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) { ++ throw new Error('autoTruncate parameter is not supported in Gemini API.'); + } + return toObject; + } +-function embedContentParametersToVertex(apiClient, fromObject) { ++function embedContentParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -4669,25 +5176,25 @@ function embedContentParametersToVertex(apiClient, fromObject) { + } + const fromContents = getValueByPath(fromObject, ['contents']); + if (fromContents != null) { +- setValueByPath(toObject, ['instances[]', 'content'], tContentsForEmbed(apiClient, fromContents)); ++ setValueByPath(toObject, ['requests[]', 'content'], tContentsForEmbed(apiClient, fromContents)); + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['config'], embedContentConfigToVertex(apiClient, fromConfig, toObject)); ++ setValueByPath(toObject, ['config'], embedContentConfigToMldev(apiClient, fromConfig, toObject)); ++ } ++ const fromModelForEmbedContent = getValueByPath(fromObject, ['model']); ++ if (fromModelForEmbedContent !== undefined) { ++ setValueByPath(toObject, ['requests[]', 'model'], tModel(apiClient, fromModelForEmbedContent)); + } + return toObject; + } +-function generateImagesConfigToVertex(apiClient, fromObject, parentObject) { ++function generateImagesConfigToMldev(apiClient, fromObject, parentObject) { + const toObject = {}; +- const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']); +- if (parentObject !== undefined && fromOutputGcsUri != null) { +- setValueByPath(parentObject, ['parameters', 'storageUri'], fromOutputGcsUri); ++ if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) { ++ throw new Error('outputGcsUri parameter is not supported in Gemini API.'); + } +- const fromNegativePrompt = getValueByPath(fromObject, [ +- 'negativePrompt', +- ]); +- if (parentObject !== undefined && fromNegativePrompt != null) { +- setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt); ++ if (getValueByPath(fromObject, ['negativePrompt']) !== undefined) { ++ throw new Error('negativePrompt parameter is not supported in Gemini API.'); + } + const fromNumberOfImages = getValueByPath(fromObject, [ + 'numberOfImages', +@@ -4705,9 +5212,8 @@ function generateImagesConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromGuidanceScale != null) { + setValueByPath(parentObject, ['parameters', 'guidanceScale'], fromGuidanceScale); + } +- const fromSeed = getValueByPath(fromObject, ['seed']); +- if (parentObject !== undefined && fromSeed != null) { +- setValueByPath(parentObject, ['parameters', 'seed'], fromSeed); ++ if (getValueByPath(fromObject, ['seed']) !== undefined) { ++ throw new Error('seed parameter is not supported in Gemini API.'); + } + const fromSafetyFilterLevel = getValueByPath(fromObject, [ + 'safetyFilterLevel', +@@ -4749,19 +5255,15 @@ function generateImagesConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromOutputCompressionQuality != null) { + setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality); + } +- const fromAddWatermark = getValueByPath(fromObject, ['addWatermark']); +- if (parentObject !== undefined && fromAddWatermark != null) { +- setValueByPath(parentObject, ['parameters', 'addWatermark'], fromAddWatermark); ++ if (getValueByPath(fromObject, ['addWatermark']) !== undefined) { ++ throw new Error('addWatermark parameter is not supported in Gemini API.'); + } +- const fromEnhancePrompt = getValueByPath(fromObject, [ +- 'enhancePrompt', +- ]); +- if (parentObject !== undefined && fromEnhancePrompt != null) { +- setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt); ++ if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) { ++ throw new Error('enhancePrompt parameter is not supported in Gemini API.'); + } + return toObject; + } +-function generateImagesParametersToVertex(apiClient, fromObject) { ++function generateImagesParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -4773,11 +5275,11 @@ function generateImagesParametersToVertex(apiClient, fromObject) { + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['config'], generateImagesConfigToVertex(apiClient, fromConfig, toObject)); ++ setValueByPath(toObject, ['config'], generateImagesConfigToMldev(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function getModelParametersToVertex(apiClient, fromObject) { ++function getModelParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -4789,57 +5291,20 @@ function getModelParametersToVertex(apiClient, fromObject) { + } + return toObject; + } +-function countTokensConfigToVertex(apiClient, fromObject, parentObject) { +- const toObject = {}; +- const fromSystemInstruction = getValueByPath(fromObject, [ +- 'systemInstruction', +- ]); +- if (parentObject !== undefined && fromSystemInstruction != null) { +- setValueByPath(parentObject, ['systemInstruction'], contentToVertex(apiClient, tContent(apiClient, fromSystemInstruction))); +- } +- const fromTools = getValueByPath(fromObject, ['tools']); +- if (parentObject !== undefined && fromTools != null) { +- if (Array.isArray(fromTools)) { +- setValueByPath(parentObject, ['tools'], fromTools.map((item) => { +- return toolToVertex(apiClient, item); +- })); +- } +- else { +- setValueByPath(parentObject, ['tools'], fromTools); +- } +- } +- const fromGenerationConfig = getValueByPath(fromObject, [ +- 'generationConfig', +- ]); +- if (parentObject !== undefined && fromGenerationConfig != null) { +- setValueByPath(parentObject, ['generationConfig'], fromGenerationConfig); +- } +- return toObject; +-} +-function countTokensParametersToVertex(apiClient, fromObject) { ++function countTokensConfigToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel != null) { +- setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); ++ if (getValueByPath(fromObject, ['systemInstruction']) !== undefined) { ++ throw new Error('systemInstruction parameter is not supported in Gemini API.'); + } +- const fromContents = getValueByPath(fromObject, ['contents']); +- if (fromContents != null) { +- if (Array.isArray(fromContents)) { +- setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToVertex(apiClient, item); +- }))); +- } +- else { +- setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); +- } ++ if (getValueByPath(fromObject, ['tools']) !== undefined) { ++ throw new Error('tools parameter is not supported in Gemini API.'); + } +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig != null) { +- setValueByPath(toObject, ['config'], countTokensConfigToVertex(apiClient, fromConfig, toObject)); ++ if (getValueByPath(fromObject, ['generationConfig']) !== undefined) { ++ throw new Error('generationConfig parameter is not supported in Gemini API.'); + } + return toObject; + } +-function computeTokensParametersToVertex(apiClient, fromObject) { ++function countTokensParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -4849,7 +5314,7 @@ function computeTokensParametersToVertex(apiClient, fromObject) { + if (fromContents != null) { + if (Array.isArray(fromContents)) { + setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { +- return contentToVertex(apiClient, item); ++ return contentToMldev(apiClient, item); + }))); + } + else { +@@ -4858,15 +5323,14 @@ function computeTokensParametersToVertex(apiClient, fromObject) { + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['config'], fromConfig); ++ setValueByPath(toObject, ['config'], countTokensConfigToMldev(apiClient, fromConfig)); + } + return toObject; + } +-function imageToVertex(apiClient, fromObject) { ++function imageToMldev(apiClient, fromObject) { + const toObject = {}; +- const fromGcsUri = getValueByPath(fromObject, ['gcsUri']); +- if (fromGcsUri != null) { +- setValueByPath(toObject, ['gcsUri'], fromGcsUri); ++ if (getValueByPath(fromObject, ['gcsUri']) !== undefined) { ++ throw new Error('gcsUri parameter is not supported in Gemini API.'); + } + const fromImageBytes = getValueByPath(fromObject, ['imageBytes']); + if (fromImageBytes != null) { +@@ -4878,7 +5342,7 @@ function imageToVertex(apiClient, fromObject) { + } + return toObject; + } +-function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { ++function generateVideosConfigToMldev(apiClient, fromObject, parentObject) { + const toObject = {}; + const fromNumberOfVideos = getValueByPath(fromObject, [ + 'numberOfVideos', +@@ -4886,13 +5350,11 @@ function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromNumberOfVideos != null) { + setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfVideos); + } +- const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']); +- if (parentObject !== undefined && fromOutputGcsUri != null) { +- setValueByPath(parentObject, ['parameters', 'storageUri'], fromOutputGcsUri); ++ if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) { ++ throw new Error('outputGcsUri parameter is not supported in Gemini API.'); + } +- const fromFps = getValueByPath(fromObject, ['fps']); +- if (parentObject !== undefined && fromFps != null) { +- setValueByPath(parentObject, ['parameters', 'fps'], fromFps); ++ if (getValueByPath(fromObject, ['fps']) !== undefined) { ++ throw new Error('fps parameter is not supported in Gemini API.'); + } + const fromDurationSeconds = getValueByPath(fromObject, [ + 'durationSeconds', +@@ -4900,17 +5362,15 @@ function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromDurationSeconds != null) { + setValueByPath(parentObject, ['parameters', 'durationSeconds'], fromDurationSeconds); + } +- const fromSeed = getValueByPath(fromObject, ['seed']); +- if (parentObject !== undefined && fromSeed != null) { +- setValueByPath(parentObject, ['parameters', 'seed'], fromSeed); ++ if (getValueByPath(fromObject, ['seed']) !== undefined) { ++ throw new Error('seed parameter is not supported in Gemini API.'); + } + const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']); + if (parentObject !== undefined && fromAspectRatio != null) { + setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio); + } +- const fromResolution = getValueByPath(fromObject, ['resolution']); +- if (parentObject !== undefined && fromResolution != null) { +- setValueByPath(parentObject, ['parameters', 'resolution'], fromResolution); ++ if (getValueByPath(fromObject, ['resolution']) !== undefined) { ++ throw new Error('resolution parameter is not supported in Gemini API.'); + } + const fromPersonGeneration = getValueByPath(fromObject, [ + 'personGeneration', +@@ -4918,9 +5378,8 @@ function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromPersonGeneration != null) { + setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration); + } +- const fromPubsubTopic = getValueByPath(fromObject, ['pubsubTopic']); +- if (parentObject !== undefined && fromPubsubTopic != null) { +- setValueByPath(parentObject, ['parameters', 'pubsubTopic'], fromPubsubTopic); ++ if (getValueByPath(fromObject, ['pubsubTopic']) !== undefined) { ++ throw new Error('pubsubTopic parameter is not supported in Gemini API.'); + } + const fromNegativePrompt = getValueByPath(fromObject, [ + 'negativePrompt', +@@ -4928,15 +5387,12 @@ function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { + if (parentObject !== undefined && fromNegativePrompt != null) { + setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt); + } +- const fromEnhancePrompt = getValueByPath(fromObject, [ +- 'enhancePrompt', +- ]); +- if (parentObject !== undefined && fromEnhancePrompt != null) { +- setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt); ++ if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) { ++ throw new Error('enhancePrompt parameter is not supported in Gemini API.'); + } + return toObject; + } +-function generateVideosParametersToVertex(apiClient, fromObject) { ++function generateVideosParametersToMldev(apiClient, fromObject) { + const toObject = {}; + const fromModel = getValueByPath(fromObject, ['model']); + if (fromModel != null) { +@@ -4948,16 +5404,22 @@ function generateVideosParametersToVertex(apiClient, fromObject) { + } + const fromImage = getValueByPath(fromObject, ['image']); + if (fromImage != null) { +- setValueByPath(toObject, ['instances[0]', 'image'], imageToVertex(apiClient, fromImage)); ++ setValueByPath(toObject, ['instances[0]', 'image'], imageToMldev(apiClient, fromImage)); + } + const fromConfig = getValueByPath(fromObject, ['config']); + if (fromConfig != null) { +- setValueByPath(toObject, ['config'], generateVideosConfigToVertex(apiClient, fromConfig, toObject)); ++ setValueByPath(toObject, ['config'], generateVideosConfigToMldev(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function partFromMldev(apiClient, fromObject) { ++function partToVertex(apiClient, fromObject) { + const toObject = {}; ++ const fromVideoMetadata = getValueByPath(fromObject, [ ++ 'videoMetadata', ++ ]); ++ if (fromVideoMetadata != null) { ++ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); ++ } + const fromThought = getValueByPath(fromObject, ['thought']); + if (fromThought != null) { + setValueByPath(toObject, ['thought'], fromThought); +@@ -4998,13 +5460,13 @@ function partFromMldev(apiClient, fromObject) { + } + return toObject; + } +-function contentFromMldev(apiClient, fromObject) { ++function contentToVertex(apiClient, fromObject) { + const toObject = {}; + const fromParts = getValueByPath(fromObject, ['parts']); + if (fromParts != null) { + if (Array.isArray(fromParts)) { + setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partFromMldev(apiClient, item); ++ return partToVertex(apiClient, item); + })); + } + else { +@@ -5017,1628 +5479,1663 @@ function contentFromMldev(apiClient, fromObject) { + } + return toObject; + } +-function citationMetadataFromMldev(apiClient, fromObject) { ++function schemaToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromCitations = getValueByPath(fromObject, ['citationSources']); +- if (fromCitations != null) { +- setValueByPath(toObject, ['citations'], fromCitations); ++ const fromExample = getValueByPath(fromObject, ['example']); ++ if (fromExample != null) { ++ setValueByPath(toObject, ['example'], fromExample); + } +- return toObject; +-} +-function candidateFromMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromContent = getValueByPath(fromObject, ['content']); +- if (fromContent != null) { +- setValueByPath(toObject, ['content'], contentFromMldev(apiClient, fromContent)); ++ const fromPattern = getValueByPath(fromObject, ['pattern']); ++ if (fromPattern != null) { ++ setValueByPath(toObject, ['pattern'], fromPattern); + } +- const fromCitationMetadata = getValueByPath(fromObject, [ +- 'citationMetadata', +- ]); +- if (fromCitationMetadata != null) { +- setValueByPath(toObject, ['citationMetadata'], citationMetadataFromMldev(apiClient, fromCitationMetadata)); ++ const fromDefault = getValueByPath(fromObject, ['default']); ++ if (fromDefault != null) { ++ setValueByPath(toObject, ['default'], fromDefault); + } +- const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); +- if (fromTokenCount != null) { +- setValueByPath(toObject, ['tokenCount'], fromTokenCount); ++ const fromMaxLength = getValueByPath(fromObject, ['maxLength']); ++ if (fromMaxLength != null) { ++ setValueByPath(toObject, ['maxLength'], fromMaxLength); + } +- const fromFinishReason = getValueByPath(fromObject, ['finishReason']); +- if (fromFinishReason != null) { +- setValueByPath(toObject, ['finishReason'], fromFinishReason); ++ const fromMinLength = getValueByPath(fromObject, ['minLength']); ++ if (fromMinLength != null) { ++ setValueByPath(toObject, ['minLength'], fromMinLength); + } +- const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']); +- if (fromAvgLogprobs != null) { +- setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs); ++ const fromMinProperties = getValueByPath(fromObject, [ ++ 'minProperties', ++ ]); ++ if (fromMinProperties != null) { ++ setValueByPath(toObject, ['minProperties'], fromMinProperties); + } +- const fromGroundingMetadata = getValueByPath(fromObject, [ +- 'groundingMetadata', ++ const fromMaxProperties = getValueByPath(fromObject, [ ++ 'maxProperties', + ]); +- if (fromGroundingMetadata != null) { +- setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata); ++ if (fromMaxProperties != null) { ++ setValueByPath(toObject, ['maxProperties'], fromMaxProperties); + } +- const fromIndex = getValueByPath(fromObject, ['index']); +- if (fromIndex != null) { +- setValueByPath(toObject, ['index'], fromIndex); ++ const fromAnyOf = getValueByPath(fromObject, ['anyOf']); ++ if (fromAnyOf != null) { ++ setValueByPath(toObject, ['anyOf'], fromAnyOf); + } +- const fromLogprobsResult = getValueByPath(fromObject, [ +- 'logprobsResult', ++ const fromDescription = getValueByPath(fromObject, ['description']); ++ if (fromDescription != null) { ++ setValueByPath(toObject, ['description'], fromDescription); ++ } ++ const fromEnum = getValueByPath(fromObject, ['enum']); ++ if (fromEnum != null) { ++ setValueByPath(toObject, ['enum'], fromEnum); ++ } ++ const fromFormat = getValueByPath(fromObject, ['format']); ++ if (fromFormat != null) { ++ setValueByPath(toObject, ['format'], fromFormat); ++ } ++ const fromItems = getValueByPath(fromObject, ['items']); ++ if (fromItems != null) { ++ setValueByPath(toObject, ['items'], fromItems); ++ } ++ const fromMaxItems = getValueByPath(fromObject, ['maxItems']); ++ if (fromMaxItems != null) { ++ setValueByPath(toObject, ['maxItems'], fromMaxItems); ++ } ++ const fromMaximum = getValueByPath(fromObject, ['maximum']); ++ if (fromMaximum != null) { ++ setValueByPath(toObject, ['maximum'], fromMaximum); ++ } ++ const fromMinItems = getValueByPath(fromObject, ['minItems']); ++ if (fromMinItems != null) { ++ setValueByPath(toObject, ['minItems'], fromMinItems); ++ } ++ const fromMinimum = getValueByPath(fromObject, ['minimum']); ++ if (fromMinimum != null) { ++ setValueByPath(toObject, ['minimum'], fromMinimum); ++ } ++ const fromNullable = getValueByPath(fromObject, ['nullable']); ++ if (fromNullable != null) { ++ setValueByPath(toObject, ['nullable'], fromNullable); ++ } ++ const fromProperties = getValueByPath(fromObject, ['properties']); ++ if (fromProperties != null) { ++ setValueByPath(toObject, ['properties'], fromProperties); ++ } ++ const fromPropertyOrdering = getValueByPath(fromObject, [ ++ 'propertyOrdering', + ]); +- if (fromLogprobsResult != null) { +- setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult); ++ if (fromPropertyOrdering != null) { ++ setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering); + } +- const fromSafetyRatings = getValueByPath(fromObject, [ +- 'safetyRatings', ++ const fromRequired = getValueByPath(fromObject, ['required']); ++ if (fromRequired != null) { ++ setValueByPath(toObject, ['required'], fromRequired); ++ } ++ const fromTitle = getValueByPath(fromObject, ['title']); ++ if (fromTitle != null) { ++ setValueByPath(toObject, ['title'], fromTitle); ++ } ++ const fromType = getValueByPath(fromObject, ['type']); ++ if (fromType != null) { ++ setValueByPath(toObject, ['type'], fromType); ++ } ++ return toObject; ++} ++function modelSelectionConfigToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromFeatureSelectionPreference = getValueByPath(fromObject, [ ++ 'featureSelectionPreference', + ]); +- if (fromSafetyRatings != null) { +- setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings); ++ if (fromFeatureSelectionPreference != null) { ++ setValueByPath(toObject, ['featureSelectionPreference'], fromFeatureSelectionPreference); + } + return toObject; + } +-function generateContentResponseFromMldev(apiClient, fromObject) { ++function safetySettingToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromCandidates = getValueByPath(fromObject, ['candidates']); +- if (fromCandidates != null) { +- if (Array.isArray(fromCandidates)) { +- setValueByPath(toObject, ['candidates'], fromCandidates.map((item) => { +- return candidateFromMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['candidates'], fromCandidates); +- } ++ const fromMethod = getValueByPath(fromObject, ['method']); ++ if (fromMethod != null) { ++ setValueByPath(toObject, ['method'], fromMethod); + } +- const fromModelVersion = getValueByPath(fromObject, ['modelVersion']); +- if (fromModelVersion != null) { +- setValueByPath(toObject, ['modelVersion'], fromModelVersion); ++ const fromCategory = getValueByPath(fromObject, ['category']); ++ if (fromCategory != null) { ++ setValueByPath(toObject, ['category'], fromCategory); + } +- const fromPromptFeedback = getValueByPath(fromObject, [ +- 'promptFeedback', +- ]); +- if (fromPromptFeedback != null) { +- setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback); ++ const fromThreshold = getValueByPath(fromObject, ['threshold']); ++ if (fromThreshold != null) { ++ setValueByPath(toObject, ['threshold'], fromThreshold); + } +- const fromUsageMetadata = getValueByPath(fromObject, [ +- 'usageMetadata', +- ]); +- if (fromUsageMetadata != null) { +- setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata); ++ return toObject; ++} ++function functionDeclarationToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromResponse = getValueByPath(fromObject, ['response']); ++ if (fromResponse != null) { ++ setValueByPath(toObject, ['response'], schemaToVertex(apiClient, fromResponse)); ++ } ++ const fromDescription = getValueByPath(fromObject, ['description']); ++ if (fromDescription != null) { ++ setValueByPath(toObject, ['description'], fromDescription); ++ } ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); ++ } ++ const fromParameters = getValueByPath(fromObject, ['parameters']); ++ if (fromParameters != null) { ++ setValueByPath(toObject, ['parameters'], fromParameters); ++ } ++ return toObject; ++} ++function googleSearchToVertex() { ++ const toObject = {}; ++ return toObject; ++} ++function dynamicRetrievalConfigToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromMode = getValueByPath(fromObject, ['mode']); ++ if (fromMode != null) { ++ setValueByPath(toObject, ['mode'], fromMode); ++ } ++ const fromDynamicThreshold = getValueByPath(fromObject, [ ++ 'dynamicThreshold', ++ ]); ++ if (fromDynamicThreshold != null) { ++ setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold); + } + return toObject; + } +-function contentEmbeddingFromMldev(apiClient, fromObject) { ++function googleSearchRetrievalToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromValues = getValueByPath(fromObject, ['values']); +- if (fromValues != null) { +- setValueByPath(toObject, ['values'], fromValues); ++ const fromDynamicRetrievalConfig = getValueByPath(fromObject, [ ++ 'dynamicRetrievalConfig', ++ ]); ++ if (fromDynamicRetrievalConfig != null) { ++ setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig)); + } + return toObject; + } +-function embedContentMetadataFromMldev() { +- const toObject = {}; +- return toObject; +-} +-function embedContentResponseFromMldev(apiClient, fromObject) { ++function toolToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromEmbeddings = getValueByPath(fromObject, ['embeddings']); +- if (fromEmbeddings != null) { +- if (Array.isArray(fromEmbeddings)) { +- setValueByPath(toObject, ['embeddings'], fromEmbeddings.map((item) => { +- return contentEmbeddingFromMldev(apiClient, item); ++ const fromFunctionDeclarations = getValueByPath(fromObject, [ ++ 'functionDeclarations', ++ ]); ++ if (fromFunctionDeclarations != null) { ++ if (Array.isArray(fromFunctionDeclarations)) { ++ setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations.map((item) => { ++ return functionDeclarationToVertex(apiClient, item); + })); + } + else { +- setValueByPath(toObject, ['embeddings'], fromEmbeddings); ++ setValueByPath(toObject, ['functionDeclarations'], fromFunctionDeclarations); + } + } +- const fromMetadata = getValueByPath(fromObject, ['metadata']); +- if (fromMetadata != null) { +- setValueByPath(toObject, ['metadata'], embedContentMetadataFromMldev()); ++ const fromRetrieval = getValueByPath(fromObject, ['retrieval']); ++ if (fromRetrieval != null) { ++ setValueByPath(toObject, ['retrieval'], fromRetrieval); + } +- return toObject; +-} +-function imageFromMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromImageBytes = getValueByPath(fromObject, [ +- 'bytesBase64Encoded', ++ const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']); ++ if (fromGoogleSearch != null) { ++ setValueByPath(toObject, ['googleSearch'], googleSearchToVertex()); ++ } ++ const fromGoogleSearchRetrieval = getValueByPath(fromObject, [ ++ 'googleSearchRetrieval', + ]); +- if (fromImageBytes != null) { +- setValueByPath(toObject, ['imageBytes'], tBytes(apiClient, fromImageBytes)); ++ if (fromGoogleSearchRetrieval != null) { ++ setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval)); + } +- const fromMimeType = getValueByPath(fromObject, ['mimeType']); +- if (fromMimeType != null) { +- setValueByPath(toObject, ['mimeType'], fromMimeType); ++ const fromCodeExecution = getValueByPath(fromObject, [ ++ 'codeExecution', ++ ]); ++ if (fromCodeExecution != null) { ++ setValueByPath(toObject, ['codeExecution'], fromCodeExecution); + } + return toObject; + } +-function safetyAttributesFromMldev(apiClient, fromObject) { ++function functionCallingConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromCategories = getValueByPath(fromObject, [ +- 'safetyAttributes', +- 'categories', +- ]); +- if (fromCategories != null) { +- setValueByPath(toObject, ['categories'], fromCategories); ++ const fromMode = getValueByPath(fromObject, ['mode']); ++ if (fromMode != null) { ++ setValueByPath(toObject, ['mode'], fromMode); + } +- const fromScores = getValueByPath(fromObject, [ +- 'safetyAttributes', +- 'scores', ++ const fromAllowedFunctionNames = getValueByPath(fromObject, [ ++ 'allowedFunctionNames', + ]); +- if (fromScores != null) { +- setValueByPath(toObject, ['scores'], fromScores); +- } +- const fromContentType = getValueByPath(fromObject, ['contentType']); +- if (fromContentType != null) { +- setValueByPath(toObject, ['contentType'], fromContentType); ++ if (fromAllowedFunctionNames != null) { ++ setValueByPath(toObject, ['allowedFunctionNames'], fromAllowedFunctionNames); + } + return toObject; + } +-function generatedImageFromMldev(apiClient, fromObject) { ++function toolConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromImage = getValueByPath(fromObject, ['_self']); +- if (fromImage != null) { +- setValueByPath(toObject, ['image'], imageFromMldev(apiClient, fromImage)); +- } +- const fromRaiFilteredReason = getValueByPath(fromObject, [ +- 'raiFilteredReason', ++ const fromFunctionCallingConfig = getValueByPath(fromObject, [ ++ 'functionCallingConfig', + ]); +- if (fromRaiFilteredReason != null) { +- setValueByPath(toObject, ['raiFilteredReason'], fromRaiFilteredReason); +- } +- const fromSafetyAttributes = getValueByPath(fromObject, ['_self']); +- if (fromSafetyAttributes != null) { +- setValueByPath(toObject, ['safetyAttributes'], safetyAttributesFromMldev(apiClient, fromSafetyAttributes)); ++ if (fromFunctionCallingConfig != null) { ++ setValueByPath(toObject, ['functionCallingConfig'], functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig)); + } + return toObject; + } +-function generateImagesResponseFromMldev(apiClient, fromObject) { ++function prebuiltVoiceConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromGeneratedImages = getValueByPath(fromObject, [ +- 'predictions', +- ]); +- if (fromGeneratedImages != null) { +- if (Array.isArray(fromGeneratedImages)) { +- setValueByPath(toObject, ['generatedImages'], fromGeneratedImages.map((item) => { +- return generatedImageFromMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['generatedImages'], fromGeneratedImages); +- } ++ const fromVoiceName = getValueByPath(fromObject, ['voiceName']); ++ if (fromVoiceName != null) { ++ setValueByPath(toObject, ['voiceName'], fromVoiceName); + } +- const fromPositivePromptSafetyAttributes = getValueByPath(fromObject, [ +- 'positivePromptSafetyAttributes', ++ return toObject; ++} ++function voiceConfigToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [ ++ 'prebuiltVoiceConfig', + ]); +- if (fromPositivePromptSafetyAttributes != null) { +- setValueByPath(toObject, ['positivePromptSafetyAttributes'], safetyAttributesFromMldev(apiClient, fromPositivePromptSafetyAttributes)); ++ if (fromPrebuiltVoiceConfig != null) { ++ setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToVertex(apiClient, fromPrebuiltVoiceConfig)); + } + return toObject; + } +-function tunedModelInfoFromMldev(apiClient, fromObject) { ++function speechConfigToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromBaseModel = getValueByPath(fromObject, ['baseModel']); +- if (fromBaseModel != null) { +- setValueByPath(toObject, ['baseModel'], fromBaseModel); ++ const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']); ++ if (fromVoiceConfig != null) { ++ setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(apiClient, fromVoiceConfig)); + } +- const fromCreateTime = getValueByPath(fromObject, ['createTime']); +- if (fromCreateTime != null) { +- setValueByPath(toObject, ['createTime'], fromCreateTime); ++ const fromLanguageCode = getValueByPath(fromObject, ['languageCode']); ++ if (fromLanguageCode != null) { ++ setValueByPath(toObject, ['languageCode'], fromLanguageCode); + } +- const fromUpdateTime = getValueByPath(fromObject, ['updateTime']); +- if (fromUpdateTime != null) { +- setValueByPath(toObject, ['updateTime'], fromUpdateTime); ++ return toObject; ++} ++function thinkingConfigToVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromIncludeThoughts = getValueByPath(fromObject, [ ++ 'includeThoughts', ++ ]); ++ if (fromIncludeThoughts != null) { ++ setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts); ++ } ++ const fromThinkingBudget = getValueByPath(fromObject, [ ++ 'thinkingBudget', ++ ]); ++ if (fromThinkingBudget != null) { ++ setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget); + } + return toObject; + } +-function modelFromMldev(apiClient, fromObject) { ++function generateContentConfigToVertex(apiClient, fromObject, parentObject) { + const toObject = {}; +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName != null) { +- setValueByPath(toObject, ['name'], fromName); ++ const fromSystemInstruction = getValueByPath(fromObject, [ ++ 'systemInstruction', ++ ]); ++ if (parentObject !== undefined && fromSystemInstruction != null) { ++ setValueByPath(parentObject, ['systemInstruction'], contentToVertex(apiClient, tContent(apiClient, fromSystemInstruction))); + } +- const fromDisplayName = getValueByPath(fromObject, ['displayName']); +- if (fromDisplayName != null) { +- setValueByPath(toObject, ['displayName'], fromDisplayName); ++ const fromTemperature = getValueByPath(fromObject, ['temperature']); ++ if (fromTemperature != null) { ++ setValueByPath(toObject, ['temperature'], fromTemperature); + } +- const fromDescription = getValueByPath(fromObject, ['description']); +- if (fromDescription != null) { +- setValueByPath(toObject, ['description'], fromDescription); ++ const fromTopP = getValueByPath(fromObject, ['topP']); ++ if (fromTopP != null) { ++ setValueByPath(toObject, ['topP'], fromTopP); + } +- const fromVersion = getValueByPath(fromObject, ['version']); +- if (fromVersion != null) { +- setValueByPath(toObject, ['version'], fromVersion); ++ const fromTopK = getValueByPath(fromObject, ['topK']); ++ if (fromTopK != null) { ++ setValueByPath(toObject, ['topK'], fromTopK); + } +- const fromTunedModelInfo = getValueByPath(fromObject, ['_self']); +- if (fromTunedModelInfo != null) { +- setValueByPath(toObject, ['tunedModelInfo'], tunedModelInfoFromMldev(apiClient, fromTunedModelInfo)); ++ const fromCandidateCount = getValueByPath(fromObject, [ ++ 'candidateCount', ++ ]); ++ if (fromCandidateCount != null) { ++ setValueByPath(toObject, ['candidateCount'], fromCandidateCount); + } +- const fromInputTokenLimit = getValueByPath(fromObject, [ +- 'inputTokenLimit', ++ const fromMaxOutputTokens = getValueByPath(fromObject, [ ++ 'maxOutputTokens', + ]); +- if (fromInputTokenLimit != null) { +- setValueByPath(toObject, ['inputTokenLimit'], fromInputTokenLimit); ++ if (fromMaxOutputTokens != null) { ++ setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens); + } +- const fromOutputTokenLimit = getValueByPath(fromObject, [ +- 'outputTokenLimit', ++ const fromStopSequences = getValueByPath(fromObject, [ ++ 'stopSequences', + ]); +- if (fromOutputTokenLimit != null) { +- setValueByPath(toObject, ['outputTokenLimit'], fromOutputTokenLimit); ++ if (fromStopSequences != null) { ++ setValueByPath(toObject, ['stopSequences'], fromStopSequences); + } +- const fromSupportedActions = getValueByPath(fromObject, [ +- 'supportedGenerationMethods', ++ const fromResponseLogprobs = getValueByPath(fromObject, [ ++ 'responseLogprobs', + ]); +- if (fromSupportedActions != null) { +- setValueByPath(toObject, ['supportedActions'], fromSupportedActions); ++ if (fromResponseLogprobs != null) { ++ setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs); + } +- return toObject; +-} +-function countTokensResponseFromMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromTotalTokens = getValueByPath(fromObject, ['totalTokens']); +- if (fromTotalTokens != null) { +- setValueByPath(toObject, ['totalTokens'], fromTotalTokens); ++ const fromLogprobs = getValueByPath(fromObject, ['logprobs']); ++ if (fromLogprobs != null) { ++ setValueByPath(toObject, ['logprobs'], fromLogprobs); + } +- const fromCachedContentTokenCount = getValueByPath(fromObject, [ +- 'cachedContentTokenCount', ++ const fromPresencePenalty = getValueByPath(fromObject, [ ++ 'presencePenalty', + ]); +- if (fromCachedContentTokenCount != null) { +- setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); ++ if (fromPresencePenalty != null) { ++ setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty); + } +- return toObject; +-} +-function videoFromMldev$1(apiClient, fromObject) { +- const toObject = {}; +- const fromUri = getValueByPath(fromObject, ['video', 'uri']); +- if (fromUri != null) { +- setValueByPath(toObject, ['uri'], fromUri); ++ const fromFrequencyPenalty = getValueByPath(fromObject, [ ++ 'frequencyPenalty', ++ ]); ++ if (fromFrequencyPenalty != null) { ++ setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty); ++ } ++ const fromSeed = getValueByPath(fromObject, ['seed']); ++ if (fromSeed != null) { ++ setValueByPath(toObject, ['seed'], fromSeed); + } +- const fromVideoBytes = getValueByPath(fromObject, [ +- 'video', +- 'encodedVideo', ++ const fromResponseMimeType = getValueByPath(fromObject, [ ++ 'responseMimeType', + ]); +- if (fromVideoBytes != null) { +- setValueByPath(toObject, ['videoBytes'], tBytes(apiClient, fromVideoBytes)); ++ if (fromResponseMimeType != null) { ++ setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType); + } +- const fromMimeType = getValueByPath(fromObject, ['encoding']); +- if (fromMimeType != null) { +- setValueByPath(toObject, ['mimeType'], fromMimeType); ++ const fromResponseSchema = getValueByPath(fromObject, [ ++ 'responseSchema', ++ ]); ++ if (fromResponseSchema != null) { ++ setValueByPath(toObject, ['responseSchema'], schemaToVertex(apiClient, tSchema(apiClient, fromResponseSchema))); + } +- return toObject; +-} +-function generatedVideoFromMldev$1(apiClient, fromObject) { +- const toObject = {}; +- const fromVideo = getValueByPath(fromObject, ['_self']); +- if (fromVideo != null) { +- setValueByPath(toObject, ['video'], videoFromMldev$1(apiClient, fromVideo)); ++ const fromRoutingConfig = getValueByPath(fromObject, [ ++ 'routingConfig', ++ ]); ++ if (fromRoutingConfig != null) { ++ setValueByPath(toObject, ['routingConfig'], fromRoutingConfig); + } +- return toObject; +-} +-function generateVideosResponseFromMldev$1(apiClient, fromObject) { +- const toObject = {}; +- const fromGeneratedVideos = getValueByPath(fromObject, [ +- 'generatedSamples', ++ const fromModelSelectionConfig = getValueByPath(fromObject, [ ++ 'modelSelectionConfig', + ]); +- if (fromGeneratedVideos != null) { +- if (Array.isArray(fromGeneratedVideos)) { +- setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos.map((item) => { +- return generatedVideoFromMldev$1(apiClient, item); ++ if (fromModelSelectionConfig != null) { ++ setValueByPath(toObject, ['modelConfig'], modelSelectionConfigToVertex(apiClient, fromModelSelectionConfig)); ++ } ++ const fromSafetySettings = getValueByPath(fromObject, [ ++ 'safetySettings', ++ ]); ++ if (parentObject !== undefined && fromSafetySettings != null) { ++ if (Array.isArray(fromSafetySettings)) { ++ setValueByPath(parentObject, ['safetySettings'], fromSafetySettings.map((item) => { ++ return safetySettingToVertex(apiClient, item); + })); + } + else { +- setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos); ++ setValueByPath(parentObject, ['safetySettings'], fromSafetySettings); + } + } +- const fromRaiMediaFilteredCount = getValueByPath(fromObject, [ +- 'raiMediaFilteredCount', +- ]); +- if (fromRaiMediaFilteredCount != null) { +- setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount); ++ const fromTools = getValueByPath(fromObject, ['tools']); ++ if (parentObject !== undefined && fromTools != null) { ++ if (Array.isArray(fromTools)) { ++ setValueByPath(parentObject, ['tools'], tTools(apiClient, tTools(apiClient, fromTools).map((item) => { ++ return toolToVertex(apiClient, tTool(apiClient, item)); ++ }))); ++ } ++ else { ++ setValueByPath(parentObject, ['tools'], tTools(apiClient, fromTools)); ++ } + } +- const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [ +- 'raiMediaFilteredReasons', +- ]); +- if (fromRaiMediaFilteredReasons != null) { +- setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons); ++ const fromToolConfig = getValueByPath(fromObject, ['toolConfig']); ++ if (parentObject !== undefined && fromToolConfig != null) { ++ setValueByPath(parentObject, ['toolConfig'], toolConfigToVertex(apiClient, fromToolConfig)); + } +- return toObject; +-} +-function generateVideosOperationFromMldev$1(apiClient, fromObject) { +- const toObject = {}; +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName != null) { +- setValueByPath(toObject, ['name'], fromName); ++ const fromLabels = getValueByPath(fromObject, ['labels']); ++ if (parentObject !== undefined && fromLabels != null) { ++ setValueByPath(parentObject, ['labels'], fromLabels); + } +- const fromMetadata = getValueByPath(fromObject, ['metadata']); +- if (fromMetadata != null) { +- setValueByPath(toObject, ['metadata'], fromMetadata); ++ const fromCachedContent = getValueByPath(fromObject, [ ++ 'cachedContent', ++ ]); ++ if (parentObject !== undefined && fromCachedContent != null) { ++ setValueByPath(parentObject, ['cachedContent'], tCachedContentName(apiClient, fromCachedContent)); + } +- const fromDone = getValueByPath(fromObject, ['done']); +- if (fromDone != null) { +- setValueByPath(toObject, ['done'], fromDone); ++ const fromResponseModalities = getValueByPath(fromObject, [ ++ 'responseModalities', ++ ]); ++ if (fromResponseModalities != null) { ++ setValueByPath(toObject, ['responseModalities'], fromResponseModalities); + } +- const fromError = getValueByPath(fromObject, ['error']); +- if (fromError != null) { +- setValueByPath(toObject, ['error'], fromError); ++ const fromMediaResolution = getValueByPath(fromObject, [ ++ 'mediaResolution', ++ ]); ++ if (fromMediaResolution != null) { ++ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution); + } +- const fromResponse = getValueByPath(fromObject, [ +- 'response', +- 'generateVideoResponse', ++ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); ++ if (fromSpeechConfig != null) { ++ setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(apiClient, tSpeechConfig(apiClient, fromSpeechConfig))); ++ } ++ const fromAudioTimestamp = getValueByPath(fromObject, [ ++ 'audioTimestamp', + ]); +- if (fromResponse != null) { +- setValueByPath(toObject, ['response'], generateVideosResponseFromMldev$1(apiClient, fromResponse)); ++ if (fromAudioTimestamp != null) { ++ setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp); + } +- const fromResult = getValueByPath(fromObject, [ +- 'response', +- 'generateVideoResponse', ++ const fromThinkingConfig = getValueByPath(fromObject, [ ++ 'thinkingConfig', + ]); +- if (fromResult != null) { +- setValueByPath(toObject, ['result'], generateVideosResponseFromMldev$1(apiClient, fromResult)); ++ if (fromThinkingConfig != null) { ++ setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToVertex(apiClient, fromThinkingConfig)); + } + return toObject; + } +-function partFromVertex(apiClient, fromObject) { ++function generateContentParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromVideoMetadata = getValueByPath(fromObject, [ +- 'videoMetadata', +- ]); +- if (fromVideoMetadata != null) { +- setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); +- } +- const fromThought = getValueByPath(fromObject, ['thought']); +- if (fromThought != null) { +- setValueByPath(toObject, ['thought'], fromThought); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); + } +- const fromCodeExecutionResult = getValueByPath(fromObject, [ +- 'codeExecutionResult', +- ]); +- if (fromCodeExecutionResult != null) { +- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); ++ const fromContents = getValueByPath(fromObject, ['contents']); ++ if (fromContents != null) { ++ if (Array.isArray(fromContents)) { ++ setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { ++ return contentToVertex(apiClient, item); ++ }))); ++ } ++ else { ++ setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); ++ } + } +- const fromExecutableCode = getValueByPath(fromObject, [ +- 'executableCode', +- ]); +- if (fromExecutableCode != null) { +- setValueByPath(toObject, ['executableCode'], fromExecutableCode); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['generationConfig'], generateContentConfigToVertex(apiClient, fromConfig, toObject)); + } +- const fromFileData = getValueByPath(fromObject, ['fileData']); +- if (fromFileData != null) { +- setValueByPath(toObject, ['fileData'], fromFileData); ++ return toObject; ++} ++function embedContentConfigToVertex(apiClient, fromObject, parentObject) { ++ const toObject = {}; ++ const fromTaskType = getValueByPath(fromObject, ['taskType']); ++ if (parentObject !== undefined && fromTaskType != null) { ++ setValueByPath(parentObject, ['instances[]', 'task_type'], fromTaskType); + } +- const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); +- if (fromFunctionCall != null) { +- setValueByPath(toObject, ['functionCall'], fromFunctionCall); ++ const fromTitle = getValueByPath(fromObject, ['title']); ++ if (parentObject !== undefined && fromTitle != null) { ++ setValueByPath(parentObject, ['instances[]', 'title'], fromTitle); + } +- const fromFunctionResponse = getValueByPath(fromObject, [ +- 'functionResponse', ++ const fromOutputDimensionality = getValueByPath(fromObject, [ ++ 'outputDimensionality', + ]); +- if (fromFunctionResponse != null) { +- setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); ++ if (parentObject !== undefined && fromOutputDimensionality != null) { ++ setValueByPath(parentObject, ['parameters', 'outputDimensionality'], fromOutputDimensionality); + } +- const fromInlineData = getValueByPath(fromObject, ['inlineData']); +- if (fromInlineData != null) { +- setValueByPath(toObject, ['inlineData'], fromInlineData); ++ const fromMimeType = getValueByPath(fromObject, ['mimeType']); ++ if (parentObject !== undefined && fromMimeType != null) { ++ setValueByPath(parentObject, ['instances[]', 'mimeType'], fromMimeType); + } +- const fromText = getValueByPath(fromObject, ['text']); +- if (fromText != null) { +- setValueByPath(toObject, ['text'], fromText); ++ const fromAutoTruncate = getValueByPath(fromObject, ['autoTruncate']); ++ if (parentObject !== undefined && fromAutoTruncate != null) { ++ setValueByPath(parentObject, ['parameters', 'autoTruncate'], fromAutoTruncate); + } + return toObject; + } +-function contentFromVertex(apiClient, fromObject) { ++function embedContentParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromParts = getValueByPath(fromObject, ['parts']); +- if (fromParts != null) { +- if (Array.isArray(fromParts)) { +- setValueByPath(toObject, ['parts'], fromParts.map((item) => { +- return partFromVertex(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['parts'], fromParts); +- } ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); + } +- const fromRole = getValueByPath(fromObject, ['role']); +- if (fromRole != null) { +- setValueByPath(toObject, ['role'], fromRole); ++ const fromContents = getValueByPath(fromObject, ['contents']); ++ if (fromContents != null) { ++ setValueByPath(toObject, ['instances[]', 'content'], tContentsForEmbed(apiClient, fromContents)); + } +- return toObject; +-} +-function citationMetadataFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromCitations = getValueByPath(fromObject, ['citations']); +- if (fromCitations != null) { +- setValueByPath(toObject, ['citations'], fromCitations); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], embedContentConfigToVertex(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function candidateFromVertex(apiClient, fromObject) { ++function generateImagesConfigToVertex(apiClient, fromObject, parentObject) { + const toObject = {}; +- const fromContent = getValueByPath(fromObject, ['content']); +- if (fromContent != null) { +- setValueByPath(toObject, ['content'], contentFromVertex(apiClient, fromContent)); +- } +- const fromCitationMetadata = getValueByPath(fromObject, [ +- 'citationMetadata', +- ]); +- if (fromCitationMetadata != null) { +- setValueByPath(toObject, ['citationMetadata'], citationMetadataFromVertex(apiClient, fromCitationMetadata)); ++ const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']); ++ if (parentObject !== undefined && fromOutputGcsUri != null) { ++ setValueByPath(parentObject, ['parameters', 'storageUri'], fromOutputGcsUri); + } +- const fromFinishMessage = getValueByPath(fromObject, [ +- 'finishMessage', ++ const fromNegativePrompt = getValueByPath(fromObject, [ ++ 'negativePrompt', + ]); +- if (fromFinishMessage != null) { +- setValueByPath(toObject, ['finishMessage'], fromFinishMessage); +- } +- const fromFinishReason = getValueByPath(fromObject, ['finishReason']); +- if (fromFinishReason != null) { +- setValueByPath(toObject, ['finishReason'], fromFinishReason); ++ if (parentObject !== undefined && fromNegativePrompt != null) { ++ setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt); + } +- const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']); +- if (fromAvgLogprobs != null) { +- setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs); ++ const fromNumberOfImages = getValueByPath(fromObject, [ ++ 'numberOfImages', ++ ]); ++ if (parentObject !== undefined && fromNumberOfImages != null) { ++ setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfImages); + } +- const fromGroundingMetadata = getValueByPath(fromObject, [ +- 'groundingMetadata', ++ const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']); ++ if (parentObject !== undefined && fromAspectRatio != null) { ++ setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio); ++ } ++ const fromGuidanceScale = getValueByPath(fromObject, [ ++ 'guidanceScale', + ]); +- if (fromGroundingMetadata != null) { +- setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata); ++ if (parentObject !== undefined && fromGuidanceScale != null) { ++ setValueByPath(parentObject, ['parameters', 'guidanceScale'], fromGuidanceScale); + } +- const fromIndex = getValueByPath(fromObject, ['index']); +- if (fromIndex != null) { +- setValueByPath(toObject, ['index'], fromIndex); ++ const fromSeed = getValueByPath(fromObject, ['seed']); ++ if (parentObject !== undefined && fromSeed != null) { ++ setValueByPath(parentObject, ['parameters', 'seed'], fromSeed); + } +- const fromLogprobsResult = getValueByPath(fromObject, [ +- 'logprobsResult', ++ const fromSafetyFilterLevel = getValueByPath(fromObject, [ ++ 'safetyFilterLevel', + ]); +- if (fromLogprobsResult != null) { +- setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult); ++ if (parentObject !== undefined && fromSafetyFilterLevel != null) { ++ setValueByPath(parentObject, ['parameters', 'safetySetting'], fromSafetyFilterLevel); + } +- const fromSafetyRatings = getValueByPath(fromObject, [ +- 'safetyRatings', ++ const fromPersonGeneration = getValueByPath(fromObject, [ ++ 'personGeneration', + ]); +- if (fromSafetyRatings != null) { +- setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings); ++ if (parentObject !== undefined && fromPersonGeneration != null) { ++ setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration); + } +- return toObject; +-} +-function generateContentResponseFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromCandidates = getValueByPath(fromObject, ['candidates']); +- if (fromCandidates != null) { +- if (Array.isArray(fromCandidates)) { +- setValueByPath(toObject, ['candidates'], fromCandidates.map((item) => { +- return candidateFromVertex(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['candidates'], fromCandidates); +- } ++ const fromIncludeSafetyAttributes = getValueByPath(fromObject, [ ++ 'includeSafetyAttributes', ++ ]); ++ if (parentObject !== undefined && fromIncludeSafetyAttributes != null) { ++ setValueByPath(parentObject, ['parameters', 'includeSafetyAttributes'], fromIncludeSafetyAttributes); + } +- const fromCreateTime = getValueByPath(fromObject, ['createTime']); +- if (fromCreateTime != null) { +- setValueByPath(toObject, ['createTime'], fromCreateTime); ++ const fromIncludeRaiReason = getValueByPath(fromObject, [ ++ 'includeRaiReason', ++ ]); ++ if (parentObject !== undefined && fromIncludeRaiReason != null) { ++ setValueByPath(parentObject, ['parameters', 'includeRaiReason'], fromIncludeRaiReason); + } +- const fromResponseId = getValueByPath(fromObject, ['responseId']); +- if (fromResponseId != null) { +- setValueByPath(toObject, ['responseId'], fromResponseId); ++ const fromLanguage = getValueByPath(fromObject, ['language']); ++ if (parentObject !== undefined && fromLanguage != null) { ++ setValueByPath(parentObject, ['parameters', 'language'], fromLanguage); + } +- const fromModelVersion = getValueByPath(fromObject, ['modelVersion']); +- if (fromModelVersion != null) { +- setValueByPath(toObject, ['modelVersion'], fromModelVersion); ++ const fromOutputMimeType = getValueByPath(fromObject, [ ++ 'outputMimeType', ++ ]); ++ if (parentObject !== undefined && fromOutputMimeType != null) { ++ setValueByPath(parentObject, ['parameters', 'outputOptions', 'mimeType'], fromOutputMimeType); + } +- const fromPromptFeedback = getValueByPath(fromObject, [ +- 'promptFeedback', ++ const fromOutputCompressionQuality = getValueByPath(fromObject, [ ++ 'outputCompressionQuality', + ]); +- if (fromPromptFeedback != null) { +- setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback); ++ if (parentObject !== undefined && fromOutputCompressionQuality != null) { ++ setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality); + } +- const fromUsageMetadata = getValueByPath(fromObject, [ +- 'usageMetadata', ++ const fromAddWatermark = getValueByPath(fromObject, ['addWatermark']); ++ if (parentObject !== undefined && fromAddWatermark != null) { ++ setValueByPath(parentObject, ['parameters', 'addWatermark'], fromAddWatermark); ++ } ++ const fromEnhancePrompt = getValueByPath(fromObject, [ ++ 'enhancePrompt', + ]); +- if (fromUsageMetadata != null) { +- setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata); ++ if (parentObject !== undefined && fromEnhancePrompt != null) { ++ setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt); + } + return toObject; + } +-function contentEmbeddingStatisticsFromVertex(apiClient, fromObject) { ++function generateImagesParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromTruncated = getValueByPath(fromObject, ['truncated']); +- if (fromTruncated != null) { +- setValueByPath(toObject, ['truncated'], fromTruncated); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); + } +- const fromTokenCount = getValueByPath(fromObject, ['token_count']); +- if (fromTokenCount != null) { +- setValueByPath(toObject, ['tokenCount'], fromTokenCount); ++ const fromPrompt = getValueByPath(fromObject, ['prompt']); ++ if (fromPrompt != null) { ++ setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt); ++ } ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], generateImagesConfigToVertex(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function contentEmbeddingFromVertex(apiClient, fromObject) { ++function getModelParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromValues = getValueByPath(fromObject, ['values']); +- if (fromValues != null) { +- setValueByPath(toObject, ['values'], fromValues); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'name'], tModel(apiClient, fromModel)); + } +- const fromStatistics = getValueByPath(fromObject, ['statistics']); +- if (fromStatistics != null) { +- setValueByPath(toObject, ['statistics'], contentEmbeddingStatisticsFromVertex(apiClient, fromStatistics)); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], fromConfig); + } + return toObject; + } +-function embedContentMetadataFromVertex(apiClient, fromObject) { ++function countTokensConfigToVertex(apiClient, fromObject, parentObject) { + const toObject = {}; +- const fromBillableCharacterCount = getValueByPath(fromObject, [ +- 'billableCharacterCount', ++ const fromSystemInstruction = getValueByPath(fromObject, [ ++ 'systemInstruction', + ]); +- if (fromBillableCharacterCount != null) { +- setValueByPath(toObject, ['billableCharacterCount'], fromBillableCharacterCount); ++ if (parentObject !== undefined && fromSystemInstruction != null) { ++ setValueByPath(parentObject, ['systemInstruction'], contentToVertex(apiClient, tContent(apiClient, fromSystemInstruction))); + } +- return toObject; +-} +-function embedContentResponseFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromEmbeddings = getValueByPath(fromObject, [ +- 'predictions[]', +- 'embeddings', +- ]); +- if (fromEmbeddings != null) { +- if (Array.isArray(fromEmbeddings)) { +- setValueByPath(toObject, ['embeddings'], fromEmbeddings.map((item) => { +- return contentEmbeddingFromVertex(apiClient, item); ++ const fromTools = getValueByPath(fromObject, ['tools']); ++ if (parentObject !== undefined && fromTools != null) { ++ if (Array.isArray(fromTools)) { ++ setValueByPath(parentObject, ['tools'], fromTools.map((item) => { ++ return toolToVertex(apiClient, item); + })); + } + else { +- setValueByPath(toObject, ['embeddings'], fromEmbeddings); ++ setValueByPath(parentObject, ['tools'], fromTools); + } + } +- const fromMetadata = getValueByPath(fromObject, ['metadata']); +- if (fromMetadata != null) { +- setValueByPath(toObject, ['metadata'], embedContentMetadataFromVertex(apiClient, fromMetadata)); +- } +- return toObject; +-} +-function imageFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromGcsUri = getValueByPath(fromObject, ['gcsUri']); +- if (fromGcsUri != null) { +- setValueByPath(toObject, ['gcsUri'], fromGcsUri); +- } +- const fromImageBytes = getValueByPath(fromObject, [ +- 'bytesBase64Encoded', +- ]); +- if (fromImageBytes != null) { +- setValueByPath(toObject, ['imageBytes'], tBytes(apiClient, fromImageBytes)); +- } +- const fromMimeType = getValueByPath(fromObject, ['mimeType']); +- if (fromMimeType != null) { +- setValueByPath(toObject, ['mimeType'], fromMimeType); +- } +- return toObject; +-} +-function safetyAttributesFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromCategories = getValueByPath(fromObject, [ +- 'safetyAttributes', +- 'categories', +- ]); +- if (fromCategories != null) { +- setValueByPath(toObject, ['categories'], fromCategories); +- } +- const fromScores = getValueByPath(fromObject, [ +- 'safetyAttributes', +- 'scores', ++ const fromGenerationConfig = getValueByPath(fromObject, [ ++ 'generationConfig', + ]); +- if (fromScores != null) { +- setValueByPath(toObject, ['scores'], fromScores); +- } +- const fromContentType = getValueByPath(fromObject, ['contentType']); +- if (fromContentType != null) { +- setValueByPath(toObject, ['contentType'], fromContentType); ++ if (parentObject !== undefined && fromGenerationConfig != null) { ++ setValueByPath(parentObject, ['generationConfig'], fromGenerationConfig); + } + return toObject; + } +-function generatedImageFromVertex(apiClient, fromObject) { ++function countTokensParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromImage = getValueByPath(fromObject, ['_self']); +- if (fromImage != null) { +- setValueByPath(toObject, ['image'], imageFromVertex(apiClient, fromImage)); +- } +- const fromRaiFilteredReason = getValueByPath(fromObject, [ +- 'raiFilteredReason', +- ]); +- if (fromRaiFilteredReason != null) { +- setValueByPath(toObject, ['raiFilteredReason'], fromRaiFilteredReason); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); + } +- const fromSafetyAttributes = getValueByPath(fromObject, ['_self']); +- if (fromSafetyAttributes != null) { +- setValueByPath(toObject, ['safetyAttributes'], safetyAttributesFromVertex(apiClient, fromSafetyAttributes)); ++ const fromContents = getValueByPath(fromObject, ['contents']); ++ if (fromContents != null) { ++ if (Array.isArray(fromContents)) { ++ setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { ++ return contentToVertex(apiClient, item); ++ }))); ++ } ++ else { ++ setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); ++ } + } +- const fromEnhancedPrompt = getValueByPath(fromObject, ['prompt']); +- if (fromEnhancedPrompt != null) { +- setValueByPath(toObject, ['enhancedPrompt'], fromEnhancedPrompt); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], countTokensConfigToVertex(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function generateImagesResponseFromVertex(apiClient, fromObject) { ++function computeTokensParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromGeneratedImages = getValueByPath(fromObject, [ +- 'predictions', +- ]); +- if (fromGeneratedImages != null) { +- if (Array.isArray(fromGeneratedImages)) { +- setValueByPath(toObject, ['generatedImages'], fromGeneratedImages.map((item) => { +- return generatedImageFromVertex(apiClient, item); +- })); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); ++ } ++ const fromContents = getValueByPath(fromObject, ['contents']); ++ if (fromContents != null) { ++ if (Array.isArray(fromContents)) { ++ setValueByPath(toObject, ['contents'], tContents(apiClient, tContents(apiClient, fromContents).map((item) => { ++ return contentToVertex(apiClient, item); ++ }))); + } + else { +- setValueByPath(toObject, ['generatedImages'], fromGeneratedImages); ++ setValueByPath(toObject, ['contents'], tContents(apiClient, fromContents)); + } + } +- const fromPositivePromptSafetyAttributes = getValueByPath(fromObject, [ +- 'positivePromptSafetyAttributes', +- ]); +- if (fromPositivePromptSafetyAttributes != null) { +- setValueByPath(toObject, ['positivePromptSafetyAttributes'], safetyAttributesFromVertex(apiClient, fromPositivePromptSafetyAttributes)); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], fromConfig); + } + return toObject; + } +-function endpointFromVertex(apiClient, fromObject) { ++function imageToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromName = getValueByPath(fromObject, ['endpoint']); +- if (fromName != null) { +- setValueByPath(toObject, ['name'], fromName); ++ const fromGcsUri = getValueByPath(fromObject, ['gcsUri']); ++ if (fromGcsUri != null) { ++ setValueByPath(toObject, ['gcsUri'], fromGcsUri); + } +- const fromDeployedModelId = getValueByPath(fromObject, [ +- 'deployedModelId', +- ]); +- if (fromDeployedModelId != null) { +- setValueByPath(toObject, ['deployedModelId'], fromDeployedModelId); ++ const fromImageBytes = getValueByPath(fromObject, ['imageBytes']); ++ if (fromImageBytes != null) { ++ setValueByPath(toObject, ['bytesBase64Encoded'], tBytes(apiClient, fromImageBytes)); ++ } ++ const fromMimeType = getValueByPath(fromObject, ['mimeType']); ++ if (fromMimeType != null) { ++ setValueByPath(toObject, ['mimeType'], fromMimeType); + } + return toObject; + } +-function tunedModelInfoFromVertex(apiClient, fromObject) { ++function generateVideosConfigToVertex(apiClient, fromObject, parentObject) { + const toObject = {}; +- const fromBaseModel = getValueByPath(fromObject, [ +- 'labels', +- 'google-vertex-llm-tuning-base-model-id', ++ const fromNumberOfVideos = getValueByPath(fromObject, [ ++ 'numberOfVideos', + ]); +- if (fromBaseModel != null) { +- setValueByPath(toObject, ['baseModel'], fromBaseModel); +- } +- const fromCreateTime = getValueByPath(fromObject, ['createTime']); +- if (fromCreateTime != null) { +- setValueByPath(toObject, ['createTime'], fromCreateTime); ++ if (parentObject !== undefined && fromNumberOfVideos != null) { ++ setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfVideos); + } +- const fromUpdateTime = getValueByPath(fromObject, ['updateTime']); +- if (fromUpdateTime != null) { +- setValueByPath(toObject, ['updateTime'], fromUpdateTime); ++ const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']); ++ if (parentObject !== undefined && fromOutputGcsUri != null) { ++ setValueByPath(parentObject, ['parameters', 'storageUri'], fromOutputGcsUri); + } +- return toObject; +-} +-function modelFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName != null) { +- setValueByPath(toObject, ['name'], fromName); ++ const fromFps = getValueByPath(fromObject, ['fps']); ++ if (parentObject !== undefined && fromFps != null) { ++ setValueByPath(parentObject, ['parameters', 'fps'], fromFps); + } +- const fromDisplayName = getValueByPath(fromObject, ['displayName']); +- if (fromDisplayName != null) { +- setValueByPath(toObject, ['displayName'], fromDisplayName); ++ const fromDurationSeconds = getValueByPath(fromObject, [ ++ 'durationSeconds', ++ ]); ++ if (parentObject !== undefined && fromDurationSeconds != null) { ++ setValueByPath(parentObject, ['parameters', 'durationSeconds'], fromDurationSeconds); + } +- const fromDescription = getValueByPath(fromObject, ['description']); +- if (fromDescription != null) { +- setValueByPath(toObject, ['description'], fromDescription); ++ const fromSeed = getValueByPath(fromObject, ['seed']); ++ if (parentObject !== undefined && fromSeed != null) { ++ setValueByPath(parentObject, ['parameters', 'seed'], fromSeed); + } +- const fromVersion = getValueByPath(fromObject, ['versionId']); +- if (fromVersion != null) { +- setValueByPath(toObject, ['version'], fromVersion); ++ const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']); ++ if (parentObject !== undefined && fromAspectRatio != null) { ++ setValueByPath(parentObject, ['parameters', 'aspectRatio'], fromAspectRatio); + } +- const fromEndpoints = getValueByPath(fromObject, ['deployedModels']); +- if (fromEndpoints != null) { +- if (Array.isArray(fromEndpoints)) { +- setValueByPath(toObject, ['endpoints'], fromEndpoints.map((item) => { +- return endpointFromVertex(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['endpoints'], fromEndpoints); +- } ++ const fromResolution = getValueByPath(fromObject, ['resolution']); ++ if (parentObject !== undefined && fromResolution != null) { ++ setValueByPath(parentObject, ['parameters', 'resolution'], fromResolution); + } +- const fromLabels = getValueByPath(fromObject, ['labels']); +- if (fromLabels != null) { +- setValueByPath(toObject, ['labels'], fromLabels); ++ const fromPersonGeneration = getValueByPath(fromObject, [ ++ 'personGeneration', ++ ]); ++ if (parentObject !== undefined && fromPersonGeneration != null) { ++ setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration); + } +- const fromTunedModelInfo = getValueByPath(fromObject, ['_self']); +- if (fromTunedModelInfo != null) { +- setValueByPath(toObject, ['tunedModelInfo'], tunedModelInfoFromVertex(apiClient, fromTunedModelInfo)); ++ const fromPubsubTopic = getValueByPath(fromObject, ['pubsubTopic']); ++ if (parentObject !== undefined && fromPubsubTopic != null) { ++ setValueByPath(parentObject, ['parameters', 'pubsubTopic'], fromPubsubTopic); + } +- return toObject; +-} +-function countTokensResponseFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromTotalTokens = getValueByPath(fromObject, ['totalTokens']); +- if (fromTotalTokens != null) { +- setValueByPath(toObject, ['totalTokens'], fromTotalTokens); ++ const fromNegativePrompt = getValueByPath(fromObject, [ ++ 'negativePrompt', ++ ]); ++ if (parentObject !== undefined && fromNegativePrompt != null) { ++ setValueByPath(parentObject, ['parameters', 'negativePrompt'], fromNegativePrompt); + } +- return toObject; +-} +-function computeTokensResponseFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromTokensInfo = getValueByPath(fromObject, ['tokensInfo']); +- if (fromTokensInfo != null) { +- setValueByPath(toObject, ['tokensInfo'], fromTokensInfo); ++ const fromEnhancePrompt = getValueByPath(fromObject, [ ++ 'enhancePrompt', ++ ]); ++ if (parentObject !== undefined && fromEnhancePrompt != null) { ++ setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt); + } + return toObject; + } +-function videoFromVertex$1(apiClient, fromObject) { ++function generateVideosParametersToVertex(apiClient, fromObject) { + const toObject = {}; +- const fromUri = getValueByPath(fromObject, ['gcsUri']); +- if (fromUri != null) { +- setValueByPath(toObject, ['uri'], fromUri); ++ const fromModel = getValueByPath(fromObject, ['model']); ++ if (fromModel != null) { ++ setValueByPath(toObject, ['_url', 'model'], tModel(apiClient, fromModel)); + } +- const fromVideoBytes = getValueByPath(fromObject, [ +- 'bytesBase64Encoded', +- ]); +- if (fromVideoBytes != null) { +- setValueByPath(toObject, ['videoBytes'], tBytes(apiClient, fromVideoBytes)); ++ const fromPrompt = getValueByPath(fromObject, ['prompt']); ++ if (fromPrompt != null) { ++ setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt); + } +- const fromMimeType = getValueByPath(fromObject, ['mimeType']); +- if (fromMimeType != null) { +- setValueByPath(toObject, ['mimeType'], fromMimeType); ++ const fromImage = getValueByPath(fromObject, ['image']); ++ if (fromImage != null) { ++ setValueByPath(toObject, ['instances[0]', 'image'], imageToVertex(apiClient, fromImage)); + } +- return toObject; +-} +-function generatedVideoFromVertex$1(apiClient, fromObject) { +- const toObject = {}; +- const fromVideo = getValueByPath(fromObject, ['_self']); +- if (fromVideo != null) { +- setValueByPath(toObject, ['video'], videoFromVertex$1(apiClient, fromVideo)); ++ const fromConfig = getValueByPath(fromObject, ['config']); ++ if (fromConfig != null) { ++ setValueByPath(toObject, ['config'], generateVideosConfigToVertex(apiClient, fromConfig, toObject)); + } + return toObject; + } +-function generateVideosResponseFromVertex$1(apiClient, fromObject) { ++function partFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromGeneratedVideos = getValueByPath(fromObject, ['videos']); +- if (fromGeneratedVideos != null) { +- if (Array.isArray(fromGeneratedVideos)) { +- setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos.map((item) => { +- return generatedVideoFromVertex$1(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos); +- } ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); + } +- const fromRaiMediaFilteredCount = getValueByPath(fromObject, [ +- 'raiMediaFilteredCount', ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', + ]); +- if (fromRaiMediaFilteredCount != null) { +- setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); + } +- const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [ +- 'raiMediaFilteredReasons', ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', + ]); +- if (fromRaiMediaFilteredReasons != null) { +- setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons); +- } +- return toObject; +-} +-function generateVideosOperationFromVertex$1(apiClient, fromObject) { +- const toObject = {}; +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName != null) { +- setValueByPath(toObject, ['name'], fromName); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); + } +- const fromMetadata = getValueByPath(fromObject, ['metadata']); +- if (fromMetadata != null) { +- setValueByPath(toObject, ['metadata'], fromMetadata); ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); + } +- const fromDone = getValueByPath(fromObject, ['done']); +- if (fromDone != null) { +- setValueByPath(toObject, ['done'], fromDone); ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); + } +- const fromError = getValueByPath(fromObject, ['error']); +- if (fromError != null) { +- setValueByPath(toObject, ['error'], fromError); ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', ++ ]); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); + } +- const fromResponse = getValueByPath(fromObject, ['response']); +- if (fromResponse != null) { +- setValueByPath(toObject, ['response'], generateVideosResponseFromVertex$1(apiClient, fromResponse)); ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); + } +- const fromResult = getValueByPath(fromObject, ['response']); +- if (fromResult != null) { +- setValueByPath(toObject, ['result'], generateVideosResponseFromVertex$1(apiClient, fromResult)); ++ const fromText = getValueByPath(fromObject, ['text']); ++ if (fromText != null) { ++ setValueByPath(toObject, ['text'], fromText); + } + return toObject; + } +- +-/** +- * @license +- * Copyright 2025 Google LLC +- * SPDX-License-Identifier: Apache-2.0 +- */ +-/** +- * Converters for live client. +- */ +-function liveConnectParametersToMldev(apiClient, fromObject) { ++function contentFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig !== undefined && fromConfig !== null) { +- setValueByPath(toObject, ['setup'], liveConnectConfigToMldev(apiClient, fromConfig)); ++ const fromParts = getValueByPath(fromObject, ['parts']); ++ if (fromParts != null) { ++ if (Array.isArray(fromParts)) { ++ setValueByPath(toObject, ['parts'], fromParts.map((item) => { ++ return partFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['parts'], fromParts); ++ } + } +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel !== undefined) { +- setValueByPath(toObject, ['setup', 'model'], fromModel); ++ const fromRole = getValueByPath(fromObject, ['role']); ++ if (fromRole != null) { ++ setValueByPath(toObject, ['role'], fromRole); + } + return toObject; + } +-function liveConnectParametersToVertex(apiClient, fromObject) { ++function citationMetadataFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromConfig = getValueByPath(fromObject, ['config']); +- if (fromConfig !== undefined && fromConfig !== null) { +- setValueByPath(toObject, ['setup'], liveConnectConfigToVertex(apiClient, fromConfig)); +- } +- const fromModel = getValueByPath(fromObject, ['model']); +- if (fromModel !== undefined) { +- setValueByPath(toObject, ['setup', 'model'], fromModel); ++ const fromCitations = getValueByPath(fromObject, ['citationSources']); ++ if (fromCitations != null) { ++ setValueByPath(toObject, ['citations'], fromCitations); + } + return toObject; + } +-function liveServerMessageFromMldev(apiClient, fromObject) { ++function candidateFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromSetupComplete = getValueByPath(fromObject, [ +- 'setupComplete', +- ]); +- if (fromSetupComplete !== undefined) { +- setValueByPath(toObject, ['setupComplete'], fromSetupComplete); ++ const fromContent = getValueByPath(fromObject, ['content']); ++ if (fromContent != null) { ++ setValueByPath(toObject, ['content'], contentFromMldev(apiClient, fromContent)); + } +- const fromServerContent = getValueByPath(fromObject, [ +- 'serverContent', ++ const fromCitationMetadata = getValueByPath(fromObject, [ ++ 'citationMetadata', + ]); +- if (fromServerContent !== undefined && fromServerContent !== null) { +- setValueByPath(toObject, ['serverContent'], liveServerContentFromMldev(apiClient, fromServerContent)); ++ if (fromCitationMetadata != null) { ++ setValueByPath(toObject, ['citationMetadata'], citationMetadataFromMldev(apiClient, fromCitationMetadata)); + } +- const fromToolCall = getValueByPath(fromObject, ['toolCall']); +- if (fromToolCall !== undefined && fromToolCall !== null) { +- setValueByPath(toObject, ['toolCall'], liveServerToolCallFromMldev(apiClient, fromToolCall)); ++ const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); ++ if (fromTokenCount != null) { ++ setValueByPath(toObject, ['tokenCount'], fromTokenCount); + } +- const fromToolCallCancellation = getValueByPath(fromObject, [ +- 'toolCallCancellation', +- ]); +- if (fromToolCallCancellation !== undefined && +- fromToolCallCancellation !== null) { +- setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromMldev(apiClient, fromToolCallCancellation)); ++ const fromFinishReason = getValueByPath(fromObject, ['finishReason']); ++ if (fromFinishReason != null) { ++ setValueByPath(toObject, ['finishReason'], fromFinishReason); + } +- const fromUsageMetadata = getValueByPath(fromObject, [ +- 'usageMetadata', ++ const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']); ++ if (fromAvgLogprobs != null) { ++ setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs); ++ } ++ const fromGroundingMetadata = getValueByPath(fromObject, [ ++ 'groundingMetadata', + ]); +- if (fromUsageMetadata != undefined && fromUsageMetadata != null) { +- setValueByPath(toObject, ['usageMetadata'], usageMetadataFromMldev(apiClient, fromUsageMetadata)); ++ if (fromGroundingMetadata != null) { ++ setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata); + } +- const fromGoAway = getValueByPath(fromObject, ['goAway']); +- if (fromGoAway !== undefined && fromGoAway !== null) { +- setValueByPath(toObject, ['goAway'], liveServerGoAwayFromMldev(fromGoAway)); ++ const fromIndex = getValueByPath(fromObject, ['index']); ++ if (fromIndex != null) { ++ setValueByPath(toObject, ['index'], fromIndex); + } +- const fromSessionResumptionUpdate = getValueByPath(fromObject, [ +- 'sessionResumptionUpdate', ++ const fromLogprobsResult = getValueByPath(fromObject, [ ++ 'logprobsResult', ++ ]); ++ if (fromLogprobsResult != null) { ++ setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult); ++ } ++ const fromSafetyRatings = getValueByPath(fromObject, [ ++ 'safetyRatings', + ]); +- if (fromSessionResumptionUpdate !== undefined && +- fromSessionResumptionUpdate !== null) { +- setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromMldev(fromSessionResumptionUpdate)); ++ if (fromSafetyRatings != null) { ++ setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings); + } + return toObject; + } +-function liveServerMessageFromVertex(apiClient, fromObject) { ++function generateContentResponseFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromSetupComplete = getValueByPath(fromObject, [ +- 'setupComplete', +- ]); +- if (fromSetupComplete !== undefined) { +- setValueByPath(toObject, ['setupComplete'], fromSetupComplete); +- } +- const fromServerContent = getValueByPath(fromObject, [ +- 'serverContent', +- ]); +- if (fromServerContent !== undefined && fromServerContent !== null) { +- setValueByPath(toObject, ['serverContent'], liveServerContentFromVertex(apiClient, fromServerContent)); +- } +- const fromToolCall = getValueByPath(fromObject, ['toolCall']); +- if (fromToolCall !== undefined && fromToolCall !== null) { +- setValueByPath(toObject, ['toolCall'], liveServerToolCallFromVertex(apiClient, fromToolCall)); +- } +- const fromToolCallCancellation = getValueByPath(fromObject, [ +- 'toolCallCancellation', +- ]); +- if (fromToolCallCancellation !== undefined && +- fromToolCallCancellation !== null) { +- setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromVertex(apiClient, fromToolCallCancellation)); ++ const fromCandidates = getValueByPath(fromObject, ['candidates']); ++ if (fromCandidates != null) { ++ if (Array.isArray(fromCandidates)) { ++ setValueByPath(toObject, ['candidates'], fromCandidates.map((item) => { ++ return candidateFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['candidates'], fromCandidates); ++ } + } +- const fromGoAway = getValueByPath(fromObject, ['goAway']); +- if (fromGoAway !== undefined && fromGoAway !== null) { +- setValueByPath(toObject, ['goAway'], liveServerGoAwayFromVertex(fromGoAway)); ++ const fromModelVersion = getValueByPath(fromObject, ['modelVersion']); ++ if (fromModelVersion != null) { ++ setValueByPath(toObject, ['modelVersion'], fromModelVersion); + } +- const fromSessionResumptionUpdate = getValueByPath(fromObject, [ +- 'sessionResumptionUpdate', ++ const fromPromptFeedback = getValueByPath(fromObject, [ ++ 'promptFeedback', + ]); +- if (fromSessionResumptionUpdate !== undefined && +- fromSessionResumptionUpdate !== null) { +- setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromVertex(fromSessionResumptionUpdate)); ++ if (fromPromptFeedback != null) { ++ setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback); + } + const fromUsageMetadata = getValueByPath(fromObject, [ + 'usageMetadata', + ]); +- if (fromUsageMetadata != undefined && fromUsageMetadata != null) { +- setValueByPath(toObject, ['usageMetadata'], usageMetadataFromVertex(apiClient, fromUsageMetadata)); ++ if (fromUsageMetadata != null) { ++ setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata); + } + return toObject; + } +-function slidingWindowToMldev(fromObject) { ++function contentEmbeddingFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']); +- if (fromTargetTokens !== undefined && fromTargetTokens !== null) { +- setValueByPath(toObject, ['targetTokens'], fromTargetTokens); ++ const fromValues = getValueByPath(fromObject, ['values']); ++ if (fromValues != null) { ++ setValueByPath(toObject, ['values'], fromValues); + } + return toObject; + } +-function slidingWindowToVertex(fromObject) { ++function embedContentMetadataFromMldev() { + const toObject = {}; +- const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']); +- if (fromTargetTokens !== undefined && fromTargetTokens !== null) { +- setValueByPath(toObject, ['targetTokens'], fromTargetTokens); ++ return toObject; ++} ++function embedContentResponseFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromEmbeddings = getValueByPath(fromObject, ['embeddings']); ++ if (fromEmbeddings != null) { ++ if (Array.isArray(fromEmbeddings)) { ++ setValueByPath(toObject, ['embeddings'], fromEmbeddings.map((item) => { ++ return contentEmbeddingFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['embeddings'], fromEmbeddings); ++ } ++ } ++ const fromMetadata = getValueByPath(fromObject, ['metadata']); ++ if (fromMetadata != null) { ++ setValueByPath(toObject, ['metadata'], embedContentMetadataFromMldev()); + } + return toObject; + } +-function contextWindowCompressionToMldev(fromObject) { ++function imageFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromTriggerTokens = getValueByPath(fromObject, [ +- 'triggerTokens', ++ const fromImageBytes = getValueByPath(fromObject, [ ++ 'bytesBase64Encoded', + ]); +- if (fromTriggerTokens !== undefined && fromTriggerTokens !== null) { +- setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens); ++ if (fromImageBytes != null) { ++ setValueByPath(toObject, ['imageBytes'], tBytes(apiClient, fromImageBytes)); + } +- const fromSlidingWindow = getValueByPath(fromObject, [ +- 'slidingWindow', +- ]); +- if (fromSlidingWindow !== undefined && fromSlidingWindow !== null) { +- setValueByPath(toObject, ['slidingWindow'], slidingWindowToMldev(fromSlidingWindow)); ++ const fromMimeType = getValueByPath(fromObject, ['mimeType']); ++ if (fromMimeType != null) { ++ setValueByPath(toObject, ['mimeType'], fromMimeType); + } + return toObject; + } +-function contextWindowCompressionToVertex(fromObject) { ++function safetyAttributesFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromTriggerTokens = getValueByPath(fromObject, [ +- 'triggerTokens', ++ const fromCategories = getValueByPath(fromObject, [ ++ 'safetyAttributes', ++ 'categories', + ]); +- if (fromTriggerTokens !== undefined && fromTriggerTokens !== null) { +- setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens); ++ if (fromCategories != null) { ++ setValueByPath(toObject, ['categories'], fromCategories); + } +- const fromSlidingWindow = getValueByPath(fromObject, [ +- 'slidingWindow', ++ const fromScores = getValueByPath(fromObject, [ ++ 'safetyAttributes', ++ 'scores', + ]); +- if (fromSlidingWindow !== undefined && fromSlidingWindow !== null) { +- setValueByPath(toObject, ['slidingWindow'], slidingWindowToVertex(fromSlidingWindow)); ++ if (fromScores != null) { ++ setValueByPath(toObject, ['scores'], fromScores); ++ } ++ const fromContentType = getValueByPath(fromObject, ['contentType']); ++ if (fromContentType != null) { ++ setValueByPath(toObject, ['contentType'], fromContentType); + } + return toObject; + } +-function automaticActivityDetectionToMldev(fromObject) { ++function generatedImageFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromDisabled = getValueByPath(fromObject, ['disabled']); +- if (fromDisabled !== undefined && fromDisabled !== null) { +- setValueByPath(toObject, ['disabled'], fromDisabled); ++ const fromImage = getValueByPath(fromObject, ['_self']); ++ if (fromImage != null) { ++ setValueByPath(toObject, ['image'], imageFromMldev(apiClient, fromImage)); + } +- const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [ +- 'startOfSpeechSensitivity', ++ const fromRaiFilteredReason = getValueByPath(fromObject, [ ++ 'raiFilteredReason', + ]); +- if (fromStartOfSpeechSensitivity !== undefined && +- fromStartOfSpeechSensitivity !== null) { +- setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity); ++ if (fromRaiFilteredReason != null) { ++ setValueByPath(toObject, ['raiFilteredReason'], fromRaiFilteredReason); + } +- const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [ +- 'endOfSpeechSensitivity', +- ]); +- if (fromEndOfSpeechSensitivity !== undefined && +- fromEndOfSpeechSensitivity !== null) { +- setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity); ++ const fromSafetyAttributes = getValueByPath(fromObject, ['_self']); ++ if (fromSafetyAttributes != null) { ++ setValueByPath(toObject, ['safetyAttributes'], safetyAttributesFromMldev(apiClient, fromSafetyAttributes)); + } +- const fromPrefixPaddingMs = getValueByPath(fromObject, [ +- 'prefixPaddingMs', ++ return toObject; ++} ++function generateImagesResponseFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromGeneratedImages = getValueByPath(fromObject, [ ++ 'predictions', + ]); +- if (fromPrefixPaddingMs !== undefined && fromPrefixPaddingMs !== null) { +- setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs); ++ if (fromGeneratedImages != null) { ++ if (Array.isArray(fromGeneratedImages)) { ++ setValueByPath(toObject, ['generatedImages'], fromGeneratedImages.map((item) => { ++ return generatedImageFromMldev(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['generatedImages'], fromGeneratedImages); ++ } + } +- const fromSilenceDurationMs = getValueByPath(fromObject, [ +- 'silenceDurationMs', ++ const fromPositivePromptSafetyAttributes = getValueByPath(fromObject, [ ++ 'positivePromptSafetyAttributes', + ]); +- if (fromSilenceDurationMs !== undefined && fromSilenceDurationMs !== null) { +- setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs); ++ if (fromPositivePromptSafetyAttributes != null) { ++ setValueByPath(toObject, ['positivePromptSafetyAttributes'], safetyAttributesFromMldev(apiClient, fromPositivePromptSafetyAttributes)); + } + return toObject; + } +-function automaticActivityDetectionToVertex(fromObject) { ++function tunedModelInfoFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromDisabled = getValueByPath(fromObject, ['disabled']); +- if (fromDisabled !== undefined && fromDisabled !== null) { +- setValueByPath(toObject, ['disabled'], fromDisabled); ++ const fromBaseModel = getValueByPath(fromObject, ['baseModel']); ++ if (fromBaseModel != null) { ++ setValueByPath(toObject, ['baseModel'], fromBaseModel); + } +- const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [ +- 'startOfSpeechSensitivity', +- ]); +- if (fromStartOfSpeechSensitivity !== undefined && +- fromStartOfSpeechSensitivity !== null) { +- setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity); ++ const fromCreateTime = getValueByPath(fromObject, ['createTime']); ++ if (fromCreateTime != null) { ++ setValueByPath(toObject, ['createTime'], fromCreateTime); ++ } ++ const fromUpdateTime = getValueByPath(fromObject, ['updateTime']); ++ if (fromUpdateTime != null) { ++ setValueByPath(toObject, ['updateTime'], fromUpdateTime); ++ } ++ return toObject; ++} ++function modelFromMldev(apiClient, fromObject) { ++ const toObject = {}; ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); ++ } ++ const fromDisplayName = getValueByPath(fromObject, ['displayName']); ++ if (fromDisplayName != null) { ++ setValueByPath(toObject, ['displayName'], fromDisplayName); ++ } ++ const fromDescription = getValueByPath(fromObject, ['description']); ++ if (fromDescription != null) { ++ setValueByPath(toObject, ['description'], fromDescription); ++ } ++ const fromVersion = getValueByPath(fromObject, ['version']); ++ if (fromVersion != null) { ++ setValueByPath(toObject, ['version'], fromVersion); ++ } ++ const fromTunedModelInfo = getValueByPath(fromObject, ['_self']); ++ if (fromTunedModelInfo != null) { ++ setValueByPath(toObject, ['tunedModelInfo'], tunedModelInfoFromMldev(apiClient, fromTunedModelInfo)); + } +- const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [ +- 'endOfSpeechSensitivity', ++ const fromInputTokenLimit = getValueByPath(fromObject, [ ++ 'inputTokenLimit', + ]); +- if (fromEndOfSpeechSensitivity !== undefined && +- fromEndOfSpeechSensitivity !== null) { +- setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity); ++ if (fromInputTokenLimit != null) { ++ setValueByPath(toObject, ['inputTokenLimit'], fromInputTokenLimit); + } +- const fromPrefixPaddingMs = getValueByPath(fromObject, [ +- 'prefixPaddingMs', ++ const fromOutputTokenLimit = getValueByPath(fromObject, [ ++ 'outputTokenLimit', + ]); +- if (fromPrefixPaddingMs !== undefined && fromPrefixPaddingMs !== null) { +- setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs); ++ if (fromOutputTokenLimit != null) { ++ setValueByPath(toObject, ['outputTokenLimit'], fromOutputTokenLimit); + } +- const fromSilenceDurationMs = getValueByPath(fromObject, [ +- 'silenceDurationMs', ++ const fromSupportedActions = getValueByPath(fromObject, [ ++ 'supportedGenerationMethods', + ]); +- if (fromSilenceDurationMs !== undefined && fromSilenceDurationMs !== null) { +- setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs); ++ if (fromSupportedActions != null) { ++ setValueByPath(toObject, ['supportedActions'], fromSupportedActions); + } + return toObject; + } +-function realtimeInputConfigToMldev(fromObject) { ++function countTokensResponseFromMldev(apiClient, fromObject) { + const toObject = {}; +- const fromAutomaticActivityDetection = getValueByPath(fromObject, [ +- 'automaticActivityDetection', +- ]); +- if (fromAutomaticActivityDetection !== undefined && +- fromAutomaticActivityDetection !== null) { +- setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToMldev(fromAutomaticActivityDetection)); ++ const fromTotalTokens = getValueByPath(fromObject, ['totalTokens']); ++ if (fromTotalTokens != null) { ++ setValueByPath(toObject, ['totalTokens'], fromTotalTokens); + } +- const fromActivityHandling = getValueByPath(fromObject, [ +- 'activityHandling', ++ const fromCachedContentTokenCount = getValueByPath(fromObject, [ ++ 'cachedContentTokenCount', + ]); +- if (fromActivityHandling !== undefined && fromActivityHandling !== null) { +- setValueByPath(toObject, ['activityHandling'], fromActivityHandling); +- } +- const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']); +- if (fromTurnCoverage !== undefined && fromTurnCoverage !== null) { +- setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage); ++ if (fromCachedContentTokenCount != null) { ++ setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); + } + return toObject; + } +-function realtimeInputConfigToVertex(fromObject) { ++function videoFromMldev$1(apiClient, fromObject) { + const toObject = {}; +- const fromAutomaticActivityDetection = getValueByPath(fromObject, [ +- 'automaticActivityDetection', +- ]); +- if (fromAutomaticActivityDetection !== undefined && +- fromAutomaticActivityDetection !== null) { +- setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToVertex(fromAutomaticActivityDetection)); ++ const fromUri = getValueByPath(fromObject, ['video', 'uri']); ++ if (fromUri != null) { ++ setValueByPath(toObject, ['uri'], fromUri); + } +- const fromActivityHandling = getValueByPath(fromObject, [ +- 'activityHandling', ++ const fromVideoBytes = getValueByPath(fromObject, [ ++ 'video', ++ 'encodedVideo', + ]); +- if (fromActivityHandling !== undefined && fromActivityHandling !== null) { +- setValueByPath(toObject, ['activityHandling'], fromActivityHandling); ++ if (fromVideoBytes != null) { ++ setValueByPath(toObject, ['videoBytes'], tBytes(apiClient, fromVideoBytes)); + } +- const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']); +- if (fromTurnCoverage !== undefined && fromTurnCoverage !== null) { +- setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage); ++ const fromMimeType = getValueByPath(fromObject, ['encoding']); ++ if (fromMimeType != null) { ++ setValueByPath(toObject, ['mimeType'], fromMimeType); + } + return toObject; + } +-function liveConnectConfigToMldev(apiClient, fromObject) { ++function generatedVideoFromMldev$1(apiClient, fromObject) { + const toObject = {}; +- const fromGenerationConfig = getValueByPath(fromObject, [ +- 'generationConfig', +- ]); +- if (fromGenerationConfig !== undefined) { +- setValueByPath(toObject, ['generationConfig'], fromGenerationConfig); ++ const fromVideo = getValueByPath(fromObject, ['_self']); ++ if (fromVideo != null) { ++ setValueByPath(toObject, ['video'], videoFromMldev$1(apiClient, fromVideo)); + } +- const fromResponseModalities = getValueByPath(fromObject, [ +- 'responseModalities', ++ return toObject; ++} ++function generateVideosResponseFromMldev$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromGeneratedVideos = getValueByPath(fromObject, [ ++ 'generatedSamples', + ]); +- if (fromResponseModalities !== undefined) { +- setValueByPath(toObject, ['generationConfig', 'responseModalities'], fromResponseModalities); ++ if (fromGeneratedVideos != null) { ++ if (Array.isArray(fromGeneratedVideos)) { ++ setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos.map((item) => { ++ return generatedVideoFromMldev$1(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos); ++ } + } +- const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); +- if (fromSpeechConfig !== undefined) { +- setValueByPath(toObject, ['generationConfig', 'speechConfig'], fromSpeechConfig); ++ const fromRaiMediaFilteredCount = getValueByPath(fromObject, [ ++ 'raiMediaFilteredCount', ++ ]); ++ if (fromRaiMediaFilteredCount != null) { ++ setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount); + } +- const fromSystemInstruction = getValueByPath(fromObject, [ +- 'systemInstruction', ++ const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [ ++ 'raiMediaFilteredReasons', + ]); +- if (fromSystemInstruction !== undefined && fromSystemInstruction !== null) { +- setValueByPath(toObject, ['systemInstruction'], contentToMldev(apiClient, fromSystemInstruction)); ++ if (fromRaiMediaFilteredReasons != null) { ++ setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons); + } +- const fromTools = getValueByPath(fromObject, ['tools']); +- if (fromTools !== undefined && +- fromTools !== null && +- Array.isArray(fromTools)) { +- setValueByPath(toObject, ['tools'], fromTools.map((item) => { +- return toolToMldev(apiClient, item); +- })); ++ return toObject; ++} ++function generateVideosOperationFromMldev$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); + } +- const fromSessionResumption = getValueByPath(fromObject, [ +- 'sessionResumption', +- ]); +- if (fromSessionResumption !== undefined && fromSessionResumption !== null) { +- setValueByPath(toObject, ['sessionResumption'], liveClientSessionResumptionConfigToMldev(fromSessionResumption)); ++ const fromMetadata = getValueByPath(fromObject, ['metadata']); ++ if (fromMetadata != null) { ++ setValueByPath(toObject, ['metadata'], fromMetadata); + } +- const fromContextWindowCompression = getValueByPath(fromObject, [ +- 'contextWindowCompression', +- ]); +- if (fromContextWindowCompression !== undefined && +- fromContextWindowCompression !== null) { +- setValueByPath(toObject, ['contextWindowCompression'], contextWindowCompressionToMldev(fromContextWindowCompression)); ++ const fromDone = getValueByPath(fromObject, ['done']); ++ if (fromDone != null) { ++ setValueByPath(toObject, ['done'], fromDone); + } +- const fromRealtimeInputConfig = getValueByPath(fromObject, [ +- 'realtimeInputConfig', ++ const fromError = getValueByPath(fromObject, ['error']); ++ if (fromError != null) { ++ setValueByPath(toObject, ['error'], fromError); ++ } ++ const fromResponse = getValueByPath(fromObject, [ ++ 'response', ++ 'generateVideoResponse', + ]); +- if (fromRealtimeInputConfig !== undefined && +- fromRealtimeInputConfig !== null) { +- setValueByPath(toObject, ['realtimeInputConfig'], realtimeInputConfigToMldev(fromRealtimeInputConfig)); ++ if (fromResponse != null) { ++ setValueByPath(toObject, ['response'], generateVideosResponseFromMldev$1(apiClient, fromResponse)); + } + return toObject; + } +-function liveConnectConfigToVertex(apiClient, fromObject) { ++function partFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromGenerationConfig = getValueByPath(fromObject, [ +- 'generationConfig', +- ]); +- if (fromGenerationConfig !== undefined) { +- setValueByPath(toObject, ['generationConfig'], fromGenerationConfig); +- } +- const fromResponseModalities = getValueByPath(fromObject, [ +- 'responseModalities', ++ const fromVideoMetadata = getValueByPath(fromObject, [ ++ 'videoMetadata', + ]); +- if (fromResponseModalities !== undefined) { +- setValueByPath(toObject, ['generationConfig', 'responseModalities'], fromResponseModalities); ++ if (fromVideoMetadata != null) { ++ setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata); + } +- else { +- // Set default to AUDIO to align with MLDev API. +- setValueByPath(toObject, ['generationConfig', 'responseModalities'], ['AUDIO']); ++ const fromThought = getValueByPath(fromObject, ['thought']); ++ if (fromThought != null) { ++ setValueByPath(toObject, ['thought'], fromThought); + } +- const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']); +- if (fromSpeechConfig !== undefined) { +- setValueByPath(toObject, ['generationConfig', 'speechConfig'], fromSpeechConfig); ++ const fromCodeExecutionResult = getValueByPath(fromObject, [ ++ 'codeExecutionResult', ++ ]); ++ if (fromCodeExecutionResult != null) { ++ setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult); + } +- const fromSystemInstruction = getValueByPath(fromObject, [ +- 'systemInstruction', ++ const fromExecutableCode = getValueByPath(fromObject, [ ++ 'executableCode', + ]); +- if (fromSystemInstruction !== undefined && fromSystemInstruction !== null) { +- setValueByPath(toObject, ['systemInstruction'], contentToVertex(apiClient, fromSystemInstruction)); ++ if (fromExecutableCode != null) { ++ setValueByPath(toObject, ['executableCode'], fromExecutableCode); + } +- const fromTools = getValueByPath(fromObject, ['tools']); +- if (fromTools !== undefined && +- fromTools !== null && +- Array.isArray(fromTools)) { +- setValueByPath(toObject, ['tools'], fromTools.map((item) => { +- return toolToVertex(apiClient, item); +- })); ++ const fromFileData = getValueByPath(fromObject, ['fileData']); ++ if (fromFileData != null) { ++ setValueByPath(toObject, ['fileData'], fromFileData); + } +- const fromSessionResumption = getValueByPath(fromObject, [ +- 'sessionResumption', +- ]); +- if (fromSessionResumption !== undefined && fromSessionResumption !== null) { +- setValueByPath(toObject, ['sessionResumption'], liveClientSessionResumptionConfigToVertex(fromSessionResumption)); ++ const fromFunctionCall = getValueByPath(fromObject, ['functionCall']); ++ if (fromFunctionCall != null) { ++ setValueByPath(toObject, ['functionCall'], fromFunctionCall); + } +- const fromContextWindowCompression = getValueByPath(fromObject, [ +- 'contextWindowCompression', ++ const fromFunctionResponse = getValueByPath(fromObject, [ ++ 'functionResponse', + ]); +- if (fromContextWindowCompression !== undefined && +- fromContextWindowCompression !== null) { +- setValueByPath(toObject, ['contextWindowCompression'], contextWindowCompressionToVertex(fromContextWindowCompression)); ++ if (fromFunctionResponse != null) { ++ setValueByPath(toObject, ['functionResponse'], fromFunctionResponse); + } +- const fromRealtimeInputConfig = getValueByPath(fromObject, [ +- 'realtimeInputConfig', +- ]); +- if (fromRealtimeInputConfig !== undefined && +- fromRealtimeInputConfig !== null) { +- setValueByPath(toObject, ['realtimeInputConfig'], realtimeInputConfigToVertex(fromRealtimeInputConfig)); ++ const fromInlineData = getValueByPath(fromObject, ['inlineData']); ++ if (fromInlineData != null) { ++ setValueByPath(toObject, ['inlineData'], fromInlineData); ++ } ++ const fromText = getValueByPath(fromObject, ['text']); ++ if (fromText != null) { ++ setValueByPath(toObject, ['text'], fromText); + } + return toObject; + } +-function liveServerContentFromMldev(apiClient, fromObject) { ++function contentFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromModelTurn = getValueByPath(fromObject, ['modelTurn']); +- if (fromModelTurn !== undefined && fromModelTurn !== null) { +- setValueByPath(toObject, ['modelTurn'], contentFromMldev(apiClient, fromModelTurn)); +- } +- const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']); +- if (fromTurnComplete !== undefined) { +- setValueByPath(toObject, ['turnComplete'], fromTurnComplete); ++ const fromParts = getValueByPath(fromObject, ['parts']); ++ if (fromParts != null) { ++ if (Array.isArray(fromParts)) { ++ setValueByPath(toObject, ['parts'], fromParts.map((item) => { ++ return partFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['parts'], fromParts); ++ } + } +- const fromInterrupted = getValueByPath(fromObject, ['interrupted']); +- if (fromInterrupted !== undefined) { +- setValueByPath(toObject, ['interrupted'], fromInterrupted); ++ const fromRole = getValueByPath(fromObject, ['role']); ++ if (fromRole != null) { ++ setValueByPath(toObject, ['role'], fromRole); + } +- const fromGenerationComplete = getValueByPath(fromObject, [ +- 'generationComplete', +- ]); +- if (fromGenerationComplete != null) { +- setValueByPath(toObject, ['generationComplete'], fromGenerationComplete); ++ return toObject; ++} ++function citationMetadataFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromCitations = getValueByPath(fromObject, ['citations']); ++ if (fromCitations != null) { ++ setValueByPath(toObject, ['citations'], fromCitations); + } + return toObject; + } +-function liveServerContentFromVertex(apiClient, fromObject) { ++function candidateFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromModelTurn = getValueByPath(fromObject, ['modelTurn']); +- if (fromModelTurn !== undefined && fromModelTurn !== null) { +- setValueByPath(toObject, ['modelTurn'], contentFromVertex(apiClient, fromModelTurn)); ++ const fromContent = getValueByPath(fromObject, ['content']); ++ if (fromContent != null) { ++ setValueByPath(toObject, ['content'], contentFromVertex(apiClient, fromContent)); + } +- const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']); +- if (fromTurnComplete !== undefined) { +- setValueByPath(toObject, ['turnComplete'], fromTurnComplete); ++ const fromCitationMetadata = getValueByPath(fromObject, [ ++ 'citationMetadata', ++ ]); ++ if (fromCitationMetadata != null) { ++ setValueByPath(toObject, ['citationMetadata'], citationMetadataFromVertex(apiClient, fromCitationMetadata)); + } +- const fromInterrupted = getValueByPath(fromObject, ['interrupted']); +- if (fromInterrupted !== undefined) { +- setValueByPath(toObject, ['interrupted'], fromInterrupted); ++ const fromFinishMessage = getValueByPath(fromObject, [ ++ 'finishMessage', ++ ]); ++ if (fromFinishMessage != null) { ++ setValueByPath(toObject, ['finishMessage'], fromFinishMessage); ++ } ++ const fromFinishReason = getValueByPath(fromObject, ['finishReason']); ++ if (fromFinishReason != null) { ++ setValueByPath(toObject, ['finishReason'], fromFinishReason); ++ } ++ const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']); ++ if (fromAvgLogprobs != null) { ++ setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs); ++ } ++ const fromGroundingMetadata = getValueByPath(fromObject, [ ++ 'groundingMetadata', ++ ]); ++ if (fromGroundingMetadata != null) { ++ setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata); ++ } ++ const fromIndex = getValueByPath(fromObject, ['index']); ++ if (fromIndex != null) { ++ setValueByPath(toObject, ['index'], fromIndex); ++ } ++ const fromLogprobsResult = getValueByPath(fromObject, [ ++ 'logprobsResult', ++ ]); ++ if (fromLogprobsResult != null) { ++ setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult); + } +- const fromGenerationComplete = getValueByPath(fromObject, [ +- 'generationComplete', ++ const fromSafetyRatings = getValueByPath(fromObject, [ ++ 'safetyRatings', + ]); +- if (fromGenerationComplete != null) { +- setValueByPath(toObject, ['generationComplete'], fromGenerationComplete); ++ if (fromSafetyRatings != null) { ++ setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings); + } + return toObject; + } +-function functionCallFromMldev(apiClient, fromObject) { ++function generateContentResponseFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromId = getValueByPath(fromObject, ['id']); +- if (fromId !== undefined) { +- setValueByPath(toObject, ['id'], fromId); +- } +- const fromArgs = getValueByPath(fromObject, ['args']); +- if (fromArgs !== undefined) { +- setValueByPath(toObject, ['args'], fromArgs); ++ const fromCandidates = getValueByPath(fromObject, ['candidates']); ++ if (fromCandidates != null) { ++ if (Array.isArray(fromCandidates)) { ++ setValueByPath(toObject, ['candidates'], fromCandidates.map((item) => { ++ return candidateFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['candidates'], fromCandidates); ++ } + } +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName !== undefined) { +- setValueByPath(toObject, ['name'], fromName); ++ const fromCreateTime = getValueByPath(fromObject, ['createTime']); ++ if (fromCreateTime != null) { ++ setValueByPath(toObject, ['createTime'], fromCreateTime); + } +- return toObject; +-} +-function functionCallFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromArgs = getValueByPath(fromObject, ['args']); +- if (fromArgs !== undefined) { +- setValueByPath(toObject, ['args'], fromArgs); ++ const fromResponseId = getValueByPath(fromObject, ['responseId']); ++ if (fromResponseId != null) { ++ setValueByPath(toObject, ['responseId'], fromResponseId); + } +- const fromName = getValueByPath(fromObject, ['name']); +- if (fromName !== undefined) { +- setValueByPath(toObject, ['name'], fromName); ++ const fromModelVersion = getValueByPath(fromObject, ['modelVersion']); ++ if (fromModelVersion != null) { ++ setValueByPath(toObject, ['modelVersion'], fromModelVersion); + } +- return toObject; +-} +-function liveServerToolCallFromMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromFunctionCalls = getValueByPath(fromObject, [ +- 'functionCalls', ++ const fromPromptFeedback = getValueByPath(fromObject, [ ++ 'promptFeedback', + ]); +- if (fromFunctionCalls !== undefined && +- fromFunctionCalls !== null && +- Array.isArray(fromFunctionCalls)) { +- setValueByPath(toObject, ['functionCalls'], fromFunctionCalls.map((item) => { +- return functionCallFromMldev(apiClient, item); +- })); ++ if (fromPromptFeedback != null) { ++ setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback); + } +- return toObject; +-} +-function liveServerToolCallFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromFunctionCalls = getValueByPath(fromObject, [ +- 'functionCalls', ++ const fromUsageMetadata = getValueByPath(fromObject, [ ++ 'usageMetadata', + ]); +- if (fromFunctionCalls !== undefined && +- fromFunctionCalls !== null && +- Array.isArray(fromFunctionCalls)) { +- setValueByPath(toObject, ['functionCalls'], fromFunctionCalls.map((item) => { +- return functionCallFromVertex(apiClient, item); +- })); ++ if (fromUsageMetadata != null) { ++ setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata); + } + return toObject; + } +-function liveServerToolCallCancellationFromMldev(apiClient, fromObject) { ++function contentEmbeddingStatisticsFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromIds = getValueByPath(fromObject, ['ids']); +- if (fromIds !== undefined) { +- setValueByPath(toObject, ['ids'], fromIds); ++ const fromTruncated = getValueByPath(fromObject, ['truncated']); ++ if (fromTruncated != null) { ++ setValueByPath(toObject, ['truncated'], fromTruncated); + } +- return toObject; +-} +-function liveServerToolCallCancellationFromVertex(apiClient, fromObject) { +- const toObject = {}; +- const fromIds = getValueByPath(fromObject, ['ids']); +- if (fromIds !== undefined) { +- setValueByPath(toObject, ['ids'], fromIds); ++ const fromTokenCount = getValueByPath(fromObject, ['token_count']); ++ if (fromTokenCount != null) { ++ setValueByPath(toObject, ['tokenCount'], fromTokenCount); + } + return toObject; + } +-function liveServerGoAwayFromMldev(fromObject) { ++function contentEmbeddingFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']); +- if (fromTimeLeft !== undefined) { +- setValueByPath(toObject, ['timeLeft'], fromTimeLeft); ++ const fromValues = getValueByPath(fromObject, ['values']); ++ if (fromValues != null) { ++ setValueByPath(toObject, ['values'], fromValues); + } +- return toObject; +-} +-function liveServerGoAwayFromVertex(fromObject) { +- const toObject = {}; +- const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']); +- if (fromTimeLeft !== undefined) { +- setValueByPath(toObject, ['timeLeft'], fromTimeLeft); ++ const fromStatistics = getValueByPath(fromObject, ['statistics']); ++ if (fromStatistics != null) { ++ setValueByPath(toObject, ['statistics'], contentEmbeddingStatisticsFromVertex(apiClient, fromStatistics)); + } + return toObject; + } +-function liveServerSessionResumptionUpdateFromMldev(fromObject) { ++function embedContentMetadataFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromNewHandle = getValueByPath(fromObject, ['newHandle']); +- if (fromNewHandle !== undefined) { +- setValueByPath(toObject, ['newHandle'], fromNewHandle); +- } +- const fromResumable = getValueByPath(fromObject, ['resumable']); +- if (fromResumable !== undefined) { +- setValueByPath(toObject, ['resumable'], fromResumable); +- } +- const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [ +- 'lastConsumedClientMessageIndex', ++ const fromBillableCharacterCount = getValueByPath(fromObject, [ ++ 'billableCharacterCount', + ]); +- if (fromLastConsumedClientMessageIndex !== undefined) { +- setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex); ++ if (fromBillableCharacterCount != null) { ++ setValueByPath(toObject, ['billableCharacterCount'], fromBillableCharacterCount); + } + return toObject; + } +-function liveServerSessionResumptionUpdateFromVertex(fromObject) { ++function embedContentResponseFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromNewHandle = getValueByPath(fromObject, ['newHandle']); +- if (fromNewHandle !== undefined) { +- setValueByPath(toObject, ['newHandle'], fromNewHandle); +- } +- const fromResumable = getValueByPath(fromObject, ['resumable']); +- if (fromResumable !== undefined) { +- setValueByPath(toObject, ['resumable'], fromResumable); +- } +- const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [ +- 'lastConsumedClientMessageIndex', ++ const fromEmbeddings = getValueByPath(fromObject, [ ++ 'predictions[]', ++ 'embeddings', + ]); +- if (fromLastConsumedClientMessageIndex !== undefined) { +- setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex); +- } +- return toObject; +-} +-function liveClientSessionResumptionConfigToMldev(fromObject) { +- const toObject = {}; +- const fromHandle = getValueByPath(fromObject, ['handle']); +- if (fromHandle !== undefined) { +- setValueByPath(toObject, ['handle'], fromHandle); ++ if (fromEmbeddings != null) { ++ if (Array.isArray(fromEmbeddings)) { ++ setValueByPath(toObject, ['embeddings'], fromEmbeddings.map((item) => { ++ return contentEmbeddingFromVertex(apiClient, item); ++ })); ++ } ++ else { ++ setValueByPath(toObject, ['embeddings'], fromEmbeddings); ++ } + } +- if (getValueByPath(fromObject, ['transparent']) !== undefined) { +- throw new Error('transparent parameter is not supported in Gemini API.'); ++ const fromMetadata = getValueByPath(fromObject, ['metadata']); ++ if (fromMetadata != null) { ++ setValueByPath(toObject, ['metadata'], embedContentMetadataFromVertex(apiClient, fromMetadata)); + } + return toObject; + } +-function liveClientSessionResumptionConfigToVertex(fromObject) { ++function imageFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromHandle = getValueByPath(fromObject, ['handle']); +- if (fromHandle !== undefined) { +- setValueByPath(toObject, ['handle'], fromHandle); +- } +- const fromTransparent = getValueByPath(fromObject, ['transparent']); +- if (fromTransparent !== undefined) { +- setValueByPath(toObject, ['transparent'], fromTransparent); ++ const fromGcsUri = getValueByPath(fromObject, ['gcsUri']); ++ if (fromGcsUri != null) { ++ setValueByPath(toObject, ['gcsUri'], fromGcsUri); + } +- return toObject; +-} +-function modalityTokenCountFromMldev(apiClient, fromObject) { +- const toObject = {}; +- const fromModality = getValueByPath(fromObject, ['modality']); +- if (fromModality != null) { +- setValueByPath(toObject, ['modality'], fromModality); ++ const fromImageBytes = getValueByPath(fromObject, [ ++ 'bytesBase64Encoded', ++ ]); ++ if (fromImageBytes != null) { ++ setValueByPath(toObject, ['imageBytes'], tBytes(apiClient, fromImageBytes)); + } +- const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); +- if (fromTokenCount != null) { +- setValueByPath(toObject, ['tokenCount'], fromTokenCount); ++ const fromMimeType = getValueByPath(fromObject, ['mimeType']); ++ if (fromMimeType != null) { ++ setValueByPath(toObject, ['mimeType'], fromMimeType); + } + return toObject; + } +-function usageMetadataFromMldev(apiClient, fromObject) { ++function safetyAttributesFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromPromptTokenCount = getValueByPath(fromObject, [ +- 'promptTokenCount', +- ]); +- if (fromPromptTokenCount != null) { +- setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount); +- } +- const fromCachedContentTokenCount = getValueByPath(fromObject, [ +- 'cachedContentTokenCount', ++ const fromCategories = getValueByPath(fromObject, [ ++ 'safetyAttributes', ++ 'categories', + ]); +- if (fromCachedContentTokenCount != null) { +- setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); ++ if (fromCategories != null) { ++ setValueByPath(toObject, ['categories'], fromCategories); + } +- const fromResponseTokenCount = getValueByPath(fromObject, [ +- 'responseTokenCount', ++ const fromScores = getValueByPath(fromObject, [ ++ 'safetyAttributes', ++ 'scores', + ]); +- if (fromResponseTokenCount != null) { +- setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount); ++ if (fromScores != null) { ++ setValueByPath(toObject, ['scores'], fromScores); + } +- const fromToolUsePromptTokenCount = getValueByPath(fromObject, [ +- 'toolUsePromptTokenCount', +- ]); +- if (fromToolUsePromptTokenCount != null) { +- setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount); ++ const fromContentType = getValueByPath(fromObject, ['contentType']); ++ if (fromContentType != null) { ++ setValueByPath(toObject, ['contentType'], fromContentType); + } +- const fromThoughtsTokenCount = getValueByPath(fromObject, [ +- 'thoughtsTokenCount', +- ]); +- if (fromThoughtsTokenCount != null) { +- setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount); ++ return toObject; ++} ++function generatedImageFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromImage = getValueByPath(fromObject, ['_self']); ++ if (fromImage != null) { ++ setValueByPath(toObject, ['image'], imageFromVertex(apiClient, fromImage)); + } +- const fromTotalTokenCount = getValueByPath(fromObject, [ +- 'totalTokenCount', ++ const fromRaiFilteredReason = getValueByPath(fromObject, [ ++ 'raiFilteredReason', + ]); +- if (fromTotalTokenCount != null) { +- setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount); ++ if (fromRaiFilteredReason != null) { ++ setValueByPath(toObject, ['raiFilteredReason'], fromRaiFilteredReason); + } +- const fromPromptTokensDetails = getValueByPath(fromObject, [ +- 'promptTokensDetails', +- ]); +- if (fromPromptTokensDetails != null) { +- if (Array.isArray(fromPromptTokensDetails)) { +- setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails.map((item) => { +- return modalityTokenCountFromMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails); +- } ++ const fromSafetyAttributes = getValueByPath(fromObject, ['_self']); ++ if (fromSafetyAttributes != null) { ++ setValueByPath(toObject, ['safetyAttributes'], safetyAttributesFromVertex(apiClient, fromSafetyAttributes)); + } +- const fromCacheTokensDetails = getValueByPath(fromObject, [ +- 'cacheTokensDetails', +- ]); +- if (fromCacheTokensDetails != null) { +- if (Array.isArray(fromCacheTokensDetails)) { +- setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails.map((item) => { +- return modalityTokenCountFromMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails); +- } ++ const fromEnhancedPrompt = getValueByPath(fromObject, ['prompt']); ++ if (fromEnhancedPrompt != null) { ++ setValueByPath(toObject, ['enhancedPrompt'], fromEnhancedPrompt); + } +- const fromResponseTokensDetails = getValueByPath(fromObject, [ +- 'responseTokensDetails', ++ return toObject; ++} ++function generateImagesResponseFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromGeneratedImages = getValueByPath(fromObject, [ ++ 'predictions', + ]); +- if (fromResponseTokensDetails != null) { +- if (Array.isArray(fromResponseTokensDetails)) { +- setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails.map((item) => { +- return modalityTokenCountFromMldev(apiClient, item); ++ if (fromGeneratedImages != null) { ++ if (Array.isArray(fromGeneratedImages)) { ++ setValueByPath(toObject, ['generatedImages'], fromGeneratedImages.map((item) => { ++ return generatedImageFromVertex(apiClient, item); + })); + } + else { +- setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails); ++ setValueByPath(toObject, ['generatedImages'], fromGeneratedImages); + } + } +- const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [ +- 'toolUsePromptTokensDetails', ++ const fromPositivePromptSafetyAttributes = getValueByPath(fromObject, [ ++ 'positivePromptSafetyAttributes', + ]); +- if (fromToolUsePromptTokensDetails != null) { +- if (Array.isArray(fromToolUsePromptTokensDetails)) { +- setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails.map((item) => { +- return modalityTokenCountFromMldev(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails); +- } ++ if (fromPositivePromptSafetyAttributes != null) { ++ setValueByPath(toObject, ['positivePromptSafetyAttributes'], safetyAttributesFromVertex(apiClient, fromPositivePromptSafetyAttributes)); + } + return toObject; + } +-function modalityTokenCountFromVertex(apiClient, fromObject) { ++function endpointFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromModality = getValueByPath(fromObject, ['modality']); +- if (fromModality != null) { +- setValueByPath(toObject, ['modality'], fromModality); ++ const fromName = getValueByPath(fromObject, ['endpoint']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); + } +- const fromTokenCount = getValueByPath(fromObject, ['tokenCount']); +- if (fromTokenCount != null) { +- setValueByPath(toObject, ['tokenCount'], fromTokenCount); ++ const fromDeployedModelId = getValueByPath(fromObject, [ ++ 'deployedModelId', ++ ]); ++ if (fromDeployedModelId != null) { ++ setValueByPath(toObject, ['deployedModelId'], fromDeployedModelId); + } + return toObject; + } +-function usageMetadataFromVertex(apiClient, fromObject) { ++function tunedModelInfoFromVertex(apiClient, fromObject) { + const toObject = {}; +- const fromPromptTokenCount = getValueByPath(fromObject, [ +- 'promptTokenCount', ++ const fromBaseModel = getValueByPath(fromObject, [ ++ 'labels', ++ 'google-vertex-llm-tuning-base-model-id', + ]); +- if (fromPromptTokenCount != null) { +- setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount); ++ if (fromBaseModel != null) { ++ setValueByPath(toObject, ['baseModel'], fromBaseModel); + } +- const fromCachedContentTokenCount = getValueByPath(fromObject, [ +- 'cachedContentTokenCount', +- ]); +- if (fromCachedContentTokenCount != null) { +- setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount); ++ const fromCreateTime = getValueByPath(fromObject, ['createTime']); ++ if (fromCreateTime != null) { ++ setValueByPath(toObject, ['createTime'], fromCreateTime); + } +- const fromResponseTokenCount = getValueByPath(fromObject, [ +- 'candidatesTokenCount', +- ]); +- if (fromResponseTokenCount != null) { +- setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount); ++ const fromUpdateTime = getValueByPath(fromObject, ['updateTime']); ++ if (fromUpdateTime != null) { ++ setValueByPath(toObject, ['updateTime'], fromUpdateTime); + } +- const fromToolUsePromptTokenCount = getValueByPath(fromObject, [ +- 'toolUsePromptTokenCount', +- ]); +- if (fromToolUsePromptTokenCount != null) { +- setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount); ++ return toObject; ++} ++function modelFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); + } +- const fromThoughtsTokenCount = getValueByPath(fromObject, [ +- 'thoughtsTokenCount', +- ]); +- if (fromThoughtsTokenCount != null) { +- setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount); ++ const fromDisplayName = getValueByPath(fromObject, ['displayName']); ++ if (fromDisplayName != null) { ++ setValueByPath(toObject, ['displayName'], fromDisplayName); + } +- const fromTotalTokenCount = getValueByPath(fromObject, [ +- 'totalTokenCount', +- ]); +- if (fromTotalTokenCount != null) { +- setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount); ++ const fromDescription = getValueByPath(fromObject, ['description']); ++ if (fromDescription != null) { ++ setValueByPath(toObject, ['description'], fromDescription); + } +- const fromPromptTokensDetails = getValueByPath(fromObject, [ +- 'promptTokensDetails', +- ]); +- if (fromPromptTokensDetails != null) { +- if (Array.isArray(fromPromptTokensDetails)) { +- setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails.map((item) => { +- return modalityTokenCountFromVertex(apiClient, item); ++ const fromVersion = getValueByPath(fromObject, ['versionId']); ++ if (fromVersion != null) { ++ setValueByPath(toObject, ['version'], fromVersion); ++ } ++ const fromEndpoints = getValueByPath(fromObject, ['deployedModels']); ++ if (fromEndpoints != null) { ++ if (Array.isArray(fromEndpoints)) { ++ setValueByPath(toObject, ['endpoints'], fromEndpoints.map((item) => { ++ return endpointFromVertex(apiClient, item); + })); + } + else { +- setValueByPath(toObject, ['promptTokensDetails'], fromPromptTokensDetails); ++ setValueByPath(toObject, ['endpoints'], fromEndpoints); + } + } +- const fromCacheTokensDetails = getValueByPath(fromObject, [ +- 'cacheTokensDetails', ++ const fromLabels = getValueByPath(fromObject, ['labels']); ++ if (fromLabels != null) { ++ setValueByPath(toObject, ['labels'], fromLabels); ++ } ++ const fromTunedModelInfo = getValueByPath(fromObject, ['_self']); ++ if (fromTunedModelInfo != null) { ++ setValueByPath(toObject, ['tunedModelInfo'], tunedModelInfoFromVertex(apiClient, fromTunedModelInfo)); ++ } ++ return toObject; ++} ++function countTokensResponseFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTotalTokens = getValueByPath(fromObject, ['totalTokens']); ++ if (fromTotalTokens != null) { ++ setValueByPath(toObject, ['totalTokens'], fromTotalTokens); ++ } ++ return toObject; ++} ++function computeTokensResponseFromVertex(apiClient, fromObject) { ++ const toObject = {}; ++ const fromTokensInfo = getValueByPath(fromObject, ['tokensInfo']); ++ if (fromTokensInfo != null) { ++ setValueByPath(toObject, ['tokensInfo'], fromTokensInfo); ++ } ++ return toObject; ++} ++function videoFromVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromUri = getValueByPath(fromObject, ['gcsUri']); ++ if (fromUri != null) { ++ setValueByPath(toObject, ['uri'], fromUri); ++ } ++ const fromVideoBytes = getValueByPath(fromObject, [ ++ 'bytesBase64Encoded', + ]); +- if (fromCacheTokensDetails != null) { +- if (Array.isArray(fromCacheTokensDetails)) { +- setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails.map((item) => { +- return modalityTokenCountFromVertex(apiClient, item); ++ if (fromVideoBytes != null) { ++ setValueByPath(toObject, ['videoBytes'], tBytes(apiClient, fromVideoBytes)); ++ } ++ const fromMimeType = getValueByPath(fromObject, ['mimeType']); ++ if (fromMimeType != null) { ++ setValueByPath(toObject, ['mimeType'], fromMimeType); ++ } ++ return toObject; ++} ++function generatedVideoFromVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromVideo = getValueByPath(fromObject, ['_self']); ++ if (fromVideo != null) { ++ setValueByPath(toObject, ['video'], videoFromVertex$1(apiClient, fromVideo)); ++ } ++ return toObject; ++} ++function generateVideosResponseFromVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromGeneratedVideos = getValueByPath(fromObject, ['videos']); ++ if (fromGeneratedVideos != null) { ++ if (Array.isArray(fromGeneratedVideos)) { ++ setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos.map((item) => { ++ return generatedVideoFromVertex$1(apiClient, item); + })); + } + else { +- setValueByPath(toObject, ['cacheTokensDetails'], fromCacheTokensDetails); ++ setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos); + } + } +- const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [ +- 'toolUsePromptTokensDetails', ++ const fromRaiMediaFilteredCount = getValueByPath(fromObject, [ ++ 'raiMediaFilteredCount', + ]); +- if (fromToolUsePromptTokensDetails != null) { +- if (Array.isArray(fromToolUsePromptTokensDetails)) { +- setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails.map((item) => { +- return modalityTokenCountFromVertex(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['toolUsePromptTokensDetails'], fromToolUsePromptTokensDetails); +- } ++ if (fromRaiMediaFilteredCount != null) { ++ setValueByPath(toObject, ['raiMediaFilteredCount'], fromRaiMediaFilteredCount); + } +- const fromResponseTokensDetails = getValueByPath(fromObject, [ +- 'candidatesTokensDetails', ++ const fromRaiMediaFilteredReasons = getValueByPath(fromObject, [ ++ 'raiMediaFilteredReasons', + ]); +- if (fromResponseTokensDetails != null) { +- if (Array.isArray(fromResponseTokensDetails)) { +- setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails.map((item) => { +- return modalityTokenCountFromVertex(apiClient, item); +- })); +- } +- else { +- setValueByPath(toObject, ['responseTokensDetails'], fromResponseTokensDetails); +- } ++ if (fromRaiMediaFilteredReasons != null) { ++ setValueByPath(toObject, ['raiMediaFilteredReasons'], fromRaiMediaFilteredReasons); + } +- const fromTrafficType = getValueByPath(fromObject, ['trafficType']); +- if (fromTrafficType != null) { +- setValueByPath(toObject, ['trafficType'], fromTrafficType); ++ return toObject; ++} ++function generateVideosOperationFromVertex$1(apiClient, fromObject) { ++ const toObject = {}; ++ const fromName = getValueByPath(fromObject, ['name']); ++ if (fromName != null) { ++ setValueByPath(toObject, ['name'], fromName); ++ } ++ const fromMetadata = getValueByPath(fromObject, ['metadata']); ++ if (fromMetadata != null) { ++ setValueByPath(toObject, ['metadata'], fromMetadata); ++ } ++ const fromDone = getValueByPath(fromObject, ['done']); ++ if (fromDone != null) { ++ setValueByPath(toObject, ['done'], fromDone); ++ } ++ const fromError = getValueByPath(fromObject, ['error']); ++ if (fromError != null) { ++ setValueByPath(toObject, ['error'], fromError); ++ } ++ const fromResponse = getValueByPath(fromObject, ['response']); ++ if (fromResponse != null) { ++ setValueByPath(toObject, ['response'], generateVideosResponseFromVertex$1(apiClient, fromResponse)); + } + return toObject; + } +@@ -6698,17 +7195,20 @@ class Live { + @experimental + + @remarks +- If using the Gemini API, Live is currently only supported behind API +- version `v1alpha`. Ensure that the API version is set to `v1alpha` when +- initializing the SDK if relying on the Gemini API. + + @param params - The parameters for establishing a connection to the model. + @return A live session. + + @example + ```ts ++ let model: string; ++ if (GOOGLE_GENAI_USE_VERTEXAI) { ++ model = 'gemini-2.0-flash-live-preview-04-09'; ++ } else { ++ model = 'gemini-2.0-flash-live-001'; ++ } + const session = await ai.live.connect({ +- model: 'gemini-2.0-flash-exp', ++ model: model, + config: { + responseModalities: [Modality.AUDIO], + }, +@@ -6730,7 +7230,7 @@ class Live { + ``` + */ + async connect(params) { +- var _a, _b; ++ var _a, _b, _c; + const websocketBaseUrl = this.apiClient.getWebsocketBaseUrl(); + const apiVersion = this.apiClient.getApiVersion(); + let url; +@@ -6777,6 +7277,16 @@ class Live { + `projects/${project}/locations/${location}/` + transformedModel; + } + let clientMessage = {}; ++ if (this.apiClient.isVertexAI() && ++ ((_c = params.config) === null || _c === void 0 ? void 0 : _c.responseModalities) === undefined) { ++ // Set default to AUDIO to align with MLDev API. ++ if (params.config === undefined) { ++ params.config = { responseModalities: [Modality.AUDIO] }; ++ } ++ else { ++ params.config.responseModalities = [Modality.AUDIO]; ++ } ++ } + const liveConnectParameters = { + model: transformedModel, + config: params.config, +@@ -6788,6 +7298,7 @@ class Live { + else { + clientMessage = liveConnectParametersToMldev(this.apiClient, liveConnectParameters); + } ++ delete clientMessage['config']; + conn.send(JSON.stringify(clientMessage)); + return new Session(conn, this.apiClient); + } +@@ -6984,8 +7495,14 @@ class Session { + + @example + ```ts ++ let model: string; ++ if (GOOGLE_GENAI_USE_VERTEXAI) { ++ model = 'gemini-2.0-flash-live-preview-04-09'; ++ } else { ++ model = 'gemini-2.0-flash-live-001'; ++ } + const session = await ai.live.connect({ +- model: 'gemini-2.0-flash-exp', ++ model: model, + config: { + responseModalities: [Modality.AUDIO], + } +@@ -7251,7 +7768,7 @@ class Models extends BaseModule { + _c = apiResponse_1_1.value; + _d = false; + const chunk = _c; +- const resp = generateContentResponseFromVertex(apiClient, chunk); ++ const resp = generateContentResponseFromVertex(apiClient, (yield __await(chunk.json()))); + const typedResp = new GenerateContentResponse(); + Object.assign(typedResp, resp); + yield yield __await(typedResp); +@@ -7290,7 +7807,7 @@ class Models extends BaseModule { + _c = apiResponse_2_1.value; + _d = false; + const chunk = _c; +- const resp = generateContentResponseFromMldev(apiClient, chunk); ++ const resp = generateContentResponseFromMldev(apiClient, (yield __await(chunk.json()))); + const typedResp = new GenerateContentResponse(); + Object.assign(typedResp, resp); + yield yield __await(typedResp); +@@ -7852,13 +8369,6 @@ function generateVideosOperationFromMldev(apiClient, fromObject) { + if (fromResponse != null) { + setValueByPath(toObject, ['response'], generateVideosResponseFromMldev(apiClient, fromResponse)); + } +- const fromResult = getValueByPath(fromObject, [ +- 'response', +- 'generateVideoResponse', +- ]); +- if (fromResult != null) { +- setValueByPath(toObject, ['result'], generateVideosResponseFromMldev(apiClient, fromResult)); +- } + return toObject; + } + function videoFromVertex(apiClient, fromObject) { +@@ -7936,10 +8446,6 @@ function generateVideosOperationFromVertex(apiClient, fromObject) { + if (fromResponse != null) { + setValueByPath(toObject, ['response'], generateVideosResponseFromVertex(apiClient, fromResponse)); + } +- const fromResult = getValueByPath(fromObject, ['response']); +- if (fromResult != null) { +- setValueByPath(toObject, ['result'], generateVideosResponseFromVertex(apiClient, fromResult)); +- } + return toObject; + } + +@@ -7967,7 +8473,7 @@ class Operations extends BaseModule { + } + if (this.apiClient.isVertexAI()) { + const resourceName = operation.name.split('/operations/')[0]; +- var httpOptions = undefined; ++ let httpOptions = undefined; + if (config && 'httpOptions' in config) { + httpOptions = config.httpOptions; + } +@@ -8310,10 +8816,18 @@ class ApiClient { + return this.streamApiCall(url, requestInit, request.httpMethod); + } + async includeExtraHttpOptionsToRequestInit(requestInit, httpOptions) { +- if (httpOptions && httpOptions.timeout && httpOptions.timeout > 0) { ++ var _a; ++ if (httpOptions && (httpOptions.signal || httpOptions.timeout && (httpOptions === null || httpOptions === void 0 ? void 0 : httpOptions.timeout) >= 0)) { + const abortController = new AbortController(); + const signal = abortController.signal; +- setTimeout(() => abortController.abort(), httpOptions.timeout); ++ if (httpOptions.timeout && httpOptions.timeout >= 0) { ++ setTimeout(() => abortController.abort(), httpOptions.timeout); ++ } ++ if (httpOptions.signal) { ++ (_a = httpOptions.signal) === null || _a === void 0 ? void 0 : _a.addEventListener('abort', () => { ++ abortController.abort(); ++ }); ++ } + requestInit.signal = signal; + } + requestInit.headers = await this.getHeadersInternal(httpOptions); +@@ -8373,8 +8887,12 @@ class ApiClient { + while (match) { + const processedChunkString = match[1]; + try { +- const chunkData = JSON.parse(processedChunkString); +- yield yield __await(chunkData); ++ const partialResponse = new Response(processedChunkString, { ++ headers: response === null || response === void 0 ? void 0 : response.headers, ++ status: response === null || response === void 0 ? void 0 : response.status, ++ statusText: response === null || response === void 0 ? void 0 : response.statusText, ++ }); ++ yield yield __await(new HttpResponse(partialResponse)); + buffer = buffer.slice(match[0].length); + match = buffer.match(responseLineRE); + } +@@ -8722,5 +9240,5 @@ class GoogleGenAI { + } + } + +-export { ActivityHandling, BlockedReason, Caches, Chat, Chats, ComputeTokensResponse, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DynamicRetrievalConfigMode, EmbedContentResponse, EndSensitivity, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpResponse, ImagePromptLanguage, Language, ListCachedContentsResponse, ListFilesResponse, Live, LiveClientToolResponse, LiveSendToolResponseParameters, MaskReferenceMode, MediaModality, MediaResolution, Modality, Mode, Models, Operations, Outcome, PagedItem, Pager, PersonGeneration, ReplayResponse, SafetyFilterLevel, Session, StartSensitivity, SubjectReferenceType, TrafficType, TurnCoverage, Type, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent }; ++export { ActivityHandling, BlockedReason, Caches, Chat, Chats, ComputeTokensResponse, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DynamicRetrievalConfigMode, EmbedContentResponse, EndSensitivity, FeatureSelectionPreference, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpResponse, ImagePromptLanguage, Language, ListCachedContentsResponse, ListFilesResponse, Live, LiveClientToolResponse, LiveSendToolResponseParameters, MaskReferenceMode, MediaModality, MediaResolution, Modality, Mode, Models, Operations, Outcome, PagedItem, Pager, PersonGeneration, ReplayResponse, SafetyFilterLevel, Session, StartSensitivity, SubjectReferenceType, TrafficType, TurnCoverage, Type, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent }; + //# sourceMappingURL=index.mjs.map +diff --git a/dist/web/index.mjs.map b/dist/web/index.mjs.map +index 86b96ac5e00900a199318ebfe903a36e4be54c51..4a7987e88d7b4f44995caa3debb2d95c64782735 100644 +--- a/dist/web/index.mjs.map ++++ b/dist/web/index.mjs.map +@@ -1 +1 @@ +-{"version":3,"file":"index.mjs","sources":["../../src/_common.ts","../../src/_transformers.ts","../../src/converters/_caches_converters.ts","../../src/pagers.ts","../../src/types.ts","../../src/caches.ts","../../src/chats.ts","../../src/converters/_files_converters.ts","../../src/files.ts","../../src/converters/_models_converters.ts","../../src/converters/_live_converters.ts","../../src/live.ts","../../src/models.ts","../../src/converters/_operations_converters.ts","../../src/operations.ts","../../src/_api_client.ts","../../src/cross/_cross_uploader.ts","../../src/web/_browser_uploader.ts","../../src/web/_browser_websocket.ts","../../src/web/_web_auth.ts","../../src/web/web_client.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport class BaseModule {}\n\nexport function formatMap(\n templateString: string,\n valueMap: Record,\n): string {\n // Use a regular expression to find all placeholders in the template string\n const regex = /\\{([^}]+)\\}/g;\n\n // Replace each placeholder with its corresponding value from the valueMap\n return templateString.replace(regex, (match, key) => {\n if (Object.prototype.hasOwnProperty.call(valueMap, key)) {\n const value = valueMap[key];\n // Convert the value to a string if it's not a string already\n return value !== undefined && value !== null ? String(value) : '';\n } else {\n // Handle missing keys\n throw new Error(`Key '${key}' not found in valueMap.`);\n }\n });\n}\n\nexport function setValueByPath(\n data: Record,\n keys: string[],\n value: unknown,\n): void {\n for (let i = 0; i < keys.length - 1; i++) {\n const key = keys[i];\n\n if (key.endsWith('[]')) {\n const keyName = key.slice(0, -2);\n if (!(keyName in data)) {\n if (Array.isArray(value)) {\n data[keyName] = Array.from({length: value.length}, () => ({}));\n } else {\n throw new Error(`Value must be a list given an array path ${key}`);\n }\n }\n\n if (Array.isArray(data[keyName])) {\n const arrayData = data[keyName] as Array;\n\n if (Array.isArray(value)) {\n for (let j = 0; j < arrayData.length; j++) {\n const entry = arrayData[j] as Record;\n setValueByPath(entry, keys.slice(i + 1), value[j]);\n }\n } else {\n for (const d of arrayData) {\n setValueByPath(\n d as Record,\n keys.slice(i + 1),\n value,\n );\n }\n }\n }\n return;\n } else if (key.endsWith('[0]')) {\n const keyName = key.slice(0, -3);\n if (!(keyName in data)) {\n data[keyName] = [{}];\n }\n const arrayData = (data as Record)[keyName];\n setValueByPath(\n (arrayData as Array>)[0],\n keys.slice(i + 1),\n value,\n );\n return;\n }\n\n if (!data[key] || typeof data[key] !== 'object') {\n data[key] = {};\n }\n\n data = data[key] as Record;\n }\n\n const keyToSet = keys[keys.length - 1];\n const existingData = data[keyToSet];\n\n if (existingData !== undefined) {\n if (\n !value ||\n (typeof value === 'object' && Object.keys(value).length === 0)\n ) {\n return;\n }\n\n if (value === existingData) {\n return;\n }\n\n if (\n typeof existingData === 'object' &&\n typeof value === 'object' &&\n existingData !== null &&\n value !== null\n ) {\n Object.assign(existingData, value);\n } else {\n throw new Error(`Cannot set value for an existing key. Key: ${keyToSet}`);\n }\n } else {\n data[keyToSet] = value;\n }\n}\n\nexport function getValueByPath(data: unknown, keys: string[]): unknown {\n try {\n if (keys.length === 1 && keys[0] === '_self') {\n return data;\n }\n\n for (let i = 0; i < keys.length; i++) {\n if (typeof data !== 'object' || data === null) {\n return undefined;\n }\n\n const key = keys[i];\n if (key.endsWith('[]')) {\n const keyName = key.slice(0, -2);\n if (keyName in data) {\n const arrayData = (data as Record)[keyName];\n if (!Array.isArray(arrayData)) {\n return undefined;\n }\n return arrayData.map((d) => getValueByPath(d, keys.slice(i + 1)));\n } else {\n return undefined;\n }\n } else {\n data = (data as Record)[key];\n }\n }\n\n return data;\n } catch (error) {\n if (error instanceof TypeError) {\n return undefined;\n }\n throw error;\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ApiClient} from './_api_client';\nimport * as types from './types';\n\nexport function tModel(apiClient: ApiClient, model: string | unknown): string {\n if (!model || typeof model !== 'string') {\n throw new Error('model is required and must be a string');\n }\n\n if (apiClient.isVertexAI()) {\n if (\n model.startsWith('publishers/') ||\n model.startsWith('projects/') ||\n model.startsWith('models/')\n ) {\n return model;\n } else if (model.indexOf('/') >= 0) {\n const parts = model.split('/', 2);\n return `publishers/${parts[0]}/models/${parts[1]}`;\n } else {\n return `publishers/google/models/${model}`;\n }\n } else {\n if (model.startsWith('models/') || model.startsWith('tunedModels/')) {\n return model;\n } else {\n return `models/${model}`;\n }\n }\n}\n\nexport function tCachesModel(\n apiClient: ApiClient,\n model: string | unknown,\n): string {\n const transformedModel = tModel(apiClient, model as string);\n if (!transformedModel) {\n return '';\n }\n\n if (transformedModel.startsWith('publishers/') && apiClient.isVertexAI()) {\n // vertex caches only support model name start with projects.\n return `projects/${apiClient.getProject()}/locations/${apiClient.getLocation()}/${transformedModel}`;\n } else if (transformedModel.startsWith('models/') && apiClient.isVertexAI()) {\n return `projects/${apiClient.getProject()}/locations/${apiClient.getLocation()}/publishers/google/${transformedModel}`;\n } else {\n return transformedModel;\n }\n}\n\nexport function tPart(\n apiClient: ApiClient,\n origin?: types.PartUnion | null,\n): types.Part {\n if (origin === null || origin === undefined) {\n throw new Error('PartUnion is required');\n }\n if (typeof origin === 'object') {\n return origin;\n }\n if (typeof origin === 'string') {\n return {text: origin};\n }\n throw new Error(`Unsupported part type: ${typeof origin}`);\n}\n\nexport function tParts(\n apiClient: ApiClient,\n origin?: types.PartListUnion | null,\n): types.Part[] {\n if (\n origin === null ||\n origin === undefined ||\n (Array.isArray(origin) && origin.length === 0)\n ) {\n throw new Error('PartListUnion is required');\n }\n if (Array.isArray(origin)) {\n return origin.map((item) => tPart(apiClient, item as types.PartUnion)!);\n }\n return [tPart(apiClient, origin)!];\n}\n\nfunction _isContent(origin: unknown): boolean {\n return (\n origin !== null &&\n origin !== undefined &&\n typeof origin === 'object' &&\n 'parts' in origin &&\n Array.isArray(origin.parts)\n );\n}\n\nfunction _isFunctionCallPart(origin: unknown): boolean {\n return (\n origin !== null &&\n origin !== undefined &&\n typeof origin === 'object' &&\n 'functionCall' in origin\n );\n}\n\nfunction _isUserPart(origin: unknown): boolean {\n if (origin === null || origin === undefined) {\n return false;\n }\n if (_isFunctionCallPart(origin)) {\n return false;\n }\n return true;\n}\n\nfunction _areUserParts(origin: types.PartListUnion[]): boolean {\n if (\n origin === null ||\n origin === undefined ||\n (Array.isArray(origin) && origin.length === 0)\n ) {\n return false;\n }\n return origin.every(_isUserPart);\n}\n\nexport function tContent(\n apiClient: ApiClient,\n origin?: types.ContentUnion,\n): types.Content {\n if (origin === null || origin === undefined) {\n throw new Error('ContentUnion is required');\n }\n if (_isContent(origin)) {\n // @ts-expect-error: _isContent is a utility function that checks if the\n // origin is a Content.\n return origin;\n }\n\n if (_isUserPart(origin)) {\n return {\n role: 'user',\n parts: tParts(apiClient, origin as types.PartListUnion)!,\n };\n } else {\n return {\n role: 'model',\n parts: tParts(apiClient, origin as types.PartListUnion)!,\n };\n }\n}\n\nexport function tContentsForEmbed(\n apiClient: ApiClient,\n origin: types.ContentListUnion,\n): types.ContentUnion[] {\n if (!origin) {\n return [];\n }\n if (apiClient.isVertexAI() && Array.isArray(origin)) {\n return origin.flatMap((item) => {\n const content = tContent(apiClient, item as types.ContentUnion);\n if (\n content.parts &&\n content.parts.length > 0 &&\n content.parts[0].text !== undefined\n ) {\n return [content.parts[0].text];\n }\n return [];\n });\n } else if (apiClient.isVertexAI()) {\n const content = tContent(apiClient, origin as types.ContentUnion);\n if (\n content.parts &&\n content.parts.length > 0 &&\n content.parts[0].text !== undefined\n ) {\n return [content.parts[0].text];\n }\n return [];\n }\n if (Array.isArray(origin)) {\n return origin.map(\n (item) => tContent(apiClient, item as types.ContentUnion)!,\n );\n }\n return [tContent(apiClient, origin as types.ContentUnion)!];\n}\n\nfunction _appendAccumulatedPartsAsContent(\n apiClient: ApiClient,\n result: types.Content[],\n accumulatedParts: types.PartUnion[],\n) {\n if (accumulatedParts.length === 0) {\n return;\n }\n if (_areUserParts(accumulatedParts)) {\n result.push({\n role: 'user',\n parts: tParts(apiClient, accumulatedParts),\n });\n } else {\n result.push({\n role: 'model',\n parts: tParts(apiClient, accumulatedParts),\n });\n }\n accumulatedParts.length = 0; // clear the array inplace\n}\n\nfunction _handleCurrentPart(\n apiClient: ApiClient,\n result: types.Content[],\n accumulatedParts: types.PartUnion[],\n currentPart: types.PartUnion,\n) {\n if (_isUserPart(currentPart) === _areUserParts(accumulatedParts)) {\n accumulatedParts.push(currentPart);\n } else {\n _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts);\n accumulatedParts.length = 0;\n accumulatedParts.push(currentPart);\n }\n}\n\nexport function tContents(\n apiClient: ApiClient,\n origin?: types.ContentListUnion,\n): types.Content[] {\n if (\n origin === null ||\n origin === undefined ||\n (Array.isArray(origin) && origin.length === 0)\n ) {\n throw new Error('contents are required');\n }\n if (!Array.isArray(origin)) {\n return [tContent(apiClient, origin)];\n }\n\n const result: types.Content[] = [];\n const accumulatedParts: types.PartUnion[] = [];\n\n for (const content of origin) {\n if (_isContent(content)) {\n _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts);\n // @ts-expect-error: content is a Content here\n result.push(content);\n } else if (\n typeof content === 'string' ||\n (typeof content === 'object' && !Array.isArray(content))\n ) {\n // @ts-expect-error: content is a part here\n _handleCurrentPart(apiClient, result, accumulatedParts, content);\n } else if (Array.isArray(content)) {\n // if there're consecutive user parts before the list,\n // convert to UserContent and append to result\n _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts);\n result.push({\n role: 'user',\n parts: tParts(apiClient, content),\n });\n } else {\n throw new Error(`Unsupported content type: ${typeof content}`);\n }\n }\n _appendAccumulatedPartsAsContent(apiClient, result, accumulatedParts);\n\n return result;\n}\n\nexport function processSchema(apiClient: ApiClient, schema: types.Schema) {\n if (!apiClient.isVertexAI()) {\n if ('default' in schema) {\n throw new Error(\n 'Default value is not supported in the response schema for the Gemini API.',\n );\n }\n }\n\n if ('anyOf' in schema) {\n if (schema['anyOf'] !== undefined) {\n for (const subSchema of schema['anyOf']) {\n processSchema(apiClient, subSchema);\n }\n }\n }\n\n if ('items' in schema) {\n if (schema['items'] !== undefined) {\n processSchema(apiClient, schema['items']);\n }\n }\n\n if ('properties' in schema) {\n if (schema['properties'] !== undefined) {\n for (const subSchema of Object.values(schema['properties'])) {\n processSchema(apiClient, subSchema);\n }\n }\n }\n}\n\nexport function tSchema(\n apiClient: ApiClient,\n schema: types.Schema,\n): types.Schema {\n processSchema(apiClient, schema);\n return schema;\n}\n\nexport function tSpeechConfig(\n apiClient: ApiClient,\n speechConfig: types.SpeechConfigUnion,\n): types.SpeechConfig {\n if (typeof speechConfig === 'object' && 'voiceConfig' in speechConfig) {\n return speechConfig;\n } else if (typeof speechConfig === 'string') {\n return {\n voiceConfig: {\n prebuiltVoiceConfig: {\n voiceName: speechConfig,\n },\n },\n };\n } else {\n throw new Error(`Unsupported speechConfig type: ${typeof speechConfig}`);\n }\n}\n\nexport function tTool(apiClient: ApiClient, tool: types.Tool): types.Tool {\n return tool;\n}\n\nexport function tTools(\n apiClient: ApiClient,\n tool: types.Tool[] | unknown,\n): types.Tool[] {\n if (!Array.isArray(tool)) {\n throw new Error('tool is required and must be an array of Tools');\n }\n return tool;\n}\n\n/**\n * Prepends resource name with project, location, resource_prefix if needed.\n *\n * @param client The API client.\n * @param resourceName The resource name.\n * @param resourcePrefix The resource prefix.\n * @param splitsAfterPrefix The number of splits after the prefix.\n * @returns The completed resource name.\n *\n * Examples:\n *\n * ```\n * resource_name = '123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = True\n * client.project = 'bar'\n * client.location = 'us-west1'\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns: 'projects/bar/locations/us-west1/cachedContents/123'\n * ```\n *\n * ```\n * resource_name = 'projects/foo/locations/us-central1/cachedContents/123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = True\n * client.project = 'bar'\n * client.location = 'us-west1'\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns: 'projects/foo/locations/us-central1/cachedContents/123'\n * ```\n *\n * ```\n * resource_name = '123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = False\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns 'cachedContents/123'\n * ```\n *\n * ```\n * resource_name = 'some/wrong/cachedContents/resource/name/123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = False\n * # client.vertexai = True\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * -> 'some/wrong/resource/name/123'\n * ```\n */\nfunction resourceName(\n client: ApiClient,\n resourceName: string,\n resourcePrefix: string,\n splitsAfterPrefix: number = 1,\n): string {\n const shouldAppendPrefix =\n !resourceName.startsWith(`${resourcePrefix}/`) &&\n resourceName.split('/').length === splitsAfterPrefix;\n if (client.isVertexAI()) {\n if (resourceName.startsWith('projects/')) {\n return resourceName;\n } else if (resourceName.startsWith('locations/')) {\n return `projects/${client.getProject()}/${resourceName}`;\n } else if (resourceName.startsWith(`${resourcePrefix}/`)) {\n return `projects/${client.getProject()}/locations/${client.getLocation()}/${resourceName}`;\n } else if (shouldAppendPrefix) {\n return `projects/${client.getProject()}/locations/${client.getLocation()}/${resourcePrefix}/${resourceName}`;\n } else {\n return resourceName;\n }\n }\n if (shouldAppendPrefix) {\n return `${resourcePrefix}/${resourceName}`;\n }\n return resourceName;\n}\n\nexport function tCachedContentName(\n apiClient: ApiClient,\n name: string | unknown,\n): string {\n if (typeof name !== 'string') {\n throw new Error('name must be a string');\n }\n return resourceName(apiClient, name, 'cachedContents');\n}\n\nexport function tTuningJobStatus(\n apiClient: ApiClient,\n status: string | unknown,\n): string {\n switch (status) {\n case 'STATE_UNSPECIFIED':\n return 'JOB_STATE_UNSPECIFIED';\n case 'CREATING':\n return 'JOB_STATE_RUNNING';\n case 'ACTIVE':\n return 'JOB_STATE_SUCCEEDED';\n case 'FAILED':\n return 'JOB_STATE_FAILED';\n default:\n return status as string;\n }\n}\n\nexport function tBytes(\n apiClient: ApiClient,\n fromImageBytes: string | unknown,\n): string {\n if (typeof fromImageBytes !== 'string') {\n throw new Error('fromImageBytes must be a string');\n }\n // TODO(b/389133914): Remove dummy bytes converter.\n return fromImageBytes;\n}\nexport function tFileName(\n apiClient: ApiClient,\n fromName: string | unknown,\n): string {\n if (typeof fromName !== 'string') {\n throw new Error('fromName must be a string');\n }\n // Remove the files/ prefx for MLdev urls to get the actual name of the file.\n if (fromName.startsWith('files/')) {\n return fromName.split('files/')[1];\n }\n return fromName;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function partToMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['videoMetadata']) !== undefined) {\n throw new Error('videoMetadata parameter is not supported in Gemini API.');\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToMldev(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['example']) !== undefined) {\n throw new Error('example parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['pattern']) !== undefined) {\n throw new Error('pattern parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['default']) !== undefined) {\n throw new Error('default parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxLength']) !== undefined) {\n throw new Error('maxLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minLength']) !== undefined) {\n throw new Error('minLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minProperties']) !== undefined) {\n throw new Error('minProperties parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxProperties']) !== undefined) {\n throw new Error('maxProperties parameter is not supported in Gemini API.');\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['response']) !== undefined) {\n throw new Error('response parameter is not supported in Gemini API.');\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToMldev(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToMldev(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n if (common.getValueByPath(fromObject, ['retrieval']) !== undefined) {\n throw new Error('retrieval parameter is not supported in Gemini API.');\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToMldev());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (parentObject !== undefined && fromDisplayName != null) {\n common.setValueByPath(parentObject, ['displayName'], fromDisplayName);\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (parentObject !== undefined && fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToMldev(apiClient, fromToolConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['model'],\n t.tCachesModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n createCachedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.DeleteCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n updateCachedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function listCachedContentsConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listCachedContentsParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listCachedContentsConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partToVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToVertex(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n const fromExample = common.getValueByPath(fromObject, ['example']);\n if (fromExample != null) {\n common.setValueByPath(toObject, ['example'], fromExample);\n }\n\n const fromPattern = common.getValueByPath(fromObject, ['pattern']);\n if (fromPattern != null) {\n common.setValueByPath(toObject, ['pattern'], fromPattern);\n }\n\n const fromDefault = common.getValueByPath(fromObject, ['default']);\n if (fromDefault != null) {\n common.setValueByPath(toObject, ['default'], fromDefault);\n }\n\n const fromMaxLength = common.getValueByPath(fromObject, ['maxLength']);\n if (fromMaxLength != null) {\n common.setValueByPath(toObject, ['maxLength'], fromMaxLength);\n }\n\n const fromMinLength = common.getValueByPath(fromObject, ['minLength']);\n if (fromMinLength != null) {\n common.setValueByPath(toObject, ['minLength'], fromMinLength);\n }\n\n const fromMinProperties = common.getValueByPath(fromObject, [\n 'minProperties',\n ]);\n if (fromMinProperties != null) {\n common.setValueByPath(toObject, ['minProperties'], fromMinProperties);\n }\n\n const fromMaxProperties = common.getValueByPath(fromObject, [\n 'maxProperties',\n ]);\n if (fromMaxProperties != null) {\n common.setValueByPath(toObject, ['maxProperties'], fromMaxProperties);\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n schemaToVertex(apiClient, fromResponse),\n );\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToVertex(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToVertex(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n const fromRetrieval = common.getValueByPath(fromObject, ['retrieval']);\n if (fromRetrieval != null) {\n common.setValueByPath(toObject, ['retrieval'], fromRetrieval);\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToVertex());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (parentObject !== undefined && fromDisplayName != null) {\n common.setValueByPath(parentObject, ['displayName'], fromDisplayName);\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (parentObject !== undefined && fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToVertex(apiClient, fromToolConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['model'],\n t.tCachesModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n createCachedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.DeleteCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n updateCachedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function listCachedContentsConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listCachedContentsParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listCachedContentsConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function cachedContentFromMldev(\n apiClient: ApiClient,\n fromObject: types.CachedContent,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (fromExpireTime != null) {\n common.setValueByPath(toObject, ['expireTime'], fromExpireTime);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentResponseFromMldev(): Record<\n string,\n unknown\n> {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function listCachedContentsResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromCachedContents = common.getValueByPath(fromObject, [\n 'cachedContents',\n ]);\n if (fromCachedContents != null) {\n if (Array.isArray(fromCachedContents)) {\n common.setValueByPath(\n toObject,\n ['cachedContents'],\n fromCachedContents.map((item) => {\n return cachedContentFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['cachedContents'], fromCachedContents);\n }\n }\n\n return toObject;\n}\n\nexport function cachedContentFromVertex(\n apiClient: ApiClient,\n fromObject: types.CachedContent,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (fromExpireTime != null) {\n common.setValueByPath(toObject, ['expireTime'], fromExpireTime);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentResponseFromVertex(): Record<\n string,\n unknown\n> {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function listCachedContentsResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromCachedContents = common.getValueByPath(fromObject, [\n 'cachedContents',\n ]);\n if (fromCachedContents != null) {\n if (Array.isArray(fromCachedContents)) {\n common.setValueByPath(\n toObject,\n ['cachedContents'],\n fromCachedContents.map((item) => {\n return cachedContentFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['cachedContents'], fromCachedContents);\n }\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Pagers for the GenAI List APIs.\n */\n\nexport enum PagedItem {\n PAGED_ITEM_BATCH_JOBS = 'batchJobs',\n PAGED_ITEM_MODELS = 'models',\n PAGED_ITEM_TUNING_JOBS = 'tuningJobs',\n PAGED_ITEM_FILES = 'files',\n PAGED_ITEM_CACHED_CONTENTS = 'cachedContents',\n}\n\ninterface PagedItemConfig {\n config?: {\n pageToken?: string;\n pageSize?: number;\n };\n}\n\ninterface PagedItemResponse {\n nextPageToken?: string;\n batchJobs?: T[];\n models?: T[];\n tuningJobs?: T[];\n files?: T[];\n cachedContents?: T[];\n}\n\n/**\n * Pager class for iterating through paginated results.\n */\nexport class Pager implements AsyncIterable {\n private nameInternal!: PagedItem;\n private pageInternal: T[] = [];\n private paramsInternal: PagedItemConfig = {};\n private pageInternalSize!: number;\n protected requestInternal!: (\n params: PagedItemConfig,\n ) => Promise>;\n protected idxInternal!: number;\n\n constructor(\n name: PagedItem,\n request: (params: PagedItemConfig) => Promise>,\n response: PagedItemResponse,\n params: PagedItemConfig,\n ) {\n this.requestInternal = request;\n this.init(name, response, params);\n }\n\n private init(\n name: PagedItem,\n response: PagedItemResponse,\n params: PagedItemConfig,\n ) {\n this.nameInternal = name;\n this.pageInternal = response[this.nameInternal] || [];\n this.idxInternal = 0;\n let requestParams: PagedItemConfig = {config: {}};\n if (!params) {\n requestParams = {config: {}};\n } else if (typeof params === 'object') {\n requestParams = {...params};\n } else {\n requestParams = params;\n }\n if (requestParams['config']) {\n requestParams['config']['pageToken'] = response['nextPageToken'];\n }\n this.paramsInternal = requestParams;\n this.pageInternalSize =\n requestParams['config']?.['pageSize'] ?? this.pageInternal.length;\n }\n\n private initNextPage(response: PagedItemResponse): void {\n this.init(this.nameInternal, response, this.paramsInternal);\n }\n\n /**\n * Returns the current page, which is a list of items.\n *\n * @remarks\n * The first page is retrieved when the pager is created. The returned list of\n * items could be a subset of the entire list.\n */\n get page(): T[] {\n return this.pageInternal;\n }\n\n /**\n * Returns the type of paged item (for example, ``batch_jobs``).\n */\n get name(): PagedItem {\n return this.nameInternal;\n }\n\n /**\n * Returns the length of the page fetched each time by this pager.\n *\n * @remarks\n * The number of items in the page is less than or equal to the page length.\n */\n get pageSize(): number {\n return this.pageInternalSize;\n }\n\n /**\n * Returns the parameters when making the API request for the next page.\n *\n * @remarks\n * Parameters contain a set of optional configs that can be\n * used to customize the API request. For example, the `pageToken` parameter\n * contains the token to request the next page.\n */\n get params(): PagedItemConfig {\n return this.paramsInternal;\n }\n\n /**\n * Returns the total number of items in the current page.\n */\n get pageLength(): number {\n return this.pageInternal.length;\n }\n\n /**\n * Returns the item at the given index.\n */\n getItem(index: number): T {\n return this.pageInternal[index];\n }\n\n /**\n * Returns an async iterator that support iterating through all items\n * retrieved from the API.\n *\n * @remarks\n * The iterator will automatically fetch the next page if there are more items\n * to fetch from the API.\n *\n * @example\n *\n * ```ts\n * const pager = await ai.files.list({config: {pageSize: 10}});\n * for await (const file of pager) {\n * console.log(file.name);\n * }\n * ```\n */\n [Symbol.asyncIterator](): AsyncIterator {\n return {\n next: async () => {\n if (this.idxInternal >= this.pageLength) {\n if (this.hasNextPage()) {\n await this.nextPage();\n } else {\n return {value: undefined, done: true};\n }\n }\n const item = this.getItem(this.idxInternal);\n this.idxInternal += 1;\n return {value: item, done: false};\n },\n return: async () => {\n return {value: undefined, done: true};\n },\n };\n }\n\n /**\n * Fetches the next page of items. This makes a new API request.\n *\n * @throws {Error} If there are no more pages to fetch.\n *\n * @example\n *\n * ```ts\n * const pager = await ai.files.list({config: {pageSize: 10}});\n * let page = pager.page;\n * while (true) {\n * for (const file of page) {\n * console.log(file.name);\n * }\n * if (!pager.hasNextPage()) {\n * break;\n * }\n * page = await pager.nextPage();\n * }\n * ```\n */\n async nextPage(): Promise {\n if (!this.hasNextPage()) {\n throw new Error('No more pages to fetch.');\n }\n const response = await this.requestInternal(this.params);\n this.initNextPage(response);\n return this.page;\n }\n\n /**\n * Returns true if there are more pages to fetch from the API.\n */\n hasNextPage(): boolean {\n if (this.params['config']?.['pageToken'] !== undefined) {\n return true;\n }\n return false;\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\n/** Required. Outcome of the code execution. */\nexport enum Outcome {\n OUTCOME_UNSPECIFIED = 'OUTCOME_UNSPECIFIED',\n OUTCOME_OK = 'OUTCOME_OK',\n OUTCOME_FAILED = 'OUTCOME_FAILED',\n OUTCOME_DEADLINE_EXCEEDED = 'OUTCOME_DEADLINE_EXCEEDED',\n}\n\n/** Required. Programming language of the `code`. */\nexport enum Language {\n LANGUAGE_UNSPECIFIED = 'LANGUAGE_UNSPECIFIED',\n PYTHON = 'PYTHON',\n}\n\n/** Optional. The type of the data. */\nexport enum Type {\n TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED',\n STRING = 'STRING',\n NUMBER = 'NUMBER',\n INTEGER = 'INTEGER',\n BOOLEAN = 'BOOLEAN',\n ARRAY = 'ARRAY',\n OBJECT = 'OBJECT',\n}\n\n/** Required. Harm category. */\nexport enum HarmCategory {\n HARM_CATEGORY_UNSPECIFIED = 'HARM_CATEGORY_UNSPECIFIED',\n HARM_CATEGORY_HATE_SPEECH = 'HARM_CATEGORY_HATE_SPEECH',\n HARM_CATEGORY_DANGEROUS_CONTENT = 'HARM_CATEGORY_DANGEROUS_CONTENT',\n HARM_CATEGORY_HARASSMENT = 'HARM_CATEGORY_HARASSMENT',\n HARM_CATEGORY_SEXUALLY_EXPLICIT = 'HARM_CATEGORY_SEXUALLY_EXPLICIT',\n HARM_CATEGORY_CIVIC_INTEGRITY = 'HARM_CATEGORY_CIVIC_INTEGRITY',\n}\n\n/** Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. */\nexport enum HarmBlockMethod {\n HARM_BLOCK_METHOD_UNSPECIFIED = 'HARM_BLOCK_METHOD_UNSPECIFIED',\n SEVERITY = 'SEVERITY',\n PROBABILITY = 'PROBABILITY',\n}\n\n/** Required. The harm block threshold. */\nexport enum HarmBlockThreshold {\n HARM_BLOCK_THRESHOLD_UNSPECIFIED = 'HARM_BLOCK_THRESHOLD_UNSPECIFIED',\n BLOCK_LOW_AND_ABOVE = 'BLOCK_LOW_AND_ABOVE',\n BLOCK_MEDIUM_AND_ABOVE = 'BLOCK_MEDIUM_AND_ABOVE',\n BLOCK_ONLY_HIGH = 'BLOCK_ONLY_HIGH',\n BLOCK_NONE = 'BLOCK_NONE',\n OFF = 'OFF',\n}\n\n/** The mode of the predictor to be used in dynamic retrieval. */\nexport enum Mode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n MODE_DYNAMIC = 'MODE_DYNAMIC',\n}\n\n/** Output only. The reason why the model stopped generating tokens.\n\n If empty, the model has not stopped generating the tokens.\n */\nexport enum FinishReason {\n FINISH_REASON_UNSPECIFIED = 'FINISH_REASON_UNSPECIFIED',\n STOP = 'STOP',\n MAX_TOKENS = 'MAX_TOKENS',\n SAFETY = 'SAFETY',\n RECITATION = 'RECITATION',\n OTHER = 'OTHER',\n BLOCKLIST = 'BLOCKLIST',\n PROHIBITED_CONTENT = 'PROHIBITED_CONTENT',\n SPII = 'SPII',\n MALFORMED_FUNCTION_CALL = 'MALFORMED_FUNCTION_CALL',\n IMAGE_SAFETY = 'IMAGE_SAFETY',\n}\n\n/** Output only. Harm probability levels in the content. */\nexport enum HarmProbability {\n HARM_PROBABILITY_UNSPECIFIED = 'HARM_PROBABILITY_UNSPECIFIED',\n NEGLIGIBLE = 'NEGLIGIBLE',\n LOW = 'LOW',\n MEDIUM = 'MEDIUM',\n HIGH = 'HIGH',\n}\n\n/** Output only. Harm severity levels in the content. */\nexport enum HarmSeverity {\n HARM_SEVERITY_UNSPECIFIED = 'HARM_SEVERITY_UNSPECIFIED',\n HARM_SEVERITY_NEGLIGIBLE = 'HARM_SEVERITY_NEGLIGIBLE',\n HARM_SEVERITY_LOW = 'HARM_SEVERITY_LOW',\n HARM_SEVERITY_MEDIUM = 'HARM_SEVERITY_MEDIUM',\n HARM_SEVERITY_HIGH = 'HARM_SEVERITY_HIGH',\n}\n\n/** Output only. Blocked reason. */\nexport enum BlockedReason {\n BLOCKED_REASON_UNSPECIFIED = 'BLOCKED_REASON_UNSPECIFIED',\n SAFETY = 'SAFETY',\n OTHER = 'OTHER',\n BLOCKLIST = 'BLOCKLIST',\n PROHIBITED_CONTENT = 'PROHIBITED_CONTENT',\n}\n\n/** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */\nexport enum TrafficType {\n TRAFFIC_TYPE_UNSPECIFIED = 'TRAFFIC_TYPE_UNSPECIFIED',\n ON_DEMAND = 'ON_DEMAND',\n PROVISIONED_THROUGHPUT = 'PROVISIONED_THROUGHPUT',\n}\n\n/** Server content modalities. */\nexport enum Modality {\n MODALITY_UNSPECIFIED = 'MODALITY_UNSPECIFIED',\n TEXT = 'TEXT',\n IMAGE = 'IMAGE',\n AUDIO = 'AUDIO',\n}\n\n/** The media resolution to use. */\nexport enum MediaResolution {\n MEDIA_RESOLUTION_UNSPECIFIED = 'MEDIA_RESOLUTION_UNSPECIFIED',\n MEDIA_RESOLUTION_LOW = 'MEDIA_RESOLUTION_LOW',\n MEDIA_RESOLUTION_MEDIUM = 'MEDIA_RESOLUTION_MEDIUM',\n MEDIA_RESOLUTION_HIGH = 'MEDIA_RESOLUTION_HIGH',\n}\n\n/** Config for the dynamic retrieval config mode. */\nexport enum DynamicRetrievalConfigMode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n MODE_DYNAMIC = 'MODE_DYNAMIC',\n}\n\n/** Config for the function calling config mode. */\nexport enum FunctionCallingConfigMode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n AUTO = 'AUTO',\n ANY = 'ANY',\n NONE = 'NONE',\n}\n\n/** Enum that controls the safety filter level for objectionable content. */\nexport enum SafetyFilterLevel {\n BLOCK_LOW_AND_ABOVE = 'BLOCK_LOW_AND_ABOVE',\n BLOCK_MEDIUM_AND_ABOVE = 'BLOCK_MEDIUM_AND_ABOVE',\n BLOCK_ONLY_HIGH = 'BLOCK_ONLY_HIGH',\n BLOCK_NONE = 'BLOCK_NONE',\n}\n\n/** Enum that controls the generation of people. */\nexport enum PersonGeneration {\n DONT_ALLOW = 'DONT_ALLOW',\n ALLOW_ADULT = 'ALLOW_ADULT',\n ALLOW_ALL = 'ALLOW_ALL',\n}\n\n/** Enum that specifies the language of the text in the prompt. */\nexport enum ImagePromptLanguage {\n auto = 'auto',\n en = 'en',\n ja = 'ja',\n ko = 'ko',\n hi = 'hi',\n}\n\n/** State for the lifecycle of a File. */\nexport enum FileState {\n STATE_UNSPECIFIED = 'STATE_UNSPECIFIED',\n PROCESSING = 'PROCESSING',\n ACTIVE = 'ACTIVE',\n FAILED = 'FAILED',\n}\n\n/** Source of the File. */\nexport enum FileSource {\n SOURCE_UNSPECIFIED = 'SOURCE_UNSPECIFIED',\n UPLOADED = 'UPLOADED',\n GENERATED = 'GENERATED',\n}\n\n/** Enum representing the mask mode of a mask reference image. */\nexport enum MaskReferenceMode {\n MASK_MODE_DEFAULT = 'MASK_MODE_DEFAULT',\n MASK_MODE_USER_PROVIDED = 'MASK_MODE_USER_PROVIDED',\n MASK_MODE_BACKGROUND = 'MASK_MODE_BACKGROUND',\n MASK_MODE_FOREGROUND = 'MASK_MODE_FOREGROUND',\n MASK_MODE_SEMANTIC = 'MASK_MODE_SEMANTIC',\n}\n\n/** Enum representing the control type of a control reference image. */\nexport enum ControlReferenceType {\n CONTROL_TYPE_DEFAULT = 'CONTROL_TYPE_DEFAULT',\n CONTROL_TYPE_CANNY = 'CONTROL_TYPE_CANNY',\n CONTROL_TYPE_SCRIBBLE = 'CONTROL_TYPE_SCRIBBLE',\n CONTROL_TYPE_FACE_MESH = 'CONTROL_TYPE_FACE_MESH',\n}\n\n/** Enum representing the subject type of a subject reference image. */\nexport enum SubjectReferenceType {\n SUBJECT_TYPE_DEFAULT = 'SUBJECT_TYPE_DEFAULT',\n SUBJECT_TYPE_PERSON = 'SUBJECT_TYPE_PERSON',\n SUBJECT_TYPE_ANIMAL = 'SUBJECT_TYPE_ANIMAL',\n SUBJECT_TYPE_PRODUCT = 'SUBJECT_TYPE_PRODUCT',\n}\n\n/** Server content modalities. */\nexport enum MediaModality {\n MODALITY_UNSPECIFIED = 'MODALITY_UNSPECIFIED',\n TEXT = 'TEXT',\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n AUDIO = 'AUDIO',\n DOCUMENT = 'DOCUMENT',\n}\n\n/** Start of speech sensitivity. */\nexport enum StartSensitivity {\n START_SENSITIVITY_UNSPECIFIED = 'START_SENSITIVITY_UNSPECIFIED',\n START_SENSITIVITY_HIGH = 'START_SENSITIVITY_HIGH',\n START_SENSITIVITY_LOW = 'START_SENSITIVITY_LOW',\n}\n\n/** End of speech sensitivity. */\nexport enum EndSensitivity {\n END_SENSITIVITY_UNSPECIFIED = 'END_SENSITIVITY_UNSPECIFIED',\n END_SENSITIVITY_HIGH = 'END_SENSITIVITY_HIGH',\n END_SENSITIVITY_LOW = 'END_SENSITIVITY_LOW',\n}\n\n/** The different ways of handling user activity. */\nexport enum ActivityHandling {\n ACTIVITY_HANDLING_UNSPECIFIED = 'ACTIVITY_HANDLING_UNSPECIFIED',\n START_OF_ACTIVITY_INTERRUPTS = 'START_OF_ACTIVITY_INTERRUPTS',\n NO_INTERRUPTION = 'NO_INTERRUPTION',\n}\n\n/** Options about which input is included in the user's turn. */\nexport enum TurnCoverage {\n TURN_COVERAGE_UNSPECIFIED = 'TURN_COVERAGE_UNSPECIFIED',\n TURN_INCLUDES_ONLY_ACTIVITY = 'TURN_INCLUDES_ONLY_ACTIVITY',\n TURN_INCLUDES_ALL_INPUT = 'TURN_INCLUDES_ALL_INPUT',\n}\n\n/** Metadata describes the input video content. */\nexport declare interface VideoMetadata {\n /** Optional. The end offset of the video. */\n endOffset?: string;\n /** Optional. The start offset of the video. */\n startOffset?: string;\n}\n\n/** Result of executing the [ExecutableCode]. Always follows a `part` containing the [ExecutableCode]. */\nexport declare interface CodeExecutionResult {\n /** Required. Outcome of the code execution. */\n outcome?: Outcome;\n /** Optional. Contains stdout when code execution is successful, stderr or other description otherwise. */\n output?: string;\n}\n\n/** Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the [FunctionDeclaration] tool and [FunctionCallingConfig] mode is set to [Mode.CODE]. */\nexport declare interface ExecutableCode {\n /** Required. The code to be executed. */\n code?: string;\n /** Required. Programming language of the `code`. */\n language?: Language;\n}\n\n/** URI based data. */\nexport declare interface FileData {\n /** Required. URI. */\n fileUri?: string;\n /** Required. The IANA standard MIME type of the source data. */\n mimeType?: string;\n}\n\n/** A function call. */\nexport declare interface FunctionCall {\n /** The unique id of the function call. If populated, the client to execute the\n `function_call` and return the response with the matching `id`. */\n id?: string;\n /** Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. */\n args?: Record;\n /** Required. The name of the function to call. Matches [FunctionDeclaration.name]. */\n name?: string;\n}\n\n/** A function response. */\nexport class FunctionResponse {\n /** The id of the function call this response is for. Populated by the client\n to match the corresponding function call `id`. */\n id?: string;\n /** Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. */\n name?: string;\n /** Required. The function response in JSON object format. Use \"output\" key to specify function output and \"error\" key to specify error details (if any). If \"output\" and \"error\" keys are not specified, then whole \"response\" is treated as function output. */\n response?: Record;\n}\n\n/** Content blob. */\nexport declare interface Blob {\n /** Required. Raw bytes. */\n data?: string;\n /** Required. The IANA standard MIME type of the source data. */\n mimeType?: string;\n}\n\n/** A datatype containing media content.\n\n Exactly one field within a Part should be set, representing the specific type\n of content being conveyed. Using multiple fields within the same `Part`\n instance is considered invalid.\n */\nexport declare interface Part {\n /** Metadata for a given video. */\n videoMetadata?: VideoMetadata;\n /** Indicates if the part is thought from the model. */\n thought?: boolean;\n /** Optional. Result of executing the [ExecutableCode]. */\n codeExecutionResult?: CodeExecutionResult;\n /** Optional. Code generated by the model that is meant to be executed. */\n executableCode?: ExecutableCode;\n /** Optional. URI based data. */\n fileData?: FileData;\n /** Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. */\n functionCall?: FunctionCall;\n /** Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. */\n functionResponse?: FunctionResponse;\n /** Optional. Inlined bytes data. */\n inlineData?: Blob;\n /** Optional. Text part (can be code). */\n text?: string;\n}\n/**\n * Creates a `Part` object from a `URI` string.\n */\nexport function createPartFromUri(uri: string, mimeType: string): Part {\n return {\n fileData: {\n fileUri: uri,\n mimeType: mimeType,\n },\n };\n}\n/**\n * Creates a `Part` object from a `text` string.\n */\nexport function createPartFromText(text: string): Part {\n return {\n text: text,\n };\n}\n/**\n * Creates a `Part` object from a `FunctionCall` object.\n */\nexport function createPartFromFunctionCall(\n name: string,\n args: Record,\n): Part {\n return {\n functionCall: {\n name: name,\n args: args,\n },\n };\n}\n/**\n * Creates a `Part` object from a `FunctionResponse` object.\n */\nexport function createPartFromFunctionResponse(\n id: string,\n name: string,\n response: Record,\n): Part {\n return {\n functionResponse: {\n id: id,\n name: name,\n response: response,\n },\n };\n}\n/**\n * Creates a `Part` object from a `base64` encoded `string`.\n */\nexport function createPartFromBase64(data: string, mimeType: string): Part {\n return {\n inlineData: {\n data: data,\n mimeType: mimeType,\n },\n };\n}\n/**\n * Creates a `Part` object from the `outcome` and `output` of a `CodeExecutionResult` object.\n */\nexport function createPartFromCodeExecutionResult(\n outcome: Outcome,\n output: string,\n): Part {\n return {\n codeExecutionResult: {\n outcome: outcome,\n output: output,\n },\n };\n}\n/**\n * Creates a `Part` object from the `code` and `language` of an `ExecutableCode` object.\n */\nexport function createPartFromExecutableCode(\n code: string,\n language: Language,\n): Part {\n return {\n executableCode: {\n code: code,\n language: language,\n },\n };\n}\n\n/** Contains the multi-part content of a message. */\nexport declare interface Content {\n /** List of parts that constitute a single message. Each part may have\n a different IANA MIME type. */\n parts?: Part[];\n /** Optional. The producer of the content. Must be either 'user' or\n 'model'. Useful to set for multi-turn conversations, otherwise can be\n empty. If role is not specified, SDK will determine the role. */\n role?: string;\n}\nfunction _isPart(obj: unknown): obj is Part {\n if (typeof obj === 'object' && obj !== null) {\n return (\n 'fileData' in obj ||\n 'text' in obj ||\n 'functionCall' in obj ||\n 'functionResponse' in obj ||\n 'inlineData' in obj ||\n 'videoMetadata' in obj ||\n 'codeExecutionResult' in obj ||\n 'executableCode' in obj\n );\n }\n return false;\n}\nfunction _toParts(partOrString: PartListUnion | string): Part[] {\n const parts: Part[] = [];\n if (typeof partOrString === 'string') {\n parts.push(createPartFromText(partOrString));\n } else if (_isPart(partOrString)) {\n parts.push(partOrString);\n } else if (Array.isArray(partOrString)) {\n if (partOrString.length === 0) {\n throw new Error('partOrString cannot be an empty array');\n }\n for (const part of partOrString) {\n if (typeof part === 'string') {\n parts.push(createPartFromText(part));\n } else if (_isPart(part)) {\n parts.push(part);\n } else {\n throw new Error('element in PartUnion must be a Part object or string');\n }\n }\n } else {\n throw new Error('partOrString must be a Part object, string, or array');\n }\n return parts;\n}\n/**\n * Creates a `Content` object with a user role from a `PartListUnion` object or `string`.\n */\nexport function createUserContent(\n partOrString: PartListUnion | string,\n): Content {\n return {\n role: 'user',\n parts: _toParts(partOrString),\n };\n}\n\n/**\n * Creates a `Content` object with a model role from a `PartListUnion` object or `string`.\n */\nexport function createModelContent(\n partOrString: PartListUnion | string,\n): Content {\n return {\n role: 'model',\n parts: _toParts(partOrString),\n };\n}\n/** HTTP options to be used in each of the requests. */\nexport declare interface HttpOptions {\n /** The base URL for the AI platform service endpoint. */\n baseUrl?: string;\n /** Specifies the version of the API to use. */\n apiVersion?: string;\n /** Additional HTTP headers to be sent with the request. */\n headers?: Record;\n /** Timeout for the request in milliseconds. */\n timeout?: number;\n}\n\n/** Schema that defines the format of input and output data.\n\n Represents a select subset of an OpenAPI 3.0 schema object.\n */\nexport declare interface Schema {\n /** Optional. Example of the object. Will only populated when the object is the root. */\n example?: unknown;\n /** Optional. Pattern of the Type.STRING to restrict a string to a regular expression. */\n pattern?: string;\n /** Optional. Default value of the data. */\n default?: unknown;\n /** Optional. Maximum length of the Type.STRING */\n maxLength?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING */\n minLength?: string;\n /** Optional. Minimum number of the properties for Type.OBJECT. */\n minProperties?: string;\n /** Optional. Maximum number of the properties for Type.OBJECT. */\n maxProperties?: string;\n /** Optional. The value should be validated against any (one or more) of the subschemas in the list. */\n anyOf?: Schema[];\n /** Optional. The description of the data. */\n description?: string;\n /** Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:[\"EAST\", NORTH\", \"SOUTH\", \"WEST\"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:[\"101\", \"201\", \"301\"]} */\n enum?: string[];\n /** Optional. The format of the data. Supported formats: for NUMBER type: \"float\", \"double\" for INTEGER type: \"int32\", \"int64\" for STRING type: \"email\", \"byte\", etc */\n format?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. */\n items?: Schema;\n /** Optional. Maximum number of the elements for Type.ARRAY. */\n maxItems?: string;\n /** Optional. Maximum value of the Type.INTEGER and Type.NUMBER */\n maximum?: number;\n /** Optional. Minimum number of the elements for Type.ARRAY. */\n minItems?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER */\n minimum?: number;\n /** Optional. Indicates if the value may be null. */\n nullable?: boolean;\n /** Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. */\n properties?: Record;\n /** Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. */\n propertyOrdering?: string[];\n /** Optional. Required properties of Type.OBJECT. */\n required?: string[];\n /** Optional. The title of the Schema. */\n title?: string;\n /** Optional. The type of the data. */\n type?: Type;\n}\n\n/** Safety settings. */\nexport declare interface SafetySetting {\n /** Determines if the harm block method uses probability or probability\n and severity scores. */\n method?: HarmBlockMethod;\n /** Required. Harm category. */\n category?: HarmCategory;\n /** Required. The harm block threshold. */\n threshold?: HarmBlockThreshold;\n}\n\n/** Defines a function that the model can generate JSON inputs for.\n\n The inputs are based on `OpenAPI 3.0 specifications\n `_.\n */\nexport declare interface FunctionDeclaration {\n /** Describes the output from the function in the OpenAPI JSON Schema\n Object format. */\n response?: Schema;\n /** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */\n description?: string;\n /** Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. */\n name?: string;\n /** Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 */\n parameters?: Schema;\n}\n\n/** Tool to support Google Search in Model. Powered by Google. */\nexport declare interface GoogleSearch {}\n\n/** Describes the options to customize dynamic retrieval. */\nexport declare interface DynamicRetrievalConfig {\n /** The mode of the predictor to be used in dynamic retrieval. */\n mode?: DynamicRetrievalConfigMode;\n /** Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used. */\n dynamicThreshold?: number;\n}\n\n/** Tool to retrieve public web data for grounding, powered by Google. */\nexport declare interface GoogleSearchRetrieval {\n /** Specifies the dynamic retrieval configuration for the given source. */\n dynamicRetrievalConfig?: DynamicRetrievalConfig;\n}\n\n/** Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder */\nexport declare interface VertexAISearch {\n /** Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` */\n datastore?: string;\n /** Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` */\n engine?: string;\n}\n\n/** The definition of the Rag resource. */\nexport declare interface VertexRagStoreRagResource {\n /** Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` */\n ragCorpus?: string;\n /** Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field. */\n ragFileIds?: string[];\n}\n\n/** Retrieve from Vertex RAG Store for grounding. */\nexport declare interface VertexRagStore {\n /** Optional. Deprecated. Please use rag_resources instead. */\n ragCorpora?: string[];\n /** Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. */\n ragResources?: VertexRagStoreRagResource[];\n /** Optional. Number of top k results to return from the selected corpora. */\n similarityTopK?: number;\n /** Optional. Only return results with vector distance smaller than the threshold. */\n vectorDistanceThreshold?: number;\n}\n\n/** Defines a retrieval tool that model can call to access external knowledge. */\nexport declare interface Retrieval {\n /** Optional. Deprecated. This option is no longer supported. */\n disableAttribution?: boolean;\n /** Set to use data source powered by Vertex AI Search. */\n vertexAiSearch?: VertexAISearch;\n /** Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService. */\n vertexRagStore?: VertexRagStore;\n}\n\n/** Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. */\nexport declare interface ToolCodeExecution {}\n\n/** Tool details of a tool that the model may use to generate a response. */\nexport declare interface Tool {\n /** List of function declarations that the tool supports. */\n functionDeclarations?: FunctionDeclaration[];\n /** Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. */\n retrieval?: Retrieval;\n /** Optional. Google Search tool type. Specialized retrieval tool\n that is powered by Google Search. */\n googleSearch?: GoogleSearch;\n /** Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. */\n googleSearchRetrieval?: GoogleSearchRetrieval;\n /** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services. */\n codeExecution?: ToolCodeExecution;\n}\n\n/** Function calling config. */\nexport declare interface FunctionCallingConfig {\n /** Optional. Function calling mode. */\n mode?: FunctionCallingConfigMode;\n /** Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided. */\n allowedFunctionNames?: string[];\n}\n\n/** Tool config.\n\n This config is shared for all tools provided in the request.\n */\nexport declare interface ToolConfig {\n /** Optional. Function calling config. */\n functionCallingConfig?: FunctionCallingConfig;\n}\n\n/** The configuration for the prebuilt speaker to use. */\nexport declare interface PrebuiltVoiceConfig {\n /** The name of the prebuilt voice to use.\n */\n voiceName?: string;\n}\n\n/** The configuration for the voice to use. */\nexport declare interface VoiceConfig {\n /** The configuration for the speaker to use.\n */\n prebuiltVoiceConfig?: PrebuiltVoiceConfig;\n}\n\n/** The speech generation configuration. */\nexport declare interface SpeechConfig {\n /** The configuration for the speaker to use.\n */\n voiceConfig?: VoiceConfig;\n}\n\n/** The thinking features configuration. */\nexport declare interface ThinkingConfig {\n /** Indicates whether to include thoughts in the response. If true, thoughts are returned only if the model supports thought and thoughts are available.\n */\n includeThoughts?: boolean;\n /** Indicates the thinking budget in tokens.\n */\n thinkingBudget?: number;\n}\n\n/** When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. */\nexport declare interface GenerationConfigRoutingConfigAutoRoutingMode {\n /** The model routing preference. */\n modelRoutingPreference?:\n | 'UNKNOWN'\n | 'PRIORITIZE_QUALITY'\n | 'BALANCED'\n | 'PRIORITIZE_COST';\n}\n\n/** When manual routing is set, the specified model will be used directly. */\nexport declare interface GenerationConfigRoutingConfigManualRoutingMode {\n /** The model name to use. Only the public LLM models are accepted. e.g. 'gemini-1.5-pro-001'. */\n modelName?: string;\n}\n\n/** The configuration for routing the request to a specific model. */\nexport declare interface GenerationConfigRoutingConfig {\n /** Automated routing. */\n autoMode?: GenerationConfigRoutingConfigAutoRoutingMode;\n /** Manual routing. */\n manualMode?: GenerationConfigRoutingConfigManualRoutingMode;\n}\n\n/** Optional model configuration parameters.\n\n For more information, see `Content generation parameters\n `_.\n */\nexport declare interface GenerateContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Instructions for the model to steer it toward better performance.\n For example, \"Answer as concisely as possible\" or \"Don't use technical\n terms in your response\".\n */\n systemInstruction?: ContentUnion;\n /** Value that controls the degree of randomness in token selection.\n Lower temperatures are good for prompts that require a less open-ended or\n creative response, while higher temperatures can lead to more diverse or\n creative results.\n */\n temperature?: number;\n /** Tokens are selected from the most to least probable until the sum\n of their probabilities equals this value. Use a lower value for less\n random responses and a higher value for more random responses.\n */\n topP?: number;\n /** For each token selection step, the ``top_k`` tokens with the\n highest probabilities are sampled. Then tokens are further filtered based\n on ``top_p`` with the final token selected using temperature sampling. Use\n a lower number for less random responses and a higher number for more\n random responses.\n */\n topK?: number;\n /** Number of response variations to return.\n */\n candidateCount?: number;\n /** Maximum number of tokens that can be generated in the response.\n */\n maxOutputTokens?: number;\n /** List of strings that tells the model to stop generating text if one\n of the strings is encountered in the response.\n */\n stopSequences?: string[];\n /** Whether to return the log probabilities of the tokens that were\n chosen by the model at each step.\n */\n responseLogprobs?: boolean;\n /** Number of top candidate tokens to return the log probabilities for\n at each generation step.\n */\n logprobs?: number;\n /** Positive values penalize tokens that already appear in the\n generated text, increasing the probability of generating more diverse\n content.\n */\n presencePenalty?: number;\n /** Positive values penalize tokens that repeatedly appear in the\n generated text, increasing the probability of generating more diverse\n content.\n */\n frequencyPenalty?: number;\n /** When ``seed`` is fixed to a specific number, the model makes a best\n effort to provide the same response for repeated requests. By default, a\n random number is used.\n */\n seed?: number;\n /** Output response media type of the generated candidate text.\n */\n responseMimeType?: string;\n /** Schema that the generated candidate text must adhere to.\n */\n responseSchema?: SchemaUnion;\n /** Configuration for model router requests.\n */\n routingConfig?: GenerationConfigRoutingConfig;\n /** Safety settings in the request to block unsafe content in the\n response.\n */\n safetySettings?: SafetySetting[];\n /** Code that enables the system to interact with external systems to\n perform an action outside of the knowledge and scope of the model.\n */\n tools?: ToolListUnion;\n /** Associates model output to a specific function call.\n */\n toolConfig?: ToolConfig;\n /** Labels with user-defined metadata to break down billed charges. */\n labels?: Record;\n /** Resource name of a context cache that can be used in subsequent\n requests.\n */\n cachedContent?: string;\n /** The requested modalities of the response. Represents the set of\n modalities that the model can return.\n */\n responseModalities?: string[];\n /** If specified, the media resolution specified will be used.\n */\n mediaResolution?: MediaResolution;\n /** The speech generation configuration.\n */\n speechConfig?: SpeechConfigUnion;\n /** If enabled, audio timestamp will be included in the request to the\n model.\n */\n audioTimestamp?: boolean;\n /** The thinking features configuration.\n */\n thinkingConfig?: ThinkingConfig;\n}\n\n/** Config for models.generate_content parameters. */\nexport declare interface GenerateContentParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Content of the request.\n */\n contents: ContentListUnion;\n /** Configuration that contains optional model parameters.\n */\n config?: GenerateContentConfig;\n}\n\n/** Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp */\nexport declare interface GoogleTypeDate {\n /** Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */\n day?: number;\n /** Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */\n month?: number;\n /** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */\n year?: number;\n}\n\n/** Source attributions for content. */\nexport declare interface Citation {\n /** Output only. End index into the content. */\n endIndex?: number;\n /** Output only. License of the attribution. */\n license?: string;\n /** Output only. Publication date of the attribution. */\n publicationDate?: GoogleTypeDate;\n /** Output only. Start index into the content. */\n startIndex?: number;\n /** Output only. Title of the attribution. */\n title?: string;\n /** Output only. Url reference of the attribution. */\n uri?: string;\n}\n\n/** Citation information when the model quotes another source. */\nexport declare interface CitationMetadata {\n /** Contains citation information when the model directly quotes, at\n length, from another source. Can include traditional websites and code\n repositories.\n */\n citations?: Citation[];\n}\n\n/** Chunk from context retrieved by the retrieval tools. */\nexport declare interface GroundingChunkRetrievedContext {\n /** Text of the attribution. */\n text?: string;\n /** Title of the attribution. */\n title?: string;\n /** URI reference of the attribution. */\n uri?: string;\n}\n\n/** Chunk from the web. */\nexport declare interface GroundingChunkWeb {\n /** Domain of the (original) URI. */\n domain?: string;\n /** Title of the chunk. */\n title?: string;\n /** URI reference of the chunk. */\n uri?: string;\n}\n\n/** Grounding chunk. */\nexport declare interface GroundingChunk {\n /** Grounding chunk from context retrieved by the retrieval tools. */\n retrievedContext?: GroundingChunkRetrievedContext;\n /** Grounding chunk from the web. */\n web?: GroundingChunkWeb;\n}\n\n/** Segment of the content. */\nexport declare interface Segment {\n /** Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero. */\n endIndex?: number;\n /** Output only. The index of a Part object within its parent Content object. */\n partIndex?: number;\n /** Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero. */\n startIndex?: number;\n /** Output only. The text corresponding to the segment from the response. */\n text?: string;\n}\n\n/** Grounding support. */\nexport declare interface GroundingSupport {\n /** Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the grounding_chunk_indices. */\n confidenceScores?: number[];\n /** A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim. */\n groundingChunkIndices?: number[];\n /** Segment of the content this support belongs to. */\n segment?: Segment;\n}\n\n/** Metadata related to retrieval in the grounding flow. */\nexport declare interface RetrievalMetadata {\n /** Optional. Score indicating how likely information from Google Search could help answer the prompt. The score is in the range `[0, 1]`, where 0 is the least likely and 1 is the most likely. This score is only populated when Google Search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger Google Search. */\n googleSearchDynamicRetrievalScore?: number;\n}\n\n/** Google search entry point. */\nexport declare interface SearchEntryPoint {\n /** Optional. Web content snippet that can be embedded in a web page or an app webview. */\n renderedContent?: string;\n /** Optional. Base64 encoded JSON representing array of tuple. */\n sdkBlob?: string;\n}\n\n/** Metadata returned to client when grounding is enabled. */\nexport declare interface GroundingMetadata {\n /** List of supporting references retrieved from specified grounding source. */\n groundingChunks?: GroundingChunk[];\n /** Optional. List of grounding support. */\n groundingSupports?: GroundingSupport[];\n /** Optional. Output only. Retrieval metadata. */\n retrievalMetadata?: RetrievalMetadata;\n /** Optional. Queries executed by the retrieval tools. */\n retrievalQueries?: string[];\n /** Optional. Google search entry for the following-up web searches. */\n searchEntryPoint?: SearchEntryPoint;\n /** Optional. Web search queries for the following-up web search. */\n webSearchQueries?: string[];\n}\n\n/** Candidate for the logprobs token and score. */\nexport declare interface LogprobsResultCandidate {\n /** The candidate's log probability. */\n logProbability?: number;\n /** The candidate's token string value. */\n token?: string;\n /** The candidate's token id value. */\n tokenId?: number;\n}\n\n/** Candidates with top log probabilities at each decoding step. */\nexport declare interface LogprobsResultTopCandidates {\n /** Sorted by log probability in descending order. */\n candidates?: LogprobsResultCandidate[];\n}\n\n/** Logprobs Result */\nexport declare interface LogprobsResult {\n /** Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates. */\n chosenCandidates?: LogprobsResultCandidate[];\n /** Length = total number of decoding steps. */\n topCandidates?: LogprobsResultTopCandidates[];\n}\n\n/** Safety rating corresponding to the generated content. */\nexport declare interface SafetyRating {\n /** Output only. Indicates whether the content was filtered out because of this rating. */\n blocked?: boolean;\n /** Output only. Harm category. */\n category?: HarmCategory;\n /** Output only. Harm probability levels in the content. */\n probability?: HarmProbability;\n /** Output only. Harm probability score. */\n probabilityScore?: number;\n /** Output only. Harm severity levels in the content. */\n severity?: HarmSeverity;\n /** Output only. Harm severity score. */\n severityScore?: number;\n}\n\n/** A response candidate generated from the model. */\nexport declare interface Candidate {\n /** Contains the multi-part content of the response.\n */\n content?: Content;\n /** Source attribution of the generated content.\n */\n citationMetadata?: CitationMetadata;\n /** Describes the reason the model stopped generating tokens.\n */\n finishMessage?: string;\n /** Number of tokens for this candidate.\n */\n tokenCount?: number;\n /** The reason why the model stopped generating tokens.\n If empty, the model has not stopped generating the tokens.\n */\n finishReason?: FinishReason;\n /** Output only. Average log probability score of the candidate. */\n avgLogprobs?: number;\n /** Output only. Metadata specifies sources used to ground generated content. */\n groundingMetadata?: GroundingMetadata;\n /** Output only. Index of the candidate. */\n index?: number;\n /** Output only. Log-likelihood scores for the response tokens and top tokens */\n logprobsResult?: LogprobsResult;\n /** Output only. List of ratings for the safety of a response candidate. There is at most one rating per category. */\n safetyRatings?: SafetyRating[];\n}\n\n/** Content filter results for a prompt sent in the request. */\nexport class GenerateContentResponsePromptFeedback {\n /** Output only. Blocked reason. */\n blockReason?: BlockedReason;\n /** Output only. A readable block reason message. */\n blockReasonMessage?: string;\n /** Output only. Safety ratings. */\n safetyRatings?: SafetyRating[];\n}\n\n/** Represents token counting info for a single modality. */\nexport declare interface ModalityTokenCount {\n /** The modality associated with this token count. */\n modality?: MediaModality;\n /** Number of tokens. */\n tokenCount?: number;\n}\n\n/** Usage metadata about response(s). */\nexport class GenerateContentResponseUsageMetadata {\n /** Output only. List of modalities of the cached content in the request input. */\n cacheTokensDetails?: ModalityTokenCount[];\n /** Output only. Number of tokens in the cached part in the input (the cached content). */\n cachedContentTokenCount?: number;\n /** Number of tokens in the response(s). */\n candidatesTokenCount?: number;\n /** Output only. List of modalities that were returned in the response. */\n candidatesTokensDetails?: ModalityTokenCount[];\n /** Number of tokens in the request. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */\n promptTokenCount?: number;\n /** Output only. List of modalities that were processed in the request input. */\n promptTokensDetails?: ModalityTokenCount[];\n /** Output only. Number of tokens present in thoughts output. */\n thoughtsTokenCount?: number;\n /** Output only. Number of tokens present in tool-use prompt(s). */\n toolUsePromptTokenCount?: number;\n /** Output only. List of modalities that were processed for tool-use request inputs. */\n toolUsePromptTokensDetails?: ModalityTokenCount[];\n /** Total token count for prompt, response candidates, and tool-use prompts (if present). */\n totalTokenCount?: number;\n /** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */\n trafficType?: TrafficType;\n}\n\n/** Response message for PredictionService.GenerateContent. */\nexport class GenerateContentResponse {\n /** Response variations returned by the model.\n */\n candidates?: Candidate[];\n /** Timestamp when the request is made to the server.\n */\n createTime?: string;\n /** Identifier for each response.\n */\n responseId?: string;\n /** Output only. The model version used to generate the response. */\n modelVersion?: string;\n /** Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations. */\n promptFeedback?: GenerateContentResponsePromptFeedback;\n /** Usage metadata about the response(s). */\n usageMetadata?: GenerateContentResponseUsageMetadata;\n /**\n * Returns the concatenation of all text parts from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the text from the first\n * one will be returned.\n * If there are non-text parts in the response, the concatenation of all text\n * parts will be returned, and a warning will be logged.\n * If there are thought parts in the response, the concatenation of all text\n * parts excluding the thought parts will be returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'Why is the sky blue?',\n * });\n *\n * console.debug(response.text);\n * ```\n */\n get text(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning text from the first one.',\n );\n }\n let text = '';\n let anyTextPartText = false;\n const nonTextParts = [];\n for (const part of this.candidates?.[0]?.content?.parts ?? []) {\n for (const [fieldName, fieldValue] of Object.entries(part)) {\n if (\n fieldName !== 'text' &&\n fieldName !== 'thought' &&\n (fieldValue !== null || fieldValue !== undefined)\n ) {\n nonTextParts.push(fieldName);\n }\n }\n if (typeof part.text === 'string') {\n if (typeof part.thought === 'boolean' && part.thought) {\n continue;\n }\n anyTextPartText = true;\n text += part.text;\n }\n }\n if (nonTextParts.length > 0) {\n console.warn(\n `there are non-text parts ${nonTextParts} in the response, returning concatenation of all text parts. Please refer to the non text parts for a full response from model.`,\n );\n }\n // part.text === '' is different from part.text is null\n return anyTextPartText ? text : undefined;\n }\n\n /**\n * Returns the function calls from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the function calls from\n * the first one will be returned.\n * If there are no function calls in the response, undefined will be returned.\n *\n * @example\n * ```ts\n * const controlLightFunctionDeclaration: FunctionDeclaration = {\n * name: 'controlLight',\n * parameters: {\n * type: Type.OBJECT,\n * description: 'Set the brightness and color temperature of a room light.',\n * properties: {\n * brightness: {\n * type: Type.NUMBER,\n * description:\n * 'Light level from 0 to 100. Zero is off and 100 is full brightness.',\n * },\n * colorTemperature: {\n * type: Type.STRING,\n * description:\n * 'Color temperature of the light fixture which can be `daylight`, `cool` or `warm`.',\n * },\n * },\n * required: ['brightness', 'colorTemperature'],\n * };\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents: 'Dim the lights so the room feels cozy and warm.',\n * config: {\n * tools: [{functionDeclarations: [controlLightFunctionDeclaration]}],\n * toolConfig: {\n * functionCallingConfig: {\n * mode: FunctionCallingConfigMode.ANY,\n * allowedFunctionNames: ['controlLight'],\n * },\n * },\n * },\n * });\n * console.debug(JSON.stringify(response.functionCalls));\n * ```\n */\n get functionCalls(): FunctionCall[] | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning function calls from the first one.',\n );\n }\n const functionCalls = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.functionCall)\n .map((part) => part.functionCall)\n .filter(\n (functionCall): functionCall is FunctionCall =>\n functionCall !== undefined,\n );\n if (functionCalls?.length === 0) {\n return undefined;\n }\n return functionCalls;\n }\n /**\n * Returns the first executable code from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the executable code from\n * the first one will be returned.\n * If there are no executable code in the response, undefined will be\n * returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.'\n * config: {\n * tools: [{codeExecution: {}}],\n * },\n * });\n *\n * console.debug(response.executableCode);\n * ```\n */\n get executableCode(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning executable code from the first one.',\n );\n }\n const executableCode = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.executableCode)\n .map((part) => part.executableCode)\n .filter(\n (executableCode): executableCode is ExecutableCode =>\n executableCode !== undefined,\n );\n if (executableCode?.length === 0) {\n return undefined;\n }\n\n return executableCode?.[0]?.code;\n }\n /**\n * Returns the first code execution result from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the code execution result from\n * the first one will be returned.\n * If there are no code execution result in the response, undefined will be returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.'\n * config: {\n * tools: [{codeExecution: {}}],\n * },\n * });\n *\n * console.debug(response.codeExecutionResult);\n * ```\n */\n get codeExecutionResult(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning code execution result from the first one.',\n );\n }\n const codeExecutionResult = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.codeExecutionResult)\n .map((part) => part.codeExecutionResult)\n .filter(\n (codeExecutionResult): codeExecutionResult is CodeExecutionResult =>\n codeExecutionResult !== undefined,\n );\n if (codeExecutionResult?.length === 0) {\n return undefined;\n }\n return codeExecutionResult?.[0]?.output;\n }\n}\n\nexport /** Optional parameters for the embed_content method. */\ndeclare interface EmbedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Type of task for which the embedding will be used.\n */\n taskType?: string;\n /** Title for the text. Only applicable when TaskType is\n `RETRIEVAL_DOCUMENT`.\n */\n title?: string;\n /** Reduced dimension for the output embedding. If set,\n excessive values in the output embedding are truncated from the end.\n Supported by newer models since 2024 only. You cannot set this value if\n using the earlier model (`models/embedding-001`).\n */\n outputDimensionality?: number;\n /** Vertex API only. The MIME type of the input.\n */\n mimeType?: string;\n /** Vertex API only. Whether to silently truncate inputs longer than\n the max sequence length. If this option is set to false, oversized inputs\n will lead to an INVALID_ARGUMENT error, similar to other text APIs.\n */\n autoTruncate?: boolean;\n}\n\n/** Parameters for the embed_content method. */\nexport declare interface EmbedContentParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** The content to embed. Only the `parts.text` fields will be counted.\n */\n contents: ContentListUnion;\n /** Configuration that contains optional parameters.\n */\n config?: EmbedContentConfig;\n}\n\n/** Statistics of the input text associated with the result of content embedding. */\nexport declare interface ContentEmbeddingStatistics {\n /** Vertex API only. If the input text was truncated due to having\n a length longer than the allowed maximum input.\n */\n truncated?: boolean;\n /** Vertex API only. Number of tokens of the input text.\n */\n tokenCount?: number;\n}\n\n/** The embedding generated from an input content. */\nexport declare interface ContentEmbedding {\n /** A list of floats representing an embedding.\n */\n values?: number[];\n /** Vertex API only. Statistics of the input text associated with this\n embedding.\n */\n statistics?: ContentEmbeddingStatistics;\n}\n\n/** Request-level metadata for the Vertex Embed Content API. */\nexport declare interface EmbedContentMetadata {\n /** Vertex API only. The total number of billable characters included\n in the request.\n */\n billableCharacterCount?: number;\n}\n\n/** Response for the embed_content method. */\nexport class EmbedContentResponse {\n /** The embeddings for each request, in the same order as provided in\n the batch request.\n */\n embeddings?: ContentEmbedding[];\n /** Vertex API only. Metadata about the request.\n */\n metadata?: EmbedContentMetadata;\n}\n\n/** The config for generating an images. */\nexport declare interface GenerateImagesConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Cloud Storage URI used to store the generated images.\n */\n outputGcsUri?: string;\n /** Description of what to discourage in the generated images.\n */\n negativePrompt?: string;\n /** Number of images to generate.\n */\n numberOfImages?: number;\n /** Aspect ratio of the generated images.\n */\n aspectRatio?: string;\n /** Controls how much the model adheres to the text prompt. Large\n values increase output and prompt alignment, but may compromise image\n quality.\n */\n guidanceScale?: number;\n /** Random seed for image generation. This is not available when\n ``add_watermark`` is set to true.\n */\n seed?: number;\n /** Filter level for safety filtering.\n */\n safetyFilterLevel?: SafetyFilterLevel;\n /** Allows generation of people by the model.\n */\n personGeneration?: PersonGeneration;\n /** Whether to report the safety scores of each generated image and\n the positive prompt in the response.\n */\n includeSafetyAttributes?: boolean;\n /** Whether to include the Responsible AI filter reason if the image\n is filtered out of the response.\n */\n includeRaiReason?: boolean;\n /** Language of the text in the prompt.\n */\n language?: ImagePromptLanguage;\n /** MIME type of the generated image.\n */\n outputMimeType?: string;\n /** Compression quality of the generated image (for ``image/jpeg``\n only).\n */\n outputCompressionQuality?: number;\n /** Whether to add a watermark to the generated images.\n */\n addWatermark?: boolean;\n /** Whether to use the prompt rewriting logic.\n */\n enhancePrompt?: boolean;\n}\n\n/** The parameters for generating images. */\nexport declare interface GenerateImagesParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Text prompt that typically describes the images to output.\n */\n prompt: string;\n /** Configuration for generating images.\n */\n config?: GenerateImagesConfig;\n}\n\n/** An image. */\nexport declare interface Image {\n /** The Cloud Storage URI of the image. ``Image`` can contain a value\n for this field or the ``image_bytes`` field but not both.\n */\n gcsUri?: string;\n /** The image bytes data. ``Image`` can contain a value for this field\n or the ``gcs_uri`` field but not both.\n */\n imageBytes?: string;\n /** The MIME type of the image. */\n mimeType?: string;\n}\n\n/** Safety attributes of a GeneratedImage or the user-provided prompt. */\nexport declare interface SafetyAttributes {\n /** List of RAI categories.\n */\n categories?: string[];\n /** List of scores of each categories.\n */\n scores?: number[];\n /** Internal use only.\n */\n contentType?: string;\n}\n\n/** An output image. */\nexport declare interface GeneratedImage {\n /** The output image data.\n */\n image?: Image;\n /** Responsible AI filter reason if the image is filtered out of the\n response.\n */\n raiFilteredReason?: string;\n /** Safety attributes of the image. Lists of RAI categories and their\n scores of each content.\n */\n safetyAttributes?: SafetyAttributes;\n /** The rewritten prompt used for the image generation if the prompt\n enhancer is enabled.\n */\n enhancedPrompt?: string;\n}\n\n/** The output images response. */\nexport class GenerateImagesResponse {\n /** List of generated images.\n */\n generatedImages?: GeneratedImage[];\n /** Safety attributes of the positive prompt. Only populated if\n ``include_safety_attributes`` is set to True.\n */\n positivePromptSafetyAttributes?: SafetyAttributes;\n}\n\n/** Optional parameters for models.get method. */\nexport declare interface GetModelConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\nexport declare interface GetModelParameters {\n model: string;\n /** Optional parameters for the request. */\n config?: GetModelConfig;\n}\n\n/** An endpoint where you deploy models. */\nexport declare interface Endpoint {\n /** Resource name of the endpoint. */\n name?: string;\n /** ID of the model that's deployed to the endpoint. */\n deployedModelId?: string;\n}\n\n/** A tuned machine learning model. */\nexport declare interface TunedModelInfo {\n /** ID of the base model that you want to tune. */\n baseModel?: string;\n /** Date and time when the base model was created. */\n createTime?: string;\n /** Date and time when the base model was last updated. */\n updateTime?: string;\n}\n\n/** A trained machine learning model. */\nexport declare interface Model {\n /** Resource name of the model. */\n name?: string;\n /** Display name of the model. */\n displayName?: string;\n /** Description of the model. */\n description?: string;\n /** Version ID of the model. A new version is committed when a new\n model version is uploaded or trained under an existing model ID. The\n version ID is an auto-incrementing decimal number in string\n representation. */\n version?: string;\n /** List of deployed models created from this base model. Note that a\n model could have been deployed to endpoints in different locations. */\n endpoints?: Endpoint[];\n /** Labels with user-defined metadata to organize your models. */\n labels?: Record;\n /** Information about the tuned model from the base model. */\n tunedModelInfo?: TunedModelInfo;\n /** The maximum number of input tokens that the model can handle. */\n inputTokenLimit?: number;\n /** The maximum number of output tokens that the model can generate. */\n outputTokenLimit?: number;\n /** List of actions that are supported by the model. */\n supportedActions?: string[];\n}\n\n/** Generation config. */\nexport declare interface GenerationConfig {\n /** Optional. If enabled, audio timestamp will be included in the request to the model. */\n audioTimestamp?: boolean;\n /** Optional. Number of candidates to generate. */\n candidateCount?: number;\n /** Optional. Frequency penalties. */\n frequencyPenalty?: number;\n /** Optional. Logit probabilities. */\n logprobs?: number;\n /** Optional. The maximum number of output tokens to generate per message. */\n maxOutputTokens?: number;\n /** Optional. If specified, the media resolution specified will be used. */\n mediaResolution?: MediaResolution;\n /** Optional. Positive penalties. */\n presencePenalty?: number;\n /** Optional. If true, export the logprobs results in response. */\n responseLogprobs?: boolean;\n /** Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature. */\n responseMimeType?: string;\n /** Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response. */\n responseSchema?: Schema;\n /** Optional. Routing configuration. */\n routingConfig?: GenerationConfigRoutingConfig;\n /** Optional. Seed. */\n seed?: number;\n /** Optional. Stop sequences. */\n stopSequences?: string[];\n /** Optional. Controls the randomness of predictions. */\n temperature?: number;\n /** Optional. If specified, top-k sampling will be used. */\n topK?: number;\n /** Optional. If specified, nucleus sampling will be used. */\n topP?: number;\n}\n\n/** Config for the count_tokens method. */\nexport declare interface CountTokensConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Instructions for the model to steer it toward better performance.\n */\n systemInstruction?: ContentUnion;\n /** Code that enables the system to interact with external systems to\n perform an action outside of the knowledge and scope of the model.\n */\n tools?: Tool[];\n /** Configuration that the model uses to generate the response. Not\n supported by the Gemini Developer API.\n */\n generationConfig?: GenerationConfig;\n}\n\n/** Parameters for counting tokens. */\nexport declare interface CountTokensParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Input content. */\n contents: ContentListUnion;\n /** Configuration for counting tokens. */\n config?: CountTokensConfig;\n}\n\n/** Response for counting tokens. */\nexport class CountTokensResponse {\n /** Total number of tokens. */\n totalTokens?: number;\n /** Number of tokens in the cached part of the prompt (the cached content). */\n cachedContentTokenCount?: number;\n}\n\n/** Optional parameters for computing tokens. */\nexport declare interface ComputeTokensConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for computing tokens. */\nexport declare interface ComputeTokensParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Input content. */\n contents: ContentListUnion;\n /** Optional parameters for the request.\n */\n config?: ComputeTokensConfig;\n}\n\n/** Tokens info with a list of tokens and the corresponding list of token ids. */\nexport declare interface TokensInfo {\n /** Optional. Optional fields for the role from the corresponding Content. */\n role?: string;\n /** A list of token ids from the input. */\n tokenIds?: string[];\n /** A list of tokens from the input. */\n tokens?: string[];\n}\n\n/** Response for computing tokens. */\nexport class ComputeTokensResponse {\n /** Lists of tokens info from the input. A ComputeTokensRequest could have multiple instances with a prompt in each instance. We also need to return lists of tokens info for the request with multiple instances. */\n tokensInfo?: TokensInfo[];\n}\n\n/** Configuration for generating videos. */\nexport declare interface GenerateVideosConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Number of output videos. */\n numberOfVideos?: number;\n /** The gcs bucket where to save the generated videos. */\n outputGcsUri?: string;\n /** Frames per second for video generation. */\n fps?: number;\n /** Duration of the clip for video generation in seconds. */\n durationSeconds?: number;\n /** The RNG seed. If RNG seed is exactly same for each request with unchanged inputs, the prediction results will be consistent. Otherwise, a random RNG seed will be used each time to produce a different result. */\n seed?: number;\n /** The aspect ratio for the generated video. 16:9 (landscape) and 9:16 (portrait) are supported. */\n aspectRatio?: string;\n /** The resolution for the generated video. 1280x720, 1920x1080 are supported. */\n resolution?: string;\n /** Whether allow to generate person videos, and restrict to specific ages. Supported values are: dont_allow, allow_adult. */\n personGeneration?: string;\n /** The pubsub topic where to publish the video generation progress. */\n pubsubTopic?: string;\n /** Optional field in addition to the text content. Negative prompts can be explicitly stated here to help generate the video. */\n negativePrompt?: string;\n /** Whether to use the prompt rewriting logic. */\n enhancePrompt?: boolean;\n}\n\n/** Class that represents the parameters for generating an image. */\nexport declare interface GenerateVideosParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** The text prompt for generating the videos. Optional for image to video use cases. */\n prompt?: string;\n /** The input image for generating the videos.\n Optional if prompt is provided. */\n image?: Image;\n /** Configuration for generating videos. */\n config?: GenerateVideosConfig;\n}\n\n/** A generated video. */\nexport declare interface Video {\n /** Path to another storage. */\n uri?: string;\n /** Video bytes. */\n videoBytes?: string;\n /** Video encoding, for example \"video/mp4\". */\n mimeType?: string;\n}\n\n/** A generated video. */\nexport declare interface GeneratedVideo {\n /** The output video */\n video?: Video;\n}\n\n/** Response with generated videos. */\nexport class GenerateVideosResponse {\n /** List of the generated videos */\n generatedVideos?: GeneratedVideo[];\n /** Returns if any videos were filtered due to RAI policies. */\n raiMediaFilteredCount?: number;\n /** Returns rai failure reasons if any. */\n raiMediaFilteredReasons?: string[];\n}\n\n/** A video generation operation. */\nexport declare interface GenerateVideosOperation {\n /** The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. */\n name?: string;\n /** Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. */\n metadata?: Record;\n /** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */\n done?: boolean;\n /** The error result of the operation in case of failure or cancellation. */\n error?: Record;\n /** The generated videos. */\n response?: GenerateVideosResponse;\n}\n\n/** Optional configuration for cached content creation. */\nexport declare interface CreateCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: \"3.5s\". */\n ttl?: string;\n /** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */\n expireTime?: string;\n /** The user-generated meaningful display name of the cached content.\n */\n displayName?: string;\n /** The content to cache.\n */\n contents?: ContentListUnion;\n /** Developer set system instruction.\n */\n systemInstruction?: ContentUnion;\n /** A list of `Tools` the model may use to generate the next response.\n */\n tools?: Tool[];\n /** Configuration for the tools to use. This config is shared for all tools.\n */\n toolConfig?: ToolConfig;\n}\n\n/** Parameters for caches.create method. */\nexport declare interface CreateCachedContentParameters {\n /** ID of the model to use. Example: gemini-1.5-flash */\n model: string;\n /** Configuration that contains optional parameters.\n */\n config?: CreateCachedContentConfig;\n}\n\n/** Metadata on the usage of the cached content. */\nexport declare interface CachedContentUsageMetadata {\n /** Duration of audio in seconds. */\n audioDurationSeconds?: number;\n /** Number of images. */\n imageCount?: number;\n /** Number of text characters. */\n textCount?: number;\n /** Total number of tokens that the cached content consumes. */\n totalTokenCount?: number;\n /** Duration of video in seconds. */\n videoDurationSeconds?: number;\n}\n\n/** A resource used in LLM queries for users to explicitly specify what to cache. */\nexport declare interface CachedContent {\n /** The server-generated resource name of the cached content. */\n name?: string;\n /** The user-generated meaningful display name of the cached content. */\n displayName?: string;\n /** The name of the publisher model to use for cached content. */\n model?: string;\n /** Creation time of the cache entry. */\n createTime?: string;\n /** When the cache entry was last updated in UTC time. */\n updateTime?: string;\n /** Expiration time of the cached content. */\n expireTime?: string;\n /** Metadata on the usage of the cached content. */\n usageMetadata?: CachedContentUsageMetadata;\n}\n\n/** Optional parameters for caches.get method. */\nexport declare interface GetCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for caches.get method. */\nexport declare interface GetCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Optional parameters for the request.\n */\n config?: GetCachedContentConfig;\n}\n\n/** Optional parameters for caches.delete method. */\nexport declare interface DeleteCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for caches.delete method. */\nexport declare interface DeleteCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Optional parameters for the request.\n */\n config?: DeleteCachedContentConfig;\n}\n\n/** Empty response for caches.delete method. */\nexport class DeleteCachedContentResponse {}\n\n/** Optional parameters for caches.update method. */\nexport declare interface UpdateCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: \"3.5s\". */\n ttl?: string;\n /** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */\n expireTime?: string;\n}\n\nexport declare interface UpdateCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Configuration that contains optional parameters.\n */\n config?: UpdateCachedContentConfig;\n}\n\n/** Config for caches.list method. */\nexport declare interface ListCachedContentsConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n pageSize?: number;\n pageToken?: string;\n}\n\n/** Parameters for caches.list method. */\nexport declare interface ListCachedContentsParameters {\n /** Configuration that contains optional parameters.\n */\n config?: ListCachedContentsConfig;\n}\n\nexport class ListCachedContentsResponse {\n nextPageToken?: string;\n /** List of cached contents.\n */\n cachedContents?: CachedContent[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface ListFilesConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n pageSize?: number;\n pageToken?: string;\n}\n\n/** Generates the parameters for the list method. */\nexport declare interface ListFilesParameters {\n /** Used to override the default configuration. */\n config?: ListFilesConfig;\n}\n\n/** Status of a File that uses a common error model. */\nexport declare interface FileStatus {\n /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */\n details?: Record[];\n /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */\n message?: string;\n /** The status code. 0 for OK, 1 for CANCELLED */\n code?: number;\n}\n\n/** A file uploaded to the API. */\nexport declare interface File {\n /** The `File` resource name. The ID (name excluding the \"files/\" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be generated. Example: `files/123-456` */\n name?: string;\n /** Optional. The human-readable display name for the `File`. The display name must be no more than 512 characters in length, including spaces. Example: 'Welcome Image' */\n displayName?: string;\n /** Output only. MIME type of the file. */\n mimeType?: string;\n /** Output only. Size of the file in bytes. */\n sizeBytes?: string;\n /** Output only. The timestamp of when the `File` was created. */\n createTime?: string;\n /** Output only. The timestamp of when the `File` will be deleted. Only set if the `File` is scheduled to expire. */\n expirationTime?: string;\n /** Output only. The timestamp of when the `File` was last updated. */\n updateTime?: string;\n /** Output only. SHA-256 hash of the uploaded bytes. The hash value is encoded in base64 format. */\n sha256Hash?: string;\n /** Output only. The URI of the `File`. */\n uri?: string;\n /** Output only. The URI of the `File`, only set for downloadable (generated) files. */\n downloadUri?: string;\n /** Output only. Processing state of the File. */\n state?: FileState;\n /** Output only. The source of the `File`. */\n source?: FileSource;\n /** Output only. Metadata for a video. */\n videoMetadata?: Record;\n /** Output only. Error status if File processing failed. */\n error?: FileStatus;\n}\n\n/** Response for the list files method. */\nexport class ListFilesResponse {\n /** A token to retrieve next page of results. */\n nextPageToken?: string;\n /** The list of files. */\n files?: File[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface CreateFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the private _create method. */\nexport declare interface CreateFileParameters {\n /** The file to be uploaded.\n mime_type: (Required) The MIME type of the file. Must be provided.\n name: (Optional) The name of the file in the destination (e.g.\n 'files/sample-image').\n display_name: (Optional) The display name of the file.\n */\n file: File;\n /** Used to override the default configuration. */\n config?: CreateFileConfig;\n}\n\n/** A wrapper class for the http response. */\nexport class HttpResponse {\n /** Used to retain the processed HTTP headers in the response. */\n headers?: Record;\n /**\n * The original http response.\n */\n responseInternal: Response;\n\n constructor(response: Response) {\n // Process the headers.\n const headers: Record = {};\n for (const pair of response.headers.entries()) {\n headers[pair[0]] = pair[1];\n }\n this.headers = headers;\n\n // Keep the original response.\n this.responseInternal = response;\n }\n\n json(): Promise {\n return this.responseInternal.json();\n }\n}\n\n/** Callbacks for the live API. */\nexport interface LiveCallbacks {\n /**\n * Called when the websocket connection is established.\n */\n onopen?: (() => void) | null;\n /**\n * Called when a message is received from the server.\n */\n onmessage: (e: LiveServerMessage) => void;\n /**\n * Called when an error occurs.\n */\n onerror?: ((e: ErrorEvent) => void) | null;\n /**\n * Called when the websocket connection is closed.\n */\n onclose?: ((e: CloseEvent) => void) | null;\n}\n\n/** Parameters for the upload file method. */\nexport interface UploadFileParameters {\n /** The string path to the file to be uploaded or a Blob object. */\n file: string | globalThis.Blob;\n /** Configuration that contains optional parameters. */\n config?: UploadFileConfig;\n}\n/** Response for the create file method. */\nexport class CreateFileResponse {\n /** Used to retain the full HTTP response. */\n sdkHttpResponse?: HttpResponse;\n}\n\n/** Used to override the default configuration. */\nexport declare interface GetFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the get method. */\nexport declare interface GetFileParameters {\n /** The name identifier for the file to retrieve. */\n name: string;\n /** Used to override the default configuration. */\n config?: GetFileConfig;\n}\n\n/** Used to override the default configuration. */\nexport declare interface DeleteFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the get method. */\nexport declare interface DeleteFileParameters {\n /** The name identifier for the file to be deleted. */\n name: string;\n /** Used to override the default configuration. */\n config?: DeleteFileConfig;\n}\n\n/** Response for the delete file method. */\nexport class DeleteFileResponse {}\n\nexport declare interface GetOperationConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for the GET method. */\nexport declare interface GetOperationParameters {\n /** The server-assigned name for the operation. */\n operationName: string;\n /** Used to override the default configuration. */\n config?: GetOperationConfig;\n}\n\nexport declare interface FetchPredictOperationConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for the fetchPredictOperation method. */\nexport declare interface FetchPredictOperationParameters {\n /** The server-assigned name for the operation. */\n operationName: string;\n resourceName: string;\n /** Used to override the default configuration. */\n config?: FetchPredictOperationConfig;\n}\n\nexport declare interface TestTableItem {\n /** The name of the test. This is used to derive the replay id. */\n name?: string;\n /** The parameters to the test. Use pydantic models. */\n parameters?: Record;\n /** Expects an exception for MLDev matching the string. */\n exceptionIfMldev?: string;\n /** Expects an exception for Vertex matching the string. */\n exceptionIfVertex?: string;\n /** Use if you don't want to use the default replay id which is derived from the test name. */\n overrideReplayId?: string;\n /** True if the parameters contain an unsupported union type. This test will be skipped for languages that do not support the union type. */\n hasUnion?: boolean;\n /** When set to a reason string, this test will be skipped in the API mode. Use this flag for tests that can not be reproduced with the real API. E.g. a test that deletes a resource. */\n skipInApiMode?: string;\n /** Keys to ignore when comparing the request and response. This is useful for tests that are not deterministic. */\n ignoreKeys?: string[];\n}\n\nexport declare interface TestTableFile {\n comment?: string;\n testMethod?: string;\n parameterNames?: string[];\n testTable?: TestTableItem[];\n}\n\n/** Represents a single request in a replay. */\nexport declare interface ReplayRequest {\n method?: string;\n url?: string;\n headers?: Record;\n bodySegments?: Record[];\n}\n\n/** Represents a single response in a replay. */\nexport class ReplayResponse {\n statusCode?: number;\n headers?: Record;\n bodySegments?: Record[];\n sdkResponseSegments?: Record[];\n}\n\n/** Represents a single interaction, request and response in a replay. */\nexport declare interface ReplayInteraction {\n request?: ReplayRequest;\n response?: ReplayResponse;\n}\n\n/** Represents a recorded session. */\nexport declare interface ReplayFile {\n replayId?: string;\n interactions?: ReplayInteraction[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface UploadFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The name of the file in the destination (e.g., 'files/sample-image'. If not provided one will be generated. */\n name?: string;\n /** mime_type: The MIME type of the file. If not provided, it will be inferred from the file extension. */\n mimeType?: string;\n /** Optional display name of the file. */\n displayName?: string;\n}\n\n/** Used to override the default configuration. */\nexport declare interface DownloadFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Configuration for upscaling an image.\n\n For more information on this configuration, refer to\n the `Imagen API reference documentation\n `_.\n */\nexport declare interface UpscaleImageConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Whether to include a reason for filtered-out images in the\n response. */\n includeRaiReason?: boolean;\n /** The image format that the output should be saved as. */\n outputMimeType?: string;\n /** The level of compression if the ``output_mime_type`` is\n ``image/jpeg``. */\n outputCompressionQuality?: number;\n}\n\n/** User-facing config UpscaleImageParameters. */\nexport declare interface UpscaleImageParameters {\n /** The model to use. */\n model: string;\n /** The input image to upscale. */\n image: Image;\n /** The factor to upscale the image (x2 or x4). */\n upscaleFactor: string;\n /** Configuration for upscaling. */\n config?: UpscaleImageConfig;\n}\n\n/** A raw reference image.\n\n A raw reference image represents the base image to edit, provided by the user.\n It can optionally be provided in addition to a mask reference image or\n a style reference image.\n */\nexport declare interface RawReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n}\n\n/** Configuration for a Mask reference image. */\nexport declare interface MaskReferenceConfig {\n /** Prompts the model to generate a mask instead of you needing to\n provide one (unless MASK_MODE_USER_PROVIDED is used). */\n maskMode?: MaskReferenceMode;\n /** A list of up to 5 class ids to use for semantic segmentation.\n Automatically creates an image mask based on specific objects. */\n segmentationClasses?: number[];\n /** Dilation percentage of the mask provided.\n Float between 0 and 1. */\n maskDilation?: number;\n}\n\n/** A mask reference image.\n\n This encapsulates either a mask image provided by the user and configs for\n the user provided mask, or only config parameters for the model to generate\n a mask.\n\n A mask image is an image whose non-zero values indicate where to edit the base\n image. If the user provides a mask image, the mask must be in the same\n dimensions as the raw image.\n */\nexport declare interface MaskReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the mask reference image. */\n config?: MaskReferenceConfig;\n}\n\n/** Configuration for a Control reference image. */\nexport declare interface ControlReferenceConfig {\n /** The type of control reference image to use. */\n controlType?: ControlReferenceType;\n /** Defaults to False. When set to True, the control image will be\n computed by the model based on the control type. When set to False,\n the control image must be provided by the user. */\n enableControlImageComputation?: boolean;\n}\n\n/** A control reference image.\n\n The image of the control reference image is either a control image provided\n by the user, or a regular image which the backend will use to generate a\n control image of. In the case of the latter, the\n enable_control_image_computation field in the config should be set to True.\n\n A control image is an image that represents a sketch image of areas for the\n model to fill in based on the prompt.\n */\nexport declare interface ControlReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the control reference image. */\n config?: ControlReferenceConfig;\n}\n\n/** Configuration for a Style reference image. */\nexport declare interface StyleReferenceConfig {\n /** A text description of the style to use for the generated image. */\n styleDescription?: string;\n}\n\n/** A style reference image.\n\n This encapsulates a style reference image provided by the user, and\n additionally optional config parameters for the style reference image.\n\n A raw reference image can also be provided as a destination for the style to\n be applied to.\n */\nexport declare interface StyleReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the style reference image. */\n config?: StyleReferenceConfig;\n}\n\n/** Configuration for a Subject reference image. */\nexport declare interface SubjectReferenceConfig {\n /** The subject type of a subject reference image. */\n subjectType?: SubjectReferenceType;\n /** Subject description for the image. */\n subjectDescription?: string;\n}\n\n/** A subject reference image.\n\n This encapsulates a subject reference image provided by the user, and\n additionally optional config parameters for the subject reference image.\n\n A raw reference image can also be provided as a destination for the subject to\n be applied to.\n */\nexport declare interface SubjectReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the subject reference image. */\n config?: SubjectReferenceConfig;\n}\n\n/** Sent in response to a `LiveGenerateContentSetup` message from the client. */\nexport declare interface LiveServerSetupComplete {}\n\n/** Incremental server update generated by the model in response to client messages.\n\n Content is generated as quickly as possible, and not in real time. Clients\n may choose to buffer and play it out in real time.\n */\nexport declare interface LiveServerContent {\n /** The content that the model has generated as part of the current conversation with the user. */\n modelTurn?: Content;\n /** If true, indicates that the model is done generating. Generation will only start in response to additional client messages. Can be set alongside `content`, indicating that the `content` is the last in the turn. */\n turnComplete?: boolean;\n /** If true, indicates that a client message has interrupted current model generation. If the client is playing out the content in realtime, this is a good signal to stop and empty the current queue. */\n interrupted?: boolean;\n /** If true, indicates that the model is done generating. When model is\n interrupted while generating there will be no generation_complete message\n in interrupted turn, it will go through interrupted > turn_complete.\n When model assumes realtime playback there will be delay between\n generation_complete and turn_complete that is caused by model\n waiting for playback to finish. If true, indicates that the model\n has finished generating all content. This is a signal to the client\n that it can stop sending messages. */\n generationComplete?: boolean;\n}\n\n/** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */\nexport declare interface LiveServerToolCall {\n /** The function call to be executed. */\n functionCalls?: FunctionCall[];\n}\n\n/** Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled.\n\n If there were side-effects to those tool calls, clients may attempt to undo\n the tool calls. This message occurs only in cases where the clients interrupt\n server turns.\n */\nexport declare interface LiveServerToolCallCancellation {\n /** The ids of the tool calls to be cancelled. */\n ids?: string[];\n}\n\n/** Usage metadata about response(s). */\nexport declare interface UsageMetadata {\n /** Number of tokens in the prompt. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */\n promptTokenCount?: number;\n /** Number of tokens in the cached part of the prompt (the cached content). */\n cachedContentTokenCount?: number;\n /** Total number of tokens across all the generated response candidates. */\n responseTokenCount?: number;\n /** Number of tokens present in tool-use prompt(s). */\n toolUsePromptTokenCount?: number;\n /** Number of tokens of thoughts for thinking models. */\n thoughtsTokenCount?: number;\n /** Total token count for prompt, response candidates, and tool-use prompts(if present). */\n totalTokenCount?: number;\n /** List of modalities that were processed in the request input. */\n promptTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were processed in the cache input. */\n cacheTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were returned in the response. */\n responseTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were processed in the tool-use prompt. */\n toolUsePromptTokensDetails?: ModalityTokenCount[];\n /** Traffic type. This shows whether a request consumes Pay-As-You-Go\n or Provisioned Throughput quota. */\n trafficType?: TrafficType;\n}\n\n/** Server will not be able to service client soon. */\nexport declare interface LiveServerGoAway {\n /** The remaining time before the connection will be terminated as ABORTED. The minimal time returned here is specified differently together with the rate limits for a given model. */\n timeLeft?: string;\n}\n\n/** Update of the session resumption state.\n\n Only sent if `session_resumption` was set in the connection config.\n */\nexport declare interface LiveServerSessionResumptionUpdate {\n /** New handle that represents state that can be resumed. Empty if `resumable`=false. */\n newHandle?: string;\n /** True if session can be resumed at this point. It might be not possible to resume session at some points. In that case we send update empty new_handle and resumable=false. Example of such case could be model executing function calls or just generating. Resuming session (using previous session token) in such state will result in some data loss. */\n resumable?: boolean;\n /** Index of last message sent by client that is included in state represented by this SessionResumptionToken. Only sent when `SessionResumptionConfig.transparent` is set.\n\nPresence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `SessionResmumptionTokenUpdate`. This field will enable them to limit buffering (avoid keeping all requests in RAM).\n\nNote: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames arelikely not needed. */\n lastConsumedClientMessageIndex?: string;\n}\n\n/** Response message for API call. */\nexport declare interface LiveServerMessage {\n /** Sent in response to a `LiveClientSetup` message from the client. */\n setupComplete?: LiveServerSetupComplete;\n /** Content generated by the model in response to client messages. */\n serverContent?: LiveServerContent;\n /** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */\n toolCall?: LiveServerToolCall;\n /** Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled. */\n toolCallCancellation?: LiveServerToolCallCancellation;\n /** Usage metadata about model response(s). */\n usageMetadata?: UsageMetadata;\n /** Server will disconnect soon. */\n goAway?: LiveServerGoAway;\n /** Update of the session resumption state. */\n sessionResumptionUpdate?: LiveServerSessionResumptionUpdate;\n}\n\n/** Configures automatic detection of activity. */\nexport declare interface AutomaticActivityDetection {\n /** If enabled, detected voice and text input count as activity. If disabled, the client must send activity signals. */\n disabled?: boolean;\n /** Determines how likely speech is to be detected. */\n startOfSpeechSensitivity?: StartSensitivity;\n /** Determines how likely detected speech is ended. */\n endOfSpeechSensitivity?: EndSensitivity;\n /** The required duration of detected speech before start-of-speech is committed. The lower this value the more sensitive the start-of-speech detection is and the shorter speech can be recognized. However, this also increases the probability of false positives. */\n prefixPaddingMs?: number;\n /** The required duration of detected non-speech (e.g. silence) before end-of-speech is committed. The larger this value, the longer speech gaps can be without interrupting the user's activity but this will increase the model's latency. */\n silenceDurationMs?: number;\n}\n\n/** Marks the end of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface RealtimeInputConfig {\n /** If not set, automatic activity detection is enabled by default. If automatic voice detection is disabled, the client must send activity signals. */\n automaticActivityDetection?: AutomaticActivityDetection;\n /** Defines what effect activity has. */\n activityHandling?: ActivityHandling;\n /** Defines which input is included in the user's turn. */\n turnCoverage?: TurnCoverage;\n}\n\n/** Configuration of session resumption mechanism.\n\n Included in `LiveConnectConfig.session_resumption`. If included server\n will send `LiveServerSessionResumptionUpdate` messages.\n */\nexport declare interface SessionResumptionConfig {\n /** Session resumption handle of previous session (session to restore).\n\nIf not present new session will be started. */\n handle?: string;\n /** If set the server will send `last_consumed_client_message_index` in the `session_resumption_update` messages to allow for transparent reconnections. */\n transparent?: boolean;\n}\n\n/** Context window will be truncated by keeping only suffix of it.\n\n Context window will always be cut at start of USER role turn. System\n instructions and `BidiGenerateContentSetup.prefix_turns` will not be\n subject to the sliding window mechanism, they will always stay at the\n beginning of context window.\n */\nexport declare interface SlidingWindow {\n /** Session reduction target -- how many tokens we should keep. Window shortening operation has some latency costs, so we should avoid running it on every turn. Should be < trigger_tokens. If not set, trigger_tokens/2 is assumed. */\n targetTokens?: string;\n}\n\n/** Enables context window compression -- mechanism managing model context window so it does not exceed given length. */\nexport declare interface ContextWindowCompressionConfig {\n /** Number of tokens (before running turn) that triggers context window compression mechanism. */\n triggerTokens?: string;\n /** Sliding window compression mechanism. */\n slidingWindow?: SlidingWindow;\n}\n\n/** Message contains configuration that will apply for the duration of the streaming session. */\nexport declare interface LiveClientSetup {\n /** \n The fully qualified name of the publisher model or tuned model endpoint to\n use.\n */\n model?: string;\n /** The generation configuration for the session.\n Note: only a subset of fields are supported.\n */\n generationConfig?: GenerationConfig;\n /** The user provided system instructions for the model.\n Note: only text should be used in parts and content in each part will be\n in a separate paragraph. */\n systemInstruction?: Content;\n /** A list of `Tools` the model may use to generate the next response.\n\n A `Tool` is a piece of code that enables the system to interact with\n external systems to perform an action, or set of actions, outside of\n knowledge and scope of the model. */\n tools?: ToolListUnion;\n /** Configures the realtime input behavior in BidiGenerateContent. */\n realtimeInputConfig?: RealtimeInputConfig;\n /** Configures session resumption mechanism.\n\n If included server will send SessionResumptionUpdate messages. */\n sessionResumption?: SessionResumptionConfig;\n /** Configures context window compression mechanism.\n\n If included, server will compress context window to fit into given length. */\n contextWindowCompression?: ContextWindowCompressionConfig;\n}\n\n/** Incremental update of the current conversation delivered from the client.\n\n All the content here will unconditionally be appended to the conversation\n history and used as part of the prompt to the model to generate content.\n\n A message here will interrupt any current model generation.\n */\nexport declare interface LiveClientContent {\n /** The content appended to the current conversation with the model.\n\n For single-turn queries, this is a single instance. For multi-turn\n queries, this is a repeated field that contains conversation history and\n latest request.\n */\n turns?: Content[];\n /** If true, indicates that the server content generation should start with\n the currently accumulated prompt. Otherwise, the server will await\n additional messages before starting generation. */\n turnComplete?: boolean;\n}\n\n/** Marks the start of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface ActivityStart {}\n\n/** Marks the end of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface ActivityEnd {}\n\n/** User input that is sent in real time.\n\n This is different from `LiveClientContent` in a few ways:\n\n - Can be sent continuously without interruption to model generation.\n - If there is a need to mix data interleaved across the\n `LiveClientContent` and the `LiveClientRealtimeInput`, server attempts to\n optimize for best response, but there are no guarantees.\n - End of turn is not explicitly specified, but is rather derived from user\n activity (for example, end of speech).\n - Even before the end of turn, the data is processed incrementally\n to optimize for a fast start of the response from the model.\n - Is always assumed to be the user's input (cannot be used to populate\n conversation history).\n */\nexport declare interface LiveClientRealtimeInput {\n /** Inlined bytes data for media input. */\n mediaChunks?: Blob[];\n /** Marks the start of user activity. */\n activityStart?: ActivityStart;\n /** Marks the end of user activity. */\n activityEnd?: ActivityEnd;\n}\n\n/** Client generated response to a `ToolCall` received from the server.\n\n Individual `FunctionResponse` objects are matched to the respective\n `FunctionCall` objects by the `id` field.\n\n Note that in the unary and server-streaming GenerateContent APIs function\n calling happens by exchanging the `Content` parts, while in the bidi\n GenerateContent APIs function calling happens over this dedicated set of\n messages.\n */\nexport class LiveClientToolResponse {\n /** The response to the function calls. */\n functionResponses?: FunctionResponse[];\n}\n\n/** Messages sent by the client in the API call. */\nexport declare interface LiveClientMessage {\n /** Message to be sent by the system when connecting to the API. SDK users should not send this message. */\n setup?: LiveClientSetup;\n /** Incremental update of the current conversation delivered from the client. */\n clientContent?: LiveClientContent;\n /** User input that is sent in real time. */\n realtimeInput?: LiveClientRealtimeInput;\n /** Response to a `ToolCallMessage` received from the server. */\n toolResponse?: LiveClientToolResponse;\n}\n\n/** The audio transcription configuration in Setup. */\nexport declare interface AudioTranscriptionConfig {}\n\n/** Session config for the API connection. */\nexport declare interface LiveConnectConfig {\n /** The generation configuration for the session. */\n generationConfig?: GenerationConfig;\n /** The requested modalities of the response. Represents the set of\n modalities that the model can return. Defaults to AUDIO if not specified.\n */\n responseModalities?: Modality[];\n /** The speech generation configuration.\n */\n speechConfig?: SpeechConfig;\n /** The user provided system instructions for the model.\n Note: only text should be used in parts and content in each part will be\n in a separate paragraph. */\n systemInstruction?: Content;\n /** A list of `Tools` the model may use to generate the next response.\n\n A `Tool` is a piece of code that enables the system to interact with\n external systems to perform an action, or set of actions, outside of\n knowledge and scope of the model. */\n tools?: ToolListUnion;\n /** Configures session resumption mechanism.\n\nIf included the server will send SessionResumptionUpdate messages. */\n sessionResumption?: SessionResumptionConfig;\n /** Configures the realtime input behavior in BidiGenerateContent. */\n realtimeInputConfig?: RealtimeInputConfig;\n /** Configures context window compression mechanism.\n\n If included, server will compress context window to fit into given length. */\n contextWindowCompression?: ContextWindowCompressionConfig;\n}\n\n/** Parameters for connecting to the live API. */\nexport declare interface LiveConnectParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** callbacks */\n callbacks: LiveCallbacks;\n /** Optional configuration parameters for the request.\n */\n config?: LiveConnectConfig;\n}\n\n/** Parameters for initializing a new chat session.\n\n These parameters are used when creating a chat session with the\n `chats.create()` method.\n */\nexport declare interface CreateChatParameters {\n /** The name of the model to use for the chat session.\n\n For example: 'gemini-2.0-flash', 'gemini-1.5-pro', etc. See gemini API\n docs to find the available models.\n */\n model: string;\n /** Config for the entire chat session.\n\n This config applies to all requests within the session\n unless overridden by a per-request `config` in `SendMessageParameters`.\n */\n config?: GenerateContentConfig;\n /** The initial conversation history for the chat session.\n\n This allows you to start the chat with a pre-existing history. The history\n must be a list of `Content` alternating between 'user' and 'model' roles.\n It should start with a 'user' message.\n */\n history?: Content[];\n}\n\n/** Parameters for sending a message within a chat session.\n\n These parameters are used with the `chat.sendMessage()` method.\n */\nexport declare interface SendMessageParameters {\n /** The message to send to the model.\n\n The SDK will combine all parts into a single 'user' content to send to\n the model.\n */\n message: PartListUnion;\n /** Config for this specific request.\n\n Please note that the per-request config does not change the chat level\n config, nor inherit from it. If you intend to use some values from the\n chat's default config, you must explicitly copy them into this per-request\n config.\n */\n config?: GenerateContentConfig;\n}\n\n/** Parameters for sending client content to the live API. */\nexport declare interface LiveSendClientContentParameters {\n /** Client content to send to the session. */\n turns?: ContentListUnion;\n /** If true, indicates that the server content generation should start with\n the currently accumulated prompt. Otherwise, the server will await\n additional messages before starting generation. */\n turnComplete?: boolean;\n}\n\n/** Parameters for sending realtime input to the live API. */\nexport declare interface LiveSendRealtimeInputParameters {\n /** Realtime input to send to the session. */\n media: Blob;\n /** Marks the start of user activity. */\n activityStart?: ActivityStart;\n /** Marks the end of user activity. */\n activityEnd?: ActivityEnd;\n}\n\n/** Parameters for sending tool responses to the live API. */\nexport class LiveSendToolResponseParameters {\n /** Tool responses to send to the session. */\n functionResponses: FunctionResponse[] | FunctionResponse = [];\n}\n\n/** Parameters for the get method of the operations module. */\nexport declare interface OperationGetParameters {\n /** The operation to be retrieved. */\n operation: GenerateVideosOperation;\n /** Used to override the default configuration. */\n config?: GetOperationConfig;\n}\n\nexport type PartUnion = Part | string;\n\nexport type PartListUnion = PartUnion[] | PartUnion;\n\nexport type ContentUnion = Content | PartUnion[] | PartUnion;\n\nexport type ContentListUnion = ContentUnion[] | ContentUnion;\n\nexport type SchemaUnion = Schema;\n\nexport type SpeechConfigUnion = SpeechConfig | string;\n\nexport type ToolListUnion = Tool[];\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_caches_converters';\nimport {PagedItem, Pager} from './pagers';\nimport * as types from './types';\n\nexport class Caches extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Lists cached content configurations.\n *\n * @param params - The parameters for the list request.\n * @return The paginated results of the list of cached contents.\n *\n * @example\n * ```ts\n * const cachedContents = await ai.caches.list({config: {'pageSize': 2}});\n * for (const cachedContent of cachedContents) {\n * console.log(cachedContent);\n * }\n * ```\n */\n list = async (\n params: types.ListCachedContentsParameters = {},\n ): Promise> => {\n return new Pager(\n PagedItem.PAGED_ITEM_CACHED_CONTENTS,\n (x: types.ListCachedContentsParameters) => this.listInternal(x),\n await this.listInternal(params),\n params,\n );\n };\n\n /**\n * Creates a cached contents resource.\n *\n * @remarks\n * Context caching is only supported for specific models. See [Gemini\n * Developer API reference] (https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac)\n * and [Vertex AI reference] (https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models)\n * for more information.\n *\n * @param params - The parameters for the create request.\n * @return The created cached content.\n *\n * @example\n * ```ts\n * const contents = ...; // Initialize the content to cache.\n * const response = await ai.caches.create({\n * model: 'gemini-1.5-flash',\n * config: {\n * 'contents': contents,\n * 'displayName': 'test cache',\n * 'systemInstruction': 'What is the sum of the two pdfs?',\n * 'ttl': '86400s',\n * }\n * });\n * ```\n */\n async create(\n params: types.CreateCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.createCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.createCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n /**\n * Gets cached content configurations.\n *\n * @param params - The parameters for the get request.\n * @return The cached content.\n *\n * @example\n * ```ts\n * await ai.caches.get({name: 'gemini-1.5-flash'});\n * ```\n */\n async get(\n params: types.GetCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.getCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n /**\n * Deletes cached content.\n *\n * @param params - The parameters for the delete request.\n * @return The empty response returned by the API.\n *\n * @example\n * ```ts\n * await ai.caches.delete({name: 'gemini-1.5-flash'});\n * ```\n */\n async delete(\n params: types.DeleteCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.deleteCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteCachedContentResponseFromVertex();\n const typedResp = new types.DeleteCachedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.deleteCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteCachedContentResponseFromMldev();\n const typedResp = new types.DeleteCachedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Updates cached content configurations.\n *\n * @param params - The parameters for the update request.\n * @return The updated cached content.\n *\n * @example\n * ```ts\n * const response = await ai.caches.update({\n * name: 'gemini-1.5-flash',\n * config: {'ttl': '7600s'}\n * });\n * ```\n */\n async update(\n params: types.UpdateCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.updateCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'PATCH',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.updateCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'PATCH',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n private async listInternal(\n params: types.ListCachedContentsParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.listCachedContentsParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listCachedContentsResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListCachedContentsResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.listCachedContentsParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listCachedContentsResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListCachedContentsResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ApiClient} from './_api_client';\nimport * as t from './_transformers';\nimport {Models} from './models';\nimport * as types from './types';\n\n/**\n * Returns true if the response is valid, false otherwise.\n */\nfunction isValidResponse(response: types.GenerateContentResponse): boolean {\n if (response.candidates == undefined || response.candidates.length === 0) {\n return false;\n }\n const content = response.candidates[0]?.content;\n if (content === undefined) {\n return false;\n }\n return isValidContent(content);\n}\n\nfunction isValidContent(content: types.Content): boolean {\n if (content.parts === undefined || content.parts.length === 0) {\n return false;\n }\n for (const part of content.parts) {\n if (part === undefined || Object.keys(part).length === 0) {\n return false;\n }\n if (part.text !== undefined && part.text === '') {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Validates the history contains the correct roles.\n *\n * @remarks\n * Expects the history to start with a user turn and then alternate between\n * user and model turns.\n *\n * @throws Error if the history does not start with a user turn.\n * @throws Error if the history contains an invalid role.\n */\nfunction validateHistory(history: types.Content[]) {\n // Empty history is valid.\n if (history.length === 0) {\n return;\n }\n if (history[0].role !== 'user') {\n throw new Error('History must start with a user turn.');\n }\n for (const content of history) {\n if (content.role !== 'user' && content.role !== 'model') {\n throw new Error(`Role must be user or model, but got ${content.role}.`);\n }\n }\n}\n\n/**\n * Extracts the curated (valid) history from a comprehensive history.\n *\n * @remarks\n * The model may sometimes generate invalid or empty contents(e.g., due to safty\n * filters or recitation). Extracting valid turns from the history\n * ensures that subsequent requests could be accpeted by the model.\n */\nfunction extractCuratedHistory(\n comprehensiveHistory: types.Content[],\n): types.Content[] {\n if (comprehensiveHistory === undefined || comprehensiveHistory.length === 0) {\n return [];\n }\n const curatedHistory: types.Content[] = [];\n const length = comprehensiveHistory.length;\n let i = 0;\n let userInput = comprehensiveHistory[0];\n while (i < length) {\n if (comprehensiveHistory[i].role === 'user') {\n userInput = comprehensiveHistory[i];\n i++;\n } else {\n const modelOutput: types.Content[] = [];\n let isValid = true;\n while (i < length && comprehensiveHistory[i].role === 'model') {\n modelOutput.push(comprehensiveHistory[i]);\n if (isValid && !isValidContent(comprehensiveHistory[i])) {\n isValid = false;\n }\n i++;\n }\n if (isValid) {\n curatedHistory.push(userInput);\n curatedHistory.push(...modelOutput);\n }\n }\n }\n return curatedHistory;\n}\n\n/**\n * A utility class to create a chat session.\n */\nexport class Chats {\n private readonly modelsModule: Models;\n private readonly apiClient: ApiClient;\n\n constructor(modelsModule: Models, apiClient: ApiClient) {\n this.modelsModule = modelsModule;\n this.apiClient = apiClient;\n }\n\n /**\n * Creates a new chat session.\n *\n * @remarks\n * The config in the params will be used for all requests within the chat\n * session unless overridden by a per-request `config` in\n * @see {@link types.SendMessageParameters#config}.\n *\n * @param params - Parameters for creating a chat session.\n * @returns A new chat session.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({\n * model: 'gemini-2.0-flash'\n * config: {\n * temperature: 0.5,\n * maxOutputTokens: 1024,\n * }\n * });\n * ```\n */\n create(params: types.CreateChatParameters) {\n return new Chat(\n this.apiClient,\n this.modelsModule,\n params.model,\n params.config,\n params.history,\n );\n }\n}\n\n/**\n * Chat session that enables sending messages to the model with previous\n * conversation context.\n *\n * @remarks\n * The session maintains all the turns between user and model.\n */\nexport class Chat {\n // A promise to represent the current state of the message being sent to the\n // model.\n private sendPromise: Promise = Promise.resolve();\n\n constructor(\n private readonly apiClient: ApiClient,\n private readonly modelsModule: Models,\n private readonly model: string,\n private readonly config: types.GenerateContentConfig = {},\n private history: types.Content[] = [],\n ) {\n validateHistory(history);\n }\n\n /**\n * Sends a message to the model and returns the response.\n *\n * @remarks\n * This method will wait for the previous message to be processed before\n * sending the next message.\n *\n * @see {@link Chat#sendMessageStream} for streaming method.\n * @param params - parameters for sending messages within a chat session.\n * @returns The model's response.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({model: 'gemini-2.0-flash'});\n * const response = await chat.sendMessage({\n * message: 'Why is the sky blue?'\n * });\n * console.log(response.text);\n * ```\n */\n async sendMessage(\n params: types.SendMessageParameters,\n ): Promise {\n await this.sendPromise;\n const inputContent = t.tContent(this.apiClient, params.message);\n const responsePromise = this.modelsModule.generateContent({\n model: this.model,\n contents: this.getHistory(true).concat(inputContent),\n config: params.config ?? this.config,\n });\n this.sendPromise = (async () => {\n const response = await responsePromise;\n const outputContent = response.candidates?.[0]?.content;\n const modelOutput = outputContent ? [outputContent] : [];\n this.recordHistory(inputContent, modelOutput);\n return;\n })();\n await this.sendPromise;\n return responsePromise;\n }\n\n /**\n * Sends a message to the model and returns the response in chunks.\n *\n * @remarks\n * This method will wait for the previous message to be processed before\n * sending the next message.\n *\n * @see {@link Chat#sendMessage} for non-streaming method.\n * @param params - parameters for sending the message.\n * @return The model's response.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({model: 'gemini-2.0-flash'});\n * const response = await chat.sendMessageStream({\n * message: 'Why is the sky blue?'\n * });\n * for await (const chunk of response) {\n * console.log(chunk.text);\n * }\n * ```\n */\n async sendMessageStream(\n params: types.SendMessageParameters,\n ): Promise> {\n await this.sendPromise;\n const inputContent = t.tContent(this.apiClient, params.message);\n const streamResponse = this.modelsModule.generateContentStream({\n model: this.model,\n contents: this.getHistory(true).concat(inputContent),\n config: params.config ?? this.config,\n });\n this.sendPromise = streamResponse.then(() => undefined);\n const response = await streamResponse;\n const result = this.processStreamResponse(response, inputContent);\n return result;\n }\n\n /**\n * Returns the chat history.\n *\n * @remarks\n * The history is a list of contents alternating between user and model.\n *\n * There are two types of history:\n * - The `curated history` contains only the valid turns between user and\n * model, which will be included in the subsequent requests sent to the model.\n * - The `comprehensive history` contains all turns, including invalid or\n * empty model outputs, providing a complete record of the history.\n *\n * The history is updated after receiving the response from the model,\n * for streaming response, it means receiving the last chunk of the response.\n *\n * The `comprehensive history` is returned by default. To get the `curated\n * history`, set the `curated` parameter to `true`.\n *\n * @param curated - whether to return the curated history or the comprehensive\n * history.\n * @return History contents alternating between user and model for the entire\n * chat session.\n */\n getHistory(curated: boolean = false): types.Content[] {\n return curated ? extractCuratedHistory(this.history) : this.history;\n }\n\n private async *processStreamResponse(\n streamResponse: AsyncGenerator,\n inputContent: types.Content,\n ) {\n const outputContent: types.Content[] = [];\n for await (const chunk of streamResponse) {\n if (isValidResponse(chunk)) {\n const content = chunk.candidates?.[0]?.content;\n if (content !== undefined) {\n outputContent.push(content);\n }\n }\n yield chunk;\n }\n this.recordHistory(inputContent, outputContent);\n }\n\n private recordHistory(\n userInput: types.Content,\n modelOutput: types.Content[],\n ) {\n let outputContents: types.Content[] = [];\n if (\n modelOutput.length > 0 &&\n modelOutput.every((content) => content.role === 'model')\n ) {\n outputContents = modelOutput;\n } else {\n // Appends an empty content when model returns empty response, so that the\n // history is always alternating between user and model.\n outputContents.push({\n role: 'model',\n parts: [],\n } as types.Content);\n }\n this.history.push(userInput);\n this.history.push(...outputContents);\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function listFilesConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listFilesParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listFilesConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function fileStatusToMldev(\n apiClient: ApiClient,\n fromObject: types.FileStatus,\n): Record {\n const toObject: Record = {};\n\n const fromDetails = common.getValueByPath(fromObject, ['details']);\n if (fromDetails != null) {\n common.setValueByPath(toObject, ['details'], fromDetails);\n }\n\n const fromMessage = common.getValueByPath(fromObject, ['message']);\n if (fromMessage != null) {\n common.setValueByPath(toObject, ['message'], fromMessage);\n }\n\n const fromCode = common.getValueByPath(fromObject, ['code']);\n if (fromCode != null) {\n common.setValueByPath(toObject, ['code'], fromCode);\n }\n\n return toObject;\n}\n\nexport function fileToMldev(\n apiClient: ApiClient,\n fromObject: types.File,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n const fromSizeBytes = common.getValueByPath(fromObject, ['sizeBytes']);\n if (fromSizeBytes != null) {\n common.setValueByPath(toObject, ['sizeBytes'], fromSizeBytes);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromExpirationTime = common.getValueByPath(fromObject, [\n 'expirationTime',\n ]);\n if (fromExpirationTime != null) {\n common.setValueByPath(toObject, ['expirationTime'], fromExpirationTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromSha256Hash = common.getValueByPath(fromObject, ['sha256Hash']);\n if (fromSha256Hash != null) {\n common.setValueByPath(toObject, ['sha256Hash'], fromSha256Hash);\n }\n\n const fromUri = common.getValueByPath(fromObject, ['uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromDownloadUri = common.getValueByPath(fromObject, ['downloadUri']);\n if (fromDownloadUri != null) {\n common.setValueByPath(toObject, ['downloadUri'], fromDownloadUri);\n }\n\n const fromState = common.getValueByPath(fromObject, ['state']);\n if (fromState != null) {\n common.setValueByPath(toObject, ['state'], fromState);\n }\n\n const fromSource = common.getValueByPath(fromObject, ['source']);\n if (fromSource != null) {\n common.setValueByPath(toObject, ['source'], fromSource);\n }\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(\n toObject,\n ['error'],\n fileStatusToMldev(apiClient, fromError),\n );\n }\n\n return toObject;\n}\n\nexport function createFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromFile = common.getValueByPath(fromObject, ['file']);\n if (fromFile != null) {\n common.setValueByPath(toObject, ['file'], fileToMldev(apiClient, fromFile));\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function getFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'file'],\n t.tFileName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.DeleteFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'file'],\n t.tFileName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function fileStatusFromMldev(\n apiClient: ApiClient,\n fromObject: types.FileStatus,\n): Record {\n const toObject: Record = {};\n\n const fromDetails = common.getValueByPath(fromObject, ['details']);\n if (fromDetails != null) {\n common.setValueByPath(toObject, ['details'], fromDetails);\n }\n\n const fromMessage = common.getValueByPath(fromObject, ['message']);\n if (fromMessage != null) {\n common.setValueByPath(toObject, ['message'], fromMessage);\n }\n\n const fromCode = common.getValueByPath(fromObject, ['code']);\n if (fromCode != null) {\n common.setValueByPath(toObject, ['code'], fromCode);\n }\n\n return toObject;\n}\n\nexport function fileFromMldev(\n apiClient: ApiClient,\n fromObject: types.File,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n const fromSizeBytes = common.getValueByPath(fromObject, ['sizeBytes']);\n if (fromSizeBytes != null) {\n common.setValueByPath(toObject, ['sizeBytes'], fromSizeBytes);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromExpirationTime = common.getValueByPath(fromObject, [\n 'expirationTime',\n ]);\n if (fromExpirationTime != null) {\n common.setValueByPath(toObject, ['expirationTime'], fromExpirationTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromSha256Hash = common.getValueByPath(fromObject, ['sha256Hash']);\n if (fromSha256Hash != null) {\n common.setValueByPath(toObject, ['sha256Hash'], fromSha256Hash);\n }\n\n const fromUri = common.getValueByPath(fromObject, ['uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromDownloadUri = common.getValueByPath(fromObject, ['downloadUri']);\n if (fromDownloadUri != null) {\n common.setValueByPath(toObject, ['downloadUri'], fromDownloadUri);\n }\n\n const fromState = common.getValueByPath(fromObject, ['state']);\n if (fromState != null) {\n common.setValueByPath(toObject, ['state'], fromState);\n }\n\n const fromSource = common.getValueByPath(fromObject, ['source']);\n if (fromSource != null) {\n common.setValueByPath(toObject, ['source'], fromSource);\n }\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(\n toObject,\n ['error'],\n fileStatusFromMldev(apiClient, fromError),\n );\n }\n\n return toObject;\n}\n\nexport function listFilesResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromFiles = common.getValueByPath(fromObject, ['files']);\n if (fromFiles != null) {\n if (Array.isArray(fromFiles)) {\n common.setValueByPath(\n toObject,\n ['files'],\n fromFiles.map((item) => {\n return fileFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['files'], fromFiles);\n }\n }\n\n return toObject;\n}\n\nexport function createFileResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.CreateFileResponse,\n): Record {\n const toObject: Record = {};\n\n const fromHttpHeaders = common.getValueByPath(fromObject, ['httpHeaders']);\n if (fromHttpHeaders != null) {\n common.setValueByPath(toObject, ['httpHeaders'], fromHttpHeaders);\n }\n\n return toObject;\n}\n\nexport function deleteFileResponseFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_files_converters';\nimport {PagedItem, Pager} from './pagers';\nimport * as types from './types';\n\nexport class Files extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Lists all current project files from the service.\n *\n * @param params - The parameters for the list request\n * @return The paginated results of the list of files\n *\n * @example\n * The following code prints the names of all files from the service, the\n * size of each page is 10.\n *\n * ```ts\n * const listResponse = await ai.files.list({config: {'pageSize': 10}});\n * for await (const file of listResponse) {\n * console.log(file.name);\n * }\n * ```\n */\n list = async (\n params: types.ListFilesParameters = {},\n ): Promise> => {\n return new Pager(\n PagedItem.PAGED_ITEM_FILES,\n (x: types.ListFilesParameters) => this.listInternal(x),\n await this.listInternal(params),\n params,\n );\n };\n\n /**\n * Uploads a file asynchronously to the Gemini API.\n * This method is not available in Vertex AI.\n * Supported upload sources:\n * - Node.js: File path (string) or Blob object.\n * - Browser: Blob object (e.g., File).\n *\n * @remarks\n * The `mimeType` can be specified in the `config` parameter. If omitted:\n * - For file path (string) inputs, the `mimeType` will be inferred from the\n * file extension.\n * - For Blob object inputs, the `mimeType` will be set to the Blob's `type`\n * property.\n * Somex eamples for file extension to mimeType mapping:\n * .txt -> text/plain\n * .json -> application/json\n * .jpg -> image/jpeg\n * .png -> image/png\n * .mp3 -> audio/mpeg\n * .mp4 -> video/mp4\n *\n * This section can contain multiple paragraphs and code examples.\n *\n * @param params - Optional parameters specified in the\n * `types.UploadFileParameters` interface.\n * @see {@link types.UploadFileParameters#config} for the optional\n * config in the parameters.\n * @return A promise that resolves to a `types.File` object.\n * @throws An error if called on a Vertex AI client.\n * @throws An error if the `mimeType` is not provided and can not be inferred,\n * the `mimeType` can be provided in the `params.config` parameter.\n * @throws An error occurs if a suitable upload location cannot be established.\n *\n * @example\n * The following code uploads a file to Gemini API.\n *\n * ```ts\n * const file = await ai.files.upload({file: 'file.txt', config: {\n * mimeType: 'text/plain',\n * }});\n * console.log(file.name);\n * ```\n */\n async upload(params: types.UploadFileParameters): Promise {\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'Vertex AI does not support uploading files. You can share files through a GCS bucket.',\n );\n }\n\n return this.apiClient\n .uploadFile(params.file, params.config)\n .then((response) => {\n const file = converters.fileFromMldev(this.apiClient, response);\n return file as types.File;\n });\n }\n\n private async listInternal(\n params: types.ListFilesParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.listFilesParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap('files', body['_url'] as Record);\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listFilesResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListFilesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n private async createInternal(\n params: types.CreateFileParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.createFileParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'upload/v1beta/files',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.createFileResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.CreateFileResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Retrieves the file information from the service.\n *\n * @param params - The parameters for the get request\n * @return The Promise that resolves to the types.File object requested.\n *\n * @example\n * ```ts\n * const config: GetFileParameters = {\n * name: fileName,\n * };\n * file = await ai.files.get(config);\n * console.log(file.name);\n * ```\n */\n async get(params: types.GetFileParameters): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.getFileParametersToMldev(this.apiClient, params);\n path = common.formatMap(\n 'files/{file}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.fileFromMldev(this.apiClient, apiResponse);\n\n return resp as types.File;\n });\n }\n }\n\n /**\n * Deletes a remotely stored file.\n *\n * @param params - The parameters for the delete request.\n * @return The DeleteFileResponse, the response for the delete method.\n *\n * @example\n * The following code deletes an example file named \"files/mehozpxf877d\".\n *\n * ```ts\n * await ai.files.delete({name: file.name});\n * ```\n */\n async delete(\n params: types.DeleteFileParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.deleteFileParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'files/{file}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteFileResponseFromMldev();\n const typedResp = new types.DeleteFileResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function partToMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['videoMetadata']) !== undefined) {\n throw new Error('videoMetadata parameter is not supported in Gemini API.');\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToMldev(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['example']) !== undefined) {\n throw new Error('example parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['pattern']) !== undefined) {\n throw new Error('pattern parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['default']) !== undefined) {\n throw new Error('default parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxLength']) !== undefined) {\n throw new Error('maxLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minLength']) !== undefined) {\n throw new Error('minLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minProperties']) !== undefined) {\n throw new Error('minProperties parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxProperties']) !== undefined) {\n throw new Error('maxProperties parameter is not supported in Gemini API.');\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function safetySettingToMldev(\n apiClient: ApiClient,\n fromObject: types.SafetySetting,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['method']) !== undefined) {\n throw new Error('method parameter is not supported in Gemini API.');\n }\n\n const fromCategory = common.getValueByPath(fromObject, ['category']);\n if (fromCategory != null) {\n common.setValueByPath(toObject, ['category'], fromCategory);\n }\n\n const fromThreshold = common.getValueByPath(fromObject, ['threshold']);\n if (fromThreshold != null) {\n common.setValueByPath(toObject, ['threshold'], fromThreshold);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['response']) !== undefined) {\n throw new Error('response parameter is not supported in Gemini API.');\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToMldev(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToMldev(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n if (common.getValueByPath(fromObject, ['retrieval']) !== undefined) {\n throw new Error('retrieval parameter is not supported in Gemini API.');\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToMldev());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function prebuiltVoiceConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.PrebuiltVoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceName = common.getValueByPath(fromObject, ['voiceName']);\n if (fromVoiceName != null) {\n common.setValueByPath(toObject, ['voiceName'], fromVoiceName);\n }\n\n return toObject;\n}\n\nexport function voiceConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.VoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromPrebuiltVoiceConfig = common.getValueByPath(fromObject, [\n 'prebuiltVoiceConfig',\n ]);\n if (fromPrebuiltVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['prebuiltVoiceConfig'],\n prebuiltVoiceConfigToMldev(apiClient, fromPrebuiltVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function speechConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.SpeechConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceConfig = common.getValueByPath(fromObject, ['voiceConfig']);\n if (fromVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['voiceConfig'],\n voiceConfigToMldev(apiClient, fromVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function thinkingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ThinkingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromIncludeThoughts = common.getValueByPath(fromObject, [\n 'includeThoughts',\n ]);\n if (fromIncludeThoughts != null) {\n common.setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);\n }\n\n const fromThinkingBudget = common.getValueByPath(fromObject, [\n 'thinkingBudget',\n ]);\n if (fromThinkingBudget != null) {\n common.setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);\n }\n\n return toObject;\n}\n\nexport function generateContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTemperature = common.getValueByPath(fromObject, ['temperature']);\n if (fromTemperature != null) {\n common.setValueByPath(toObject, ['temperature'], fromTemperature);\n }\n\n const fromTopP = common.getValueByPath(fromObject, ['topP']);\n if (fromTopP != null) {\n common.setValueByPath(toObject, ['topP'], fromTopP);\n }\n\n const fromTopK = common.getValueByPath(fromObject, ['topK']);\n if (fromTopK != null) {\n common.setValueByPath(toObject, ['topK'], fromTopK);\n }\n\n const fromCandidateCount = common.getValueByPath(fromObject, [\n 'candidateCount',\n ]);\n if (fromCandidateCount != null) {\n common.setValueByPath(toObject, ['candidateCount'], fromCandidateCount);\n }\n\n const fromMaxOutputTokens = common.getValueByPath(fromObject, [\n 'maxOutputTokens',\n ]);\n if (fromMaxOutputTokens != null) {\n common.setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);\n }\n\n const fromStopSequences = common.getValueByPath(fromObject, [\n 'stopSequences',\n ]);\n if (fromStopSequences != null) {\n common.setValueByPath(toObject, ['stopSequences'], fromStopSequences);\n }\n\n const fromResponseLogprobs = common.getValueByPath(fromObject, [\n 'responseLogprobs',\n ]);\n if (fromResponseLogprobs != null) {\n common.setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);\n }\n\n const fromLogprobs = common.getValueByPath(fromObject, ['logprobs']);\n if (fromLogprobs != null) {\n common.setValueByPath(toObject, ['logprobs'], fromLogprobs);\n }\n\n const fromPresencePenalty = common.getValueByPath(fromObject, [\n 'presencePenalty',\n ]);\n if (fromPresencePenalty != null) {\n common.setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);\n }\n\n const fromFrequencyPenalty = common.getValueByPath(fromObject, [\n 'frequencyPenalty',\n ]);\n if (fromFrequencyPenalty != null) {\n common.setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (fromSeed != null) {\n common.setValueByPath(toObject, ['seed'], fromSeed);\n }\n\n const fromResponseMimeType = common.getValueByPath(fromObject, [\n 'responseMimeType',\n ]);\n if (fromResponseMimeType != null) {\n common.setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);\n }\n\n const fromResponseSchema = common.getValueByPath(fromObject, [\n 'responseSchema',\n ]);\n if (fromResponseSchema != null) {\n common.setValueByPath(\n toObject,\n ['responseSchema'],\n schemaToMldev(apiClient, t.tSchema(apiClient, fromResponseSchema)),\n );\n }\n\n if (common.getValueByPath(fromObject, ['routingConfig']) !== undefined) {\n throw new Error('routingConfig parameter is not supported in Gemini API.');\n }\n\n const fromSafetySettings = common.getValueByPath(fromObject, [\n 'safetySettings',\n ]);\n if (parentObject !== undefined && fromSafetySettings != null) {\n if (Array.isArray(fromSafetySettings)) {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings.map((item) => {\n return safetySettingToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings,\n );\n }\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToMldev(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToMldev(apiClient, fromToolConfig),\n );\n }\n\n if (common.getValueByPath(fromObject, ['labels']) !== undefined) {\n throw new Error('labels parameter is not supported in Gemini API.');\n }\n\n const fromCachedContent = common.getValueByPath(fromObject, [\n 'cachedContent',\n ]);\n if (parentObject !== undefined && fromCachedContent != null) {\n common.setValueByPath(\n parentObject,\n ['cachedContent'],\n t.tCachedContentName(apiClient, fromCachedContent),\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities != null) {\n common.setValueByPath(\n toObject,\n ['responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromMediaResolution = common.getValueByPath(fromObject, [\n 'mediaResolution',\n ]);\n if (fromMediaResolution != null) {\n common.setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig != null) {\n common.setValueByPath(\n toObject,\n ['speechConfig'],\n speechConfigToMldev(\n apiClient,\n t.tSpeechConfig(apiClient, fromSpeechConfig),\n ),\n );\n }\n\n if (common.getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {\n throw new Error('audioTimestamp parameter is not supported in Gemini API.');\n }\n\n const fromThinkingConfig = common.getValueByPath(fromObject, [\n 'thinkingConfig',\n ]);\n if (fromThinkingConfig != null) {\n common.setValueByPath(\n toObject,\n ['thinkingConfig'],\n thinkingConfigToMldev(apiClient, fromThinkingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function generateContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['generationConfig'],\n generateContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTaskType = common.getValueByPath(fromObject, ['taskType']);\n if (parentObject !== undefined && fromTaskType != null) {\n common.setValueByPath(\n parentObject,\n ['requests[]', 'taskType'],\n fromTaskType,\n );\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (parentObject !== undefined && fromTitle != null) {\n common.setValueByPath(parentObject, ['requests[]', 'title'], fromTitle);\n }\n\n const fromOutputDimensionality = common.getValueByPath(fromObject, [\n 'outputDimensionality',\n ]);\n if (parentObject !== undefined && fromOutputDimensionality != null) {\n common.setValueByPath(\n parentObject,\n ['requests[]', 'outputDimensionality'],\n fromOutputDimensionality,\n );\n }\n\n if (common.getValueByPath(fromObject, ['mimeType']) !== undefined) {\n throw new Error('mimeType parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['autoTruncate']) !== undefined) {\n throw new Error('autoTruncate parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function embedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n common.setValueByPath(\n toObject,\n ['requests[]', 'content'],\n t.tContentsForEmbed(apiClient, fromContents),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n embedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n const fromModelForEmbedContent = common.getValueByPath(fromObject, ['model']);\n if (fromModelForEmbedContent !== undefined) {\n common.setValueByPath(\n toObject,\n ['requests[]', 'model'],\n t.tModel(apiClient, fromModelForEmbedContent),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {\n throw new Error('outputGcsUri parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['negativePrompt']) !== undefined) {\n throw new Error('negativePrompt parameter is not supported in Gemini API.');\n }\n\n const fromNumberOfImages = common.getValueByPath(fromObject, [\n 'numberOfImages',\n ]);\n if (parentObject !== undefined && fromNumberOfImages != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfImages,\n );\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromGuidanceScale = common.getValueByPath(fromObject, [\n 'guidanceScale',\n ]);\n if (parentObject !== undefined && fromGuidanceScale != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'guidanceScale'],\n fromGuidanceScale,\n );\n }\n\n if (common.getValueByPath(fromObject, ['seed']) !== undefined) {\n throw new Error('seed parameter is not supported in Gemini API.');\n }\n\n const fromSafetyFilterLevel = common.getValueByPath(fromObject, [\n 'safetyFilterLevel',\n ]);\n if (parentObject !== undefined && fromSafetyFilterLevel != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'safetySetting'],\n fromSafetyFilterLevel,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromIncludeSafetyAttributes = common.getValueByPath(fromObject, [\n 'includeSafetyAttributes',\n ]);\n if (parentObject !== undefined && fromIncludeSafetyAttributes != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeSafetyAttributes'],\n fromIncludeSafetyAttributes,\n );\n }\n\n const fromIncludeRaiReason = common.getValueByPath(fromObject, [\n 'includeRaiReason',\n ]);\n if (parentObject !== undefined && fromIncludeRaiReason != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeRaiReason'],\n fromIncludeRaiReason,\n );\n }\n\n const fromLanguage = common.getValueByPath(fromObject, ['language']);\n if (parentObject !== undefined && fromLanguage != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'language'],\n fromLanguage,\n );\n }\n\n const fromOutputMimeType = common.getValueByPath(fromObject, [\n 'outputMimeType',\n ]);\n if (parentObject !== undefined && fromOutputMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'mimeType'],\n fromOutputMimeType,\n );\n }\n\n const fromOutputCompressionQuality = common.getValueByPath(fromObject, [\n 'outputCompressionQuality',\n ]);\n if (parentObject !== undefined && fromOutputCompressionQuality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'compressionQuality'],\n fromOutputCompressionQuality,\n );\n }\n\n if (common.getValueByPath(fromObject, ['addWatermark']) !== undefined) {\n throw new Error('addWatermark parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {\n throw new Error('enhancePrompt parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function generateImagesParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateImagesConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getModelParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetModelParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function countTokensConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensConfig,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['systemInstruction']) !== undefined) {\n throw new Error(\n 'systemInstruction parameter is not supported in Gemini API.',\n );\n }\n\n if (common.getValueByPath(fromObject, ['tools']) !== undefined) {\n throw new Error('tools parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['generationConfig']) !== undefined) {\n throw new Error(\n 'generationConfig parameter is not supported in Gemini API.',\n );\n }\n\n return toObject;\n}\n\nexport function countTokensParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n countTokensConfigToMldev(apiClient, fromConfig),\n );\n }\n\n return toObject;\n}\n\nexport function imageToMldev(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['gcsUri']) !== undefined) {\n throw new Error('gcsUri parameter is not supported in Gemini API.');\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, ['imageBytes']);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['bytesBase64Encoded'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generateVideosConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromNumberOfVideos = common.getValueByPath(fromObject, [\n 'numberOfVideos',\n ]);\n if (parentObject !== undefined && fromNumberOfVideos != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfVideos,\n );\n }\n\n if (common.getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {\n throw new Error('outputGcsUri parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['fps']) !== undefined) {\n throw new Error('fps parameter is not supported in Gemini API.');\n }\n\n const fromDurationSeconds = common.getValueByPath(fromObject, [\n 'durationSeconds',\n ]);\n if (parentObject !== undefined && fromDurationSeconds != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'durationSeconds'],\n fromDurationSeconds,\n );\n }\n\n if (common.getValueByPath(fromObject, ['seed']) !== undefined) {\n throw new Error('seed parameter is not supported in Gemini API.');\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n if (common.getValueByPath(fromObject, ['resolution']) !== undefined) {\n throw new Error('resolution parameter is not supported in Gemini API.');\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n if (common.getValueByPath(fromObject, ['pubsubTopic']) !== undefined) {\n throw new Error('pubsubTopic parameter is not supported in Gemini API.');\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n if (common.getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {\n throw new Error('enhancePrompt parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function generateVideosParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromImage = common.getValueByPath(fromObject, ['image']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['instances[0]', 'image'],\n imageToMldev(apiClient, fromImage),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateVideosConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partToVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToVertex(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n const fromExample = common.getValueByPath(fromObject, ['example']);\n if (fromExample != null) {\n common.setValueByPath(toObject, ['example'], fromExample);\n }\n\n const fromPattern = common.getValueByPath(fromObject, ['pattern']);\n if (fromPattern != null) {\n common.setValueByPath(toObject, ['pattern'], fromPattern);\n }\n\n const fromDefault = common.getValueByPath(fromObject, ['default']);\n if (fromDefault != null) {\n common.setValueByPath(toObject, ['default'], fromDefault);\n }\n\n const fromMaxLength = common.getValueByPath(fromObject, ['maxLength']);\n if (fromMaxLength != null) {\n common.setValueByPath(toObject, ['maxLength'], fromMaxLength);\n }\n\n const fromMinLength = common.getValueByPath(fromObject, ['minLength']);\n if (fromMinLength != null) {\n common.setValueByPath(toObject, ['minLength'], fromMinLength);\n }\n\n const fromMinProperties = common.getValueByPath(fromObject, [\n 'minProperties',\n ]);\n if (fromMinProperties != null) {\n common.setValueByPath(toObject, ['minProperties'], fromMinProperties);\n }\n\n const fromMaxProperties = common.getValueByPath(fromObject, [\n 'maxProperties',\n ]);\n if (fromMaxProperties != null) {\n common.setValueByPath(toObject, ['maxProperties'], fromMaxProperties);\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function safetySettingToVertex(\n apiClient: ApiClient,\n fromObject: types.SafetySetting,\n): Record {\n const toObject: Record = {};\n\n const fromMethod = common.getValueByPath(fromObject, ['method']);\n if (fromMethod != null) {\n common.setValueByPath(toObject, ['method'], fromMethod);\n }\n\n const fromCategory = common.getValueByPath(fromObject, ['category']);\n if (fromCategory != null) {\n common.setValueByPath(toObject, ['category'], fromCategory);\n }\n\n const fromThreshold = common.getValueByPath(fromObject, ['threshold']);\n if (fromThreshold != null) {\n common.setValueByPath(toObject, ['threshold'], fromThreshold);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n schemaToVertex(apiClient, fromResponse),\n );\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToVertex(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToVertex(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n const fromRetrieval = common.getValueByPath(fromObject, ['retrieval']);\n if (fromRetrieval != null) {\n common.setValueByPath(toObject, ['retrieval'], fromRetrieval);\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToVertex());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function prebuiltVoiceConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.PrebuiltVoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceName = common.getValueByPath(fromObject, ['voiceName']);\n if (fromVoiceName != null) {\n common.setValueByPath(toObject, ['voiceName'], fromVoiceName);\n }\n\n return toObject;\n}\n\nexport function voiceConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.VoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromPrebuiltVoiceConfig = common.getValueByPath(fromObject, [\n 'prebuiltVoiceConfig',\n ]);\n if (fromPrebuiltVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['prebuiltVoiceConfig'],\n prebuiltVoiceConfigToVertex(apiClient, fromPrebuiltVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function speechConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.SpeechConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceConfig = common.getValueByPath(fromObject, ['voiceConfig']);\n if (fromVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['voiceConfig'],\n voiceConfigToVertex(apiClient, fromVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function thinkingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ThinkingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromIncludeThoughts = common.getValueByPath(fromObject, [\n 'includeThoughts',\n ]);\n if (fromIncludeThoughts != null) {\n common.setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);\n }\n\n const fromThinkingBudget = common.getValueByPath(fromObject, [\n 'thinkingBudget',\n ]);\n if (fromThinkingBudget != null) {\n common.setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);\n }\n\n return toObject;\n}\n\nexport function generateContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTemperature = common.getValueByPath(fromObject, ['temperature']);\n if (fromTemperature != null) {\n common.setValueByPath(toObject, ['temperature'], fromTemperature);\n }\n\n const fromTopP = common.getValueByPath(fromObject, ['topP']);\n if (fromTopP != null) {\n common.setValueByPath(toObject, ['topP'], fromTopP);\n }\n\n const fromTopK = common.getValueByPath(fromObject, ['topK']);\n if (fromTopK != null) {\n common.setValueByPath(toObject, ['topK'], fromTopK);\n }\n\n const fromCandidateCount = common.getValueByPath(fromObject, [\n 'candidateCount',\n ]);\n if (fromCandidateCount != null) {\n common.setValueByPath(toObject, ['candidateCount'], fromCandidateCount);\n }\n\n const fromMaxOutputTokens = common.getValueByPath(fromObject, [\n 'maxOutputTokens',\n ]);\n if (fromMaxOutputTokens != null) {\n common.setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);\n }\n\n const fromStopSequences = common.getValueByPath(fromObject, [\n 'stopSequences',\n ]);\n if (fromStopSequences != null) {\n common.setValueByPath(toObject, ['stopSequences'], fromStopSequences);\n }\n\n const fromResponseLogprobs = common.getValueByPath(fromObject, [\n 'responseLogprobs',\n ]);\n if (fromResponseLogprobs != null) {\n common.setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);\n }\n\n const fromLogprobs = common.getValueByPath(fromObject, ['logprobs']);\n if (fromLogprobs != null) {\n common.setValueByPath(toObject, ['logprobs'], fromLogprobs);\n }\n\n const fromPresencePenalty = common.getValueByPath(fromObject, [\n 'presencePenalty',\n ]);\n if (fromPresencePenalty != null) {\n common.setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);\n }\n\n const fromFrequencyPenalty = common.getValueByPath(fromObject, [\n 'frequencyPenalty',\n ]);\n if (fromFrequencyPenalty != null) {\n common.setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (fromSeed != null) {\n common.setValueByPath(toObject, ['seed'], fromSeed);\n }\n\n const fromResponseMimeType = common.getValueByPath(fromObject, [\n 'responseMimeType',\n ]);\n if (fromResponseMimeType != null) {\n common.setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);\n }\n\n const fromResponseSchema = common.getValueByPath(fromObject, [\n 'responseSchema',\n ]);\n if (fromResponseSchema != null) {\n common.setValueByPath(\n toObject,\n ['responseSchema'],\n schemaToVertex(apiClient, t.tSchema(apiClient, fromResponseSchema)),\n );\n }\n\n const fromRoutingConfig = common.getValueByPath(fromObject, [\n 'routingConfig',\n ]);\n if (fromRoutingConfig != null) {\n common.setValueByPath(toObject, ['routingConfig'], fromRoutingConfig);\n }\n\n const fromSafetySettings = common.getValueByPath(fromObject, [\n 'safetySettings',\n ]);\n if (parentObject !== undefined && fromSafetySettings != null) {\n if (Array.isArray(fromSafetySettings)) {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings.map((item) => {\n return safetySettingToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings,\n );\n }\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToVertex(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToVertex(apiClient, fromToolConfig),\n );\n }\n\n const fromLabels = common.getValueByPath(fromObject, ['labels']);\n if (parentObject !== undefined && fromLabels != null) {\n common.setValueByPath(parentObject, ['labels'], fromLabels);\n }\n\n const fromCachedContent = common.getValueByPath(fromObject, [\n 'cachedContent',\n ]);\n if (parentObject !== undefined && fromCachedContent != null) {\n common.setValueByPath(\n parentObject,\n ['cachedContent'],\n t.tCachedContentName(apiClient, fromCachedContent),\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities != null) {\n common.setValueByPath(\n toObject,\n ['responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromMediaResolution = common.getValueByPath(fromObject, [\n 'mediaResolution',\n ]);\n if (fromMediaResolution != null) {\n common.setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig != null) {\n common.setValueByPath(\n toObject,\n ['speechConfig'],\n speechConfigToVertex(\n apiClient,\n t.tSpeechConfig(apiClient, fromSpeechConfig),\n ),\n );\n }\n\n const fromAudioTimestamp = common.getValueByPath(fromObject, [\n 'audioTimestamp',\n ]);\n if (fromAudioTimestamp != null) {\n common.setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp);\n }\n\n const fromThinkingConfig = common.getValueByPath(fromObject, [\n 'thinkingConfig',\n ]);\n if (fromThinkingConfig != null) {\n common.setValueByPath(\n toObject,\n ['thinkingConfig'],\n thinkingConfigToVertex(apiClient, fromThinkingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function generateContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['generationConfig'],\n generateContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTaskType = common.getValueByPath(fromObject, ['taskType']);\n if (parentObject !== undefined && fromTaskType != null) {\n common.setValueByPath(\n parentObject,\n ['instances[]', 'task_type'],\n fromTaskType,\n );\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (parentObject !== undefined && fromTitle != null) {\n common.setValueByPath(parentObject, ['instances[]', 'title'], fromTitle);\n }\n\n const fromOutputDimensionality = common.getValueByPath(fromObject, [\n 'outputDimensionality',\n ]);\n if (parentObject !== undefined && fromOutputDimensionality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputDimensionality'],\n fromOutputDimensionality,\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (parentObject !== undefined && fromMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['instances[]', 'mimeType'],\n fromMimeType,\n );\n }\n\n const fromAutoTruncate = common.getValueByPath(fromObject, ['autoTruncate']);\n if (parentObject !== undefined && fromAutoTruncate != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'autoTruncate'],\n fromAutoTruncate,\n );\n }\n\n return toObject;\n}\n\nexport function embedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n common.setValueByPath(\n toObject,\n ['instances[]', 'content'],\n t.tContentsForEmbed(apiClient, fromContents),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n embedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromOutputGcsUri = common.getValueByPath(fromObject, ['outputGcsUri']);\n if (parentObject !== undefined && fromOutputGcsUri != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'storageUri'],\n fromOutputGcsUri,\n );\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n const fromNumberOfImages = common.getValueByPath(fromObject, [\n 'numberOfImages',\n ]);\n if (parentObject !== undefined && fromNumberOfImages != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfImages,\n );\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromGuidanceScale = common.getValueByPath(fromObject, [\n 'guidanceScale',\n ]);\n if (parentObject !== undefined && fromGuidanceScale != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'guidanceScale'],\n fromGuidanceScale,\n );\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (parentObject !== undefined && fromSeed != null) {\n common.setValueByPath(parentObject, ['parameters', 'seed'], fromSeed);\n }\n\n const fromSafetyFilterLevel = common.getValueByPath(fromObject, [\n 'safetyFilterLevel',\n ]);\n if (parentObject !== undefined && fromSafetyFilterLevel != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'safetySetting'],\n fromSafetyFilterLevel,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromIncludeSafetyAttributes = common.getValueByPath(fromObject, [\n 'includeSafetyAttributes',\n ]);\n if (parentObject !== undefined && fromIncludeSafetyAttributes != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeSafetyAttributes'],\n fromIncludeSafetyAttributes,\n );\n }\n\n const fromIncludeRaiReason = common.getValueByPath(fromObject, [\n 'includeRaiReason',\n ]);\n if (parentObject !== undefined && fromIncludeRaiReason != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeRaiReason'],\n fromIncludeRaiReason,\n );\n }\n\n const fromLanguage = common.getValueByPath(fromObject, ['language']);\n if (parentObject !== undefined && fromLanguage != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'language'],\n fromLanguage,\n );\n }\n\n const fromOutputMimeType = common.getValueByPath(fromObject, [\n 'outputMimeType',\n ]);\n if (parentObject !== undefined && fromOutputMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'mimeType'],\n fromOutputMimeType,\n );\n }\n\n const fromOutputCompressionQuality = common.getValueByPath(fromObject, [\n 'outputCompressionQuality',\n ]);\n if (parentObject !== undefined && fromOutputCompressionQuality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'compressionQuality'],\n fromOutputCompressionQuality,\n );\n }\n\n const fromAddWatermark = common.getValueByPath(fromObject, ['addWatermark']);\n if (parentObject !== undefined && fromAddWatermark != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'addWatermark'],\n fromAddWatermark,\n );\n }\n\n const fromEnhancePrompt = common.getValueByPath(fromObject, [\n 'enhancePrompt',\n ]);\n if (parentObject !== undefined && fromEnhancePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'enhancePrompt'],\n fromEnhancePrompt,\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateImagesConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getModelParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetModelParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function countTokensConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (parentObject !== undefined && fromGenerationConfig != null) {\n common.setValueByPath(\n parentObject,\n ['generationConfig'],\n fromGenerationConfig,\n );\n }\n\n return toObject;\n}\n\nexport function countTokensParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n countTokensConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function computeTokensParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.ComputeTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function imageToVertex(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromGcsUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromGcsUri != null) {\n common.setValueByPath(toObject, ['gcsUri'], fromGcsUri);\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, ['imageBytes']);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['bytesBase64Encoded'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generateVideosConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromNumberOfVideos = common.getValueByPath(fromObject, [\n 'numberOfVideos',\n ]);\n if (parentObject !== undefined && fromNumberOfVideos != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfVideos,\n );\n }\n\n const fromOutputGcsUri = common.getValueByPath(fromObject, ['outputGcsUri']);\n if (parentObject !== undefined && fromOutputGcsUri != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'storageUri'],\n fromOutputGcsUri,\n );\n }\n\n const fromFps = common.getValueByPath(fromObject, ['fps']);\n if (parentObject !== undefined && fromFps != null) {\n common.setValueByPath(parentObject, ['parameters', 'fps'], fromFps);\n }\n\n const fromDurationSeconds = common.getValueByPath(fromObject, [\n 'durationSeconds',\n ]);\n if (parentObject !== undefined && fromDurationSeconds != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'durationSeconds'],\n fromDurationSeconds,\n );\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (parentObject !== undefined && fromSeed != null) {\n common.setValueByPath(parentObject, ['parameters', 'seed'], fromSeed);\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromResolution = common.getValueByPath(fromObject, ['resolution']);\n if (parentObject !== undefined && fromResolution != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'resolution'],\n fromResolution,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromPubsubTopic = common.getValueByPath(fromObject, ['pubsubTopic']);\n if (parentObject !== undefined && fromPubsubTopic != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'pubsubTopic'],\n fromPubsubTopic,\n );\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n const fromEnhancePrompt = common.getValueByPath(fromObject, [\n 'enhancePrompt',\n ]);\n if (parentObject !== undefined && fromEnhancePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'enhancePrompt'],\n fromEnhancePrompt,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromImage = common.getValueByPath(fromObject, ['image']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['instances[0]', 'image'],\n imageToVertex(apiClient, fromImage),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateVideosConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partFromMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentFromMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function citationMetadataFromMldev(\n apiClient: ApiClient,\n fromObject: types.CitationMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromCitations = common.getValueByPath(fromObject, ['citationSources']);\n if (fromCitations != null) {\n common.setValueByPath(toObject, ['citations'], fromCitations);\n }\n\n return toObject;\n}\n\nexport function candidateFromMldev(\n apiClient: ApiClient,\n fromObject: types.Candidate,\n): Record {\n const toObject: Record = {};\n\n const fromContent = common.getValueByPath(fromObject, ['content']);\n if (fromContent != null) {\n common.setValueByPath(\n toObject,\n ['content'],\n contentFromMldev(apiClient, fromContent),\n );\n }\n\n const fromCitationMetadata = common.getValueByPath(fromObject, [\n 'citationMetadata',\n ]);\n if (fromCitationMetadata != null) {\n common.setValueByPath(\n toObject,\n ['citationMetadata'],\n citationMetadataFromMldev(apiClient, fromCitationMetadata),\n );\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n const fromFinishReason = common.getValueByPath(fromObject, ['finishReason']);\n if (fromFinishReason != null) {\n common.setValueByPath(toObject, ['finishReason'], fromFinishReason);\n }\n\n const fromAvgLogprobs = common.getValueByPath(fromObject, ['avgLogprobs']);\n if (fromAvgLogprobs != null) {\n common.setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);\n }\n\n const fromGroundingMetadata = common.getValueByPath(fromObject, [\n 'groundingMetadata',\n ]);\n if (fromGroundingMetadata != null) {\n common.setValueByPath(\n toObject,\n ['groundingMetadata'],\n fromGroundingMetadata,\n );\n }\n\n const fromIndex = common.getValueByPath(fromObject, ['index']);\n if (fromIndex != null) {\n common.setValueByPath(toObject, ['index'], fromIndex);\n }\n\n const fromLogprobsResult = common.getValueByPath(fromObject, [\n 'logprobsResult',\n ]);\n if (fromLogprobsResult != null) {\n common.setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult);\n }\n\n const fromSafetyRatings = common.getValueByPath(fromObject, [\n 'safetyRatings',\n ]);\n if (fromSafetyRatings != null) {\n common.setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings);\n }\n\n return toObject;\n}\n\nexport function generateContentResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromCandidates = common.getValueByPath(fromObject, ['candidates']);\n if (fromCandidates != null) {\n if (Array.isArray(fromCandidates)) {\n common.setValueByPath(\n toObject,\n ['candidates'],\n fromCandidates.map((item) => {\n return candidateFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['candidates'], fromCandidates);\n }\n }\n\n const fromModelVersion = common.getValueByPath(fromObject, ['modelVersion']);\n if (fromModelVersion != null) {\n common.setValueByPath(toObject, ['modelVersion'], fromModelVersion);\n }\n\n const fromPromptFeedback = common.getValueByPath(fromObject, [\n 'promptFeedback',\n ]);\n if (fromPromptFeedback != null) {\n common.setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingStatisticsFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function contentEmbeddingFromMldev(\n apiClient: ApiClient,\n fromObject: types.ContentEmbedding,\n): Record {\n const toObject: Record = {};\n\n const fromValues = common.getValueByPath(fromObject, ['values']);\n if (fromValues != null) {\n common.setValueByPath(toObject, ['values'], fromValues);\n }\n\n return toObject;\n}\n\nexport function embedContentMetadataFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function embedContentResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromEmbeddings = common.getValueByPath(fromObject, ['embeddings']);\n if (fromEmbeddings != null) {\n if (Array.isArray(fromEmbeddings)) {\n common.setValueByPath(\n toObject,\n ['embeddings'],\n fromEmbeddings.map((item) => {\n return contentEmbeddingFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['embeddings'], fromEmbeddings);\n }\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(\n toObject,\n ['metadata'],\n embedContentMetadataFromMldev(),\n );\n }\n\n return toObject;\n}\n\nexport function imageFromMldev(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromImageBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['imageBytes'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function safetyAttributesFromMldev(\n apiClient: ApiClient,\n fromObject: types.SafetyAttributes,\n): Record {\n const toObject: Record = {};\n\n const fromCategories = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'categories',\n ]);\n if (fromCategories != null) {\n common.setValueByPath(toObject, ['categories'], fromCategories);\n }\n\n const fromScores = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'scores',\n ]);\n if (fromScores != null) {\n common.setValueByPath(toObject, ['scores'], fromScores);\n }\n\n const fromContentType = common.getValueByPath(fromObject, ['contentType']);\n if (fromContentType != null) {\n common.setValueByPath(toObject, ['contentType'], fromContentType);\n }\n\n return toObject;\n}\n\nexport function generatedImageFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedImage,\n): Record {\n const toObject: Record = {};\n\n const fromImage = common.getValueByPath(fromObject, ['_self']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['image'],\n imageFromMldev(apiClient, fromImage),\n );\n }\n\n const fromRaiFilteredReason = common.getValueByPath(fromObject, [\n 'raiFilteredReason',\n ]);\n if (fromRaiFilteredReason != null) {\n common.setValueByPath(\n toObject,\n ['raiFilteredReason'],\n fromRaiFilteredReason,\n );\n }\n\n const fromSafetyAttributes = common.getValueByPath(fromObject, ['_self']);\n if (fromSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['safetyAttributes'],\n safetyAttributesFromMldev(apiClient, fromSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedImages = common.getValueByPath(fromObject, [\n 'predictions',\n ]);\n if (fromGeneratedImages != null) {\n if (Array.isArray(fromGeneratedImages)) {\n common.setValueByPath(\n toObject,\n ['generatedImages'],\n fromGeneratedImages.map((item) => {\n return generatedImageFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedImages'], fromGeneratedImages);\n }\n }\n\n const fromPositivePromptSafetyAttributes = common.getValueByPath(fromObject, [\n 'positivePromptSafetyAttributes',\n ]);\n if (fromPositivePromptSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['positivePromptSafetyAttributes'],\n safetyAttributesFromMldev(apiClient, fromPositivePromptSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function endpointFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function tunedModelInfoFromMldev(\n apiClient: ApiClient,\n fromObject: types.TunedModelInfo,\n): Record {\n const toObject: Record = {};\n\n const fromBaseModel = common.getValueByPath(fromObject, ['baseModel']);\n if (fromBaseModel != null) {\n common.setValueByPath(toObject, ['baseModel'], fromBaseModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n return toObject;\n}\n\nexport function modelFromMldev(\n apiClient: ApiClient,\n fromObject: types.Model,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromVersion = common.getValueByPath(fromObject, ['version']);\n if (fromVersion != null) {\n common.setValueByPath(toObject, ['version'], fromVersion);\n }\n\n const fromTunedModelInfo = common.getValueByPath(fromObject, ['_self']);\n if (fromTunedModelInfo != null) {\n common.setValueByPath(\n toObject,\n ['tunedModelInfo'],\n tunedModelInfoFromMldev(apiClient, fromTunedModelInfo),\n );\n }\n\n const fromInputTokenLimit = common.getValueByPath(fromObject, [\n 'inputTokenLimit',\n ]);\n if (fromInputTokenLimit != null) {\n common.setValueByPath(toObject, ['inputTokenLimit'], fromInputTokenLimit);\n }\n\n const fromOutputTokenLimit = common.getValueByPath(fromObject, [\n 'outputTokenLimit',\n ]);\n if (fromOutputTokenLimit != null) {\n common.setValueByPath(toObject, ['outputTokenLimit'], fromOutputTokenLimit);\n }\n\n const fromSupportedActions = common.getValueByPath(fromObject, [\n 'supportedGenerationMethods',\n ]);\n if (fromSupportedActions != null) {\n common.setValueByPath(toObject, ['supportedActions'], fromSupportedActions);\n }\n\n return toObject;\n}\n\nexport function countTokensResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTotalTokens = common.getValueByPath(fromObject, ['totalTokens']);\n if (fromTotalTokens != null) {\n common.setValueByPath(toObject, ['totalTokens'], fromTotalTokens);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n return toObject;\n}\n\nexport function videoFromMldev(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['video', 'uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'video',\n 'encodedVideo',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['encoding']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromMldev(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, [\n 'generatedSamples',\n ]);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromMldev(apiClient, fromResponse),\n );\n }\n\n const fromResult = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResult != null) {\n common.setValueByPath(\n toObject,\n ['result'],\n generateVideosResponseFromMldev(apiClient, fromResult),\n );\n }\n\n return toObject;\n}\n\nexport function partFromVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentFromVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function citationMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.CitationMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromCitations = common.getValueByPath(fromObject, ['citations']);\n if (fromCitations != null) {\n common.setValueByPath(toObject, ['citations'], fromCitations);\n }\n\n return toObject;\n}\n\nexport function candidateFromVertex(\n apiClient: ApiClient,\n fromObject: types.Candidate,\n): Record {\n const toObject: Record = {};\n\n const fromContent = common.getValueByPath(fromObject, ['content']);\n if (fromContent != null) {\n common.setValueByPath(\n toObject,\n ['content'],\n contentFromVertex(apiClient, fromContent),\n );\n }\n\n const fromCitationMetadata = common.getValueByPath(fromObject, [\n 'citationMetadata',\n ]);\n if (fromCitationMetadata != null) {\n common.setValueByPath(\n toObject,\n ['citationMetadata'],\n citationMetadataFromVertex(apiClient, fromCitationMetadata),\n );\n }\n\n const fromFinishMessage = common.getValueByPath(fromObject, [\n 'finishMessage',\n ]);\n if (fromFinishMessage != null) {\n common.setValueByPath(toObject, ['finishMessage'], fromFinishMessage);\n }\n\n const fromFinishReason = common.getValueByPath(fromObject, ['finishReason']);\n if (fromFinishReason != null) {\n common.setValueByPath(toObject, ['finishReason'], fromFinishReason);\n }\n\n const fromAvgLogprobs = common.getValueByPath(fromObject, ['avgLogprobs']);\n if (fromAvgLogprobs != null) {\n common.setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);\n }\n\n const fromGroundingMetadata = common.getValueByPath(fromObject, [\n 'groundingMetadata',\n ]);\n if (fromGroundingMetadata != null) {\n common.setValueByPath(\n toObject,\n ['groundingMetadata'],\n fromGroundingMetadata,\n );\n }\n\n const fromIndex = common.getValueByPath(fromObject, ['index']);\n if (fromIndex != null) {\n common.setValueByPath(toObject, ['index'], fromIndex);\n }\n\n const fromLogprobsResult = common.getValueByPath(fromObject, [\n 'logprobsResult',\n ]);\n if (fromLogprobsResult != null) {\n common.setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult);\n }\n\n const fromSafetyRatings = common.getValueByPath(fromObject, [\n 'safetyRatings',\n ]);\n if (fromSafetyRatings != null) {\n common.setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings);\n }\n\n return toObject;\n}\n\nexport function generateContentResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromCandidates = common.getValueByPath(fromObject, ['candidates']);\n if (fromCandidates != null) {\n if (Array.isArray(fromCandidates)) {\n common.setValueByPath(\n toObject,\n ['candidates'],\n fromCandidates.map((item) => {\n return candidateFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['candidates'], fromCandidates);\n }\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromResponseId = common.getValueByPath(fromObject, ['responseId']);\n if (fromResponseId != null) {\n common.setValueByPath(toObject, ['responseId'], fromResponseId);\n }\n\n const fromModelVersion = common.getValueByPath(fromObject, ['modelVersion']);\n if (fromModelVersion != null) {\n common.setValueByPath(toObject, ['modelVersion'], fromModelVersion);\n }\n\n const fromPromptFeedback = common.getValueByPath(fromObject, [\n 'promptFeedback',\n ]);\n if (fromPromptFeedback != null) {\n common.setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingStatisticsFromVertex(\n apiClient: ApiClient,\n fromObject: types.ContentEmbeddingStatistics,\n): Record {\n const toObject: Record = {};\n\n const fromTruncated = common.getValueByPath(fromObject, ['truncated']);\n if (fromTruncated != null) {\n common.setValueByPath(toObject, ['truncated'], fromTruncated);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['token_count']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingFromVertex(\n apiClient: ApiClient,\n fromObject: types.ContentEmbedding,\n): Record {\n const toObject: Record = {};\n\n const fromValues = common.getValueByPath(fromObject, ['values']);\n if (fromValues != null) {\n common.setValueByPath(toObject, ['values'], fromValues);\n }\n\n const fromStatistics = common.getValueByPath(fromObject, ['statistics']);\n if (fromStatistics != null) {\n common.setValueByPath(\n toObject,\n ['statistics'],\n contentEmbeddingStatisticsFromVertex(apiClient, fromStatistics),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromBillableCharacterCount = common.getValueByPath(fromObject, [\n 'billableCharacterCount',\n ]);\n if (fromBillableCharacterCount != null) {\n common.setValueByPath(\n toObject,\n ['billableCharacterCount'],\n fromBillableCharacterCount,\n );\n }\n\n return toObject;\n}\n\nexport function embedContentResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromEmbeddings = common.getValueByPath(fromObject, [\n 'predictions[]',\n 'embeddings',\n ]);\n if (fromEmbeddings != null) {\n if (Array.isArray(fromEmbeddings)) {\n common.setValueByPath(\n toObject,\n ['embeddings'],\n fromEmbeddings.map((item) => {\n return contentEmbeddingFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['embeddings'], fromEmbeddings);\n }\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(\n toObject,\n ['metadata'],\n embedContentMetadataFromVertex(apiClient, fromMetadata),\n );\n }\n\n return toObject;\n}\n\nexport function imageFromVertex(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromGcsUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromGcsUri != null) {\n common.setValueByPath(toObject, ['gcsUri'], fromGcsUri);\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['imageBytes'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function safetyAttributesFromVertex(\n apiClient: ApiClient,\n fromObject: types.SafetyAttributes,\n): Record {\n const toObject: Record = {};\n\n const fromCategories = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'categories',\n ]);\n if (fromCategories != null) {\n common.setValueByPath(toObject, ['categories'], fromCategories);\n }\n\n const fromScores = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'scores',\n ]);\n if (fromScores != null) {\n common.setValueByPath(toObject, ['scores'], fromScores);\n }\n\n const fromContentType = common.getValueByPath(fromObject, ['contentType']);\n if (fromContentType != null) {\n common.setValueByPath(toObject, ['contentType'], fromContentType);\n }\n\n return toObject;\n}\n\nexport function generatedImageFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedImage,\n): Record {\n const toObject: Record = {};\n\n const fromImage = common.getValueByPath(fromObject, ['_self']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['image'],\n imageFromVertex(apiClient, fromImage),\n );\n }\n\n const fromRaiFilteredReason = common.getValueByPath(fromObject, [\n 'raiFilteredReason',\n ]);\n if (fromRaiFilteredReason != null) {\n common.setValueByPath(\n toObject,\n ['raiFilteredReason'],\n fromRaiFilteredReason,\n );\n }\n\n const fromSafetyAttributes = common.getValueByPath(fromObject, ['_self']);\n if (fromSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['safetyAttributes'],\n safetyAttributesFromVertex(apiClient, fromSafetyAttributes),\n );\n }\n\n const fromEnhancedPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromEnhancedPrompt != null) {\n common.setValueByPath(toObject, ['enhancedPrompt'], fromEnhancedPrompt);\n }\n\n return toObject;\n}\n\nexport function generateImagesResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedImages = common.getValueByPath(fromObject, [\n 'predictions',\n ]);\n if (fromGeneratedImages != null) {\n if (Array.isArray(fromGeneratedImages)) {\n common.setValueByPath(\n toObject,\n ['generatedImages'],\n fromGeneratedImages.map((item) => {\n return generatedImageFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedImages'], fromGeneratedImages);\n }\n }\n\n const fromPositivePromptSafetyAttributes = common.getValueByPath(fromObject, [\n 'positivePromptSafetyAttributes',\n ]);\n if (fromPositivePromptSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['positivePromptSafetyAttributes'],\n safetyAttributesFromVertex(apiClient, fromPositivePromptSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function endpointFromVertex(\n apiClient: ApiClient,\n fromObject: types.Endpoint,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['endpoint']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDeployedModelId = common.getValueByPath(fromObject, [\n 'deployedModelId',\n ]);\n if (fromDeployedModelId != null) {\n common.setValueByPath(toObject, ['deployedModelId'], fromDeployedModelId);\n }\n\n return toObject;\n}\n\nexport function tunedModelInfoFromVertex(\n apiClient: ApiClient,\n fromObject: types.TunedModelInfo,\n): Record {\n const toObject: Record = {};\n\n const fromBaseModel = common.getValueByPath(fromObject, [\n 'labels',\n 'google-vertex-llm-tuning-base-model-id',\n ]);\n if (fromBaseModel != null) {\n common.setValueByPath(toObject, ['baseModel'], fromBaseModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n return toObject;\n}\n\nexport function modelFromVertex(\n apiClient: ApiClient,\n fromObject: types.Model,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromVersion = common.getValueByPath(fromObject, ['versionId']);\n if (fromVersion != null) {\n common.setValueByPath(toObject, ['version'], fromVersion);\n }\n\n const fromEndpoints = common.getValueByPath(fromObject, ['deployedModels']);\n if (fromEndpoints != null) {\n if (Array.isArray(fromEndpoints)) {\n common.setValueByPath(\n toObject,\n ['endpoints'],\n fromEndpoints.map((item) => {\n return endpointFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['endpoints'], fromEndpoints);\n }\n }\n\n const fromLabels = common.getValueByPath(fromObject, ['labels']);\n if (fromLabels != null) {\n common.setValueByPath(toObject, ['labels'], fromLabels);\n }\n\n const fromTunedModelInfo = common.getValueByPath(fromObject, ['_self']);\n if (fromTunedModelInfo != null) {\n common.setValueByPath(\n toObject,\n ['tunedModelInfo'],\n tunedModelInfoFromVertex(apiClient, fromTunedModelInfo),\n );\n }\n\n return toObject;\n}\n\nexport function countTokensResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTotalTokens = common.getValueByPath(fromObject, ['totalTokens']);\n if (fromTotalTokens != null) {\n common.setValueByPath(toObject, ['totalTokens'], fromTotalTokens);\n }\n\n return toObject;\n}\n\nexport function computeTokensResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.ComputeTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTokensInfo = common.getValueByPath(fromObject, ['tokensInfo']);\n if (fromTokensInfo != null) {\n common.setValueByPath(toObject, ['tokensInfo'], fromTokensInfo);\n }\n\n return toObject;\n}\n\nexport function videoFromVertex(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromVertex(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, ['videos']);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromVertex(apiClient, fromResponse),\n );\n }\n\n const fromResult = common.getValueByPath(fromObject, ['response']);\n if (fromResult != null) {\n common.setValueByPath(\n toObject,\n ['result'],\n generateVideosResponseFromVertex(apiClient, fromResult),\n );\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as types from '../types';\nimport {\n contentFromMldev,\n contentFromVertex,\n contentToMldev,\n contentToVertex,\n toolToMldev,\n toolToVertex,\n} from './_models_converters';\n\n/**\n * Converters for live client.\n */\n\nexport function liveConnectParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveConnectParameters,\n): types.LiveClientMessage {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig !== undefined && fromConfig !== null) {\n common.setValueByPath(\n toObject,\n ['setup'],\n liveConnectConfigToMldev(apiClient, fromConfig),\n );\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel !== undefined) {\n common.setValueByPath(toObject, ['setup', 'model'], fromModel);\n }\n\n return toObject;\n}\n\nexport function liveConnectParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveConnectParameters,\n): types.LiveClientMessage {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig !== undefined && fromConfig !== null) {\n common.setValueByPath(\n toObject,\n ['setup'],\n liveConnectConfigToVertex(apiClient, fromConfig),\n );\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel !== undefined) {\n common.setValueByPath(toObject, ['setup', 'model'], fromModel);\n }\n\n return toObject;\n}\n\nexport function liveServerMessageFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerMessage,\n): types.LiveServerMessage {\n const toObject: Record = {};\n\n const fromSetupComplete = common.getValueByPath(fromObject, [\n 'setupComplete',\n ]);\n if (fromSetupComplete !== undefined) {\n common.setValueByPath(toObject, ['setupComplete'], fromSetupComplete);\n }\n\n const fromServerContent = common.getValueByPath(fromObject, [\n 'serverContent',\n ]);\n if (fromServerContent !== undefined && fromServerContent !== null) {\n common.setValueByPath(\n toObject,\n ['serverContent'],\n liveServerContentFromMldev(apiClient, fromServerContent),\n );\n }\n\n const fromToolCall = common.getValueByPath(fromObject, ['toolCall']);\n if (fromToolCall !== undefined && fromToolCall !== null) {\n common.setValueByPath(\n toObject,\n ['toolCall'],\n liveServerToolCallFromMldev(apiClient, fromToolCall),\n );\n }\n\n const fromToolCallCancellation = common.getValueByPath(fromObject, [\n 'toolCallCancellation',\n ]);\n if (\n fromToolCallCancellation !== undefined &&\n fromToolCallCancellation !== null\n ) {\n common.setValueByPath(\n toObject,\n ['toolCallCancellation'],\n liveServerToolCallCancellationFromMldev(\n apiClient,\n fromToolCallCancellation,\n ),\n );\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != undefined && fromUsageMetadata != null) {\n common.setValueByPath(\n toObject,\n ['usageMetadata'],\n usageMetadataFromMldev(apiClient, fromUsageMetadata),\n );\n }\n\n const fromGoAway = common.getValueByPath(fromObject, ['goAway']);\n if (fromGoAway !== undefined && fromGoAway !== null) {\n common.setValueByPath(\n toObject,\n ['goAway'],\n liveServerGoAwayFromMldev(fromGoAway),\n );\n }\n\n const fromSessionResumptionUpdate = common.getValueByPath(fromObject, [\n 'sessionResumptionUpdate',\n ]);\n if (\n fromSessionResumptionUpdate !== undefined &&\n fromSessionResumptionUpdate !== null\n ) {\n common.setValueByPath(\n toObject,\n ['sessionResumptionUpdate'],\n liveServerSessionResumptionUpdateFromMldev(fromSessionResumptionUpdate),\n );\n }\n\n return toObject;\n}\n\nexport function liveServerMessageFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerMessage,\n): types.LiveServerMessage {\n const toObject: Record = {};\n\n const fromSetupComplete = common.getValueByPath(fromObject, [\n 'setupComplete',\n ]);\n if (fromSetupComplete !== undefined) {\n common.setValueByPath(toObject, ['setupComplete'], fromSetupComplete);\n }\n\n const fromServerContent = common.getValueByPath(fromObject, [\n 'serverContent',\n ]);\n if (fromServerContent !== undefined && fromServerContent !== null) {\n common.setValueByPath(\n toObject,\n ['serverContent'],\n liveServerContentFromVertex(apiClient, fromServerContent),\n );\n }\n\n const fromToolCall = common.getValueByPath(fromObject, ['toolCall']);\n if (fromToolCall !== undefined && fromToolCall !== null) {\n common.setValueByPath(\n toObject,\n ['toolCall'],\n liveServerToolCallFromVertex(apiClient, fromToolCall),\n );\n }\n\n const fromToolCallCancellation = common.getValueByPath(fromObject, [\n 'toolCallCancellation',\n ]);\n if (\n fromToolCallCancellation !== undefined &&\n fromToolCallCancellation !== null\n ) {\n common.setValueByPath(\n toObject,\n ['toolCallCancellation'],\n liveServerToolCallCancellationFromVertex(\n apiClient,\n fromToolCallCancellation,\n ),\n );\n }\n\n const fromGoAway = common.getValueByPath(fromObject, ['goAway']);\n if (fromGoAway !== undefined && fromGoAway !== null) {\n common.setValueByPath(\n toObject,\n ['goAway'],\n liveServerGoAwayFromVertex(fromGoAway),\n );\n }\n\n const fromSessionResumptionUpdate = common.getValueByPath(fromObject, [\n 'sessionResumptionUpdate',\n ]);\n if (\n fromSessionResumptionUpdate !== undefined &&\n fromSessionResumptionUpdate !== null\n ) {\n common.setValueByPath(\n toObject,\n ['sessionResumptionUpdate'],\n liveServerSessionResumptionUpdateFromVertex(fromSessionResumptionUpdate),\n );\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != undefined && fromUsageMetadata != null) {\n common.setValueByPath(\n toObject,\n ['usageMetadata'],\n usageMetadataFromVertex(apiClient, fromUsageMetadata),\n );\n }\n\n return toObject;\n}\n\nfunction slidingWindowToMldev(\n fromObject: types.SlidingWindow,\n): types.SlidingWindow {\n const toObject: Record = {};\n\n const fromTargetTokens = common.getValueByPath(fromObject, ['targetTokens']);\n if (fromTargetTokens !== undefined && fromTargetTokens !== null) {\n common.setValueByPath(toObject, ['targetTokens'], fromTargetTokens);\n }\n\n return toObject;\n}\n\nfunction slidingWindowToVertex(\n fromObject: types.SlidingWindow,\n): types.SlidingWindow {\n const toObject: Record = {};\n\n const fromTargetTokens = common.getValueByPath(fromObject, ['targetTokens']);\n if (fromTargetTokens !== undefined && fromTargetTokens !== null) {\n common.setValueByPath(toObject, ['targetTokens'], fromTargetTokens);\n }\n\n return toObject;\n}\n\nfunction contextWindowCompressionToMldev(\n fromObject: types.ContextWindowCompressionConfig,\n): types.ContextWindowCompressionConfig {\n const toObject: Record = {};\n\n const fromTriggerTokens = common.getValueByPath(fromObject, [\n 'triggerTokens',\n ]);\n if (fromTriggerTokens !== undefined && fromTriggerTokens !== null) {\n common.setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);\n }\n\n const fromSlidingWindow = common.getValueByPath(fromObject, [\n 'slidingWindow',\n ]);\n if (fromSlidingWindow !== undefined && fromSlidingWindow !== null) {\n common.setValueByPath(\n toObject,\n ['slidingWindow'],\n slidingWindowToMldev(fromSlidingWindow),\n );\n }\n\n return toObject;\n}\n\nfunction contextWindowCompressionToVertex(\n fromObject: types.ContextWindowCompressionConfig,\n): types.ContextWindowCompressionConfig {\n const toObject: Record = {};\n\n const fromTriggerTokens = common.getValueByPath(fromObject, [\n 'triggerTokens',\n ]);\n if (fromTriggerTokens !== undefined && fromTriggerTokens !== null) {\n common.setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);\n }\n\n const fromSlidingWindow = common.getValueByPath(fromObject, [\n 'slidingWindow',\n ]);\n if (fromSlidingWindow !== undefined && fromSlidingWindow !== null) {\n common.setValueByPath(\n toObject,\n ['slidingWindow'],\n slidingWindowToVertex(fromSlidingWindow),\n );\n }\n\n return toObject;\n}\n\nfunction automaticActivityDetectionToMldev(\n fromObject: types.AutomaticActivityDetection,\n): types.AutomaticActivityDetection {\n const toObject: Record = {};\n\n const fromDisabled = common.getValueByPath(fromObject, ['disabled']);\n if (fromDisabled !== undefined && fromDisabled !== null) {\n common.setValueByPath(toObject, ['disabled'], fromDisabled);\n }\n\n const fromStartOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'startOfSpeechSensitivity',\n ]);\n if (\n fromStartOfSpeechSensitivity !== undefined &&\n fromStartOfSpeechSensitivity !== null\n ) {\n common.setValueByPath(\n toObject,\n ['startOfSpeechSensitivity'],\n fromStartOfSpeechSensitivity,\n );\n }\n\n const fromEndOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'endOfSpeechSensitivity',\n ]);\n if (\n fromEndOfSpeechSensitivity !== undefined &&\n fromEndOfSpeechSensitivity !== null\n ) {\n common.setValueByPath(\n toObject,\n ['endOfSpeechSensitivity'],\n fromEndOfSpeechSensitivity,\n );\n }\n\n const fromPrefixPaddingMs = common.getValueByPath(fromObject, [\n 'prefixPaddingMs',\n ]);\n if (fromPrefixPaddingMs !== undefined && fromPrefixPaddingMs !== null) {\n common.setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);\n }\n\n const fromSilenceDurationMs = common.getValueByPath(fromObject, [\n 'silenceDurationMs',\n ]);\n if (fromSilenceDurationMs !== undefined && fromSilenceDurationMs !== null) {\n common.setValueByPath(\n toObject,\n ['silenceDurationMs'],\n fromSilenceDurationMs,\n );\n }\n\n return toObject;\n}\n\nfunction automaticActivityDetectionToVertex(\n fromObject: types.AutomaticActivityDetection,\n): types.AutomaticActivityDetection {\n const toObject: Record = {};\n\n const fromDisabled = common.getValueByPath(fromObject, ['disabled']);\n if (fromDisabled !== undefined && fromDisabled !== null) {\n common.setValueByPath(toObject, ['disabled'], fromDisabled);\n }\n\n const fromStartOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'startOfSpeechSensitivity',\n ]);\n if (\n fromStartOfSpeechSensitivity !== undefined &&\n fromStartOfSpeechSensitivity !== null\n ) {\n common.setValueByPath(\n toObject,\n ['startOfSpeechSensitivity'],\n fromStartOfSpeechSensitivity,\n );\n }\n\n const fromEndOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'endOfSpeechSensitivity',\n ]);\n if (\n fromEndOfSpeechSensitivity !== undefined &&\n fromEndOfSpeechSensitivity !== null\n ) {\n common.setValueByPath(\n toObject,\n ['endOfSpeechSensitivity'],\n fromEndOfSpeechSensitivity,\n );\n }\n\n const fromPrefixPaddingMs = common.getValueByPath(fromObject, [\n 'prefixPaddingMs',\n ]);\n if (fromPrefixPaddingMs !== undefined && fromPrefixPaddingMs !== null) {\n common.setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);\n }\n\n const fromSilenceDurationMs = common.getValueByPath(fromObject, [\n 'silenceDurationMs',\n ]);\n if (fromSilenceDurationMs !== undefined && fromSilenceDurationMs !== null) {\n common.setValueByPath(\n toObject,\n ['silenceDurationMs'],\n fromSilenceDurationMs,\n );\n }\n\n return toObject;\n}\n\nfunction realtimeInputConfigToMldev(\n fromObject: types.RealtimeInputConfig,\n): types.RealtimeInputConfig {\n const toObject: Record = {};\n\n const fromAutomaticActivityDetection = common.getValueByPath(fromObject, [\n 'automaticActivityDetection',\n ]);\n if (\n fromAutomaticActivityDetection !== undefined &&\n fromAutomaticActivityDetection !== null\n ) {\n common.setValueByPath(\n toObject,\n ['automaticActivityDetection'],\n automaticActivityDetectionToMldev(fromAutomaticActivityDetection),\n );\n }\n\n const fromActivityHandling = common.getValueByPath(fromObject, [\n 'activityHandling',\n ]);\n if (fromActivityHandling !== undefined && fromActivityHandling !== null) {\n common.setValueByPath(toObject, ['activityHandling'], fromActivityHandling);\n }\n\n const fromTurnCoverage = common.getValueByPath(fromObject, ['turnCoverage']);\n if (fromTurnCoverage !== undefined && fromTurnCoverage !== null) {\n common.setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);\n }\n\n return toObject;\n}\n\nfunction realtimeInputConfigToVertex(\n fromObject: types.RealtimeInputConfig,\n): types.RealtimeInputConfig {\n const toObject: Record = {};\n\n const fromAutomaticActivityDetection = common.getValueByPath(fromObject, [\n 'automaticActivityDetection',\n ]);\n if (\n fromAutomaticActivityDetection !== undefined &&\n fromAutomaticActivityDetection !== null\n ) {\n common.setValueByPath(\n toObject,\n ['automaticActivityDetection'],\n automaticActivityDetectionToVertex(fromAutomaticActivityDetection),\n );\n }\n\n const fromActivityHandling = common.getValueByPath(fromObject, [\n 'activityHandling',\n ]);\n if (fromActivityHandling !== undefined && fromActivityHandling !== null) {\n common.setValueByPath(toObject, ['activityHandling'], fromActivityHandling);\n }\n\n const fromTurnCoverage = common.getValueByPath(fromObject, ['turnCoverage']);\n if (fromTurnCoverage !== undefined && fromTurnCoverage !== null) {\n common.setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);\n }\n\n return toObject;\n}\n\nfunction liveConnectConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveConnectConfig,\n): types.LiveClientSetup {\n const toObject: Record = {};\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (fromGenerationConfig !== undefined) {\n common.setValueByPath(toObject, ['generationConfig'], fromGenerationConfig);\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities !== undefined) {\n common.setValueByPath(\n toObject,\n ['generationConfig', 'responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig !== undefined) {\n common.setValueByPath(\n toObject,\n ['generationConfig', 'speechConfig'],\n fromSpeechConfig,\n );\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (fromSystemInstruction !== undefined && fromSystemInstruction !== null) {\n common.setValueByPath(\n toObject,\n ['systemInstruction'],\n contentToMldev(apiClient, fromSystemInstruction),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (\n fromTools !== undefined &&\n fromTools !== null &&\n Array.isArray(fromTools)\n ) {\n common.setValueByPath(\n toObject,\n ['tools'],\n fromTools.map((item: types.Tool) => {\n return toolToMldev(apiClient, item);\n }),\n );\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (fromSessionResumption !== undefined && fromSessionResumption !== null) {\n common.setValueByPath(\n toObject,\n ['sessionResumption'],\n liveClientSessionResumptionConfigToMldev(fromSessionResumption),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (\n fromContextWindowCompression !== undefined &&\n fromContextWindowCompression !== null\n ) {\n common.setValueByPath(\n toObject,\n ['contextWindowCompression'],\n contextWindowCompressionToMldev(fromContextWindowCompression),\n );\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (\n fromRealtimeInputConfig !== undefined &&\n fromRealtimeInputConfig !== null\n ) {\n common.setValueByPath(\n toObject,\n ['realtimeInputConfig'],\n realtimeInputConfigToMldev(fromRealtimeInputConfig),\n );\n }\n\n return toObject;\n}\n\nfunction liveConnectConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveConnectConfig,\n): types.LiveClientSetup {\n const toObject: Record = {};\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (fromGenerationConfig !== undefined) {\n common.setValueByPath(toObject, ['generationConfig'], fromGenerationConfig);\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities !== undefined) {\n common.setValueByPath(\n toObject,\n ['generationConfig', 'responseModalities'],\n fromResponseModalities,\n );\n } else {\n // Set default to AUDIO to align with MLDev API.\n common.setValueByPath(\n toObject,\n ['generationConfig', 'responseModalities'],\n ['AUDIO'],\n );\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig !== undefined) {\n common.setValueByPath(\n toObject,\n ['generationConfig', 'speechConfig'],\n fromSpeechConfig,\n );\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (fromSystemInstruction !== undefined && fromSystemInstruction !== null) {\n common.setValueByPath(\n toObject,\n ['systemInstruction'],\n contentToVertex(apiClient, fromSystemInstruction),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (\n fromTools !== undefined &&\n fromTools !== null &&\n Array.isArray(fromTools)\n ) {\n common.setValueByPath(\n toObject,\n ['tools'],\n fromTools.map((item: types.Tool) => {\n return toolToVertex(apiClient, item);\n }),\n );\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (fromSessionResumption !== undefined && fromSessionResumption !== null) {\n common.setValueByPath(\n toObject,\n ['sessionResumption'],\n liveClientSessionResumptionConfigToVertex(fromSessionResumption),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (\n fromContextWindowCompression !== undefined &&\n fromContextWindowCompression !== null\n ) {\n common.setValueByPath(\n toObject,\n ['contextWindowCompression'],\n contextWindowCompressionToVertex(fromContextWindowCompression),\n );\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (\n fromRealtimeInputConfig !== undefined &&\n fromRealtimeInputConfig !== null\n ) {\n common.setValueByPath(\n toObject,\n ['realtimeInputConfig'],\n realtimeInputConfigToVertex(fromRealtimeInputConfig),\n );\n }\n\n return toObject;\n}\n\nfunction liveServerContentFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerContent,\n): types.LiveServerContent {\n const toObject: Record = {};\n\n const fromModelTurn = common.getValueByPath(fromObject, ['modelTurn']);\n if (fromModelTurn !== undefined && fromModelTurn !== null) {\n common.setValueByPath(\n toObject,\n ['modelTurn'],\n contentFromMldev(apiClient, fromModelTurn),\n );\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete !== undefined) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n const fromInterrupted = common.getValueByPath(fromObject, ['interrupted']);\n if (fromInterrupted !== undefined) {\n common.setValueByPath(toObject, ['interrupted'], fromInterrupted);\n }\n\n const fromGenerationComplete = common.getValueByPath(fromObject, [\n 'generationComplete',\n ]);\n if (fromGenerationComplete != null) {\n common.setValueByPath(\n toObject,\n ['generationComplete'],\n fromGenerationComplete,\n );\n }\n\n return toObject;\n}\n\nfunction liveServerContentFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerContent,\n): types.LiveServerContent {\n const toObject: Record = {};\n\n const fromModelTurn = common.getValueByPath(fromObject, ['modelTurn']);\n if (fromModelTurn !== undefined && fromModelTurn !== null) {\n common.setValueByPath(\n toObject,\n ['modelTurn'],\n contentFromVertex(apiClient, fromModelTurn),\n );\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete !== undefined) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n const fromInterrupted = common.getValueByPath(fromObject, ['interrupted']);\n if (fromInterrupted !== undefined) {\n common.setValueByPath(toObject, ['interrupted'], fromInterrupted);\n }\n\n const fromGenerationComplete = common.getValueByPath(fromObject, [\n 'generationComplete',\n ]);\n if (fromGenerationComplete != null) {\n common.setValueByPath(\n toObject,\n ['generationComplete'],\n fromGenerationComplete,\n );\n }\n return toObject;\n}\n\nfunction functionCallFromMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCall,\n): types.FunctionCall {\n const toObject: Record = {};\n\n const fromId = common.getValueByPath(fromObject, ['id']);\n if (fromId !== undefined) {\n common.setValueByPath(toObject, ['id'], fromId);\n }\n\n const fromArgs = common.getValueByPath(fromObject, ['args']);\n if (fromArgs !== undefined) {\n common.setValueByPath(toObject, ['args'], fromArgs);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName !== undefined) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n return toObject;\n}\n\nfunction functionCallFromVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCall,\n): types.FunctionCall {\n const toObject: Record = {};\n\n const fromArgs = common.getValueByPath(fromObject, ['args']);\n if (fromArgs !== undefined) {\n common.setValueByPath(toObject, ['args'], fromArgs);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName !== undefined) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n return toObject;\n}\n\nfunction liveServerToolCallFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCall,\n): types.LiveServerToolCall {\n const toObject: Record = {};\n\n const fromFunctionCalls = common.getValueByPath(fromObject, [\n 'functionCalls',\n ]);\n if (\n fromFunctionCalls !== undefined &&\n fromFunctionCalls !== null &&\n Array.isArray(fromFunctionCalls)\n ) {\n common.setValueByPath(\n toObject,\n ['functionCalls'],\n fromFunctionCalls.map((item: types.FunctionCall) => {\n return functionCallFromMldev(apiClient, item);\n }),\n );\n }\n\n return toObject;\n}\n\nfunction liveServerToolCallFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCall,\n): types.LiveServerToolCall {\n const toObject: Record = {};\n\n const fromFunctionCalls = common.getValueByPath(fromObject, [\n 'functionCalls',\n ]);\n if (\n fromFunctionCalls !== undefined &&\n fromFunctionCalls !== null &&\n Array.isArray(fromFunctionCalls)\n ) {\n common.setValueByPath(\n toObject,\n ['functionCalls'],\n fromFunctionCalls.map((item: types.FunctionCall) => {\n return functionCallFromVertex(apiClient, item);\n }),\n );\n }\n\n return toObject;\n}\n\nfunction liveServerToolCallCancellationFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCallCancellation,\n): types.LiveServerToolCallCancellation {\n const toObject: Record = {};\n\n const fromIds = common.getValueByPath(fromObject, ['ids']);\n if (fromIds !== undefined) {\n common.setValueByPath(toObject, ['ids'], fromIds);\n }\n\n return toObject;\n}\n\nfunction liveServerToolCallCancellationFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCallCancellation,\n): types.LiveServerToolCallCancellation {\n const toObject: Record = {};\n\n const fromIds = common.getValueByPath(fromObject, ['ids']);\n if (fromIds !== undefined) {\n common.setValueByPath(toObject, ['ids'], fromIds);\n }\n\n return toObject;\n}\n\nfunction liveServerGoAwayFromMldev(\n fromObject: types.LiveServerGoAway,\n): types.LiveServerGoAway {\n const toObject: Record = {};\n\n const fromTimeLeft = common.getValueByPath(fromObject, ['timeLeft']);\n if (fromTimeLeft !== undefined) {\n common.setValueByPath(toObject, ['timeLeft'], fromTimeLeft);\n }\n\n return toObject;\n}\n\nfunction liveServerGoAwayFromVertex(\n fromObject: types.LiveServerGoAway,\n): types.LiveServerGoAway {\n const toObject: Record = {};\n\n const fromTimeLeft = common.getValueByPath(fromObject, ['timeLeft']);\n if (fromTimeLeft !== undefined) {\n common.setValueByPath(toObject, ['timeLeft'], fromTimeLeft);\n }\n\n return toObject;\n}\n\nfunction liveServerSessionResumptionUpdateFromMldev(\n fromObject: types.LiveServerSessionResumptionUpdate,\n): types.LiveServerSessionResumptionUpdate {\n const toObject: Record = {};\n\n const fromNewHandle = common.getValueByPath(fromObject, ['newHandle']);\n if (fromNewHandle !== undefined) {\n common.setValueByPath(toObject, ['newHandle'], fromNewHandle);\n }\n\n const fromResumable = common.getValueByPath(fromObject, ['resumable']);\n if (fromResumable !== undefined) {\n common.setValueByPath(toObject, ['resumable'], fromResumable);\n }\n\n const fromLastConsumedClientMessageIndex = common.getValueByPath(fromObject, [\n 'lastConsumedClientMessageIndex',\n ]);\n if (fromLastConsumedClientMessageIndex !== undefined) {\n common.setValueByPath(\n toObject,\n ['lastConsumedClientMessageIndex'],\n fromLastConsumedClientMessageIndex,\n );\n }\n\n return toObject;\n}\n\nfunction liveServerSessionResumptionUpdateFromVertex(\n fromObject: types.LiveServerSessionResumptionUpdate,\n): types.LiveServerSessionResumptionUpdate {\n const toObject: Record = {};\n\n const fromNewHandle = common.getValueByPath(fromObject, ['newHandle']);\n if (fromNewHandle !== undefined) {\n common.setValueByPath(toObject, ['newHandle'], fromNewHandle);\n }\n\n const fromResumable = common.getValueByPath(fromObject, ['resumable']);\n if (fromResumable !== undefined) {\n common.setValueByPath(toObject, ['resumable'], fromResumable);\n }\n\n const fromLastConsumedClientMessageIndex = common.getValueByPath(fromObject, [\n 'lastConsumedClientMessageIndex',\n ]);\n if (fromLastConsumedClientMessageIndex !== undefined) {\n common.setValueByPath(\n toObject,\n ['lastConsumedClientMessageIndex'],\n fromLastConsumedClientMessageIndex,\n );\n }\n\n return toObject;\n}\n\nfunction liveClientSessionResumptionConfigToMldev(\n fromObject: types.SessionResumptionConfig,\n): types.SessionResumptionConfig {\n const toObject: Record = {};\n\n const fromHandle = common.getValueByPath(fromObject, ['handle']);\n if (fromHandle !== undefined) {\n common.setValueByPath(toObject, ['handle'], fromHandle);\n }\n\n if (common.getValueByPath(fromObject, ['transparent']) !== undefined) {\n throw new Error('transparent parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nfunction liveClientSessionResumptionConfigToVertex(\n fromObject: types.SessionResumptionConfig,\n): types.SessionResumptionConfig {\n const toObject: Record = {};\n\n const fromHandle = common.getValueByPath(fromObject, ['handle']);\n if (fromHandle !== undefined) {\n common.setValueByPath(toObject, ['handle'], fromHandle);\n }\n\n const fromTransparent = common.getValueByPath(fromObject, ['transparent']);\n if (fromTransparent !== undefined) {\n common.setValueByPath(toObject, ['transparent'], fromTransparent);\n }\n\n return toObject;\n}\n\nexport function modalityTokenCountFromMldev(\n apiClient: ApiClient,\n fromObject: types.ModalityTokenCount,\n): types.ModalityTokenCount {\n const toObject: Record = {};\n\n const fromModality = common.getValueByPath(fromObject, ['modality']);\n if (fromModality != null) {\n common.setValueByPath(toObject, ['modality'], fromModality);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function usageMetadataFromMldev(\n apiClient: ApiClient,\n fromObject: types.UsageMetadata,\n): types.UsageMetadata {\n const toObject: Record = {};\n\n const fromPromptTokenCount = common.getValueByPath(fromObject, [\n 'promptTokenCount',\n ]);\n if (fromPromptTokenCount != null) {\n common.setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n const fromResponseTokenCount = common.getValueByPath(fromObject, [\n 'responseTokenCount',\n ]);\n if (fromResponseTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['responseTokenCount'],\n fromResponseTokenCount,\n );\n }\n\n const fromToolUsePromptTokenCount = common.getValueByPath(fromObject, [\n 'toolUsePromptTokenCount',\n ]);\n if (fromToolUsePromptTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokenCount'],\n fromToolUsePromptTokenCount,\n );\n }\n\n const fromThoughtsTokenCount = common.getValueByPath(fromObject, [\n 'thoughtsTokenCount',\n ]);\n if (fromThoughtsTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['thoughtsTokenCount'],\n fromThoughtsTokenCount,\n );\n }\n\n const fromTotalTokenCount = common.getValueByPath(fromObject, [\n 'totalTokenCount',\n ]);\n if (fromTotalTokenCount != null) {\n common.setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);\n }\n\n const fromPromptTokensDetails = common.getValueByPath(fromObject, [\n 'promptTokensDetails',\n ]);\n if (fromPromptTokensDetails != null) {\n if (Array.isArray(fromPromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails,\n );\n }\n }\n\n const fromCacheTokensDetails = common.getValueByPath(fromObject, [\n 'cacheTokensDetails',\n ]);\n if (fromCacheTokensDetails != null) {\n if (Array.isArray(fromCacheTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails,\n );\n }\n }\n\n const fromResponseTokensDetails = common.getValueByPath(fromObject, [\n 'responseTokensDetails',\n ]);\n if (fromResponseTokensDetails != null) {\n if (Array.isArray(fromResponseTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails,\n );\n }\n }\n\n const fromToolUsePromptTokensDetails = common.getValueByPath(fromObject, [\n 'toolUsePromptTokensDetails',\n ]);\n if (fromToolUsePromptTokensDetails != null) {\n if (Array.isArray(fromToolUsePromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails,\n );\n }\n }\n\n return toObject;\n}\n\nexport function modalityTokenCountFromVertex(\n apiClient: ApiClient,\n fromObject: types.ModalityTokenCount,\n): types.ModalityTokenCount {\n const toObject: Record = {};\n\n const fromModality = common.getValueByPath(fromObject, ['modality']);\n if (fromModality != null) {\n common.setValueByPath(toObject, ['modality'], fromModality);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function usageMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.UsageMetadata,\n): types.UsageMetadata {\n const toObject: Record = {};\n\n const fromPromptTokenCount = common.getValueByPath(fromObject, [\n 'promptTokenCount',\n ]);\n if (fromPromptTokenCount != null) {\n common.setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n const fromResponseTokenCount = common.getValueByPath(fromObject, [\n 'candidatesTokenCount',\n ]);\n if (fromResponseTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['responseTokenCount'],\n fromResponseTokenCount,\n );\n }\n\n const fromToolUsePromptTokenCount = common.getValueByPath(fromObject, [\n 'toolUsePromptTokenCount',\n ]);\n if (fromToolUsePromptTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokenCount'],\n fromToolUsePromptTokenCount,\n );\n }\n\n const fromThoughtsTokenCount = common.getValueByPath(fromObject, [\n 'thoughtsTokenCount',\n ]);\n if (fromThoughtsTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['thoughtsTokenCount'],\n fromThoughtsTokenCount,\n );\n }\n\n const fromTotalTokenCount = common.getValueByPath(fromObject, [\n 'totalTokenCount',\n ]);\n if (fromTotalTokenCount != null) {\n common.setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);\n }\n\n const fromPromptTokensDetails = common.getValueByPath(fromObject, [\n 'promptTokensDetails',\n ]);\n if (fromPromptTokensDetails != null) {\n if (Array.isArray(fromPromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails,\n );\n }\n }\n\n const fromCacheTokensDetails = common.getValueByPath(fromObject, [\n 'cacheTokensDetails',\n ]);\n if (fromCacheTokensDetails != null) {\n if (Array.isArray(fromCacheTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails,\n );\n }\n }\n\n const fromToolUsePromptTokensDetails = common.getValueByPath(fromObject, [\n 'toolUsePromptTokensDetails',\n ]);\n if (fromToolUsePromptTokensDetails != null) {\n if (Array.isArray(fromToolUsePromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails,\n );\n }\n }\n\n const fromResponseTokensDetails = common.getValueByPath(fromObject, [\n 'candidatesTokensDetails',\n ]);\n if (fromResponseTokensDetails != null) {\n if (Array.isArray(fromResponseTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails,\n );\n }\n }\n\n const fromTrafficType = common.getValueByPath(fromObject, ['trafficType']);\n if (fromTrafficType != null) {\n common.setValueByPath(toObject, ['trafficType'], fromTrafficType);\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Live client.\n *\n * @experimental\n */\n\nimport {ApiClient} from './_api_client';\nimport {Auth} from './_auth';\nimport * as t from './_transformers';\nimport {WebSocket, WebSocketCallbacks, WebSocketFactory} from './_websocket';\nimport * as converters from './converters/_live_converters';\nimport {contentToMldev, contentToVertex} from './converters/_models_converters';\nimport * as types from './types';\n\nconst FUNCTION_RESPONSE_REQUIRES_ID =\n 'FunctionResponse request must have an `id` field from the response of a ToolCall.FunctionalCalls in Google AI.';\n\n/**\n * Handles incoming messages from the WebSocket.\n *\n * @remarks\n * This function is responsible for parsing incoming messages, transforming them\n * into LiveServerMessages, and then calling the onmessage callback. Note that\n * the first message which is received from the server is a setupComplete\n * message.\n *\n * @param apiClient The ApiClient instance.\n * @param onmessage The user-provided onmessage callback (if any).\n * @param event The MessageEvent from the WebSocket.\n */\nasync function handleWebSocketMessage(\n apiClient: ApiClient,\n onmessage: (msg: types.LiveServerMessage) => void,\n event: MessageEvent,\n): Promise {\n let serverMessage: types.LiveServerMessage;\n let data: types.LiveServerMessage;\n if (event.data instanceof Blob) {\n data = JSON.parse(await event.data.text()) as types.LiveServerMessage;\n } else {\n data = JSON.parse(event.data) as types.LiveServerMessage;\n }\n if (apiClient.isVertexAI()) {\n serverMessage = converters.liveServerMessageFromVertex(apiClient, data);\n } else {\n serverMessage = converters.liveServerMessageFromMldev(apiClient, data);\n }\n\n onmessage(serverMessage);\n}\n\n/**\n Live class encapsulates the configuration for live interaction with the\n Generative Language API. It embeds ApiClient for general API settings.\n\n @experimental\n */\nexport class Live {\n constructor(\n private readonly apiClient: ApiClient,\n private readonly auth: Auth,\n private readonly webSocketFactory: WebSocketFactory,\n ) {}\n\n /**\n Establishes a connection to the specified model with the given\n configuration and returns a Session object representing that connection.\n\n @experimental\n\n @remarks\n If using the Gemini API, Live is currently only supported behind API\n version `v1alpha`. Ensure that the API version is set to `v1alpha` when\n initializing the SDK if relying on the Gemini API.\n\n @param params - The parameters for establishing a connection to the model.\n @return A live session.\n\n @example\n ```ts\n const session = await ai.live.connect({\n model: 'gemini-2.0-flash-exp',\n config: {\n responseModalities: [Modality.AUDIO],\n },\n callbacks: {\n onopen: () => {\n console.log('Connected to the socket.');\n },\n onmessage: (e: MessageEvent) => {\n console.log('Received message from the server: %s\\n', debug(e.data));\n },\n onerror: (e: ErrorEvent) => {\n console.log('Error occurred: %s\\n', debug(e.error));\n },\n onclose: (e: CloseEvent) => {\n console.log('Connection closed.');\n },\n },\n });\n ```\n */\n async connect(params: types.LiveConnectParameters): Promise {\n const websocketBaseUrl = this.apiClient.getWebsocketBaseUrl();\n const apiVersion = this.apiClient.getApiVersion();\n let url: string;\n const headers = mapToHeaders(this.apiClient.getDefaultHeaders());\n if (this.apiClient.isVertexAI()) {\n url = `${websocketBaseUrl}/ws/google.cloud.aiplatform.${\n apiVersion\n }.LlmBidiService/BidiGenerateContent`;\n await this.auth.addAuthHeaders(headers);\n } else {\n const apiKey = this.apiClient.getApiKey();\n url = `${websocketBaseUrl}/ws/google.ai.generativelanguage.${\n apiVersion\n }.GenerativeService.BidiGenerateContent?key=${apiKey}`;\n }\n\n let onopenResolve: (value: unknown) => void = () => {};\n const onopenPromise = new Promise((resolve: (value: unknown) => void) => {\n onopenResolve = resolve;\n });\n\n const callbacks: types.LiveCallbacks = params.callbacks;\n\n const onopenAwaitedCallback = function () {\n callbacks?.onopen?.();\n onopenResolve({});\n };\n\n const apiClient = this.apiClient;\n\n const websocketCallbacks: WebSocketCallbacks = {\n onopen: onopenAwaitedCallback,\n onmessage: (event: MessageEvent) => {\n void handleWebSocketMessage(apiClient, callbacks.onmessage, event);\n },\n onerror:\n callbacks?.onerror ??\n function (e: ErrorEvent) {\n void e;\n },\n onclose:\n callbacks?.onclose ??\n function (e: CloseEvent) {\n void e;\n },\n };\n\n const conn = this.webSocketFactory.create(\n url,\n headersToMap(headers),\n websocketCallbacks,\n );\n conn.connect();\n // Wait for the websocket to open before sending requests.\n await onopenPromise;\n\n let transformedModel = t.tModel(this.apiClient, params.model);\n if (\n this.apiClient.isVertexAI() &&\n transformedModel.startsWith('publishers/')\n ) {\n const project = this.apiClient.getProject();\n const location = this.apiClient.getLocation();\n transformedModel =\n `projects/${project}/locations/${location}/` + transformedModel;\n }\n\n let clientMessage: types.LiveClientMessage = {};\n const liveConnectParameters: types.LiveConnectParameters = {\n model: transformedModel,\n config: params.config,\n callbacks: params.callbacks,\n };\n if (this.apiClient.isVertexAI()) {\n clientMessage = converters.liveConnectParametersToVertex(\n this.apiClient,\n liveConnectParameters,\n );\n } else {\n clientMessage = converters.liveConnectParametersToMldev(\n this.apiClient,\n liveConnectParameters,\n );\n }\n conn.send(JSON.stringify(clientMessage));\n return new Session(conn, this.apiClient);\n }\n}\n\nconst defaultLiveSendClientContentParamerters: types.LiveSendClientContentParameters =\n {\n turnComplete: true,\n };\n\n/**\n Represents a connection to the API.\n\n @experimental\n */\nexport class Session {\n constructor(\n readonly conn: WebSocket,\n private readonly apiClient: ApiClient,\n ) {}\n\n private tLiveClientContent(\n apiClient: ApiClient,\n params: types.LiveSendClientContentParameters,\n ): types.LiveClientMessage {\n if (params.turns !== null && params.turns !== undefined) {\n let contents: types.Content[] = [];\n try {\n contents = t.tContents(\n apiClient,\n params.turns as types.ContentListUnion,\n );\n if (apiClient.isVertexAI()) {\n contents = contents.map((item) => contentToVertex(apiClient, item));\n } else {\n contents = contents.map((item) => contentToMldev(apiClient, item));\n }\n } catch {\n throw new Error(\n `Failed to parse client content \"turns\", type: '${typeof params.turns}'`,\n );\n }\n return {\n clientContent: {turns: contents, turnComplete: params.turnComplete},\n };\n }\n\n return {\n clientContent: {turnComplete: params.turnComplete},\n };\n }\n\n private tLiveClientRealtimeInput(\n apiClient: ApiClient,\n params: types.LiveSendRealtimeInputParameters,\n ): types.LiveClientMessage {\n let clientMessage: types.LiveClientMessage = {};\n if (!('media' in params) || !params.media) {\n throw new Error(\n `Failed to convert realtime input \"media\", type: '${typeof params.media}'`,\n );\n }\n\n // LiveClientRealtimeInput\n clientMessage = {\n realtimeInput: {\n mediaChunks: [params.media],\n activityStart: params.activityStart,\n activityEnd: params.activityEnd,\n },\n };\n return clientMessage;\n }\n\n private tLiveClienttToolResponse(\n apiClient: ApiClient,\n params: types.LiveSendToolResponseParameters,\n ): types.LiveClientMessage {\n let functionResponses: types.FunctionResponse[] = [];\n\n if (params.functionResponses == null) {\n throw new Error('functionResponses is required.');\n }\n\n if (!Array.isArray(params.functionResponses)) {\n functionResponses = [params.functionResponses];\n } else {\n functionResponses = params.functionResponses;\n }\n\n if (functionResponses.length === 0) {\n throw new Error('functionResponses is required.');\n }\n\n for (const functionResponse of functionResponses) {\n if (\n typeof functionResponse !== 'object' ||\n functionResponse === null ||\n !('name' in functionResponse) ||\n !('response' in functionResponse)\n ) {\n throw new Error(\n `Could not parse function response, type '${typeof functionResponse}'.`,\n );\n }\n if (!apiClient.isVertexAI() && !('id' in functionResponse)) {\n throw new Error(FUNCTION_RESPONSE_REQUIRES_ID);\n }\n }\n\n const clientMessage: types.LiveClientMessage = {\n toolResponse: {functionResponses: functionResponses},\n };\n return clientMessage;\n }\n\n /**\n Send a message over the established connection.\n\n @param params - Contains two **optional** properties, `turns` and\n `turnComplete`.\n\n - `turns` will be converted to a `Content[]`\n - `turnComplete: true` [default] indicates that you are done sending\n content and expect a response. If `turnComplete: false`, the server\n will wait for additional messages before starting generation.\n\n @experimental\n\n @remarks\n There are two ways to send messages to the live API:\n `sendClientContent` and `sendRealtimeInput`.\n\n `sendClientContent` messages are added to the model context **in order**.\n Having a conversation using `sendClientContent` messages is roughly\n equivalent to using the `Chat.sendMessageStream`, except that the state of\n the `chat` history is stored on the API server instead of locally.\n\n Because of `sendClientContent`'s order guarantee, the model cannot respons\n as quickly to `sendClientContent` messages as to `sendRealtimeInput`\n messages. This makes the biggest difference when sending objects that have\n significant preprocessing time (typically images).\n\n The `sendClientContent` message sends a `Content[]`\n which has more options than the `Blob` sent by `sendRealtimeInput`.\n\n So the main use-cases for `sendClientContent` over `sendRealtimeInput` are:\n\n - Sending anything that can't be represented as a `Blob` (text,\n `sendClientContent({turns=\"Hello?\"}`)).\n - Managing turns when not using audio input and voice activity detection.\n (`sendClientContent({turnComplete:true})` or the short form\n `sendClientContent()`)\n - Prefilling a conversation context\n ```\n sendClientContent({\n turns: [\n Content({role:user, parts:...}),\n Content({role:user, parts:...}),\n ...\n ]\n })\n ```\n @experimental\n */\n sendClientContent(params: types.LiveSendClientContentParameters) {\n params = {\n ...defaultLiveSendClientContentParamerters,\n ...params,\n };\n\n const clientMessage: types.LiveClientMessage = this.tLiveClientContent(\n this.apiClient,\n params,\n );\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Send a realtime message over the established connection.\n\n @param params - Contains one property, `media`.\n\n - `media` will be converted to a `Blob`\n\n @experimental\n\n @remarks\n Use `sendRealtimeInput` for realtime audio chunks and video frames (images).\n\n With `sendRealtimeInput` the api will respond to audio automatically\n based on voice activity detection (VAD).\n\n `sendRealtimeInput` is optimized for responsivness at the expense of\n deterministic ordering guarantees. Audio and video tokens are to the\n context when they become available.\n\n Note: The Call signature expects a `Blob` object, but only a subset\n of audio and image mimetypes are allowed.\n */\n sendRealtimeInput(params: types.LiveSendRealtimeInputParameters) {\n if (params.media == null) {\n throw new Error('Media is required.');\n }\n\n const clientMessage: types.LiveClientMessage =\n this.tLiveClientRealtimeInput(this.apiClient, params);\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Send a function response message over the established connection.\n\n @param params - Contains property `functionResponses`.\n\n - `functionResponses` will be converted to a `functionResponses[]`\n\n @remarks\n Use `sendFunctionResponse` to reply to `LiveServerToolCall` from the server.\n\n Use {@link types.LiveConnectConfig#tools} to configure the callable functions.\n\n @experimental\n */\n sendToolResponse(params: types.LiveSendToolResponseParameters) {\n if (params.functionResponses == null) {\n throw new Error('Tool response parameters are required.');\n }\n\n const clientMessage: types.LiveClientMessage =\n this.tLiveClienttToolResponse(this.apiClient, params);\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Terminates the WebSocket connection.\n\n @experimental\n\n @example\n ```ts\n const session = await ai.live.connect({\n model: 'gemini-2.0-flash-exp',\n config: {\n responseModalities: [Modality.AUDIO],\n }\n });\n\n session.close();\n ```\n */\n close() {\n this.conn.close();\n }\n}\n\n// Converts an headers object to a \"map\" object as expected by the WebSocket\n// constructor. We use this as the Auth interface works with Headers objects\n// while the WebSocket constructor takes a map.\nfunction headersToMap(headers: Headers): Record {\n const headerMap: Record = {};\n headers.forEach((value, key) => {\n headerMap[key] = value;\n });\n return headerMap;\n}\n\n// Converts a \"map\" object to a headers object. We use this as the Auth\n// interface works with Headers objects while the API client default headers\n// returns a map.\nfunction mapToHeaders(map: Record): Headers {\n const headers = new Headers();\n for (const [key, value] of Object.entries(map)) {\n headers.append(key, value);\n }\n return headers;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_models_converters';\nimport * as types from './types';\n\nexport class Models extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Makes an API request to generate content with a given model.\n *\n * For the `model` parameter, supported formats for Vertex AI API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The full resource name starts with 'projects/', for example:\n * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'\n * - The partial resource name with 'publishers/', for example:\n * 'publishers/google/models/gemini-2.0-flash' or\n * 'publishers/meta/models/llama-3.1-405b-instruct-maas'\n * - `/` separated publisher and model name, for example:\n * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas'\n *\n * For the `model` parameter, supported formats for Gemini API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The model name starts with 'models/', for example:\n * 'models/gemini-2.0-flash'\n * - For tuned models, the model name starts with 'tunedModels/',\n * for example:\n * 'tunedModels/1234567890123456789'\n *\n * Some models support multimodal input and output.\n *\n * @param params - The parameters for generating content.\n * @return The response from generating content.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents: 'why is the sky blue?',\n * config: {\n * candidateCount: 2,\n * }\n * });\n * console.log(response);\n * ```\n */\n generateContent = async (\n params: types.GenerateContentParameters,\n ): Promise => {\n return await this.generateContentInternal(params);\n };\n\n /**\n * Makes an API request to generate content with a given model and yields the\n * response in chunks.\n *\n * For the `model` parameter, supported formats for Vertex AI API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The full resource name starts with 'projects/', for example:\n * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'\n * - The partial resource name with 'publishers/', for example:\n * 'publishers/google/models/gemini-2.0-flash' or\n * 'publishers/meta/models/llama-3.1-405b-instruct-maas'\n * - `/` separated publisher and model name, for example:\n * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas'\n *\n * For the `model` parameter, supported formats for Gemini API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The model name starts with 'models/', for example:\n * 'models/gemini-2.0-flash'\n * - For tuned models, the model name starts with 'tunedModels/',\n * for example:\n * 'tunedModels/1234567890123456789'\n *\n * Some models support multimodal input and output.\n *\n * @param params - The parameters for generating content with streaming response.\n * @return The response from generating content.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContentStream({\n * model: 'gemini-2.0-flash',\n * contents: 'why is the sky blue?',\n * config: {\n * maxOutputTokens: 200,\n * }\n * });\n * for await (const chunk of response) {\n * console.log(chunk);\n * }\n * ```\n */\n generateContentStream = async (\n params: types.GenerateContentParameters,\n ): Promise> => {\n return await this.generateContentStreamInternal(params);\n };\n\n /**\n * Generates an image based on a text description and configuration.\n *\n * @param model - The model to use.\n * @param prompt - A text description of the image to generate.\n * @param [config] - The config for image generation.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await client.models.generateImages({\n * model: 'imagen-3.0-generate-002',\n * prompt: 'Robot holding a red skateboard',\n * config: {\n * numberOfImages: 1,\n * includeRaiReason: true,\n * },\n * });\n * console.log(response?.generatedImages?.[0]?.image?.imageBytes);\n * ```\n */\n generateImages = async (\n params: types.GenerateImagesParameters,\n ): Promise => {\n return await this.generateImagesInternal(params).then((apiResponse) => {\n let positivePromptSafetyAttributes;\n const generatedImages = [];\n\n if (apiResponse?.generatedImages) {\n for (const generatedImage of apiResponse.generatedImages) {\n if (\n generatedImage &&\n generatedImage?.safetyAttributes &&\n generatedImage?.safetyAttributes?.contentType === 'Positive Prompt'\n ) {\n positivePromptSafetyAttributes = generatedImage?.safetyAttributes;\n } else {\n generatedImages.push(generatedImage);\n }\n }\n }\n let response: types.GenerateImagesResponse;\n\n if (positivePromptSafetyAttributes) {\n response = {\n generatedImages: generatedImages,\n positivePromptSafetyAttributes: positivePromptSafetyAttributes,\n };\n } else {\n response = {\n generatedImages: generatedImages,\n };\n }\n return response;\n });\n };\n\n private async generateContentInternal(\n params: types.GenerateContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:generateContent',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateContentResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.generateContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:generateContent',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateContentResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n private async generateContentStreamInternal(\n params: types.GenerateContentParameters,\n ): Promise> {\n let response: Promise>;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:streamGenerateContent?alt=sse',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n const apiClient = this.apiClient;\n response = apiClient.requestStream({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n }) as Promise>;\n\n return response.then(async function* (\n apiResponse: AsyncGenerator,\n ) {\n for await (const chunk of apiResponse) {\n const resp = converters.generateContentResponseFromVertex(\n apiClient,\n chunk,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n yield typedResp;\n }\n });\n } else {\n const body = converters.generateContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:streamGenerateContent?alt=sse',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n const apiClient = this.apiClient;\n response = apiClient.requestStream({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n }) as Promise>;\n\n return response.then(async function* (\n apiResponse: AsyncGenerator,\n ) {\n for await (const chunk of apiResponse) {\n const resp = converters.generateContentResponseFromMldev(\n apiClient,\n chunk,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n yield typedResp;\n }\n });\n }\n }\n\n /**\n * Calculates embeddings for the given contents. Only text is supported.\n *\n * @param params - The parameters for embedding contents.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.embedContent({\n * model: 'text-embedding-004',\n * contents: [\n * 'What is your name?',\n * 'What is your favorite color?',\n * ],\n * config: {\n * outputDimensionality: 64,\n * },\n * });\n * console.log(response);\n * ```\n */\n async embedContent(\n params: types.EmbedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.embedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.embedContentResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.EmbedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.embedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:batchEmbedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.embedContentResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.EmbedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Generates an image based on a text description and configuration.\n *\n * @param params - The parameters for generating images.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateImages({\n * model: 'imagen-3.0-generate-002',\n * prompt: 'Robot holding a red skateboard',\n * config: {\n * numberOfImages: 1,\n * includeRaiReason: true,\n * },\n * });\n * console.log(response?.generatedImages?.[0]?.image?.imageBytes);\n * ```\n */\n private async generateImagesInternal(\n params: types.GenerateImagesParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateImagesParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateImagesResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateImagesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.generateImagesParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateImagesResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateImagesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Fetches information about a model by name.\n *\n * @example\n * ```ts\n * const modelInfo = await ai.models.get({model: 'gemini-2.0-flash'});\n * ```\n */\n async get(params: types.GetModelParameters): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getModelParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.modelFromVertex(this.apiClient, apiResponse);\n\n return resp as types.Model;\n });\n } else {\n const body = converters.getModelParametersToMldev(this.apiClient, params);\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.modelFromMldev(this.apiClient, apiResponse);\n\n return resp as types.Model;\n });\n }\n }\n\n /**\n * Counts the number of tokens in the given contents. Multimodal input is\n * supported for Gemini models.\n *\n * @param params - The parameters for counting tokens.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.countTokens({\n * model: 'gemini-2.0-flash',\n * contents: 'The quick brown fox jumps over the lazy dog.'\n * });\n * console.log(response);\n * ```\n */\n async countTokens(\n params: types.CountTokensParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.countTokensParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:countTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.countTokensResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.CountTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.countTokensParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:countTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.countTokensResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.CountTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Given a list of contents, returns a corresponding TokensInfo containing\n * the list of tokens and list of token ids.\n *\n * This method is not supported by the Gemini Developer API.\n *\n * @param params - The parameters for computing tokens.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.computeTokens({\n * model: 'gemini-2.0-flash',\n * contents: 'What is your name?'\n * });\n * console.log(response);\n * ```\n */\n async computeTokens(\n params: types.ComputeTokensParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.computeTokensParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:computeTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.computeTokensResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ComputeTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n throw new Error('This method is only supported by the Vertex AI.');\n }\n }\n\n /**\n * Generates videos based on a text description and configuration.\n *\n * @param params - The parameters for generating videos.\n * @return A Promise which allows you to track the progress and eventually retrieve the generated videos using the operations.get method.\n *\n * @example\n * ```ts\n * const operation = await ai.models.generateVideos({\n * model: 'veo-2.0-generate-001',\n * prompt: 'A neon hologram of a cat driving at top speed',\n * config: {\n * numberOfVideos: 1\n * });\n *\n * while (!operation.done) {\n * await new Promise(resolve => setTimeout(resolve, 10000));\n * operation = await ai.operations.getVideosOperation({operation: operation});\n * }\n *\n * console.log(operation.response?.generatedVideos?.[0]?.video?.uri);\n * ```\n */\n\n async generateVideos(\n params: types.GenerateVideosParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateVideosParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predictLongRunning',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n const body = converters.generateVideosParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predictLongRunning',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function getOperationParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'operationName'],\n fromOperationName,\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function getOperationParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'operationName'],\n fromOperationName,\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function fetchPredictOperationParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.FetchPredictOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(toObject, ['operationName'], fromOperationName);\n }\n\n const fromResourceName = common.getValueByPath(fromObject, ['resourceName']);\n if (fromResourceName != null) {\n common.setValueByPath(toObject, ['_url', 'resourceName'], fromResourceName);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function videoFromMldev(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['video', 'uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'video',\n 'encodedVideo',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['encoding']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromMldev(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, [\n 'generatedSamples',\n ]);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromMldev(apiClient, fromResponse),\n );\n }\n\n const fromResult = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResult != null) {\n common.setValueByPath(\n toObject,\n ['result'],\n generateVideosResponseFromMldev(apiClient, fromResult),\n );\n }\n\n return toObject;\n}\n\nexport function videoFromVertex(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromVertex(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, ['videos']);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromVertex(apiClient, fromResponse),\n );\n }\n\n const fromResult = common.getValueByPath(fromObject, ['response']);\n if (fromResult != null) {\n common.setValueByPath(\n toObject,\n ['result'],\n generateVideosResponseFromVertex(apiClient, fromResult),\n );\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_operations_converters';\nimport * as types from './types';\n\nexport class Operations extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Gets the status of a long-running operation.\n *\n * @param parameters The parameters for the get operation request.\n * @return The updated Operation object, with the latest status or result.\n */\n async getVideosOperation(\n parameters: types.OperationGetParameters,\n ): Promise {\n const operation = parameters.operation;\n const config = parameters.config;\n\n if (operation.name === undefined || operation.name === '') {\n throw new Error('Operation name is required.');\n }\n\n if (this.apiClient.isVertexAI()) {\n const resourceName = operation.name.split('/operations/')[0];\n var httpOptions: types.HttpOptions | undefined = undefined;\n\n if (config && 'httpOptions' in config) {\n httpOptions = config.httpOptions;\n }\n\n return this.fetchPredictVideosOperationInternal({\n operationName: operation.name,\n resourceName: resourceName,\n config: {httpOptions: httpOptions},\n });\n } else {\n return this.getVideosOperationInternal({\n operationName: operation.name,\n config: config,\n });\n }\n }\n\n private async getVideosOperationInternal(\n params: types.GetOperationParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getOperationParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{operationName}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n const body = converters.getOperationParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{operationName}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n }\n }\n\n private async fetchPredictVideosOperationInternal(\n params: types.FetchPredictOperationParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.fetchPredictOperationParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{resourceName}:fetchPredictOperation',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n throw new Error('This method is only supported by the Vertex AI.');\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {Auth} from './_auth';\nimport * as common from './_common';\nimport {Uploader} from './_uploader';\nimport {File, HttpOptions, HttpResponse, UploadFileConfig} from './types';\n\nconst CONTENT_TYPE_HEADER = 'Content-Type';\nconst SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';\nconst USER_AGENT_HEADER = 'User-Agent';\nconst GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';\nexport const SDK_VERSION = '0.8.0'; // x-release-please-version\nconst LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;\nconst VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';\nconst GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';\nconst responseLineRE = /^data: (.*)(?:\\n\\n|\\r\\r|\\r\\n\\r\\n)/;\n\n/**\n * Client errors raised by the GenAI API.\n */\nexport class ClientError extends Error {\n constructor(message: string, stackTrace?: string) {\n if (stackTrace) {\n super(message, {cause: stackTrace});\n } else {\n super(message, {cause: new Error().stack});\n }\n this.message = message;\n this.name = 'ClientError';\n }\n}\n\n/**\n * Server errors raised by the GenAI API.\n */\nexport class ServerError extends Error {\n constructor(message: string, stackTrace?: string) {\n if (stackTrace) {\n super(message, {cause: stackTrace});\n } else {\n super(message, {cause: new Error().stack});\n }\n this.message = message;\n this.name = 'ServerError';\n }\n}\n\n/**\n * Options for initializing the ApiClient. The ApiClient uses the parameters\n * for authentication purposes as well as to infer if SDK should send the\n * request to Vertex AI or Gemini API.\n */\nexport interface ApiClientInitOptions {\n /**\n * The object used for adding authentication headers to API requests.\n */\n auth: Auth;\n /**\n * The uploader to use for uploading files. This field is required for\n * creating a client, will be set through the Node_client or Web_client.\n */\n uploader: Uploader;\n /**\n * Optional. The Google Cloud project ID for Vertex AI users.\n * It is not the numeric project name.\n * If not provided, SDK will try to resolve it from runtime environment.\n */\n project?: string;\n /**\n * Optional. The Google Cloud project location for Vertex AI users.\n * If not provided, SDK will try to resolve it from runtime environment.\n */\n location?: string;\n /**\n * The API Key. This is required for Gemini API users.\n */\n apiKey?: string;\n /**\n * Optional. Set to true if you intend to call Vertex AI endpoints.\n * If unset, default SDK behavior is to call Gemini API.\n */\n vertexai?: boolean;\n /**\n * Optional. The API version for the endpoint.\n * If unset, SDK will choose a default api version.\n */\n apiVersion?: string;\n /**\n * Optional. A set of customizable configuration for HTTP requests.\n */\n httpOptions?: HttpOptions;\n /**\n * Optional. An extra string to append at the end of the User-Agent header.\n *\n * This can be used to e.g specify the runtime and its version.\n */\n userAgentExtra?: string;\n}\n\n/**\n * Represents the necessary information to send a request to an API endpoint.\n * This interface defines the structure for constructing and executing HTTP\n * requests.\n */\nexport interface HttpRequest {\n /**\n * URL path from the modules, this path is appended to the base API URL to\n * form the complete request URL.\n *\n * If you wish to set full URL, use httpOptions.baseUrl instead. Example to\n * set full URL in the request:\n *\n * const request: HttpRequest = {\n * path: '',\n * httpOptions: {\n * baseUrl: 'https://',\n * apiVersion: '',\n * },\n * httpMethod: 'GET',\n * };\n *\n * The result URL will be: https://\n *\n */\n path: string;\n /**\n * Optional query parameters to be appended to the request URL.\n */\n queryParams?: Record;\n /**\n * Optional request body in json string or Blob format, GET request doesn't\n * need a request body.\n */\n body?: string | Blob;\n /**\n * The HTTP method to be used for the request.\n */\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE';\n /**\n * Optional set of customizable configuration for HTTP requests.\n */\n httpOptions?: HttpOptions;\n}\n\n/**\n * The ApiClient class is used to send requests to the Gemini API or Vertex AI\n * endpoints.\n */\nexport class ApiClient {\n readonly clientOptions: ApiClientInitOptions;\n\n constructor(opts: ApiClientInitOptions) {\n this.clientOptions = {\n ...opts,\n project: opts.project,\n location: opts.location,\n apiKey: opts.apiKey,\n vertexai: opts.vertexai,\n };\n\n const initHttpOptions: HttpOptions = {};\n\n if (this.clientOptions.vertexai) {\n initHttpOptions.apiVersion =\n this.clientOptions.apiVersion ?? VERTEX_AI_API_DEFAULT_VERSION;\n // Assume that proj/api key validation occurs before they are passed in.\n if (this.getProject() || this.getLocation()) {\n initHttpOptions.baseUrl = `https://${this.clientOptions.location}-aiplatform.googleapis.com/`;\n this.clientOptions.apiKey = undefined; // unset API key.\n } else {\n initHttpOptions.baseUrl = `https://aiplatform.googleapis.com/`;\n this.clientOptions.project = undefined; // unset project.\n this.clientOptions.location = undefined; // unset location.\n }\n } else {\n initHttpOptions.apiVersion =\n this.clientOptions.apiVersion ?? GOOGLE_AI_API_DEFAULT_VERSION;\n initHttpOptions.baseUrl = `https://generativelanguage.googleapis.com/`;\n }\n\n initHttpOptions.headers = this.getDefaultHeaders();\n\n this.clientOptions.httpOptions = initHttpOptions;\n\n if (opts.httpOptions) {\n this.clientOptions.httpOptions = this.patchHttpOptions(\n initHttpOptions,\n opts.httpOptions,\n );\n }\n }\n\n isVertexAI(): boolean {\n return this.clientOptions.vertexai ?? false;\n }\n\n getProject() {\n return this.clientOptions.project;\n }\n\n getLocation() {\n return this.clientOptions.location;\n }\n\n getApiVersion() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.apiVersion !== undefined\n ) {\n return this.clientOptions.httpOptions.apiVersion;\n }\n throw new Error('API version is not set.');\n }\n\n getBaseUrl() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.baseUrl !== undefined\n ) {\n return this.clientOptions.httpOptions.baseUrl;\n }\n throw new Error('Base URL is not set.');\n }\n\n getRequestUrl() {\n return this.getRequestUrlInternal(this.clientOptions.httpOptions);\n }\n\n getHeaders() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.headers !== undefined\n ) {\n return this.clientOptions.httpOptions.headers;\n } else {\n throw new Error('Headers are not set.');\n }\n }\n\n private getRequestUrlInternal(httpOptions?: HttpOptions) {\n if (\n !httpOptions ||\n httpOptions.baseUrl === undefined ||\n httpOptions.apiVersion === undefined\n ) {\n throw new Error('HTTP options are not correctly set.');\n }\n const baseUrl = httpOptions.baseUrl.endsWith('/')\n ? httpOptions.baseUrl.slice(0, -1)\n : httpOptions.baseUrl;\n const urlElement: Array = [baseUrl];\n if (httpOptions.apiVersion && httpOptions.apiVersion !== '') {\n urlElement.push(httpOptions.apiVersion);\n }\n return urlElement.join('/');\n }\n\n getBaseResourcePath() {\n return `projects/${this.clientOptions.project}/locations/${\n this.clientOptions.location\n }`;\n }\n\n getApiKey() {\n return this.clientOptions.apiKey;\n }\n\n getWebsocketBaseUrl() {\n const baseUrl = this.getBaseUrl();\n const urlParts = new URL(baseUrl);\n urlParts.protocol = 'wss';\n return urlParts.toString();\n }\n\n setBaseUrl(url: string) {\n if (this.clientOptions.httpOptions) {\n this.clientOptions.httpOptions.baseUrl = url;\n } else {\n throw new Error('HTTP options are not correctly set.');\n }\n }\n\n private constructUrl(\n path: string,\n httpOptions: HttpOptions,\n prependProjectLocation: boolean,\n ): URL {\n const urlElement: Array = [this.getRequestUrlInternal(httpOptions)];\n if (prependProjectLocation) {\n urlElement.push(this.getBaseResourcePath());\n }\n if (path !== '') {\n urlElement.push(path);\n }\n const url = new URL(`${urlElement.join('/')}`);\n\n return url;\n }\n\n private shouldPrependVertexProjectPath(request: HttpRequest): boolean {\n if (this.clientOptions.apiKey) {\n return false;\n }\n if (!this.clientOptions.vertexai) {\n return false;\n }\n if (request.path.startsWith('projects/')) {\n // Assume the path already starts with\n // `projects//location/`.\n return false;\n }\n if (\n request.httpMethod === 'GET' &&\n request.path.startsWith('publishers/google/models')\n ) {\n // These paths are used by Vertex's models.get and models.list\n // calls. For base models Vertex does not accept a project/location\n // prefix (for tuned model the prefix is required).\n return false;\n }\n return true;\n }\n\n async request(request: HttpRequest): Promise {\n let patchedHttpOptions = this.clientOptions.httpOptions!;\n if (request.httpOptions) {\n patchedHttpOptions = this.patchHttpOptions(\n this.clientOptions.httpOptions!,\n request.httpOptions,\n );\n }\n\n const prependProjectLocation = this.shouldPrependVertexProjectPath(request);\n const url = this.constructUrl(\n request.path,\n patchedHttpOptions,\n prependProjectLocation,\n );\n if (request.queryParams) {\n for (const [key, value] of Object.entries(request.queryParams)) {\n url.searchParams.append(key, String(value));\n }\n }\n let requestInit: RequestInit = {};\n if (request.httpMethod === 'GET') {\n if (request.body && request.body !== '{}') {\n throw new Error(\n 'Request body should be empty for GET request, but got non empty request body',\n );\n }\n } else {\n requestInit.body = request.body;\n }\n requestInit = await this.includeExtraHttpOptionsToRequestInit(\n requestInit,\n patchedHttpOptions,\n );\n return this.unaryApiCall(url, requestInit, request.httpMethod);\n }\n\n private patchHttpOptions(\n baseHttpOptions: HttpOptions,\n requestHttpOptions: HttpOptions,\n ): HttpOptions {\n const patchedHttpOptions = JSON.parse(\n JSON.stringify(baseHttpOptions),\n ) as HttpOptions;\n\n for (const [key, value] of Object.entries(requestHttpOptions)) {\n // Records compile to objects.\n if (typeof value === 'object') {\n // @ts-expect-error TS2345TS7053: Element implicitly has an 'any' type\n // because expression of type 'string' can't be used to index type\n // 'HttpOptions'.\n patchedHttpOptions[key] = {...patchedHttpOptions[key], ...value};\n } else if (value !== undefined) {\n // @ts-expect-error TS2345TS7053: Element implicitly has an 'any' type\n // because expression of type 'string' can't be used to index type\n // 'HttpOptions'.\n patchedHttpOptions[key] = value;\n }\n }\n return patchedHttpOptions;\n }\n\n async requestStream(\n request: HttpRequest,\n // TODO: b/407059430 - Replace with HttpResponse.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): Promise {\n let patchedHttpOptions = this.clientOptions.httpOptions!;\n if (request.httpOptions) {\n patchedHttpOptions = this.patchHttpOptions(\n this.clientOptions.httpOptions!,\n request.httpOptions,\n );\n }\n\n const prependProjectLocation = this.shouldPrependVertexProjectPath(request);\n const url = this.constructUrl(\n request.path,\n patchedHttpOptions,\n prependProjectLocation,\n );\n if (!url.searchParams.has('alt') || url.searchParams.get('alt') !== 'sse') {\n url.searchParams.set('alt', 'sse');\n }\n let requestInit: RequestInit = {};\n requestInit.body = request.body;\n requestInit = await this.includeExtraHttpOptionsToRequestInit(\n requestInit,\n patchedHttpOptions,\n );\n return this.streamApiCall(url, requestInit, request.httpMethod);\n }\n\n private async includeExtraHttpOptionsToRequestInit(\n requestInit: RequestInit,\n httpOptions: HttpOptions,\n ): Promise {\n if (httpOptions && httpOptions.timeout && httpOptions.timeout > 0) {\n const abortController = new AbortController();\n const signal = abortController.signal;\n setTimeout(() => abortController.abort(), httpOptions.timeout);\n requestInit.signal = signal;\n }\n requestInit.headers = await this.getHeadersInternal(httpOptions);\n return requestInit;\n }\n\n private async unaryApiCall(\n url: URL,\n requestInit: RequestInit,\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE',\n ): Promise {\n return this.apiCall(url.toString(), {\n ...requestInit,\n method: httpMethod,\n })\n .then(async (response) => {\n await throwErrorIfNotOK(response);\n return new HttpResponse(response);\n })\n .catch((e) => {\n if (e instanceof Error) {\n throw e;\n } else {\n throw new Error(JSON.stringify(e));\n }\n });\n }\n\n private async streamApiCall(\n url: URL,\n requestInit: RequestInit,\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE',\n // TODO: b/407059430 - Replace with HttpResponse.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): Promise> {\n return this.apiCall(url.toString(), {\n ...requestInit,\n method: httpMethod,\n })\n .then(async (response) => {\n await throwErrorIfNotOK(response);\n return this.processStreamResponse(response);\n })\n .catch((e) => {\n if (e instanceof Error) {\n throw e;\n } else {\n throw new Error(JSON.stringify(e));\n }\n });\n }\n\n async *processStreamResponse(\n response: Response,\n // TODO: b/407059430 - Replace with HttpResponse.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): AsyncGenerator {\n const reader = response?.body?.getReader();\n const decoder = new TextDecoder('utf-8');\n if (!reader) {\n throw new Error('Response body is empty');\n }\n\n try {\n let buffer = '';\n while (true) {\n const {done, value} = await reader.read();\n if (done) {\n if (buffer.trim().length > 0) {\n throw new Error('Incomplete JSON segment at the end');\n }\n break;\n }\n const chunkString = decoder.decode(value);\n buffer += chunkString;\n let match = buffer.match(responseLineRE);\n while (match) {\n const processedChunkString = match[1];\n try {\n const chunkData = JSON.parse(processedChunkString);\n yield chunkData;\n buffer = buffer.slice(match[0].length);\n match = buffer.match(responseLineRE);\n } catch (e) {\n throw new Error(\n `exception parsing stream chunk ${processedChunkString}. ${e}`,\n );\n }\n }\n }\n } finally {\n reader.releaseLock();\n }\n }\n private async apiCall(\n url: string,\n requestInit: RequestInit,\n ): Promise {\n return fetch(url, requestInit).catch((e) => {\n throw new Error(`exception ${e} sending request`);\n });\n }\n\n getDefaultHeaders(): Record {\n const headers: Record = {};\n\n const versionHeaderValue =\n LIBRARY_LABEL + ' ' + this.clientOptions.userAgentExtra;\n\n headers[USER_AGENT_HEADER] = versionHeaderValue;\n headers[GOOGLE_API_CLIENT_HEADER] = versionHeaderValue;\n headers[CONTENT_TYPE_HEADER] = 'application/json';\n\n return headers;\n }\n\n private async getHeadersInternal(\n httpOptions: HttpOptions | undefined,\n ): Promise {\n const headers = new Headers();\n if (httpOptions && httpOptions.headers) {\n for (const [key, value] of Object.entries(httpOptions.headers)) {\n headers.append(key, value);\n }\n // Append a timeout header if it is set, note that the timeout option is\n // in milliseconds but the header is in seconds.\n if (httpOptions.timeout && httpOptions.timeout > 0) {\n headers.append(\n SERVER_TIMEOUT_HEADER,\n String(Math.ceil(httpOptions.timeout / 1000)),\n );\n }\n }\n await this.clientOptions.auth.addAuthHeaders(headers);\n return headers;\n }\n\n /**\n * Uploads a file asynchronously using Gemini API only, this is not supported\n * in Vertex AI.\n *\n * @param file The string path to the file to be uploaded or a Blob object.\n * @param config Optional parameters specified in the `UploadFileConfig`\n * interface. @see {@link UploadFileConfig}\n * @return A promise that resolves to a `File` object.\n * @throws An error if called on a Vertex AI client.\n * @throws An error if the `mimeType` is not provided and can not be inferred,\n */\n async uploadFile(\n file: string | Blob,\n config?: UploadFileConfig,\n ): Promise {\n const fileToUpload: File = {};\n if (config != null) {\n fileToUpload.mimeType = config.mimeType;\n fileToUpload.name = config.name;\n fileToUpload.displayName = config.displayName;\n }\n\n if (fileToUpload.name && !fileToUpload.name.startsWith('files/')) {\n fileToUpload.name = `files/${fileToUpload.name}`;\n }\n\n const uploader = this.clientOptions.uploader;\n const fileStat = await uploader.stat(file);\n fileToUpload.sizeBytes = String(fileStat.size);\n const mimeType = config?.mimeType ?? fileStat.type;\n if (mimeType === undefined || mimeType === '') {\n throw new Error(\n 'Can not determine mimeType. Please provide mimeType in the config.',\n );\n }\n fileToUpload.mimeType = mimeType;\n\n const uploadUrl = await this.fetchUploadUrl(fileToUpload, config);\n return uploader.upload(file, uploadUrl, this);\n }\n\n private async fetchUploadUrl(\n file: File,\n config?: UploadFileConfig,\n ): Promise {\n let httpOptions: HttpOptions = {};\n if (config?.httpOptions) {\n httpOptions = config.httpOptions;\n } else {\n httpOptions = {\n apiVersion: '', // api-version is set in the path.\n headers: {\n 'Content-Type': 'application/json',\n 'X-Goog-Upload-Protocol': 'resumable',\n 'X-Goog-Upload-Command': 'start',\n 'X-Goog-Upload-Header-Content-Length': `${file.sizeBytes}`,\n 'X-Goog-Upload-Header-Content-Type': `${file.mimeType}`,\n },\n };\n }\n\n const body: Record = {\n 'file': file,\n };\n const httpResponse = await this.request({\n path: common.formatMap(\n 'upload/v1beta/files',\n body['_url'] as Record,\n ),\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions,\n });\n\n if (!httpResponse || !httpResponse?.headers) {\n throw new Error(\n 'Server did not return an HttpResponse or the returned HttpResponse did not have headers.',\n );\n }\n\n const uploadUrl: string | undefined =\n httpResponse?.headers?.['x-goog-upload-url'];\n if (uploadUrl === undefined) {\n throw new Error(\n 'Failed to get upload url. Server did not return the x-google-upload-url in the headers',\n );\n }\n return uploadUrl;\n }\n}\n\nasync function throwErrorIfNotOK(response: Response | undefined) {\n if (response === undefined) {\n throw new ServerError('response is undefined');\n }\n if (!response.ok) {\n const status: number = response.status;\n const statusText: string = response.statusText;\n let errorBody: Record;\n if (response.headers.get('content-type')?.includes('application/json')) {\n errorBody = await response.json();\n } else {\n errorBody = {\n error: {\n message: 'exception parsing response',\n code: response.status,\n status: response.statusText,\n },\n };\n }\n const errorMessage = `got status: ${status} ${statusText}. ${JSON.stringify(\n errorBody,\n )}`;\n if (status >= 400 && status < 500) {\n const clientError = new ClientError(errorMessage);\n throw clientError;\n } else if (status >= 500 && status < 600) {\n const serverError = new ServerError(errorMessage);\n throw serverError;\n }\n throw new Error(errorMessage);\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {ApiClient} from '../_api_client';\nimport {FileStat, Uploader} from '../_uploader';\nimport {File, HttpResponse} from '../types';\n\nimport {crossError} from './_cross_error';\n\nexport const MAX_CHUNK_SIZE = 1024 * 1024 * 8; // bytes\nexport class CrossUploader implements Uploader {\n async upload(\n file: string | Blob,\n uploadUrl: string,\n apiClient: ApiClient,\n ): Promise {\n if (typeof file === 'string') {\n throw crossError();\n } else {\n return uploadBlob(file, uploadUrl, apiClient);\n }\n }\n\n async stat(file: string | Blob): Promise {\n if (typeof file === 'string') {\n throw crossError();\n } else {\n return getBlobStat(file);\n }\n }\n}\n\nexport async function uploadBlob(\n file: Blob,\n uploadUrl: string,\n apiClient: ApiClient,\n): Promise {\n let fileSize = 0;\n let offset = 0;\n let response: HttpResponse = new HttpResponse(new Response());\n let uploadCommand = 'upload';\n fileSize = file.size;\n while (offset < fileSize) {\n const chunkSize = Math.min(MAX_CHUNK_SIZE, fileSize - offset);\n const chunk = file.slice(offset, offset + chunkSize);\n if (offset + chunkSize >= fileSize) {\n uploadCommand += ', finalize';\n }\n response = await apiClient.request({\n path: '',\n body: chunk,\n httpMethod: 'POST',\n httpOptions: {\n apiVersion: '',\n baseUrl: uploadUrl,\n headers: {\n 'X-Goog-Upload-Command': uploadCommand,\n 'X-Goog-Upload-Offset': String(offset),\n 'Content-Length': String(chunkSize),\n },\n },\n });\n offset += chunkSize;\n // The `x-goog-upload-status` header field can be `active`, `final` and\n //`cancelled` in resposne.\n if (response?.headers?.['x-goog-upload-status'] !== 'active') {\n break;\n }\n // TODO(b/401391430) Investigate why the upload status is not finalized\n // even though all content has been uploaded.\n if (fileSize <= offset) {\n throw new Error(\n 'All content has been uploaded, but the upload status is not finalized.',\n );\n }\n }\n const responseJson = (await response?.json()) as Record<\n string,\n File | unknown\n >;\n if (response?.headers?.['x-goog-upload-status'] !== 'final') {\n throw new Error('Failed to upload file: Upload status is not finalized.');\n }\n return responseJson['file'] as File;\n}\n\nexport async function getBlobStat(file: Blob): Promise {\n const fileStat: FileStat = {size: file.size, type: file.type};\n return fileStat;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {ApiClient} from '../_api_client';\nimport {FileStat, Uploader} from '../_uploader';\nimport {getBlobStat, uploadBlob} from '../cross/_cross_uploader';\nimport {File} from '../types';\n\nexport class BrowserUploader implements Uploader {\n async upload(\n file: string | Blob,\n uploadUrl: string,\n apiClient: ApiClient,\n ): Promise {\n if (typeof file === 'string') {\n throw new Error('File path is not supported in browser uploader.');\n }\n\n return await uploadBlob(file, uploadUrl, apiClient);\n }\n\n async stat(file: string | Blob): Promise {\n if (typeof file === 'string') {\n throw new Error('File path is not supported in browser uploader.');\n } else {\n return await getBlobStat(file);\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n WebSocketCallbacks,\n WebSocketFactory,\n WebSocket as Ws,\n} from '../_websocket';\n\n// TODO((b/401271082): re-enable lint once BrowserWebSocketFactory is\n// implemented.\n/* eslint-disable @typescript-eslint/no-unused-vars */\nexport class BrowserWebSocketFactory implements WebSocketFactory {\n create(\n url: string,\n headers: Record,\n callbacks: WebSocketCallbacks,\n ): Ws {\n return new BrowserWebSocket(url, headers, callbacks);\n }\n}\n\nexport class BrowserWebSocket implements Ws {\n private ws?: WebSocket;\n\n constructor(\n private readonly url: string,\n private readonly headers: Record,\n private readonly callbacks: WebSocketCallbacks,\n ) {}\n\n connect(): void {\n this.ws = new WebSocket(this.url);\n\n this.ws.onopen = this.callbacks.onopen;\n this.ws.onerror = this.callbacks.onerror;\n this.ws.onclose = this.callbacks.onclose;\n this.ws.onmessage = this.callbacks.onmessage;\n }\n\n send(message: string) {\n if (this.ws === undefined) {\n throw new Error('WebSocket is not connected');\n }\n\n this.ws.send(message);\n }\n\n close() {\n if (this.ws === undefined) {\n throw new Error('WebSocket is not connected');\n }\n\n this.ws.close();\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {Auth} from '../_auth';\n\nexport const GOOGLE_API_KEY_HEADER = 'x-goog-api-key';\n// TODO(b/395122533): We need a secure client side authentication mechanism.\nexport class WebAuth implements Auth {\n constructor(private readonly apiKey: string) {}\n\n async addAuthHeaders(headers: Headers): Promise {\n if (headers.get(GOOGLE_API_KEY_HEADER) !== null) {\n return;\n }\n headers.append(GOOGLE_API_KEY_HEADER, this.apiKey);\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ApiClient} from '../_api_client';\nimport {Caches} from '../caches';\nimport {Chats} from '../chats';\nimport {GoogleGenAIOptions} from '../client';\nimport {Files} from '../files';\nimport {Live} from '../live';\nimport {Models} from '../models';\nimport {Operations} from '../operations';\n\nimport {BrowserUploader} from './_browser_uploader';\nimport {BrowserWebSocketFactory} from './_browser_websocket';\nimport {WebAuth} from './_web_auth';\n\nconst LANGUAGE_LABEL_PREFIX = 'gl-node/';\n\n/**\n * The Google GenAI SDK.\n *\n * @remarks\n * Provides access to the GenAI features through either the {@link\n * https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API} or\n * the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI\n * API}.\n *\n * The {@link GoogleGenAIOptions.vertexai} value determines which of the API\n * services to use.\n *\n * When using the Gemini API, a {@link GoogleGenAIOptions.apiKey} must also be\n * set. When using Vertex AI, currently only {@link GoogleGenAIOptions.apiKey}\n * is supported via Express mode. {@link GoogleGenAIOptions.project} and {@link\n * GoogleGenAIOptions.location} should not be set.\n *\n * @example\n * Initializing the SDK for using the Gemini API:\n * ```ts\n * import {GoogleGenAI} from '@google/genai';\n * const ai = new GoogleGenAI({apiKey: 'GEMINI_API_KEY'});\n * ```\n *\n * @example\n * Initializing the SDK for using the Vertex AI API:\n * ```ts\n * import {GoogleGenAI} from '@google/genai';\n * const ai = new GoogleGenAI({\n * vertexai: true,\n * project: 'PROJECT_ID',\n * location: 'PROJECT_LOCATION'\n * });\n * ```\n *\n */\nexport class GoogleGenAI {\n protected readonly apiClient: ApiClient;\n private readonly apiKey?: string;\n public readonly vertexai: boolean;\n private readonly apiVersion?: string;\n readonly models: Models;\n readonly live: Live;\n readonly chats: Chats;\n readonly caches: Caches;\n readonly files: Files;\n readonly operations: Operations;\n\n constructor(options: GoogleGenAIOptions) {\n if (options.apiKey == null) {\n throw new Error('An API Key must be set when running in a browser');\n }\n // Web client only supports API key mode for Vertex AI.\n if (options.project || options.location) {\n throw new Error(\n 'Vertex AI project based authentication is not supported on browser runtimes. Please do not provide a project or location.',\n );\n }\n this.vertexai = options.vertexai ?? false;\n\n this.apiKey = options.apiKey;\n this.apiVersion = options.apiVersion;\n const auth = new WebAuth(this.apiKey);\n this.apiClient = new ApiClient({\n auth: auth,\n apiVersion: this.apiVersion,\n apiKey: this.apiKey,\n vertexai: this.vertexai,\n httpOptions: options.httpOptions,\n userAgentExtra: LANGUAGE_LABEL_PREFIX + 'web',\n uploader: new BrowserUploader(),\n });\n this.models = new Models(this.apiClient);\n this.live = new Live(this.apiClient, auth, new BrowserWebSocketFactory());\n this.chats = new Chats(this.models, this.apiClient);\n this.caches = new Caches(this.apiClient);\n this.files = new Files(this.apiClient);\n this.operations = new Operations(this.apiClient);\n }\n}\n"],"names":["partToMldev","common.getValueByPath","common.setValueByPath","contentToMldev","functionDeclarationToMldev","googleSearchToMldev","dynamicRetrievalConfigToMldev","googleSearchRetrievalToMldev","toolToMldev","functionCallingConfigToMldev","toolConfigToMldev","t.tContents","t.tContent","t.tCachesModel","t.tCachedContentName","partToVertex","contentToVertex","schemaToVertex","functionDeclarationToVertex","googleSearchToVertex","dynamicRetrievalConfigToVertex","googleSearchRetrievalToVertex","toolToVertex","functionCallingConfigToVertex","toolConfigToVertex","converters.createCachedContentParametersToVertex","common.formatMap","converters.cachedContentFromVertex","converters.createCachedContentParametersToMldev","converters.cachedContentFromMldev","converters.getCachedContentParametersToVertex","converters.getCachedContentParametersToMldev","converters.deleteCachedContentParametersToVertex","converters.deleteCachedContentResponseFromVertex","types.DeleteCachedContentResponse","converters.deleteCachedContentParametersToMldev","converters.deleteCachedContentResponseFromMldev","converters.updateCachedContentParametersToVertex","converters.updateCachedContentParametersToMldev","converters.listCachedContentsParametersToVertex","converters.listCachedContentsResponseFromVertex","types.ListCachedContentsResponse","converters.listCachedContentsParametersToMldev","converters.listCachedContentsResponseFromMldev","t.tFileName","converters.fileFromMldev","converters.listFilesParametersToMldev","converters.listFilesResponseFromMldev","types.ListFilesResponse","converters.createFileParametersToMldev","converters.createFileResponseFromMldev","types.CreateFileResponse","converters.getFileParametersToMldev","converters.deleteFileParametersToMldev","converters.deleteFileResponseFromMldev","types.DeleteFileResponse","t.tSchema","t.tTools","t.tTool","t.tSpeechConfig","t.tModel","t.tContentsForEmbed","t.tBytes","videoFromMldev","generatedVideoFromMldev","generateVideosResponseFromMldev","generateVideosOperationFromMldev","videoFromVertex","generatedVideoFromVertex","generateVideosResponseFromVertex","generateVideosOperationFromVertex","converters.liveServerMessageFromVertex","converters.liveServerMessageFromMldev","converters.liveConnectParametersToVertex","converters.liveConnectParametersToMldev","converters.generateContentParametersToVertex","converters.generateContentResponseFromVertex","types.GenerateContentResponse","converters.generateContentParametersToMldev","converters.generateContentResponseFromMldev","converters.embedContentParametersToVertex","converters.embedContentResponseFromVertex","types.EmbedContentResponse","converters.embedContentParametersToMldev","converters.embedContentResponseFromMldev","converters.generateImagesParametersToVertex","converters.generateImagesResponseFromVertex","types.GenerateImagesResponse","converters.generateImagesParametersToMldev","converters.generateImagesResponseFromMldev","converters.getModelParametersToVertex","converters.modelFromVertex","converters.getModelParametersToMldev","converters.modelFromMldev","converters.countTokensParametersToVertex","converters.countTokensResponseFromVertex","types.CountTokensResponse","converters.countTokensParametersToMldev","converters.countTokensResponseFromMldev","converters.computeTokensParametersToVertex","converters.computeTokensResponseFromVertex","types.ComputeTokensResponse","converters.generateVideosParametersToVertex","converters.generateVideosOperationFromVertex","converters.generateVideosParametersToMldev","converters.generateVideosOperationFromMldev","converters.getOperationParametersToVertex","converters.getOperationParametersToMldev","converters.fetchPredictOperationParametersToVertex"],"mappings":"AAAA;;;;AAIG;MAEU,UAAU,CAAA;AAAG;AAEV,SAAA,SAAS,CACvB,cAAsB,EACtB,QAAiC,EAAA;;IAGjC,MAAM,KAAK,GAAG,cAAc;;IAG5B,OAAO,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,GAAG,KAAI;AAClD,QAAA,IAAI,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AAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC;AAC7B,YAAA,IAAI,EAAE,IAAI;YACV,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,cAAc,EAAE,qBAAqB,GAAG,KAAK;YAC7C,QAAQ,EAAE,IAAI,eAAe,EAAE;AAChC,SAAA,CAAC;QACF,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;AACxC,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,uBAAuB,EAAE,CAAC;AACzE,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC;QACnD,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;QACtC,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC;;AAEnD;;;;"} +\ No newline at end of file ++{"version":3,"file":"index.mjs","sources":["../../src/_common.ts","../../src/_transformers.ts","../../src/converters/_caches_converters.ts","../../src/pagers.ts","../../src/types.ts","../../src/caches.ts","../../src/chats.ts","../../src/converters/_files_converters.ts","../../src/files.ts","../../src/converters/_live_converters.ts","../../src/converters/_models_converters.ts","../../src/live.ts","../../src/models.ts","../../src/converters/_operations_converters.ts","../../src/operations.ts","../../src/_api_client.ts","../../src/cross/_cross_uploader.ts","../../src/web/_browser_uploader.ts","../../src/web/_browser_websocket.ts","../../src/web/_web_auth.ts","../../src/web/web_client.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport class BaseModule {}\n\nexport function formatMap(\n templateString: string,\n valueMap: Record,\n): string {\n // Use a regular expression to find all placeholders in the template string\n const regex = /\\{([^}]+)\\}/g;\n\n // Replace each placeholder with its corresponding value from the valueMap\n return templateString.replace(regex, (match, key) => {\n if (Object.prototype.hasOwnProperty.call(valueMap, key)) {\n const value = valueMap[key];\n // Convert the value to a string if it's not a string already\n return value !== undefined && value !== null ? String(value) : '';\n } else {\n // Handle missing keys\n throw new Error(`Key '${key}' not found in valueMap.`);\n }\n });\n}\n\nexport function setValueByPath(\n data: Record,\n keys: string[],\n value: unknown,\n): void {\n for (let i = 0; i < keys.length - 1; i++) {\n const key = keys[i];\n\n if (key.endsWith('[]')) {\n const keyName = key.slice(0, -2);\n if (!(keyName in data)) {\n if (Array.isArray(value)) {\n data[keyName] = Array.from({length: value.length}, () => ({}));\n } else {\n throw new Error(`Value must be a list given an array path ${key}`);\n }\n }\n\n if (Array.isArray(data[keyName])) {\n const arrayData = data[keyName] as Array;\n\n if (Array.isArray(value)) {\n for (let j = 0; j < arrayData.length; j++) {\n const entry = arrayData[j] as Record;\n setValueByPath(entry, keys.slice(i + 1), value[j]);\n }\n } else {\n for (const d of arrayData) {\n setValueByPath(\n d as Record,\n keys.slice(i + 1),\n value,\n );\n }\n }\n }\n return;\n } else if (key.endsWith('[0]')) {\n const keyName = key.slice(0, -3);\n if (!(keyName in data)) {\n data[keyName] = [{}];\n }\n const arrayData = (data as Record)[keyName];\n setValueByPath(\n (arrayData as Array>)[0],\n keys.slice(i + 1),\n value,\n );\n return;\n }\n\n if (!data[key] || typeof data[key] !== 'object') {\n data[key] = {};\n }\n\n data = data[key] as Record;\n }\n\n const keyToSet = keys[keys.length - 1];\n const existingData = data[keyToSet];\n\n if (existingData !== undefined) {\n if (\n !value ||\n (typeof value === 'object' && Object.keys(value).length === 0)\n ) {\n return;\n }\n\n if (value === existingData) {\n return;\n }\n\n if (\n typeof existingData === 'object' &&\n typeof value === 'object' &&\n existingData !== null &&\n value !== null\n ) {\n Object.assign(existingData, value);\n } else {\n throw new Error(`Cannot set value for an existing key. Key: ${keyToSet}`);\n }\n } else {\n data[keyToSet] = value;\n }\n}\n\nexport function getValueByPath(data: unknown, keys: string[]): unknown {\n try {\n if (keys.length === 1 && keys[0] === '_self') {\n return data;\n }\n\n for (let i = 0; i < keys.length; i++) {\n if (typeof data !== 'object' || data === null) {\n return undefined;\n }\n\n const key = keys[i];\n if (key.endsWith('[]')) {\n const keyName = key.slice(0, -2);\n if (keyName in data) {\n const arrayData = (data as Record)[keyName];\n if (!Array.isArray(arrayData)) {\n return undefined;\n }\n return arrayData.map((d) => getValueByPath(d, keys.slice(i + 1)));\n } else {\n return undefined;\n }\n } else {\n data = (data as Record)[key];\n }\n }\n\n return data;\n } catch (error) {\n if (error instanceof TypeError) {\n return undefined;\n }\n throw error;\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ApiClient} from './_api_client';\nimport * as types from './types';\n\nexport function tModel(apiClient: ApiClient, model: string | unknown): string {\n if (!model || typeof model !== 'string') {\n throw new Error('model is required and must be a string');\n }\n\n if (apiClient.isVertexAI()) {\n if (\n model.startsWith('publishers/') ||\n model.startsWith('projects/') ||\n model.startsWith('models/')\n ) {\n return model;\n } else if (model.indexOf('/') >= 0) {\n const parts = model.split('/', 2);\n return `publishers/${parts[0]}/models/${parts[1]}`;\n } else {\n return `publishers/google/models/${model}`;\n }\n } else {\n if (model.startsWith('models/') || model.startsWith('tunedModels/')) {\n return model;\n } else {\n return `models/${model}`;\n }\n }\n}\n\nexport function tCachesModel(\n apiClient: ApiClient,\n model: string | unknown,\n): string {\n const transformedModel = tModel(apiClient, model as string);\n if (!transformedModel) {\n return '';\n }\n\n if (transformedModel.startsWith('publishers/') && apiClient.isVertexAI()) {\n // vertex caches only support model name start with projects.\n return `projects/${apiClient.getProject()}/locations/${apiClient.getLocation()}/${transformedModel}`;\n } else if (transformedModel.startsWith('models/') && apiClient.isVertexAI()) {\n return `projects/${apiClient.getProject()}/locations/${apiClient.getLocation()}/publishers/google/${transformedModel}`;\n } else {\n return transformedModel;\n }\n}\n\nexport function tPart(\n apiClient: ApiClient,\n origin?: types.PartUnion | null,\n): types.Part {\n if (origin === null || origin === undefined) {\n throw new Error('PartUnion is required');\n }\n if (typeof origin === 'object') {\n return origin;\n }\n if (typeof origin === 'string') {\n return {text: origin};\n }\n throw new Error(`Unsupported part type: ${typeof origin}`);\n}\n\nexport function tParts(\n apiClient: ApiClient,\n origin?: types.PartListUnion | null,\n): types.Part[] {\n if (\n origin === null ||\n origin === undefined ||\n (Array.isArray(origin) && origin.length === 0)\n ) {\n throw new Error('PartListUnion is required');\n }\n if (Array.isArray(origin)) {\n return origin.map((item) => tPart(apiClient, item as types.PartUnion)!);\n }\n return [tPart(apiClient, origin)!];\n}\n\nfunction _isContent(origin: unknown): boolean {\n return (\n origin !== null &&\n origin !== undefined &&\n typeof origin === 'object' &&\n 'parts' in origin &&\n Array.isArray(origin.parts)\n );\n}\n\nfunction _isFunctionCallPart(origin: unknown): boolean {\n return (\n origin !== null &&\n origin !== undefined &&\n typeof origin === 'object' &&\n 'functionCall' in origin\n );\n}\n\nfunction _isFunctionResponsePart(origin: unknown): boolean {\n return (\n origin !== null &&\n origin !== undefined &&\n typeof origin === 'object' &&\n 'functionResponse' in origin\n );\n}\n\nexport function tContent(\n apiClient: ApiClient,\n origin?: types.ContentUnion,\n): types.Content {\n if (origin === null || origin === undefined) {\n throw new Error('ContentUnion is required');\n }\n if (_isContent(origin)) {\n // _isContent is a utility function that checks if the\n // origin is a Content.\n return origin as types.Content;\n }\n\n return {\n role: 'user',\n parts: tParts(apiClient, origin as types.PartListUnion)!,\n };\n}\n\nexport function tContentsForEmbed(\n apiClient: ApiClient,\n origin: types.ContentListUnion,\n): types.ContentUnion[] {\n if (!origin) {\n return [];\n }\n if (apiClient.isVertexAI() && Array.isArray(origin)) {\n return origin.flatMap((item) => {\n const content = tContent(apiClient, item as types.ContentUnion);\n if (\n content.parts &&\n content.parts.length > 0 &&\n content.parts[0].text !== undefined\n ) {\n return [content.parts[0].text];\n }\n return [];\n });\n } else if (apiClient.isVertexAI()) {\n const content = tContent(apiClient, origin as types.ContentUnion);\n if (\n content.parts &&\n content.parts.length > 0 &&\n content.parts[0].text !== undefined\n ) {\n return [content.parts[0].text];\n }\n return [];\n }\n if (Array.isArray(origin)) {\n return origin.map(\n (item) => tContent(apiClient, item as types.ContentUnion)!,\n );\n }\n return [tContent(apiClient, origin as types.ContentUnion)!];\n}\n\nexport function tContents(\n apiClient: ApiClient,\n origin?: types.ContentListUnion,\n): types.Content[] {\n if (\n origin === null ||\n origin === undefined ||\n (Array.isArray(origin) && origin.length === 0)\n ) {\n throw new Error('contents are required');\n }\n if (!Array.isArray(origin)) {\n // If it's not an array, it's a single content or a single PartUnion.\n if (_isFunctionCallPart(origin) || _isFunctionResponsePart(origin)) {\n throw new Error(\n 'To specify functionCall or functionResponse parts, please wrap them in a Content object, specifying the role for them',\n );\n }\n return [tContent(apiClient, origin as types.ContentUnion)];\n }\n\n const result: types.Content[] = [];\n const accumulatedParts: types.PartUnion[] = [];\n const isContentArray = _isContent(origin[0]);\n\n for (const item of origin) {\n const isContent = _isContent(item);\n\n if (isContent != isContentArray) {\n throw new Error(\n 'Mixing Content and Parts is not supported, please group the parts into a the appropriate Content objects and specify the roles for them',\n );\n }\n\n if (isContent) {\n // `isContent` contains the result of _isContent, which is a utility\n // function that checks if the item is a Content.\n result.push(item as types.Content);\n } else if (_isFunctionCallPart(item) || _isFunctionResponsePart(item)) {\n throw new Error(\n 'To specify functionCall or functionResponse parts, please wrap them, and any other parts, in Content objects as appropriate, specifying the role for them',\n );\n } else {\n accumulatedParts.push(item as types.PartUnion);\n }\n }\n\n if (!isContentArray) {\n result.push({role: 'user', parts: tParts(apiClient, accumulatedParts)});\n }\n return result;\n}\n\nexport function processSchema(apiClient: ApiClient, schema: types.Schema) {\n if (!apiClient.isVertexAI()) {\n if ('default' in schema) {\n throw new Error(\n 'Default value is not supported in the response schema for the Gemini API.',\n );\n }\n }\n\n if ('anyOf' in schema) {\n if (schema['anyOf'] !== undefined) {\n for (const subSchema of schema['anyOf']) {\n processSchema(apiClient, subSchema);\n }\n }\n }\n\n if ('items' in schema) {\n if (schema['items'] !== undefined) {\n processSchema(apiClient, schema['items']);\n }\n }\n\n if ('properties' in schema) {\n if (schema['properties'] !== undefined) {\n for (const subSchema of Object.values(schema['properties'])) {\n processSchema(apiClient, subSchema);\n }\n }\n }\n}\n\nexport function tSchema(\n apiClient: ApiClient,\n schema: types.Schema,\n): types.Schema {\n processSchema(apiClient, schema);\n return schema;\n}\n\nexport function tSpeechConfig(\n apiClient: ApiClient,\n speechConfig: types.SpeechConfigUnion,\n): types.SpeechConfig {\n if (typeof speechConfig === 'object' && 'voiceConfig' in speechConfig) {\n return speechConfig;\n } else if (typeof speechConfig === 'string') {\n return {\n voiceConfig: {\n prebuiltVoiceConfig: {\n voiceName: speechConfig,\n },\n },\n };\n } else {\n throw new Error(`Unsupported speechConfig type: ${typeof speechConfig}`);\n }\n}\n\nexport function tTool(apiClient: ApiClient, tool: types.Tool): types.Tool {\n return tool;\n}\n\nexport function tTools(\n apiClient: ApiClient,\n tool: types.Tool[] | unknown,\n): types.Tool[] {\n if (!Array.isArray(tool)) {\n throw new Error('tool is required and must be an array of Tools');\n }\n return tool;\n}\n\n/**\n * Prepends resource name with project, location, resource_prefix if needed.\n *\n * @param client The API client.\n * @param resourceName The resource name.\n * @param resourcePrefix The resource prefix.\n * @param splitsAfterPrefix The number of splits after the prefix.\n * @returns The completed resource name.\n *\n * Examples:\n *\n * ```\n * resource_name = '123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = True\n * client.project = 'bar'\n * client.location = 'us-west1'\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns: 'projects/bar/locations/us-west1/cachedContents/123'\n * ```\n *\n * ```\n * resource_name = 'projects/foo/locations/us-central1/cachedContents/123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = True\n * client.project = 'bar'\n * client.location = 'us-west1'\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns: 'projects/foo/locations/us-central1/cachedContents/123'\n * ```\n *\n * ```\n * resource_name = '123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = False\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * returns 'cachedContents/123'\n * ```\n *\n * ```\n * resource_name = 'some/wrong/cachedContents/resource/name/123'\n * resource_prefix = 'cachedContents'\n * splits_after_prefix = 1\n * client.vertexai = False\n * # client.vertexai = True\n * _resource_name(client, resource_name, resource_prefix, splits_after_prefix)\n * -> 'some/wrong/resource/name/123'\n * ```\n */\nfunction resourceName(\n client: ApiClient,\n resourceName: string,\n resourcePrefix: string,\n splitsAfterPrefix: number = 1,\n): string {\n const shouldAppendPrefix =\n !resourceName.startsWith(`${resourcePrefix}/`) &&\n resourceName.split('/').length === splitsAfterPrefix;\n if (client.isVertexAI()) {\n if (resourceName.startsWith('projects/')) {\n return resourceName;\n } else if (resourceName.startsWith('locations/')) {\n return `projects/${client.getProject()}/${resourceName}`;\n } else if (resourceName.startsWith(`${resourcePrefix}/`)) {\n return `projects/${client.getProject()}/locations/${client.getLocation()}/${resourceName}`;\n } else if (shouldAppendPrefix) {\n return `projects/${client.getProject()}/locations/${client.getLocation()}/${resourcePrefix}/${resourceName}`;\n } else {\n return resourceName;\n }\n }\n if (shouldAppendPrefix) {\n return `${resourcePrefix}/${resourceName}`;\n }\n return resourceName;\n}\n\nexport function tCachedContentName(\n apiClient: ApiClient,\n name: string | unknown,\n): string {\n if (typeof name !== 'string') {\n throw new Error('name must be a string');\n }\n return resourceName(apiClient, name, 'cachedContents');\n}\n\nexport function tTuningJobStatus(\n apiClient: ApiClient,\n status: string | unknown,\n): string {\n switch (status) {\n case 'STATE_UNSPECIFIED':\n return 'JOB_STATE_UNSPECIFIED';\n case 'CREATING':\n return 'JOB_STATE_RUNNING';\n case 'ACTIVE':\n return 'JOB_STATE_SUCCEEDED';\n case 'FAILED':\n return 'JOB_STATE_FAILED';\n default:\n return status as string;\n }\n}\n\nexport function tBytes(\n apiClient: ApiClient,\n fromImageBytes: string | unknown,\n): string {\n if (typeof fromImageBytes !== 'string') {\n throw new Error('fromImageBytes must be a string');\n }\n // TODO(b/389133914): Remove dummy bytes converter.\n return fromImageBytes;\n}\nexport function tFileName(\n apiClient: ApiClient,\n fromName: string | unknown,\n): string {\n if (typeof fromName !== 'string') {\n throw new Error('fromName must be a string');\n }\n // Remove the files/ prefx for MLdev urls to get the actual name of the file.\n if (fromName.startsWith('files/')) {\n return fromName.split('files/')[1];\n }\n return fromName;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function partToMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['videoMetadata']) !== undefined) {\n throw new Error('videoMetadata parameter is not supported in Gemini API.');\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToMldev(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['example']) !== undefined) {\n throw new Error('example parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['pattern']) !== undefined) {\n throw new Error('pattern parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['default']) !== undefined) {\n throw new Error('default parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxLength']) !== undefined) {\n throw new Error('maxLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minLength']) !== undefined) {\n throw new Error('minLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minProperties']) !== undefined) {\n throw new Error('minProperties parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxProperties']) !== undefined) {\n throw new Error('maxProperties parameter is not supported in Gemini API.');\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['response']) !== undefined) {\n throw new Error('response parameter is not supported in Gemini API.');\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToMldev(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToMldev(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n if (common.getValueByPath(fromObject, ['retrieval']) !== undefined) {\n throw new Error('retrieval parameter is not supported in Gemini API.');\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToMldev());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (parentObject !== undefined && fromDisplayName != null) {\n common.setValueByPath(parentObject, ['displayName'], fromDisplayName);\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (parentObject !== undefined && fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToMldev(apiClient, fromToolConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['model'],\n t.tCachesModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n createCachedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.DeleteCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n updateCachedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function listCachedContentsConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listCachedContentsParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listCachedContentsConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partToVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToVertex(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n const fromExample = common.getValueByPath(fromObject, ['example']);\n if (fromExample != null) {\n common.setValueByPath(toObject, ['example'], fromExample);\n }\n\n const fromPattern = common.getValueByPath(fromObject, ['pattern']);\n if (fromPattern != null) {\n common.setValueByPath(toObject, ['pattern'], fromPattern);\n }\n\n const fromDefault = common.getValueByPath(fromObject, ['default']);\n if (fromDefault != null) {\n common.setValueByPath(toObject, ['default'], fromDefault);\n }\n\n const fromMaxLength = common.getValueByPath(fromObject, ['maxLength']);\n if (fromMaxLength != null) {\n common.setValueByPath(toObject, ['maxLength'], fromMaxLength);\n }\n\n const fromMinLength = common.getValueByPath(fromObject, ['minLength']);\n if (fromMinLength != null) {\n common.setValueByPath(toObject, ['minLength'], fromMinLength);\n }\n\n const fromMinProperties = common.getValueByPath(fromObject, [\n 'minProperties',\n ]);\n if (fromMinProperties != null) {\n common.setValueByPath(toObject, ['minProperties'], fromMinProperties);\n }\n\n const fromMaxProperties = common.getValueByPath(fromObject, [\n 'maxProperties',\n ]);\n if (fromMaxProperties != null) {\n common.setValueByPath(toObject, ['maxProperties'], fromMaxProperties);\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n schemaToVertex(apiClient, fromResponse),\n );\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToVertex(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToVertex(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n const fromRetrieval = common.getValueByPath(fromObject, ['retrieval']);\n if (fromRetrieval != null) {\n common.setValueByPath(toObject, ['retrieval'], fromRetrieval);\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToVertex());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (parentObject !== undefined && fromDisplayName != null) {\n common.setValueByPath(parentObject, ['displayName'], fromDisplayName);\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (parentObject !== undefined && fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToVertex(apiClient, fromToolConfig),\n );\n }\n\n return toObject;\n}\n\nexport function createCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.CreateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['model'],\n t.tCachesModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n createCachedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.DeleteCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTtl = common.getValueByPath(fromObject, ['ttl']);\n if (parentObject !== undefined && fromTtl != null) {\n common.setValueByPath(parentObject, ['ttl'], fromTtl);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (parentObject !== undefined && fromExpireTime != null) {\n common.setValueByPath(parentObject, ['expireTime'], fromExpireTime);\n }\n\n return toObject;\n}\n\nexport function updateCachedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.UpdateCachedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tCachedContentName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n updateCachedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function listCachedContentsConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listCachedContentsParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listCachedContentsConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function cachedContentFromMldev(\n apiClient: ApiClient,\n fromObject: types.CachedContent,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (fromExpireTime != null) {\n common.setValueByPath(toObject, ['expireTime'], fromExpireTime);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentResponseFromMldev(): Record<\n string,\n unknown\n> {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function listCachedContentsResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromCachedContents = common.getValueByPath(fromObject, [\n 'cachedContents',\n ]);\n if (fromCachedContents != null) {\n if (Array.isArray(fromCachedContents)) {\n common.setValueByPath(\n toObject,\n ['cachedContents'],\n fromCachedContents.map((item) => {\n return cachedContentFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['cachedContents'], fromCachedContents);\n }\n }\n\n return toObject;\n}\n\nexport function cachedContentFromVertex(\n apiClient: ApiClient,\n fromObject: types.CachedContent,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromExpireTime = common.getValueByPath(fromObject, ['expireTime']);\n if (fromExpireTime != null) {\n common.setValueByPath(toObject, ['expireTime'], fromExpireTime);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function deleteCachedContentResponseFromVertex(): Record<\n string,\n unknown\n> {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function listCachedContentsResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.ListCachedContentsResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromCachedContents = common.getValueByPath(fromObject, [\n 'cachedContents',\n ]);\n if (fromCachedContents != null) {\n if (Array.isArray(fromCachedContents)) {\n common.setValueByPath(\n toObject,\n ['cachedContents'],\n fromCachedContents.map((item) => {\n return cachedContentFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['cachedContents'], fromCachedContents);\n }\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Pagers for the GenAI List APIs.\n */\n\nexport enum PagedItem {\n PAGED_ITEM_BATCH_JOBS = 'batchJobs',\n PAGED_ITEM_MODELS = 'models',\n PAGED_ITEM_TUNING_JOBS = 'tuningJobs',\n PAGED_ITEM_FILES = 'files',\n PAGED_ITEM_CACHED_CONTENTS = 'cachedContents',\n}\n\ninterface PagedItemConfig {\n config?: {\n pageToken?: string;\n pageSize?: number;\n };\n}\n\ninterface PagedItemResponse {\n nextPageToken?: string;\n batchJobs?: T[];\n models?: T[];\n tuningJobs?: T[];\n files?: T[];\n cachedContents?: T[];\n}\n\n/**\n * Pager class for iterating through paginated results.\n */\nexport class Pager implements AsyncIterable {\n private nameInternal!: PagedItem;\n private pageInternal: T[] = [];\n private paramsInternal: PagedItemConfig = {};\n private pageInternalSize!: number;\n protected requestInternal!: (\n params: PagedItemConfig,\n ) => Promise>;\n protected idxInternal!: number;\n\n constructor(\n name: PagedItem,\n request: (params: PagedItemConfig) => Promise>,\n response: PagedItemResponse,\n params: PagedItemConfig,\n ) {\n this.requestInternal = request;\n this.init(name, response, params);\n }\n\n private init(\n name: PagedItem,\n response: PagedItemResponse,\n params: PagedItemConfig,\n ) {\n this.nameInternal = name;\n this.pageInternal = response[this.nameInternal] || [];\n this.idxInternal = 0;\n let requestParams: PagedItemConfig = {config: {}};\n if (!params) {\n requestParams = {config: {}};\n } else if (typeof params === 'object') {\n requestParams = {...params};\n } else {\n requestParams = params;\n }\n if (requestParams['config']) {\n requestParams['config']['pageToken'] = response['nextPageToken'];\n }\n this.paramsInternal = requestParams;\n this.pageInternalSize =\n requestParams['config']?.['pageSize'] ?? this.pageInternal.length;\n }\n\n private initNextPage(response: PagedItemResponse): void {\n this.init(this.nameInternal, response, this.paramsInternal);\n }\n\n /**\n * Returns the current page, which is a list of items.\n *\n * @remarks\n * The first page is retrieved when the pager is created. The returned list of\n * items could be a subset of the entire list.\n */\n get page(): T[] {\n return this.pageInternal;\n }\n\n /**\n * Returns the type of paged item (for example, ``batch_jobs``).\n */\n get name(): PagedItem {\n return this.nameInternal;\n }\n\n /**\n * Returns the length of the page fetched each time by this pager.\n *\n * @remarks\n * The number of items in the page is less than or equal to the page length.\n */\n get pageSize(): number {\n return this.pageInternalSize;\n }\n\n /**\n * Returns the parameters when making the API request for the next page.\n *\n * @remarks\n * Parameters contain a set of optional configs that can be\n * used to customize the API request. For example, the `pageToken` parameter\n * contains the token to request the next page.\n */\n get params(): PagedItemConfig {\n return this.paramsInternal;\n }\n\n /**\n * Returns the total number of items in the current page.\n */\n get pageLength(): number {\n return this.pageInternal.length;\n }\n\n /**\n * Returns the item at the given index.\n */\n getItem(index: number): T {\n return this.pageInternal[index];\n }\n\n /**\n * Returns an async iterator that support iterating through all items\n * retrieved from the API.\n *\n * @remarks\n * The iterator will automatically fetch the next page if there are more items\n * to fetch from the API.\n *\n * @example\n *\n * ```ts\n * const pager = await ai.files.list({config: {pageSize: 10}});\n * for await (const file of pager) {\n * console.log(file.name);\n * }\n * ```\n */\n [Symbol.asyncIterator](): AsyncIterator {\n return {\n next: async () => {\n if (this.idxInternal >= this.pageLength) {\n if (this.hasNextPage()) {\n await this.nextPage();\n } else {\n return {value: undefined, done: true};\n }\n }\n const item = this.getItem(this.idxInternal);\n this.idxInternal += 1;\n return {value: item, done: false};\n },\n return: async () => {\n return {value: undefined, done: true};\n },\n };\n }\n\n /**\n * Fetches the next page of items. This makes a new API request.\n *\n * @throws {Error} If there are no more pages to fetch.\n *\n * @example\n *\n * ```ts\n * const pager = await ai.files.list({config: {pageSize: 10}});\n * let page = pager.page;\n * while (true) {\n * for (const file of page) {\n * console.log(file.name);\n * }\n * if (!pager.hasNextPage()) {\n * break;\n * }\n * page = await pager.nextPage();\n * }\n * ```\n */\n async nextPage(): Promise {\n if (!this.hasNextPage()) {\n throw new Error('No more pages to fetch.');\n }\n const response = await this.requestInternal(this.params);\n this.initNextPage(response);\n return this.page;\n }\n\n /**\n * Returns true if there are more pages to fetch from the API.\n */\n hasNextPage(): boolean {\n if (this.params['config']?.['pageToken'] !== undefined) {\n return true;\n }\n return false;\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\n/** Required. Outcome of the code execution. */\nexport enum Outcome {\n OUTCOME_UNSPECIFIED = 'OUTCOME_UNSPECIFIED',\n OUTCOME_OK = 'OUTCOME_OK',\n OUTCOME_FAILED = 'OUTCOME_FAILED',\n OUTCOME_DEADLINE_EXCEEDED = 'OUTCOME_DEADLINE_EXCEEDED',\n}\n\n/** Required. Programming language of the `code`. */\nexport enum Language {\n LANGUAGE_UNSPECIFIED = 'LANGUAGE_UNSPECIFIED',\n PYTHON = 'PYTHON',\n}\n\n/** Optional. The type of the data. */\nexport enum Type {\n TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED',\n STRING = 'STRING',\n NUMBER = 'NUMBER',\n INTEGER = 'INTEGER',\n BOOLEAN = 'BOOLEAN',\n ARRAY = 'ARRAY',\n OBJECT = 'OBJECT',\n}\n\n/** Required. Harm category. */\nexport enum HarmCategory {\n HARM_CATEGORY_UNSPECIFIED = 'HARM_CATEGORY_UNSPECIFIED',\n HARM_CATEGORY_HATE_SPEECH = 'HARM_CATEGORY_HATE_SPEECH',\n HARM_CATEGORY_DANGEROUS_CONTENT = 'HARM_CATEGORY_DANGEROUS_CONTENT',\n HARM_CATEGORY_HARASSMENT = 'HARM_CATEGORY_HARASSMENT',\n HARM_CATEGORY_SEXUALLY_EXPLICIT = 'HARM_CATEGORY_SEXUALLY_EXPLICIT',\n HARM_CATEGORY_CIVIC_INTEGRITY = 'HARM_CATEGORY_CIVIC_INTEGRITY',\n}\n\n/** Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. */\nexport enum HarmBlockMethod {\n HARM_BLOCK_METHOD_UNSPECIFIED = 'HARM_BLOCK_METHOD_UNSPECIFIED',\n SEVERITY = 'SEVERITY',\n PROBABILITY = 'PROBABILITY',\n}\n\n/** Required. The harm block threshold. */\nexport enum HarmBlockThreshold {\n HARM_BLOCK_THRESHOLD_UNSPECIFIED = 'HARM_BLOCK_THRESHOLD_UNSPECIFIED',\n BLOCK_LOW_AND_ABOVE = 'BLOCK_LOW_AND_ABOVE',\n BLOCK_MEDIUM_AND_ABOVE = 'BLOCK_MEDIUM_AND_ABOVE',\n BLOCK_ONLY_HIGH = 'BLOCK_ONLY_HIGH',\n BLOCK_NONE = 'BLOCK_NONE',\n OFF = 'OFF',\n}\n\n/** The mode of the predictor to be used in dynamic retrieval. */\nexport enum Mode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n MODE_DYNAMIC = 'MODE_DYNAMIC',\n}\n\n/** Output only. The reason why the model stopped generating tokens.\n\n If empty, the model has not stopped generating the tokens.\n */\nexport enum FinishReason {\n FINISH_REASON_UNSPECIFIED = 'FINISH_REASON_UNSPECIFIED',\n STOP = 'STOP',\n MAX_TOKENS = 'MAX_TOKENS',\n SAFETY = 'SAFETY',\n RECITATION = 'RECITATION',\n OTHER = 'OTHER',\n BLOCKLIST = 'BLOCKLIST',\n PROHIBITED_CONTENT = 'PROHIBITED_CONTENT',\n SPII = 'SPII',\n MALFORMED_FUNCTION_CALL = 'MALFORMED_FUNCTION_CALL',\n IMAGE_SAFETY = 'IMAGE_SAFETY',\n}\n\n/** Output only. Harm probability levels in the content. */\nexport enum HarmProbability {\n HARM_PROBABILITY_UNSPECIFIED = 'HARM_PROBABILITY_UNSPECIFIED',\n NEGLIGIBLE = 'NEGLIGIBLE',\n LOW = 'LOW',\n MEDIUM = 'MEDIUM',\n HIGH = 'HIGH',\n}\n\n/** Output only. Harm severity levels in the content. */\nexport enum HarmSeverity {\n HARM_SEVERITY_UNSPECIFIED = 'HARM_SEVERITY_UNSPECIFIED',\n HARM_SEVERITY_NEGLIGIBLE = 'HARM_SEVERITY_NEGLIGIBLE',\n HARM_SEVERITY_LOW = 'HARM_SEVERITY_LOW',\n HARM_SEVERITY_MEDIUM = 'HARM_SEVERITY_MEDIUM',\n HARM_SEVERITY_HIGH = 'HARM_SEVERITY_HIGH',\n}\n\n/** Output only. Blocked reason. */\nexport enum BlockedReason {\n BLOCKED_REASON_UNSPECIFIED = 'BLOCKED_REASON_UNSPECIFIED',\n SAFETY = 'SAFETY',\n OTHER = 'OTHER',\n BLOCKLIST = 'BLOCKLIST',\n PROHIBITED_CONTENT = 'PROHIBITED_CONTENT',\n}\n\n/** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */\nexport enum TrafficType {\n TRAFFIC_TYPE_UNSPECIFIED = 'TRAFFIC_TYPE_UNSPECIFIED',\n ON_DEMAND = 'ON_DEMAND',\n PROVISIONED_THROUGHPUT = 'PROVISIONED_THROUGHPUT',\n}\n\n/** Server content modalities. */\nexport enum Modality {\n MODALITY_UNSPECIFIED = 'MODALITY_UNSPECIFIED',\n TEXT = 'TEXT',\n IMAGE = 'IMAGE',\n AUDIO = 'AUDIO',\n}\n\n/** The media resolution to use. */\nexport enum MediaResolution {\n MEDIA_RESOLUTION_UNSPECIFIED = 'MEDIA_RESOLUTION_UNSPECIFIED',\n MEDIA_RESOLUTION_LOW = 'MEDIA_RESOLUTION_LOW',\n MEDIA_RESOLUTION_MEDIUM = 'MEDIA_RESOLUTION_MEDIUM',\n MEDIA_RESOLUTION_HIGH = 'MEDIA_RESOLUTION_HIGH',\n}\n\n/** Options for feature selection preference. */\nexport enum FeatureSelectionPreference {\n FEATURE_SELECTION_PREFERENCE_UNSPECIFIED = 'FEATURE_SELECTION_PREFERENCE_UNSPECIFIED',\n PRIORITIZE_QUALITY = 'PRIORITIZE_QUALITY',\n BALANCED = 'BALANCED',\n PRIORITIZE_COST = 'PRIORITIZE_COST',\n}\n\n/** Config for the dynamic retrieval config mode. */\nexport enum DynamicRetrievalConfigMode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n MODE_DYNAMIC = 'MODE_DYNAMIC',\n}\n\n/** Config for the function calling config mode. */\nexport enum FunctionCallingConfigMode {\n MODE_UNSPECIFIED = 'MODE_UNSPECIFIED',\n AUTO = 'AUTO',\n ANY = 'ANY',\n NONE = 'NONE',\n}\n\n/** Enum that controls the safety filter level for objectionable content. */\nexport enum SafetyFilterLevel {\n BLOCK_LOW_AND_ABOVE = 'BLOCK_LOW_AND_ABOVE',\n BLOCK_MEDIUM_AND_ABOVE = 'BLOCK_MEDIUM_AND_ABOVE',\n BLOCK_ONLY_HIGH = 'BLOCK_ONLY_HIGH',\n BLOCK_NONE = 'BLOCK_NONE',\n}\n\n/** Enum that controls the generation of people. */\nexport enum PersonGeneration {\n DONT_ALLOW = 'DONT_ALLOW',\n ALLOW_ADULT = 'ALLOW_ADULT',\n ALLOW_ALL = 'ALLOW_ALL',\n}\n\n/** Enum that specifies the language of the text in the prompt. */\nexport enum ImagePromptLanguage {\n auto = 'auto',\n en = 'en',\n ja = 'ja',\n ko = 'ko',\n hi = 'hi',\n}\n\n/** State for the lifecycle of a File. */\nexport enum FileState {\n STATE_UNSPECIFIED = 'STATE_UNSPECIFIED',\n PROCESSING = 'PROCESSING',\n ACTIVE = 'ACTIVE',\n FAILED = 'FAILED',\n}\n\n/** Source of the File. */\nexport enum FileSource {\n SOURCE_UNSPECIFIED = 'SOURCE_UNSPECIFIED',\n UPLOADED = 'UPLOADED',\n GENERATED = 'GENERATED',\n}\n\n/** Enum representing the mask mode of a mask reference image. */\nexport enum MaskReferenceMode {\n MASK_MODE_DEFAULT = 'MASK_MODE_DEFAULT',\n MASK_MODE_USER_PROVIDED = 'MASK_MODE_USER_PROVIDED',\n MASK_MODE_BACKGROUND = 'MASK_MODE_BACKGROUND',\n MASK_MODE_FOREGROUND = 'MASK_MODE_FOREGROUND',\n MASK_MODE_SEMANTIC = 'MASK_MODE_SEMANTIC',\n}\n\n/** Enum representing the control type of a control reference image. */\nexport enum ControlReferenceType {\n CONTROL_TYPE_DEFAULT = 'CONTROL_TYPE_DEFAULT',\n CONTROL_TYPE_CANNY = 'CONTROL_TYPE_CANNY',\n CONTROL_TYPE_SCRIBBLE = 'CONTROL_TYPE_SCRIBBLE',\n CONTROL_TYPE_FACE_MESH = 'CONTROL_TYPE_FACE_MESH',\n}\n\n/** Enum representing the subject type of a subject reference image. */\nexport enum SubjectReferenceType {\n SUBJECT_TYPE_DEFAULT = 'SUBJECT_TYPE_DEFAULT',\n SUBJECT_TYPE_PERSON = 'SUBJECT_TYPE_PERSON',\n SUBJECT_TYPE_ANIMAL = 'SUBJECT_TYPE_ANIMAL',\n SUBJECT_TYPE_PRODUCT = 'SUBJECT_TYPE_PRODUCT',\n}\n\n/** Server content modalities. */\nexport enum MediaModality {\n MODALITY_UNSPECIFIED = 'MODALITY_UNSPECIFIED',\n TEXT = 'TEXT',\n IMAGE = 'IMAGE',\n VIDEO = 'VIDEO',\n AUDIO = 'AUDIO',\n DOCUMENT = 'DOCUMENT',\n}\n\n/** Start of speech sensitivity. */\nexport enum StartSensitivity {\n START_SENSITIVITY_UNSPECIFIED = 'START_SENSITIVITY_UNSPECIFIED',\n START_SENSITIVITY_HIGH = 'START_SENSITIVITY_HIGH',\n START_SENSITIVITY_LOW = 'START_SENSITIVITY_LOW',\n}\n\n/** End of speech sensitivity. */\nexport enum EndSensitivity {\n END_SENSITIVITY_UNSPECIFIED = 'END_SENSITIVITY_UNSPECIFIED',\n END_SENSITIVITY_HIGH = 'END_SENSITIVITY_HIGH',\n END_SENSITIVITY_LOW = 'END_SENSITIVITY_LOW',\n}\n\n/** The different ways of handling user activity. */\nexport enum ActivityHandling {\n ACTIVITY_HANDLING_UNSPECIFIED = 'ACTIVITY_HANDLING_UNSPECIFIED',\n START_OF_ACTIVITY_INTERRUPTS = 'START_OF_ACTIVITY_INTERRUPTS',\n NO_INTERRUPTION = 'NO_INTERRUPTION',\n}\n\n/** Options about which input is included in the user's turn. */\nexport enum TurnCoverage {\n TURN_COVERAGE_UNSPECIFIED = 'TURN_COVERAGE_UNSPECIFIED',\n TURN_INCLUDES_ONLY_ACTIVITY = 'TURN_INCLUDES_ONLY_ACTIVITY',\n TURN_INCLUDES_ALL_INPUT = 'TURN_INCLUDES_ALL_INPUT',\n}\n\n/** Metadata describes the input video content. */\nexport declare interface VideoMetadata {\n /** Optional. The end offset of the video. */\n endOffset?: string;\n /** Optional. The start offset of the video. */\n startOffset?: string;\n}\n\n/** Result of executing the [ExecutableCode]. Always follows a `part` containing the [ExecutableCode]. */\nexport declare interface CodeExecutionResult {\n /** Required. Outcome of the code execution. */\n outcome?: Outcome;\n /** Optional. Contains stdout when code execution is successful, stderr or other description otherwise. */\n output?: string;\n}\n\n/** Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the [FunctionDeclaration] tool and [FunctionCallingConfig] mode is set to [Mode.CODE]. */\nexport declare interface ExecutableCode {\n /** Required. The code to be executed. */\n code?: string;\n /** Required. Programming language of the `code`. */\n language?: Language;\n}\n\n/** URI based data. */\nexport declare interface FileData {\n /** Required. URI. */\n fileUri?: string;\n /** Required. The IANA standard MIME type of the source data. */\n mimeType?: string;\n}\n\n/** A function call. */\nexport declare interface FunctionCall {\n /** The unique id of the function call. If populated, the client to execute the\n `function_call` and return the response with the matching `id`. */\n id?: string;\n /** Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. */\n args?: Record;\n /** Required. The name of the function to call. Matches [FunctionDeclaration.name]. */\n name?: string;\n}\n\n/** A function response. */\nexport class FunctionResponse {\n /** The id of the function call this response is for. Populated by the client\n to match the corresponding function call `id`. */\n id?: string;\n /** Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. */\n name?: string;\n /** Required. The function response in JSON object format. Use \"output\" key to specify function output and \"error\" key to specify error details (if any). If \"output\" and \"error\" keys are not specified, then whole \"response\" is treated as function output. */\n response?: Record;\n}\n\n/** Content blob. */\nexport declare interface Blob {\n /** Required. Raw bytes. */\n data?: string;\n /** Required. The IANA standard MIME type of the source data. */\n mimeType?: string;\n}\n\n/** A datatype containing media content.\n\n Exactly one field within a Part should be set, representing the specific type\n of content being conveyed. Using multiple fields within the same `Part`\n instance is considered invalid.\n */\nexport declare interface Part {\n /** Metadata for a given video. */\n videoMetadata?: VideoMetadata;\n /** Indicates if the part is thought from the model. */\n thought?: boolean;\n /** Optional. Result of executing the [ExecutableCode]. */\n codeExecutionResult?: CodeExecutionResult;\n /** Optional. Code generated by the model that is meant to be executed. */\n executableCode?: ExecutableCode;\n /** Optional. URI based data. */\n fileData?: FileData;\n /** Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. */\n functionCall?: FunctionCall;\n /** Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. */\n functionResponse?: FunctionResponse;\n /** Optional. Inlined bytes data. */\n inlineData?: Blob;\n /** Optional. Text part (can be code). */\n text?: string;\n}\n/**\n * Creates a `Part` object from a `URI` string.\n */\nexport function createPartFromUri(uri: string, mimeType: string): Part {\n return {\n fileData: {\n fileUri: uri,\n mimeType: mimeType,\n },\n };\n}\n/**\n * Creates a `Part` object from a `text` string.\n */\nexport function createPartFromText(text: string): Part {\n return {\n text: text,\n };\n}\n/**\n * Creates a `Part` object from a `FunctionCall` object.\n */\nexport function createPartFromFunctionCall(\n name: string,\n args: Record,\n): Part {\n return {\n functionCall: {\n name: name,\n args: args,\n },\n };\n}\n/**\n * Creates a `Part` object from a `FunctionResponse` object.\n */\nexport function createPartFromFunctionResponse(\n id: string,\n name: string,\n response: Record,\n): Part {\n return {\n functionResponse: {\n id: id,\n name: name,\n response: response,\n },\n };\n}\n/**\n * Creates a `Part` object from a `base64` encoded `string`.\n */\nexport function createPartFromBase64(data: string, mimeType: string): Part {\n return {\n inlineData: {\n data: data,\n mimeType: mimeType,\n },\n };\n}\n/**\n * Creates a `Part` object from the `outcome` and `output` of a `CodeExecutionResult` object.\n */\nexport function createPartFromCodeExecutionResult(\n outcome: Outcome,\n output: string,\n): Part {\n return {\n codeExecutionResult: {\n outcome: outcome,\n output: output,\n },\n };\n}\n/**\n * Creates a `Part` object from the `code` and `language` of an `ExecutableCode` object.\n */\nexport function createPartFromExecutableCode(\n code: string,\n language: Language,\n): Part {\n return {\n executableCode: {\n code: code,\n language: language,\n },\n };\n}\n\n/** Contains the multi-part content of a message. */\nexport declare interface Content {\n /** List of parts that constitute a single message. Each part may have\n a different IANA MIME type. */\n parts?: Part[];\n /** Optional. The producer of the content. Must be either 'user' or\n 'model'. Useful to set for multi-turn conversations, otherwise can be\n empty. If role is not specified, SDK will determine the role. */\n role?: string;\n}\nfunction _isPart(obj: unknown): obj is Part {\n if (typeof obj === 'object' && obj !== null) {\n return (\n 'fileData' in obj ||\n 'text' in obj ||\n 'functionCall' in obj ||\n 'functionResponse' in obj ||\n 'inlineData' in obj ||\n 'videoMetadata' in obj ||\n 'codeExecutionResult' in obj ||\n 'executableCode' in obj\n );\n }\n return false;\n}\nfunction _toParts(partOrString: PartListUnion | string): Part[] {\n const parts: Part[] = [];\n if (typeof partOrString === 'string') {\n parts.push(createPartFromText(partOrString));\n } else if (_isPart(partOrString)) {\n parts.push(partOrString);\n } else if (Array.isArray(partOrString)) {\n if (partOrString.length === 0) {\n throw new Error('partOrString cannot be an empty array');\n }\n for (const part of partOrString) {\n if (typeof part === 'string') {\n parts.push(createPartFromText(part));\n } else if (_isPart(part)) {\n parts.push(part);\n } else {\n throw new Error('element in PartUnion must be a Part object or string');\n }\n }\n } else {\n throw new Error('partOrString must be a Part object, string, or array');\n }\n return parts;\n}\n/**\n * Creates a `Content` object with a user role from a `PartListUnion` object or `string`.\n */\nexport function createUserContent(\n partOrString: PartListUnion | string,\n): Content {\n return {\n role: 'user',\n parts: _toParts(partOrString),\n };\n}\n\n/**\n * Creates a `Content` object with a model role from a `PartListUnion` object or `string`.\n */\nexport function createModelContent(\n partOrString: PartListUnion | string,\n): Content {\n return {\n role: 'model',\n parts: _toParts(partOrString),\n };\n}\n/** HTTP options to be used in each of the requests. */\nexport declare interface HttpOptions {\n /** The base URL for the AI platform service endpoint. */\n baseUrl?: string;\n /** Specifies the version of the API to use. */\n apiVersion?: string;\n /** Additional HTTP headers to be sent with the request. */\n headers?: Record;\n /** Timeout for the request in milliseconds. */\n timeout?: number;\n /** Signal for the request. */\n signal?: AbortSignal;\n}\n\n/** Schema that defines the format of input and output data.\n\n Represents a select subset of an OpenAPI 3.0 schema object.\n */\nexport declare interface Schema {\n /** Optional. Example of the object. Will only populated when the object is the root. */\n example?: unknown;\n /** Optional. Pattern of the Type.STRING to restrict a string to a regular expression. */\n pattern?: string;\n /** Optional. Default value of the data. */\n default?: unknown;\n /** Optional. Maximum length of the Type.STRING */\n maxLength?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING */\n minLength?: string;\n /** Optional. Minimum number of the properties for Type.OBJECT. */\n minProperties?: string;\n /** Optional. Maximum number of the properties for Type.OBJECT. */\n maxProperties?: string;\n /** Optional. The value should be validated against any (one or more) of the subschemas in the list. */\n anyOf?: Schema[];\n /** Optional. The description of the data. */\n description?: string;\n /** Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:[\"EAST\", NORTH\", \"SOUTH\", \"WEST\"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:[\"101\", \"201\", \"301\"]} */\n enum?: string[];\n /** Optional. The format of the data. Supported formats: for NUMBER type: \"float\", \"double\" for INTEGER type: \"int32\", \"int64\" for STRING type: \"email\", \"byte\", etc */\n format?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. */\n items?: Schema;\n /** Optional. Maximum number of the elements for Type.ARRAY. */\n maxItems?: string;\n /** Optional. Maximum value of the Type.INTEGER and Type.NUMBER */\n maximum?: number;\n /** Optional. Minimum number of the elements for Type.ARRAY. */\n minItems?: string;\n /** Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER */\n minimum?: number;\n /** Optional. Indicates if the value may be null. */\n nullable?: boolean;\n /** Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. */\n properties?: Record;\n /** Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. */\n propertyOrdering?: string[];\n /** Optional. Required properties of Type.OBJECT. */\n required?: string[];\n /** Optional. The title of the Schema. */\n title?: string;\n /** Optional. The type of the data. */\n type?: Type;\n}\n\n/** Config for model selection. */\nexport declare interface ModelSelectionConfig {\n /** Options for feature selection preference. */\n featureSelectionPreference?: FeatureSelectionPreference;\n}\n\n/** Safety settings. */\nexport declare interface SafetySetting {\n /** Determines if the harm block method uses probability or probability\n and severity scores. */\n method?: HarmBlockMethod;\n /** Required. Harm category. */\n category?: HarmCategory;\n /** Required. The harm block threshold. */\n threshold?: HarmBlockThreshold;\n}\n\n/** Defines a function that the model can generate JSON inputs for.\n\n The inputs are based on `OpenAPI 3.0 specifications\n `_.\n */\nexport declare interface FunctionDeclaration {\n /** Describes the output from the function in the OpenAPI JSON Schema\n Object format. */\n response?: Schema;\n /** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */\n description?: string;\n /** Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. */\n name?: string;\n /** Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 */\n parameters?: Schema;\n}\n\n/** Tool to support Google Search in Model. Powered by Google. */\nexport declare interface GoogleSearch {}\n\n/** Describes the options to customize dynamic retrieval. */\nexport declare interface DynamicRetrievalConfig {\n /** The mode of the predictor to be used in dynamic retrieval. */\n mode?: DynamicRetrievalConfigMode;\n /** Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used. */\n dynamicThreshold?: number;\n}\n\n/** Tool to retrieve public web data for grounding, powered by Google. */\nexport declare interface GoogleSearchRetrieval {\n /** Specifies the dynamic retrieval configuration for the given source. */\n dynamicRetrievalConfig?: DynamicRetrievalConfig;\n}\n\n/** Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder */\nexport declare interface VertexAISearch {\n /** Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` */\n datastore?: string;\n /** Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` */\n engine?: string;\n}\n\n/** The definition of the Rag resource. */\nexport declare interface VertexRagStoreRagResource {\n /** Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` */\n ragCorpus?: string;\n /** Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field. */\n ragFileIds?: string[];\n}\n\n/** Config for filters. */\nexport declare interface RagRetrievalConfigFilter {\n /** Optional. String for metadata filtering. */\n metadataFilter?: string;\n /** Optional. Only returns contexts with vector distance smaller than the threshold. */\n vectorDistanceThreshold?: number;\n /** Optional. Only returns contexts with vector similarity larger than the threshold. */\n vectorSimilarityThreshold?: number;\n}\n\n/** Config for Hybrid Search. */\nexport declare interface RagRetrievalConfigHybridSearch {\n /** Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally. */\n alpha?: number;\n}\n\n/** Config for LlmRanker. */\nexport declare interface RagRetrievalConfigRankingLlmRanker {\n /** Optional. The model name used for ranking. Format: `gemini-1.5-pro` */\n modelName?: string;\n}\n\n/** Config for Rank Service. */\nexport declare interface RagRetrievalConfigRankingRankService {\n /** Optional. The model name of the rank service. Format: `semantic-ranker-512@latest` */\n modelName?: string;\n}\n\n/** Config for ranking and reranking. */\nexport declare interface RagRetrievalConfigRanking {\n /** Optional. Config for LlmRanker. */\n llmRanker?: RagRetrievalConfigRankingLlmRanker;\n /** Optional. Config for Rank Service. */\n rankService?: RagRetrievalConfigRankingRankService;\n}\n\n/** Specifies the context retrieval config. */\nexport declare interface RagRetrievalConfig {\n /** Optional. Config for filters. */\n filter?: RagRetrievalConfigFilter;\n /** Optional. Config for Hybrid Search. */\n hybridSearch?: RagRetrievalConfigHybridSearch;\n /** Optional. Config for ranking and reranking. */\n ranking?: RagRetrievalConfigRanking;\n /** Optional. The number of contexts to retrieve. */\n topK?: number;\n}\n\n/** Retrieve from Vertex RAG Store for grounding. */\nexport declare interface VertexRagStore {\n /** Optional. Deprecated. Please use rag_resources instead. */\n ragCorpora?: string[];\n /** Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. */\n ragResources?: VertexRagStoreRagResource[];\n /** Optional. The retrieval config for the Rag query. */\n ragRetrievalConfig?: RagRetrievalConfig;\n /** Optional. Number of top k results to return from the selected corpora. */\n similarityTopK?: number;\n /** Optional. Only return results with vector distance smaller than the threshold. */\n vectorDistanceThreshold?: number;\n}\n\n/** Defines a retrieval tool that model can call to access external knowledge. */\nexport declare interface Retrieval {\n /** Optional. Deprecated. This option is no longer supported. */\n disableAttribution?: boolean;\n /** Set to use data source powered by Vertex AI Search. */\n vertexAiSearch?: VertexAISearch;\n /** Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService. */\n vertexRagStore?: VertexRagStore;\n}\n\n/** Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. */\nexport declare interface ToolCodeExecution {}\n\n/** Tool details of a tool that the model may use to generate a response. */\nexport declare interface Tool {\n /** List of function declarations that the tool supports. */\n functionDeclarations?: FunctionDeclaration[];\n /** Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. */\n retrieval?: Retrieval;\n /** Optional. Google Search tool type. Specialized retrieval tool\n that is powered by Google Search. */\n googleSearch?: GoogleSearch;\n /** Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. */\n googleSearchRetrieval?: GoogleSearchRetrieval;\n /** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services. */\n codeExecution?: ToolCodeExecution;\n}\n\n/** Function calling config. */\nexport declare interface FunctionCallingConfig {\n /** Optional. Function calling mode. */\n mode?: FunctionCallingConfigMode;\n /** Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided. */\n allowedFunctionNames?: string[];\n}\n\n/** Tool config.\n\n This config is shared for all tools provided in the request.\n */\nexport declare interface ToolConfig {\n /** Optional. Function calling config. */\n functionCallingConfig?: FunctionCallingConfig;\n}\n\n/** The configuration for the prebuilt speaker to use. */\nexport declare interface PrebuiltVoiceConfig {\n /** The name of the prebuilt voice to use.\n */\n voiceName?: string;\n}\n\n/** The configuration for the voice to use. */\nexport declare interface VoiceConfig {\n /** The configuration for the speaker to use.\n */\n prebuiltVoiceConfig?: PrebuiltVoiceConfig;\n}\n\n/** The speech generation configuration. */\nexport declare interface SpeechConfig {\n /** The configuration for the speaker to use.\n */\n voiceConfig?: VoiceConfig;\n /** Language code (ISO 639. e.g. en-US) for the speech synthesization.\n Only available for Live API.\n */\n languageCode?: string;\n}\n\n/** The thinking features configuration. */\nexport declare interface ThinkingConfig {\n /** Indicates whether to include thoughts in the response. If true, thoughts are returned only if the model supports thought and thoughts are available.\n */\n includeThoughts?: boolean;\n /** Indicates the thinking budget in tokens.\n */\n thinkingBudget?: number;\n}\n\n/** When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. */\nexport declare interface GenerationConfigRoutingConfigAutoRoutingMode {\n /** The model routing preference. */\n modelRoutingPreference?:\n | 'UNKNOWN'\n | 'PRIORITIZE_QUALITY'\n | 'BALANCED'\n | 'PRIORITIZE_COST';\n}\n\n/** When manual routing is set, the specified model will be used directly. */\nexport declare interface GenerationConfigRoutingConfigManualRoutingMode {\n /** The model name to use. Only the public LLM models are accepted. e.g. 'gemini-1.5-pro-001'. */\n modelName?: string;\n}\n\n/** The configuration for routing the request to a specific model. */\nexport declare interface GenerationConfigRoutingConfig {\n /** Automated routing. */\n autoMode?: GenerationConfigRoutingConfigAutoRoutingMode;\n /** Manual routing. */\n manualMode?: GenerationConfigRoutingConfigManualRoutingMode;\n}\n\n/** Optional model configuration parameters.\n\n For more information, see `Content generation parameters\n `_.\n */\nexport declare interface GenerateContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Instructions for the model to steer it toward better performance.\n For example, \"Answer as concisely as possible\" or \"Don't use technical\n terms in your response\".\n */\n systemInstruction?: ContentUnion;\n /** Value that controls the degree of randomness in token selection.\n Lower temperatures are good for prompts that require a less open-ended or\n creative response, while higher temperatures can lead to more diverse or\n creative results.\n */\n temperature?: number;\n /** Tokens are selected from the most to least probable until the sum\n of their probabilities equals this value. Use a lower value for less\n random responses and a higher value for more random responses.\n */\n topP?: number;\n /** For each token selection step, the ``top_k`` tokens with the\n highest probabilities are sampled. Then tokens are further filtered based\n on ``top_p`` with the final token selected using temperature sampling. Use\n a lower number for less random responses and a higher number for more\n random responses.\n */\n topK?: number;\n /** Number of response variations to return.\n */\n candidateCount?: number;\n /** Maximum number of tokens that can be generated in the response.\n */\n maxOutputTokens?: number;\n /** List of strings that tells the model to stop generating text if one\n of the strings is encountered in the response.\n */\n stopSequences?: string[];\n /** Whether to return the log probabilities of the tokens that were\n chosen by the model at each step.\n */\n responseLogprobs?: boolean;\n /** Number of top candidate tokens to return the log probabilities for\n at each generation step.\n */\n logprobs?: number;\n /** Positive values penalize tokens that already appear in the\n generated text, increasing the probability of generating more diverse\n content.\n */\n presencePenalty?: number;\n /** Positive values penalize tokens that repeatedly appear in the\n generated text, increasing the probability of generating more diverse\n content.\n */\n frequencyPenalty?: number;\n /** When ``seed`` is fixed to a specific number, the model makes a best\n effort to provide the same response for repeated requests. By default, a\n random number is used.\n */\n seed?: number;\n /** Output response media type of the generated candidate text.\n */\n responseMimeType?: string;\n /** Schema that the generated candidate text must adhere to.\n */\n responseSchema?: SchemaUnion;\n /** Configuration for model router requests.\n */\n routingConfig?: GenerationConfigRoutingConfig;\n /** Configuration for model selection.\n */\n modelSelectionConfig?: ModelSelectionConfig;\n /** Safety settings in the request to block unsafe content in the\n response.\n */\n safetySettings?: SafetySetting[];\n /** Code that enables the system to interact with external systems to\n perform an action outside of the knowledge and scope of the model.\n */\n tools?: ToolListUnion;\n /** Associates model output to a specific function call.\n */\n toolConfig?: ToolConfig;\n /** Labels with user-defined metadata to break down billed charges. */\n labels?: Record;\n /** Resource name of a context cache that can be used in subsequent\n requests.\n */\n cachedContent?: string;\n /** The requested modalities of the response. Represents the set of\n modalities that the model can return.\n */\n responseModalities?: string[];\n /** If specified, the media resolution specified will be used.\n */\n mediaResolution?: MediaResolution;\n /** The speech generation configuration.\n */\n speechConfig?: SpeechConfigUnion;\n /** If enabled, audio timestamp will be included in the request to the\n model.\n */\n audioTimestamp?: boolean;\n /** The thinking features configuration.\n */\n thinkingConfig?: ThinkingConfig;\n}\n\n/** Config for models.generate_content parameters. */\nexport declare interface GenerateContentParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Content of the request.\n */\n contents: ContentListUnion;\n /** Configuration that contains optional model parameters.\n */\n config?: GenerateContentConfig;\n}\n\n/** Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp */\nexport declare interface GoogleTypeDate {\n /** Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */\n day?: number;\n /** Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */\n month?: number;\n /** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */\n year?: number;\n}\n\n/** Source attributions for content. */\nexport declare interface Citation {\n /** Output only. End index into the content. */\n endIndex?: number;\n /** Output only. License of the attribution. */\n license?: string;\n /** Output only. Publication date of the attribution. */\n publicationDate?: GoogleTypeDate;\n /** Output only. Start index into the content. */\n startIndex?: number;\n /** Output only. Title of the attribution. */\n title?: string;\n /** Output only. Url reference of the attribution. */\n uri?: string;\n}\n\n/** Citation information when the model quotes another source. */\nexport declare interface CitationMetadata {\n /** Contains citation information when the model directly quotes, at\n length, from another source. Can include traditional websites and code\n repositories.\n */\n citations?: Citation[];\n}\n\n/** Chunk from context retrieved by the retrieval tools. */\nexport declare interface GroundingChunkRetrievedContext {\n /** Text of the attribution. */\n text?: string;\n /** Title of the attribution. */\n title?: string;\n /** URI reference of the attribution. */\n uri?: string;\n}\n\n/** Chunk from the web. */\nexport declare interface GroundingChunkWeb {\n /** Domain of the (original) URI. */\n domain?: string;\n /** Title of the chunk. */\n title?: string;\n /** URI reference of the chunk. */\n uri?: string;\n}\n\n/** Grounding chunk. */\nexport declare interface GroundingChunk {\n /** Grounding chunk from context retrieved by the retrieval tools. */\n retrievedContext?: GroundingChunkRetrievedContext;\n /** Grounding chunk from the web. */\n web?: GroundingChunkWeb;\n}\n\n/** Segment of the content. */\nexport declare interface Segment {\n /** Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero. */\n endIndex?: number;\n /** Output only. The index of a Part object within its parent Content object. */\n partIndex?: number;\n /** Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero. */\n startIndex?: number;\n /** Output only. The text corresponding to the segment from the response. */\n text?: string;\n}\n\n/** Grounding support. */\nexport declare interface GroundingSupport {\n /** Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the grounding_chunk_indices. */\n confidenceScores?: number[];\n /** A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim. */\n groundingChunkIndices?: number[];\n /** Segment of the content this support belongs to. */\n segment?: Segment;\n}\n\n/** Metadata related to retrieval in the grounding flow. */\nexport declare interface RetrievalMetadata {\n /** Optional. Score indicating how likely information from Google Search could help answer the prompt. The score is in the range `[0, 1]`, where 0 is the least likely and 1 is the most likely. This score is only populated when Google Search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger Google Search. */\n googleSearchDynamicRetrievalScore?: number;\n}\n\n/** Google search entry point. */\nexport declare interface SearchEntryPoint {\n /** Optional. Web content snippet that can be embedded in a web page or an app webview. */\n renderedContent?: string;\n /** Optional. Base64 encoded JSON representing array of tuple. */\n sdkBlob?: string;\n}\n\n/** Metadata returned to client when grounding is enabled. */\nexport declare interface GroundingMetadata {\n /** List of supporting references retrieved from specified grounding source. */\n groundingChunks?: GroundingChunk[];\n /** Optional. List of grounding support. */\n groundingSupports?: GroundingSupport[];\n /** Optional. Output only. Retrieval metadata. */\n retrievalMetadata?: RetrievalMetadata;\n /** Optional. Queries executed by the retrieval tools. */\n retrievalQueries?: string[];\n /** Optional. Google search entry for the following-up web searches. */\n searchEntryPoint?: SearchEntryPoint;\n /** Optional. Web search queries for the following-up web search. */\n webSearchQueries?: string[];\n}\n\n/** Candidate for the logprobs token and score. */\nexport declare interface LogprobsResultCandidate {\n /** The candidate's log probability. */\n logProbability?: number;\n /** The candidate's token string value. */\n token?: string;\n /** The candidate's token id value. */\n tokenId?: number;\n}\n\n/** Candidates with top log probabilities at each decoding step. */\nexport declare interface LogprobsResultTopCandidates {\n /** Sorted by log probability in descending order. */\n candidates?: LogprobsResultCandidate[];\n}\n\n/** Logprobs Result */\nexport declare interface LogprobsResult {\n /** Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates. */\n chosenCandidates?: LogprobsResultCandidate[];\n /** Length = total number of decoding steps. */\n topCandidates?: LogprobsResultTopCandidates[];\n}\n\n/** Safety rating corresponding to the generated content. */\nexport declare interface SafetyRating {\n /** Output only. Indicates whether the content was filtered out because of this rating. */\n blocked?: boolean;\n /** Output only. Harm category. */\n category?: HarmCategory;\n /** Output only. Harm probability levels in the content. */\n probability?: HarmProbability;\n /** Output only. Harm probability score. */\n probabilityScore?: number;\n /** Output only. Harm severity levels in the content. */\n severity?: HarmSeverity;\n /** Output only. Harm severity score. */\n severityScore?: number;\n}\n\n/** A response candidate generated from the model. */\nexport declare interface Candidate {\n /** Contains the multi-part content of the response.\n */\n content?: Content;\n /** Source attribution of the generated content.\n */\n citationMetadata?: CitationMetadata;\n /** Describes the reason the model stopped generating tokens.\n */\n finishMessage?: string;\n /** Number of tokens for this candidate.\n */\n tokenCount?: number;\n /** The reason why the model stopped generating tokens.\n If empty, the model has not stopped generating the tokens.\n */\n finishReason?: FinishReason;\n /** Output only. Average log probability score of the candidate. */\n avgLogprobs?: number;\n /** Output only. Metadata specifies sources used to ground generated content. */\n groundingMetadata?: GroundingMetadata;\n /** Output only. Index of the candidate. */\n index?: number;\n /** Output only. Log-likelihood scores for the response tokens and top tokens */\n logprobsResult?: LogprobsResult;\n /** Output only. List of ratings for the safety of a response candidate. There is at most one rating per category. */\n safetyRatings?: SafetyRating[];\n}\n\n/** Content filter results for a prompt sent in the request. */\nexport class GenerateContentResponsePromptFeedback {\n /** Output only. Blocked reason. */\n blockReason?: BlockedReason;\n /** Output only. A readable block reason message. */\n blockReasonMessage?: string;\n /** Output only. Safety ratings. */\n safetyRatings?: SafetyRating[];\n}\n\n/** Represents token counting info for a single modality. */\nexport declare interface ModalityTokenCount {\n /** The modality associated with this token count. */\n modality?: MediaModality;\n /** Number of tokens. */\n tokenCount?: number;\n}\n\n/** Usage metadata about response(s). */\nexport class GenerateContentResponseUsageMetadata {\n /** Output only. List of modalities of the cached content in the request input. */\n cacheTokensDetails?: ModalityTokenCount[];\n /** Output only. Number of tokens in the cached part in the input (the cached content). */\n cachedContentTokenCount?: number;\n /** Number of tokens in the response(s). */\n candidatesTokenCount?: number;\n /** Output only. List of modalities that were returned in the response. */\n candidatesTokensDetails?: ModalityTokenCount[];\n /** Number of tokens in the request. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */\n promptTokenCount?: number;\n /** Output only. List of modalities that were processed in the request input. */\n promptTokensDetails?: ModalityTokenCount[];\n /** Output only. Number of tokens present in thoughts output. */\n thoughtsTokenCount?: number;\n /** Output only. Number of tokens present in tool-use prompt(s). */\n toolUsePromptTokenCount?: number;\n /** Output only. List of modalities that were processed for tool-use request inputs. */\n toolUsePromptTokensDetails?: ModalityTokenCount[];\n /** Total token count for prompt, response candidates, and tool-use prompts (if present). */\n totalTokenCount?: number;\n /** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */\n trafficType?: TrafficType;\n}\n\n/** Response message for PredictionService.GenerateContent. */\nexport class GenerateContentResponse {\n /** Response variations returned by the model.\n */\n candidates?: Candidate[];\n /** Timestamp when the request is made to the server.\n */\n createTime?: string;\n /** Identifier for each response.\n */\n responseId?: string;\n /** Output only. The model version used to generate the response. */\n modelVersion?: string;\n /** Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations. */\n promptFeedback?: GenerateContentResponsePromptFeedback;\n /** Usage metadata about the response(s). */\n usageMetadata?: GenerateContentResponseUsageMetadata;\n /**\n * Returns the concatenation of all text parts from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the text from the first\n * one will be returned.\n * If there are non-text parts in the response, the concatenation of all text\n * parts will be returned, and a warning will be logged.\n * If there are thought parts in the response, the concatenation of all text\n * parts excluding the thought parts will be returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'Why is the sky blue?',\n * });\n *\n * console.debug(response.text);\n * ```\n */\n get text(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning text from the first one.',\n );\n }\n let text = '';\n let anyTextPartText = false;\n const nonTextParts = [];\n for (const part of this.candidates?.[0]?.content?.parts ?? []) {\n for (const [fieldName, fieldValue] of Object.entries(part)) {\n if (\n fieldName !== 'text' &&\n fieldName !== 'thought' &&\n (fieldValue !== null || fieldValue !== undefined)\n ) {\n nonTextParts.push(fieldName);\n }\n }\n if (typeof part.text === 'string') {\n if (typeof part.thought === 'boolean' && part.thought) {\n continue;\n }\n anyTextPartText = true;\n text += part.text;\n }\n }\n if (nonTextParts.length > 0) {\n console.warn(\n `there are non-text parts ${nonTextParts} in the response, returning concatenation of all text parts. Please refer to the non text parts for a full response from model.`,\n );\n }\n // part.text === '' is different from part.text is null\n return anyTextPartText ? text : undefined;\n }\n\n /**\n * Returns the function calls from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the function calls from\n * the first one will be returned.\n * If there are no function calls in the response, undefined will be returned.\n *\n * @example\n * ```ts\n * const controlLightFunctionDeclaration: FunctionDeclaration = {\n * name: 'controlLight',\n * parameters: {\n * type: Type.OBJECT,\n * description: 'Set the brightness and color temperature of a room light.',\n * properties: {\n * brightness: {\n * type: Type.NUMBER,\n * description:\n * 'Light level from 0 to 100. Zero is off and 100 is full brightness.',\n * },\n * colorTemperature: {\n * type: Type.STRING,\n * description:\n * 'Color temperature of the light fixture which can be `daylight`, `cool` or `warm`.',\n * },\n * },\n * required: ['brightness', 'colorTemperature'],\n * };\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents: 'Dim the lights so the room feels cozy and warm.',\n * config: {\n * tools: [{functionDeclarations: [controlLightFunctionDeclaration]}],\n * toolConfig: {\n * functionCallingConfig: {\n * mode: FunctionCallingConfigMode.ANY,\n * allowedFunctionNames: ['controlLight'],\n * },\n * },\n * },\n * });\n * console.debug(JSON.stringify(response.functionCalls));\n * ```\n */\n get functionCalls(): FunctionCall[] | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning function calls from the first one.',\n );\n }\n const functionCalls = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.functionCall)\n .map((part) => part.functionCall)\n .filter(\n (functionCall): functionCall is FunctionCall =>\n functionCall !== undefined,\n );\n if (functionCalls?.length === 0) {\n return undefined;\n }\n return functionCalls;\n }\n /**\n * Returns the first executable code from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the executable code from\n * the first one will be returned.\n * If there are no executable code in the response, undefined will be\n * returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.'\n * config: {\n * tools: [{codeExecution: {}}],\n * },\n * });\n *\n * console.debug(response.executableCode);\n * ```\n */\n get executableCode(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning executable code from the first one.',\n );\n }\n const executableCode = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.executableCode)\n .map((part) => part.executableCode)\n .filter(\n (executableCode): executableCode is ExecutableCode =>\n executableCode !== undefined,\n );\n if (executableCode?.length === 0) {\n return undefined;\n }\n\n return executableCode?.[0]?.code;\n }\n /**\n * Returns the first code execution result from the first candidate in the response.\n *\n * @remarks\n * If there are multiple candidates in the response, the code execution result from\n * the first one will be returned.\n * If there are no code execution result in the response, undefined will be returned.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents:\n * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.'\n * config: {\n * tools: [{codeExecution: {}}],\n * },\n * });\n *\n * console.debug(response.codeExecutionResult);\n * ```\n */\n get codeExecutionResult(): string | undefined {\n if (this.candidates?.[0]?.content?.parts?.length === 0) {\n return undefined;\n }\n if (this.candidates && this.candidates.length > 1) {\n console.warn(\n 'there are multiple candidates in the response, returning code execution result from the first one.',\n );\n }\n const codeExecutionResult = this.candidates?.[0]?.content?.parts\n ?.filter((part) => part.codeExecutionResult)\n .map((part) => part.codeExecutionResult)\n .filter(\n (codeExecutionResult): codeExecutionResult is CodeExecutionResult =>\n codeExecutionResult !== undefined,\n );\n if (codeExecutionResult?.length === 0) {\n return undefined;\n }\n return codeExecutionResult?.[0]?.output;\n }\n}\n\nexport /** Optional parameters for the embed_content method. */\ndeclare interface EmbedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Type of task for which the embedding will be used.\n */\n taskType?: string;\n /** Title for the text. Only applicable when TaskType is\n `RETRIEVAL_DOCUMENT`.\n */\n title?: string;\n /** Reduced dimension for the output embedding. If set,\n excessive values in the output embedding are truncated from the end.\n Supported by newer models since 2024 only. You cannot set this value if\n using the earlier model (`models/embedding-001`).\n */\n outputDimensionality?: number;\n /** Vertex API only. The MIME type of the input.\n */\n mimeType?: string;\n /** Vertex API only. Whether to silently truncate inputs longer than\n the max sequence length. If this option is set to false, oversized inputs\n will lead to an INVALID_ARGUMENT error, similar to other text APIs.\n */\n autoTruncate?: boolean;\n}\n\n/** Parameters for the embed_content method. */\nexport declare interface EmbedContentParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** The content to embed. Only the `parts.text` fields will be counted.\n */\n contents: ContentListUnion;\n /** Configuration that contains optional parameters.\n */\n config?: EmbedContentConfig;\n}\n\n/** Statistics of the input text associated with the result of content embedding. */\nexport declare interface ContentEmbeddingStatistics {\n /** Vertex API only. If the input text was truncated due to having\n a length longer than the allowed maximum input.\n */\n truncated?: boolean;\n /** Vertex API only. Number of tokens of the input text.\n */\n tokenCount?: number;\n}\n\n/** The embedding generated from an input content. */\nexport declare interface ContentEmbedding {\n /** A list of floats representing an embedding.\n */\n values?: number[];\n /** Vertex API only. Statistics of the input text associated with this\n embedding.\n */\n statistics?: ContentEmbeddingStatistics;\n}\n\n/** Request-level metadata for the Vertex Embed Content API. */\nexport declare interface EmbedContentMetadata {\n /** Vertex API only. The total number of billable characters included\n in the request.\n */\n billableCharacterCount?: number;\n}\n\n/** Response for the embed_content method. */\nexport class EmbedContentResponse {\n /** The embeddings for each request, in the same order as provided in\n the batch request.\n */\n embeddings?: ContentEmbedding[];\n /** Vertex API only. Metadata about the request.\n */\n metadata?: EmbedContentMetadata;\n}\n\n/** The config for generating an images. */\nexport declare interface GenerateImagesConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Cloud Storage URI used to store the generated images.\n */\n outputGcsUri?: string;\n /** Description of what to discourage in the generated images.\n */\n negativePrompt?: string;\n /** Number of images to generate.\n */\n numberOfImages?: number;\n /** Aspect ratio of the generated images.\n */\n aspectRatio?: string;\n /** Controls how much the model adheres to the text prompt. Large\n values increase output and prompt alignment, but may compromise image\n quality.\n */\n guidanceScale?: number;\n /** Random seed for image generation. This is not available when\n ``add_watermark`` is set to true.\n */\n seed?: number;\n /** Filter level for safety filtering.\n */\n safetyFilterLevel?: SafetyFilterLevel;\n /** Allows generation of people by the model.\n */\n personGeneration?: PersonGeneration;\n /** Whether to report the safety scores of each generated image and\n the positive prompt in the response.\n */\n includeSafetyAttributes?: boolean;\n /** Whether to include the Responsible AI filter reason if the image\n is filtered out of the response.\n */\n includeRaiReason?: boolean;\n /** Language of the text in the prompt.\n */\n language?: ImagePromptLanguage;\n /** MIME type of the generated image.\n */\n outputMimeType?: string;\n /** Compression quality of the generated image (for ``image/jpeg``\n only).\n */\n outputCompressionQuality?: number;\n /** Whether to add a watermark to the generated images.\n */\n addWatermark?: boolean;\n /** Whether to use the prompt rewriting logic.\n */\n enhancePrompt?: boolean;\n}\n\n/** The parameters for generating images. */\nexport declare interface GenerateImagesParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Text prompt that typically describes the images to output.\n */\n prompt: string;\n /** Configuration for generating images.\n */\n config?: GenerateImagesConfig;\n}\n\n/** An image. */\nexport declare interface Image {\n /** The Cloud Storage URI of the image. ``Image`` can contain a value\n for this field or the ``image_bytes`` field but not both.\n */\n gcsUri?: string;\n /** The image bytes data. ``Image`` can contain a value for this field\n or the ``gcs_uri`` field but not both.\n */\n imageBytes?: string;\n /** The MIME type of the image. */\n mimeType?: string;\n}\n\n/** Safety attributes of a GeneratedImage or the user-provided prompt. */\nexport declare interface SafetyAttributes {\n /** List of RAI categories.\n */\n categories?: string[];\n /** List of scores of each categories.\n */\n scores?: number[];\n /** Internal use only.\n */\n contentType?: string;\n}\n\n/** An output image. */\nexport declare interface GeneratedImage {\n /** The output image data.\n */\n image?: Image;\n /** Responsible AI filter reason if the image is filtered out of the\n response.\n */\n raiFilteredReason?: string;\n /** Safety attributes of the image. Lists of RAI categories and their\n scores of each content.\n */\n safetyAttributes?: SafetyAttributes;\n /** The rewritten prompt used for the image generation if the prompt\n enhancer is enabled.\n */\n enhancedPrompt?: string;\n}\n\n/** The output images response. */\nexport class GenerateImagesResponse {\n /** List of generated images.\n */\n generatedImages?: GeneratedImage[];\n /** Safety attributes of the positive prompt. Only populated if\n ``include_safety_attributes`` is set to True.\n */\n positivePromptSafetyAttributes?: SafetyAttributes;\n}\n\n/** Optional parameters for models.get method. */\nexport declare interface GetModelConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\nexport declare interface GetModelParameters {\n model: string;\n /** Optional parameters for the request. */\n config?: GetModelConfig;\n}\n\n/** An endpoint where you deploy models. */\nexport declare interface Endpoint {\n /** Resource name of the endpoint. */\n name?: string;\n /** ID of the model that's deployed to the endpoint. */\n deployedModelId?: string;\n}\n\n/** A tuned machine learning model. */\nexport declare interface TunedModelInfo {\n /** ID of the base model that you want to tune. */\n baseModel?: string;\n /** Date and time when the base model was created. */\n createTime?: string;\n /** Date and time when the base model was last updated. */\n updateTime?: string;\n}\n\n/** A trained machine learning model. */\nexport declare interface Model {\n /** Resource name of the model. */\n name?: string;\n /** Display name of the model. */\n displayName?: string;\n /** Description of the model. */\n description?: string;\n /** Version ID of the model. A new version is committed when a new\n model version is uploaded or trained under an existing model ID. The\n version ID is an auto-incrementing decimal number in string\n representation. */\n version?: string;\n /** List of deployed models created from this base model. Note that a\n model could have been deployed to endpoints in different locations. */\n endpoints?: Endpoint[];\n /** Labels with user-defined metadata to organize your models. */\n labels?: Record;\n /** Information about the tuned model from the base model. */\n tunedModelInfo?: TunedModelInfo;\n /** The maximum number of input tokens that the model can handle. */\n inputTokenLimit?: number;\n /** The maximum number of output tokens that the model can generate. */\n outputTokenLimit?: number;\n /** List of actions that are supported by the model. */\n supportedActions?: string[];\n}\n\n/** Generation config. */\nexport declare interface GenerationConfig {\n /** Optional. If enabled, audio timestamp will be included in the request to the model. */\n audioTimestamp?: boolean;\n /** Optional. Number of candidates to generate. */\n candidateCount?: number;\n /** Optional. Frequency penalties. */\n frequencyPenalty?: number;\n /** Optional. Logit probabilities. */\n logprobs?: number;\n /** Optional. The maximum number of output tokens to generate per message. */\n maxOutputTokens?: number;\n /** Optional. If specified, the media resolution specified will be used. */\n mediaResolution?: MediaResolution;\n /** Optional. Positive penalties. */\n presencePenalty?: number;\n /** Optional. If true, export the logprobs results in response. */\n responseLogprobs?: boolean;\n /** Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature. */\n responseMimeType?: string;\n /** Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response. */\n responseSchema?: Schema;\n /** Optional. Routing configuration. */\n routingConfig?: GenerationConfigRoutingConfig;\n /** Optional. Seed. */\n seed?: number;\n /** Optional. Stop sequences. */\n stopSequences?: string[];\n /** Optional. Controls the randomness of predictions. */\n temperature?: number;\n /** Optional. If specified, top-k sampling will be used. */\n topK?: number;\n /** Optional. If specified, nucleus sampling will be used. */\n topP?: number;\n}\n\n/** Config for the count_tokens method. */\nexport declare interface CountTokensConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Instructions for the model to steer it toward better performance.\n */\n systemInstruction?: ContentUnion;\n /** Code that enables the system to interact with external systems to\n perform an action outside of the knowledge and scope of the model.\n */\n tools?: Tool[];\n /** Configuration that the model uses to generate the response. Not\n supported by the Gemini Developer API.\n */\n generationConfig?: GenerationConfig;\n}\n\n/** Parameters for counting tokens. */\nexport declare interface CountTokensParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Input content. */\n contents: ContentListUnion;\n /** Configuration for counting tokens. */\n config?: CountTokensConfig;\n}\n\n/** Response for counting tokens. */\nexport class CountTokensResponse {\n /** Total number of tokens. */\n totalTokens?: number;\n /** Number of tokens in the cached part of the prompt (the cached content). */\n cachedContentTokenCount?: number;\n}\n\n/** Optional parameters for computing tokens. */\nexport declare interface ComputeTokensConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for computing tokens. */\nexport declare interface ComputeTokensParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** Input content. */\n contents: ContentListUnion;\n /** Optional parameters for the request.\n */\n config?: ComputeTokensConfig;\n}\n\n/** Tokens info with a list of tokens and the corresponding list of token ids. */\nexport declare interface TokensInfo {\n /** Optional. Optional fields for the role from the corresponding Content. */\n role?: string;\n /** A list of token ids from the input. */\n tokenIds?: string[];\n /** A list of tokens from the input. */\n tokens?: string[];\n}\n\n/** Response for computing tokens. */\nexport class ComputeTokensResponse {\n /** Lists of tokens info from the input. A ComputeTokensRequest could have multiple instances with a prompt in each instance. We also need to return lists of tokens info for the request with multiple instances. */\n tokensInfo?: TokensInfo[];\n}\n\n/** Configuration for generating videos. */\nexport declare interface GenerateVideosConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Number of output videos. */\n numberOfVideos?: number;\n /** The gcs bucket where to save the generated videos. */\n outputGcsUri?: string;\n /** Frames per second for video generation. */\n fps?: number;\n /** Duration of the clip for video generation in seconds. */\n durationSeconds?: number;\n /** The RNG seed. If RNG seed is exactly same for each request with unchanged inputs, the prediction results will be consistent. Otherwise, a random RNG seed will be used each time to produce a different result. */\n seed?: number;\n /** The aspect ratio for the generated video. 16:9 (landscape) and 9:16 (portrait) are supported. */\n aspectRatio?: string;\n /** The resolution for the generated video. 1280x720, 1920x1080 are supported. */\n resolution?: string;\n /** Whether allow to generate person videos, and restrict to specific ages. Supported values are: dont_allow, allow_adult. */\n personGeneration?: string;\n /** The pubsub topic where to publish the video generation progress. */\n pubsubTopic?: string;\n /** Optional field in addition to the text content. Negative prompts can be explicitly stated here to help generate the video. */\n negativePrompt?: string;\n /** Whether to use the prompt rewriting logic. */\n enhancePrompt?: boolean;\n}\n\n/** Class that represents the parameters for generating an image. */\nexport declare interface GenerateVideosParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** The text prompt for generating the videos. Optional for image to video use cases. */\n prompt?: string;\n /** The input image for generating the videos.\n Optional if prompt is provided. */\n image?: Image;\n /** Configuration for generating videos. */\n config?: GenerateVideosConfig;\n}\n\n/** A generated video. */\nexport declare interface Video {\n /** Path to another storage. */\n uri?: string;\n /** Video bytes. */\n videoBytes?: string;\n /** Video encoding, for example \"video/mp4\". */\n mimeType?: string;\n}\n\n/** A generated video. */\nexport declare interface GeneratedVideo {\n /** The output video */\n video?: Video;\n}\n\n/** Response with generated videos. */\nexport class GenerateVideosResponse {\n /** List of the generated videos */\n generatedVideos?: GeneratedVideo[];\n /** Returns if any videos were filtered due to RAI policies. */\n raiMediaFilteredCount?: number;\n /** Returns rai failure reasons if any. */\n raiMediaFilteredReasons?: string[];\n}\n\n/** A video generation operation. */\nexport declare interface GenerateVideosOperation {\n /** The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. */\n name?: string;\n /** Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. */\n metadata?: Record;\n /** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */\n done?: boolean;\n /** The error result of the operation in case of failure or cancellation. */\n error?: Record;\n /** The generated videos. */\n response?: GenerateVideosResponse;\n}\n\n/** Optional configuration for cached content creation. */\nexport declare interface CreateCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: \"3.5s\". */\n ttl?: string;\n /** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */\n expireTime?: string;\n /** The user-generated meaningful display name of the cached content.\n */\n displayName?: string;\n /** The content to cache.\n */\n contents?: ContentListUnion;\n /** Developer set system instruction.\n */\n systemInstruction?: ContentUnion;\n /** A list of `Tools` the model may use to generate the next response.\n */\n tools?: Tool[];\n /** Configuration for the tools to use. This config is shared for all tools.\n */\n toolConfig?: ToolConfig;\n}\n\n/** Parameters for caches.create method. */\nexport declare interface CreateCachedContentParameters {\n /** ID of the model to use. Example: gemini-1.5-flash */\n model: string;\n /** Configuration that contains optional parameters.\n */\n config?: CreateCachedContentConfig;\n}\n\n/** Metadata on the usage of the cached content. */\nexport declare interface CachedContentUsageMetadata {\n /** Duration of audio in seconds. */\n audioDurationSeconds?: number;\n /** Number of images. */\n imageCount?: number;\n /** Number of text characters. */\n textCount?: number;\n /** Total number of tokens that the cached content consumes. */\n totalTokenCount?: number;\n /** Duration of video in seconds. */\n videoDurationSeconds?: number;\n}\n\n/** A resource used in LLM queries for users to explicitly specify what to cache. */\nexport declare interface CachedContent {\n /** The server-generated resource name of the cached content. */\n name?: string;\n /** The user-generated meaningful display name of the cached content. */\n displayName?: string;\n /** The name of the publisher model to use for cached content. */\n model?: string;\n /** Creation time of the cache entry. */\n createTime?: string;\n /** When the cache entry was last updated in UTC time. */\n updateTime?: string;\n /** Expiration time of the cached content. */\n expireTime?: string;\n /** Metadata on the usage of the cached content. */\n usageMetadata?: CachedContentUsageMetadata;\n}\n\n/** Optional parameters for caches.get method. */\nexport declare interface GetCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for caches.get method. */\nexport declare interface GetCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Optional parameters for the request.\n */\n config?: GetCachedContentConfig;\n}\n\n/** Optional parameters for caches.delete method. */\nexport declare interface DeleteCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for caches.delete method. */\nexport declare interface DeleteCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Optional parameters for the request.\n */\n config?: DeleteCachedContentConfig;\n}\n\n/** Empty response for caches.delete method. */\nexport class DeleteCachedContentResponse {}\n\n/** Optional parameters for caches.update method. */\nexport declare interface UpdateCachedContentConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: \"3.5s\". */\n ttl?: string;\n /** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */\n expireTime?: string;\n}\n\nexport declare interface UpdateCachedContentParameters {\n /** The server-generated resource name of the cached content.\n */\n name: string;\n /** Configuration that contains optional parameters.\n */\n config?: UpdateCachedContentConfig;\n}\n\n/** Config for caches.list method. */\nexport declare interface ListCachedContentsConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n pageSize?: number;\n pageToken?: string;\n}\n\n/** Parameters for caches.list method. */\nexport declare interface ListCachedContentsParameters {\n /** Configuration that contains optional parameters.\n */\n config?: ListCachedContentsConfig;\n}\n\nexport class ListCachedContentsResponse {\n nextPageToken?: string;\n /** List of cached contents.\n */\n cachedContents?: CachedContent[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface ListFilesConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n pageSize?: number;\n pageToken?: string;\n}\n\n/** Generates the parameters for the list method. */\nexport declare interface ListFilesParameters {\n /** Used to override the default configuration. */\n config?: ListFilesConfig;\n}\n\n/** Status of a File that uses a common error model. */\nexport declare interface FileStatus {\n /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */\n details?: Record[];\n /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */\n message?: string;\n /** The status code. 0 for OK, 1 for CANCELLED */\n code?: number;\n}\n\n/** A file uploaded to the API. */\nexport declare interface File {\n /** The `File` resource name. The ID (name excluding the \"files/\" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be generated. Example: `files/123-456` */\n name?: string;\n /** Optional. The human-readable display name for the `File`. The display name must be no more than 512 characters in length, including spaces. Example: 'Welcome Image' */\n displayName?: string;\n /** Output only. MIME type of the file. */\n mimeType?: string;\n /** Output only. Size of the file in bytes. */\n sizeBytes?: string;\n /** Output only. The timestamp of when the `File` was created. */\n createTime?: string;\n /** Output only. The timestamp of when the `File` will be deleted. Only set if the `File` is scheduled to expire. */\n expirationTime?: string;\n /** Output only. The timestamp of when the `File` was last updated. */\n updateTime?: string;\n /** Output only. SHA-256 hash of the uploaded bytes. The hash value is encoded in base64 format. */\n sha256Hash?: string;\n /** Output only. The URI of the `File`. */\n uri?: string;\n /** Output only. The URI of the `File`, only set for downloadable (generated) files. */\n downloadUri?: string;\n /** Output only. Processing state of the File. */\n state?: FileState;\n /** Output only. The source of the `File`. */\n source?: FileSource;\n /** Output only. Metadata for a video. */\n videoMetadata?: Record;\n /** Output only. Error status if File processing failed. */\n error?: FileStatus;\n}\n\n/** Response for the list files method. */\nexport class ListFilesResponse {\n /** A token to retrieve next page of results. */\n nextPageToken?: string;\n /** The list of files. */\n files?: File[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface CreateFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the private _create method. */\nexport declare interface CreateFileParameters {\n /** The file to be uploaded.\n mime_type: (Required) The MIME type of the file. Must be provided.\n name: (Optional) The name of the file in the destination (e.g.\n 'files/sample-image').\n display_name: (Optional) The display name of the file.\n */\n file: File;\n /** Used to override the default configuration. */\n config?: CreateFileConfig;\n}\n\n/** A wrapper class for the http response. */\nexport class HttpResponse {\n /** Used to retain the processed HTTP headers in the response. */\n headers?: Record;\n /**\n * The original http response.\n */\n responseInternal: Response;\n\n constructor(response: Response) {\n // Process the headers.\n const headers: Record = {};\n for (const pair of response.headers.entries()) {\n headers[pair[0]] = pair[1];\n }\n this.headers = headers;\n\n // Keep the original response.\n this.responseInternal = response;\n }\n\n json(): Promise {\n return this.responseInternal.json();\n }\n}\n\n/** Callbacks for the live API. */\nexport interface LiveCallbacks {\n /**\n * Called when the websocket connection is established.\n */\n onopen?: (() => void) | null;\n /**\n * Called when a message is received from the server.\n */\n onmessage: (e: LiveServerMessage) => void;\n /**\n * Called when an error occurs.\n */\n onerror?: ((e: ErrorEvent) => void) | null;\n /**\n * Called when the websocket connection is closed.\n */\n onclose?: ((e: CloseEvent) => void) | null;\n}\n\n/** Parameters for the upload file method. */\nexport interface UploadFileParameters {\n /** The string path to the file to be uploaded or a Blob object. */\n file: string | globalThis.Blob;\n /** Configuration that contains optional parameters. */\n config?: UploadFileConfig;\n}\n/** Response for the create file method. */\nexport class CreateFileResponse {\n /** Used to retain the full HTTP response. */\n sdkHttpResponse?: HttpResponse;\n}\n\n/** Used to override the default configuration. */\nexport declare interface GetFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the get method. */\nexport declare interface GetFileParameters {\n /** The name identifier for the file to retrieve. */\n name: string;\n /** Used to override the default configuration. */\n config?: GetFileConfig;\n}\n\n/** Used to override the default configuration. */\nexport declare interface DeleteFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Generates the parameters for the get method. */\nexport declare interface DeleteFileParameters {\n /** The name identifier for the file to be deleted. */\n name: string;\n /** Used to override the default configuration. */\n config?: DeleteFileConfig;\n}\n\n/** Response for the delete file method. */\nexport class DeleteFileResponse {}\n\nexport declare interface GetOperationConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for the GET method. */\nexport declare interface GetOperationParameters {\n /** The server-assigned name for the operation. */\n operationName: string;\n /** Used to override the default configuration. */\n config?: GetOperationConfig;\n}\n\nexport declare interface FetchPredictOperationConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Parameters for the fetchPredictOperation method. */\nexport declare interface FetchPredictOperationParameters {\n /** The server-assigned name for the operation. */\n operationName: string;\n resourceName: string;\n /** Used to override the default configuration. */\n config?: FetchPredictOperationConfig;\n}\n\nexport declare interface TestTableItem {\n /** The name of the test. This is used to derive the replay id. */\n name?: string;\n /** The parameters to the test. Use pydantic models. */\n parameters?: Record;\n /** Expects an exception for MLDev matching the string. */\n exceptionIfMldev?: string;\n /** Expects an exception for Vertex matching the string. */\n exceptionIfVertex?: string;\n /** Use if you don't want to use the default replay id which is derived from the test name. */\n overrideReplayId?: string;\n /** True if the parameters contain an unsupported union type. This test will be skipped for languages that do not support the union type. */\n hasUnion?: boolean;\n /** When set to a reason string, this test will be skipped in the API mode. Use this flag for tests that can not be reproduced with the real API. E.g. a test that deletes a resource. */\n skipInApiMode?: string;\n /** Keys to ignore when comparing the request and response. This is useful for tests that are not deterministic. */\n ignoreKeys?: string[];\n}\n\nexport declare interface TestTableFile {\n comment?: string;\n testMethod?: string;\n parameterNames?: string[];\n testTable?: TestTableItem[];\n}\n\n/** Represents a single request in a replay. */\nexport declare interface ReplayRequest {\n method?: string;\n url?: string;\n headers?: Record;\n bodySegments?: Record[];\n}\n\n/** Represents a single response in a replay. */\nexport class ReplayResponse {\n statusCode?: number;\n headers?: Record;\n bodySegments?: Record[];\n sdkResponseSegments?: Record[];\n}\n\n/** Represents a single interaction, request and response in a replay. */\nexport declare interface ReplayInteraction {\n request?: ReplayRequest;\n response?: ReplayResponse;\n}\n\n/** Represents a recorded session. */\nexport declare interface ReplayFile {\n replayId?: string;\n interactions?: ReplayInteraction[];\n}\n\n/** Used to override the default configuration. */\nexport declare interface UploadFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** The name of the file in the destination (e.g., 'files/sample-image'. If not provided one will be generated. */\n name?: string;\n /** mime_type: The MIME type of the file. If not provided, it will be inferred from the file extension. */\n mimeType?: string;\n /** Optional display name of the file. */\n displayName?: string;\n}\n\n/** Used to override the default configuration. */\nexport declare interface DownloadFileConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n}\n\n/** Configuration for upscaling an image.\n\n For more information on this configuration, refer to\n the `Imagen API reference documentation\n `_.\n */\nexport declare interface UpscaleImageConfig {\n /** Used to override HTTP request options. */\n httpOptions?: HttpOptions;\n /** Whether to include a reason for filtered-out images in the\n response. */\n includeRaiReason?: boolean;\n /** The image format that the output should be saved as. */\n outputMimeType?: string;\n /** The level of compression if the ``output_mime_type`` is\n ``image/jpeg``. */\n outputCompressionQuality?: number;\n}\n\n/** User-facing config UpscaleImageParameters. */\nexport declare interface UpscaleImageParameters {\n /** The model to use. */\n model: string;\n /** The input image to upscale. */\n image: Image;\n /** The factor to upscale the image (x2 or x4). */\n upscaleFactor: string;\n /** Configuration for upscaling. */\n config?: UpscaleImageConfig;\n}\n\n/** A raw reference image.\n\n A raw reference image represents the base image to edit, provided by the user.\n It can optionally be provided in addition to a mask reference image or\n a style reference image.\n */\nexport declare interface RawReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n}\n\n/** Configuration for a Mask reference image. */\nexport declare interface MaskReferenceConfig {\n /** Prompts the model to generate a mask instead of you needing to\n provide one (unless MASK_MODE_USER_PROVIDED is used). */\n maskMode?: MaskReferenceMode;\n /** A list of up to 5 class ids to use for semantic segmentation.\n Automatically creates an image mask based on specific objects. */\n segmentationClasses?: number[];\n /** Dilation percentage of the mask provided.\n Float between 0 and 1. */\n maskDilation?: number;\n}\n\n/** A mask reference image.\n\n This encapsulates either a mask image provided by the user and configs for\n the user provided mask, or only config parameters for the model to generate\n a mask.\n\n A mask image is an image whose non-zero values indicate where to edit the base\n image. If the user provides a mask image, the mask must be in the same\n dimensions as the raw image.\n */\nexport declare interface MaskReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the mask reference image. */\n config?: MaskReferenceConfig;\n}\n\n/** Configuration for a Control reference image. */\nexport declare interface ControlReferenceConfig {\n /** The type of control reference image to use. */\n controlType?: ControlReferenceType;\n /** Defaults to False. When set to True, the control image will be\n computed by the model based on the control type. When set to False,\n the control image must be provided by the user. */\n enableControlImageComputation?: boolean;\n}\n\n/** A control reference image.\n\n The image of the control reference image is either a control image provided\n by the user, or a regular image which the backend will use to generate a\n control image of. In the case of the latter, the\n enable_control_image_computation field in the config should be set to True.\n\n A control image is an image that represents a sketch image of areas for the\n model to fill in based on the prompt.\n */\nexport declare interface ControlReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the control reference image. */\n config?: ControlReferenceConfig;\n}\n\n/** Configuration for a Style reference image. */\nexport declare interface StyleReferenceConfig {\n /** A text description of the style to use for the generated image. */\n styleDescription?: string;\n}\n\n/** A style reference image.\n\n This encapsulates a style reference image provided by the user, and\n additionally optional config parameters for the style reference image.\n\n A raw reference image can also be provided as a destination for the style to\n be applied to.\n */\nexport declare interface StyleReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the style reference image. */\n config?: StyleReferenceConfig;\n}\n\n/** Configuration for a Subject reference image. */\nexport declare interface SubjectReferenceConfig {\n /** The subject type of a subject reference image. */\n subjectType?: SubjectReferenceType;\n /** Subject description for the image. */\n subjectDescription?: string;\n}\n\n/** A subject reference image.\n\n This encapsulates a subject reference image provided by the user, and\n additionally optional config parameters for the subject reference image.\n\n A raw reference image can also be provided as a destination for the subject to\n be applied to.\n */\nexport declare interface SubjectReferenceImage {\n /** The reference image for the editing operation. */\n referenceImage?: Image;\n /** The id of the reference image. */\n referenceId?: number;\n /** The type of the reference image. Only set by the SDK. */\n referenceType?: string;\n /** Configuration for the subject reference image. */\n config?: SubjectReferenceConfig;\n}\n\n/** Sent in response to a `LiveGenerateContentSetup` message from the client. */\nexport declare interface LiveServerSetupComplete {}\n\n/** Incremental server update generated by the model in response to client messages.\n\n Content is generated as quickly as possible, and not in real time. Clients\n may choose to buffer and play it out in real time.\n */\nexport declare interface LiveServerContent {\n /** The content that the model has generated as part of the current conversation with the user. */\n modelTurn?: Content;\n /** If true, indicates that the model is done generating. Generation will only start in response to additional client messages. Can be set alongside `content`, indicating that the `content` is the last in the turn. */\n turnComplete?: boolean;\n /** If true, indicates that a client message has interrupted current model generation. If the client is playing out the content in realtime, this is a good signal to stop and empty the current queue. */\n interrupted?: boolean;\n /** If true, indicates that the model is done generating. When model is\n interrupted while generating there will be no generation_complete message\n in interrupted turn, it will go through interrupted > turn_complete.\n When model assumes realtime playback there will be delay between\n generation_complete and turn_complete that is caused by model\n waiting for playback to finish. If true, indicates that the model\n has finished generating all content. This is a signal to the client\n that it can stop sending messages. */\n generationComplete?: boolean;\n}\n\n/** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */\nexport declare interface LiveServerToolCall {\n /** The function call to be executed. */\n functionCalls?: FunctionCall[];\n}\n\n/** Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled.\n\n If there were side-effects to those tool calls, clients may attempt to undo\n the tool calls. This message occurs only in cases where the clients interrupt\n server turns.\n */\nexport declare interface LiveServerToolCallCancellation {\n /** The ids of the tool calls to be cancelled. */\n ids?: string[];\n}\n\n/** Usage metadata about response(s). */\nexport declare interface UsageMetadata {\n /** Number of tokens in the prompt. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */\n promptTokenCount?: number;\n /** Number of tokens in the cached part of the prompt (the cached content). */\n cachedContentTokenCount?: number;\n /** Total number of tokens across all the generated response candidates. */\n responseTokenCount?: number;\n /** Number of tokens present in tool-use prompt(s). */\n toolUsePromptTokenCount?: number;\n /** Number of tokens of thoughts for thinking models. */\n thoughtsTokenCount?: number;\n /** Total token count for prompt, response candidates, and tool-use prompts(if present). */\n totalTokenCount?: number;\n /** List of modalities that were processed in the request input. */\n promptTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were processed in the cache input. */\n cacheTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were returned in the response. */\n responseTokensDetails?: ModalityTokenCount[];\n /** List of modalities that were processed in the tool-use prompt. */\n toolUsePromptTokensDetails?: ModalityTokenCount[];\n /** Traffic type. This shows whether a request consumes Pay-As-You-Go\n or Provisioned Throughput quota. */\n trafficType?: TrafficType;\n}\n\n/** Server will not be able to service client soon. */\nexport declare interface LiveServerGoAway {\n /** The remaining time before the connection will be terminated as ABORTED. The minimal time returned here is specified differently together with the rate limits for a given model. */\n timeLeft?: string;\n}\n\n/** Update of the session resumption state.\n\n Only sent if `session_resumption` was set in the connection config.\n */\nexport declare interface LiveServerSessionResumptionUpdate {\n /** New handle that represents state that can be resumed. Empty if `resumable`=false. */\n newHandle?: string;\n /** True if session can be resumed at this point. It might be not possible to resume session at some points. In that case we send update empty new_handle and resumable=false. Example of such case could be model executing function calls or just generating. Resuming session (using previous session token) in such state will result in some data loss. */\n resumable?: boolean;\n /** Index of last message sent by client that is included in state represented by this SessionResumptionToken. Only sent when `SessionResumptionConfig.transparent` is set.\n\nPresence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `SessionResmumptionTokenUpdate`. This field will enable them to limit buffering (avoid keeping all requests in RAM).\n\nNote: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames arelikely not needed. */\n lastConsumedClientMessageIndex?: string;\n}\n\n/** Response message for API call. */\nexport declare interface LiveServerMessage {\n /** Sent in response to a `LiveClientSetup` message from the client. */\n setupComplete?: LiveServerSetupComplete;\n /** Content generated by the model in response to client messages. */\n serverContent?: LiveServerContent;\n /** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */\n toolCall?: LiveServerToolCall;\n /** Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled. */\n toolCallCancellation?: LiveServerToolCallCancellation;\n /** Usage metadata about model response(s). */\n usageMetadata?: UsageMetadata;\n /** Server will disconnect soon. */\n goAway?: LiveServerGoAway;\n /** Update of the session resumption state. */\n sessionResumptionUpdate?: LiveServerSessionResumptionUpdate;\n}\n\n/** Configures automatic detection of activity. */\nexport declare interface AutomaticActivityDetection {\n /** If enabled, detected voice and text input count as activity. If disabled, the client must send activity signals. */\n disabled?: boolean;\n /** Determines how likely speech is to be detected. */\n startOfSpeechSensitivity?: StartSensitivity;\n /** Determines how likely detected speech is ended. */\n endOfSpeechSensitivity?: EndSensitivity;\n /** The required duration of detected speech before start-of-speech is committed. The lower this value the more sensitive the start-of-speech detection is and the shorter speech can be recognized. However, this also increases the probability of false positives. */\n prefixPaddingMs?: number;\n /** The required duration of detected non-speech (e.g. silence) before end-of-speech is committed. The larger this value, the longer speech gaps can be without interrupting the user's activity but this will increase the model's latency. */\n silenceDurationMs?: number;\n}\n\n/** Marks the end of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface RealtimeInputConfig {\n /** If not set, automatic activity detection is enabled by default. If automatic voice detection is disabled, the client must send activity signals. */\n automaticActivityDetection?: AutomaticActivityDetection;\n /** Defines what effect activity has. */\n activityHandling?: ActivityHandling;\n /** Defines which input is included in the user's turn. */\n turnCoverage?: TurnCoverage;\n}\n\n/** Configuration of session resumption mechanism.\n\n Included in `LiveConnectConfig.session_resumption`. If included server\n will send `LiveServerSessionResumptionUpdate` messages.\n */\nexport declare interface SessionResumptionConfig {\n /** Session resumption handle of previous session (session to restore).\n\nIf not present new session will be started. */\n handle?: string;\n /** If set the server will send `last_consumed_client_message_index` in the `session_resumption_update` messages to allow for transparent reconnections. */\n transparent?: boolean;\n}\n\n/** Context window will be truncated by keeping only suffix of it.\n\n Context window will always be cut at start of USER role turn. System\n instructions and `BidiGenerateContentSetup.prefix_turns` will not be\n subject to the sliding window mechanism, they will always stay at the\n beginning of context window.\n */\nexport declare interface SlidingWindow {\n /** Session reduction target -- how many tokens we should keep. Window shortening operation has some latency costs, so we should avoid running it on every turn. Should be < trigger_tokens. If not set, trigger_tokens/2 is assumed. */\n targetTokens?: string;\n}\n\n/** Enables context window compression -- mechanism managing model context window so it does not exceed given length. */\nexport declare interface ContextWindowCompressionConfig {\n /** Number of tokens (before running turn) that triggers context window compression mechanism. */\n triggerTokens?: string;\n /** Sliding window compression mechanism. */\n slidingWindow?: SlidingWindow;\n}\n\n/** The audio transcription configuration in Setup. */\nexport declare interface AudioTranscriptionConfig {}\n\n/** Message contains configuration that will apply for the duration of the streaming session. */\nexport declare interface LiveClientSetup {\n /** \n The fully qualified name of the publisher model or tuned model endpoint to\n use.\n */\n model?: string;\n /** The generation configuration for the session.\n Note: only a subset of fields are supported.\n */\n generationConfig?: GenerationConfig;\n /** The user provided system instructions for the model.\n Note: only text should be used in parts and content in each part will be\n in a separate paragraph. */\n systemInstruction?: ContentUnion;\n /** A list of `Tools` the model may use to generate the next response.\n\n A `Tool` is a piece of code that enables the system to interact with\n external systems to perform an action, or set of actions, outside of\n knowledge and scope of the model. */\n tools?: ToolListUnion;\n /** Configures the realtime input behavior in BidiGenerateContent. */\n realtimeInputConfig?: RealtimeInputConfig;\n /** Configures session resumption mechanism.\n\n If included server will send SessionResumptionUpdate messages. */\n sessionResumption?: SessionResumptionConfig;\n /** Configures context window compression mechanism.\n\n If included, server will compress context window to fit into given length. */\n contextWindowCompression?: ContextWindowCompressionConfig;\n}\n\n/** Incremental update of the current conversation delivered from the client.\n\n All the content here will unconditionally be appended to the conversation\n history and used as part of the prompt to the model to generate content.\n\n A message here will interrupt any current model generation.\n */\nexport declare interface LiveClientContent {\n /** The content appended to the current conversation with the model.\n\n For single-turn queries, this is a single instance. For multi-turn\n queries, this is a repeated field that contains conversation history and\n latest request.\n */\n turns?: Content[];\n /** If true, indicates that the server content generation should start with\n the currently accumulated prompt. Otherwise, the server will await\n additional messages before starting generation. */\n turnComplete?: boolean;\n}\n\n/** Marks the start of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface ActivityStart {}\n\n/** Marks the end of user activity.\n\n This can only be sent if automatic (i.e. server-side) activity detection is\n disabled.\n */\nexport declare interface ActivityEnd {}\n\n/** User input that is sent in real time.\n\n This is different from `LiveClientContent` in a few ways:\n\n - Can be sent continuously without interruption to model generation.\n - If there is a need to mix data interleaved across the\n `LiveClientContent` and the `LiveClientRealtimeInput`, server attempts to\n optimize for best response, but there are no guarantees.\n - End of turn is not explicitly specified, but is rather derived from user\n activity (for example, end of speech).\n - Even before the end of turn, the data is processed incrementally\n to optimize for a fast start of the response from the model.\n - Is always assumed to be the user's input (cannot be used to populate\n conversation history).\n */\nexport declare interface LiveClientRealtimeInput {\n /** Inlined bytes data for media input. */\n mediaChunks?: Blob[];\n /** Marks the start of user activity. */\n activityStart?: ActivityStart;\n /** Marks the end of user activity. */\n activityEnd?: ActivityEnd;\n}\n\n/** Client generated response to a `ToolCall` received from the server.\n\n Individual `FunctionResponse` objects are matched to the respective\n `FunctionCall` objects by the `id` field.\n\n Note that in the unary and server-streaming GenerateContent APIs function\n calling happens by exchanging the `Content` parts, while in the bidi\n GenerateContent APIs function calling happens over this dedicated set of\n messages.\n */\nexport class LiveClientToolResponse {\n /** The response to the function calls. */\n functionResponses?: FunctionResponse[];\n}\n\n/** Messages sent by the client in the API call. */\nexport declare interface LiveClientMessage {\n /** Message to be sent by the system when connecting to the API. SDK users should not send this message. */\n setup?: LiveClientSetup;\n /** Incremental update of the current conversation delivered from the client. */\n clientContent?: LiveClientContent;\n /** User input that is sent in real time. */\n realtimeInput?: LiveClientRealtimeInput;\n /** Response to a `ToolCallMessage` received from the server. */\n toolResponse?: LiveClientToolResponse;\n}\n\n/** Session config for the API connection. */\nexport declare interface LiveConnectConfig {\n /** The generation configuration for the session. */\n generationConfig?: GenerationConfig;\n /** The requested modalities of the response. Represents the set of\n modalities that the model can return. Defaults to AUDIO if not specified.\n */\n responseModalities?: Modality[];\n /** The speech generation configuration.\n */\n speechConfig?: SpeechConfig;\n /** The user provided system instructions for the model.\n Note: only text should be used in parts and content in each part will be\n in a separate paragraph. */\n systemInstruction?: ContentUnion;\n /** A list of `Tools` the model may use to generate the next response.\n\n A `Tool` is a piece of code that enables the system to interact with\n external systems to perform an action, or set of actions, outside of\n knowledge and scope of the model. */\n tools?: ToolListUnion;\n /** Configures session resumption mechanism.\n\nIf included the server will send SessionResumptionUpdate messages. */\n sessionResumption?: SessionResumptionConfig;\n /** Configures the realtime input behavior in BidiGenerateContent. */\n realtimeInputConfig?: RealtimeInputConfig;\n /** Configures context window compression mechanism.\n\n If included, server will compress context window to fit into given length. */\n contextWindowCompression?: ContextWindowCompressionConfig;\n}\n\n/** Parameters for connecting to the live API. */\nexport declare interface LiveConnectParameters {\n /** ID of the model to use. For a list of models, see `Google models\n `_. */\n model: string;\n /** callbacks */\n callbacks: LiveCallbacks;\n /** Optional configuration parameters for the request.\n */\n config?: LiveConnectConfig;\n}\n\n/** Parameters for initializing a new chat session.\n\n These parameters are used when creating a chat session with the\n `chats.create()` method.\n */\nexport declare interface CreateChatParameters {\n /** The name of the model to use for the chat session.\n\n For example: 'gemini-2.0-flash', 'gemini-1.5-pro', etc. See gemini API\n docs to find the available models.\n */\n model: string;\n /** Config for the entire chat session.\n\n This config applies to all requests within the session\n unless overridden by a per-request `config` in `SendMessageParameters`.\n */\n config?: GenerateContentConfig;\n /** The initial conversation history for the chat session.\n\n This allows you to start the chat with a pre-existing history. The history\n must be a list of `Content` alternating between 'user' and 'model' roles.\n It should start with a 'user' message.\n */\n history?: Content[];\n}\n\n/** Parameters for sending a message within a chat session.\n\n These parameters are used with the `chat.sendMessage()` method.\n */\nexport declare interface SendMessageParameters {\n /** The message to send to the model.\n\n The SDK will combine all parts into a single 'user' content to send to\n the model.\n */\n message: PartListUnion;\n /** Config for this specific request.\n\n Please note that the per-request config does not change the chat level\n config, nor inherit from it. If you intend to use some values from the\n chat's default config, you must explicitly copy them into this per-request\n config.\n */\n config?: GenerateContentConfig;\n}\n\n/** Parameters for sending client content to the live API. */\nexport declare interface LiveSendClientContentParameters {\n /** Client content to send to the session. */\n turns?: ContentListUnion;\n /** If true, indicates that the server content generation should start with\n the currently accumulated prompt. Otherwise, the server will await\n additional messages before starting generation. */\n turnComplete?: boolean;\n}\n\n/** Parameters for sending realtime input to the live API. */\nexport declare interface LiveSendRealtimeInputParameters {\n /** Realtime input to send to the session. */\n media: Blob;\n /** Marks the start of user activity. */\n activityStart?: ActivityStart;\n /** Marks the end of user activity. */\n activityEnd?: ActivityEnd;\n}\n\n/** Parameters for sending tool responses to the live API. */\nexport class LiveSendToolResponseParameters {\n /** Tool responses to send to the session. */\n functionResponses: FunctionResponse[] | FunctionResponse = [];\n}\n\n/** Parameters for the get method of the operations module. */\nexport declare interface OperationGetParameters {\n /** The operation to be retrieved. */\n operation: GenerateVideosOperation;\n /** Used to override the default configuration. */\n config?: GetOperationConfig;\n}\n\nexport type PartUnion = Part | string;\n\nexport type PartListUnion = PartUnion[] | PartUnion;\n\nexport type ContentUnion = Content | PartUnion[] | PartUnion;\n\nexport type ContentListUnion = Content | Content[] | PartUnion | PartUnion[];\n\nexport type SchemaUnion = Schema;\n\nexport type SpeechConfigUnion = SpeechConfig | string;\n\nexport type ToolListUnion = Tool[];\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_caches_converters';\nimport {PagedItem, Pager} from './pagers';\nimport * as types from './types';\n\nexport class Caches extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Lists cached content configurations.\n *\n * @param params - The parameters for the list request.\n * @return The paginated results of the list of cached contents.\n *\n * @example\n * ```ts\n * const cachedContents = await ai.caches.list({config: {'pageSize': 2}});\n * for (const cachedContent of cachedContents) {\n * console.log(cachedContent);\n * }\n * ```\n */\n list = async (\n params: types.ListCachedContentsParameters = {},\n ): Promise> => {\n return new Pager(\n PagedItem.PAGED_ITEM_CACHED_CONTENTS,\n (x: types.ListCachedContentsParameters) => this.listInternal(x),\n await this.listInternal(params),\n params,\n );\n };\n\n /**\n * Creates a cached contents resource.\n *\n * @remarks\n * Context caching is only supported for specific models. See [Gemini\n * Developer API reference](https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac)\n * and [Vertex AI reference](https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models)\n * for more information.\n *\n * @param params - The parameters for the create request.\n * @return The created cached content.\n *\n * @example\n * ```ts\n * const contents = ...; // Initialize the content to cache.\n * const response = await ai.caches.create({\n * model: 'gemini-1.5-flash',\n * config: {\n * 'contents': contents,\n * 'displayName': 'test cache',\n * 'systemInstruction': 'What is the sum of the two pdfs?',\n * 'ttl': '86400s',\n * }\n * });\n * ```\n */\n async create(\n params: types.CreateCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.createCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.createCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n /**\n * Gets cached content configurations.\n *\n * @param params - The parameters for the get request.\n * @return The cached content.\n *\n * @example\n * ```ts\n * await ai.caches.get({name: 'gemini-1.5-flash'});\n * ```\n */\n async get(\n params: types.GetCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.getCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n /**\n * Deletes cached content.\n *\n * @param params - The parameters for the delete request.\n * @return The empty response returned by the API.\n *\n * @example\n * ```ts\n * await ai.caches.delete({name: 'gemini-1.5-flash'});\n * ```\n */\n async delete(\n params: types.DeleteCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.deleteCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteCachedContentResponseFromVertex();\n const typedResp = new types.DeleteCachedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.deleteCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteCachedContentResponseFromMldev();\n const typedResp = new types.DeleteCachedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Updates cached content configurations.\n *\n * @param params - The parameters for the update request.\n * @return The updated cached content.\n *\n * @example\n * ```ts\n * const response = await ai.caches.update({\n * name: 'gemini-1.5-flash',\n * config: {'ttl': '7600s'}\n * });\n * ```\n */\n async update(\n params: types.UpdateCachedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.updateCachedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'PATCH',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n } else {\n const body = converters.updateCachedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'PATCH',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.cachedContentFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.CachedContent;\n });\n }\n }\n\n private async listInternal(\n params: types.ListCachedContentsParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.listCachedContentsParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listCachedContentsResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListCachedContentsResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.listCachedContentsParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'cachedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listCachedContentsResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListCachedContentsResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ApiClient} from './_api_client';\nimport * as t from './_transformers';\nimport {Models} from './models';\nimport * as types from './types';\n\n/**\n * Returns true if the response is valid, false otherwise.\n */\nfunction isValidResponse(response: types.GenerateContentResponse): boolean {\n if (response.candidates == undefined || response.candidates.length === 0) {\n return false;\n }\n const content = response.candidates[0]?.content;\n if (content === undefined) {\n return false;\n }\n return isValidContent(content);\n}\n\nfunction isValidContent(content: types.Content): boolean {\n if (content.parts === undefined || content.parts.length === 0) {\n return false;\n }\n for (const part of content.parts) {\n if (part === undefined || Object.keys(part).length === 0) {\n return false;\n }\n if (part.text !== undefined && part.text === '') {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Validates the history contains the correct roles.\n *\n * @remarks\n * Expects the history to start with a user turn and then alternate between\n * user and model turns.\n *\n * @throws Error if the history does not start with a user turn.\n * @throws Error if the history contains an invalid role.\n */\nfunction validateHistory(history: types.Content[]) {\n // Empty history is valid.\n if (history.length === 0) {\n return;\n }\n if (history[0].role !== 'user') {\n throw new Error('History must start with a user turn.');\n }\n for (const content of history) {\n if (content.role !== 'user' && content.role !== 'model') {\n throw new Error(`Role must be user or model, but got ${content.role}.`);\n }\n }\n}\n\n/**\n * Extracts the curated (valid) history from a comprehensive history.\n *\n * @remarks\n * The model may sometimes generate invalid or empty contents(e.g., due to safty\n * filters or recitation). Extracting valid turns from the history\n * ensures that subsequent requests could be accpeted by the model.\n */\nfunction extractCuratedHistory(\n comprehensiveHistory: types.Content[],\n): types.Content[] {\n if (comprehensiveHistory === undefined || comprehensiveHistory.length === 0) {\n return [];\n }\n const curatedHistory: types.Content[] = [];\n const length = comprehensiveHistory.length;\n let i = 0;\n let userInput = comprehensiveHistory[0];\n while (i < length) {\n if (comprehensiveHistory[i].role === 'user') {\n userInput = comprehensiveHistory[i];\n i++;\n } else {\n const modelOutput: types.Content[] = [];\n let isValid = true;\n while (i < length && comprehensiveHistory[i].role === 'model') {\n modelOutput.push(comprehensiveHistory[i]);\n if (isValid && !isValidContent(comprehensiveHistory[i])) {\n isValid = false;\n }\n i++;\n }\n if (isValid) {\n curatedHistory.push(userInput);\n curatedHistory.push(...modelOutput);\n }\n }\n }\n return curatedHistory;\n}\n\n/**\n * A utility class to create a chat session.\n */\nexport class Chats {\n private readonly modelsModule: Models;\n private readonly apiClient: ApiClient;\n\n constructor(modelsModule: Models, apiClient: ApiClient) {\n this.modelsModule = modelsModule;\n this.apiClient = apiClient;\n }\n\n /**\n * Creates a new chat session.\n *\n * @remarks\n * The config in the params will be used for all requests within the chat\n * session unless overridden by a per-request `config` in\n * @see {@link types.SendMessageParameters#config}.\n *\n * @param params - Parameters for creating a chat session.\n * @returns A new chat session.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({\n * model: 'gemini-2.0-flash'\n * config: {\n * temperature: 0.5,\n * maxOutputTokens: 1024,\n * }\n * });\n * ```\n */\n create(params: types.CreateChatParameters) {\n return new Chat(\n this.apiClient,\n this.modelsModule,\n params.model,\n params.config,\n params.history,\n );\n }\n}\n\n/**\n * Chat session that enables sending messages to the model with previous\n * conversation context.\n *\n * @remarks\n * The session maintains all the turns between user and model.\n */\nexport class Chat {\n // A promise to represent the current state of the message being sent to the\n // model.\n private sendPromise: Promise = Promise.resolve();\n\n constructor(\n private readonly apiClient: ApiClient,\n private readonly modelsModule: Models,\n private readonly model: string,\n private readonly config: types.GenerateContentConfig = {},\n private history: types.Content[] = [],\n ) {\n validateHistory(history);\n }\n\n /**\n * Sends a message to the model and returns the response.\n *\n * @remarks\n * This method will wait for the previous message to be processed before\n * sending the next message.\n *\n * @see {@link Chat#sendMessageStream} for streaming method.\n * @param params - parameters for sending messages within a chat session.\n * @returns The model's response.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({model: 'gemini-2.0-flash'});\n * const response = await chat.sendMessage({\n * message: 'Why is the sky blue?'\n * });\n * console.log(response.text);\n * ```\n */\n async sendMessage(\n params: types.SendMessageParameters,\n ): Promise {\n await this.sendPromise;\n const inputContent = t.tContent(this.apiClient, params.message);\n const responsePromise = this.modelsModule.generateContent({\n model: this.model,\n contents: this.getHistory(true).concat(inputContent),\n config: params.config ?? this.config,\n });\n this.sendPromise = (async () => {\n const response = await responsePromise;\n const outputContent = response.candidates?.[0]?.content;\n const modelOutput = outputContent ? [outputContent] : [];\n this.recordHistory(inputContent, modelOutput);\n return;\n })();\n await this.sendPromise;\n return responsePromise;\n }\n\n /**\n * Sends a message to the model and returns the response in chunks.\n *\n * @remarks\n * This method will wait for the previous message to be processed before\n * sending the next message.\n *\n * @see {@link Chat#sendMessage} for non-streaming method.\n * @param params - parameters for sending the message.\n * @return The model's response.\n *\n * @example\n * ```ts\n * const chat = ai.chats.create({model: 'gemini-2.0-flash'});\n * const response = await chat.sendMessageStream({\n * message: 'Why is the sky blue?'\n * });\n * for await (const chunk of response) {\n * console.log(chunk.text);\n * }\n * ```\n */\n async sendMessageStream(\n params: types.SendMessageParameters,\n ): Promise> {\n await this.sendPromise;\n const inputContent = t.tContent(this.apiClient, params.message);\n const streamResponse = this.modelsModule.generateContentStream({\n model: this.model,\n contents: this.getHistory(true).concat(inputContent),\n config: params.config ?? this.config,\n });\n this.sendPromise = streamResponse.then(() => undefined);\n const response = await streamResponse;\n const result = this.processStreamResponse(response, inputContent);\n return result;\n }\n\n /**\n * Returns the chat history.\n *\n * @remarks\n * The history is a list of contents alternating between user and model.\n *\n * There are two types of history:\n * - The `curated history` contains only the valid turns between user and\n * model, which will be included in the subsequent requests sent to the model.\n * - The `comprehensive history` contains all turns, including invalid or\n * empty model outputs, providing a complete record of the history.\n *\n * The history is updated after receiving the response from the model,\n * for streaming response, it means receiving the last chunk of the response.\n *\n * The `comprehensive history` is returned by default. To get the `curated\n * history`, set the `curated` parameter to `true`.\n *\n * @param curated - whether to return the curated history or the comprehensive\n * history.\n * @return History contents alternating between user and model for the entire\n * chat session.\n */\n getHistory(curated: boolean = false): types.Content[] {\n return curated ? extractCuratedHistory(this.history) : this.history;\n }\n\n private async *processStreamResponse(\n streamResponse: AsyncGenerator,\n inputContent: types.Content,\n ) {\n const outputContent: types.Content[] = [];\n for await (const chunk of streamResponse) {\n if (isValidResponse(chunk)) {\n const content = chunk.candidates?.[0]?.content;\n if (content !== undefined) {\n outputContent.push(content);\n }\n }\n yield chunk;\n }\n this.recordHistory(inputContent, outputContent);\n }\n\n private recordHistory(\n userInput: types.Content,\n modelOutput: types.Content[],\n ) {\n let outputContents: types.Content[] = [];\n if (\n modelOutput.length > 0 &&\n modelOutput.every((content) => content.role === 'model')\n ) {\n outputContents = modelOutput;\n } else {\n // Appends an empty content when model returns empty response, so that the\n // history is always alternating between user and model.\n outputContents.push({\n role: 'model',\n parts: [],\n } as types.Content);\n }\n this.history.push(userInput);\n this.history.push(...outputContents);\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function listFilesConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromPageSize = common.getValueByPath(fromObject, ['pageSize']);\n if (parentObject !== undefined && fromPageSize != null) {\n common.setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);\n }\n\n const fromPageToken = common.getValueByPath(fromObject, ['pageToken']);\n if (parentObject !== undefined && fromPageToken != null) {\n common.setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);\n }\n\n return toObject;\n}\n\nexport function listFilesParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n listFilesConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function fileStatusToMldev(\n apiClient: ApiClient,\n fromObject: types.FileStatus,\n): Record {\n const toObject: Record = {};\n\n const fromDetails = common.getValueByPath(fromObject, ['details']);\n if (fromDetails != null) {\n common.setValueByPath(toObject, ['details'], fromDetails);\n }\n\n const fromMessage = common.getValueByPath(fromObject, ['message']);\n if (fromMessage != null) {\n common.setValueByPath(toObject, ['message'], fromMessage);\n }\n\n const fromCode = common.getValueByPath(fromObject, ['code']);\n if (fromCode != null) {\n common.setValueByPath(toObject, ['code'], fromCode);\n }\n\n return toObject;\n}\n\nexport function fileToMldev(\n apiClient: ApiClient,\n fromObject: types.File,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n const fromSizeBytes = common.getValueByPath(fromObject, ['sizeBytes']);\n if (fromSizeBytes != null) {\n common.setValueByPath(toObject, ['sizeBytes'], fromSizeBytes);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromExpirationTime = common.getValueByPath(fromObject, [\n 'expirationTime',\n ]);\n if (fromExpirationTime != null) {\n common.setValueByPath(toObject, ['expirationTime'], fromExpirationTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromSha256Hash = common.getValueByPath(fromObject, ['sha256Hash']);\n if (fromSha256Hash != null) {\n common.setValueByPath(toObject, ['sha256Hash'], fromSha256Hash);\n }\n\n const fromUri = common.getValueByPath(fromObject, ['uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromDownloadUri = common.getValueByPath(fromObject, ['downloadUri']);\n if (fromDownloadUri != null) {\n common.setValueByPath(toObject, ['downloadUri'], fromDownloadUri);\n }\n\n const fromState = common.getValueByPath(fromObject, ['state']);\n if (fromState != null) {\n common.setValueByPath(toObject, ['state'], fromState);\n }\n\n const fromSource = common.getValueByPath(fromObject, ['source']);\n if (fromSource != null) {\n common.setValueByPath(toObject, ['source'], fromSource);\n }\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(\n toObject,\n ['error'],\n fileStatusToMldev(apiClient, fromError),\n );\n }\n\n return toObject;\n}\n\nexport function createFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CreateFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromFile = common.getValueByPath(fromObject, ['file']);\n if (fromFile != null) {\n common.setValueByPath(toObject, ['file'], fileToMldev(apiClient, fromFile));\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function getFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'file'],\n t.tFileName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function deleteFileParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.DeleteFileParameters,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'file'],\n t.tFileName(apiClient, fromName),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function fileStatusFromMldev(\n apiClient: ApiClient,\n fromObject: types.FileStatus,\n): Record {\n const toObject: Record = {};\n\n const fromDetails = common.getValueByPath(fromObject, ['details']);\n if (fromDetails != null) {\n common.setValueByPath(toObject, ['details'], fromDetails);\n }\n\n const fromMessage = common.getValueByPath(fromObject, ['message']);\n if (fromMessage != null) {\n common.setValueByPath(toObject, ['message'], fromMessage);\n }\n\n const fromCode = common.getValueByPath(fromObject, ['code']);\n if (fromCode != null) {\n common.setValueByPath(toObject, ['code'], fromCode);\n }\n\n return toObject;\n}\n\nexport function fileFromMldev(\n apiClient: ApiClient,\n fromObject: types.File,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n const fromSizeBytes = common.getValueByPath(fromObject, ['sizeBytes']);\n if (fromSizeBytes != null) {\n common.setValueByPath(toObject, ['sizeBytes'], fromSizeBytes);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromExpirationTime = common.getValueByPath(fromObject, [\n 'expirationTime',\n ]);\n if (fromExpirationTime != null) {\n common.setValueByPath(toObject, ['expirationTime'], fromExpirationTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n const fromSha256Hash = common.getValueByPath(fromObject, ['sha256Hash']);\n if (fromSha256Hash != null) {\n common.setValueByPath(toObject, ['sha256Hash'], fromSha256Hash);\n }\n\n const fromUri = common.getValueByPath(fromObject, ['uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromDownloadUri = common.getValueByPath(fromObject, ['downloadUri']);\n if (fromDownloadUri != null) {\n common.setValueByPath(toObject, ['downloadUri'], fromDownloadUri);\n }\n\n const fromState = common.getValueByPath(fromObject, ['state']);\n if (fromState != null) {\n common.setValueByPath(toObject, ['state'], fromState);\n }\n\n const fromSource = common.getValueByPath(fromObject, ['source']);\n if (fromSource != null) {\n common.setValueByPath(toObject, ['source'], fromSource);\n }\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(\n toObject,\n ['error'],\n fileStatusFromMldev(apiClient, fromError),\n );\n }\n\n return toObject;\n}\n\nexport function listFilesResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.ListFilesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromNextPageToken = common.getValueByPath(fromObject, [\n 'nextPageToken',\n ]);\n if (fromNextPageToken != null) {\n common.setValueByPath(toObject, ['nextPageToken'], fromNextPageToken);\n }\n\n const fromFiles = common.getValueByPath(fromObject, ['files']);\n if (fromFiles != null) {\n if (Array.isArray(fromFiles)) {\n common.setValueByPath(\n toObject,\n ['files'],\n fromFiles.map((item) => {\n return fileFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['files'], fromFiles);\n }\n }\n\n return toObject;\n}\n\nexport function createFileResponseFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function deleteFileResponseFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_files_converters';\nimport {PagedItem, Pager} from './pagers';\nimport * as types from './types';\n\nexport class Files extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Lists all current project files from the service.\n *\n * @param params - The parameters for the list request\n * @return The paginated results of the list of files\n *\n * @example\n * The following code prints the names of all files from the service, the\n * size of each page is 10.\n *\n * ```ts\n * const listResponse = await ai.files.list({config: {'pageSize': 10}});\n * for await (const file of listResponse) {\n * console.log(file.name);\n * }\n * ```\n */\n list = async (\n params: types.ListFilesParameters = {},\n ): Promise> => {\n return new Pager(\n PagedItem.PAGED_ITEM_FILES,\n (x: types.ListFilesParameters) => this.listInternal(x),\n await this.listInternal(params),\n params,\n );\n };\n\n /**\n * Uploads a file asynchronously to the Gemini API.\n * This method is not available in Vertex AI.\n * Supported upload sources:\n * - Node.js: File path (string) or Blob object.\n * - Browser: Blob object (e.g., File).\n *\n * @remarks\n * The `mimeType` can be specified in the `config` parameter. If omitted:\n * - For file path (string) inputs, the `mimeType` will be inferred from the\n * file extension.\n * - For Blob object inputs, the `mimeType` will be set to the Blob's `type`\n * property.\n * Somex eamples for file extension to mimeType mapping:\n * .txt -> text/plain\n * .json -> application/json\n * .jpg -> image/jpeg\n * .png -> image/png\n * .mp3 -> audio/mpeg\n * .mp4 -> video/mp4\n *\n * This section can contain multiple paragraphs and code examples.\n *\n * @param params - Optional parameters specified in the\n * `types.UploadFileParameters` interface.\n * @see {@link types.UploadFileParameters#config} for the optional\n * config in the parameters.\n * @return A promise that resolves to a `types.File` object.\n * @throws An error if called on a Vertex AI client.\n * @throws An error if the `mimeType` is not provided and can not be inferred,\n * the `mimeType` can be provided in the `params.config` parameter.\n * @throws An error occurs if a suitable upload location cannot be established.\n *\n * @example\n * The following code uploads a file to Gemini API.\n *\n * ```ts\n * const file = await ai.files.upload({file: 'file.txt', config: {\n * mimeType: 'text/plain',\n * }});\n * console.log(file.name);\n * ```\n */\n async upload(params: types.UploadFileParameters): Promise {\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'Vertex AI does not support uploading files. You can share files through a GCS bucket.',\n );\n }\n\n return this.apiClient\n .uploadFile(params.file, params.config)\n .then((response) => {\n const file = converters.fileFromMldev(this.apiClient, response);\n return file as types.File;\n });\n }\n\n private async listInternal(\n params: types.ListFilesParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.listFilesParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap('files', body['_url'] as Record);\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.listFilesResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ListFilesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n private async createInternal(\n params: types.CreateFileParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.createFileParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'upload/v1beta/files',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.createFileResponseFromMldev();\n const typedResp = new types.CreateFileResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Retrieves the file information from the service.\n *\n * @param params - The parameters for the get request\n * @return The Promise that resolves to the types.File object requested.\n *\n * @example\n * ```ts\n * const config: GetFileParameters = {\n * name: fileName,\n * };\n * file = await ai.files.get(config);\n * console.log(file.name);\n * ```\n */\n async get(params: types.GetFileParameters): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.getFileParametersToMldev(this.apiClient, params);\n path = common.formatMap(\n 'files/{file}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.fileFromMldev(this.apiClient, apiResponse);\n\n return resp as types.File;\n });\n }\n }\n\n /**\n * Deletes a remotely stored file.\n *\n * @param params - The parameters for the delete request.\n * @return The DeleteFileResponse, the response for the delete method.\n *\n * @example\n * The following code deletes an example file named \"files/mehozpxf877d\".\n *\n * ```ts\n * await ai.files.delete({name: file.name});\n * ```\n */\n async delete(\n params: types.DeleteFileParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n throw new Error(\n 'This method is only supported by the Gemini Developer API.',\n );\n } else {\n const body = converters.deleteFileParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n 'files/{file}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'DELETE',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then(() => {\n const resp = converters.deleteFileResponseFromMldev();\n const typedResp = new types.DeleteFileResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function partToMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['videoMetadata']) !== undefined) {\n throw new Error('videoMetadata parameter is not supported in Gemini API.');\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function partToVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function contentToVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToMldev(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['example']) !== undefined) {\n throw new Error('example parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['pattern']) !== undefined) {\n throw new Error('pattern parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['default']) !== undefined) {\n throw new Error('default parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxLength']) !== undefined) {\n throw new Error('maxLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minLength']) !== undefined) {\n throw new Error('minLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minProperties']) !== undefined) {\n throw new Error('minProperties parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxProperties']) !== undefined) {\n throw new Error('maxProperties parameter is not supported in Gemini API.');\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function schemaToVertex(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n const fromExample = common.getValueByPath(fromObject, ['example']);\n if (fromExample != null) {\n common.setValueByPath(toObject, ['example'], fromExample);\n }\n\n const fromPattern = common.getValueByPath(fromObject, ['pattern']);\n if (fromPattern != null) {\n common.setValueByPath(toObject, ['pattern'], fromPattern);\n }\n\n const fromDefault = common.getValueByPath(fromObject, ['default']);\n if (fromDefault != null) {\n common.setValueByPath(toObject, ['default'], fromDefault);\n }\n\n const fromMaxLength = common.getValueByPath(fromObject, ['maxLength']);\n if (fromMaxLength != null) {\n common.setValueByPath(toObject, ['maxLength'], fromMaxLength);\n }\n\n const fromMinLength = common.getValueByPath(fromObject, ['minLength']);\n if (fromMinLength != null) {\n common.setValueByPath(toObject, ['minLength'], fromMinLength);\n }\n\n const fromMinProperties = common.getValueByPath(fromObject, [\n 'minProperties',\n ]);\n if (fromMinProperties != null) {\n common.setValueByPath(toObject, ['minProperties'], fromMinProperties);\n }\n\n const fromMaxProperties = common.getValueByPath(fromObject, [\n 'maxProperties',\n ]);\n if (fromMaxProperties != null) {\n common.setValueByPath(toObject, ['maxProperties'], fromMaxProperties);\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['response']) !== undefined) {\n throw new Error('response parameter is not supported in Gemini API.');\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n schemaToVertex(apiClient, fromResponse),\n );\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function googleSearchToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToMldev(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToVertex(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToMldev(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n if (common.getValueByPath(fromObject, ['retrieval']) !== undefined) {\n throw new Error('retrieval parameter is not supported in Gemini API.');\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToMldev());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function toolToVertex(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n const fromRetrieval = common.getValueByPath(fromObject, ['retrieval']);\n if (fromRetrieval != null) {\n common.setValueByPath(toObject, ['retrieval'], fromRetrieval);\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToVertex());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function sessionResumptionConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.SessionResumptionConfig,\n): Record {\n const toObject: Record = {};\n\n const fromHandle = common.getValueByPath(fromObject, ['handle']);\n if (fromHandle != null) {\n common.setValueByPath(toObject, ['handle'], fromHandle);\n }\n\n if (common.getValueByPath(fromObject, ['transparent']) !== undefined) {\n throw new Error('transparent parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function sessionResumptionConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.SessionResumptionConfig,\n): Record {\n const toObject: Record = {};\n\n const fromHandle = common.getValueByPath(fromObject, ['handle']);\n if (fromHandle != null) {\n common.setValueByPath(toObject, ['handle'], fromHandle);\n }\n\n const fromTransparent = common.getValueByPath(fromObject, ['transparent']);\n if (fromTransparent != null) {\n common.setValueByPath(toObject, ['transparent'], fromTransparent);\n }\n\n return toObject;\n}\n\nexport function audioTranscriptionConfigToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function audioTranscriptionConfigToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function automaticActivityDetectionToMldev(\n apiClient: ApiClient,\n fromObject: types.AutomaticActivityDetection,\n): Record {\n const toObject: Record = {};\n\n const fromDisabled = common.getValueByPath(fromObject, ['disabled']);\n if (fromDisabled != null) {\n common.setValueByPath(toObject, ['disabled'], fromDisabled);\n }\n\n const fromStartOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'startOfSpeechSensitivity',\n ]);\n if (fromStartOfSpeechSensitivity != null) {\n common.setValueByPath(\n toObject,\n ['startOfSpeechSensitivity'],\n fromStartOfSpeechSensitivity,\n );\n }\n\n const fromEndOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'endOfSpeechSensitivity',\n ]);\n if (fromEndOfSpeechSensitivity != null) {\n common.setValueByPath(\n toObject,\n ['endOfSpeechSensitivity'],\n fromEndOfSpeechSensitivity,\n );\n }\n\n const fromPrefixPaddingMs = common.getValueByPath(fromObject, [\n 'prefixPaddingMs',\n ]);\n if (fromPrefixPaddingMs != null) {\n common.setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);\n }\n\n const fromSilenceDurationMs = common.getValueByPath(fromObject, [\n 'silenceDurationMs',\n ]);\n if (fromSilenceDurationMs != null) {\n common.setValueByPath(\n toObject,\n ['silenceDurationMs'],\n fromSilenceDurationMs,\n );\n }\n\n return toObject;\n}\n\nexport function automaticActivityDetectionToVertex(\n apiClient: ApiClient,\n fromObject: types.AutomaticActivityDetection,\n): Record {\n const toObject: Record = {};\n\n const fromDisabled = common.getValueByPath(fromObject, ['disabled']);\n if (fromDisabled != null) {\n common.setValueByPath(toObject, ['disabled'], fromDisabled);\n }\n\n const fromStartOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'startOfSpeechSensitivity',\n ]);\n if (fromStartOfSpeechSensitivity != null) {\n common.setValueByPath(\n toObject,\n ['startOfSpeechSensitivity'],\n fromStartOfSpeechSensitivity,\n );\n }\n\n const fromEndOfSpeechSensitivity = common.getValueByPath(fromObject, [\n 'endOfSpeechSensitivity',\n ]);\n if (fromEndOfSpeechSensitivity != null) {\n common.setValueByPath(\n toObject,\n ['endOfSpeechSensitivity'],\n fromEndOfSpeechSensitivity,\n );\n }\n\n const fromPrefixPaddingMs = common.getValueByPath(fromObject, [\n 'prefixPaddingMs',\n ]);\n if (fromPrefixPaddingMs != null) {\n common.setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);\n }\n\n const fromSilenceDurationMs = common.getValueByPath(fromObject, [\n 'silenceDurationMs',\n ]);\n if (fromSilenceDurationMs != null) {\n common.setValueByPath(\n toObject,\n ['silenceDurationMs'],\n fromSilenceDurationMs,\n );\n }\n\n return toObject;\n}\n\nexport function realtimeInputConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.RealtimeInputConfig,\n): Record {\n const toObject: Record = {};\n\n const fromAutomaticActivityDetection = common.getValueByPath(fromObject, [\n 'automaticActivityDetection',\n ]);\n if (fromAutomaticActivityDetection != null) {\n common.setValueByPath(\n toObject,\n ['automaticActivityDetection'],\n automaticActivityDetectionToMldev(\n apiClient,\n fromAutomaticActivityDetection,\n ),\n );\n }\n\n const fromActivityHandling = common.getValueByPath(fromObject, [\n 'activityHandling',\n ]);\n if (fromActivityHandling != null) {\n common.setValueByPath(toObject, ['activityHandling'], fromActivityHandling);\n }\n\n const fromTurnCoverage = common.getValueByPath(fromObject, ['turnCoverage']);\n if (fromTurnCoverage != null) {\n common.setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);\n }\n\n return toObject;\n}\n\nexport function realtimeInputConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.RealtimeInputConfig,\n): Record {\n const toObject: Record = {};\n\n const fromAutomaticActivityDetection = common.getValueByPath(fromObject, [\n 'automaticActivityDetection',\n ]);\n if (fromAutomaticActivityDetection != null) {\n common.setValueByPath(\n toObject,\n ['automaticActivityDetection'],\n automaticActivityDetectionToVertex(\n apiClient,\n fromAutomaticActivityDetection,\n ),\n );\n }\n\n const fromActivityHandling = common.getValueByPath(fromObject, [\n 'activityHandling',\n ]);\n if (fromActivityHandling != null) {\n common.setValueByPath(toObject, ['activityHandling'], fromActivityHandling);\n }\n\n const fromTurnCoverage = common.getValueByPath(fromObject, ['turnCoverage']);\n if (fromTurnCoverage != null) {\n common.setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);\n }\n\n return toObject;\n}\n\nexport function slidingWindowToMldev(\n apiClient: ApiClient,\n fromObject: types.SlidingWindow,\n): Record {\n const toObject: Record = {};\n\n const fromTargetTokens = common.getValueByPath(fromObject, ['targetTokens']);\n if (fromTargetTokens != null) {\n common.setValueByPath(toObject, ['targetTokens'], fromTargetTokens);\n }\n\n return toObject;\n}\n\nexport function slidingWindowToVertex(\n apiClient: ApiClient,\n fromObject: types.SlidingWindow,\n): Record {\n const toObject: Record = {};\n\n const fromTargetTokens = common.getValueByPath(fromObject, ['targetTokens']);\n if (fromTargetTokens != null) {\n common.setValueByPath(toObject, ['targetTokens'], fromTargetTokens);\n }\n\n return toObject;\n}\n\nexport function contextWindowCompressionConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ContextWindowCompressionConfig,\n): Record {\n const toObject: Record = {};\n\n const fromTriggerTokens = common.getValueByPath(fromObject, [\n 'triggerTokens',\n ]);\n if (fromTriggerTokens != null) {\n common.setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);\n }\n\n const fromSlidingWindow = common.getValueByPath(fromObject, [\n 'slidingWindow',\n ]);\n if (fromSlidingWindow != null) {\n common.setValueByPath(\n toObject,\n ['slidingWindow'],\n slidingWindowToMldev(apiClient, fromSlidingWindow),\n );\n }\n\n return toObject;\n}\n\nexport function contextWindowCompressionConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ContextWindowCompressionConfig,\n): Record {\n const toObject: Record = {};\n\n const fromTriggerTokens = common.getValueByPath(fromObject, [\n 'triggerTokens',\n ]);\n if (fromTriggerTokens != null) {\n common.setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);\n }\n\n const fromSlidingWindow = common.getValueByPath(fromObject, [\n 'slidingWindow',\n ]);\n if (fromSlidingWindow != null) {\n common.setValueByPath(\n toObject,\n ['slidingWindow'],\n slidingWindowToVertex(apiClient, fromSlidingWindow),\n );\n }\n\n return toObject;\n}\n\nexport function liveConnectConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveConnectConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (parentObject !== undefined && fromGenerationConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig'],\n fromGenerationConfig,\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (parentObject !== undefined && fromResponseModalities != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig', 'responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (parentObject !== undefined && fromSpeechConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig', 'speechConfig'],\n fromSpeechConfig,\n );\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['setup', 'tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToMldev(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['setup', 'tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (parentObject !== undefined && fromSessionResumption != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'sessionResumption'],\n sessionResumptionConfigToMldev(apiClient, fromSessionResumption),\n );\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (parentObject !== undefined && fromRealtimeInputConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'realtimeInputConfig'],\n realtimeInputConfigToMldev(apiClient, fromRealtimeInputConfig),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (parentObject !== undefined && fromContextWindowCompression != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'contextWindowCompression'],\n contextWindowCompressionConfigToMldev(\n apiClient,\n fromContextWindowCompression,\n ),\n );\n }\n\n return toObject;\n}\n\nexport function liveConnectConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveConnectConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (parentObject !== undefined && fromGenerationConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig'],\n fromGenerationConfig,\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (parentObject !== undefined && fromResponseModalities != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig', 'responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (parentObject !== undefined && fromSpeechConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'generationConfig', 'speechConfig'],\n fromSpeechConfig,\n );\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['setup', 'tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToVertex(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['setup', 'tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (parentObject !== undefined && fromSessionResumption != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'sessionResumption'],\n sessionResumptionConfigToVertex(apiClient, fromSessionResumption),\n );\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (parentObject !== undefined && fromRealtimeInputConfig != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'realtimeInputConfig'],\n realtimeInputConfigToVertex(apiClient, fromRealtimeInputConfig),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (parentObject !== undefined && fromContextWindowCompression != null) {\n common.setValueByPath(\n parentObject,\n ['setup', 'contextWindowCompression'],\n contextWindowCompressionConfigToVertex(\n apiClient,\n fromContextWindowCompression,\n ),\n );\n }\n\n return toObject;\n}\n\nexport function liveConnectParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveConnectParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['setup', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n liveConnectConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function liveConnectParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveConnectParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['setup', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n liveConnectConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function liveClientSetupToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveClientSetup,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (fromGenerationConfig != null) {\n common.setValueByPath(toObject, ['generationConfig'], fromGenerationConfig);\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (fromSystemInstruction != null) {\n common.setValueByPath(\n toObject,\n ['systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n toObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToMldev(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (fromRealtimeInputConfig != null) {\n common.setValueByPath(\n toObject,\n ['realtimeInputConfig'],\n realtimeInputConfigToMldev(apiClient, fromRealtimeInputConfig),\n );\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (fromSessionResumption != null) {\n common.setValueByPath(\n toObject,\n ['sessionResumption'],\n sessionResumptionConfigToMldev(apiClient, fromSessionResumption),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (fromContextWindowCompression != null) {\n common.setValueByPath(\n toObject,\n ['contextWindowCompression'],\n contextWindowCompressionConfigToMldev(\n apiClient,\n fromContextWindowCompression,\n ),\n );\n }\n\n return toObject;\n}\n\nexport function liveClientSetupToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveClientSetup,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(toObject, ['model'], fromModel);\n }\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (fromGenerationConfig != null) {\n common.setValueByPath(toObject, ['generationConfig'], fromGenerationConfig);\n }\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (fromSystemInstruction != null) {\n common.setValueByPath(\n toObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n toObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToVertex(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromRealtimeInputConfig = common.getValueByPath(fromObject, [\n 'realtimeInputConfig',\n ]);\n if (fromRealtimeInputConfig != null) {\n common.setValueByPath(\n toObject,\n ['realtimeInputConfig'],\n realtimeInputConfigToVertex(apiClient, fromRealtimeInputConfig),\n );\n }\n\n const fromSessionResumption = common.getValueByPath(fromObject, [\n 'sessionResumption',\n ]);\n if (fromSessionResumption != null) {\n common.setValueByPath(\n toObject,\n ['sessionResumption'],\n sessionResumptionConfigToVertex(apiClient, fromSessionResumption),\n );\n }\n\n const fromContextWindowCompression = common.getValueByPath(fromObject, [\n 'contextWindowCompression',\n ]);\n if (fromContextWindowCompression != null) {\n common.setValueByPath(\n toObject,\n ['contextWindowCompression'],\n contextWindowCompressionConfigToVertex(\n apiClient,\n fromContextWindowCompression,\n ),\n );\n }\n\n return toObject;\n}\n\nexport function liveClientContentToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveClientContent,\n): Record {\n const toObject: Record = {};\n\n const fromTurns = common.getValueByPath(fromObject, ['turns']);\n if (fromTurns != null) {\n if (Array.isArray(fromTurns)) {\n common.setValueByPath(\n toObject,\n ['turns'],\n fromTurns.map((item) => {\n return contentToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['turns'], fromTurns);\n }\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete != null) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n return toObject;\n}\n\nexport function liveClientContentToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveClientContent,\n): Record {\n const toObject: Record = {};\n\n const fromTurns = common.getValueByPath(fromObject, ['turns']);\n if (fromTurns != null) {\n if (Array.isArray(fromTurns)) {\n common.setValueByPath(\n toObject,\n ['turns'],\n fromTurns.map((item) => {\n return contentToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['turns'], fromTurns);\n }\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete != null) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n return toObject;\n}\n\nexport function activityStartToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function activityStartToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function activityEndToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function activityEndToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function liveClientRealtimeInputToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveClientRealtimeInput,\n): Record {\n const toObject: Record = {};\n\n const fromMediaChunks = common.getValueByPath(fromObject, ['mediaChunks']);\n if (fromMediaChunks != null) {\n common.setValueByPath(toObject, ['mediaChunks'], fromMediaChunks);\n }\n\n const fromActivityStart = common.getValueByPath(fromObject, [\n 'activityStart',\n ]);\n if (fromActivityStart != null) {\n common.setValueByPath(toObject, ['activityStart'], activityStartToMldev());\n }\n\n const fromActivityEnd = common.getValueByPath(fromObject, ['activityEnd']);\n if (fromActivityEnd != null) {\n common.setValueByPath(toObject, ['activityEnd'], activityEndToMldev());\n }\n\n return toObject;\n}\n\nexport function liveClientRealtimeInputToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveClientRealtimeInput,\n): Record {\n const toObject: Record = {};\n\n const fromMediaChunks = common.getValueByPath(fromObject, ['mediaChunks']);\n if (fromMediaChunks != null) {\n common.setValueByPath(toObject, ['mediaChunks'], fromMediaChunks);\n }\n\n const fromActivityStart = common.getValueByPath(fromObject, [\n 'activityStart',\n ]);\n if (fromActivityStart != null) {\n common.setValueByPath(toObject, ['activityStart'], activityStartToVertex());\n }\n\n const fromActivityEnd = common.getValueByPath(fromObject, ['activityEnd']);\n if (fromActivityEnd != null) {\n common.setValueByPath(toObject, ['activityEnd'], activityEndToVertex());\n }\n\n return toObject;\n}\n\nexport function functionResponseToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionResponse,\n): Record {\n const toObject: Record = {};\n\n const fromId = common.getValueByPath(fromObject, ['id']);\n if (fromId != null) {\n common.setValueByPath(toObject, ['id'], fromId);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(toObject, ['response'], fromResponse);\n }\n\n return toObject;\n}\n\nexport function functionResponseToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionResponse,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['id']) !== undefined) {\n throw new Error('id parameter is not supported in Vertex AI.');\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(toObject, ['response'], fromResponse);\n }\n\n return toObject;\n}\n\nexport function liveClientToolResponseToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveClientToolResponse,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionResponses = common.getValueByPath(fromObject, [\n 'functionResponses',\n ]);\n if (fromFunctionResponses != null) {\n if (Array.isArray(fromFunctionResponses)) {\n common.setValueByPath(\n toObject,\n ['functionResponses'],\n fromFunctionResponses.map((item) => {\n return functionResponseToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionResponses'],\n fromFunctionResponses,\n );\n }\n }\n\n return toObject;\n}\n\nexport function liveClientToolResponseToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveClientToolResponse,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionResponses = common.getValueByPath(fromObject, [\n 'functionResponses',\n ]);\n if (fromFunctionResponses != null) {\n if (Array.isArray(fromFunctionResponses)) {\n common.setValueByPath(\n toObject,\n ['functionResponses'],\n fromFunctionResponses.map((item) => {\n return functionResponseToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionResponses'],\n fromFunctionResponses,\n );\n }\n }\n\n return toObject;\n}\n\nexport function liveClientMessageToMldev(\n apiClient: ApiClient,\n fromObject: types.LiveClientMessage,\n): Record {\n const toObject: Record = {};\n\n const fromSetup = common.getValueByPath(fromObject, ['setup']);\n if (fromSetup != null) {\n common.setValueByPath(\n toObject,\n ['setup'],\n liveClientSetupToMldev(apiClient, fromSetup),\n );\n }\n\n const fromClientContent = common.getValueByPath(fromObject, [\n 'clientContent',\n ]);\n if (fromClientContent != null) {\n common.setValueByPath(\n toObject,\n ['clientContent'],\n liveClientContentToMldev(apiClient, fromClientContent),\n );\n }\n\n const fromRealtimeInput = common.getValueByPath(fromObject, [\n 'realtimeInput',\n ]);\n if (fromRealtimeInput != null) {\n common.setValueByPath(\n toObject,\n ['realtimeInput'],\n liveClientRealtimeInputToMldev(apiClient, fromRealtimeInput),\n );\n }\n\n const fromToolResponse = common.getValueByPath(fromObject, ['toolResponse']);\n if (fromToolResponse != null) {\n common.setValueByPath(\n toObject,\n ['toolResponse'],\n liveClientToolResponseToMldev(apiClient, fromToolResponse),\n );\n }\n\n return toObject;\n}\n\nexport function liveClientMessageToVertex(\n apiClient: ApiClient,\n fromObject: types.LiveClientMessage,\n): Record {\n const toObject: Record = {};\n\n const fromSetup = common.getValueByPath(fromObject, ['setup']);\n if (fromSetup != null) {\n common.setValueByPath(\n toObject,\n ['setup'],\n liveClientSetupToVertex(apiClient, fromSetup),\n );\n }\n\n const fromClientContent = common.getValueByPath(fromObject, [\n 'clientContent',\n ]);\n if (fromClientContent != null) {\n common.setValueByPath(\n toObject,\n ['clientContent'],\n liveClientContentToVertex(apiClient, fromClientContent),\n );\n }\n\n const fromRealtimeInput = common.getValueByPath(fromObject, [\n 'realtimeInput',\n ]);\n if (fromRealtimeInput != null) {\n common.setValueByPath(\n toObject,\n ['realtimeInput'],\n liveClientRealtimeInputToVertex(apiClient, fromRealtimeInput),\n );\n }\n\n const fromToolResponse = common.getValueByPath(fromObject, ['toolResponse']);\n if (fromToolResponse != null) {\n common.setValueByPath(\n toObject,\n ['toolResponse'],\n liveClientToolResponseToVertex(apiClient, fromToolResponse),\n );\n }\n\n return toObject;\n}\n\nexport function liveServerSetupCompleteFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function liveServerSetupCompleteFromVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function partFromMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function partFromVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentFromMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function contentFromVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function transcriptionFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function transcriptionFromVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function liveServerContentFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerContent,\n): Record {\n const toObject: Record = {};\n\n const fromModelTurn = common.getValueByPath(fromObject, ['modelTurn']);\n if (fromModelTurn != null) {\n common.setValueByPath(\n toObject,\n ['modelTurn'],\n contentFromMldev(apiClient, fromModelTurn),\n );\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete != null) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n const fromInterrupted = common.getValueByPath(fromObject, ['interrupted']);\n if (fromInterrupted != null) {\n common.setValueByPath(toObject, ['interrupted'], fromInterrupted);\n }\n\n const fromGenerationComplete = common.getValueByPath(fromObject, [\n 'generationComplete',\n ]);\n if (fromGenerationComplete != null) {\n common.setValueByPath(\n toObject,\n ['generationComplete'],\n fromGenerationComplete,\n );\n }\n\n return toObject;\n}\n\nexport function liveServerContentFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerContent,\n): Record {\n const toObject: Record = {};\n\n const fromModelTurn = common.getValueByPath(fromObject, ['modelTurn']);\n if (fromModelTurn != null) {\n common.setValueByPath(\n toObject,\n ['modelTurn'],\n contentFromVertex(apiClient, fromModelTurn),\n );\n }\n\n const fromTurnComplete = common.getValueByPath(fromObject, ['turnComplete']);\n if (fromTurnComplete != null) {\n common.setValueByPath(toObject, ['turnComplete'], fromTurnComplete);\n }\n\n const fromInterrupted = common.getValueByPath(fromObject, ['interrupted']);\n if (fromInterrupted != null) {\n common.setValueByPath(toObject, ['interrupted'], fromInterrupted);\n }\n\n const fromGenerationComplete = common.getValueByPath(fromObject, [\n 'generationComplete',\n ]);\n if (fromGenerationComplete != null) {\n common.setValueByPath(\n toObject,\n ['generationComplete'],\n fromGenerationComplete,\n );\n }\n\n return toObject;\n}\n\nexport function functionCallFromMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCall,\n): Record {\n const toObject: Record = {};\n\n const fromId = common.getValueByPath(fromObject, ['id']);\n if (fromId != null) {\n common.setValueByPath(toObject, ['id'], fromId);\n }\n\n const fromArgs = common.getValueByPath(fromObject, ['args']);\n if (fromArgs != null) {\n common.setValueByPath(toObject, ['args'], fromArgs);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n return toObject;\n}\n\nexport function functionCallFromVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCall,\n): Record {\n const toObject: Record = {};\n\n const fromArgs = common.getValueByPath(fromObject, ['args']);\n if (fromArgs != null) {\n common.setValueByPath(toObject, ['args'], fromArgs);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n return toObject;\n}\n\nexport function liveServerToolCallFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCall,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCalls = common.getValueByPath(fromObject, [\n 'functionCalls',\n ]);\n if (fromFunctionCalls != null) {\n if (Array.isArray(fromFunctionCalls)) {\n common.setValueByPath(\n toObject,\n ['functionCalls'],\n fromFunctionCalls.map((item) => {\n return functionCallFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['functionCalls'], fromFunctionCalls);\n }\n }\n\n return toObject;\n}\n\nexport function liveServerToolCallFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCall,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCalls = common.getValueByPath(fromObject, [\n 'functionCalls',\n ]);\n if (fromFunctionCalls != null) {\n if (Array.isArray(fromFunctionCalls)) {\n common.setValueByPath(\n toObject,\n ['functionCalls'],\n fromFunctionCalls.map((item) => {\n return functionCallFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['functionCalls'], fromFunctionCalls);\n }\n }\n\n return toObject;\n}\n\nexport function liveServerToolCallCancellationFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCallCancellation,\n): Record {\n const toObject: Record = {};\n\n const fromIds = common.getValueByPath(fromObject, ['ids']);\n if (fromIds != null) {\n common.setValueByPath(toObject, ['ids'], fromIds);\n }\n\n return toObject;\n}\n\nexport function liveServerToolCallCancellationFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerToolCallCancellation,\n): Record {\n const toObject: Record = {};\n\n const fromIds = common.getValueByPath(fromObject, ['ids']);\n if (fromIds != null) {\n common.setValueByPath(toObject, ['ids'], fromIds);\n }\n\n return toObject;\n}\n\nexport function modalityTokenCountFromMldev(\n apiClient: ApiClient,\n fromObject: types.ModalityTokenCount,\n): Record {\n const toObject: Record = {};\n\n const fromModality = common.getValueByPath(fromObject, ['modality']);\n if (fromModality != null) {\n common.setValueByPath(toObject, ['modality'], fromModality);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function modalityTokenCountFromVertex(\n apiClient: ApiClient,\n fromObject: types.ModalityTokenCount,\n): Record {\n const toObject: Record = {};\n\n const fromModality = common.getValueByPath(fromObject, ['modality']);\n if (fromModality != null) {\n common.setValueByPath(toObject, ['modality'], fromModality);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function usageMetadataFromMldev(\n apiClient: ApiClient,\n fromObject: types.UsageMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromPromptTokenCount = common.getValueByPath(fromObject, [\n 'promptTokenCount',\n ]);\n if (fromPromptTokenCount != null) {\n common.setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n const fromResponseTokenCount = common.getValueByPath(fromObject, [\n 'responseTokenCount',\n ]);\n if (fromResponseTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['responseTokenCount'],\n fromResponseTokenCount,\n );\n }\n\n const fromToolUsePromptTokenCount = common.getValueByPath(fromObject, [\n 'toolUsePromptTokenCount',\n ]);\n if (fromToolUsePromptTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokenCount'],\n fromToolUsePromptTokenCount,\n );\n }\n\n const fromThoughtsTokenCount = common.getValueByPath(fromObject, [\n 'thoughtsTokenCount',\n ]);\n if (fromThoughtsTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['thoughtsTokenCount'],\n fromThoughtsTokenCount,\n );\n }\n\n const fromTotalTokenCount = common.getValueByPath(fromObject, [\n 'totalTokenCount',\n ]);\n if (fromTotalTokenCount != null) {\n common.setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);\n }\n\n const fromPromptTokensDetails = common.getValueByPath(fromObject, [\n 'promptTokensDetails',\n ]);\n if (fromPromptTokensDetails != null) {\n if (Array.isArray(fromPromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails,\n );\n }\n }\n\n const fromCacheTokensDetails = common.getValueByPath(fromObject, [\n 'cacheTokensDetails',\n ]);\n if (fromCacheTokensDetails != null) {\n if (Array.isArray(fromCacheTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails,\n );\n }\n }\n\n const fromResponseTokensDetails = common.getValueByPath(fromObject, [\n 'responseTokensDetails',\n ]);\n if (fromResponseTokensDetails != null) {\n if (Array.isArray(fromResponseTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails,\n );\n }\n }\n\n const fromToolUsePromptTokensDetails = common.getValueByPath(fromObject, [\n 'toolUsePromptTokensDetails',\n ]);\n if (fromToolUsePromptTokensDetails != null) {\n if (Array.isArray(fromToolUsePromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails.map((item) => {\n return modalityTokenCountFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails,\n );\n }\n }\n\n return toObject;\n}\n\nexport function usageMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.UsageMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromPromptTokenCount = common.getValueByPath(fromObject, [\n 'promptTokenCount',\n ]);\n if (fromPromptTokenCount != null) {\n common.setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n const fromResponseTokenCount = common.getValueByPath(fromObject, [\n 'candidatesTokenCount',\n ]);\n if (fromResponseTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['responseTokenCount'],\n fromResponseTokenCount,\n );\n }\n\n const fromToolUsePromptTokenCount = common.getValueByPath(fromObject, [\n 'toolUsePromptTokenCount',\n ]);\n if (fromToolUsePromptTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokenCount'],\n fromToolUsePromptTokenCount,\n );\n }\n\n const fromThoughtsTokenCount = common.getValueByPath(fromObject, [\n 'thoughtsTokenCount',\n ]);\n if (fromThoughtsTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['thoughtsTokenCount'],\n fromThoughtsTokenCount,\n );\n }\n\n const fromTotalTokenCount = common.getValueByPath(fromObject, [\n 'totalTokenCount',\n ]);\n if (fromTotalTokenCount != null) {\n common.setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);\n }\n\n const fromPromptTokensDetails = common.getValueByPath(fromObject, [\n 'promptTokensDetails',\n ]);\n if (fromPromptTokensDetails != null) {\n if (Array.isArray(fromPromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['promptTokensDetails'],\n fromPromptTokensDetails,\n );\n }\n }\n\n const fromCacheTokensDetails = common.getValueByPath(fromObject, [\n 'cacheTokensDetails',\n ]);\n if (fromCacheTokensDetails != null) {\n if (Array.isArray(fromCacheTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['cacheTokensDetails'],\n fromCacheTokensDetails,\n );\n }\n }\n\n const fromResponseTokensDetails = common.getValueByPath(fromObject, [\n 'candidatesTokensDetails',\n ]);\n if (fromResponseTokensDetails != null) {\n if (Array.isArray(fromResponseTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['responseTokensDetails'],\n fromResponseTokensDetails,\n );\n }\n }\n\n const fromToolUsePromptTokensDetails = common.getValueByPath(fromObject, [\n 'toolUsePromptTokensDetails',\n ]);\n if (fromToolUsePromptTokensDetails != null) {\n if (Array.isArray(fromToolUsePromptTokensDetails)) {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails.map((item) => {\n return modalityTokenCountFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['toolUsePromptTokensDetails'],\n fromToolUsePromptTokensDetails,\n );\n }\n }\n\n const fromTrafficType = common.getValueByPath(fromObject, ['trafficType']);\n if (fromTrafficType != null) {\n common.setValueByPath(toObject, ['trafficType'], fromTrafficType);\n }\n\n return toObject;\n}\n\nexport function liveServerGoAwayFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerGoAway,\n): Record {\n const toObject: Record = {};\n\n const fromTimeLeft = common.getValueByPath(fromObject, ['timeLeft']);\n if (fromTimeLeft != null) {\n common.setValueByPath(toObject, ['timeLeft'], fromTimeLeft);\n }\n\n return toObject;\n}\n\nexport function liveServerGoAwayFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerGoAway,\n): Record {\n const toObject: Record = {};\n\n const fromTimeLeft = common.getValueByPath(fromObject, ['timeLeft']);\n if (fromTimeLeft != null) {\n common.setValueByPath(toObject, ['timeLeft'], fromTimeLeft);\n }\n\n return toObject;\n}\n\nexport function liveServerSessionResumptionUpdateFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerSessionResumptionUpdate,\n): Record {\n const toObject: Record = {};\n\n const fromNewHandle = common.getValueByPath(fromObject, ['newHandle']);\n if (fromNewHandle != null) {\n common.setValueByPath(toObject, ['newHandle'], fromNewHandle);\n }\n\n const fromResumable = common.getValueByPath(fromObject, ['resumable']);\n if (fromResumable != null) {\n common.setValueByPath(toObject, ['resumable'], fromResumable);\n }\n\n const fromLastConsumedClientMessageIndex = common.getValueByPath(fromObject, [\n 'lastConsumedClientMessageIndex',\n ]);\n if (fromLastConsumedClientMessageIndex != null) {\n common.setValueByPath(\n toObject,\n ['lastConsumedClientMessageIndex'],\n fromLastConsumedClientMessageIndex,\n );\n }\n\n return toObject;\n}\n\nexport function liveServerSessionResumptionUpdateFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerSessionResumptionUpdate,\n): Record {\n const toObject: Record = {};\n\n const fromNewHandle = common.getValueByPath(fromObject, ['newHandle']);\n if (fromNewHandle != null) {\n common.setValueByPath(toObject, ['newHandle'], fromNewHandle);\n }\n\n const fromResumable = common.getValueByPath(fromObject, ['resumable']);\n if (fromResumable != null) {\n common.setValueByPath(toObject, ['resumable'], fromResumable);\n }\n\n const fromLastConsumedClientMessageIndex = common.getValueByPath(fromObject, [\n 'lastConsumedClientMessageIndex',\n ]);\n if (fromLastConsumedClientMessageIndex != null) {\n common.setValueByPath(\n toObject,\n ['lastConsumedClientMessageIndex'],\n fromLastConsumedClientMessageIndex,\n );\n }\n\n return toObject;\n}\n\nexport function liveServerMessageFromMldev(\n apiClient: ApiClient,\n fromObject: types.LiveServerMessage,\n): Record {\n const toObject: Record = {};\n\n const fromSetupComplete = common.getValueByPath(fromObject, [\n 'setupComplete',\n ]);\n if (fromSetupComplete != null) {\n common.setValueByPath(\n toObject,\n ['setupComplete'],\n liveServerSetupCompleteFromMldev(),\n );\n }\n\n const fromServerContent = common.getValueByPath(fromObject, [\n 'serverContent',\n ]);\n if (fromServerContent != null) {\n common.setValueByPath(\n toObject,\n ['serverContent'],\n liveServerContentFromMldev(apiClient, fromServerContent),\n );\n }\n\n const fromToolCall = common.getValueByPath(fromObject, ['toolCall']);\n if (fromToolCall != null) {\n common.setValueByPath(\n toObject,\n ['toolCall'],\n liveServerToolCallFromMldev(apiClient, fromToolCall),\n );\n }\n\n const fromToolCallCancellation = common.getValueByPath(fromObject, [\n 'toolCallCancellation',\n ]);\n if (fromToolCallCancellation != null) {\n common.setValueByPath(\n toObject,\n ['toolCallCancellation'],\n liveServerToolCallCancellationFromMldev(\n apiClient,\n fromToolCallCancellation,\n ),\n );\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(\n toObject,\n ['usageMetadata'],\n usageMetadataFromMldev(apiClient, fromUsageMetadata),\n );\n }\n\n const fromGoAway = common.getValueByPath(fromObject, ['goAway']);\n if (fromGoAway != null) {\n common.setValueByPath(\n toObject,\n ['goAway'],\n liveServerGoAwayFromMldev(apiClient, fromGoAway),\n );\n }\n\n const fromSessionResumptionUpdate = common.getValueByPath(fromObject, [\n 'sessionResumptionUpdate',\n ]);\n if (fromSessionResumptionUpdate != null) {\n common.setValueByPath(\n toObject,\n ['sessionResumptionUpdate'],\n liveServerSessionResumptionUpdateFromMldev(\n apiClient,\n fromSessionResumptionUpdate,\n ),\n );\n }\n\n return toObject;\n}\n\nexport function liveServerMessageFromVertex(\n apiClient: ApiClient,\n fromObject: types.LiveServerMessage,\n): Record {\n const toObject: Record = {};\n\n const fromSetupComplete = common.getValueByPath(fromObject, [\n 'setupComplete',\n ]);\n if (fromSetupComplete != null) {\n common.setValueByPath(\n toObject,\n ['setupComplete'],\n liveServerSetupCompleteFromVertex(),\n );\n }\n\n const fromServerContent = common.getValueByPath(fromObject, [\n 'serverContent',\n ]);\n if (fromServerContent != null) {\n common.setValueByPath(\n toObject,\n ['serverContent'],\n liveServerContentFromVertex(apiClient, fromServerContent),\n );\n }\n\n const fromToolCall = common.getValueByPath(fromObject, ['toolCall']);\n if (fromToolCall != null) {\n common.setValueByPath(\n toObject,\n ['toolCall'],\n liveServerToolCallFromVertex(apiClient, fromToolCall),\n );\n }\n\n const fromToolCallCancellation = common.getValueByPath(fromObject, [\n 'toolCallCancellation',\n ]);\n if (fromToolCallCancellation != null) {\n common.setValueByPath(\n toObject,\n ['toolCallCancellation'],\n liveServerToolCallCancellationFromVertex(\n apiClient,\n fromToolCallCancellation,\n ),\n );\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(\n toObject,\n ['usageMetadata'],\n usageMetadataFromVertex(apiClient, fromUsageMetadata),\n );\n }\n\n const fromGoAway = common.getValueByPath(fromObject, ['goAway']);\n if (fromGoAway != null) {\n common.setValueByPath(\n toObject,\n ['goAway'],\n liveServerGoAwayFromVertex(apiClient, fromGoAway),\n );\n }\n\n const fromSessionResumptionUpdate = common.getValueByPath(fromObject, [\n 'sessionResumptionUpdate',\n ]);\n if (fromSessionResumptionUpdate != null) {\n common.setValueByPath(\n toObject,\n ['sessionResumptionUpdate'],\n liveServerSessionResumptionUpdateFromVertex(\n apiClient,\n fromSessionResumptionUpdate,\n ),\n );\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function partToMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['videoMetadata']) !== undefined) {\n throw new Error('videoMetadata parameter is not supported in Gemini API.');\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToMldev(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['example']) !== undefined) {\n throw new Error('example parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['pattern']) !== undefined) {\n throw new Error('pattern parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['default']) !== undefined) {\n throw new Error('default parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxLength']) !== undefined) {\n throw new Error('maxLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minLength']) !== undefined) {\n throw new Error('minLength parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['minProperties']) !== undefined) {\n throw new Error('minProperties parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['maxProperties']) !== undefined) {\n throw new Error('maxProperties parameter is not supported in Gemini API.');\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function modelSelectionConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ModelSelectionConfig,\n): Record {\n const toObject: Record = {};\n\n if (\n common.getValueByPath(fromObject, ['featureSelectionPreference']) !==\n undefined\n ) {\n throw new Error(\n 'featureSelectionPreference parameter is not supported in Gemini API.',\n );\n }\n\n return toObject;\n}\n\nexport function safetySettingToMldev(\n apiClient: ApiClient,\n fromObject: types.SafetySetting,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['method']) !== undefined) {\n throw new Error('method parameter is not supported in Gemini API.');\n }\n\n const fromCategory = common.getValueByPath(fromObject, ['category']);\n if (fromCategory != null) {\n common.setValueByPath(toObject, ['category'], fromCategory);\n }\n\n const fromThreshold = common.getValueByPath(fromObject, ['threshold']);\n if (fromThreshold != null) {\n common.setValueByPath(toObject, ['threshold'], fromThreshold);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['response']) !== undefined) {\n throw new Error('response parameter is not supported in Gemini API.');\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToMldev(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToMldev(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n if (common.getValueByPath(fromObject, ['retrieval']) !== undefined) {\n throw new Error('retrieval parameter is not supported in Gemini API.');\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToMldev());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToMldev(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function prebuiltVoiceConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.PrebuiltVoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceName = common.getValueByPath(fromObject, ['voiceName']);\n if (fromVoiceName != null) {\n common.setValueByPath(toObject, ['voiceName'], fromVoiceName);\n }\n\n return toObject;\n}\n\nexport function voiceConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.VoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromPrebuiltVoiceConfig = common.getValueByPath(fromObject, [\n 'prebuiltVoiceConfig',\n ]);\n if (fromPrebuiltVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['prebuiltVoiceConfig'],\n prebuiltVoiceConfigToMldev(apiClient, fromPrebuiltVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function speechConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.SpeechConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceConfig = common.getValueByPath(fromObject, ['voiceConfig']);\n if (fromVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['voiceConfig'],\n voiceConfigToMldev(apiClient, fromVoiceConfig),\n );\n }\n\n const fromLanguageCode = common.getValueByPath(fromObject, ['languageCode']);\n if (fromLanguageCode != null) {\n common.setValueByPath(toObject, ['languageCode'], fromLanguageCode);\n }\n\n return toObject;\n}\n\nexport function thinkingConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.ThinkingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromIncludeThoughts = common.getValueByPath(fromObject, [\n 'includeThoughts',\n ]);\n if (fromIncludeThoughts != null) {\n common.setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);\n }\n\n const fromThinkingBudget = common.getValueByPath(fromObject, [\n 'thinkingBudget',\n ]);\n if (fromThinkingBudget != null) {\n common.setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);\n }\n\n return toObject;\n}\n\nexport function generateContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToMldev(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTemperature = common.getValueByPath(fromObject, ['temperature']);\n if (fromTemperature != null) {\n common.setValueByPath(toObject, ['temperature'], fromTemperature);\n }\n\n const fromTopP = common.getValueByPath(fromObject, ['topP']);\n if (fromTopP != null) {\n common.setValueByPath(toObject, ['topP'], fromTopP);\n }\n\n const fromTopK = common.getValueByPath(fromObject, ['topK']);\n if (fromTopK != null) {\n common.setValueByPath(toObject, ['topK'], fromTopK);\n }\n\n const fromCandidateCount = common.getValueByPath(fromObject, [\n 'candidateCount',\n ]);\n if (fromCandidateCount != null) {\n common.setValueByPath(toObject, ['candidateCount'], fromCandidateCount);\n }\n\n const fromMaxOutputTokens = common.getValueByPath(fromObject, [\n 'maxOutputTokens',\n ]);\n if (fromMaxOutputTokens != null) {\n common.setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);\n }\n\n const fromStopSequences = common.getValueByPath(fromObject, [\n 'stopSequences',\n ]);\n if (fromStopSequences != null) {\n common.setValueByPath(toObject, ['stopSequences'], fromStopSequences);\n }\n\n const fromResponseLogprobs = common.getValueByPath(fromObject, [\n 'responseLogprobs',\n ]);\n if (fromResponseLogprobs != null) {\n common.setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);\n }\n\n const fromLogprobs = common.getValueByPath(fromObject, ['logprobs']);\n if (fromLogprobs != null) {\n common.setValueByPath(toObject, ['logprobs'], fromLogprobs);\n }\n\n const fromPresencePenalty = common.getValueByPath(fromObject, [\n 'presencePenalty',\n ]);\n if (fromPresencePenalty != null) {\n common.setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);\n }\n\n const fromFrequencyPenalty = common.getValueByPath(fromObject, [\n 'frequencyPenalty',\n ]);\n if (fromFrequencyPenalty != null) {\n common.setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (fromSeed != null) {\n common.setValueByPath(toObject, ['seed'], fromSeed);\n }\n\n const fromResponseMimeType = common.getValueByPath(fromObject, [\n 'responseMimeType',\n ]);\n if (fromResponseMimeType != null) {\n common.setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);\n }\n\n const fromResponseSchema = common.getValueByPath(fromObject, [\n 'responseSchema',\n ]);\n if (fromResponseSchema != null) {\n common.setValueByPath(\n toObject,\n ['responseSchema'],\n schemaToMldev(apiClient, t.tSchema(apiClient, fromResponseSchema)),\n );\n }\n\n if (common.getValueByPath(fromObject, ['routingConfig']) !== undefined) {\n throw new Error('routingConfig parameter is not supported in Gemini API.');\n }\n\n if (\n common.getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined\n ) {\n throw new Error(\n 'modelSelectionConfig parameter is not supported in Gemini API.',\n );\n }\n\n const fromSafetySettings = common.getValueByPath(fromObject, [\n 'safetySettings',\n ]);\n if (parentObject !== undefined && fromSafetySettings != null) {\n if (Array.isArray(fromSafetySettings)) {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings.map((item) => {\n return safetySettingToMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings,\n );\n }\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToMldev(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToMldev(apiClient, fromToolConfig),\n );\n }\n\n if (common.getValueByPath(fromObject, ['labels']) !== undefined) {\n throw new Error('labels parameter is not supported in Gemini API.');\n }\n\n const fromCachedContent = common.getValueByPath(fromObject, [\n 'cachedContent',\n ]);\n if (parentObject !== undefined && fromCachedContent != null) {\n common.setValueByPath(\n parentObject,\n ['cachedContent'],\n t.tCachedContentName(apiClient, fromCachedContent),\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities != null) {\n common.setValueByPath(\n toObject,\n ['responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromMediaResolution = common.getValueByPath(fromObject, [\n 'mediaResolution',\n ]);\n if (fromMediaResolution != null) {\n common.setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig != null) {\n common.setValueByPath(\n toObject,\n ['speechConfig'],\n speechConfigToMldev(\n apiClient,\n t.tSpeechConfig(apiClient, fromSpeechConfig),\n ),\n );\n }\n\n if (common.getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {\n throw new Error('audioTimestamp parameter is not supported in Gemini API.');\n }\n\n const fromThinkingConfig = common.getValueByPath(fromObject, [\n 'thinkingConfig',\n ]);\n if (fromThinkingConfig != null) {\n common.setValueByPath(\n toObject,\n ['thinkingConfig'],\n thinkingConfigToMldev(apiClient, fromThinkingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function generateContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['generationConfig'],\n generateContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTaskType = common.getValueByPath(fromObject, ['taskType']);\n if (parentObject !== undefined && fromTaskType != null) {\n common.setValueByPath(\n parentObject,\n ['requests[]', 'taskType'],\n fromTaskType,\n );\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (parentObject !== undefined && fromTitle != null) {\n common.setValueByPath(parentObject, ['requests[]', 'title'], fromTitle);\n }\n\n const fromOutputDimensionality = common.getValueByPath(fromObject, [\n 'outputDimensionality',\n ]);\n if (parentObject !== undefined && fromOutputDimensionality != null) {\n common.setValueByPath(\n parentObject,\n ['requests[]', 'outputDimensionality'],\n fromOutputDimensionality,\n );\n }\n\n if (common.getValueByPath(fromObject, ['mimeType']) !== undefined) {\n throw new Error('mimeType parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['autoTruncate']) !== undefined) {\n throw new Error('autoTruncate parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function embedContentParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n common.setValueByPath(\n toObject,\n ['requests[]', 'content'],\n t.tContentsForEmbed(apiClient, fromContents),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n embedContentConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n const fromModelForEmbedContent = common.getValueByPath(fromObject, ['model']);\n if (fromModelForEmbedContent !== undefined) {\n common.setValueByPath(\n toObject,\n ['requests[]', 'model'],\n t.tModel(apiClient, fromModelForEmbedContent),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {\n throw new Error('outputGcsUri parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['negativePrompt']) !== undefined) {\n throw new Error('negativePrompt parameter is not supported in Gemini API.');\n }\n\n const fromNumberOfImages = common.getValueByPath(fromObject, [\n 'numberOfImages',\n ]);\n if (parentObject !== undefined && fromNumberOfImages != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfImages,\n );\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromGuidanceScale = common.getValueByPath(fromObject, [\n 'guidanceScale',\n ]);\n if (parentObject !== undefined && fromGuidanceScale != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'guidanceScale'],\n fromGuidanceScale,\n );\n }\n\n if (common.getValueByPath(fromObject, ['seed']) !== undefined) {\n throw new Error('seed parameter is not supported in Gemini API.');\n }\n\n const fromSafetyFilterLevel = common.getValueByPath(fromObject, [\n 'safetyFilterLevel',\n ]);\n if (parentObject !== undefined && fromSafetyFilterLevel != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'safetySetting'],\n fromSafetyFilterLevel,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromIncludeSafetyAttributes = common.getValueByPath(fromObject, [\n 'includeSafetyAttributes',\n ]);\n if (parentObject !== undefined && fromIncludeSafetyAttributes != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeSafetyAttributes'],\n fromIncludeSafetyAttributes,\n );\n }\n\n const fromIncludeRaiReason = common.getValueByPath(fromObject, [\n 'includeRaiReason',\n ]);\n if (parentObject !== undefined && fromIncludeRaiReason != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeRaiReason'],\n fromIncludeRaiReason,\n );\n }\n\n const fromLanguage = common.getValueByPath(fromObject, ['language']);\n if (parentObject !== undefined && fromLanguage != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'language'],\n fromLanguage,\n );\n }\n\n const fromOutputMimeType = common.getValueByPath(fromObject, [\n 'outputMimeType',\n ]);\n if (parentObject !== undefined && fromOutputMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'mimeType'],\n fromOutputMimeType,\n );\n }\n\n const fromOutputCompressionQuality = common.getValueByPath(fromObject, [\n 'outputCompressionQuality',\n ]);\n if (parentObject !== undefined && fromOutputCompressionQuality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'compressionQuality'],\n fromOutputCompressionQuality,\n );\n }\n\n if (common.getValueByPath(fromObject, ['addWatermark']) !== undefined) {\n throw new Error('addWatermark parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {\n throw new Error('enhancePrompt parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function generateImagesParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateImagesConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getModelParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetModelParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function countTokensConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensConfig,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['systemInstruction']) !== undefined) {\n throw new Error(\n 'systemInstruction parameter is not supported in Gemini API.',\n );\n }\n\n if (common.getValueByPath(fromObject, ['tools']) !== undefined) {\n throw new Error('tools parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['generationConfig']) !== undefined) {\n throw new Error(\n 'generationConfig parameter is not supported in Gemini API.',\n );\n }\n\n return toObject;\n}\n\nexport function countTokensParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToMldev(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n countTokensConfigToMldev(apiClient, fromConfig),\n );\n }\n\n return toObject;\n}\n\nexport function imageToMldev(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n if (common.getValueByPath(fromObject, ['gcsUri']) !== undefined) {\n throw new Error('gcsUri parameter is not supported in Gemini API.');\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, ['imageBytes']);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['bytesBase64Encoded'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generateVideosConfigToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromNumberOfVideos = common.getValueByPath(fromObject, [\n 'numberOfVideos',\n ]);\n if (parentObject !== undefined && fromNumberOfVideos != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfVideos,\n );\n }\n\n if (common.getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {\n throw new Error('outputGcsUri parameter is not supported in Gemini API.');\n }\n\n if (common.getValueByPath(fromObject, ['fps']) !== undefined) {\n throw new Error('fps parameter is not supported in Gemini API.');\n }\n\n const fromDurationSeconds = common.getValueByPath(fromObject, [\n 'durationSeconds',\n ]);\n if (parentObject !== undefined && fromDurationSeconds != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'durationSeconds'],\n fromDurationSeconds,\n );\n }\n\n if (common.getValueByPath(fromObject, ['seed']) !== undefined) {\n throw new Error('seed parameter is not supported in Gemini API.');\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n if (common.getValueByPath(fromObject, ['resolution']) !== undefined) {\n throw new Error('resolution parameter is not supported in Gemini API.');\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n if (common.getValueByPath(fromObject, ['pubsubTopic']) !== undefined) {\n throw new Error('pubsubTopic parameter is not supported in Gemini API.');\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n if (common.getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {\n throw new Error('enhancePrompt parameter is not supported in Gemini API.');\n }\n\n return toObject;\n}\n\nexport function generateVideosParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromImage = common.getValueByPath(fromObject, ['image']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['instances[0]', 'image'],\n imageToMldev(apiClient, fromImage),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateVideosConfigToMldev(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partToVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentToVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function schemaToVertex(\n apiClient: ApiClient,\n fromObject: types.Schema,\n): Record {\n const toObject: Record = {};\n\n const fromExample = common.getValueByPath(fromObject, ['example']);\n if (fromExample != null) {\n common.setValueByPath(toObject, ['example'], fromExample);\n }\n\n const fromPattern = common.getValueByPath(fromObject, ['pattern']);\n if (fromPattern != null) {\n common.setValueByPath(toObject, ['pattern'], fromPattern);\n }\n\n const fromDefault = common.getValueByPath(fromObject, ['default']);\n if (fromDefault != null) {\n common.setValueByPath(toObject, ['default'], fromDefault);\n }\n\n const fromMaxLength = common.getValueByPath(fromObject, ['maxLength']);\n if (fromMaxLength != null) {\n common.setValueByPath(toObject, ['maxLength'], fromMaxLength);\n }\n\n const fromMinLength = common.getValueByPath(fromObject, ['minLength']);\n if (fromMinLength != null) {\n common.setValueByPath(toObject, ['minLength'], fromMinLength);\n }\n\n const fromMinProperties = common.getValueByPath(fromObject, [\n 'minProperties',\n ]);\n if (fromMinProperties != null) {\n common.setValueByPath(toObject, ['minProperties'], fromMinProperties);\n }\n\n const fromMaxProperties = common.getValueByPath(fromObject, [\n 'maxProperties',\n ]);\n if (fromMaxProperties != null) {\n common.setValueByPath(toObject, ['maxProperties'], fromMaxProperties);\n }\n\n const fromAnyOf = common.getValueByPath(fromObject, ['anyOf']);\n if (fromAnyOf != null) {\n common.setValueByPath(toObject, ['anyOf'], fromAnyOf);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromEnum = common.getValueByPath(fromObject, ['enum']);\n if (fromEnum != null) {\n common.setValueByPath(toObject, ['enum'], fromEnum);\n }\n\n const fromFormat = common.getValueByPath(fromObject, ['format']);\n if (fromFormat != null) {\n common.setValueByPath(toObject, ['format'], fromFormat);\n }\n\n const fromItems = common.getValueByPath(fromObject, ['items']);\n if (fromItems != null) {\n common.setValueByPath(toObject, ['items'], fromItems);\n }\n\n const fromMaxItems = common.getValueByPath(fromObject, ['maxItems']);\n if (fromMaxItems != null) {\n common.setValueByPath(toObject, ['maxItems'], fromMaxItems);\n }\n\n const fromMaximum = common.getValueByPath(fromObject, ['maximum']);\n if (fromMaximum != null) {\n common.setValueByPath(toObject, ['maximum'], fromMaximum);\n }\n\n const fromMinItems = common.getValueByPath(fromObject, ['minItems']);\n if (fromMinItems != null) {\n common.setValueByPath(toObject, ['minItems'], fromMinItems);\n }\n\n const fromMinimum = common.getValueByPath(fromObject, ['minimum']);\n if (fromMinimum != null) {\n common.setValueByPath(toObject, ['minimum'], fromMinimum);\n }\n\n const fromNullable = common.getValueByPath(fromObject, ['nullable']);\n if (fromNullable != null) {\n common.setValueByPath(toObject, ['nullable'], fromNullable);\n }\n\n const fromProperties = common.getValueByPath(fromObject, ['properties']);\n if (fromProperties != null) {\n common.setValueByPath(toObject, ['properties'], fromProperties);\n }\n\n const fromPropertyOrdering = common.getValueByPath(fromObject, [\n 'propertyOrdering',\n ]);\n if (fromPropertyOrdering != null) {\n common.setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);\n }\n\n const fromRequired = common.getValueByPath(fromObject, ['required']);\n if (fromRequired != null) {\n common.setValueByPath(toObject, ['required'], fromRequired);\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (fromTitle != null) {\n common.setValueByPath(toObject, ['title'], fromTitle);\n }\n\n const fromType = common.getValueByPath(fromObject, ['type']);\n if (fromType != null) {\n common.setValueByPath(toObject, ['type'], fromType);\n }\n\n return toObject;\n}\n\nexport function modelSelectionConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ModelSelectionConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFeatureSelectionPreference = common.getValueByPath(fromObject, [\n 'featureSelectionPreference',\n ]);\n if (fromFeatureSelectionPreference != null) {\n common.setValueByPath(\n toObject,\n ['featureSelectionPreference'],\n fromFeatureSelectionPreference,\n );\n }\n\n return toObject;\n}\n\nexport function safetySettingToVertex(\n apiClient: ApiClient,\n fromObject: types.SafetySetting,\n): Record {\n const toObject: Record = {};\n\n const fromMethod = common.getValueByPath(fromObject, ['method']);\n if (fromMethod != null) {\n common.setValueByPath(toObject, ['method'], fromMethod);\n }\n\n const fromCategory = common.getValueByPath(fromObject, ['category']);\n if (fromCategory != null) {\n common.setValueByPath(toObject, ['category'], fromCategory);\n }\n\n const fromThreshold = common.getValueByPath(fromObject, ['threshold']);\n if (fromThreshold != null) {\n common.setValueByPath(toObject, ['threshold'], fromThreshold);\n }\n\n return toObject;\n}\n\nexport function functionDeclarationToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionDeclaration,\n): Record {\n const toObject: Record = {};\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n schemaToVertex(apiClient, fromResponse),\n );\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromParameters = common.getValueByPath(fromObject, ['parameters']);\n if (fromParameters != null) {\n common.setValueByPath(toObject, ['parameters'], fromParameters);\n }\n\n return toObject;\n}\n\nexport function googleSearchToVertex(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function dynamicRetrievalConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.DynamicRetrievalConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromDynamicThreshold = common.getValueByPath(fromObject, [\n 'dynamicThreshold',\n ]);\n if (fromDynamicThreshold != null) {\n common.setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);\n }\n\n return toObject;\n}\n\nexport function googleSearchRetrievalToVertex(\n apiClient: ApiClient,\n fromObject: types.GoogleSearchRetrieval,\n): Record {\n const toObject: Record = {};\n\n const fromDynamicRetrievalConfig = common.getValueByPath(fromObject, [\n 'dynamicRetrievalConfig',\n ]);\n if (fromDynamicRetrievalConfig != null) {\n common.setValueByPath(\n toObject,\n ['dynamicRetrievalConfig'],\n dynamicRetrievalConfigToVertex(apiClient, fromDynamicRetrievalConfig),\n );\n }\n\n return toObject;\n}\n\nexport function toolToVertex(\n apiClient: ApiClient,\n fromObject: types.Tool,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionDeclarations = common.getValueByPath(fromObject, [\n 'functionDeclarations',\n ]);\n if (fromFunctionDeclarations != null) {\n if (Array.isArray(fromFunctionDeclarations)) {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations.map((item) => {\n return functionDeclarationToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['functionDeclarations'],\n fromFunctionDeclarations,\n );\n }\n }\n\n const fromRetrieval = common.getValueByPath(fromObject, ['retrieval']);\n if (fromRetrieval != null) {\n common.setValueByPath(toObject, ['retrieval'], fromRetrieval);\n }\n\n const fromGoogleSearch = common.getValueByPath(fromObject, ['googleSearch']);\n if (fromGoogleSearch != null) {\n common.setValueByPath(toObject, ['googleSearch'], googleSearchToVertex());\n }\n\n const fromGoogleSearchRetrieval = common.getValueByPath(fromObject, [\n 'googleSearchRetrieval',\n ]);\n if (fromGoogleSearchRetrieval != null) {\n common.setValueByPath(\n toObject,\n ['googleSearchRetrieval'],\n googleSearchRetrievalToVertex(apiClient, fromGoogleSearchRetrieval),\n );\n }\n\n const fromCodeExecution = common.getValueByPath(fromObject, [\n 'codeExecution',\n ]);\n if (fromCodeExecution != null) {\n common.setValueByPath(toObject, ['codeExecution'], fromCodeExecution);\n }\n\n return toObject;\n}\n\nexport function functionCallingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.FunctionCallingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromMode = common.getValueByPath(fromObject, ['mode']);\n if (fromMode != null) {\n common.setValueByPath(toObject, ['mode'], fromMode);\n }\n\n const fromAllowedFunctionNames = common.getValueByPath(fromObject, [\n 'allowedFunctionNames',\n ]);\n if (fromAllowedFunctionNames != null) {\n common.setValueByPath(\n toObject,\n ['allowedFunctionNames'],\n fromAllowedFunctionNames,\n );\n }\n\n return toObject;\n}\n\nexport function toolConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ToolConfig,\n): Record {\n const toObject: Record = {};\n\n const fromFunctionCallingConfig = common.getValueByPath(fromObject, [\n 'functionCallingConfig',\n ]);\n if (fromFunctionCallingConfig != null) {\n common.setValueByPath(\n toObject,\n ['functionCallingConfig'],\n functionCallingConfigToVertex(apiClient, fromFunctionCallingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function prebuiltVoiceConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.PrebuiltVoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceName = common.getValueByPath(fromObject, ['voiceName']);\n if (fromVoiceName != null) {\n common.setValueByPath(toObject, ['voiceName'], fromVoiceName);\n }\n\n return toObject;\n}\n\nexport function voiceConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.VoiceConfig,\n): Record {\n const toObject: Record = {};\n\n const fromPrebuiltVoiceConfig = common.getValueByPath(fromObject, [\n 'prebuiltVoiceConfig',\n ]);\n if (fromPrebuiltVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['prebuiltVoiceConfig'],\n prebuiltVoiceConfigToVertex(apiClient, fromPrebuiltVoiceConfig),\n );\n }\n\n return toObject;\n}\n\nexport function speechConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.SpeechConfig,\n): Record {\n const toObject: Record = {};\n\n const fromVoiceConfig = common.getValueByPath(fromObject, ['voiceConfig']);\n if (fromVoiceConfig != null) {\n common.setValueByPath(\n toObject,\n ['voiceConfig'],\n voiceConfigToVertex(apiClient, fromVoiceConfig),\n );\n }\n\n const fromLanguageCode = common.getValueByPath(fromObject, ['languageCode']);\n if (fromLanguageCode != null) {\n common.setValueByPath(toObject, ['languageCode'], fromLanguageCode);\n }\n\n return toObject;\n}\n\nexport function thinkingConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.ThinkingConfig,\n): Record {\n const toObject: Record = {};\n\n const fromIncludeThoughts = common.getValueByPath(fromObject, [\n 'includeThoughts',\n ]);\n if (fromIncludeThoughts != null) {\n common.setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);\n }\n\n const fromThinkingBudget = common.getValueByPath(fromObject, [\n 'thinkingBudget',\n ]);\n if (fromThinkingBudget != null) {\n common.setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);\n }\n\n return toObject;\n}\n\nexport function generateContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTemperature = common.getValueByPath(fromObject, ['temperature']);\n if (fromTemperature != null) {\n common.setValueByPath(toObject, ['temperature'], fromTemperature);\n }\n\n const fromTopP = common.getValueByPath(fromObject, ['topP']);\n if (fromTopP != null) {\n common.setValueByPath(toObject, ['topP'], fromTopP);\n }\n\n const fromTopK = common.getValueByPath(fromObject, ['topK']);\n if (fromTopK != null) {\n common.setValueByPath(toObject, ['topK'], fromTopK);\n }\n\n const fromCandidateCount = common.getValueByPath(fromObject, [\n 'candidateCount',\n ]);\n if (fromCandidateCount != null) {\n common.setValueByPath(toObject, ['candidateCount'], fromCandidateCount);\n }\n\n const fromMaxOutputTokens = common.getValueByPath(fromObject, [\n 'maxOutputTokens',\n ]);\n if (fromMaxOutputTokens != null) {\n common.setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);\n }\n\n const fromStopSequences = common.getValueByPath(fromObject, [\n 'stopSequences',\n ]);\n if (fromStopSequences != null) {\n common.setValueByPath(toObject, ['stopSequences'], fromStopSequences);\n }\n\n const fromResponseLogprobs = common.getValueByPath(fromObject, [\n 'responseLogprobs',\n ]);\n if (fromResponseLogprobs != null) {\n common.setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);\n }\n\n const fromLogprobs = common.getValueByPath(fromObject, ['logprobs']);\n if (fromLogprobs != null) {\n common.setValueByPath(toObject, ['logprobs'], fromLogprobs);\n }\n\n const fromPresencePenalty = common.getValueByPath(fromObject, [\n 'presencePenalty',\n ]);\n if (fromPresencePenalty != null) {\n common.setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);\n }\n\n const fromFrequencyPenalty = common.getValueByPath(fromObject, [\n 'frequencyPenalty',\n ]);\n if (fromFrequencyPenalty != null) {\n common.setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (fromSeed != null) {\n common.setValueByPath(toObject, ['seed'], fromSeed);\n }\n\n const fromResponseMimeType = common.getValueByPath(fromObject, [\n 'responseMimeType',\n ]);\n if (fromResponseMimeType != null) {\n common.setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);\n }\n\n const fromResponseSchema = common.getValueByPath(fromObject, [\n 'responseSchema',\n ]);\n if (fromResponseSchema != null) {\n common.setValueByPath(\n toObject,\n ['responseSchema'],\n schemaToVertex(apiClient, t.tSchema(apiClient, fromResponseSchema)),\n );\n }\n\n const fromRoutingConfig = common.getValueByPath(fromObject, [\n 'routingConfig',\n ]);\n if (fromRoutingConfig != null) {\n common.setValueByPath(toObject, ['routingConfig'], fromRoutingConfig);\n }\n\n const fromModelSelectionConfig = common.getValueByPath(fromObject, [\n 'modelSelectionConfig',\n ]);\n if (fromModelSelectionConfig != null) {\n common.setValueByPath(\n toObject,\n ['modelConfig'],\n modelSelectionConfigToVertex(apiClient, fromModelSelectionConfig),\n );\n }\n\n const fromSafetySettings = common.getValueByPath(fromObject, [\n 'safetySettings',\n ]);\n if (parentObject !== undefined && fromSafetySettings != null) {\n if (Array.isArray(fromSafetySettings)) {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings.map((item) => {\n return safetySettingToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['safetySettings'],\n fromSafetySettings,\n );\n }\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(\n apiClient,\n t.tTools(apiClient, fromTools).map((item) => {\n return toolToVertex(apiClient, t.tTool(apiClient, item));\n }),\n ),\n );\n } else {\n common.setValueByPath(\n parentObject,\n ['tools'],\n t.tTools(apiClient, fromTools),\n );\n }\n }\n\n const fromToolConfig = common.getValueByPath(fromObject, ['toolConfig']);\n if (parentObject !== undefined && fromToolConfig != null) {\n common.setValueByPath(\n parentObject,\n ['toolConfig'],\n toolConfigToVertex(apiClient, fromToolConfig),\n );\n }\n\n const fromLabels = common.getValueByPath(fromObject, ['labels']);\n if (parentObject !== undefined && fromLabels != null) {\n common.setValueByPath(parentObject, ['labels'], fromLabels);\n }\n\n const fromCachedContent = common.getValueByPath(fromObject, [\n 'cachedContent',\n ]);\n if (parentObject !== undefined && fromCachedContent != null) {\n common.setValueByPath(\n parentObject,\n ['cachedContent'],\n t.tCachedContentName(apiClient, fromCachedContent),\n );\n }\n\n const fromResponseModalities = common.getValueByPath(fromObject, [\n 'responseModalities',\n ]);\n if (fromResponseModalities != null) {\n common.setValueByPath(\n toObject,\n ['responseModalities'],\n fromResponseModalities,\n );\n }\n\n const fromMediaResolution = common.getValueByPath(fromObject, [\n 'mediaResolution',\n ]);\n if (fromMediaResolution != null) {\n common.setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);\n }\n\n const fromSpeechConfig = common.getValueByPath(fromObject, ['speechConfig']);\n if (fromSpeechConfig != null) {\n common.setValueByPath(\n toObject,\n ['speechConfig'],\n speechConfigToVertex(\n apiClient,\n t.tSpeechConfig(apiClient, fromSpeechConfig),\n ),\n );\n }\n\n const fromAudioTimestamp = common.getValueByPath(fromObject, [\n 'audioTimestamp',\n ]);\n if (fromAudioTimestamp != null) {\n common.setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp);\n }\n\n const fromThinkingConfig = common.getValueByPath(fromObject, [\n 'thinkingConfig',\n ]);\n if (fromThinkingConfig != null) {\n common.setValueByPath(\n toObject,\n ['thinkingConfig'],\n thinkingConfigToVertex(apiClient, fromThinkingConfig),\n );\n }\n\n return toObject;\n}\n\nexport function generateContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['generationConfig'],\n generateContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromTaskType = common.getValueByPath(fromObject, ['taskType']);\n if (parentObject !== undefined && fromTaskType != null) {\n common.setValueByPath(\n parentObject,\n ['instances[]', 'task_type'],\n fromTaskType,\n );\n }\n\n const fromTitle = common.getValueByPath(fromObject, ['title']);\n if (parentObject !== undefined && fromTitle != null) {\n common.setValueByPath(parentObject, ['instances[]', 'title'], fromTitle);\n }\n\n const fromOutputDimensionality = common.getValueByPath(fromObject, [\n 'outputDimensionality',\n ]);\n if (parentObject !== undefined && fromOutputDimensionality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputDimensionality'],\n fromOutputDimensionality,\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (parentObject !== undefined && fromMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['instances[]', 'mimeType'],\n fromMimeType,\n );\n }\n\n const fromAutoTruncate = common.getValueByPath(fromObject, ['autoTruncate']);\n if (parentObject !== undefined && fromAutoTruncate != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'autoTruncate'],\n fromAutoTruncate,\n );\n }\n\n return toObject;\n}\n\nexport function embedContentParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n common.setValueByPath(\n toObject,\n ['instances[]', 'content'],\n t.tContentsForEmbed(apiClient, fromContents),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n embedContentConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromOutputGcsUri = common.getValueByPath(fromObject, ['outputGcsUri']);\n if (parentObject !== undefined && fromOutputGcsUri != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'storageUri'],\n fromOutputGcsUri,\n );\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n const fromNumberOfImages = common.getValueByPath(fromObject, [\n 'numberOfImages',\n ]);\n if (parentObject !== undefined && fromNumberOfImages != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfImages,\n );\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromGuidanceScale = common.getValueByPath(fromObject, [\n 'guidanceScale',\n ]);\n if (parentObject !== undefined && fromGuidanceScale != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'guidanceScale'],\n fromGuidanceScale,\n );\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (parentObject !== undefined && fromSeed != null) {\n common.setValueByPath(parentObject, ['parameters', 'seed'], fromSeed);\n }\n\n const fromSafetyFilterLevel = common.getValueByPath(fromObject, [\n 'safetyFilterLevel',\n ]);\n if (parentObject !== undefined && fromSafetyFilterLevel != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'safetySetting'],\n fromSafetyFilterLevel,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromIncludeSafetyAttributes = common.getValueByPath(fromObject, [\n 'includeSafetyAttributes',\n ]);\n if (parentObject !== undefined && fromIncludeSafetyAttributes != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeSafetyAttributes'],\n fromIncludeSafetyAttributes,\n );\n }\n\n const fromIncludeRaiReason = common.getValueByPath(fromObject, [\n 'includeRaiReason',\n ]);\n if (parentObject !== undefined && fromIncludeRaiReason != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'includeRaiReason'],\n fromIncludeRaiReason,\n );\n }\n\n const fromLanguage = common.getValueByPath(fromObject, ['language']);\n if (parentObject !== undefined && fromLanguage != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'language'],\n fromLanguage,\n );\n }\n\n const fromOutputMimeType = common.getValueByPath(fromObject, [\n 'outputMimeType',\n ]);\n if (parentObject !== undefined && fromOutputMimeType != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'mimeType'],\n fromOutputMimeType,\n );\n }\n\n const fromOutputCompressionQuality = common.getValueByPath(fromObject, [\n 'outputCompressionQuality',\n ]);\n if (parentObject !== undefined && fromOutputCompressionQuality != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'outputOptions', 'compressionQuality'],\n fromOutputCompressionQuality,\n );\n }\n\n const fromAddWatermark = common.getValueByPath(fromObject, ['addWatermark']);\n if (parentObject !== undefined && fromAddWatermark != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'addWatermark'],\n fromAddWatermark,\n );\n }\n\n const fromEnhancePrompt = common.getValueByPath(fromObject, [\n 'enhancePrompt',\n ]);\n if (parentObject !== undefined && fromEnhancePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'enhancePrompt'],\n fromEnhancePrompt,\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateImagesConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function getModelParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetModelParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'name'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function countTokensConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromSystemInstruction = common.getValueByPath(fromObject, [\n 'systemInstruction',\n ]);\n if (parentObject !== undefined && fromSystemInstruction != null) {\n common.setValueByPath(\n parentObject,\n ['systemInstruction'],\n contentToVertex(apiClient, t.tContent(apiClient, fromSystemInstruction)),\n );\n }\n\n const fromTools = common.getValueByPath(fromObject, ['tools']);\n if (parentObject !== undefined && fromTools != null) {\n if (Array.isArray(fromTools)) {\n common.setValueByPath(\n parentObject,\n ['tools'],\n fromTools.map((item) => {\n return toolToVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(parentObject, ['tools'], fromTools);\n }\n }\n\n const fromGenerationConfig = common.getValueByPath(fromObject, [\n 'generationConfig',\n ]);\n if (parentObject !== undefined && fromGenerationConfig != null) {\n common.setValueByPath(\n parentObject,\n ['generationConfig'],\n fromGenerationConfig,\n );\n }\n\n return toObject;\n}\n\nexport function countTokensParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n countTokensConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function computeTokensParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.ComputeTokensParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromContents = common.getValueByPath(fromObject, ['contents']);\n if (fromContents != null) {\n if (Array.isArray(fromContents)) {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(\n apiClient,\n t.tContents(apiClient, fromContents).map((item) => {\n return contentToVertex(apiClient, item);\n }),\n ),\n );\n } else {\n common.setValueByPath(\n toObject,\n ['contents'],\n t.tContents(apiClient, fromContents),\n );\n }\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function imageToVertex(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromGcsUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromGcsUri != null) {\n common.setValueByPath(toObject, ['gcsUri'], fromGcsUri);\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, ['imageBytes']);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['bytesBase64Encoded'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generateVideosConfigToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosConfig,\n parentObject: Record,\n): Record {\n const toObject: Record = {};\n\n const fromNumberOfVideos = common.getValueByPath(fromObject, [\n 'numberOfVideos',\n ]);\n if (parentObject !== undefined && fromNumberOfVideos != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'sampleCount'],\n fromNumberOfVideos,\n );\n }\n\n const fromOutputGcsUri = common.getValueByPath(fromObject, ['outputGcsUri']);\n if (parentObject !== undefined && fromOutputGcsUri != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'storageUri'],\n fromOutputGcsUri,\n );\n }\n\n const fromFps = common.getValueByPath(fromObject, ['fps']);\n if (parentObject !== undefined && fromFps != null) {\n common.setValueByPath(parentObject, ['parameters', 'fps'], fromFps);\n }\n\n const fromDurationSeconds = common.getValueByPath(fromObject, [\n 'durationSeconds',\n ]);\n if (parentObject !== undefined && fromDurationSeconds != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'durationSeconds'],\n fromDurationSeconds,\n );\n }\n\n const fromSeed = common.getValueByPath(fromObject, ['seed']);\n if (parentObject !== undefined && fromSeed != null) {\n common.setValueByPath(parentObject, ['parameters', 'seed'], fromSeed);\n }\n\n const fromAspectRatio = common.getValueByPath(fromObject, ['aspectRatio']);\n if (parentObject !== undefined && fromAspectRatio != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'aspectRatio'],\n fromAspectRatio,\n );\n }\n\n const fromResolution = common.getValueByPath(fromObject, ['resolution']);\n if (parentObject !== undefined && fromResolution != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'resolution'],\n fromResolution,\n );\n }\n\n const fromPersonGeneration = common.getValueByPath(fromObject, [\n 'personGeneration',\n ]);\n if (parentObject !== undefined && fromPersonGeneration != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'personGeneration'],\n fromPersonGeneration,\n );\n }\n\n const fromPubsubTopic = common.getValueByPath(fromObject, ['pubsubTopic']);\n if (parentObject !== undefined && fromPubsubTopic != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'pubsubTopic'],\n fromPubsubTopic,\n );\n }\n\n const fromNegativePrompt = common.getValueByPath(fromObject, [\n 'negativePrompt',\n ]);\n if (parentObject !== undefined && fromNegativePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'negativePrompt'],\n fromNegativePrompt,\n );\n }\n\n const fromEnhancePrompt = common.getValueByPath(fromObject, [\n 'enhancePrompt',\n ]);\n if (parentObject !== undefined && fromEnhancePrompt != null) {\n common.setValueByPath(\n parentObject,\n ['parameters', 'enhancePrompt'],\n fromEnhancePrompt,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosParameters,\n): Record {\n const toObject: Record = {};\n\n const fromModel = common.getValueByPath(fromObject, ['model']);\n if (fromModel != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'model'],\n t.tModel(apiClient, fromModel),\n );\n }\n\n const fromPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromPrompt != null) {\n common.setValueByPath(toObject, ['instances[0]', 'prompt'], fromPrompt);\n }\n\n const fromImage = common.getValueByPath(fromObject, ['image']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['instances[0]', 'image'],\n imageToVertex(apiClient, fromImage),\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(\n toObject,\n ['config'],\n generateVideosConfigToVertex(apiClient, fromConfig, toObject),\n );\n }\n\n return toObject;\n}\n\nexport function partFromMldev(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentFromMldev(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function citationMetadataFromMldev(\n apiClient: ApiClient,\n fromObject: types.CitationMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromCitations = common.getValueByPath(fromObject, ['citationSources']);\n if (fromCitations != null) {\n common.setValueByPath(toObject, ['citations'], fromCitations);\n }\n\n return toObject;\n}\n\nexport function candidateFromMldev(\n apiClient: ApiClient,\n fromObject: types.Candidate,\n): Record {\n const toObject: Record = {};\n\n const fromContent = common.getValueByPath(fromObject, ['content']);\n if (fromContent != null) {\n common.setValueByPath(\n toObject,\n ['content'],\n contentFromMldev(apiClient, fromContent),\n );\n }\n\n const fromCitationMetadata = common.getValueByPath(fromObject, [\n 'citationMetadata',\n ]);\n if (fromCitationMetadata != null) {\n common.setValueByPath(\n toObject,\n ['citationMetadata'],\n citationMetadataFromMldev(apiClient, fromCitationMetadata),\n );\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['tokenCount']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n const fromFinishReason = common.getValueByPath(fromObject, ['finishReason']);\n if (fromFinishReason != null) {\n common.setValueByPath(toObject, ['finishReason'], fromFinishReason);\n }\n\n const fromAvgLogprobs = common.getValueByPath(fromObject, ['avgLogprobs']);\n if (fromAvgLogprobs != null) {\n common.setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);\n }\n\n const fromGroundingMetadata = common.getValueByPath(fromObject, [\n 'groundingMetadata',\n ]);\n if (fromGroundingMetadata != null) {\n common.setValueByPath(\n toObject,\n ['groundingMetadata'],\n fromGroundingMetadata,\n );\n }\n\n const fromIndex = common.getValueByPath(fromObject, ['index']);\n if (fromIndex != null) {\n common.setValueByPath(toObject, ['index'], fromIndex);\n }\n\n const fromLogprobsResult = common.getValueByPath(fromObject, [\n 'logprobsResult',\n ]);\n if (fromLogprobsResult != null) {\n common.setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult);\n }\n\n const fromSafetyRatings = common.getValueByPath(fromObject, [\n 'safetyRatings',\n ]);\n if (fromSafetyRatings != null) {\n common.setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings);\n }\n\n return toObject;\n}\n\nexport function generateContentResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromCandidates = common.getValueByPath(fromObject, ['candidates']);\n if (fromCandidates != null) {\n if (Array.isArray(fromCandidates)) {\n common.setValueByPath(\n toObject,\n ['candidates'],\n fromCandidates.map((item) => {\n return candidateFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['candidates'], fromCandidates);\n }\n }\n\n const fromModelVersion = common.getValueByPath(fromObject, ['modelVersion']);\n if (fromModelVersion != null) {\n common.setValueByPath(toObject, ['modelVersion'], fromModelVersion);\n }\n\n const fromPromptFeedback = common.getValueByPath(fromObject, [\n 'promptFeedback',\n ]);\n if (fromPromptFeedback != null) {\n common.setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingStatisticsFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function contentEmbeddingFromMldev(\n apiClient: ApiClient,\n fromObject: types.ContentEmbedding,\n): Record {\n const toObject: Record = {};\n\n const fromValues = common.getValueByPath(fromObject, ['values']);\n if (fromValues != null) {\n common.setValueByPath(toObject, ['values'], fromValues);\n }\n\n return toObject;\n}\n\nexport function embedContentMetadataFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function embedContentResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.EmbedContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromEmbeddings = common.getValueByPath(fromObject, ['embeddings']);\n if (fromEmbeddings != null) {\n if (Array.isArray(fromEmbeddings)) {\n common.setValueByPath(\n toObject,\n ['embeddings'],\n fromEmbeddings.map((item) => {\n return contentEmbeddingFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['embeddings'], fromEmbeddings);\n }\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(\n toObject,\n ['metadata'],\n embedContentMetadataFromMldev(),\n );\n }\n\n return toObject;\n}\n\nexport function imageFromMldev(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromImageBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['imageBytes'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function safetyAttributesFromMldev(\n apiClient: ApiClient,\n fromObject: types.SafetyAttributes,\n): Record {\n const toObject: Record = {};\n\n const fromCategories = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'categories',\n ]);\n if (fromCategories != null) {\n common.setValueByPath(toObject, ['categories'], fromCategories);\n }\n\n const fromScores = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'scores',\n ]);\n if (fromScores != null) {\n common.setValueByPath(toObject, ['scores'], fromScores);\n }\n\n const fromContentType = common.getValueByPath(fromObject, ['contentType']);\n if (fromContentType != null) {\n common.setValueByPath(toObject, ['contentType'], fromContentType);\n }\n\n return toObject;\n}\n\nexport function generatedImageFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedImage,\n): Record {\n const toObject: Record = {};\n\n const fromImage = common.getValueByPath(fromObject, ['_self']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['image'],\n imageFromMldev(apiClient, fromImage),\n );\n }\n\n const fromRaiFilteredReason = common.getValueByPath(fromObject, [\n 'raiFilteredReason',\n ]);\n if (fromRaiFilteredReason != null) {\n common.setValueByPath(\n toObject,\n ['raiFilteredReason'],\n fromRaiFilteredReason,\n );\n }\n\n const fromSafetyAttributes = common.getValueByPath(fromObject, ['_self']);\n if (fromSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['safetyAttributes'],\n safetyAttributesFromMldev(apiClient, fromSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function generateImagesResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedImages = common.getValueByPath(fromObject, [\n 'predictions',\n ]);\n if (fromGeneratedImages != null) {\n if (Array.isArray(fromGeneratedImages)) {\n common.setValueByPath(\n toObject,\n ['generatedImages'],\n fromGeneratedImages.map((item) => {\n return generatedImageFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedImages'], fromGeneratedImages);\n }\n }\n\n const fromPositivePromptSafetyAttributes = common.getValueByPath(fromObject, [\n 'positivePromptSafetyAttributes',\n ]);\n if (fromPositivePromptSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['positivePromptSafetyAttributes'],\n safetyAttributesFromMldev(apiClient, fromPositivePromptSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function endpointFromMldev(): Record {\n const toObject: Record = {};\n\n return toObject;\n}\n\nexport function tunedModelInfoFromMldev(\n apiClient: ApiClient,\n fromObject: types.TunedModelInfo,\n): Record {\n const toObject: Record = {};\n\n const fromBaseModel = common.getValueByPath(fromObject, ['baseModel']);\n if (fromBaseModel != null) {\n common.setValueByPath(toObject, ['baseModel'], fromBaseModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n return toObject;\n}\n\nexport function modelFromMldev(\n apiClient: ApiClient,\n fromObject: types.Model,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromVersion = common.getValueByPath(fromObject, ['version']);\n if (fromVersion != null) {\n common.setValueByPath(toObject, ['version'], fromVersion);\n }\n\n const fromTunedModelInfo = common.getValueByPath(fromObject, ['_self']);\n if (fromTunedModelInfo != null) {\n common.setValueByPath(\n toObject,\n ['tunedModelInfo'],\n tunedModelInfoFromMldev(apiClient, fromTunedModelInfo),\n );\n }\n\n const fromInputTokenLimit = common.getValueByPath(fromObject, [\n 'inputTokenLimit',\n ]);\n if (fromInputTokenLimit != null) {\n common.setValueByPath(toObject, ['inputTokenLimit'], fromInputTokenLimit);\n }\n\n const fromOutputTokenLimit = common.getValueByPath(fromObject, [\n 'outputTokenLimit',\n ]);\n if (fromOutputTokenLimit != null) {\n common.setValueByPath(toObject, ['outputTokenLimit'], fromOutputTokenLimit);\n }\n\n const fromSupportedActions = common.getValueByPath(fromObject, [\n 'supportedGenerationMethods',\n ]);\n if (fromSupportedActions != null) {\n common.setValueByPath(toObject, ['supportedActions'], fromSupportedActions);\n }\n\n return toObject;\n}\n\nexport function countTokensResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.CountTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTotalTokens = common.getValueByPath(fromObject, ['totalTokens']);\n if (fromTotalTokens != null) {\n common.setValueByPath(toObject, ['totalTokens'], fromTotalTokens);\n }\n\n const fromCachedContentTokenCount = common.getValueByPath(fromObject, [\n 'cachedContentTokenCount',\n ]);\n if (fromCachedContentTokenCount != null) {\n common.setValueByPath(\n toObject,\n ['cachedContentTokenCount'],\n fromCachedContentTokenCount,\n );\n }\n\n return toObject;\n}\n\nexport function videoFromMldev(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['video', 'uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'video',\n 'encodedVideo',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['encoding']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromMldev(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, [\n 'generatedSamples',\n ]);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromMldev(apiClient, fromResponse),\n );\n }\n\n return toObject;\n}\n\nexport function partFromVertex(\n apiClient: ApiClient,\n fromObject: types.Part,\n): Record {\n const toObject: Record = {};\n\n const fromVideoMetadata = common.getValueByPath(fromObject, [\n 'videoMetadata',\n ]);\n if (fromVideoMetadata != null) {\n common.setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);\n }\n\n const fromThought = common.getValueByPath(fromObject, ['thought']);\n if (fromThought != null) {\n common.setValueByPath(toObject, ['thought'], fromThought);\n }\n\n const fromCodeExecutionResult = common.getValueByPath(fromObject, [\n 'codeExecutionResult',\n ]);\n if (fromCodeExecutionResult != null) {\n common.setValueByPath(\n toObject,\n ['codeExecutionResult'],\n fromCodeExecutionResult,\n );\n }\n\n const fromExecutableCode = common.getValueByPath(fromObject, [\n 'executableCode',\n ]);\n if (fromExecutableCode != null) {\n common.setValueByPath(toObject, ['executableCode'], fromExecutableCode);\n }\n\n const fromFileData = common.getValueByPath(fromObject, ['fileData']);\n if (fromFileData != null) {\n common.setValueByPath(toObject, ['fileData'], fromFileData);\n }\n\n const fromFunctionCall = common.getValueByPath(fromObject, ['functionCall']);\n if (fromFunctionCall != null) {\n common.setValueByPath(toObject, ['functionCall'], fromFunctionCall);\n }\n\n const fromFunctionResponse = common.getValueByPath(fromObject, [\n 'functionResponse',\n ]);\n if (fromFunctionResponse != null) {\n common.setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);\n }\n\n const fromInlineData = common.getValueByPath(fromObject, ['inlineData']);\n if (fromInlineData != null) {\n common.setValueByPath(toObject, ['inlineData'], fromInlineData);\n }\n\n const fromText = common.getValueByPath(fromObject, ['text']);\n if (fromText != null) {\n common.setValueByPath(toObject, ['text'], fromText);\n }\n\n return toObject;\n}\n\nexport function contentFromVertex(\n apiClient: ApiClient,\n fromObject: types.Content,\n): Record {\n const toObject: Record = {};\n\n const fromParts = common.getValueByPath(fromObject, ['parts']);\n if (fromParts != null) {\n if (Array.isArray(fromParts)) {\n common.setValueByPath(\n toObject,\n ['parts'],\n fromParts.map((item) => {\n return partFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['parts'], fromParts);\n }\n }\n\n const fromRole = common.getValueByPath(fromObject, ['role']);\n if (fromRole != null) {\n common.setValueByPath(toObject, ['role'], fromRole);\n }\n\n return toObject;\n}\n\nexport function citationMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.CitationMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromCitations = common.getValueByPath(fromObject, ['citations']);\n if (fromCitations != null) {\n common.setValueByPath(toObject, ['citations'], fromCitations);\n }\n\n return toObject;\n}\n\nexport function candidateFromVertex(\n apiClient: ApiClient,\n fromObject: types.Candidate,\n): Record {\n const toObject: Record = {};\n\n const fromContent = common.getValueByPath(fromObject, ['content']);\n if (fromContent != null) {\n common.setValueByPath(\n toObject,\n ['content'],\n contentFromVertex(apiClient, fromContent),\n );\n }\n\n const fromCitationMetadata = common.getValueByPath(fromObject, [\n 'citationMetadata',\n ]);\n if (fromCitationMetadata != null) {\n common.setValueByPath(\n toObject,\n ['citationMetadata'],\n citationMetadataFromVertex(apiClient, fromCitationMetadata),\n );\n }\n\n const fromFinishMessage = common.getValueByPath(fromObject, [\n 'finishMessage',\n ]);\n if (fromFinishMessage != null) {\n common.setValueByPath(toObject, ['finishMessage'], fromFinishMessage);\n }\n\n const fromFinishReason = common.getValueByPath(fromObject, ['finishReason']);\n if (fromFinishReason != null) {\n common.setValueByPath(toObject, ['finishReason'], fromFinishReason);\n }\n\n const fromAvgLogprobs = common.getValueByPath(fromObject, ['avgLogprobs']);\n if (fromAvgLogprobs != null) {\n common.setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);\n }\n\n const fromGroundingMetadata = common.getValueByPath(fromObject, [\n 'groundingMetadata',\n ]);\n if (fromGroundingMetadata != null) {\n common.setValueByPath(\n toObject,\n ['groundingMetadata'],\n fromGroundingMetadata,\n );\n }\n\n const fromIndex = common.getValueByPath(fromObject, ['index']);\n if (fromIndex != null) {\n common.setValueByPath(toObject, ['index'], fromIndex);\n }\n\n const fromLogprobsResult = common.getValueByPath(fromObject, [\n 'logprobsResult',\n ]);\n if (fromLogprobsResult != null) {\n common.setValueByPath(toObject, ['logprobsResult'], fromLogprobsResult);\n }\n\n const fromSafetyRatings = common.getValueByPath(fromObject, [\n 'safetyRatings',\n ]);\n if (fromSafetyRatings != null) {\n common.setValueByPath(toObject, ['safetyRatings'], fromSafetyRatings);\n }\n\n return toObject;\n}\n\nexport function generateContentResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromCandidates = common.getValueByPath(fromObject, ['candidates']);\n if (fromCandidates != null) {\n if (Array.isArray(fromCandidates)) {\n common.setValueByPath(\n toObject,\n ['candidates'],\n fromCandidates.map((item) => {\n return candidateFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['candidates'], fromCandidates);\n }\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromResponseId = common.getValueByPath(fromObject, ['responseId']);\n if (fromResponseId != null) {\n common.setValueByPath(toObject, ['responseId'], fromResponseId);\n }\n\n const fromModelVersion = common.getValueByPath(fromObject, ['modelVersion']);\n if (fromModelVersion != null) {\n common.setValueByPath(toObject, ['modelVersion'], fromModelVersion);\n }\n\n const fromPromptFeedback = common.getValueByPath(fromObject, [\n 'promptFeedback',\n ]);\n if (fromPromptFeedback != null) {\n common.setValueByPath(toObject, ['promptFeedback'], fromPromptFeedback);\n }\n\n const fromUsageMetadata = common.getValueByPath(fromObject, [\n 'usageMetadata',\n ]);\n if (fromUsageMetadata != null) {\n common.setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingStatisticsFromVertex(\n apiClient: ApiClient,\n fromObject: types.ContentEmbeddingStatistics,\n): Record {\n const toObject: Record = {};\n\n const fromTruncated = common.getValueByPath(fromObject, ['truncated']);\n if (fromTruncated != null) {\n common.setValueByPath(toObject, ['truncated'], fromTruncated);\n }\n\n const fromTokenCount = common.getValueByPath(fromObject, ['token_count']);\n if (fromTokenCount != null) {\n common.setValueByPath(toObject, ['tokenCount'], fromTokenCount);\n }\n\n return toObject;\n}\n\nexport function contentEmbeddingFromVertex(\n apiClient: ApiClient,\n fromObject: types.ContentEmbedding,\n): Record {\n const toObject: Record = {};\n\n const fromValues = common.getValueByPath(fromObject, ['values']);\n if (fromValues != null) {\n common.setValueByPath(toObject, ['values'], fromValues);\n }\n\n const fromStatistics = common.getValueByPath(fromObject, ['statistics']);\n if (fromStatistics != null) {\n common.setValueByPath(\n toObject,\n ['statistics'],\n contentEmbeddingStatisticsFromVertex(apiClient, fromStatistics),\n );\n }\n\n return toObject;\n}\n\nexport function embedContentMetadataFromVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentMetadata,\n): Record {\n const toObject: Record = {};\n\n const fromBillableCharacterCount = common.getValueByPath(fromObject, [\n 'billableCharacterCount',\n ]);\n if (fromBillableCharacterCount != null) {\n common.setValueByPath(\n toObject,\n ['billableCharacterCount'],\n fromBillableCharacterCount,\n );\n }\n\n return toObject;\n}\n\nexport function embedContentResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.EmbedContentResponse,\n): Record {\n const toObject: Record = {};\n\n const fromEmbeddings = common.getValueByPath(fromObject, [\n 'predictions[]',\n 'embeddings',\n ]);\n if (fromEmbeddings != null) {\n if (Array.isArray(fromEmbeddings)) {\n common.setValueByPath(\n toObject,\n ['embeddings'],\n fromEmbeddings.map((item) => {\n return contentEmbeddingFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['embeddings'], fromEmbeddings);\n }\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(\n toObject,\n ['metadata'],\n embedContentMetadataFromVertex(apiClient, fromMetadata),\n );\n }\n\n return toObject;\n}\n\nexport function imageFromVertex(\n apiClient: ApiClient,\n fromObject: types.Image,\n): Record {\n const toObject: Record = {};\n\n const fromGcsUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromGcsUri != null) {\n common.setValueByPath(toObject, ['gcsUri'], fromGcsUri);\n }\n\n const fromImageBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromImageBytes != null) {\n common.setValueByPath(\n toObject,\n ['imageBytes'],\n t.tBytes(apiClient, fromImageBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function safetyAttributesFromVertex(\n apiClient: ApiClient,\n fromObject: types.SafetyAttributes,\n): Record {\n const toObject: Record = {};\n\n const fromCategories = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'categories',\n ]);\n if (fromCategories != null) {\n common.setValueByPath(toObject, ['categories'], fromCategories);\n }\n\n const fromScores = common.getValueByPath(fromObject, [\n 'safetyAttributes',\n 'scores',\n ]);\n if (fromScores != null) {\n common.setValueByPath(toObject, ['scores'], fromScores);\n }\n\n const fromContentType = common.getValueByPath(fromObject, ['contentType']);\n if (fromContentType != null) {\n common.setValueByPath(toObject, ['contentType'], fromContentType);\n }\n\n return toObject;\n}\n\nexport function generatedImageFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedImage,\n): Record {\n const toObject: Record = {};\n\n const fromImage = common.getValueByPath(fromObject, ['_self']);\n if (fromImage != null) {\n common.setValueByPath(\n toObject,\n ['image'],\n imageFromVertex(apiClient, fromImage),\n );\n }\n\n const fromRaiFilteredReason = common.getValueByPath(fromObject, [\n 'raiFilteredReason',\n ]);\n if (fromRaiFilteredReason != null) {\n common.setValueByPath(\n toObject,\n ['raiFilteredReason'],\n fromRaiFilteredReason,\n );\n }\n\n const fromSafetyAttributes = common.getValueByPath(fromObject, ['_self']);\n if (fromSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['safetyAttributes'],\n safetyAttributesFromVertex(apiClient, fromSafetyAttributes),\n );\n }\n\n const fromEnhancedPrompt = common.getValueByPath(fromObject, ['prompt']);\n if (fromEnhancedPrompt != null) {\n common.setValueByPath(toObject, ['enhancedPrompt'], fromEnhancedPrompt);\n }\n\n return toObject;\n}\n\nexport function generateImagesResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateImagesResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedImages = common.getValueByPath(fromObject, [\n 'predictions',\n ]);\n if (fromGeneratedImages != null) {\n if (Array.isArray(fromGeneratedImages)) {\n common.setValueByPath(\n toObject,\n ['generatedImages'],\n fromGeneratedImages.map((item) => {\n return generatedImageFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedImages'], fromGeneratedImages);\n }\n }\n\n const fromPositivePromptSafetyAttributes = common.getValueByPath(fromObject, [\n 'positivePromptSafetyAttributes',\n ]);\n if (fromPositivePromptSafetyAttributes != null) {\n common.setValueByPath(\n toObject,\n ['positivePromptSafetyAttributes'],\n safetyAttributesFromVertex(apiClient, fromPositivePromptSafetyAttributes),\n );\n }\n\n return toObject;\n}\n\nexport function endpointFromVertex(\n apiClient: ApiClient,\n fromObject: types.Endpoint,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['endpoint']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDeployedModelId = common.getValueByPath(fromObject, [\n 'deployedModelId',\n ]);\n if (fromDeployedModelId != null) {\n common.setValueByPath(toObject, ['deployedModelId'], fromDeployedModelId);\n }\n\n return toObject;\n}\n\nexport function tunedModelInfoFromVertex(\n apiClient: ApiClient,\n fromObject: types.TunedModelInfo,\n): Record {\n const toObject: Record = {};\n\n const fromBaseModel = common.getValueByPath(fromObject, [\n 'labels',\n 'google-vertex-llm-tuning-base-model-id',\n ]);\n if (fromBaseModel != null) {\n common.setValueByPath(toObject, ['baseModel'], fromBaseModel);\n }\n\n const fromCreateTime = common.getValueByPath(fromObject, ['createTime']);\n if (fromCreateTime != null) {\n common.setValueByPath(toObject, ['createTime'], fromCreateTime);\n }\n\n const fromUpdateTime = common.getValueByPath(fromObject, ['updateTime']);\n if (fromUpdateTime != null) {\n common.setValueByPath(toObject, ['updateTime'], fromUpdateTime);\n }\n\n return toObject;\n}\n\nexport function modelFromVertex(\n apiClient: ApiClient,\n fromObject: types.Model,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromDisplayName = common.getValueByPath(fromObject, ['displayName']);\n if (fromDisplayName != null) {\n common.setValueByPath(toObject, ['displayName'], fromDisplayName);\n }\n\n const fromDescription = common.getValueByPath(fromObject, ['description']);\n if (fromDescription != null) {\n common.setValueByPath(toObject, ['description'], fromDescription);\n }\n\n const fromVersion = common.getValueByPath(fromObject, ['versionId']);\n if (fromVersion != null) {\n common.setValueByPath(toObject, ['version'], fromVersion);\n }\n\n const fromEndpoints = common.getValueByPath(fromObject, ['deployedModels']);\n if (fromEndpoints != null) {\n if (Array.isArray(fromEndpoints)) {\n common.setValueByPath(\n toObject,\n ['endpoints'],\n fromEndpoints.map((item) => {\n return endpointFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['endpoints'], fromEndpoints);\n }\n }\n\n const fromLabels = common.getValueByPath(fromObject, ['labels']);\n if (fromLabels != null) {\n common.setValueByPath(toObject, ['labels'], fromLabels);\n }\n\n const fromTunedModelInfo = common.getValueByPath(fromObject, ['_self']);\n if (fromTunedModelInfo != null) {\n common.setValueByPath(\n toObject,\n ['tunedModelInfo'],\n tunedModelInfoFromVertex(apiClient, fromTunedModelInfo),\n );\n }\n\n return toObject;\n}\n\nexport function countTokensResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.CountTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTotalTokens = common.getValueByPath(fromObject, ['totalTokens']);\n if (fromTotalTokens != null) {\n common.setValueByPath(toObject, ['totalTokens'], fromTotalTokens);\n }\n\n return toObject;\n}\n\nexport function computeTokensResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.ComputeTokensResponse,\n): Record {\n const toObject: Record = {};\n\n const fromTokensInfo = common.getValueByPath(fromObject, ['tokensInfo']);\n if (fromTokensInfo != null) {\n common.setValueByPath(toObject, ['tokensInfo'], fromTokensInfo);\n }\n\n return toObject;\n}\n\nexport function videoFromVertex(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromVertex(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, ['videos']);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromVertex(apiClient, fromResponse),\n );\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * Live client.\n *\n * @experimental\n */\n\nimport {ApiClient} from './_api_client';\nimport {Auth} from './_auth';\nimport * as t from './_transformers';\nimport {WebSocket, WebSocketCallbacks, WebSocketFactory} from './_websocket';\nimport * as converters from './converters/_live_converters';\nimport {contentToMldev, contentToVertex} from './converters/_models_converters';\nimport * as types from './types';\n\nconst FUNCTION_RESPONSE_REQUIRES_ID =\n 'FunctionResponse request must have an `id` field from the response of a ToolCall.FunctionalCalls in Google AI.';\n\n/**\n * Handles incoming messages from the WebSocket.\n *\n * @remarks\n * This function is responsible for parsing incoming messages, transforming them\n * into LiveServerMessages, and then calling the onmessage callback. Note that\n * the first message which is received from the server is a setupComplete\n * message.\n *\n * @param apiClient The ApiClient instance.\n * @param onmessage The user-provided onmessage callback (if any).\n * @param event The MessageEvent from the WebSocket.\n */\nasync function handleWebSocketMessage(\n apiClient: ApiClient,\n onmessage: (msg: types.LiveServerMessage) => void,\n event: MessageEvent,\n): Promise {\n let serverMessage: types.LiveServerMessage;\n let data: types.LiveServerMessage;\n if (event.data instanceof Blob) {\n data = JSON.parse(await event.data.text()) as types.LiveServerMessage;\n } else {\n data = JSON.parse(event.data) as types.LiveServerMessage;\n }\n if (apiClient.isVertexAI()) {\n serverMessage = converters.liveServerMessageFromVertex(apiClient, data);\n } else {\n serverMessage = converters.liveServerMessageFromMldev(apiClient, data);\n }\n\n onmessage(serverMessage);\n}\n\n/**\n Live class encapsulates the configuration for live interaction with the\n Generative Language API. It embeds ApiClient for general API settings.\n\n @experimental\n */\nexport class Live {\n constructor(\n private readonly apiClient: ApiClient,\n private readonly auth: Auth,\n private readonly webSocketFactory: WebSocketFactory,\n ) {}\n\n /**\n Establishes a connection to the specified model with the given\n configuration and returns a Session object representing that connection.\n\n @experimental\n\n @remarks\n\n @param params - The parameters for establishing a connection to the model.\n @return A live session.\n\n @example\n ```ts\n let model: string;\n if (GOOGLE_GENAI_USE_VERTEXAI) {\n model = 'gemini-2.0-flash-live-preview-04-09';\n } else {\n model = 'gemini-2.0-flash-live-001';\n }\n const session = await ai.live.connect({\n model: model,\n config: {\n responseModalities: [Modality.AUDIO],\n },\n callbacks: {\n onopen: () => {\n console.log('Connected to the socket.');\n },\n onmessage: (e: MessageEvent) => {\n console.log('Received message from the server: %s\\n', debug(e.data));\n },\n onerror: (e: ErrorEvent) => {\n console.log('Error occurred: %s\\n', debug(e.error));\n },\n onclose: (e: CloseEvent) => {\n console.log('Connection closed.');\n },\n },\n });\n ```\n */\n async connect(params: types.LiveConnectParameters): Promise {\n const websocketBaseUrl = this.apiClient.getWebsocketBaseUrl();\n const apiVersion = this.apiClient.getApiVersion();\n let url: string;\n const headers = mapToHeaders(this.apiClient.getDefaultHeaders());\n if (this.apiClient.isVertexAI()) {\n url = `${websocketBaseUrl}/ws/google.cloud.aiplatform.${\n apiVersion\n }.LlmBidiService/BidiGenerateContent`;\n await this.auth.addAuthHeaders(headers);\n } else {\n const apiKey = this.apiClient.getApiKey();\n url = `${websocketBaseUrl}/ws/google.ai.generativelanguage.${\n apiVersion\n }.GenerativeService.BidiGenerateContent?key=${apiKey}`;\n }\n\n let onopenResolve: (value: unknown) => void = () => {};\n const onopenPromise = new Promise((resolve: (value: unknown) => void) => {\n onopenResolve = resolve;\n });\n\n const callbacks: types.LiveCallbacks = params.callbacks;\n\n const onopenAwaitedCallback = function () {\n callbacks?.onopen?.();\n onopenResolve({});\n };\n\n const apiClient = this.apiClient;\n\n const websocketCallbacks: WebSocketCallbacks = {\n onopen: onopenAwaitedCallback,\n onmessage: (event: MessageEvent) => {\n void handleWebSocketMessage(apiClient, callbacks.onmessage, event);\n },\n onerror:\n callbacks?.onerror ??\n function (e: ErrorEvent) {\n void e;\n },\n onclose:\n callbacks?.onclose ??\n function (e: CloseEvent) {\n void e;\n },\n };\n\n const conn = this.webSocketFactory.create(\n url,\n headersToMap(headers),\n websocketCallbacks,\n );\n conn.connect();\n // Wait for the websocket to open before sending requests.\n await onopenPromise;\n\n let transformedModel = t.tModel(this.apiClient, params.model);\n if (\n this.apiClient.isVertexAI() &&\n transformedModel.startsWith('publishers/')\n ) {\n const project = this.apiClient.getProject();\n const location = this.apiClient.getLocation();\n transformedModel =\n `projects/${project}/locations/${location}/` + transformedModel;\n }\n\n let clientMessage: Record = {};\n\n if (\n this.apiClient.isVertexAI() &&\n params.config?.responseModalities === undefined\n ) {\n // Set default to AUDIO to align with MLDev API.\n if (params.config === undefined) {\n params.config = {responseModalities: [types.Modality.AUDIO]};\n } else {\n params.config.responseModalities = [types.Modality.AUDIO];\n }\n }\n const liveConnectParameters: types.LiveConnectParameters = {\n model: transformedModel,\n config: params.config,\n callbacks: params.callbacks,\n };\n if (this.apiClient.isVertexAI()) {\n clientMessage = converters.liveConnectParametersToVertex(\n this.apiClient,\n liveConnectParameters,\n );\n } else {\n clientMessage = converters.liveConnectParametersToMldev(\n this.apiClient,\n liveConnectParameters,\n );\n }\n delete clientMessage['config'];\n conn.send(JSON.stringify(clientMessage));\n return new Session(conn, this.apiClient);\n }\n}\n\nconst defaultLiveSendClientContentParamerters: types.LiveSendClientContentParameters =\n {\n turnComplete: true,\n };\n\n/**\n Represents a connection to the API.\n\n @experimental\n */\nexport class Session {\n constructor(\n readonly conn: WebSocket,\n private readonly apiClient: ApiClient,\n ) {}\n\n private tLiveClientContent(\n apiClient: ApiClient,\n params: types.LiveSendClientContentParameters,\n ): types.LiveClientMessage {\n if (params.turns !== null && params.turns !== undefined) {\n let contents: types.Content[] = [];\n try {\n contents = t.tContents(\n apiClient,\n params.turns as types.ContentListUnion,\n );\n if (apiClient.isVertexAI()) {\n contents = contents.map((item) => contentToVertex(apiClient, item));\n } else {\n contents = contents.map((item) => contentToMldev(apiClient, item));\n }\n } catch {\n throw new Error(\n `Failed to parse client content \"turns\", type: '${typeof params.turns}'`,\n );\n }\n return {\n clientContent: {turns: contents, turnComplete: params.turnComplete},\n };\n }\n\n return {\n clientContent: {turnComplete: params.turnComplete},\n };\n }\n\n private tLiveClientRealtimeInput(\n apiClient: ApiClient,\n params: types.LiveSendRealtimeInputParameters,\n ): types.LiveClientMessage {\n let clientMessage: types.LiveClientMessage = {};\n if (!('media' in params) || !params.media) {\n throw new Error(\n `Failed to convert realtime input \"media\", type: '${typeof params.media}'`,\n );\n }\n\n // LiveClientRealtimeInput\n clientMessage = {\n realtimeInput: {\n mediaChunks: [params.media],\n activityStart: params.activityStart,\n activityEnd: params.activityEnd,\n },\n };\n return clientMessage;\n }\n\n private tLiveClienttToolResponse(\n apiClient: ApiClient,\n params: types.LiveSendToolResponseParameters,\n ): types.LiveClientMessage {\n let functionResponses: types.FunctionResponse[] = [];\n\n if (params.functionResponses == null) {\n throw new Error('functionResponses is required.');\n }\n\n if (!Array.isArray(params.functionResponses)) {\n functionResponses = [params.functionResponses];\n } else {\n functionResponses = params.functionResponses;\n }\n\n if (functionResponses.length === 0) {\n throw new Error('functionResponses is required.');\n }\n\n for (const functionResponse of functionResponses) {\n if (\n typeof functionResponse !== 'object' ||\n functionResponse === null ||\n !('name' in functionResponse) ||\n !('response' in functionResponse)\n ) {\n throw new Error(\n `Could not parse function response, type '${typeof functionResponse}'.`,\n );\n }\n if (!apiClient.isVertexAI() && !('id' in functionResponse)) {\n throw new Error(FUNCTION_RESPONSE_REQUIRES_ID);\n }\n }\n\n const clientMessage: types.LiveClientMessage = {\n toolResponse: {functionResponses: functionResponses},\n };\n return clientMessage;\n }\n\n /**\n Send a message over the established connection.\n\n @param params - Contains two **optional** properties, `turns` and\n `turnComplete`.\n\n - `turns` will be converted to a `Content[]`\n - `turnComplete: true` [default] indicates that you are done sending\n content and expect a response. If `turnComplete: false`, the server\n will wait for additional messages before starting generation.\n\n @experimental\n\n @remarks\n There are two ways to send messages to the live API:\n `sendClientContent` and `sendRealtimeInput`.\n\n `sendClientContent` messages are added to the model context **in order**.\n Having a conversation using `sendClientContent` messages is roughly\n equivalent to using the `Chat.sendMessageStream`, except that the state of\n the `chat` history is stored on the API server instead of locally.\n\n Because of `sendClientContent`'s order guarantee, the model cannot respons\n as quickly to `sendClientContent` messages as to `sendRealtimeInput`\n messages. This makes the biggest difference when sending objects that have\n significant preprocessing time (typically images).\n\n The `sendClientContent` message sends a `Content[]`\n which has more options than the `Blob` sent by `sendRealtimeInput`.\n\n So the main use-cases for `sendClientContent` over `sendRealtimeInput` are:\n\n - Sending anything that can't be represented as a `Blob` (text,\n `sendClientContent({turns=\"Hello?\"}`)).\n - Managing turns when not using audio input and voice activity detection.\n (`sendClientContent({turnComplete:true})` or the short form\n `sendClientContent()`)\n - Prefilling a conversation context\n ```\n sendClientContent({\n turns: [\n Content({role:user, parts:...}),\n Content({role:user, parts:...}),\n ...\n ]\n })\n ```\n @experimental\n */\n sendClientContent(params: types.LiveSendClientContentParameters) {\n params = {\n ...defaultLiveSendClientContentParamerters,\n ...params,\n };\n\n const clientMessage: types.LiveClientMessage = this.tLiveClientContent(\n this.apiClient,\n params,\n );\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Send a realtime message over the established connection.\n\n @param params - Contains one property, `media`.\n\n - `media` will be converted to a `Blob`\n\n @experimental\n\n @remarks\n Use `sendRealtimeInput` for realtime audio chunks and video frames (images).\n\n With `sendRealtimeInput` the api will respond to audio automatically\n based on voice activity detection (VAD).\n\n `sendRealtimeInput` is optimized for responsivness at the expense of\n deterministic ordering guarantees. Audio and video tokens are to the\n context when they become available.\n\n Note: The Call signature expects a `Blob` object, but only a subset\n of audio and image mimetypes are allowed.\n */\n sendRealtimeInput(params: types.LiveSendRealtimeInputParameters) {\n if (params.media == null) {\n throw new Error('Media is required.');\n }\n\n const clientMessage: types.LiveClientMessage =\n this.tLiveClientRealtimeInput(this.apiClient, params);\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Send a function response message over the established connection.\n\n @param params - Contains property `functionResponses`.\n\n - `functionResponses` will be converted to a `functionResponses[]`\n\n @remarks\n Use `sendFunctionResponse` to reply to `LiveServerToolCall` from the server.\n\n Use {@link types.LiveConnectConfig#tools} to configure the callable functions.\n\n @experimental\n */\n sendToolResponse(params: types.LiveSendToolResponseParameters) {\n if (params.functionResponses == null) {\n throw new Error('Tool response parameters are required.');\n }\n\n const clientMessage: types.LiveClientMessage =\n this.tLiveClienttToolResponse(this.apiClient, params);\n this.conn.send(JSON.stringify(clientMessage));\n }\n\n /**\n Terminates the WebSocket connection.\n\n @experimental\n\n @example\n ```ts\n let model: string;\n if (GOOGLE_GENAI_USE_VERTEXAI) {\n model = 'gemini-2.0-flash-live-preview-04-09';\n } else {\n model = 'gemini-2.0-flash-live-001';\n }\n const session = await ai.live.connect({\n model: model,\n config: {\n responseModalities: [Modality.AUDIO],\n }\n });\n\n session.close();\n ```\n */\n close() {\n this.conn.close();\n }\n}\n\n// Converts an headers object to a \"map\" object as expected by the WebSocket\n// constructor. We use this as the Auth interface works with Headers objects\n// while the WebSocket constructor takes a map.\nfunction headersToMap(headers: Headers): Record {\n const headerMap: Record = {};\n headers.forEach((value, key) => {\n headerMap[key] = value;\n });\n return headerMap;\n}\n\n// Converts a \"map\" object to a headers object. We use this as the Auth\n// interface works with Headers objects while the API client default headers\n// returns a map.\nfunction mapToHeaders(map: Record): Headers {\n const headers = new Headers();\n for (const [key, value] of Object.entries(map)) {\n headers.append(key, value);\n }\n return headers;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_models_converters';\nimport * as types from './types';\n\nexport class Models extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Makes an API request to generate content with a given model.\n *\n * For the `model` parameter, supported formats for Vertex AI API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The full resource name starts with 'projects/', for example:\n * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'\n * - The partial resource name with 'publishers/', for example:\n * 'publishers/google/models/gemini-2.0-flash' or\n * 'publishers/meta/models/llama-3.1-405b-instruct-maas'\n * - `/` separated publisher and model name, for example:\n * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas'\n *\n * For the `model` parameter, supported formats for Gemini API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The model name starts with 'models/', for example:\n * 'models/gemini-2.0-flash'\n * - For tuned models, the model name starts with 'tunedModels/',\n * for example:\n * 'tunedModels/1234567890123456789'\n *\n * Some models support multimodal input and output.\n *\n * @param params - The parameters for generating content.\n * @return The response from generating content.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContent({\n * model: 'gemini-2.0-flash',\n * contents: 'why is the sky blue?',\n * config: {\n * candidateCount: 2,\n * }\n * });\n * console.log(response);\n * ```\n */\n generateContent = async (\n params: types.GenerateContentParameters,\n ): Promise => {\n return await this.generateContentInternal(params);\n };\n\n /**\n * Makes an API request to generate content with a given model and yields the\n * response in chunks.\n *\n * For the `model` parameter, supported formats for Vertex AI API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The full resource name starts with 'projects/', for example:\n * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash'\n * - The partial resource name with 'publishers/', for example:\n * 'publishers/google/models/gemini-2.0-flash' or\n * 'publishers/meta/models/llama-3.1-405b-instruct-maas'\n * - `/` separated publisher and model name, for example:\n * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas'\n *\n * For the `model` parameter, supported formats for Gemini API include:\n * - The Gemini model ID, for example: 'gemini-2.0-flash'\n * - The model name starts with 'models/', for example:\n * 'models/gemini-2.0-flash'\n * - For tuned models, the model name starts with 'tunedModels/',\n * for example:\n * 'tunedModels/1234567890123456789'\n *\n * Some models support multimodal input and output.\n *\n * @param params - The parameters for generating content with streaming response.\n * @return The response from generating content.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateContentStream({\n * model: 'gemini-2.0-flash',\n * contents: 'why is the sky blue?',\n * config: {\n * maxOutputTokens: 200,\n * }\n * });\n * for await (const chunk of response) {\n * console.log(chunk);\n * }\n * ```\n */\n generateContentStream = async (\n params: types.GenerateContentParameters,\n ): Promise> => {\n return await this.generateContentStreamInternal(params);\n };\n\n /**\n * Generates an image based on a text description and configuration.\n *\n * @param model - The model to use.\n * @param prompt - A text description of the image to generate.\n * @param [config] - The config for image generation.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await client.models.generateImages({\n * model: 'imagen-3.0-generate-002',\n * prompt: 'Robot holding a red skateboard',\n * config: {\n * numberOfImages: 1,\n * includeRaiReason: true,\n * },\n * });\n * console.log(response?.generatedImages?.[0]?.image?.imageBytes);\n * ```\n */\n generateImages = async (\n params: types.GenerateImagesParameters,\n ): Promise => {\n return await this.generateImagesInternal(params).then((apiResponse) => {\n let positivePromptSafetyAttributes;\n const generatedImages = [];\n\n if (apiResponse?.generatedImages) {\n for (const generatedImage of apiResponse.generatedImages) {\n if (\n generatedImage &&\n generatedImage?.safetyAttributes &&\n generatedImage?.safetyAttributes?.contentType === 'Positive Prompt'\n ) {\n positivePromptSafetyAttributes = generatedImage?.safetyAttributes;\n } else {\n generatedImages.push(generatedImage);\n }\n }\n }\n let response: types.GenerateImagesResponse;\n\n if (positivePromptSafetyAttributes) {\n response = {\n generatedImages: generatedImages,\n positivePromptSafetyAttributes: positivePromptSafetyAttributes,\n };\n } else {\n response = {\n generatedImages: generatedImages,\n };\n }\n return response;\n });\n };\n\n private async generateContentInternal(\n params: types.GenerateContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:generateContent',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateContentResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.generateContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:generateContent',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateContentResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n private async generateContentStreamInternal(\n params: types.GenerateContentParameters,\n ): Promise> {\n let response: Promise>;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:streamGenerateContent?alt=sse',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n const apiClient = this.apiClient;\n response = apiClient.requestStream({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n }) as Promise>;\n\n return response.then(async function* (\n apiResponse: AsyncGenerator,\n ) {\n for await (const chunk of apiResponse) {\n const resp = converters.generateContentResponseFromVertex(\n apiClient,\n (await chunk.json()) as types.GenerateContentResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n yield typedResp;\n }\n });\n } else {\n const body = converters.generateContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:streamGenerateContent?alt=sse',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n const apiClient = this.apiClient;\n response = apiClient.requestStream({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n }) as Promise>;\n\n return response.then(async function* (\n apiResponse: AsyncGenerator,\n ) {\n for await (const chunk of apiResponse) {\n const resp = converters.generateContentResponseFromMldev(\n apiClient,\n (await chunk.json()) as types.GenerateContentResponse,\n );\n const typedResp = new types.GenerateContentResponse();\n Object.assign(typedResp, resp);\n yield typedResp;\n }\n });\n }\n }\n\n /**\n * Calculates embeddings for the given contents. Only text is supported.\n *\n * @param params - The parameters for embedding contents.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.embedContent({\n * model: 'text-embedding-004',\n * contents: [\n * 'What is your name?',\n * 'What is your favorite color?',\n * ],\n * config: {\n * outputDimensionality: 64,\n * },\n * });\n * console.log(response);\n * ```\n */\n async embedContent(\n params: types.EmbedContentParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.embedContentParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.embedContentResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.EmbedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.embedContentParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:batchEmbedContents',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.embedContentResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.EmbedContentResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Generates an image based on a text description and configuration.\n *\n * @param params - The parameters for generating images.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.generateImages({\n * model: 'imagen-3.0-generate-002',\n * prompt: 'Robot holding a red skateboard',\n * config: {\n * numberOfImages: 1,\n * includeRaiReason: true,\n * },\n * });\n * console.log(response?.generatedImages?.[0]?.image?.imageBytes);\n * ```\n */\n private async generateImagesInternal(\n params: types.GenerateImagesParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateImagesParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateImagesResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateImagesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.generateImagesParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predict',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateImagesResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.GenerateImagesResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Fetches information about a model by name.\n *\n * @example\n * ```ts\n * const modelInfo = await ai.models.get({model: 'gemini-2.0-flash'});\n * ```\n */\n async get(params: types.GetModelParameters): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getModelParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.modelFromVertex(this.apiClient, apiResponse);\n\n return resp as types.Model;\n });\n } else {\n const body = converters.getModelParametersToMldev(this.apiClient, params);\n path = common.formatMap(\n '{name}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.modelFromMldev(this.apiClient, apiResponse);\n\n return resp as types.Model;\n });\n }\n }\n\n /**\n * Counts the number of tokens in the given contents. Multimodal input is\n * supported for Gemini models.\n *\n * @param params - The parameters for counting tokens.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.countTokens({\n * model: 'gemini-2.0-flash',\n * contents: 'The quick brown fox jumps over the lazy dog.'\n * });\n * console.log(response);\n * ```\n */\n async countTokens(\n params: types.CountTokensParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.countTokensParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:countTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.countTokensResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.CountTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n const body = converters.countTokensParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:countTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.countTokensResponseFromMldev(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.CountTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n }\n }\n\n /**\n * Given a list of contents, returns a corresponding TokensInfo containing\n * the list of tokens and list of token ids.\n *\n * This method is not supported by the Gemini Developer API.\n *\n * @param params - The parameters for computing tokens.\n * @return The response from the API.\n *\n * @example\n * ```ts\n * const response = await ai.models.computeTokens({\n * model: 'gemini-2.0-flash',\n * contents: 'What is your name?'\n * });\n * console.log(response);\n * ```\n */\n async computeTokens(\n params: types.ComputeTokensParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.computeTokensParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:computeTokens',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.computeTokensResponseFromVertex(\n this.apiClient,\n apiResponse,\n );\n const typedResp = new types.ComputeTokensResponse();\n Object.assign(typedResp, resp);\n return typedResp;\n });\n } else {\n throw new Error('This method is only supported by the Vertex AI.');\n }\n }\n\n /**\n * Generates videos based on a text description and configuration.\n *\n * @param params - The parameters for generating videos.\n * @return A Promise which allows you to track the progress and eventually retrieve the generated videos using the operations.get method.\n *\n * @example\n * ```ts\n * const operation = await ai.models.generateVideos({\n * model: 'veo-2.0-generate-001',\n * prompt: 'A neon hologram of a cat driving at top speed',\n * config: {\n * numberOfVideos: 1\n * });\n *\n * while (!operation.done) {\n * await new Promise(resolve => setTimeout(resolve, 10000));\n * operation = await ai.operations.getVideosOperation({operation: operation});\n * }\n *\n * console.log(operation.response?.generatedVideos?.[0]?.video?.uri);\n * ```\n */\n\n async generateVideos(\n params: types.GenerateVideosParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.generateVideosParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predictLongRunning',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n const body = converters.generateVideosParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{model}:predictLongRunning',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from '../_api_client';\nimport * as common from '../_common';\nimport * as t from '../_transformers';\nimport * as types from '../types';\n\nexport function getOperationParametersToMldev(\n apiClient: ApiClient,\n fromObject: types.GetOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'operationName'],\n fromOperationName,\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function getOperationParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.GetOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(\n toObject,\n ['_url', 'operationName'],\n fromOperationName,\n );\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function fetchPredictOperationParametersToVertex(\n apiClient: ApiClient,\n fromObject: types.FetchPredictOperationParameters,\n): Record {\n const toObject: Record = {};\n\n const fromOperationName = common.getValueByPath(fromObject, [\n 'operationName',\n ]);\n if (fromOperationName != null) {\n common.setValueByPath(toObject, ['operationName'], fromOperationName);\n }\n\n const fromResourceName = common.getValueByPath(fromObject, ['resourceName']);\n if (fromResourceName != null) {\n common.setValueByPath(toObject, ['_url', 'resourceName'], fromResourceName);\n }\n\n const fromConfig = common.getValueByPath(fromObject, ['config']);\n if (fromConfig != null) {\n common.setValueByPath(toObject, ['config'], fromConfig);\n }\n\n return toObject;\n}\n\nexport function videoFromMldev(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['video', 'uri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'video',\n 'encodedVideo',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['encoding']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromMldev(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromMldev(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, [\n 'generatedSamples',\n ]);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromMldev(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromMldev(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, [\n 'response',\n 'generateVideoResponse',\n ]);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromMldev(apiClient, fromResponse),\n );\n }\n\n return toObject;\n}\n\nexport function videoFromVertex(\n apiClient: ApiClient,\n fromObject: types.Video,\n): Record {\n const toObject: Record = {};\n\n const fromUri = common.getValueByPath(fromObject, ['gcsUri']);\n if (fromUri != null) {\n common.setValueByPath(toObject, ['uri'], fromUri);\n }\n\n const fromVideoBytes = common.getValueByPath(fromObject, [\n 'bytesBase64Encoded',\n ]);\n if (fromVideoBytes != null) {\n common.setValueByPath(\n toObject,\n ['videoBytes'],\n t.tBytes(apiClient, fromVideoBytes),\n );\n }\n\n const fromMimeType = common.getValueByPath(fromObject, ['mimeType']);\n if (fromMimeType != null) {\n common.setValueByPath(toObject, ['mimeType'], fromMimeType);\n }\n\n return toObject;\n}\n\nexport function generatedVideoFromVertex(\n apiClient: ApiClient,\n fromObject: types.GeneratedVideo,\n): Record {\n const toObject: Record = {};\n\n const fromVideo = common.getValueByPath(fromObject, ['_self']);\n if (fromVideo != null) {\n common.setValueByPath(\n toObject,\n ['video'],\n videoFromVertex(apiClient, fromVideo),\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosResponseFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosResponse,\n): Record {\n const toObject: Record = {};\n\n const fromGeneratedVideos = common.getValueByPath(fromObject, ['videos']);\n if (fromGeneratedVideos != null) {\n if (Array.isArray(fromGeneratedVideos)) {\n common.setValueByPath(\n toObject,\n ['generatedVideos'],\n fromGeneratedVideos.map((item) => {\n return generatedVideoFromVertex(apiClient, item);\n }),\n );\n } else {\n common.setValueByPath(toObject, ['generatedVideos'], fromGeneratedVideos);\n }\n }\n\n const fromRaiMediaFilteredCount = common.getValueByPath(fromObject, [\n 'raiMediaFilteredCount',\n ]);\n if (fromRaiMediaFilteredCount != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredCount'],\n fromRaiMediaFilteredCount,\n );\n }\n\n const fromRaiMediaFilteredReasons = common.getValueByPath(fromObject, [\n 'raiMediaFilteredReasons',\n ]);\n if (fromRaiMediaFilteredReasons != null) {\n common.setValueByPath(\n toObject,\n ['raiMediaFilteredReasons'],\n fromRaiMediaFilteredReasons,\n );\n }\n\n return toObject;\n}\n\nexport function generateVideosOperationFromVertex(\n apiClient: ApiClient,\n fromObject: types.GenerateVideosOperation,\n): Record {\n const toObject: Record = {};\n\n const fromName = common.getValueByPath(fromObject, ['name']);\n if (fromName != null) {\n common.setValueByPath(toObject, ['name'], fromName);\n }\n\n const fromMetadata = common.getValueByPath(fromObject, ['metadata']);\n if (fromMetadata != null) {\n common.setValueByPath(toObject, ['metadata'], fromMetadata);\n }\n\n const fromDone = common.getValueByPath(fromObject, ['done']);\n if (fromDone != null) {\n common.setValueByPath(toObject, ['done'], fromDone);\n }\n\n const fromError = common.getValueByPath(fromObject, ['error']);\n if (fromError != null) {\n common.setValueByPath(toObject, ['error'], fromError);\n }\n\n const fromResponse = common.getValueByPath(fromObject, ['response']);\n if (fromResponse != null) {\n common.setValueByPath(\n toObject,\n ['response'],\n generateVideosResponseFromVertex(apiClient, fromResponse),\n );\n }\n\n return toObject;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// Code generated by the Google Gen AI SDK generator DO NOT EDIT.\n\nimport {ApiClient} from './_api_client';\nimport * as common from './_common';\nimport {BaseModule} from './_common';\nimport * as converters from './converters/_operations_converters';\nimport * as types from './types';\n\nexport class Operations extends BaseModule {\n constructor(private readonly apiClient: ApiClient) {\n super();\n }\n\n /**\n * Gets the status of a long-running operation.\n *\n * @param parameters The parameters for the get operation request.\n * @return The updated Operation object, with the latest status or result.\n */\n async getVideosOperation(\n parameters: types.OperationGetParameters,\n ): Promise {\n const operation = parameters.operation;\n const config = parameters.config;\n\n if (operation.name === undefined || operation.name === '') {\n throw new Error('Operation name is required.');\n }\n\n if (this.apiClient.isVertexAI()) {\n const resourceName = operation.name.split('/operations/')[0];\n let httpOptions: types.HttpOptions | undefined = undefined;\n\n if (config && 'httpOptions' in config) {\n httpOptions = config.httpOptions;\n }\n\n return this.fetchPredictVideosOperationInternal({\n operationName: operation.name,\n resourceName: resourceName,\n config: {httpOptions: httpOptions},\n });\n } else {\n return this.getVideosOperationInternal({\n operationName: operation.name,\n config: config,\n });\n }\n }\n\n private async getVideosOperationInternal(\n params: types.GetOperationParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.getOperationParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{operationName}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n const body = converters.getOperationParametersToMldev(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{operationName}',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'GET',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromMldev(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n }\n }\n\n private async fetchPredictVideosOperationInternal(\n params: types.FetchPredictOperationParameters,\n ): Promise {\n let response: Promise;\n let path: string = '';\n let queryParams: Record = {};\n if (this.apiClient.isVertexAI()) {\n const body = converters.fetchPredictOperationParametersToVertex(\n this.apiClient,\n params,\n );\n path = common.formatMap(\n '{resourceName}:fetchPredictOperation',\n body['_url'] as Record,\n );\n queryParams = body['_query'] as Record;\n delete body['config'];\n delete body['_url'];\n delete body['_query'];\n\n response = this.apiClient\n .request({\n path: path,\n queryParams: queryParams,\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions: params.config?.httpOptions,\n })\n .then((httpResponse) => {\n return httpResponse.json();\n }) as Promise;\n\n return response.then((apiResponse) => {\n const resp = converters.generateVideosOperationFromVertex(\n this.apiClient,\n apiResponse,\n );\n\n return resp as types.GenerateVideosOperation;\n });\n } else {\n throw new Error('This method is only supported by the Vertex AI.');\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {Auth} from './_auth';\nimport * as common from './_common';\nimport {Uploader} from './_uploader';\nimport {File, HttpOptions, HttpResponse, UploadFileConfig} from './types';\n\nconst CONTENT_TYPE_HEADER = 'Content-Type';\nconst SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';\nconst USER_AGENT_HEADER = 'User-Agent';\nconst GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';\nexport const SDK_VERSION = '0.8.0'; // x-release-please-version\nconst LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;\nconst VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';\nconst GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';\nconst responseLineRE = /^data: (.*)(?:\\n\\n|\\r\\r|\\r\\n\\r\\n)/;\n\n/**\n * Client errors raised by the GenAI API.\n */\nexport class ClientError extends Error {\n constructor(message: string, stackTrace?: string) {\n if (stackTrace) {\n super(message, {cause: stackTrace});\n } else {\n super(message, {cause: new Error().stack});\n }\n this.message = message;\n this.name = 'ClientError';\n }\n}\n\n/**\n * Server errors raised by the GenAI API.\n */\nexport class ServerError extends Error {\n constructor(message: string, stackTrace?: string) {\n if (stackTrace) {\n super(message, {cause: stackTrace});\n } else {\n super(message, {cause: new Error().stack});\n }\n this.message = message;\n this.name = 'ServerError';\n }\n}\n\n/**\n * Options for initializing the ApiClient. The ApiClient uses the parameters\n * for authentication purposes as well as to infer if SDK should send the\n * request to Vertex AI or Gemini API.\n */\nexport interface ApiClientInitOptions {\n /**\n * The object used for adding authentication headers to API requests.\n */\n auth: Auth;\n /**\n * The uploader to use for uploading files. This field is required for\n * creating a client, will be set through the Node_client or Web_client.\n */\n uploader: Uploader;\n /**\n * Optional. The Google Cloud project ID for Vertex AI users.\n * It is not the numeric project name.\n * If not provided, SDK will try to resolve it from runtime environment.\n */\n project?: string;\n /**\n * Optional. The Google Cloud project location for Vertex AI users.\n * If not provided, SDK will try to resolve it from runtime environment.\n */\n location?: string;\n /**\n * The API Key. This is required for Gemini API users.\n */\n apiKey?: string;\n /**\n * Optional. Set to true if you intend to call Vertex AI endpoints.\n * If unset, default SDK behavior is to call Gemini API.\n */\n vertexai?: boolean;\n /**\n * Optional. The API version for the endpoint.\n * If unset, SDK will choose a default api version.\n */\n apiVersion?: string;\n /**\n * Optional. A set of customizable configuration for HTTP requests.\n */\n httpOptions?: HttpOptions;\n /**\n * Optional. An extra string to append at the end of the User-Agent header.\n *\n * This can be used to e.g specify the runtime and its version.\n */\n userAgentExtra?: string;\n}\n\n/**\n * Represents the necessary information to send a request to an API endpoint.\n * This interface defines the structure for constructing and executing HTTP\n * requests.\n */\nexport interface HttpRequest {\n /**\n * URL path from the modules, this path is appended to the base API URL to\n * form the complete request URL.\n *\n * If you wish to set full URL, use httpOptions.baseUrl instead. Example to\n * set full URL in the request:\n *\n * const request: HttpRequest = {\n * path: '',\n * httpOptions: {\n * baseUrl: 'https://',\n * apiVersion: '',\n * },\n * httpMethod: 'GET',\n * };\n *\n * The result URL will be: https://\n *\n */\n path: string;\n /**\n * Optional query parameters to be appended to the request URL.\n */\n queryParams?: Record;\n /**\n * Optional request body in json string or Blob format, GET request doesn't\n * need a request body.\n */\n body?: string | Blob;\n /**\n * The HTTP method to be used for the request.\n */\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE';\n /**\n * Optional set of customizable configuration for HTTP requests.\n */\n httpOptions?: HttpOptions;\n}\n\n/**\n * The ApiClient class is used to send requests to the Gemini API or Vertex AI\n * endpoints.\n */\nexport class ApiClient {\n readonly clientOptions: ApiClientInitOptions;\n\n constructor(opts: ApiClientInitOptions) {\n this.clientOptions = {\n ...opts,\n project: opts.project,\n location: opts.location,\n apiKey: opts.apiKey,\n vertexai: opts.vertexai,\n };\n\n const initHttpOptions: HttpOptions = {};\n\n if (this.clientOptions.vertexai) {\n initHttpOptions.apiVersion =\n this.clientOptions.apiVersion ?? VERTEX_AI_API_DEFAULT_VERSION;\n // Assume that proj/api key validation occurs before they are passed in.\n if (this.getProject() || this.getLocation()) {\n initHttpOptions.baseUrl = `https://${this.clientOptions.location}-aiplatform.googleapis.com/`;\n this.clientOptions.apiKey = undefined; // unset API key.\n } else {\n initHttpOptions.baseUrl = `https://aiplatform.googleapis.com/`;\n this.clientOptions.project = undefined; // unset project.\n this.clientOptions.location = undefined; // unset location.\n }\n } else {\n initHttpOptions.apiVersion =\n this.clientOptions.apiVersion ?? GOOGLE_AI_API_DEFAULT_VERSION;\n initHttpOptions.baseUrl = `https://generativelanguage.googleapis.com/`;\n }\n\n initHttpOptions.headers = this.getDefaultHeaders();\n\n this.clientOptions.httpOptions = initHttpOptions;\n\n if (opts.httpOptions) {\n this.clientOptions.httpOptions = this.patchHttpOptions(\n initHttpOptions,\n opts.httpOptions,\n );\n }\n }\n\n isVertexAI(): boolean {\n return this.clientOptions.vertexai ?? false;\n }\n\n getProject() {\n return this.clientOptions.project;\n }\n\n getLocation() {\n return this.clientOptions.location;\n }\n\n getApiVersion() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.apiVersion !== undefined\n ) {\n return this.clientOptions.httpOptions.apiVersion;\n }\n throw new Error('API version is not set.');\n }\n\n getBaseUrl() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.baseUrl !== undefined\n ) {\n return this.clientOptions.httpOptions.baseUrl;\n }\n throw new Error('Base URL is not set.');\n }\n\n getRequestUrl() {\n return this.getRequestUrlInternal(this.clientOptions.httpOptions);\n }\n\n getHeaders() {\n if (\n this.clientOptions.httpOptions &&\n this.clientOptions.httpOptions.headers !== undefined\n ) {\n return this.clientOptions.httpOptions.headers;\n } else {\n throw new Error('Headers are not set.');\n }\n }\n\n private getRequestUrlInternal(httpOptions?: HttpOptions) {\n if (\n !httpOptions ||\n httpOptions.baseUrl === undefined ||\n httpOptions.apiVersion === undefined\n ) {\n throw new Error('HTTP options are not correctly set.');\n }\n const baseUrl = httpOptions.baseUrl.endsWith('/')\n ? httpOptions.baseUrl.slice(0, -1)\n : httpOptions.baseUrl;\n const urlElement: Array = [baseUrl];\n if (httpOptions.apiVersion && httpOptions.apiVersion !== '') {\n urlElement.push(httpOptions.apiVersion);\n }\n return urlElement.join('/');\n }\n\n getBaseResourcePath() {\n return `projects/${this.clientOptions.project}/locations/${\n this.clientOptions.location\n }`;\n }\n\n getApiKey() {\n return this.clientOptions.apiKey;\n }\n\n getWebsocketBaseUrl() {\n const baseUrl = this.getBaseUrl();\n const urlParts = new URL(baseUrl);\n urlParts.protocol = 'wss';\n return urlParts.toString();\n }\n\n setBaseUrl(url: string) {\n if (this.clientOptions.httpOptions) {\n this.clientOptions.httpOptions.baseUrl = url;\n } else {\n throw new Error('HTTP options are not correctly set.');\n }\n }\n\n private constructUrl(\n path: string,\n httpOptions: HttpOptions,\n prependProjectLocation: boolean,\n ): URL {\n const urlElement: Array = [this.getRequestUrlInternal(httpOptions)];\n if (prependProjectLocation) {\n urlElement.push(this.getBaseResourcePath());\n }\n if (path !== '') {\n urlElement.push(path);\n }\n const url = new URL(`${urlElement.join('/')}`);\n\n return url;\n }\n\n private shouldPrependVertexProjectPath(request: HttpRequest): boolean {\n if (this.clientOptions.apiKey) {\n return false;\n }\n if (!this.clientOptions.vertexai) {\n return false;\n }\n if (request.path.startsWith('projects/')) {\n // Assume the path already starts with\n // `projects//location/`.\n return false;\n }\n if (\n request.httpMethod === 'GET' &&\n request.path.startsWith('publishers/google/models')\n ) {\n // These paths are used by Vertex's models.get and models.list\n // calls. For base models Vertex does not accept a project/location\n // prefix (for tuned model the prefix is required).\n return false;\n }\n return true;\n }\n\n async request(request: HttpRequest): Promise {\n let patchedHttpOptions = this.clientOptions.httpOptions!;\n if (request.httpOptions) {\n patchedHttpOptions = this.patchHttpOptions(\n this.clientOptions.httpOptions!,\n request.httpOptions,\n );\n }\n\n const prependProjectLocation = this.shouldPrependVertexProjectPath(request);\n const url = this.constructUrl(\n request.path,\n patchedHttpOptions,\n prependProjectLocation,\n );\n if (request.queryParams) {\n for (const [key, value] of Object.entries(request.queryParams)) {\n url.searchParams.append(key, String(value));\n }\n }\n let requestInit: RequestInit = {};\n if (request.httpMethod === 'GET') {\n if (request.body && request.body !== '{}') {\n throw new Error(\n 'Request body should be empty for GET request, but got non empty request body',\n );\n }\n } else {\n requestInit.body = request.body;\n }\n requestInit = await this.includeExtraHttpOptionsToRequestInit(\n requestInit,\n patchedHttpOptions,\n );\n return this.unaryApiCall(url, requestInit, request.httpMethod);\n }\n\n private patchHttpOptions(\n baseHttpOptions: HttpOptions,\n requestHttpOptions: HttpOptions,\n ): HttpOptions {\n const patchedHttpOptions = JSON.parse(\n JSON.stringify(baseHttpOptions),\n ) as HttpOptions;\n\n for (const [key, value] of Object.entries(requestHttpOptions)) {\n // Records compile to objects.\n if (typeof value === 'object') {\n // @ts-expect-error TS2345TS7053: Element implicitly has an 'any' type\n // because expression of type 'string' can't be used to index type\n // 'HttpOptions'.\n patchedHttpOptions[key] = {...patchedHttpOptions[key], ...value};\n } else if (value !== undefined) {\n // @ts-expect-error TS2345TS7053: Element implicitly has an 'any' type\n // because expression of type 'string' can't be used to index type\n // 'HttpOptions'.\n patchedHttpOptions[key] = value;\n }\n }\n return patchedHttpOptions;\n }\n\n async requestStream(\n request: HttpRequest,\n ): Promise> {\n let patchedHttpOptions = this.clientOptions.httpOptions!;\n if (request.httpOptions) {\n patchedHttpOptions = this.patchHttpOptions(\n this.clientOptions.httpOptions!,\n request.httpOptions,\n );\n }\n\n const prependProjectLocation = this.shouldPrependVertexProjectPath(request);\n const url = this.constructUrl(\n request.path,\n patchedHttpOptions,\n prependProjectLocation,\n );\n if (!url.searchParams.has('alt') || url.searchParams.get('alt') !== 'sse') {\n url.searchParams.set('alt', 'sse');\n }\n let requestInit: RequestInit = {};\n requestInit.body = request.body;\n requestInit = await this.includeExtraHttpOptionsToRequestInit(\n requestInit,\n patchedHttpOptions,\n );\n return this.streamApiCall(url, requestInit, request.httpMethod);\n }\n\n private async includeExtraHttpOptionsToRequestInit(\n requestInit: RequestInit,\n httpOptions: HttpOptions,\n ): Promise {\n if (httpOptions && (httpOptions.signal || httpOptions.timeout && httpOptions?.timeout >= 0)) {\n const abortController = new AbortController();\n const signal = abortController.signal;\n if (httpOptions.timeout && httpOptions.timeout >= 0) {\n setTimeout(() => abortController.abort(), httpOptions.timeout);\n }\n if (httpOptions.signal) {\n httpOptions.signal?.addEventListener('abort', () => {\n abortController.abort();\n });\n }\n requestInit.signal = signal;\n }\n requestInit.headers = await this.getHeadersInternal(httpOptions);\n return requestInit;\n }\n\n private async unaryApiCall(\n url: URL,\n requestInit: RequestInit,\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE',\n ): Promise {\n return this.apiCall(url.toString(), {\n ...requestInit,\n method: httpMethod,\n })\n .then(async (response) => {\n await throwErrorIfNotOK(response);\n return new HttpResponse(response);\n })\n .catch((e) => {\n if (e instanceof Error) {\n throw e;\n } else {\n throw new Error(JSON.stringify(e));\n }\n });\n }\n\n private async streamApiCall(\n url: URL,\n requestInit: RequestInit,\n httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE',\n ): Promise> {\n return this.apiCall(url.toString(), {\n ...requestInit,\n method: httpMethod,\n })\n .then(async (response) => {\n await throwErrorIfNotOK(response);\n return this.processStreamResponse(response);\n })\n .catch((e) => {\n if (e instanceof Error) {\n throw e;\n } else {\n throw new Error(JSON.stringify(e));\n }\n });\n }\n\n async *processStreamResponse(\n response: Response,\n ): AsyncGenerator {\n const reader = response?.body?.getReader();\n const decoder = new TextDecoder('utf-8');\n if (!reader) {\n throw new Error('Response body is empty');\n }\n\n try {\n let buffer = '';\n while (true) {\n const {done, value} = await reader.read();\n if (done) {\n if (buffer.trim().length > 0) {\n throw new Error('Incomplete JSON segment at the end');\n }\n break;\n }\n const chunkString = decoder.decode(value);\n buffer += chunkString;\n let match = buffer.match(responseLineRE);\n while (match) {\n const processedChunkString = match[1];\n try {\n const partialResponse = new Response(processedChunkString, {\n headers: response?.headers,\n status: response?.status,\n statusText: response?.statusText,\n });\n yield new HttpResponse(partialResponse);\n buffer = buffer.slice(match[0].length);\n match = buffer.match(responseLineRE);\n } catch (e) {\n throw new Error(\n `exception parsing stream chunk ${processedChunkString}. ${e}`,\n );\n }\n }\n }\n } finally {\n reader.releaseLock();\n }\n }\n private async apiCall(\n url: string,\n requestInit: RequestInit,\n ): Promise {\n return fetch(url, requestInit).catch((e) => {\n throw new Error(`exception ${e} sending request`);\n });\n }\n\n getDefaultHeaders(): Record {\n const headers: Record = {};\n\n const versionHeaderValue =\n LIBRARY_LABEL + ' ' + this.clientOptions.userAgentExtra;\n\n headers[USER_AGENT_HEADER] = versionHeaderValue;\n headers[GOOGLE_API_CLIENT_HEADER] = versionHeaderValue;\n headers[CONTENT_TYPE_HEADER] = 'application/json';\n\n return headers;\n }\n\n private async getHeadersInternal(\n httpOptions: HttpOptions | undefined,\n ): Promise {\n const headers = new Headers();\n if (httpOptions && httpOptions.headers) {\n for (const [key, value] of Object.entries(httpOptions.headers)) {\n headers.append(key, value);\n }\n // Append a timeout header if it is set, note that the timeout option is\n // in milliseconds but the header is in seconds.\n if (httpOptions.timeout && httpOptions.timeout > 0) {\n headers.append(\n SERVER_TIMEOUT_HEADER,\n String(Math.ceil(httpOptions.timeout / 1000)),\n );\n }\n }\n await this.clientOptions.auth.addAuthHeaders(headers);\n return headers;\n }\n\n /**\n * Uploads a file asynchronously using Gemini API only, this is not supported\n * in Vertex AI.\n *\n * @param file The string path to the file to be uploaded or a Blob object.\n * @param config Optional parameters specified in the `UploadFileConfig`\n * interface. @see {@link UploadFileConfig}\n * @return A promise that resolves to a `File` object.\n * @throws An error if called on a Vertex AI client.\n * @throws An error if the `mimeType` is not provided and can not be inferred,\n */\n async uploadFile(\n file: string | Blob,\n config?: UploadFileConfig,\n ): Promise {\n const fileToUpload: File = {};\n if (config != null) {\n fileToUpload.mimeType = config.mimeType;\n fileToUpload.name = config.name;\n fileToUpload.displayName = config.displayName;\n }\n\n if (fileToUpload.name && !fileToUpload.name.startsWith('files/')) {\n fileToUpload.name = `files/${fileToUpload.name}`;\n }\n\n const uploader = this.clientOptions.uploader;\n const fileStat = await uploader.stat(file);\n fileToUpload.sizeBytes = String(fileStat.size);\n const mimeType = config?.mimeType ?? fileStat.type;\n if (mimeType === undefined || mimeType === '') {\n throw new Error(\n 'Can not determine mimeType. Please provide mimeType in the config.',\n );\n }\n fileToUpload.mimeType = mimeType;\n\n const uploadUrl = await this.fetchUploadUrl(fileToUpload, config);\n return uploader.upload(file, uploadUrl, this);\n }\n\n private async fetchUploadUrl(\n file: File,\n config?: UploadFileConfig,\n ): Promise {\n let httpOptions: HttpOptions = {};\n if (config?.httpOptions) {\n httpOptions = config.httpOptions;\n } else {\n httpOptions = {\n apiVersion: '', // api-version is set in the path.\n headers: {\n 'Content-Type': 'application/json',\n 'X-Goog-Upload-Protocol': 'resumable',\n 'X-Goog-Upload-Command': 'start',\n 'X-Goog-Upload-Header-Content-Length': `${file.sizeBytes}`,\n 'X-Goog-Upload-Header-Content-Type': `${file.mimeType}`,\n },\n };\n }\n\n const body: Record = {\n 'file': file,\n };\n const httpResponse = await this.request({\n path: common.formatMap(\n 'upload/v1beta/files',\n body['_url'] as Record,\n ),\n body: JSON.stringify(body),\n httpMethod: 'POST',\n httpOptions,\n });\n\n if (!httpResponse || !httpResponse?.headers) {\n throw new Error(\n 'Server did not return an HttpResponse or the returned HttpResponse did not have headers.',\n );\n }\n\n const uploadUrl: string | undefined =\n httpResponse?.headers?.['x-goog-upload-url'];\n if (uploadUrl === undefined) {\n throw new Error(\n 'Failed to get upload url. Server did not return the x-google-upload-url in the headers',\n );\n }\n return uploadUrl;\n }\n}\n\nasync function throwErrorIfNotOK(response: Response | undefined) {\n if (response === undefined) {\n throw new ServerError('response is undefined');\n }\n if (!response.ok) {\n const status: number = response.status;\n const statusText: string = response.statusText;\n let errorBody: Record;\n if (response.headers.get('content-type')?.includes('application/json')) {\n errorBody = await response.json();\n } else {\n errorBody = {\n error: {\n message: 'exception parsing response',\n code: response.status,\n status: response.statusText,\n },\n };\n }\n const errorMessage = `got status: ${status} ${statusText}. ${JSON.stringify(\n errorBody,\n )}`;\n if (status >= 400 && status < 500) {\n const clientError = new ClientError(errorMessage);\n throw clientError;\n } else if (status >= 500 && status < 600) {\n const serverError = new ServerError(errorMessage);\n throw serverError;\n }\n throw new Error(errorMessage);\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {ApiClient} from '../_api_client';\nimport {FileStat, Uploader} from '../_uploader';\nimport {File, HttpResponse} from '../types';\n\nimport {crossError} from './_cross_error';\n\nexport const MAX_CHUNK_SIZE = 1024 * 1024 * 8; // bytes\nexport class CrossUploader implements Uploader {\n async upload(\n file: string | Blob,\n uploadUrl: string,\n apiClient: ApiClient,\n ): Promise {\n if (typeof file === 'string') {\n throw crossError();\n } else {\n return uploadBlob(file, uploadUrl, apiClient);\n }\n }\n\n async stat(file: string | Blob): Promise {\n if (typeof file === 'string') {\n throw crossError();\n } else {\n return getBlobStat(file);\n }\n }\n}\n\nexport async function uploadBlob(\n file: Blob,\n uploadUrl: string,\n apiClient: ApiClient,\n): Promise {\n let fileSize = 0;\n let offset = 0;\n let response: HttpResponse = new HttpResponse(new Response());\n let uploadCommand = 'upload';\n fileSize = file.size;\n while (offset < fileSize) {\n const chunkSize = Math.min(MAX_CHUNK_SIZE, fileSize - offset);\n const chunk = file.slice(offset, offset + chunkSize);\n if (offset + chunkSize >= fileSize) {\n uploadCommand += ', finalize';\n }\n response = await apiClient.request({\n path: '',\n body: chunk,\n httpMethod: 'POST',\n httpOptions: {\n apiVersion: '',\n baseUrl: uploadUrl,\n headers: {\n 'X-Goog-Upload-Command': uploadCommand,\n 'X-Goog-Upload-Offset': String(offset),\n 'Content-Length': String(chunkSize),\n },\n },\n });\n offset += chunkSize;\n // The `x-goog-upload-status` header field can be `active`, `final` and\n //`cancelled` in resposne.\n if (response?.headers?.['x-goog-upload-status'] !== 'active') {\n break;\n }\n // TODO(b/401391430) Investigate why the upload status is not finalized\n // even though all content has been uploaded.\n if (fileSize <= offset) {\n throw new Error(\n 'All content has been uploaded, but the upload status is not finalized.',\n );\n }\n }\n const responseJson = (await response?.json()) as Record<\n string,\n File | unknown\n >;\n if (response?.headers?.['x-goog-upload-status'] !== 'final') {\n throw new Error('Failed to upload file: Upload status is not finalized.');\n }\n return responseJson['file'] as File;\n}\n\nexport async function getBlobStat(file: Blob): Promise {\n const fileStat: FileStat = {size: file.size, type: file.type};\n return fileStat;\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {ApiClient} from '../_api_client';\nimport {FileStat, Uploader} from '../_uploader';\nimport {getBlobStat, uploadBlob} from '../cross/_cross_uploader';\nimport {File} from '../types';\n\nexport class BrowserUploader implements Uploader {\n async upload(\n file: string | Blob,\n uploadUrl: string,\n apiClient: ApiClient,\n ): Promise {\n if (typeof file === 'string') {\n throw new Error('File path is not supported in browser uploader.');\n }\n\n return await uploadBlob(file, uploadUrl, apiClient);\n }\n\n async stat(file: string | Blob): Promise {\n if (typeof file === 'string') {\n throw new Error('File path is not supported in browser uploader.');\n } else {\n return await getBlobStat(file);\n }\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n WebSocketCallbacks,\n WebSocketFactory,\n WebSocket as Ws,\n} from '../_websocket';\n\n// TODO((b/401271082): re-enable lint once BrowserWebSocketFactory is\n// implemented.\n/* eslint-disable @typescript-eslint/no-unused-vars */\nexport class BrowserWebSocketFactory implements WebSocketFactory {\n create(\n url: string,\n headers: Record,\n callbacks: WebSocketCallbacks,\n ): Ws {\n return new BrowserWebSocket(url, headers, callbacks);\n }\n}\n\nexport class BrowserWebSocket implements Ws {\n private ws?: WebSocket;\n\n constructor(\n private readonly url: string,\n private readonly headers: Record,\n private readonly callbacks: WebSocketCallbacks,\n ) {}\n\n connect(): void {\n this.ws = new WebSocket(this.url);\n\n this.ws.onopen = this.callbacks.onopen;\n this.ws.onerror = this.callbacks.onerror;\n this.ws.onclose = this.callbacks.onclose;\n this.ws.onmessage = this.callbacks.onmessage;\n }\n\n send(message: string) {\n if (this.ws === undefined) {\n throw new Error('WebSocket is not connected');\n }\n\n this.ws.send(message);\n }\n\n close() {\n if (this.ws === undefined) {\n throw new Error('WebSocket is not connected');\n }\n\n this.ws.close();\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {Auth} from '../_auth';\n\nexport const GOOGLE_API_KEY_HEADER = 'x-goog-api-key';\n// TODO(b/395122533): We need a secure client side authentication mechanism.\nexport class WebAuth implements Auth {\n constructor(private readonly apiKey: string) {}\n\n async addAuthHeaders(headers: Headers): Promise {\n if (headers.get(GOOGLE_API_KEY_HEADER) !== null) {\n return;\n }\n headers.append(GOOGLE_API_KEY_HEADER, this.apiKey);\n }\n}\n","/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {ApiClient} from '../_api_client';\nimport {Caches} from '../caches';\nimport {Chats} from '../chats';\nimport {GoogleGenAIOptions} from '../client';\nimport {Files} from '../files';\nimport {Live} from '../live';\nimport {Models} from '../models';\nimport {Operations} from '../operations';\n\nimport {BrowserUploader} from './_browser_uploader';\nimport {BrowserWebSocketFactory} from './_browser_websocket';\nimport {WebAuth} from './_web_auth';\n\nconst LANGUAGE_LABEL_PREFIX = 'gl-node/';\n\n/**\n * The Google GenAI SDK.\n *\n * @remarks\n * Provides access to the GenAI features through either the {@link\n * https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API} or\n * the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI\n * API}.\n *\n * The {@link GoogleGenAIOptions.vertexai} value determines which of the API\n * services to use.\n *\n * When using the Gemini API, a {@link GoogleGenAIOptions.apiKey} must also be\n * set. When using Vertex AI, currently only {@link GoogleGenAIOptions.apiKey}\n * is supported via Express mode. {@link GoogleGenAIOptions.project} and {@link\n * GoogleGenAIOptions.location} should not be set.\n *\n * @example\n * Initializing the SDK for using the Gemini API:\n * ```ts\n * import {GoogleGenAI} from '@google/genai';\n * const ai = new GoogleGenAI({apiKey: 'GEMINI_API_KEY'});\n * ```\n *\n * @example\n * Initializing the SDK for using the Vertex AI API:\n * ```ts\n * import {GoogleGenAI} from '@google/genai';\n * const ai = new GoogleGenAI({\n * vertexai: true,\n * project: 'PROJECT_ID',\n * location: 'PROJECT_LOCATION'\n * });\n * ```\n *\n */\nexport class GoogleGenAI {\n protected readonly apiClient: ApiClient;\n private readonly apiKey?: string;\n public readonly vertexai: boolean;\n private readonly apiVersion?: string;\n readonly models: Models;\n readonly live: Live;\n readonly chats: Chats;\n readonly caches: Caches;\n readonly files: Files;\n readonly operations: Operations;\n\n constructor(options: GoogleGenAIOptions) {\n if (options.apiKey == null) {\n throw new Error('An API Key must be set when running in a browser');\n }\n // Web client only supports API key mode for Vertex AI.\n if (options.project || options.location) {\n throw new Error(\n 'Vertex AI project based authentication is not supported on browser runtimes. Please do not provide a project or location.',\n );\n }\n this.vertexai = options.vertexai ?? false;\n\n this.apiKey = options.apiKey;\n this.apiVersion = options.apiVersion;\n const auth = new WebAuth(this.apiKey);\n this.apiClient = new ApiClient({\n auth: auth,\n apiVersion: this.apiVersion,\n apiKey: this.apiKey,\n vertexai: this.vertexai,\n httpOptions: options.httpOptions,\n userAgentExtra: LANGUAGE_LABEL_PREFIX + 'web',\n uploader: new BrowserUploader(),\n });\n this.models = new Models(this.apiClient);\n this.live = new Live(this.apiClient, auth, new BrowserWebSocketFactory());\n this.chats = new Chats(this.models, this.apiClient);\n this.caches = new Caches(this.apiClient);\n this.files = new Files(this.apiClient);\n this.operations = new Operations(this.apiClient);\n }\n}\n"],"names":["partToMldev","common.getValueByPath","common.setValueByPath","contentToMldev","functionDeclarationToMldev","googleSearchToMldev","dynamicRetrievalConfigToMldev","googleSearchRetrievalToMldev","toolToMldev","functionCallingConfigToMldev","toolConfigToMldev","t.tContents","t.tContent","t.tCachesModel","t.tCachedContentName","partToVertex","contentToVertex","schemaToVertex","functionDeclarationToVertex","googleSearchToVertex","dynamicRetrievalConfigToVertex","googleSearchRetrievalToVertex","toolToVertex","functionCallingConfigToVertex","toolConfigToVertex","converters.createCachedContentParametersToVertex","common.formatMap","converters.cachedContentFromVertex","converters.createCachedContentParametersToMldev","converters.cachedContentFromMldev","converters.getCachedContentParametersToVertex","converters.getCachedContentParametersToMldev","converters.deleteCachedContentParametersToVertex","converters.deleteCachedContentResponseFromVertex","types.DeleteCachedContentResponse","converters.deleteCachedContentParametersToMldev","converters.deleteCachedContentResponseFromMldev","converters.updateCachedContentParametersToVertex","converters.updateCachedContentParametersToMldev","converters.listCachedContentsParametersToVertex","converters.listCachedContentsResponseFromVertex","types.ListCachedContentsResponse","converters.listCachedContentsParametersToMldev","converters.listCachedContentsResponseFromMldev","t.tFileName","converters.fileFromMldev","converters.listFilesParametersToMldev","converters.listFilesResponseFromMldev","types.ListFilesResponse","converters.createFileParametersToMldev","converters.createFileResponseFromMldev","types.CreateFileResponse","converters.getFileParametersToMldev","converters.deleteFileParametersToMldev","converters.deleteFileResponseFromMldev","types.DeleteFileResponse","t.tTools","t.tTool","t.tModel","partFromMldev","partFromVertex","contentFromMldev","contentFromVertex","t.tSchema","t.tSpeechConfig","t.tContentsForEmbed","t.tBytes","videoFromMldev","generatedVideoFromMldev","generateVideosResponseFromMldev","generateVideosOperationFromMldev","videoFromVertex","generatedVideoFromVertex","generateVideosResponseFromVertex","generateVideosOperationFromVertex","converters.liveServerMessageFromVertex","converters.liveServerMessageFromMldev","types.Modality","converters.liveConnectParametersToVertex","converters.liveConnectParametersToMldev","converters.generateContentParametersToVertex","converters.generateContentResponseFromVertex","types.GenerateContentResponse","converters.generateContentParametersToMldev","converters.generateContentResponseFromMldev","converters.embedContentParametersToVertex","converters.embedContentResponseFromVertex","types.EmbedContentResponse","converters.embedContentParametersToMldev","converters.embedContentResponseFromMldev","converters.generateImagesParametersToVertex","converters.generateImagesResponseFromVertex","types.GenerateImagesResponse","converters.generateImagesParametersToMldev","converters.generateImagesResponseFromMldev","converters.getModelParametersToVertex","converters.modelFromVertex","converters.getModelParametersToMldev","converters.modelFromMldev","converters.countTokensParametersToVertex","converters.countTokensResponseFromVertex","types.CountTokensResponse","converters.countTokensParametersToMldev","converters.countTokensResponseFromMldev","converters.computeTokensParametersToVertex","converters.computeTokensResponseFromVertex","types.ComputeTokensResponse","converters.generateVideosParametersToVertex","converters.generateVideosOperationFromVertex","converters.generateVideosParametersToMldev","converters.generateVideosOperationFromMldev","converters.getOperationParametersToVertex","converters.getOperationParametersToMldev","converters.fetchPredictOperationParametersToVertex"],"mappings":"AAAA;;;;AAIG;MAEU,UAAU,CAAA;AAAG;AAEV,SAAA,SAAS,CACvB,cAAsB,EACtB,QAAiC,EAAA;;IAGjC,MAAM,KAAK,GAAG,cAAc;;IAG5B,OAAO,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,GAAG,KAAI;AAClD,QAAA,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,I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SAAS,CAAC;AAC7B,YAAA,IAAI,EAAE,IAAI;YACV,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,cAAc,EAAE,qBAAqB,GAAG,KAAK;YAC7C,QAAQ,EAAE,IAAI,eAAe,EAAE;AAChC,SAAA,CAAC;QACF,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;AACxC,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,uBAAuB,EAAE,CAAC;AACzE,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC;QACnD,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC;QACtC,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC;;AAEnD;;;;"} +\ No newline at end of file +diff --git a/dist/web/src/_api_client.d.ts b/dist/web/src/_api_client.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..aa103389ef39fbd7e0e33ba5232bfa113f20b373 +--- /dev/null ++++ b/dist/web/src/_api_client.d.ts +@@ -0,0 +1,161 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { Auth } from './_auth'; ++import { Uploader } from './_uploader'; ++import { File, HttpOptions, HttpResponse, UploadFileConfig } from './types'; ++export declare const SDK_VERSION = "0.8.0"; ++/** ++ * Client errors raised by the GenAI API. ++ */ ++export declare class ClientError extends Error { ++ constructor(message: string, stackTrace?: string); ++} ++/** ++ * Server errors raised by the GenAI API. ++ */ ++export declare class ServerError extends Error { ++ constructor(message: string, stackTrace?: string); ++} ++/** ++ * Options for initializing the ApiClient. The ApiClient uses the parameters ++ * for authentication purposes as well as to infer if SDK should send the ++ * request to Vertex AI or Gemini API. ++ */ ++export interface ApiClientInitOptions { ++ /** ++ * The object used for adding authentication headers to API requests. ++ */ ++ auth: Auth; ++ /** ++ * The uploader to use for uploading files. This field is required for ++ * creating a client, will be set through the Node_client or Web_client. ++ */ ++ uploader: Uploader; ++ /** ++ * Optional. The Google Cloud project ID for Vertex AI users. ++ * It is not the numeric project name. ++ * If not provided, SDK will try to resolve it from runtime environment. ++ */ ++ project?: string; ++ /** ++ * Optional. The Google Cloud project location for Vertex AI users. ++ * If not provided, SDK will try to resolve it from runtime environment. ++ */ ++ location?: string; ++ /** ++ * The API Key. This is required for Gemini API users. ++ */ ++ apiKey?: string; ++ /** ++ * Optional. Set to true if you intend to call Vertex AI endpoints. ++ * If unset, default SDK behavior is to call Gemini API. ++ */ ++ vertexai?: boolean; ++ /** ++ * Optional. The API version for the endpoint. ++ * If unset, SDK will choose a default api version. ++ */ ++ apiVersion?: string; ++ /** ++ * Optional. A set of customizable configuration for HTTP requests. ++ */ ++ httpOptions?: HttpOptions; ++ /** ++ * Optional. An extra string to append at the end of the User-Agent header. ++ * ++ * This can be used to e.g specify the runtime and its version. ++ */ ++ userAgentExtra?: string; ++} ++/** ++ * Represents the necessary information to send a request to an API endpoint. ++ * This interface defines the structure for constructing and executing HTTP ++ * requests. ++ */ ++export interface HttpRequest { ++ /** ++ * URL path from the modules, this path is appended to the base API URL to ++ * form the complete request URL. ++ * ++ * If you wish to set full URL, use httpOptions.baseUrl instead. Example to ++ * set full URL in the request: ++ * ++ * const request: HttpRequest = { ++ * path: '', ++ * httpOptions: { ++ * baseUrl: 'https://', ++ * apiVersion: '', ++ * }, ++ * httpMethod: 'GET', ++ * }; ++ * ++ * The result URL will be: https:// ++ * ++ */ ++ path: string; ++ /** ++ * Optional query parameters to be appended to the request URL. ++ */ ++ queryParams?: Record; ++ /** ++ * Optional request body in json string or Blob format, GET request doesn't ++ * need a request body. ++ */ ++ body?: string | Blob; ++ /** ++ * The HTTP method to be used for the request. ++ */ ++ httpMethod: 'GET' | 'POST' | 'PATCH' | 'DELETE'; ++ /** ++ * Optional set of customizable configuration for HTTP requests. ++ */ ++ httpOptions?: HttpOptions; ++} ++/** ++ * The ApiClient class is used to send requests to the Gemini API or Vertex AI ++ * endpoints. ++ */ ++export declare class ApiClient { ++ readonly clientOptions: ApiClientInitOptions; ++ constructor(opts: ApiClientInitOptions); ++ isVertexAI(): boolean; ++ getProject(): string | undefined; ++ getLocation(): string | undefined; ++ getApiVersion(): string; ++ getBaseUrl(): string; ++ getRequestUrl(): string; ++ getHeaders(): Record; ++ private getRequestUrlInternal; ++ getBaseResourcePath(): string; ++ getApiKey(): string | undefined; ++ getWebsocketBaseUrl(): string; ++ setBaseUrl(url: string): void; ++ private constructUrl; ++ private shouldPrependVertexProjectPath; ++ request(request: HttpRequest): Promise; ++ private patchHttpOptions; ++ requestStream(request: HttpRequest): Promise>; ++ private includeExtraHttpOptionsToRequestInit; ++ private unaryApiCall; ++ private streamApiCall; ++ processStreamResponse(response: Response): AsyncGenerator; ++ private apiCall; ++ getDefaultHeaders(): Record; ++ private getHeadersInternal; ++ /** ++ * Uploads a file asynchronously using Gemini API only, this is not supported ++ * in Vertex AI. ++ * ++ * @param file The string path to the file to be uploaded or a Blob object. ++ * @param config Optional parameters specified in the `UploadFileConfig` ++ * interface. @see {@link UploadFileConfig} ++ * @return A promise that resolves to a `File` object. ++ * @throws An error if called on a Vertex AI client. ++ * @throws An error if the `mimeType` is not provided and can not be inferred, ++ */ ++ uploadFile(file: string | Blob, config?: UploadFileConfig): Promise; ++ private fetchUploadUrl; ++} +diff --git a/dist/web/src/_auth.d.ts b/dist/web/src/_auth.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..de021e522e6d5b527e198cea1212ab62586f32b6 +--- /dev/null ++++ b/dist/web/src/_auth.d.ts +@@ -0,0 +1,16 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++/** ++ * The Auth interface is used to authenticate with the API service. ++ */ ++export interface Auth { ++ /** ++ * Sets the headers needed to authenticate with the API service. ++ * ++ * @param headers - The Headers object that will be updated with the authentication headers. ++ */ ++ addAuthHeaders(headers: Headers): Promise; ++} +diff --git a/dist/web/src/_common.d.ts b/dist/web/src/_common.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..98ad405d7bb8d9c2f5addd076cf8ff7f46c9433d +--- /dev/null ++++ b/dist/web/src/_common.d.ts +@@ -0,0 +1,10 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++export declare class BaseModule { ++} ++export declare function formatMap(templateString: string, valueMap: Record): string; ++export declare function setValueByPath(data: Record, keys: string[], value: unknown): void; ++export declare function getValueByPath(data: unknown, keys: string[]): unknown; +diff --git a/dist/web/src/_transformers.d.ts b/dist/web/src/_transformers.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..956b7ae202abfa3fecf2cc5512b5766cc7561a9c +--- /dev/null ++++ b/dist/web/src/_transformers.d.ts +@@ -0,0 +1,23 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from './_api_client'; ++import * as types from './types'; ++export declare function tModel(apiClient: ApiClient, model: string | unknown): string; ++export declare function tCachesModel(apiClient: ApiClient, model: string | unknown): string; ++export declare function tPart(apiClient: ApiClient, origin?: types.PartUnion | null): types.Part; ++export declare function tParts(apiClient: ApiClient, origin?: types.PartListUnion | null): types.Part[]; ++export declare function tContent(apiClient: ApiClient, origin?: types.ContentUnion): types.Content; ++export declare function tContentsForEmbed(apiClient: ApiClient, origin: types.ContentListUnion): types.ContentUnion[]; ++export declare function tContents(apiClient: ApiClient, origin?: types.ContentListUnion): types.Content[]; ++export declare function processSchema(apiClient: ApiClient, schema: types.Schema): void; ++export declare function tSchema(apiClient: ApiClient, schema: types.Schema): types.Schema; ++export declare function tSpeechConfig(apiClient: ApiClient, speechConfig: types.SpeechConfigUnion): types.SpeechConfig; ++export declare function tTool(apiClient: ApiClient, tool: types.Tool): types.Tool; ++export declare function tTools(apiClient: ApiClient, tool: types.Tool[] | unknown): types.Tool[]; ++export declare function tCachedContentName(apiClient: ApiClient, name: string | unknown): string; ++export declare function tTuningJobStatus(apiClient: ApiClient, status: string | unknown): string; ++export declare function tBytes(apiClient: ApiClient, fromImageBytes: string | unknown): string; ++export declare function tFileName(apiClient: ApiClient, fromName: string | unknown): string; +diff --git a/dist/web/src/_uploader.d.ts b/dist/web/src/_uploader.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..4748f50fa4b52ac0406aa9c5d41efca34577b68a +--- /dev/null ++++ b/dist/web/src/_uploader.d.ts +@@ -0,0 +1,45 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from './_api_client'; ++import { File } from './types'; ++/** ++ * Represents the size and mimeType of a file. The information is used to ++ * request the upload URL from the https://generativelanguage.googleapis.com/upload/v1beta/files endpoint. ++ * This interface defines the structure for constructing and executing HTTP ++ * requests. ++ */ ++export interface FileStat { ++ /** ++ * The size of the file in bytes. ++ */ ++ size: number; ++ /** ++ * The MIME type of the file. ++ */ ++ type: string | undefined; ++} ++export interface Uploader { ++ /** ++ * Uploads a file to the given upload url. ++ * ++ * @param file The file to upload. file is in string type or a Blob. ++ * @param uploadUrl The upload URL as a string is where the file will be ++ * uploaded to. The uploadUrl must be a url that was returned by the ++ * https://generativelanguage.googleapis.com/upload/v1beta/files endpoint ++ * @param apiClient The ApiClient to use for uploading. ++ * @return A Promise that resolves to types.File. ++ */ ++ upload(file: string | Blob, uploadUrl: string, apiClient: ApiClient): Promise; ++ /** ++ * Returns the file's mimeType and the size of a given file. If the file is a ++ * string path, the file type is determined by the file extension. If the ++ * file's type cannot be determined, the type will be set to undefined. ++ * ++ * @param file The file to get the stat for. Can be a string path or a Blob. ++ * @return A Promise that resolves to the file stat of the given file. ++ */ ++ stat(file: string | Blob): Promise; ++} +diff --git a/dist/web/src/_websocket.d.ts b/dist/web/src/_websocket.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..f6902022c8d744f3044b8785deaae54bcdb013d1 +--- /dev/null ++++ b/dist/web/src/_websocket.d.ts +@@ -0,0 +1,31 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++export interface WebSocketCallbacks { ++ onopen: () => void; ++ onerror: (e: any) => void; ++ onmessage: (e: any) => void; ++ onclose: (e: any) => void; ++} ++export interface WebSocket { ++ /** ++ * Connects the socket to the server. ++ */ ++ connect(): void; ++ /** ++ * Sends a message to the server. ++ */ ++ send(message: string): void; ++ /** ++ * Closes the socket connection. ++ */ ++ close(): void; ++} ++export interface WebSocketFactory { ++ /** ++ * Returns a new WebSocket instance. ++ */ ++ create(url: string, headers: Record, callbacks: WebSocketCallbacks): WebSocket; ++} +diff --git a/dist/web/src/caches.d.ts b/dist/web/src/caches.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..a8ecb7e3ef3f6e75055b6893fa84a07a193b8e78 +--- /dev/null ++++ b/dist/web/src/caches.d.ts +@@ -0,0 +1,95 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from './_api_client'; ++import { BaseModule } from './_common'; ++import { Pager } from './pagers'; ++import * as types from './types'; ++export declare class Caches extends BaseModule { ++ private readonly apiClient; ++ constructor(apiClient: ApiClient); ++ /** ++ * Lists cached content configurations. ++ * ++ * @param params - The parameters for the list request. ++ * @return The paginated results of the list of cached contents. ++ * ++ * @example ++ * ```ts ++ * const cachedContents = await ai.caches.list({config: {'pageSize': 2}}); ++ * for (const cachedContent of cachedContents) { ++ * console.log(cachedContent); ++ * } ++ * ``` ++ */ ++ list: (params?: types.ListCachedContentsParameters) => Promise>; ++ /** ++ * Creates a cached contents resource. ++ * ++ * @remarks ++ * Context caching is only supported for specific models. See [Gemini ++ * Developer API reference](https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac) ++ * and [Vertex AI reference](https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models) ++ * for more information. ++ * ++ * @param params - The parameters for the create request. ++ * @return The created cached content. ++ * ++ * @example ++ * ```ts ++ * const contents = ...; // Initialize the content to cache. ++ * const response = await ai.caches.create({ ++ * model: 'gemini-1.5-flash', ++ * config: { ++ * 'contents': contents, ++ * 'displayName': 'test cache', ++ * 'systemInstruction': 'What is the sum of the two pdfs?', ++ * 'ttl': '86400s', ++ * } ++ * }); ++ * ``` ++ */ ++ create(params: types.CreateCachedContentParameters): Promise; ++ /** ++ * Gets cached content configurations. ++ * ++ * @param params - The parameters for the get request. ++ * @return The cached content. ++ * ++ * @example ++ * ```ts ++ * await ai.caches.get({name: 'gemini-1.5-flash'}); ++ * ``` ++ */ ++ get(params: types.GetCachedContentParameters): Promise; ++ /** ++ * Deletes cached content. ++ * ++ * @param params - The parameters for the delete request. ++ * @return The empty response returned by the API. ++ * ++ * @example ++ * ```ts ++ * await ai.caches.delete({name: 'gemini-1.5-flash'}); ++ * ``` ++ */ ++ delete(params: types.DeleteCachedContentParameters): Promise; ++ /** ++ * Updates cached content configurations. ++ * ++ * @param params - The parameters for the update request. ++ * @return The updated cached content. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.caches.update({ ++ * name: 'gemini-1.5-flash', ++ * config: {'ttl': '7600s'} ++ * }); ++ * ``` ++ */ ++ update(params: types.UpdateCachedContentParameters): Promise; ++ private listInternal; ++} +diff --git a/dist/web/src/chats.d.ts b/dist/web/src/chats.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..01a69818bfd74e3763a49eb107620353e0b1efec +--- /dev/null ++++ b/dist/web/src/chats.d.ts +@@ -0,0 +1,125 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from './_api_client'; ++import { Models } from './models'; ++import * as types from './types'; ++/** ++ * A utility class to create a chat session. ++ */ ++export declare class Chats { ++ private readonly modelsModule; ++ private readonly apiClient; ++ constructor(modelsModule: Models, apiClient: ApiClient); ++ /** ++ * Creates a new chat session. ++ * ++ * @remarks ++ * The config in the params will be used for all requests within the chat ++ * session unless overridden by a per-request `config` in ++ * @see {@link types.SendMessageParameters#config}. ++ * ++ * @param params - Parameters for creating a chat session. ++ * @returns A new chat session. ++ * ++ * @example ++ * ```ts ++ * const chat = ai.chats.create({ ++ * model: 'gemini-2.0-flash' ++ * config: { ++ * temperature: 0.5, ++ * maxOutputTokens: 1024, ++ * } ++ * }); ++ * ``` ++ */ ++ create(params: types.CreateChatParameters): Chat; ++} ++/** ++ * Chat session that enables sending messages to the model with previous ++ * conversation context. ++ * ++ * @remarks ++ * The session maintains all the turns between user and model. ++ */ ++export declare class Chat { ++ private readonly apiClient; ++ private readonly modelsModule; ++ private readonly model; ++ private readonly config; ++ private history; ++ private sendPromise; ++ constructor(apiClient: ApiClient, modelsModule: Models, model: string, config?: types.GenerateContentConfig, history?: types.Content[]); ++ /** ++ * Sends a message to the model and returns the response. ++ * ++ * @remarks ++ * This method will wait for the previous message to be processed before ++ * sending the next message. ++ * ++ * @see {@link Chat#sendMessageStream} for streaming method. ++ * @param params - parameters for sending messages within a chat session. ++ * @returns The model's response. ++ * ++ * @example ++ * ```ts ++ * const chat = ai.chats.create({model: 'gemini-2.0-flash'}); ++ * const response = await chat.sendMessage({ ++ * message: 'Why is the sky blue?' ++ * }); ++ * console.log(response.text); ++ * ``` ++ */ ++ sendMessage(params: types.SendMessageParameters): Promise; ++ /** ++ * Sends a message to the model and returns the response in chunks. ++ * ++ * @remarks ++ * This method will wait for the previous message to be processed before ++ * sending the next message. ++ * ++ * @see {@link Chat#sendMessage} for non-streaming method. ++ * @param params - parameters for sending the message. ++ * @return The model's response. ++ * ++ * @example ++ * ```ts ++ * const chat = ai.chats.create({model: 'gemini-2.0-flash'}); ++ * const response = await chat.sendMessageStream({ ++ * message: 'Why is the sky blue?' ++ * }); ++ * for await (const chunk of response) { ++ * console.log(chunk.text); ++ * } ++ * ``` ++ */ ++ sendMessageStream(params: types.SendMessageParameters): Promise>; ++ /** ++ * Returns the chat history. ++ * ++ * @remarks ++ * The history is a list of contents alternating between user and model. ++ * ++ * There are two types of history: ++ * - The `curated history` contains only the valid turns between user and ++ * model, which will be included in the subsequent requests sent to the model. ++ * - The `comprehensive history` contains all turns, including invalid or ++ * empty model outputs, providing a complete record of the history. ++ * ++ * The history is updated after receiving the response from the model, ++ * for streaming response, it means receiving the last chunk of the response. ++ * ++ * The `comprehensive history` is returned by default. To get the `curated ++ * history`, set the `curated` parameter to `true`. ++ * ++ * @param curated - whether to return the curated history or the comprehensive ++ * history. ++ * @return History contents alternating between user and model for the entire ++ * chat session. ++ */ ++ getHistory(curated?: boolean): types.Content[]; ++ private processStreamResponse; ++ private recordHistory; ++} +diff --git a/dist/web/src/client.d.ts b/dist/web/src/client.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..dcf26703bf6778a79dacee27fe50c0c05cf3d3af +--- /dev/null ++++ b/dist/web/src/client.d.ts +@@ -0,0 +1,118 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { GoogleAuthOptions } from 'google-auth-library'; ++import { ApiClient } from './_api_client'; ++import { Caches } from './caches'; ++import { Chats } from './chats'; ++import { Files } from './files'; ++import { Live } from './live'; ++import { Models } from './models'; ++import { Operations } from './operations'; ++import { HttpOptions } from './types'; ++/** ++ * Google Gen AI SDK's configuration options. ++ * ++ * See {@link GoogleGenAI} for usage samples. ++ */ ++export interface GoogleGenAIOptions { ++ /** ++ * Optional. Determines whether to use the Vertex AI or the Gemini API. ++ * ++ * @remarks ++ * When true, the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI API} will used. ++ * When false, the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API} will be used. ++ * ++ * If unset, default SDK behavior is to use the Gemini API service. ++ */ ++ vertexai?: boolean; ++ /** ++ * Optional. The Google Cloud project ID for Vertex AI clients. ++ * ++ * @remarks ++ * Only supported on Node runtimes, ignored on browser runtimes. ++ */ ++ project?: string; ++ /** ++ * Optional. The Google Cloud project region for Vertex AI clients. ++ * ++ * @remarks ++ * Only supported on Node runtimes, ignored on browser runtimes. ++ * ++ */ ++ location?: string; ++ /** ++ * The API Key, required for Gemini API clients. ++ * ++ * @remarks ++ * Required on browser runtimes. ++ */ ++ apiKey?: string; ++ /** ++ * Optional. The API version to use. ++ * ++ * @remarks ++ * If unset, the default API version will be used. ++ */ ++ apiVersion?: string; ++ /** ++ * Optional. Authentication options defined by the by google-auth-library for Vertex AI clients. ++ * ++ * @remarks ++ * @see {@link https://github.com/googleapis/google-auth-library-nodejs/blob/v9.15.0/src/auth/googleauth.ts | GoogleAuthOptions interface in google-auth-library-nodejs}. ++ * ++ * Only supported on Node runtimes, ignored on browser runtimes. ++ * ++ */ ++ googleAuthOptions?: GoogleAuthOptions; ++ /** ++ * Optional. A set of customizable configuration for HTTP requests. ++ */ ++ httpOptions?: HttpOptions; ++} ++/** ++ * The Google GenAI SDK. ++ * ++ * @remarks ++ * Provides access to the GenAI features through either the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API} ++ * or the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI API}. ++ * ++ * The {@link GoogleGenAIOptions.vertexai} value determines which of the API services to use. ++ * ++ * When using the Gemini API, a {@link GoogleGenAIOptions.apiKey} must also be set, ++ * when using Vertex AI {@link GoogleGenAIOptions.project} and {@link GoogleGenAIOptions.location} must also be set. ++ * ++ * @example ++ * Initializing the SDK for using the Gemini API: ++ * ```ts ++ * import {GoogleGenAI} from '@google/genai'; ++ * const ai = new GoogleGenAI({apiKey: 'GEMINI_API_KEY'}); ++ * ``` ++ * ++ * @example ++ * Initializing the SDK for using the Vertex AI API: ++ * ```ts ++ * import {GoogleGenAI} from '@google/genai'; ++ * const ai = new GoogleGenAI({ ++ * vertexai: true, ++ * project: 'PROJECT_ID', ++ * location: 'PROJECT_LOCATION' ++ * }); ++ * ``` ++ * ++ */ ++export declare class GoogleGenAI { ++ protected readonly apiClient: ApiClient; ++ private readonly apiKey?; ++ readonly vertexai: boolean; ++ private readonly apiVersion?; ++ readonly models: Models; ++ readonly live: Live; ++ readonly chats: Chats; ++ readonly caches: Caches; ++ readonly files: Files; ++ readonly operations: Operations; ++ constructor(options: GoogleGenAIOptions); ++} +diff --git a/dist/web/src/converters/_caches_converters.d.ts b/dist/web/src/converters/_caches_converters.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..5f6b08f412a8df4003a6ff93f36f273e3c6c9d79 +--- /dev/null ++++ b/dist/web/src/converters/_caches_converters.d.ts +@@ -0,0 +1,49 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import * as types from '../types'; ++export declare function partToMldev(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentToMldev(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function schemaToMldev(apiClient: ApiClient, fromObject: types.Schema): Record; ++export declare function functionDeclarationToMldev(apiClient: ApiClient, fromObject: types.FunctionDeclaration): Record; ++export declare function googleSearchToMldev(): Record; ++export declare function dynamicRetrievalConfigToMldev(apiClient: ApiClient, fromObject: types.DynamicRetrievalConfig): Record; ++export declare function googleSearchRetrievalToMldev(apiClient: ApiClient, fromObject: types.GoogleSearchRetrieval): Record; ++export declare function toolToMldev(apiClient: ApiClient, fromObject: types.Tool): Record; ++export declare function functionCallingConfigToMldev(apiClient: ApiClient, fromObject: types.FunctionCallingConfig): Record; ++export declare function toolConfigToMldev(apiClient: ApiClient, fromObject: types.ToolConfig): Record; ++export declare function createCachedContentConfigToMldev(apiClient: ApiClient, fromObject: types.CreateCachedContentConfig, parentObject: Record): Record; ++export declare function createCachedContentParametersToMldev(apiClient: ApiClient, fromObject: types.CreateCachedContentParameters): Record; ++export declare function getCachedContentParametersToMldev(apiClient: ApiClient, fromObject: types.GetCachedContentParameters): Record; ++export declare function deleteCachedContentParametersToMldev(apiClient: ApiClient, fromObject: types.DeleteCachedContentParameters): Record; ++export declare function updateCachedContentConfigToMldev(apiClient: ApiClient, fromObject: types.UpdateCachedContentConfig, parentObject: Record): Record; ++export declare function updateCachedContentParametersToMldev(apiClient: ApiClient, fromObject: types.UpdateCachedContentParameters): Record; ++export declare function listCachedContentsConfigToMldev(apiClient: ApiClient, fromObject: types.ListCachedContentsConfig, parentObject: Record): Record; ++export declare function listCachedContentsParametersToMldev(apiClient: ApiClient, fromObject: types.ListCachedContentsParameters): Record; ++export declare function partToVertex(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentToVertex(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function schemaToVertex(apiClient: ApiClient, fromObject: types.Schema): Record; ++export declare function functionDeclarationToVertex(apiClient: ApiClient, fromObject: types.FunctionDeclaration): Record; ++export declare function googleSearchToVertex(): Record; ++export declare function dynamicRetrievalConfigToVertex(apiClient: ApiClient, fromObject: types.DynamicRetrievalConfig): Record; ++export declare function googleSearchRetrievalToVertex(apiClient: ApiClient, fromObject: types.GoogleSearchRetrieval): Record; ++export declare function toolToVertex(apiClient: ApiClient, fromObject: types.Tool): Record; ++export declare function functionCallingConfigToVertex(apiClient: ApiClient, fromObject: types.FunctionCallingConfig): Record; ++export declare function toolConfigToVertex(apiClient: ApiClient, fromObject: types.ToolConfig): Record; ++export declare function createCachedContentConfigToVertex(apiClient: ApiClient, fromObject: types.CreateCachedContentConfig, parentObject: Record): Record; ++export declare function createCachedContentParametersToVertex(apiClient: ApiClient, fromObject: types.CreateCachedContentParameters): Record; ++export declare function getCachedContentParametersToVertex(apiClient: ApiClient, fromObject: types.GetCachedContentParameters): Record; ++export declare function deleteCachedContentParametersToVertex(apiClient: ApiClient, fromObject: types.DeleteCachedContentParameters): Record; ++export declare function updateCachedContentConfigToVertex(apiClient: ApiClient, fromObject: types.UpdateCachedContentConfig, parentObject: Record): Record; ++export declare function updateCachedContentParametersToVertex(apiClient: ApiClient, fromObject: types.UpdateCachedContentParameters): Record; ++export declare function listCachedContentsConfigToVertex(apiClient: ApiClient, fromObject: types.ListCachedContentsConfig, parentObject: Record): Record; ++export declare function listCachedContentsParametersToVertex(apiClient: ApiClient, fromObject: types.ListCachedContentsParameters): Record; ++export declare function cachedContentFromMldev(apiClient: ApiClient, fromObject: types.CachedContent): Record; ++export declare function deleteCachedContentResponseFromMldev(): Record; ++export declare function listCachedContentsResponseFromMldev(apiClient: ApiClient, fromObject: types.ListCachedContentsResponse): Record; ++export declare function cachedContentFromVertex(apiClient: ApiClient, fromObject: types.CachedContent): Record; ++export declare function deleteCachedContentResponseFromVertex(): Record; ++export declare function listCachedContentsResponseFromVertex(apiClient: ApiClient, fromObject: types.ListCachedContentsResponse): Record; +diff --git a/dist/web/src/converters/_files_converters.d.ts b/dist/web/src/converters/_files_converters.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..ff5196bff283098c33b9e8cd49b37914c4130e92 +--- /dev/null ++++ b/dist/web/src/converters/_files_converters.d.ts +@@ -0,0 +1,19 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import * as types from '../types'; ++export declare function listFilesConfigToMldev(apiClient: ApiClient, fromObject: types.ListFilesConfig, parentObject: Record): Record; ++export declare function listFilesParametersToMldev(apiClient: ApiClient, fromObject: types.ListFilesParameters): Record; ++export declare function fileStatusToMldev(apiClient: ApiClient, fromObject: types.FileStatus): Record; ++export declare function fileToMldev(apiClient: ApiClient, fromObject: types.File): Record; ++export declare function createFileParametersToMldev(apiClient: ApiClient, fromObject: types.CreateFileParameters): Record; ++export declare function getFileParametersToMldev(apiClient: ApiClient, fromObject: types.GetFileParameters): Record; ++export declare function deleteFileParametersToMldev(apiClient: ApiClient, fromObject: types.DeleteFileParameters): Record; ++export declare function fileStatusFromMldev(apiClient: ApiClient, fromObject: types.FileStatus): Record; ++export declare function fileFromMldev(apiClient: ApiClient, fromObject: types.File): Record; ++export declare function listFilesResponseFromMldev(apiClient: ApiClient, fromObject: types.ListFilesResponse): Record; ++export declare function createFileResponseFromMldev(): Record; ++export declare function deleteFileResponseFromMldev(): Record; +diff --git a/dist/web/src/converters/_live_converters.d.ts b/dist/web/src/converters/_live_converters.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..809a88a2ad2eb59aaca17ca5a66b4768bb7f74d1 +--- /dev/null ++++ b/dist/web/src/converters/_live_converters.d.ts +@@ -0,0 +1,81 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import * as types from '../types'; ++export declare function partToMldev(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function partToVertex(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentToMldev(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function contentToVertex(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function schemaToMldev(apiClient: ApiClient, fromObject: types.Schema): Record; ++export declare function schemaToVertex(apiClient: ApiClient, fromObject: types.Schema): Record; ++export declare function functionDeclarationToMldev(apiClient: ApiClient, fromObject: types.FunctionDeclaration): Record; ++export declare function functionDeclarationToVertex(apiClient: ApiClient, fromObject: types.FunctionDeclaration): Record; ++export declare function googleSearchToMldev(): Record; ++export declare function googleSearchToVertex(): Record; ++export declare function dynamicRetrievalConfigToMldev(apiClient: ApiClient, fromObject: types.DynamicRetrievalConfig): Record; ++export declare function dynamicRetrievalConfigToVertex(apiClient: ApiClient, fromObject: types.DynamicRetrievalConfig): Record; ++export declare function googleSearchRetrievalToMldev(apiClient: ApiClient, fromObject: types.GoogleSearchRetrieval): Record; ++export declare function googleSearchRetrievalToVertex(apiClient: ApiClient, fromObject: types.GoogleSearchRetrieval): Record; ++export declare function toolToMldev(apiClient: ApiClient, fromObject: types.Tool): Record; ++export declare function toolToVertex(apiClient: ApiClient, fromObject: types.Tool): Record; ++export declare function sessionResumptionConfigToMldev(apiClient: ApiClient, fromObject: types.SessionResumptionConfig): Record; ++export declare function sessionResumptionConfigToVertex(apiClient: ApiClient, fromObject: types.SessionResumptionConfig): Record; ++export declare function audioTranscriptionConfigToMldev(): Record; ++export declare function audioTranscriptionConfigToVertex(): Record; ++export declare function automaticActivityDetectionToMldev(apiClient: ApiClient, fromObject: types.AutomaticActivityDetection): Record; ++export declare function automaticActivityDetectionToVertex(apiClient: ApiClient, fromObject: types.AutomaticActivityDetection): Record; ++export declare function realtimeInputConfigToMldev(apiClient: ApiClient, fromObject: types.RealtimeInputConfig): Record; ++export declare function realtimeInputConfigToVertex(apiClient: ApiClient, fromObject: types.RealtimeInputConfig): Record; ++export declare function slidingWindowToMldev(apiClient: ApiClient, fromObject: types.SlidingWindow): Record; ++export declare function slidingWindowToVertex(apiClient: ApiClient, fromObject: types.SlidingWindow): Record; ++export declare function contextWindowCompressionConfigToMldev(apiClient: ApiClient, fromObject: types.ContextWindowCompressionConfig): Record; ++export declare function contextWindowCompressionConfigToVertex(apiClient: ApiClient, fromObject: types.ContextWindowCompressionConfig): Record; ++export declare function liveConnectConfigToMldev(apiClient: ApiClient, fromObject: types.LiveConnectConfig, parentObject: Record): Record; ++export declare function liveConnectConfigToVertex(apiClient: ApiClient, fromObject: types.LiveConnectConfig, parentObject: Record): Record; ++export declare function liveConnectParametersToMldev(apiClient: ApiClient, fromObject: types.LiveConnectParameters): Record; ++export declare function liveConnectParametersToVertex(apiClient: ApiClient, fromObject: types.LiveConnectParameters): Record; ++export declare function liveClientSetupToMldev(apiClient: ApiClient, fromObject: types.LiveClientSetup): Record; ++export declare function liveClientSetupToVertex(apiClient: ApiClient, fromObject: types.LiveClientSetup): Record; ++export declare function liveClientContentToMldev(apiClient: ApiClient, fromObject: types.LiveClientContent): Record; ++export declare function liveClientContentToVertex(apiClient: ApiClient, fromObject: types.LiveClientContent): Record; ++export declare function activityStartToMldev(): Record; ++export declare function activityStartToVertex(): Record; ++export declare function activityEndToMldev(): Record; ++export declare function activityEndToVertex(): Record; ++export declare function liveClientRealtimeInputToMldev(apiClient: ApiClient, fromObject: types.LiveClientRealtimeInput): Record; ++export declare function liveClientRealtimeInputToVertex(apiClient: ApiClient, fromObject: types.LiveClientRealtimeInput): Record; ++export declare function functionResponseToMldev(apiClient: ApiClient, fromObject: types.FunctionResponse): Record; ++export declare function functionResponseToVertex(apiClient: ApiClient, fromObject: types.FunctionResponse): Record; ++export declare function liveClientToolResponseToMldev(apiClient: ApiClient, fromObject: types.LiveClientToolResponse): Record; ++export declare function liveClientToolResponseToVertex(apiClient: ApiClient, fromObject: types.LiveClientToolResponse): Record; ++export declare function liveClientMessageToMldev(apiClient: ApiClient, fromObject: types.LiveClientMessage): Record; ++export declare function liveClientMessageToVertex(apiClient: ApiClient, fromObject: types.LiveClientMessage): Record; ++export declare function liveServerSetupCompleteFromMldev(): Record; ++export declare function liveServerSetupCompleteFromVertex(): Record; ++export declare function partFromMldev(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function partFromVertex(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentFromMldev(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function contentFromVertex(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function transcriptionFromMldev(): Record; ++export declare function transcriptionFromVertex(): Record; ++export declare function liveServerContentFromMldev(apiClient: ApiClient, fromObject: types.LiveServerContent): Record; ++export declare function liveServerContentFromVertex(apiClient: ApiClient, fromObject: types.LiveServerContent): Record; ++export declare function functionCallFromMldev(apiClient: ApiClient, fromObject: types.FunctionCall): Record; ++export declare function functionCallFromVertex(apiClient: ApiClient, fromObject: types.FunctionCall): Record; ++export declare function liveServerToolCallFromMldev(apiClient: ApiClient, fromObject: types.LiveServerToolCall): Record; ++export declare function liveServerToolCallFromVertex(apiClient: ApiClient, fromObject: types.LiveServerToolCall): Record; ++export declare function liveServerToolCallCancellationFromMldev(apiClient: ApiClient, fromObject: types.LiveServerToolCallCancellation): Record; ++export declare function liveServerToolCallCancellationFromVertex(apiClient: ApiClient, fromObject: types.LiveServerToolCallCancellation): Record; ++export declare function modalityTokenCountFromMldev(apiClient: ApiClient, fromObject: types.ModalityTokenCount): Record; ++export declare function modalityTokenCountFromVertex(apiClient: ApiClient, fromObject: types.ModalityTokenCount): Record; ++export declare function usageMetadataFromMldev(apiClient: ApiClient, fromObject: types.UsageMetadata): Record; ++export declare function usageMetadataFromVertex(apiClient: ApiClient, fromObject: types.UsageMetadata): Record; ++export declare function liveServerGoAwayFromMldev(apiClient: ApiClient, fromObject: types.LiveServerGoAway): Record; ++export declare function liveServerGoAwayFromVertex(apiClient: ApiClient, fromObject: types.LiveServerGoAway): Record; ++export declare function liveServerSessionResumptionUpdateFromMldev(apiClient: ApiClient, fromObject: types.LiveServerSessionResumptionUpdate): Record; ++export declare function liveServerSessionResumptionUpdateFromVertex(apiClient: ApiClient, fromObject: types.LiveServerSessionResumptionUpdate): Record; ++export declare function liveServerMessageFromMldev(apiClient: ApiClient, fromObject: types.LiveServerMessage): Record; ++export declare function liveServerMessageFromVertex(apiClient: ApiClient, fromObject: types.LiveServerMessage): Record; +diff --git a/dist/web/src/converters/_models_converters.d.ts b/dist/web/src/converters/_models_converters.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..333adc776bd14c467e38a13af1b980533606957b +--- /dev/null ++++ b/dist/web/src/converters/_models_converters.d.ts +@@ -0,0 +1,107 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import * as types from '../types'; ++export declare function partToMldev(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentToMldev(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function schemaToMldev(apiClient: ApiClient, fromObject: types.Schema): Record; ++export declare function modelSelectionConfigToMldev(apiClient: ApiClient, fromObject: types.ModelSelectionConfig): Record; ++export declare function safetySettingToMldev(apiClient: ApiClient, fromObject: types.SafetySetting): Record; ++export declare function functionDeclarationToMldev(apiClient: ApiClient, fromObject: types.FunctionDeclaration): Record; ++export declare function googleSearchToMldev(): Record; ++export declare function dynamicRetrievalConfigToMldev(apiClient: ApiClient, fromObject: types.DynamicRetrievalConfig): Record; ++export declare function googleSearchRetrievalToMldev(apiClient: ApiClient, fromObject: types.GoogleSearchRetrieval): Record; ++export declare function toolToMldev(apiClient: ApiClient, fromObject: types.Tool): Record; ++export declare function functionCallingConfigToMldev(apiClient: ApiClient, fromObject: types.FunctionCallingConfig): Record; ++export declare function toolConfigToMldev(apiClient: ApiClient, fromObject: types.ToolConfig): Record; ++export declare function prebuiltVoiceConfigToMldev(apiClient: ApiClient, fromObject: types.PrebuiltVoiceConfig): Record; ++export declare function voiceConfigToMldev(apiClient: ApiClient, fromObject: types.VoiceConfig): Record; ++export declare function speechConfigToMldev(apiClient: ApiClient, fromObject: types.SpeechConfig): Record; ++export declare function thinkingConfigToMldev(apiClient: ApiClient, fromObject: types.ThinkingConfig): Record; ++export declare function generateContentConfigToMldev(apiClient: ApiClient, fromObject: types.GenerateContentConfig, parentObject: Record): Record; ++export declare function generateContentParametersToMldev(apiClient: ApiClient, fromObject: types.GenerateContentParameters): Record; ++export declare function embedContentConfigToMldev(apiClient: ApiClient, fromObject: types.EmbedContentConfig, parentObject: Record): Record; ++export declare function embedContentParametersToMldev(apiClient: ApiClient, fromObject: types.EmbedContentParameters): Record; ++export declare function generateImagesConfigToMldev(apiClient: ApiClient, fromObject: types.GenerateImagesConfig, parentObject: Record): Record; ++export declare function generateImagesParametersToMldev(apiClient: ApiClient, fromObject: types.GenerateImagesParameters): Record; ++export declare function getModelParametersToMldev(apiClient: ApiClient, fromObject: types.GetModelParameters): Record; ++export declare function countTokensConfigToMldev(apiClient: ApiClient, fromObject: types.CountTokensConfig): Record; ++export declare function countTokensParametersToMldev(apiClient: ApiClient, fromObject: types.CountTokensParameters): Record; ++export declare function imageToMldev(apiClient: ApiClient, fromObject: types.Image): Record; ++export declare function generateVideosConfigToMldev(apiClient: ApiClient, fromObject: types.GenerateVideosConfig, parentObject: Record): Record; ++export declare function generateVideosParametersToMldev(apiClient: ApiClient, fromObject: types.GenerateVideosParameters): Record; ++export declare function partToVertex(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentToVertex(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function schemaToVertex(apiClient: ApiClient, fromObject: types.Schema): Record; ++export declare function modelSelectionConfigToVertex(apiClient: ApiClient, fromObject: types.ModelSelectionConfig): Record; ++export declare function safetySettingToVertex(apiClient: ApiClient, fromObject: types.SafetySetting): Record; ++export declare function functionDeclarationToVertex(apiClient: ApiClient, fromObject: types.FunctionDeclaration): Record; ++export declare function googleSearchToVertex(): Record; ++export declare function dynamicRetrievalConfigToVertex(apiClient: ApiClient, fromObject: types.DynamicRetrievalConfig): Record; ++export declare function googleSearchRetrievalToVertex(apiClient: ApiClient, fromObject: types.GoogleSearchRetrieval): Record; ++export declare function toolToVertex(apiClient: ApiClient, fromObject: types.Tool): Record; ++export declare function functionCallingConfigToVertex(apiClient: ApiClient, fromObject: types.FunctionCallingConfig): Record; ++export declare function toolConfigToVertex(apiClient: ApiClient, fromObject: types.ToolConfig): Record; ++export declare function prebuiltVoiceConfigToVertex(apiClient: ApiClient, fromObject: types.PrebuiltVoiceConfig): Record; ++export declare function voiceConfigToVertex(apiClient: ApiClient, fromObject: types.VoiceConfig): Record; ++export declare function speechConfigToVertex(apiClient: ApiClient, fromObject: types.SpeechConfig): Record; ++export declare function thinkingConfigToVertex(apiClient: ApiClient, fromObject: types.ThinkingConfig): Record; ++export declare function generateContentConfigToVertex(apiClient: ApiClient, fromObject: types.GenerateContentConfig, parentObject: Record): Record; ++export declare function generateContentParametersToVertex(apiClient: ApiClient, fromObject: types.GenerateContentParameters): Record; ++export declare function embedContentConfigToVertex(apiClient: ApiClient, fromObject: types.EmbedContentConfig, parentObject: Record): Record; ++export declare function embedContentParametersToVertex(apiClient: ApiClient, fromObject: types.EmbedContentParameters): Record; ++export declare function generateImagesConfigToVertex(apiClient: ApiClient, fromObject: types.GenerateImagesConfig, parentObject: Record): Record; ++export declare function generateImagesParametersToVertex(apiClient: ApiClient, fromObject: types.GenerateImagesParameters): Record; ++export declare function getModelParametersToVertex(apiClient: ApiClient, fromObject: types.GetModelParameters): Record; ++export declare function countTokensConfigToVertex(apiClient: ApiClient, fromObject: types.CountTokensConfig, parentObject: Record): Record; ++export declare function countTokensParametersToVertex(apiClient: ApiClient, fromObject: types.CountTokensParameters): Record; ++export declare function computeTokensParametersToVertex(apiClient: ApiClient, fromObject: types.ComputeTokensParameters): Record; ++export declare function imageToVertex(apiClient: ApiClient, fromObject: types.Image): Record; ++export declare function generateVideosConfigToVertex(apiClient: ApiClient, fromObject: types.GenerateVideosConfig, parentObject: Record): Record; ++export declare function generateVideosParametersToVertex(apiClient: ApiClient, fromObject: types.GenerateVideosParameters): Record; ++export declare function partFromMldev(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentFromMldev(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function citationMetadataFromMldev(apiClient: ApiClient, fromObject: types.CitationMetadata): Record; ++export declare function candidateFromMldev(apiClient: ApiClient, fromObject: types.Candidate): Record; ++export declare function generateContentResponseFromMldev(apiClient: ApiClient, fromObject: types.GenerateContentResponse): Record; ++export declare function contentEmbeddingStatisticsFromMldev(): Record; ++export declare function contentEmbeddingFromMldev(apiClient: ApiClient, fromObject: types.ContentEmbedding): Record; ++export declare function embedContentMetadataFromMldev(): Record; ++export declare function embedContentResponseFromMldev(apiClient: ApiClient, fromObject: types.EmbedContentResponse): Record; ++export declare function imageFromMldev(apiClient: ApiClient, fromObject: types.Image): Record; ++export declare function safetyAttributesFromMldev(apiClient: ApiClient, fromObject: types.SafetyAttributes): Record; ++export declare function generatedImageFromMldev(apiClient: ApiClient, fromObject: types.GeneratedImage): Record; ++export declare function generateImagesResponseFromMldev(apiClient: ApiClient, fromObject: types.GenerateImagesResponse): Record; ++export declare function endpointFromMldev(): Record; ++export declare function tunedModelInfoFromMldev(apiClient: ApiClient, fromObject: types.TunedModelInfo): Record; ++export declare function modelFromMldev(apiClient: ApiClient, fromObject: types.Model): Record; ++export declare function countTokensResponseFromMldev(apiClient: ApiClient, fromObject: types.CountTokensResponse): Record; ++export declare function videoFromMldev(apiClient: ApiClient, fromObject: types.Video): Record; ++export declare function generatedVideoFromMldev(apiClient: ApiClient, fromObject: types.GeneratedVideo): Record; ++export declare function generateVideosResponseFromMldev(apiClient: ApiClient, fromObject: types.GenerateVideosResponse): Record; ++export declare function generateVideosOperationFromMldev(apiClient: ApiClient, fromObject: types.GenerateVideosOperation): Record; ++export declare function partFromVertex(apiClient: ApiClient, fromObject: types.Part): Record; ++export declare function contentFromVertex(apiClient: ApiClient, fromObject: types.Content): Record; ++export declare function citationMetadataFromVertex(apiClient: ApiClient, fromObject: types.CitationMetadata): Record; ++export declare function candidateFromVertex(apiClient: ApiClient, fromObject: types.Candidate): Record; ++export declare function generateContentResponseFromVertex(apiClient: ApiClient, fromObject: types.GenerateContentResponse): Record; ++export declare function contentEmbeddingStatisticsFromVertex(apiClient: ApiClient, fromObject: types.ContentEmbeddingStatistics): Record; ++export declare function contentEmbeddingFromVertex(apiClient: ApiClient, fromObject: types.ContentEmbedding): Record; ++export declare function embedContentMetadataFromVertex(apiClient: ApiClient, fromObject: types.EmbedContentMetadata): Record; ++export declare function embedContentResponseFromVertex(apiClient: ApiClient, fromObject: types.EmbedContentResponse): Record; ++export declare function imageFromVertex(apiClient: ApiClient, fromObject: types.Image): Record; ++export declare function safetyAttributesFromVertex(apiClient: ApiClient, fromObject: types.SafetyAttributes): Record; ++export declare function generatedImageFromVertex(apiClient: ApiClient, fromObject: types.GeneratedImage): Record; ++export declare function generateImagesResponseFromVertex(apiClient: ApiClient, fromObject: types.GenerateImagesResponse): Record; ++export declare function endpointFromVertex(apiClient: ApiClient, fromObject: types.Endpoint): Record; ++export declare function tunedModelInfoFromVertex(apiClient: ApiClient, fromObject: types.TunedModelInfo): Record; ++export declare function modelFromVertex(apiClient: ApiClient, fromObject: types.Model): Record; ++export declare function countTokensResponseFromVertex(apiClient: ApiClient, fromObject: types.CountTokensResponse): Record; ++export declare function computeTokensResponseFromVertex(apiClient: ApiClient, fromObject: types.ComputeTokensResponse): Record; ++export declare function videoFromVertex(apiClient: ApiClient, fromObject: types.Video): Record; ++export declare function generatedVideoFromVertex(apiClient: ApiClient, fromObject: types.GeneratedVideo): Record; ++export declare function generateVideosResponseFromVertex(apiClient: ApiClient, fromObject: types.GenerateVideosResponse): Record; ++export declare function generateVideosOperationFromVertex(apiClient: ApiClient, fromObject: types.GenerateVideosOperation): Record; +diff --git a/dist/web/src/converters/_operations_converters.d.ts b/dist/web/src/converters/_operations_converters.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..00fabb987cc151833cd5656216dfc4f2a78e9533 +--- /dev/null ++++ b/dist/web/src/converters/_operations_converters.d.ts +@@ -0,0 +1,18 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import * as types from '../types'; ++export declare function getOperationParametersToMldev(apiClient: ApiClient, fromObject: types.GetOperationParameters): Record; ++export declare function getOperationParametersToVertex(apiClient: ApiClient, fromObject: types.GetOperationParameters): Record; ++export declare function fetchPredictOperationParametersToVertex(apiClient: ApiClient, fromObject: types.FetchPredictOperationParameters): Record; ++export declare function videoFromMldev(apiClient: ApiClient, fromObject: types.Video): Record; ++export declare function generatedVideoFromMldev(apiClient: ApiClient, fromObject: types.GeneratedVideo): Record; ++export declare function generateVideosResponseFromMldev(apiClient: ApiClient, fromObject: types.GenerateVideosResponse): Record; ++export declare function generateVideosOperationFromMldev(apiClient: ApiClient, fromObject: types.GenerateVideosOperation): Record; ++export declare function videoFromVertex(apiClient: ApiClient, fromObject: types.Video): Record; ++export declare function generatedVideoFromVertex(apiClient: ApiClient, fromObject: types.GeneratedVideo): Record; ++export declare function generateVideosResponseFromVertex(apiClient: ApiClient, fromObject: types.GenerateVideosResponse): Record; ++export declare function generateVideosOperationFromVertex(apiClient: ApiClient, fromObject: types.GenerateVideosOperation): Record; +diff --git a/dist/web/src/cross/_cross_error.d.ts b/dist/web/src/cross/_cross_error.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..d74c1c8d6dc211bbc9e99c0cd3ed5460be5ee611 +--- /dev/null ++++ b/dist/web/src/cross/_cross_error.d.ts +@@ -0,0 +1,6 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++export declare function crossError(): Error; +diff --git a/dist/web/src/cross/_cross_uploader.d.ts b/dist/web/src/cross/_cross_uploader.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..fa7423bdf25d94b69408076c96bfcfd0310546a2 +--- /dev/null ++++ b/dist/web/src/cross/_cross_uploader.d.ts +@@ -0,0 +1,15 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import { FileStat, Uploader } from '../_uploader'; ++import { File } from '../types'; ++export declare const MAX_CHUNK_SIZE: number; ++export declare class CrossUploader implements Uploader { ++ upload(file: string | Blob, uploadUrl: string, apiClient: ApiClient): Promise; ++ stat(file: string | Blob): Promise; ++} ++export declare function uploadBlob(file: Blob, uploadUrl: string, apiClient: ApiClient): Promise; ++export declare function getBlobStat(file: Blob): Promise; +diff --git a/dist/web/src/cross/_cross_websocket.d.ts b/dist/web/src/cross/_cross_websocket.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..d3a0532b85c77d512dfc717e7adb591579e985a8 +--- /dev/null ++++ b/dist/web/src/cross/_cross_websocket.d.ts +@@ -0,0 +1,9 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { WebSocketCallbacks, WebSocketFactory, WebSocket as Ws } from '../_websocket'; ++export declare class CrossWebSocketFactory implements WebSocketFactory { ++ create(url: string, headers: Record, callbacks: WebSocketCallbacks): Ws; ++} +diff --git a/dist/web/src/files.d.ts b/dist/web/src/files.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..326a8bc473ea971f46bf687f158416121a7d8d91 +--- /dev/null ++++ b/dist/web/src/files.d.ts +@@ -0,0 +1,107 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from './_api_client'; ++import { BaseModule } from './_common'; ++import { Pager } from './pagers'; ++import * as types from './types'; ++export declare class Files extends BaseModule { ++ private readonly apiClient; ++ constructor(apiClient: ApiClient); ++ /** ++ * Lists all current project files from the service. ++ * ++ * @param params - The parameters for the list request ++ * @return The paginated results of the list of files ++ * ++ * @example ++ * The following code prints the names of all files from the service, the ++ * size of each page is 10. ++ * ++ * ```ts ++ * const listResponse = await ai.files.list({config: {'pageSize': 10}}); ++ * for await (const file of listResponse) { ++ * console.log(file.name); ++ * } ++ * ``` ++ */ ++ list: (params?: types.ListFilesParameters) => Promise>; ++ /** ++ * Uploads a file asynchronously to the Gemini API. ++ * This method is not available in Vertex AI. ++ * Supported upload sources: ++ * - Node.js: File path (string) or Blob object. ++ * - Browser: Blob object (e.g., File). ++ * ++ * @remarks ++ * The `mimeType` can be specified in the `config` parameter. If omitted: ++ * - For file path (string) inputs, the `mimeType` will be inferred from the ++ * file extension. ++ * - For Blob object inputs, the `mimeType` will be set to the Blob's `type` ++ * property. ++ * Somex eamples for file extension to mimeType mapping: ++ * .txt -> text/plain ++ * .json -> application/json ++ * .jpg -> image/jpeg ++ * .png -> image/png ++ * .mp3 -> audio/mpeg ++ * .mp4 -> video/mp4 ++ * ++ * This section can contain multiple paragraphs and code examples. ++ * ++ * @param params - Optional parameters specified in the ++ * `types.UploadFileParameters` interface. ++ * @see {@link types.UploadFileParameters#config} for the optional ++ * config in the parameters. ++ * @return A promise that resolves to a `types.File` object. ++ * @throws An error if called on a Vertex AI client. ++ * @throws An error if the `mimeType` is not provided and can not be inferred, ++ * the `mimeType` can be provided in the `params.config` parameter. ++ * @throws An error occurs if a suitable upload location cannot be established. ++ * ++ * @example ++ * The following code uploads a file to Gemini API. ++ * ++ * ```ts ++ * const file = await ai.files.upload({file: 'file.txt', config: { ++ * mimeType: 'text/plain', ++ * }}); ++ * console.log(file.name); ++ * ``` ++ */ ++ upload(params: types.UploadFileParameters): Promise; ++ private listInternal; ++ private createInternal; ++ /** ++ * Retrieves the file information from the service. ++ * ++ * @param params - The parameters for the get request ++ * @return The Promise that resolves to the types.File object requested. ++ * ++ * @example ++ * ```ts ++ * const config: GetFileParameters = { ++ * name: fileName, ++ * }; ++ * file = await ai.files.get(config); ++ * console.log(file.name); ++ * ``` ++ */ ++ get(params: types.GetFileParameters): Promise; ++ /** ++ * Deletes a remotely stored file. ++ * ++ * @param params - The parameters for the delete request. ++ * @return The DeleteFileResponse, the response for the delete method. ++ * ++ * @example ++ * The following code deletes an example file named "files/mehozpxf877d". ++ * ++ * ```ts ++ * await ai.files.delete({name: file.name}); ++ * ``` ++ */ ++ delete(params: types.DeleteFileParameters): Promise; ++} +diff --git a/dist/web/src/index.d.ts b/dist/web/src/index.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..ec347c72b2137135de417c16bbf1dff55e05e5c1 +--- /dev/null ++++ b/dist/web/src/index.d.ts +@@ -0,0 +1,14 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++export * from './caches'; ++export * from './chats'; ++export { GoogleGenAI, GoogleGenAIOptions } from './client'; ++export { Files } from './files'; ++export * from './live'; ++export { Models } from './models'; ++export { Operations } from './operations'; ++export { PagedItem, Pager } from './pagers'; ++export * from './types'; +diff --git a/dist/web/src/live.d.ts b/dist/web/src/live.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..a34c163ddba7cca84ab471ef8376c754035ad4fb +--- /dev/null ++++ b/dist/web/src/live.d.ts +@@ -0,0 +1,193 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++/** ++ * Live client. ++ * ++ * @experimental ++ */ ++import { ApiClient } from './_api_client'; ++import { Auth } from './_auth'; ++import { WebSocket, WebSocketFactory } from './_websocket'; ++import * as types from './types'; ++/** ++ Live class encapsulates the configuration for live interaction with the ++ Generative Language API. It embeds ApiClient for general API settings. ++ ++ @experimental ++ */ ++export declare class Live { ++ private readonly apiClient; ++ private readonly auth; ++ private readonly webSocketFactory; ++ constructor(apiClient: ApiClient, auth: Auth, webSocketFactory: WebSocketFactory); ++ /** ++ Establishes a connection to the specified model with the given ++ configuration and returns a Session object representing that connection. ++ ++ @experimental ++ ++ @remarks ++ ++ @param params - The parameters for establishing a connection to the model. ++ @return A live session. ++ ++ @example ++ ```ts ++ let model: string; ++ if (GOOGLE_GENAI_USE_VERTEXAI) { ++ model = 'gemini-2.0-flash-live-preview-04-09'; ++ } else { ++ model = 'gemini-2.0-flash-live-001'; ++ } ++ const session = await ai.live.connect({ ++ model: model, ++ config: { ++ responseModalities: [Modality.AUDIO], ++ }, ++ callbacks: { ++ onopen: () => { ++ console.log('Connected to the socket.'); ++ }, ++ onmessage: (e: MessageEvent) => { ++ console.log('Received message from the server: %s\n', debug(e.data)); ++ }, ++ onerror: (e: ErrorEvent) => { ++ console.log('Error occurred: %s\n', debug(e.error)); ++ }, ++ onclose: (e: CloseEvent) => { ++ console.log('Connection closed.'); ++ }, ++ }, ++ }); ++ ``` ++ */ ++ connect(params: types.LiveConnectParameters): Promise; ++} ++/** ++ Represents a connection to the API. ++ ++ @experimental ++ */ ++export declare class Session { ++ readonly conn: WebSocket; ++ private readonly apiClient; ++ constructor(conn: WebSocket, apiClient: ApiClient); ++ private tLiveClientContent; ++ private tLiveClientRealtimeInput; ++ private tLiveClienttToolResponse; ++ /** ++ Send a message over the established connection. ++ ++ @param params - Contains two **optional** properties, `turns` and ++ `turnComplete`. ++ ++ - `turns` will be converted to a `Content[]` ++ - `turnComplete: true` [default] indicates that you are done sending ++ content and expect a response. If `turnComplete: false`, the server ++ will wait for additional messages before starting generation. ++ ++ @experimental ++ ++ @remarks ++ There are two ways to send messages to the live API: ++ `sendClientContent` and `sendRealtimeInput`. ++ ++ `sendClientContent` messages are added to the model context **in order**. ++ Having a conversation using `sendClientContent` messages is roughly ++ equivalent to using the `Chat.sendMessageStream`, except that the state of ++ the `chat` history is stored on the API server instead of locally. ++ ++ Because of `sendClientContent`'s order guarantee, the model cannot respons ++ as quickly to `sendClientContent` messages as to `sendRealtimeInput` ++ messages. This makes the biggest difference when sending objects that have ++ significant preprocessing time (typically images). ++ ++ The `sendClientContent` message sends a `Content[]` ++ which has more options than the `Blob` sent by `sendRealtimeInput`. ++ ++ So the main use-cases for `sendClientContent` over `sendRealtimeInput` are: ++ ++ - Sending anything that can't be represented as a `Blob` (text, ++ `sendClientContent({turns="Hello?"}`)). ++ - Managing turns when not using audio input and voice activity detection. ++ (`sendClientContent({turnComplete:true})` or the short form ++ `sendClientContent()`) ++ - Prefilling a conversation context ++ ``` ++ sendClientContent({ ++ turns: [ ++ Content({role:user, parts:...}), ++ Content({role:user, parts:...}), ++ ... ++ ] ++ }) ++ ``` ++ @experimental ++ */ ++ sendClientContent(params: types.LiveSendClientContentParameters): void; ++ /** ++ Send a realtime message over the established connection. ++ ++ @param params - Contains one property, `media`. ++ ++ - `media` will be converted to a `Blob` ++ ++ @experimental ++ ++ @remarks ++ Use `sendRealtimeInput` for realtime audio chunks and video frames (images). ++ ++ With `sendRealtimeInput` the api will respond to audio automatically ++ based on voice activity detection (VAD). ++ ++ `sendRealtimeInput` is optimized for responsivness at the expense of ++ deterministic ordering guarantees. Audio and video tokens are to the ++ context when they become available. ++ ++ Note: The Call signature expects a `Blob` object, but only a subset ++ of audio and image mimetypes are allowed. ++ */ ++ sendRealtimeInput(params: types.LiveSendRealtimeInputParameters): void; ++ /** ++ Send a function response message over the established connection. ++ ++ @param params - Contains property `functionResponses`. ++ ++ - `functionResponses` will be converted to a `functionResponses[]` ++ ++ @remarks ++ Use `sendFunctionResponse` to reply to `LiveServerToolCall` from the server. ++ ++ Use {@link types.LiveConnectConfig#tools} to configure the callable functions. ++ ++ @experimental ++ */ ++ sendToolResponse(params: types.LiveSendToolResponseParameters): void; ++ /** ++ Terminates the WebSocket connection. ++ ++ @experimental ++ ++ @example ++ ```ts ++ let model: string; ++ if (GOOGLE_GENAI_USE_VERTEXAI) { ++ model = 'gemini-2.0-flash-live-preview-04-09'; ++ } else { ++ model = 'gemini-2.0-flash-live-001'; ++ } ++ const session = await ai.live.connect({ ++ model: model, ++ config: { ++ responseModalities: [Modality.AUDIO], ++ } ++ }); ++ ++ session.close(); ++ ``` ++ */ ++ close(): void; ++} +diff --git a/dist/web/src/models.d.ts b/dist/web/src/models.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..b522f982b69c8e86b179802a672b61bdb99de804 +--- /dev/null ++++ b/dist/web/src/models.d.ts +@@ -0,0 +1,228 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from './_api_client'; ++import { BaseModule } from './_common'; ++import * as types from './types'; ++export declare class Models extends BaseModule { ++ private readonly apiClient; ++ constructor(apiClient: ApiClient); ++ /** ++ * Makes an API request to generate content with a given model. ++ * ++ * For the `model` parameter, supported formats for Vertex AI API include: ++ * - The Gemini model ID, for example: 'gemini-2.0-flash' ++ * - The full resource name starts with 'projects/', for example: ++ * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash' ++ * - The partial resource name with 'publishers/', for example: ++ * 'publishers/google/models/gemini-2.0-flash' or ++ * 'publishers/meta/models/llama-3.1-405b-instruct-maas' ++ * - `/` separated publisher and model name, for example: ++ * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas' ++ * ++ * For the `model` parameter, supported formats for Gemini API include: ++ * - The Gemini model ID, for example: 'gemini-2.0-flash' ++ * - The model name starts with 'models/', for example: ++ * 'models/gemini-2.0-flash' ++ * - For tuned models, the model name starts with 'tunedModels/', ++ * for example: ++ * 'tunedModels/1234567890123456789' ++ * ++ * Some models support multimodal input and output. ++ * ++ * @param params - The parameters for generating content. ++ * @return The response from generating content. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.generateContent({ ++ * model: 'gemini-2.0-flash', ++ * contents: 'why is the sky blue?', ++ * config: { ++ * candidateCount: 2, ++ * } ++ * }); ++ * console.log(response); ++ * ``` ++ */ ++ generateContent: (params: types.GenerateContentParameters) => Promise; ++ /** ++ * Makes an API request to generate content with a given model and yields the ++ * response in chunks. ++ * ++ * For the `model` parameter, supported formats for Vertex AI API include: ++ * - The Gemini model ID, for example: 'gemini-2.0-flash' ++ * - The full resource name starts with 'projects/', for example: ++ * 'projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash' ++ * - The partial resource name with 'publishers/', for example: ++ * 'publishers/google/models/gemini-2.0-flash' or ++ * 'publishers/meta/models/llama-3.1-405b-instruct-maas' ++ * - `/` separated publisher and model name, for example: ++ * 'google/gemini-2.0-flash' or 'meta/llama-3.1-405b-instruct-maas' ++ * ++ * For the `model` parameter, supported formats for Gemini API include: ++ * - The Gemini model ID, for example: 'gemini-2.0-flash' ++ * - The model name starts with 'models/', for example: ++ * 'models/gemini-2.0-flash' ++ * - For tuned models, the model name starts with 'tunedModels/', ++ * for example: ++ * 'tunedModels/1234567890123456789' ++ * ++ * Some models support multimodal input and output. ++ * ++ * @param params - The parameters for generating content with streaming response. ++ * @return The response from generating content. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.generateContentStream({ ++ * model: 'gemini-2.0-flash', ++ * contents: 'why is the sky blue?', ++ * config: { ++ * maxOutputTokens: 200, ++ * } ++ * }); ++ * for await (const chunk of response) { ++ * console.log(chunk); ++ * } ++ * ``` ++ */ ++ generateContentStream: (params: types.GenerateContentParameters) => Promise>; ++ /** ++ * Generates an image based on a text description and configuration. ++ * ++ * @param model - The model to use. ++ * @param prompt - A text description of the image to generate. ++ * @param [config] - The config for image generation. ++ * @return The response from the API. ++ * ++ * @example ++ * ```ts ++ * const response = await client.models.generateImages({ ++ * model: 'imagen-3.0-generate-002', ++ * prompt: 'Robot holding a red skateboard', ++ * config: { ++ * numberOfImages: 1, ++ * includeRaiReason: true, ++ * }, ++ * }); ++ * console.log(response?.generatedImages?.[0]?.image?.imageBytes); ++ * ``` ++ */ ++ generateImages: (params: types.GenerateImagesParameters) => Promise; ++ private generateContentInternal; ++ private generateContentStreamInternal; ++ /** ++ * Calculates embeddings for the given contents. Only text is supported. ++ * ++ * @param params - The parameters for embedding contents. ++ * @return The response from the API. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.embedContent({ ++ * model: 'text-embedding-004', ++ * contents: [ ++ * 'What is your name?', ++ * 'What is your favorite color?', ++ * ], ++ * config: { ++ * outputDimensionality: 64, ++ * }, ++ * }); ++ * console.log(response); ++ * ``` ++ */ ++ embedContent(params: types.EmbedContentParameters): Promise; ++ /** ++ * Generates an image based on a text description and configuration. ++ * ++ * @param params - The parameters for generating images. ++ * @return The response from the API. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.generateImages({ ++ * model: 'imagen-3.0-generate-002', ++ * prompt: 'Robot holding a red skateboard', ++ * config: { ++ * numberOfImages: 1, ++ * includeRaiReason: true, ++ * }, ++ * }); ++ * console.log(response?.generatedImages?.[0]?.image?.imageBytes); ++ * ``` ++ */ ++ private generateImagesInternal; ++ /** ++ * Fetches information about a model by name. ++ * ++ * @example ++ * ```ts ++ * const modelInfo = await ai.models.get({model: 'gemini-2.0-flash'}); ++ * ``` ++ */ ++ get(params: types.GetModelParameters): Promise; ++ /** ++ * Counts the number of tokens in the given contents. Multimodal input is ++ * supported for Gemini models. ++ * ++ * @param params - The parameters for counting tokens. ++ * @return The response from the API. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.countTokens({ ++ * model: 'gemini-2.0-flash', ++ * contents: 'The quick brown fox jumps over the lazy dog.' ++ * }); ++ * console.log(response); ++ * ``` ++ */ ++ countTokens(params: types.CountTokensParameters): Promise; ++ /** ++ * Given a list of contents, returns a corresponding TokensInfo containing ++ * the list of tokens and list of token ids. ++ * ++ * This method is not supported by the Gemini Developer API. ++ * ++ * @param params - The parameters for computing tokens. ++ * @return The response from the API. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.computeTokens({ ++ * model: 'gemini-2.0-flash', ++ * contents: 'What is your name?' ++ * }); ++ * console.log(response); ++ * ``` ++ */ ++ computeTokens(params: types.ComputeTokensParameters): Promise; ++ /** ++ * Generates videos based on a text description and configuration. ++ * ++ * @param params - The parameters for generating videos. ++ * @return A Promise which allows you to track the progress and eventually retrieve the generated videos using the operations.get method. ++ * ++ * @example ++ * ```ts ++ * const operation = await ai.models.generateVideos({ ++ * model: 'veo-2.0-generate-001', ++ * prompt: 'A neon hologram of a cat driving at top speed', ++ * config: { ++ * numberOfVideos: 1 ++ * }); ++ * ++ * while (!operation.done) { ++ * await new Promise(resolve => setTimeout(resolve, 10000)); ++ * operation = await ai.operations.getVideosOperation({operation: operation}); ++ * } ++ * ++ * console.log(operation.response?.generatedVideos?.[0]?.video?.uri); ++ * ``` ++ */ ++ generateVideos(params: types.GenerateVideosParameters): Promise; ++} +diff --git a/dist/web/src/node/_node_auth.d.ts b/dist/web/src/node/_node_auth.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..a7f568233f3e259b9d8bf75f6eac6e8f872cb3e3 +--- /dev/null ++++ b/dist/web/src/node/_node_auth.d.ts +@@ -0,0 +1,29 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { GoogleAuthOptions } from 'google-auth-library'; ++import { Auth } from '../_auth'; ++export declare const GOOGLE_API_KEY_HEADER = "x-goog-api-key"; ++export interface NodeAuthOptions { ++ /** ++ * The API Key. This is required for Gemini API users. ++ */ ++ apiKey?: string; ++ /** ++ * Optional. These are the authentication options provided by google-auth-library for Vertex AI users. ++ * Complete list of authentication options are documented in the ++ * GoogleAuthOptions interface: ++ * https://github.com/googleapis/google-auth-library-nodejs/blob/main/src/auth/googleauth.ts. ++ */ ++ googleAuthOptions?: GoogleAuthOptions; ++} ++export declare class NodeAuth implements Auth { ++ private readonly googleAuth?; ++ private readonly apiKey?; ++ constructor(opts: NodeAuthOptions); ++ addAuthHeaders(headers: Headers): Promise; ++ private addKeyHeader; ++ private addGoogleAuthHeaders; ++} +diff --git a/dist/web/src/node/_node_uploader.d.ts b/dist/web/src/node/_node_uploader.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..844e9ed4f67f561d04fe65af9a954ed5e325665f +--- /dev/null ++++ b/dist/web/src/node/_node_uploader.d.ts +@@ -0,0 +1,15 @@ ++import { ApiClient } from '../_api_client'; ++import { FileStat, Uploader } from '../_uploader'; ++import { File } from '../types'; ++export declare class NodeUploader implements Uploader { ++ stat(file: string | Blob): Promise; ++ upload(file: string | Blob, uploadUrl: string, apiClient: ApiClient): Promise; ++ /** ++ * Infers the MIME type of a file based on its extension. ++ * ++ * @param filePath The path to the file. ++ * @returns The MIME type of the file, or undefined if it cannot be inferred. ++ */ ++ private inferMimeType; ++ private uploadFileFromPath; ++} +diff --git a/dist/web/src/node/_node_websocket.d.ts b/dist/web/src/node/_node_websocket.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..93fcf40047ea0aea656afaf80992e90b62051b7e +--- /dev/null ++++ b/dist/web/src/node/_node_websocket.d.ts +@@ -0,0 +1,19 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { WebSocket, WebSocketCallbacks, WebSocketFactory } from '../_websocket'; ++export declare class NodeWebSocketFactory implements WebSocketFactory { ++ create(url: string, headers: Record, callbacks: WebSocketCallbacks): WebSocket; ++} ++export declare class NodeWebSocket implements WebSocket { ++ private readonly url; ++ private readonly headers; ++ private readonly callbacks; ++ private ws?; ++ constructor(url: string, headers: Record, callbacks: WebSocketCallbacks); ++ connect(): void; ++ send(message: string): void; ++ close(): void; ++} +diff --git a/dist/web/src/node/index.d.ts b/dist/web/src/node/index.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..07cfb97fcdf382d38a46cab34bd0bababde4b720 +--- /dev/null ++++ b/dist/web/src/node/index.d.ts +@@ -0,0 +1,15 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++export * from '../caches'; ++export * from '../chats'; ++export { GoogleGenAIOptions } from '../client'; ++export { Files } from '../files'; ++export * from '../live'; ++export { Models } from '../models'; ++export { Operations } from '../operations'; ++export { PagedItem, Pager } from '../pagers'; ++export * from '../types'; ++export * from './node_client'; +diff --git a/dist/web/src/node/node_client.d.ts b/dist/web/src/node/node_client.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..e4be6ea06cff9a10955bcf9e242d07b448ab21de +--- /dev/null ++++ b/dist/web/src/node/node_client.d.ts +@@ -0,0 +1,69 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import { Caches } from '../caches'; ++import { Chats } from '../chats'; ++import { GoogleGenAIOptions } from '../client'; ++import { Files } from '../files'; ++import { Live } from '../live'; ++import { Models } from '../models'; ++import { Operations } from '../operations'; ++/** ++ * The Google GenAI SDK. ++ * ++ * @remarks ++ * Provides access to the GenAI features through either the {@link ++ * https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API} or ++ * the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI ++ * API}. ++ * ++ * The {@link GoogleGenAIOptions.vertexai} value determines which of the API ++ * services to use. ++ * ++ * When using the Gemini API, a {@link GoogleGenAIOptions.apiKey} must also be ++ * set. When using Vertex AI, both {@link GoogleGenAIOptions.project} and {@link ++ * GoogleGenAIOptions.location} must be set, or a {@link ++ * GoogleGenAIOptions.apiKey} must be set when using Express Mode. ++ * ++ * Explicitly passed in values in {@link GoogleGenAIOptions} will always take ++ * precedence over environment variables. If both project/location and api_key ++ * exist in the environment variables, the project/location will be used. ++ * ++ * @example ++ * Initializing the SDK for using the Gemini API: ++ * ```ts ++ * import {GoogleGenAI} from '@google/genai'; ++ * const ai = new GoogleGenAI({apiKey: 'GEMINI_API_KEY'}); ++ * ``` ++ * ++ * @example ++ * Initializing the SDK for using the Vertex AI API: ++ * ```ts ++ * import {GoogleGenAI} from '@google/genai'; ++ * const ai = new GoogleGenAI({ ++ * vertexai: true, ++ * project: 'PROJECT_ID', ++ * location: 'PROJECT_LOCATION' ++ * }); ++ * ``` ++ * ++ */ ++export declare class GoogleGenAI { ++ protected readonly apiClient: ApiClient; ++ private readonly apiKey?; ++ readonly vertexai: boolean; ++ private readonly googleAuthOptions?; ++ private readonly project?; ++ private readonly location?; ++ private readonly apiVersion?; ++ readonly models: Models; ++ readonly live: Live; ++ readonly chats: Chats; ++ readonly caches: Caches; ++ readonly files: Files; ++ readonly operations: Operations; ++ constructor(options: GoogleGenAIOptions); ++} +diff --git a/dist/web/src/operations.d.ts b/dist/web/src/operations.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..c5a50188569e8819405f88440c00d138b391bc19 +--- /dev/null ++++ b/dist/web/src/operations.d.ts +@@ -0,0 +1,21 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from './_api_client'; ++import { BaseModule } from './_common'; ++import * as types from './types'; ++export declare class Operations extends BaseModule { ++ private readonly apiClient; ++ constructor(apiClient: ApiClient); ++ /** ++ * Gets the status of a long-running operation. ++ * ++ * @param parameters The parameters for the get operation request. ++ * @return The updated Operation object, with the latest status or result. ++ */ ++ getVideosOperation(parameters: types.OperationGetParameters): Promise; ++ private getVideosOperationInternal; ++ private fetchPredictVideosOperationInternal; ++} +diff --git a/dist/web/src/pagers.d.ts b/dist/web/src/pagers.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..8c26d3b985a4ed47fcae0c63e6b1efc55dab0b52 +--- /dev/null ++++ b/dist/web/src/pagers.d.ts +@@ -0,0 +1,124 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++/** ++ * Pagers for the GenAI List APIs. ++ */ ++export declare enum PagedItem { ++ PAGED_ITEM_BATCH_JOBS = "batchJobs", ++ PAGED_ITEM_MODELS = "models", ++ PAGED_ITEM_TUNING_JOBS = "tuningJobs", ++ PAGED_ITEM_FILES = "files", ++ PAGED_ITEM_CACHED_CONTENTS = "cachedContents" ++} ++interface PagedItemConfig { ++ config?: { ++ pageToken?: string; ++ pageSize?: number; ++ }; ++} ++interface PagedItemResponse { ++ nextPageToken?: string; ++ batchJobs?: T[]; ++ models?: T[]; ++ tuningJobs?: T[]; ++ files?: T[]; ++ cachedContents?: T[]; ++} ++/** ++ * Pager class for iterating through paginated results. ++ */ ++export declare class Pager implements AsyncIterable { ++ private nameInternal; ++ private pageInternal; ++ private paramsInternal; ++ private pageInternalSize; ++ protected requestInternal: (params: PagedItemConfig) => Promise>; ++ protected idxInternal: number; ++ constructor(name: PagedItem, request: (params: PagedItemConfig) => Promise>, response: PagedItemResponse, params: PagedItemConfig); ++ private init; ++ private initNextPage; ++ /** ++ * Returns the current page, which is a list of items. ++ * ++ * @remarks ++ * The first page is retrieved when the pager is created. The returned list of ++ * items could be a subset of the entire list. ++ */ ++ get page(): T[]; ++ /** ++ * Returns the type of paged item (for example, ``batch_jobs``). ++ */ ++ get name(): PagedItem; ++ /** ++ * Returns the length of the page fetched each time by this pager. ++ * ++ * @remarks ++ * The number of items in the page is less than or equal to the page length. ++ */ ++ get pageSize(): number; ++ /** ++ * Returns the parameters when making the API request for the next page. ++ * ++ * @remarks ++ * Parameters contain a set of optional configs that can be ++ * used to customize the API request. For example, the `pageToken` parameter ++ * contains the token to request the next page. ++ */ ++ get params(): PagedItemConfig; ++ /** ++ * Returns the total number of items in the current page. ++ */ ++ get pageLength(): number; ++ /** ++ * Returns the item at the given index. ++ */ ++ getItem(index: number): T; ++ /** ++ * Returns an async iterator that support iterating through all items ++ * retrieved from the API. ++ * ++ * @remarks ++ * The iterator will automatically fetch the next page if there are more items ++ * to fetch from the API. ++ * ++ * @example ++ * ++ * ```ts ++ * const pager = await ai.files.list({config: {pageSize: 10}}); ++ * for await (const file of pager) { ++ * console.log(file.name); ++ * } ++ * ``` ++ */ ++ [Symbol.asyncIterator](): AsyncIterator; ++ /** ++ * Fetches the next page of items. This makes a new API request. ++ * ++ * @throws {Error} If there are no more pages to fetch. ++ * ++ * @example ++ * ++ * ```ts ++ * const pager = await ai.files.list({config: {pageSize: 10}}); ++ * let page = pager.page; ++ * while (true) { ++ * for (const file of page) { ++ * console.log(file.name); ++ * } ++ * if (!pager.hasNextPage()) { ++ * break; ++ * } ++ * page = await pager.nextPage(); ++ * } ++ * ``` ++ */ ++ nextPage(): Promise; ++ /** ++ * Returns true if there are more pages to fetch from the API. ++ */ ++ hasNextPage(): boolean; ++} ++export {}; +diff --git a/dist/web/src/schema_helper.d.ts b/dist/web/src/schema_helper.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..b6a875ec8ca1530964075663d3a338edb2c0204d +--- /dev/null ++++ b/dist/web/src/schema_helper.d.ts +@@ -0,0 +1,8 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { z } from 'zod'; ++import { Schema } from './types'; ++export declare function zodToGoogleGenAISchema(isVertexAI: boolean, schema: z.ZodObject): Schema; +diff --git a/dist/web/src/types.d.ts b/dist/web/src/types.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..ef6f1c16b1fd1e43ff796dc1e3b209450ff8bd18 +--- /dev/null ++++ b/dist/web/src/types.d.ts +@@ -0,0 +1,2425 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++/** Required. Outcome of the code execution. */ ++export declare enum Outcome { ++ OUTCOME_UNSPECIFIED = "OUTCOME_UNSPECIFIED", ++ OUTCOME_OK = "OUTCOME_OK", ++ OUTCOME_FAILED = "OUTCOME_FAILED", ++ OUTCOME_DEADLINE_EXCEEDED = "OUTCOME_DEADLINE_EXCEEDED" ++} ++/** Required. Programming language of the `code`. */ ++export declare enum Language { ++ LANGUAGE_UNSPECIFIED = "LANGUAGE_UNSPECIFIED", ++ PYTHON = "PYTHON" ++} ++/** Optional. The type of the data. */ ++export declare enum Type { ++ TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED", ++ STRING = "STRING", ++ NUMBER = "NUMBER", ++ INTEGER = "INTEGER", ++ BOOLEAN = "BOOLEAN", ++ ARRAY = "ARRAY", ++ OBJECT = "OBJECT" ++} ++/** Required. Harm category. */ ++export declare enum HarmCategory { ++ HARM_CATEGORY_UNSPECIFIED = "HARM_CATEGORY_UNSPECIFIED", ++ HARM_CATEGORY_HATE_SPEECH = "HARM_CATEGORY_HATE_SPEECH", ++ HARM_CATEGORY_DANGEROUS_CONTENT = "HARM_CATEGORY_DANGEROUS_CONTENT", ++ HARM_CATEGORY_HARASSMENT = "HARM_CATEGORY_HARASSMENT", ++ HARM_CATEGORY_SEXUALLY_EXPLICIT = "HARM_CATEGORY_SEXUALLY_EXPLICIT", ++ HARM_CATEGORY_CIVIC_INTEGRITY = "HARM_CATEGORY_CIVIC_INTEGRITY" ++} ++/** Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. */ ++export declare enum HarmBlockMethod { ++ HARM_BLOCK_METHOD_UNSPECIFIED = "HARM_BLOCK_METHOD_UNSPECIFIED", ++ SEVERITY = "SEVERITY", ++ PROBABILITY = "PROBABILITY" ++} ++/** Required. The harm block threshold. */ ++export declare enum HarmBlockThreshold { ++ HARM_BLOCK_THRESHOLD_UNSPECIFIED = "HARM_BLOCK_THRESHOLD_UNSPECIFIED", ++ BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE", ++ BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE", ++ BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH", ++ BLOCK_NONE = "BLOCK_NONE", ++ OFF = "OFF" ++} ++/** The mode of the predictor to be used in dynamic retrieval. */ ++export declare enum Mode { ++ MODE_UNSPECIFIED = "MODE_UNSPECIFIED", ++ MODE_DYNAMIC = "MODE_DYNAMIC" ++} ++/** Output only. The reason why the model stopped generating tokens. ++ ++ If empty, the model has not stopped generating the tokens. ++ */ ++export declare enum FinishReason { ++ FINISH_REASON_UNSPECIFIED = "FINISH_REASON_UNSPECIFIED", ++ STOP = "STOP", ++ MAX_TOKENS = "MAX_TOKENS", ++ SAFETY = "SAFETY", ++ RECITATION = "RECITATION", ++ OTHER = "OTHER", ++ BLOCKLIST = "BLOCKLIST", ++ PROHIBITED_CONTENT = "PROHIBITED_CONTENT", ++ SPII = "SPII", ++ MALFORMED_FUNCTION_CALL = "MALFORMED_FUNCTION_CALL", ++ IMAGE_SAFETY = "IMAGE_SAFETY" ++} ++/** Output only. Harm probability levels in the content. */ ++export declare enum HarmProbability { ++ HARM_PROBABILITY_UNSPECIFIED = "HARM_PROBABILITY_UNSPECIFIED", ++ NEGLIGIBLE = "NEGLIGIBLE", ++ LOW = "LOW", ++ MEDIUM = "MEDIUM", ++ HIGH = "HIGH" ++} ++/** Output only. Harm severity levels in the content. */ ++export declare enum HarmSeverity { ++ HARM_SEVERITY_UNSPECIFIED = "HARM_SEVERITY_UNSPECIFIED", ++ HARM_SEVERITY_NEGLIGIBLE = "HARM_SEVERITY_NEGLIGIBLE", ++ HARM_SEVERITY_LOW = "HARM_SEVERITY_LOW", ++ HARM_SEVERITY_MEDIUM = "HARM_SEVERITY_MEDIUM", ++ HARM_SEVERITY_HIGH = "HARM_SEVERITY_HIGH" ++} ++/** Output only. Blocked reason. */ ++export declare enum BlockedReason { ++ BLOCKED_REASON_UNSPECIFIED = "BLOCKED_REASON_UNSPECIFIED", ++ SAFETY = "SAFETY", ++ OTHER = "OTHER", ++ BLOCKLIST = "BLOCKLIST", ++ PROHIBITED_CONTENT = "PROHIBITED_CONTENT" ++} ++/** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */ ++export declare enum TrafficType { ++ TRAFFIC_TYPE_UNSPECIFIED = "TRAFFIC_TYPE_UNSPECIFIED", ++ ON_DEMAND = "ON_DEMAND", ++ PROVISIONED_THROUGHPUT = "PROVISIONED_THROUGHPUT" ++} ++/** Server content modalities. */ ++export declare enum Modality { ++ MODALITY_UNSPECIFIED = "MODALITY_UNSPECIFIED", ++ TEXT = "TEXT", ++ IMAGE = "IMAGE", ++ AUDIO = "AUDIO" ++} ++/** The media resolution to use. */ ++export declare enum MediaResolution { ++ MEDIA_RESOLUTION_UNSPECIFIED = "MEDIA_RESOLUTION_UNSPECIFIED", ++ MEDIA_RESOLUTION_LOW = "MEDIA_RESOLUTION_LOW", ++ MEDIA_RESOLUTION_MEDIUM = "MEDIA_RESOLUTION_MEDIUM", ++ MEDIA_RESOLUTION_HIGH = "MEDIA_RESOLUTION_HIGH" ++} ++/** Options for feature selection preference. */ ++export declare enum FeatureSelectionPreference { ++ FEATURE_SELECTION_PREFERENCE_UNSPECIFIED = "FEATURE_SELECTION_PREFERENCE_UNSPECIFIED", ++ PRIORITIZE_QUALITY = "PRIORITIZE_QUALITY", ++ BALANCED = "BALANCED", ++ PRIORITIZE_COST = "PRIORITIZE_COST" ++} ++/** Config for the dynamic retrieval config mode. */ ++export declare enum DynamicRetrievalConfigMode { ++ MODE_UNSPECIFIED = "MODE_UNSPECIFIED", ++ MODE_DYNAMIC = "MODE_DYNAMIC" ++} ++/** Config for the function calling config mode. */ ++export declare enum FunctionCallingConfigMode { ++ MODE_UNSPECIFIED = "MODE_UNSPECIFIED", ++ AUTO = "AUTO", ++ ANY = "ANY", ++ NONE = "NONE" ++} ++/** Enum that controls the safety filter level for objectionable content. */ ++export declare enum SafetyFilterLevel { ++ BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE", ++ BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE", ++ BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH", ++ BLOCK_NONE = "BLOCK_NONE" ++} ++/** Enum that controls the generation of people. */ ++export declare enum PersonGeneration { ++ DONT_ALLOW = "DONT_ALLOW", ++ ALLOW_ADULT = "ALLOW_ADULT", ++ ALLOW_ALL = "ALLOW_ALL" ++} ++/** Enum that specifies the language of the text in the prompt. */ ++export declare enum ImagePromptLanguage { ++ auto = "auto", ++ en = "en", ++ ja = "ja", ++ ko = "ko", ++ hi = "hi" ++} ++/** State for the lifecycle of a File. */ ++export declare enum FileState { ++ STATE_UNSPECIFIED = "STATE_UNSPECIFIED", ++ PROCESSING = "PROCESSING", ++ ACTIVE = "ACTIVE", ++ FAILED = "FAILED" ++} ++/** Source of the File. */ ++export declare enum FileSource { ++ SOURCE_UNSPECIFIED = "SOURCE_UNSPECIFIED", ++ UPLOADED = "UPLOADED", ++ GENERATED = "GENERATED" ++} ++/** Enum representing the mask mode of a mask reference image. */ ++export declare enum MaskReferenceMode { ++ MASK_MODE_DEFAULT = "MASK_MODE_DEFAULT", ++ MASK_MODE_USER_PROVIDED = "MASK_MODE_USER_PROVIDED", ++ MASK_MODE_BACKGROUND = "MASK_MODE_BACKGROUND", ++ MASK_MODE_FOREGROUND = "MASK_MODE_FOREGROUND", ++ MASK_MODE_SEMANTIC = "MASK_MODE_SEMANTIC" ++} ++/** Enum representing the control type of a control reference image. */ ++export declare enum ControlReferenceType { ++ CONTROL_TYPE_DEFAULT = "CONTROL_TYPE_DEFAULT", ++ CONTROL_TYPE_CANNY = "CONTROL_TYPE_CANNY", ++ CONTROL_TYPE_SCRIBBLE = "CONTROL_TYPE_SCRIBBLE", ++ CONTROL_TYPE_FACE_MESH = "CONTROL_TYPE_FACE_MESH" ++} ++/** Enum representing the subject type of a subject reference image. */ ++export declare enum SubjectReferenceType { ++ SUBJECT_TYPE_DEFAULT = "SUBJECT_TYPE_DEFAULT", ++ SUBJECT_TYPE_PERSON = "SUBJECT_TYPE_PERSON", ++ SUBJECT_TYPE_ANIMAL = "SUBJECT_TYPE_ANIMAL", ++ SUBJECT_TYPE_PRODUCT = "SUBJECT_TYPE_PRODUCT" ++} ++/** Server content modalities. */ ++export declare enum MediaModality { ++ MODALITY_UNSPECIFIED = "MODALITY_UNSPECIFIED", ++ TEXT = "TEXT", ++ IMAGE = "IMAGE", ++ VIDEO = "VIDEO", ++ AUDIO = "AUDIO", ++ DOCUMENT = "DOCUMENT" ++} ++/** Start of speech sensitivity. */ ++export declare enum StartSensitivity { ++ START_SENSITIVITY_UNSPECIFIED = "START_SENSITIVITY_UNSPECIFIED", ++ START_SENSITIVITY_HIGH = "START_SENSITIVITY_HIGH", ++ START_SENSITIVITY_LOW = "START_SENSITIVITY_LOW" ++} ++/** End of speech sensitivity. */ ++export declare enum EndSensitivity { ++ END_SENSITIVITY_UNSPECIFIED = "END_SENSITIVITY_UNSPECIFIED", ++ END_SENSITIVITY_HIGH = "END_SENSITIVITY_HIGH", ++ END_SENSITIVITY_LOW = "END_SENSITIVITY_LOW" ++} ++/** The different ways of handling user activity. */ ++export declare enum ActivityHandling { ++ ACTIVITY_HANDLING_UNSPECIFIED = "ACTIVITY_HANDLING_UNSPECIFIED", ++ START_OF_ACTIVITY_INTERRUPTS = "START_OF_ACTIVITY_INTERRUPTS", ++ NO_INTERRUPTION = "NO_INTERRUPTION" ++} ++/** Options about which input is included in the user's turn. */ ++export declare enum TurnCoverage { ++ TURN_COVERAGE_UNSPECIFIED = "TURN_COVERAGE_UNSPECIFIED", ++ TURN_INCLUDES_ONLY_ACTIVITY = "TURN_INCLUDES_ONLY_ACTIVITY", ++ TURN_INCLUDES_ALL_INPUT = "TURN_INCLUDES_ALL_INPUT" ++} ++/** Metadata describes the input video content. */ ++export declare interface VideoMetadata { ++ /** Optional. The end offset of the video. */ ++ endOffset?: string; ++ /** Optional. The start offset of the video. */ ++ startOffset?: string; ++} ++/** Result of executing the [ExecutableCode]. Always follows a `part` containing the [ExecutableCode]. */ ++export declare interface CodeExecutionResult { ++ /** Required. Outcome of the code execution. */ ++ outcome?: Outcome; ++ /** Optional. Contains stdout when code execution is successful, stderr or other description otherwise. */ ++ output?: string; ++} ++/** Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the [FunctionDeclaration] tool and [FunctionCallingConfig] mode is set to [Mode.CODE]. */ ++export declare interface ExecutableCode { ++ /** Required. The code to be executed. */ ++ code?: string; ++ /** Required. Programming language of the `code`. */ ++ language?: Language; ++} ++/** URI based data. */ ++export declare interface FileData { ++ /** Required. URI. */ ++ fileUri?: string; ++ /** Required. The IANA standard MIME type of the source data. */ ++ mimeType?: string; ++} ++/** A function call. */ ++export declare interface FunctionCall { ++ /** The unique id of the function call. If populated, the client to execute the ++ `function_call` and return the response with the matching `id`. */ ++ id?: string; ++ /** Optional. Required. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. */ ++ args?: Record; ++ /** Required. The name of the function to call. Matches [FunctionDeclaration.name]. */ ++ name?: string; ++} ++/** A function response. */ ++export declare class FunctionResponse { ++ /** The id of the function call this response is for. Populated by the client ++ to match the corresponding function call `id`. */ ++ id?: string; ++ /** Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name]. */ ++ name?: string; ++ /** Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. */ ++ response?: Record; ++} ++/** Content blob. */ ++export declare interface Blob { ++ /** Required. Raw bytes. */ ++ data?: string; ++ /** Required. The IANA standard MIME type of the source data. */ ++ mimeType?: string; ++} ++/** A datatype containing media content. ++ ++ Exactly one field within a Part should be set, representing the specific type ++ of content being conveyed. Using multiple fields within the same `Part` ++ instance is considered invalid. ++ */ ++export declare interface Part { ++ /** Metadata for a given video. */ ++ videoMetadata?: VideoMetadata; ++ /** Indicates if the part is thought from the model. */ ++ thought?: boolean; ++ /** Optional. Result of executing the [ExecutableCode]. */ ++ codeExecutionResult?: CodeExecutionResult; ++ /** Optional. Code generated by the model that is meant to be executed. */ ++ executableCode?: ExecutableCode; ++ /** Optional. URI based data. */ ++ fileData?: FileData; ++ /** Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. */ ++ functionCall?: FunctionCall; ++ /** Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. */ ++ functionResponse?: FunctionResponse; ++ /** Optional. Inlined bytes data. */ ++ inlineData?: Blob; ++ /** Optional. Text part (can be code). */ ++ text?: string; ++} ++/** ++ * Creates a `Part` object from a `URI` string. ++ */ ++export declare function createPartFromUri(uri: string, mimeType: string): Part; ++/** ++ * Creates a `Part` object from a `text` string. ++ */ ++export declare function createPartFromText(text: string): Part; ++/** ++ * Creates a `Part` object from a `FunctionCall` object. ++ */ ++export declare function createPartFromFunctionCall(name: string, args: Record): Part; ++/** ++ * Creates a `Part` object from a `FunctionResponse` object. ++ */ ++export declare function createPartFromFunctionResponse(id: string, name: string, response: Record): Part; ++/** ++ * Creates a `Part` object from a `base64` encoded `string`. ++ */ ++export declare function createPartFromBase64(data: string, mimeType: string): Part; ++/** ++ * Creates a `Part` object from the `outcome` and `output` of a `CodeExecutionResult` object. ++ */ ++export declare function createPartFromCodeExecutionResult(outcome: Outcome, output: string): Part; ++/** ++ * Creates a `Part` object from the `code` and `language` of an `ExecutableCode` object. ++ */ ++export declare function createPartFromExecutableCode(code: string, language: Language): Part; ++/** Contains the multi-part content of a message. */ ++export declare interface Content { ++ /** List of parts that constitute a single message. Each part may have ++ a different IANA MIME type. */ ++ parts?: Part[]; ++ /** Optional. The producer of the content. Must be either 'user' or ++ 'model'. Useful to set for multi-turn conversations, otherwise can be ++ empty. If role is not specified, SDK will determine the role. */ ++ role?: string; ++} ++/** ++ * Creates a `Content` object with a user role from a `PartListUnion` object or `string`. ++ */ ++export declare function createUserContent(partOrString: PartListUnion | string): Content; ++/** ++ * Creates a `Content` object with a model role from a `PartListUnion` object or `string`. ++ */ ++export declare function createModelContent(partOrString: PartListUnion | string): Content; ++/** HTTP options to be used in each of the requests. */ ++export declare interface HttpOptions { ++ /** The base URL for the AI platform service endpoint. */ ++ baseUrl?: string; ++ /** Specifies the version of the API to use. */ ++ apiVersion?: string; ++ /** Additional HTTP headers to be sent with the request. */ ++ headers?: Record; ++ /** Timeout for the request in milliseconds. */ ++ timeout?: number; ++ /** Signal for the request. */ ++ signal?: AbortSignal; ++} ++/** Schema that defines the format of input and output data. ++ ++ Represents a select subset of an OpenAPI 3.0 schema object. ++ */ ++export declare interface Schema { ++ /** Optional. Example of the object. Will only populated when the object is the root. */ ++ example?: unknown; ++ /** Optional. Pattern of the Type.STRING to restrict a string to a regular expression. */ ++ pattern?: string; ++ /** Optional. Default value of the data. */ ++ default?: unknown; ++ /** Optional. Maximum length of the Type.STRING */ ++ maxLength?: string; ++ /** Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING */ ++ minLength?: string; ++ /** Optional. Minimum number of the properties for Type.OBJECT. */ ++ minProperties?: string; ++ /** Optional. Maximum number of the properties for Type.OBJECT. */ ++ maxProperties?: string; ++ /** Optional. The value should be validated against any (one or more) of the subschemas in the list. */ ++ anyOf?: Schema[]; ++ /** Optional. The description of the data. */ ++ description?: string; ++ /** Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:["101", "201", "301"]} */ ++ enum?: string[]; ++ /** Optional. The format of the data. Supported formats: for NUMBER type: "float", "double" for INTEGER type: "int32", "int64" for STRING type: "email", "byte", etc */ ++ format?: string; ++ /** Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY. */ ++ items?: Schema; ++ /** Optional. Maximum number of the elements for Type.ARRAY. */ ++ maxItems?: string; ++ /** Optional. Maximum value of the Type.INTEGER and Type.NUMBER */ ++ maximum?: number; ++ /** Optional. Minimum number of the elements for Type.ARRAY. */ ++ minItems?: string; ++ /** Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER */ ++ minimum?: number; ++ /** Optional. Indicates if the value may be null. */ ++ nullable?: boolean; ++ /** Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT. */ ++ properties?: Record; ++ /** Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties. */ ++ propertyOrdering?: string[]; ++ /** Optional. Required properties of Type.OBJECT. */ ++ required?: string[]; ++ /** Optional. The title of the Schema. */ ++ title?: string; ++ /** Optional. The type of the data. */ ++ type?: Type; ++} ++/** Config for model selection. */ ++export declare interface ModelSelectionConfig { ++ /** Options for feature selection preference. */ ++ featureSelectionPreference?: FeatureSelectionPreference; ++} ++/** Safety settings. */ ++export declare interface SafetySetting { ++ /** Determines if the harm block method uses probability or probability ++ and severity scores. */ ++ method?: HarmBlockMethod; ++ /** Required. Harm category. */ ++ category?: HarmCategory; ++ /** Required. The harm block threshold. */ ++ threshold?: HarmBlockThreshold; ++} ++/** Defines a function that the model can generate JSON inputs for. ++ ++ The inputs are based on `OpenAPI 3.0 specifications ++ `_. ++ */ ++export declare interface FunctionDeclaration { ++ /** Describes the output from the function in the OpenAPI JSON Schema ++ Object format. */ ++ response?: Schema; ++ /** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */ ++ description?: string; ++ /** Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a maximum length of 64. */ ++ name?: string; ++ /** Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 */ ++ parameters?: Schema; ++} ++/** Tool to support Google Search in Model. Powered by Google. */ ++export declare interface GoogleSearch { ++} ++/** Describes the options to customize dynamic retrieval. */ ++export declare interface DynamicRetrievalConfig { ++ /** The mode of the predictor to be used in dynamic retrieval. */ ++ mode?: DynamicRetrievalConfigMode; ++ /** Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used. */ ++ dynamicThreshold?: number; ++} ++/** Tool to retrieve public web data for grounding, powered by Google. */ ++export declare interface GoogleSearchRetrieval { ++ /** Specifies the dynamic retrieval configuration for the given source. */ ++ dynamicRetrievalConfig?: DynamicRetrievalConfig; ++} ++/** Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder */ ++export declare interface VertexAISearch { ++ /** Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` */ ++ datastore?: string; ++ /** Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` */ ++ engine?: string; ++} ++/** The definition of the Rag resource. */ ++export declare interface VertexRagStoreRagResource { ++ /** Optional. RagCorpora resource name. Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` */ ++ ragCorpus?: string; ++ /** Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field. */ ++ ragFileIds?: string[]; ++} ++/** Config for filters. */ ++export declare interface RagRetrievalConfigFilter { ++ /** Optional. String for metadata filtering. */ ++ metadataFilter?: string; ++ /** Optional. Only returns contexts with vector distance smaller than the threshold. */ ++ vectorDistanceThreshold?: number; ++ /** Optional. Only returns contexts with vector similarity larger than the threshold. */ ++ vectorSimilarityThreshold?: number; ++} ++/** Config for Hybrid Search. */ ++export declare interface RagRetrievalConfigHybridSearch { ++ /** Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally. */ ++ alpha?: number; ++} ++/** Config for LlmRanker. */ ++export declare interface RagRetrievalConfigRankingLlmRanker { ++ /** Optional. The model name used for ranking. Format: `gemini-1.5-pro` */ ++ modelName?: string; ++} ++/** Config for Rank Service. */ ++export declare interface RagRetrievalConfigRankingRankService { ++ /** Optional. The model name of the rank service. Format: `semantic-ranker-512@latest` */ ++ modelName?: string; ++} ++/** Config for ranking and reranking. */ ++export declare interface RagRetrievalConfigRanking { ++ /** Optional. Config for LlmRanker. */ ++ llmRanker?: RagRetrievalConfigRankingLlmRanker; ++ /** Optional. Config for Rank Service. */ ++ rankService?: RagRetrievalConfigRankingRankService; ++} ++/** Specifies the context retrieval config. */ ++export declare interface RagRetrievalConfig { ++ /** Optional. Config for filters. */ ++ filter?: RagRetrievalConfigFilter; ++ /** Optional. Config for Hybrid Search. */ ++ hybridSearch?: RagRetrievalConfigHybridSearch; ++ /** Optional. Config for ranking and reranking. */ ++ ranking?: RagRetrievalConfigRanking; ++ /** Optional. The number of contexts to retrieve. */ ++ topK?: number; ++} ++/** Retrieve from Vertex RAG Store for grounding. */ ++export declare interface VertexRagStore { ++ /** Optional. Deprecated. Please use rag_resources instead. */ ++ ragCorpora?: string[]; ++ /** Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. */ ++ ragResources?: VertexRagStoreRagResource[]; ++ /** Optional. The retrieval config for the Rag query. */ ++ ragRetrievalConfig?: RagRetrievalConfig; ++ /** Optional. Number of top k results to return from the selected corpora. */ ++ similarityTopK?: number; ++ /** Optional. Only return results with vector distance smaller than the threshold. */ ++ vectorDistanceThreshold?: number; ++} ++/** Defines a retrieval tool that model can call to access external knowledge. */ ++export declare interface Retrieval { ++ /** Optional. Deprecated. This option is no longer supported. */ ++ disableAttribution?: boolean; ++ /** Set to use data source powered by Vertex AI Search. */ ++ vertexAiSearch?: VertexAISearch; ++ /** Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService. */ ++ vertexRagStore?: VertexRagStore; ++} ++/** Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. */ ++export declare interface ToolCodeExecution { ++} ++/** Tool details of a tool that the model may use to generate a response. */ ++export declare interface Tool { ++ /** List of function declarations that the tool supports. */ ++ functionDeclarations?: FunctionDeclaration[]; ++ /** Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. */ ++ retrieval?: Retrieval; ++ /** Optional. Google Search tool type. Specialized retrieval tool ++ that is powered by Google Search. */ ++ googleSearch?: GoogleSearch; ++ /** Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. */ ++ googleSearchRetrieval?: GoogleSearchRetrieval; ++ /** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services. */ ++ codeExecution?: ToolCodeExecution; ++} ++/** Function calling config. */ ++export declare interface FunctionCallingConfig { ++ /** Optional. Function calling mode. */ ++ mode?: FunctionCallingConfigMode; ++ /** Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided. */ ++ allowedFunctionNames?: string[]; ++} ++/** Tool config. ++ ++ This config is shared for all tools provided in the request. ++ */ ++export declare interface ToolConfig { ++ /** Optional. Function calling config. */ ++ functionCallingConfig?: FunctionCallingConfig; ++} ++/** The configuration for the prebuilt speaker to use. */ ++export declare interface PrebuiltVoiceConfig { ++ /** The name of the prebuilt voice to use. ++ */ ++ voiceName?: string; ++} ++/** The configuration for the voice to use. */ ++export declare interface VoiceConfig { ++ /** The configuration for the speaker to use. ++ */ ++ prebuiltVoiceConfig?: PrebuiltVoiceConfig; ++} ++/** The speech generation configuration. */ ++export declare interface SpeechConfig { ++ /** The configuration for the speaker to use. ++ */ ++ voiceConfig?: VoiceConfig; ++ /** Language code (ISO 639. e.g. en-US) for the speech synthesization. ++ Only available for Live API. ++ */ ++ languageCode?: string; ++} ++/** The thinking features configuration. */ ++export declare interface ThinkingConfig { ++ /** Indicates whether to include thoughts in the response. If true, thoughts are returned only if the model supports thought and thoughts are available. ++ */ ++ includeThoughts?: boolean; ++ /** Indicates the thinking budget in tokens. ++ */ ++ thinkingBudget?: number; ++} ++/** When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. */ ++export declare interface GenerationConfigRoutingConfigAutoRoutingMode { ++ /** The model routing preference. */ ++ modelRoutingPreference?: 'UNKNOWN' | 'PRIORITIZE_QUALITY' | 'BALANCED' | 'PRIORITIZE_COST'; ++} ++/** When manual routing is set, the specified model will be used directly. */ ++export declare interface GenerationConfigRoutingConfigManualRoutingMode { ++ /** The model name to use. Only the public LLM models are accepted. e.g. 'gemini-1.5-pro-001'. */ ++ modelName?: string; ++} ++/** The configuration for routing the request to a specific model. */ ++export declare interface GenerationConfigRoutingConfig { ++ /** Automated routing. */ ++ autoMode?: GenerationConfigRoutingConfigAutoRoutingMode; ++ /** Manual routing. */ ++ manualMode?: GenerationConfigRoutingConfigManualRoutingMode; ++} ++/** Optional model configuration parameters. ++ ++ For more information, see `Content generation parameters ++ `_. ++ */ ++export declare interface GenerateContentConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** Instructions for the model to steer it toward better performance. ++ For example, "Answer as concisely as possible" or "Don't use technical ++ terms in your response". ++ */ ++ systemInstruction?: ContentUnion; ++ /** Value that controls the degree of randomness in token selection. ++ Lower temperatures are good for prompts that require a less open-ended or ++ creative response, while higher temperatures can lead to more diverse or ++ creative results. ++ */ ++ temperature?: number; ++ /** Tokens are selected from the most to least probable until the sum ++ of their probabilities equals this value. Use a lower value for less ++ random responses and a higher value for more random responses. ++ */ ++ topP?: number; ++ /** For each token selection step, the ``top_k`` tokens with the ++ highest probabilities are sampled. Then tokens are further filtered based ++ on ``top_p`` with the final token selected using temperature sampling. Use ++ a lower number for less random responses and a higher number for more ++ random responses. ++ */ ++ topK?: number; ++ /** Number of response variations to return. ++ */ ++ candidateCount?: number; ++ /** Maximum number of tokens that can be generated in the response. ++ */ ++ maxOutputTokens?: number; ++ /** List of strings that tells the model to stop generating text if one ++ of the strings is encountered in the response. ++ */ ++ stopSequences?: string[]; ++ /** Whether to return the log probabilities of the tokens that were ++ chosen by the model at each step. ++ */ ++ responseLogprobs?: boolean; ++ /** Number of top candidate tokens to return the log probabilities for ++ at each generation step. ++ */ ++ logprobs?: number; ++ /** Positive values penalize tokens that already appear in the ++ generated text, increasing the probability of generating more diverse ++ content. ++ */ ++ presencePenalty?: number; ++ /** Positive values penalize tokens that repeatedly appear in the ++ generated text, increasing the probability of generating more diverse ++ content. ++ */ ++ frequencyPenalty?: number; ++ /** When ``seed`` is fixed to a specific number, the model makes a best ++ effort to provide the same response for repeated requests. By default, a ++ random number is used. ++ */ ++ seed?: number; ++ /** Output response media type of the generated candidate text. ++ */ ++ responseMimeType?: string; ++ /** Schema that the generated candidate text must adhere to. ++ */ ++ responseSchema?: SchemaUnion; ++ /** Configuration for model router requests. ++ */ ++ routingConfig?: GenerationConfigRoutingConfig; ++ /** Configuration for model selection. ++ */ ++ modelSelectionConfig?: ModelSelectionConfig; ++ /** Safety settings in the request to block unsafe content in the ++ response. ++ */ ++ safetySettings?: SafetySetting[]; ++ /** Code that enables the system to interact with external systems to ++ perform an action outside of the knowledge and scope of the model. ++ */ ++ tools?: ToolListUnion; ++ /** Associates model output to a specific function call. ++ */ ++ toolConfig?: ToolConfig; ++ /** Labels with user-defined metadata to break down billed charges. */ ++ labels?: Record; ++ /** Resource name of a context cache that can be used in subsequent ++ requests. ++ */ ++ cachedContent?: string; ++ /** The requested modalities of the response. Represents the set of ++ modalities that the model can return. ++ */ ++ responseModalities?: string[]; ++ /** If specified, the media resolution specified will be used. ++ */ ++ mediaResolution?: MediaResolution; ++ /** The speech generation configuration. ++ */ ++ speechConfig?: SpeechConfigUnion; ++ /** If enabled, audio timestamp will be included in the request to the ++ model. ++ */ ++ audioTimestamp?: boolean; ++ /** The thinking features configuration. ++ */ ++ thinkingConfig?: ThinkingConfig; ++} ++/** Config for models.generate_content parameters. */ ++export declare interface GenerateContentParameters { ++ /** ID of the model to use. For a list of models, see `Google models ++ `_. */ ++ model: string; ++ /** Content of the request. ++ */ ++ contents: ContentListUnion; ++ /** Configuration that contains optional model parameters. ++ */ ++ config?: GenerateContentConfig; ++} ++/** Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp */ ++export declare interface GoogleTypeDate { ++ /** Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */ ++ day?: number; ++ /** Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */ ++ month?: number; ++ /** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */ ++ year?: number; ++} ++/** Source attributions for content. */ ++export declare interface Citation { ++ /** Output only. End index into the content. */ ++ endIndex?: number; ++ /** Output only. License of the attribution. */ ++ license?: string; ++ /** Output only. Publication date of the attribution. */ ++ publicationDate?: GoogleTypeDate; ++ /** Output only. Start index into the content. */ ++ startIndex?: number; ++ /** Output only. Title of the attribution. */ ++ title?: string; ++ /** Output only. Url reference of the attribution. */ ++ uri?: string; ++} ++/** Citation information when the model quotes another source. */ ++export declare interface CitationMetadata { ++ /** Contains citation information when the model directly quotes, at ++ length, from another source. Can include traditional websites and code ++ repositories. ++ */ ++ citations?: Citation[]; ++} ++/** Chunk from context retrieved by the retrieval tools. */ ++export declare interface GroundingChunkRetrievedContext { ++ /** Text of the attribution. */ ++ text?: string; ++ /** Title of the attribution. */ ++ title?: string; ++ /** URI reference of the attribution. */ ++ uri?: string; ++} ++/** Chunk from the web. */ ++export declare interface GroundingChunkWeb { ++ /** Domain of the (original) URI. */ ++ domain?: string; ++ /** Title of the chunk. */ ++ title?: string; ++ /** URI reference of the chunk. */ ++ uri?: string; ++} ++/** Grounding chunk. */ ++export declare interface GroundingChunk { ++ /** Grounding chunk from context retrieved by the retrieval tools. */ ++ retrievedContext?: GroundingChunkRetrievedContext; ++ /** Grounding chunk from the web. */ ++ web?: GroundingChunkWeb; ++} ++/** Segment of the content. */ ++export declare interface Segment { ++ /** Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero. */ ++ endIndex?: number; ++ /** Output only. The index of a Part object within its parent Content object. */ ++ partIndex?: number; ++ /** Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero. */ ++ startIndex?: number; ++ /** Output only. The text corresponding to the segment from the response. */ ++ text?: string; ++} ++/** Grounding support. */ ++export declare interface GroundingSupport { ++ /** Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the grounding_chunk_indices. */ ++ confidenceScores?: number[]; ++ /** A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim. */ ++ groundingChunkIndices?: number[]; ++ /** Segment of the content this support belongs to. */ ++ segment?: Segment; ++} ++/** Metadata related to retrieval in the grounding flow. */ ++export declare interface RetrievalMetadata { ++ /** Optional. Score indicating how likely information from Google Search could help answer the prompt. The score is in the range `[0, 1]`, where 0 is the least likely and 1 is the most likely. This score is only populated when Google Search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger Google Search. */ ++ googleSearchDynamicRetrievalScore?: number; ++} ++/** Google search entry point. */ ++export declare interface SearchEntryPoint { ++ /** Optional. Web content snippet that can be embedded in a web page or an app webview. */ ++ renderedContent?: string; ++ /** Optional. Base64 encoded JSON representing array of tuple. */ ++ sdkBlob?: string; ++} ++/** Metadata returned to client when grounding is enabled. */ ++export declare interface GroundingMetadata { ++ /** List of supporting references retrieved from specified grounding source. */ ++ groundingChunks?: GroundingChunk[]; ++ /** Optional. List of grounding support. */ ++ groundingSupports?: GroundingSupport[]; ++ /** Optional. Output only. Retrieval metadata. */ ++ retrievalMetadata?: RetrievalMetadata; ++ /** Optional. Queries executed by the retrieval tools. */ ++ retrievalQueries?: string[]; ++ /** Optional. Google search entry for the following-up web searches. */ ++ searchEntryPoint?: SearchEntryPoint; ++ /** Optional. Web search queries for the following-up web search. */ ++ webSearchQueries?: string[]; ++} ++/** Candidate for the logprobs token and score. */ ++export declare interface LogprobsResultCandidate { ++ /** The candidate's log probability. */ ++ logProbability?: number; ++ /** The candidate's token string value. */ ++ token?: string; ++ /** The candidate's token id value. */ ++ tokenId?: number; ++} ++/** Candidates with top log probabilities at each decoding step. */ ++export declare interface LogprobsResultTopCandidates { ++ /** Sorted by log probability in descending order. */ ++ candidates?: LogprobsResultCandidate[]; ++} ++/** Logprobs Result */ ++export declare interface LogprobsResult { ++ /** Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates. */ ++ chosenCandidates?: LogprobsResultCandidate[]; ++ /** Length = total number of decoding steps. */ ++ topCandidates?: LogprobsResultTopCandidates[]; ++} ++/** Safety rating corresponding to the generated content. */ ++export declare interface SafetyRating { ++ /** Output only. Indicates whether the content was filtered out because of this rating. */ ++ blocked?: boolean; ++ /** Output only. Harm category. */ ++ category?: HarmCategory; ++ /** Output only. Harm probability levels in the content. */ ++ probability?: HarmProbability; ++ /** Output only. Harm probability score. */ ++ probabilityScore?: number; ++ /** Output only. Harm severity levels in the content. */ ++ severity?: HarmSeverity; ++ /** Output only. Harm severity score. */ ++ severityScore?: number; ++} ++/** A response candidate generated from the model. */ ++export declare interface Candidate { ++ /** Contains the multi-part content of the response. ++ */ ++ content?: Content; ++ /** Source attribution of the generated content. ++ */ ++ citationMetadata?: CitationMetadata; ++ /** Describes the reason the model stopped generating tokens. ++ */ ++ finishMessage?: string; ++ /** Number of tokens for this candidate. ++ */ ++ tokenCount?: number; ++ /** The reason why the model stopped generating tokens. ++ If empty, the model has not stopped generating the tokens. ++ */ ++ finishReason?: FinishReason; ++ /** Output only. Average log probability score of the candidate. */ ++ avgLogprobs?: number; ++ /** Output only. Metadata specifies sources used to ground generated content. */ ++ groundingMetadata?: GroundingMetadata; ++ /** Output only. Index of the candidate. */ ++ index?: number; ++ /** Output only. Log-likelihood scores for the response tokens and top tokens */ ++ logprobsResult?: LogprobsResult; ++ /** Output only. List of ratings for the safety of a response candidate. There is at most one rating per category. */ ++ safetyRatings?: SafetyRating[]; ++} ++/** Content filter results for a prompt sent in the request. */ ++export declare class GenerateContentResponsePromptFeedback { ++ /** Output only. Blocked reason. */ ++ blockReason?: BlockedReason; ++ /** Output only. A readable block reason message. */ ++ blockReasonMessage?: string; ++ /** Output only. Safety ratings. */ ++ safetyRatings?: SafetyRating[]; ++} ++/** Represents token counting info for a single modality. */ ++export declare interface ModalityTokenCount { ++ /** The modality associated with this token count. */ ++ modality?: MediaModality; ++ /** Number of tokens. */ ++ tokenCount?: number; ++} ++/** Usage metadata about response(s). */ ++export declare class GenerateContentResponseUsageMetadata { ++ /** Output only. List of modalities of the cached content in the request input. */ ++ cacheTokensDetails?: ModalityTokenCount[]; ++ /** Output only. Number of tokens in the cached part in the input (the cached content). */ ++ cachedContentTokenCount?: number; ++ /** Number of tokens in the response(s). */ ++ candidatesTokenCount?: number; ++ /** Output only. List of modalities that were returned in the response. */ ++ candidatesTokensDetails?: ModalityTokenCount[]; ++ /** Number of tokens in the request. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */ ++ promptTokenCount?: number; ++ /** Output only. List of modalities that were processed in the request input. */ ++ promptTokensDetails?: ModalityTokenCount[]; ++ /** Output only. Number of tokens present in thoughts output. */ ++ thoughtsTokenCount?: number; ++ /** Output only. Number of tokens present in tool-use prompt(s). */ ++ toolUsePromptTokenCount?: number; ++ /** Output only. List of modalities that were processed for tool-use request inputs. */ ++ toolUsePromptTokensDetails?: ModalityTokenCount[]; ++ /** Total token count for prompt, response candidates, and tool-use prompts (if present). */ ++ totalTokenCount?: number; ++ /** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */ ++ trafficType?: TrafficType; ++} ++/** Response message for PredictionService.GenerateContent. */ ++export declare class GenerateContentResponse { ++ /** Response variations returned by the model. ++ */ ++ candidates?: Candidate[]; ++ /** Timestamp when the request is made to the server. ++ */ ++ createTime?: string; ++ /** Identifier for each response. ++ */ ++ responseId?: string; ++ /** Output only. The model version used to generate the response. */ ++ modelVersion?: string; ++ /** Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations. */ ++ promptFeedback?: GenerateContentResponsePromptFeedback; ++ /** Usage metadata about the response(s). */ ++ usageMetadata?: GenerateContentResponseUsageMetadata; ++ /** ++ * Returns the concatenation of all text parts from the first candidate in the response. ++ * ++ * @remarks ++ * If there are multiple candidates in the response, the text from the first ++ * one will be returned. ++ * If there are non-text parts in the response, the concatenation of all text ++ * parts will be returned, and a warning will be logged. ++ * If there are thought parts in the response, the concatenation of all text ++ * parts excluding the thought parts will be returned. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.generateContent({ ++ * model: 'gemini-2.0-flash', ++ * contents: ++ * 'Why is the sky blue?', ++ * }); ++ * ++ * console.debug(response.text); ++ * ``` ++ */ ++ get text(): string | undefined; ++ /** ++ * Returns the function calls from the first candidate in the response. ++ * ++ * @remarks ++ * If there are multiple candidates in the response, the function calls from ++ * the first one will be returned. ++ * If there are no function calls in the response, undefined will be returned. ++ * ++ * @example ++ * ```ts ++ * const controlLightFunctionDeclaration: FunctionDeclaration = { ++ * name: 'controlLight', ++ * parameters: { ++ * type: Type.OBJECT, ++ * description: 'Set the brightness and color temperature of a room light.', ++ * properties: { ++ * brightness: { ++ * type: Type.NUMBER, ++ * description: ++ * 'Light level from 0 to 100. Zero is off and 100 is full brightness.', ++ * }, ++ * colorTemperature: { ++ * type: Type.STRING, ++ * description: ++ * 'Color temperature of the light fixture which can be `daylight`, `cool` or `warm`.', ++ * }, ++ * }, ++ * required: ['brightness', 'colorTemperature'], ++ * }; ++ * const response = await ai.models.generateContent({ ++ * model: 'gemini-2.0-flash', ++ * contents: 'Dim the lights so the room feels cozy and warm.', ++ * config: { ++ * tools: [{functionDeclarations: [controlLightFunctionDeclaration]}], ++ * toolConfig: { ++ * functionCallingConfig: { ++ * mode: FunctionCallingConfigMode.ANY, ++ * allowedFunctionNames: ['controlLight'], ++ * }, ++ * }, ++ * }, ++ * }); ++ * console.debug(JSON.stringify(response.functionCalls)); ++ * ``` ++ */ ++ get functionCalls(): FunctionCall[] | undefined; ++ /** ++ * Returns the first executable code from the first candidate in the response. ++ * ++ * @remarks ++ * If there are multiple candidates in the response, the executable code from ++ * the first one will be returned. ++ * If there are no executable code in the response, undefined will be ++ * returned. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.generateContent({ ++ * model: 'gemini-2.0-flash', ++ * contents: ++ * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.' ++ * config: { ++ * tools: [{codeExecution: {}}], ++ * }, ++ * }); ++ * ++ * console.debug(response.executableCode); ++ * ``` ++ */ ++ get executableCode(): string | undefined; ++ /** ++ * Returns the first code execution result from the first candidate in the response. ++ * ++ * @remarks ++ * If there are multiple candidates in the response, the code execution result from ++ * the first one will be returned. ++ * If there are no code execution result in the response, undefined will be returned. ++ * ++ * @example ++ * ```ts ++ * const response = await ai.models.generateContent({ ++ * model: 'gemini-2.0-flash', ++ * contents: ++ * 'What is the sum of the first 50 prime numbers? Generate and run code for the calculation, and make sure you get all 50.' ++ * config: { ++ * tools: [{codeExecution: {}}], ++ * }, ++ * }); ++ * ++ * console.debug(response.codeExecutionResult); ++ * ``` ++ */ ++ get codeExecutionResult(): string | undefined; ++} ++export /** Optional parameters for the embed_content method. */ declare interface EmbedContentConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** Type of task for which the embedding will be used. ++ */ ++ taskType?: string; ++ /** Title for the text. Only applicable when TaskType is ++ `RETRIEVAL_DOCUMENT`. ++ */ ++ title?: string; ++ /** Reduced dimension for the output embedding. If set, ++ excessive values in the output embedding are truncated from the end. ++ Supported by newer models since 2024 only. You cannot set this value if ++ using the earlier model (`models/embedding-001`). ++ */ ++ outputDimensionality?: number; ++ /** Vertex API only. The MIME type of the input. ++ */ ++ mimeType?: string; ++ /** Vertex API only. Whether to silently truncate inputs longer than ++ the max sequence length. If this option is set to false, oversized inputs ++ will lead to an INVALID_ARGUMENT error, similar to other text APIs. ++ */ ++ autoTruncate?: boolean; ++} ++/** Parameters for the embed_content method. */ ++export declare interface EmbedContentParameters { ++ /** ID of the model to use. For a list of models, see `Google models ++ `_. */ ++ model: string; ++ /** The content to embed. Only the `parts.text` fields will be counted. ++ */ ++ contents: ContentListUnion; ++ /** Configuration that contains optional parameters. ++ */ ++ config?: EmbedContentConfig; ++} ++/** Statistics of the input text associated with the result of content embedding. */ ++export declare interface ContentEmbeddingStatistics { ++ /** Vertex API only. If the input text was truncated due to having ++ a length longer than the allowed maximum input. ++ */ ++ truncated?: boolean; ++ /** Vertex API only. Number of tokens of the input text. ++ */ ++ tokenCount?: number; ++} ++/** The embedding generated from an input content. */ ++export declare interface ContentEmbedding { ++ /** A list of floats representing an embedding. ++ */ ++ values?: number[]; ++ /** Vertex API only. Statistics of the input text associated with this ++ embedding. ++ */ ++ statistics?: ContentEmbeddingStatistics; ++} ++/** Request-level metadata for the Vertex Embed Content API. */ ++export declare interface EmbedContentMetadata { ++ /** Vertex API only. The total number of billable characters included ++ in the request. ++ */ ++ billableCharacterCount?: number; ++} ++/** Response for the embed_content method. */ ++export declare class EmbedContentResponse { ++ /** The embeddings for each request, in the same order as provided in ++ the batch request. ++ */ ++ embeddings?: ContentEmbedding[]; ++ /** Vertex API only. Metadata about the request. ++ */ ++ metadata?: EmbedContentMetadata; ++} ++/** The config for generating an images. */ ++export declare interface GenerateImagesConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** Cloud Storage URI used to store the generated images. ++ */ ++ outputGcsUri?: string; ++ /** Description of what to discourage in the generated images. ++ */ ++ negativePrompt?: string; ++ /** Number of images to generate. ++ */ ++ numberOfImages?: number; ++ /** Aspect ratio of the generated images. ++ */ ++ aspectRatio?: string; ++ /** Controls how much the model adheres to the text prompt. Large ++ values increase output and prompt alignment, but may compromise image ++ quality. ++ */ ++ guidanceScale?: number; ++ /** Random seed for image generation. This is not available when ++ ``add_watermark`` is set to true. ++ */ ++ seed?: number; ++ /** Filter level for safety filtering. ++ */ ++ safetyFilterLevel?: SafetyFilterLevel; ++ /** Allows generation of people by the model. ++ */ ++ personGeneration?: PersonGeneration; ++ /** Whether to report the safety scores of each generated image and ++ the positive prompt in the response. ++ */ ++ includeSafetyAttributes?: boolean; ++ /** Whether to include the Responsible AI filter reason if the image ++ is filtered out of the response. ++ */ ++ includeRaiReason?: boolean; ++ /** Language of the text in the prompt. ++ */ ++ language?: ImagePromptLanguage; ++ /** MIME type of the generated image. ++ */ ++ outputMimeType?: string; ++ /** Compression quality of the generated image (for ``image/jpeg`` ++ only). ++ */ ++ outputCompressionQuality?: number; ++ /** Whether to add a watermark to the generated images. ++ */ ++ addWatermark?: boolean; ++ /** Whether to use the prompt rewriting logic. ++ */ ++ enhancePrompt?: boolean; ++} ++/** The parameters for generating images. */ ++export declare interface GenerateImagesParameters { ++ /** ID of the model to use. For a list of models, see `Google models ++ `_. */ ++ model: string; ++ /** Text prompt that typically describes the images to output. ++ */ ++ prompt: string; ++ /** Configuration for generating images. ++ */ ++ config?: GenerateImagesConfig; ++} ++/** An image. */ ++export declare interface Image { ++ /** The Cloud Storage URI of the image. ``Image`` can contain a value ++ for this field or the ``image_bytes`` field but not both. ++ */ ++ gcsUri?: string; ++ /** The image bytes data. ``Image`` can contain a value for this field ++ or the ``gcs_uri`` field but not both. ++ */ ++ imageBytes?: string; ++ /** The MIME type of the image. */ ++ mimeType?: string; ++} ++/** Safety attributes of a GeneratedImage or the user-provided prompt. */ ++export declare interface SafetyAttributes { ++ /** List of RAI categories. ++ */ ++ categories?: string[]; ++ /** List of scores of each categories. ++ */ ++ scores?: number[]; ++ /** Internal use only. ++ */ ++ contentType?: string; ++} ++/** An output image. */ ++export declare interface GeneratedImage { ++ /** The output image data. ++ */ ++ image?: Image; ++ /** Responsible AI filter reason if the image is filtered out of the ++ response. ++ */ ++ raiFilteredReason?: string; ++ /** Safety attributes of the image. Lists of RAI categories and their ++ scores of each content. ++ */ ++ safetyAttributes?: SafetyAttributes; ++ /** The rewritten prompt used for the image generation if the prompt ++ enhancer is enabled. ++ */ ++ enhancedPrompt?: string; ++} ++/** The output images response. */ ++export declare class GenerateImagesResponse { ++ /** List of generated images. ++ */ ++ generatedImages?: GeneratedImage[]; ++ /** Safety attributes of the positive prompt. Only populated if ++ ``include_safety_attributes`` is set to True. ++ */ ++ positivePromptSafetyAttributes?: SafetyAttributes; ++} ++/** Optional parameters for models.get method. */ ++export declare interface GetModelConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++export declare interface GetModelParameters { ++ model: string; ++ /** Optional parameters for the request. */ ++ config?: GetModelConfig; ++} ++/** An endpoint where you deploy models. */ ++export declare interface Endpoint { ++ /** Resource name of the endpoint. */ ++ name?: string; ++ /** ID of the model that's deployed to the endpoint. */ ++ deployedModelId?: string; ++} ++/** A tuned machine learning model. */ ++export declare interface TunedModelInfo { ++ /** ID of the base model that you want to tune. */ ++ baseModel?: string; ++ /** Date and time when the base model was created. */ ++ createTime?: string; ++ /** Date and time when the base model was last updated. */ ++ updateTime?: string; ++} ++/** A trained machine learning model. */ ++export declare interface Model { ++ /** Resource name of the model. */ ++ name?: string; ++ /** Display name of the model. */ ++ displayName?: string; ++ /** Description of the model. */ ++ description?: string; ++ /** Version ID of the model. A new version is committed when a new ++ model version is uploaded or trained under an existing model ID. The ++ version ID is an auto-incrementing decimal number in string ++ representation. */ ++ version?: string; ++ /** List of deployed models created from this base model. Note that a ++ model could have been deployed to endpoints in different locations. */ ++ endpoints?: Endpoint[]; ++ /** Labels with user-defined metadata to organize your models. */ ++ labels?: Record; ++ /** Information about the tuned model from the base model. */ ++ tunedModelInfo?: TunedModelInfo; ++ /** The maximum number of input tokens that the model can handle. */ ++ inputTokenLimit?: number; ++ /** The maximum number of output tokens that the model can generate. */ ++ outputTokenLimit?: number; ++ /** List of actions that are supported by the model. */ ++ supportedActions?: string[]; ++} ++/** Generation config. */ ++export declare interface GenerationConfig { ++ /** Optional. If enabled, audio timestamp will be included in the request to the model. */ ++ audioTimestamp?: boolean; ++ /** Optional. Number of candidates to generate. */ ++ candidateCount?: number; ++ /** Optional. Frequency penalties. */ ++ frequencyPenalty?: number; ++ /** Optional. Logit probabilities. */ ++ logprobs?: number; ++ /** Optional. The maximum number of output tokens to generate per message. */ ++ maxOutputTokens?: number; ++ /** Optional. If specified, the media resolution specified will be used. */ ++ mediaResolution?: MediaResolution; ++ /** Optional. Positive penalties. */ ++ presencePenalty?: number; ++ /** Optional. If true, export the logprobs results in response. */ ++ responseLogprobs?: boolean; ++ /** Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature. */ ++ responseMimeType?: string; ++ /** Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response. */ ++ responseSchema?: Schema; ++ /** Optional. Routing configuration. */ ++ routingConfig?: GenerationConfigRoutingConfig; ++ /** Optional. Seed. */ ++ seed?: number; ++ /** Optional. Stop sequences. */ ++ stopSequences?: string[]; ++ /** Optional. Controls the randomness of predictions. */ ++ temperature?: number; ++ /** Optional. If specified, top-k sampling will be used. */ ++ topK?: number; ++ /** Optional. If specified, nucleus sampling will be used. */ ++ topP?: number; ++} ++/** Config for the count_tokens method. */ ++export declare interface CountTokensConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** Instructions for the model to steer it toward better performance. ++ */ ++ systemInstruction?: ContentUnion; ++ /** Code that enables the system to interact with external systems to ++ perform an action outside of the knowledge and scope of the model. ++ */ ++ tools?: Tool[]; ++ /** Configuration that the model uses to generate the response. Not ++ supported by the Gemini Developer API. ++ */ ++ generationConfig?: GenerationConfig; ++} ++/** Parameters for counting tokens. */ ++export declare interface CountTokensParameters { ++ /** ID of the model to use. For a list of models, see `Google models ++ `_. */ ++ model: string; ++ /** Input content. */ ++ contents: ContentListUnion; ++ /** Configuration for counting tokens. */ ++ config?: CountTokensConfig; ++} ++/** Response for counting tokens. */ ++export declare class CountTokensResponse { ++ /** Total number of tokens. */ ++ totalTokens?: number; ++ /** Number of tokens in the cached part of the prompt (the cached content). */ ++ cachedContentTokenCount?: number; ++} ++/** Optional parameters for computing tokens. */ ++export declare interface ComputeTokensConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Parameters for computing tokens. */ ++export declare interface ComputeTokensParameters { ++ /** ID of the model to use. For a list of models, see `Google models ++ `_. */ ++ model: string; ++ /** Input content. */ ++ contents: ContentListUnion; ++ /** Optional parameters for the request. ++ */ ++ config?: ComputeTokensConfig; ++} ++/** Tokens info with a list of tokens and the corresponding list of token ids. */ ++export declare interface TokensInfo { ++ /** Optional. Optional fields for the role from the corresponding Content. */ ++ role?: string; ++ /** A list of token ids from the input. */ ++ tokenIds?: string[]; ++ /** A list of tokens from the input. */ ++ tokens?: string[]; ++} ++/** Response for computing tokens. */ ++export declare class ComputeTokensResponse { ++ /** Lists of tokens info from the input. A ComputeTokensRequest could have multiple instances with a prompt in each instance. We also need to return lists of tokens info for the request with multiple instances. */ ++ tokensInfo?: TokensInfo[]; ++} ++/** Configuration for generating videos. */ ++export declare interface GenerateVideosConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** Number of output videos. */ ++ numberOfVideos?: number; ++ /** The gcs bucket where to save the generated videos. */ ++ outputGcsUri?: string; ++ /** Frames per second for video generation. */ ++ fps?: number; ++ /** Duration of the clip for video generation in seconds. */ ++ durationSeconds?: number; ++ /** The RNG seed. If RNG seed is exactly same for each request with unchanged inputs, the prediction results will be consistent. Otherwise, a random RNG seed will be used each time to produce a different result. */ ++ seed?: number; ++ /** The aspect ratio for the generated video. 16:9 (landscape) and 9:16 (portrait) are supported. */ ++ aspectRatio?: string; ++ /** The resolution for the generated video. 1280x720, 1920x1080 are supported. */ ++ resolution?: string; ++ /** Whether allow to generate person videos, and restrict to specific ages. Supported values are: dont_allow, allow_adult. */ ++ personGeneration?: string; ++ /** The pubsub topic where to publish the video generation progress. */ ++ pubsubTopic?: string; ++ /** Optional field in addition to the text content. Negative prompts can be explicitly stated here to help generate the video. */ ++ negativePrompt?: string; ++ /** Whether to use the prompt rewriting logic. */ ++ enhancePrompt?: boolean; ++} ++/** Class that represents the parameters for generating an image. */ ++export declare interface GenerateVideosParameters { ++ /** ID of the model to use. For a list of models, see `Google models ++ `_. */ ++ model: string; ++ /** The text prompt for generating the videos. Optional for image to video use cases. */ ++ prompt?: string; ++ /** The input image for generating the videos. ++ Optional if prompt is provided. */ ++ image?: Image; ++ /** Configuration for generating videos. */ ++ config?: GenerateVideosConfig; ++} ++/** A generated video. */ ++export declare interface Video { ++ /** Path to another storage. */ ++ uri?: string; ++ /** Video bytes. */ ++ videoBytes?: string; ++ /** Video encoding, for example "video/mp4". */ ++ mimeType?: string; ++} ++/** A generated video. */ ++export declare interface GeneratedVideo { ++ /** The output video */ ++ video?: Video; ++} ++/** Response with generated videos. */ ++export declare class GenerateVideosResponse { ++ /** List of the generated videos */ ++ generatedVideos?: GeneratedVideo[]; ++ /** Returns if any videos were filtered due to RAI policies. */ ++ raiMediaFilteredCount?: number; ++ /** Returns rai failure reasons if any. */ ++ raiMediaFilteredReasons?: string[]; ++} ++/** A video generation operation. */ ++export declare interface GenerateVideosOperation { ++ /** The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. */ ++ name?: string; ++ /** Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. */ ++ metadata?: Record; ++ /** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */ ++ done?: boolean; ++ /** The error result of the operation in case of failure or cancellation. */ ++ error?: Record; ++ /** The generated videos. */ ++ response?: GenerateVideosResponse; ++} ++/** Optional configuration for cached content creation. */ ++export declare interface CreateCachedContentConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: "3.5s". */ ++ ttl?: string; ++ /** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */ ++ expireTime?: string; ++ /** The user-generated meaningful display name of the cached content. ++ */ ++ displayName?: string; ++ /** The content to cache. ++ */ ++ contents?: ContentListUnion; ++ /** Developer set system instruction. ++ */ ++ systemInstruction?: ContentUnion; ++ /** A list of `Tools` the model may use to generate the next response. ++ */ ++ tools?: Tool[]; ++ /** Configuration for the tools to use. This config is shared for all tools. ++ */ ++ toolConfig?: ToolConfig; ++} ++/** Parameters for caches.create method. */ ++export declare interface CreateCachedContentParameters { ++ /** ID of the model to use. Example: gemini-1.5-flash */ ++ model: string; ++ /** Configuration that contains optional parameters. ++ */ ++ config?: CreateCachedContentConfig; ++} ++/** Metadata on the usage of the cached content. */ ++export declare interface CachedContentUsageMetadata { ++ /** Duration of audio in seconds. */ ++ audioDurationSeconds?: number; ++ /** Number of images. */ ++ imageCount?: number; ++ /** Number of text characters. */ ++ textCount?: number; ++ /** Total number of tokens that the cached content consumes. */ ++ totalTokenCount?: number; ++ /** Duration of video in seconds. */ ++ videoDurationSeconds?: number; ++} ++/** A resource used in LLM queries for users to explicitly specify what to cache. */ ++export declare interface CachedContent { ++ /** The server-generated resource name of the cached content. */ ++ name?: string; ++ /** The user-generated meaningful display name of the cached content. */ ++ displayName?: string; ++ /** The name of the publisher model to use for cached content. */ ++ model?: string; ++ /** Creation time of the cache entry. */ ++ createTime?: string; ++ /** When the cache entry was last updated in UTC time. */ ++ updateTime?: string; ++ /** Expiration time of the cached content. */ ++ expireTime?: string; ++ /** Metadata on the usage of the cached content. */ ++ usageMetadata?: CachedContentUsageMetadata; ++} ++/** Optional parameters for caches.get method. */ ++export declare interface GetCachedContentConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Parameters for caches.get method. */ ++export declare interface GetCachedContentParameters { ++ /** The server-generated resource name of the cached content. ++ */ ++ name: string; ++ /** Optional parameters for the request. ++ */ ++ config?: GetCachedContentConfig; ++} ++/** Optional parameters for caches.delete method. */ ++export declare interface DeleteCachedContentConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Parameters for caches.delete method. */ ++export declare interface DeleteCachedContentParameters { ++ /** The server-generated resource name of the cached content. ++ */ ++ name: string; ++ /** Optional parameters for the request. ++ */ ++ config?: DeleteCachedContentConfig; ++} ++/** Empty response for caches.delete method. */ ++export declare class DeleteCachedContentResponse { ++} ++/** Optional parameters for caches.update method. */ ++export declare interface UpdateCachedContentConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: "3.5s". */ ++ ttl?: string; ++ /** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */ ++ expireTime?: string; ++} ++export declare interface UpdateCachedContentParameters { ++ /** The server-generated resource name of the cached content. ++ */ ++ name: string; ++ /** Configuration that contains optional parameters. ++ */ ++ config?: UpdateCachedContentConfig; ++} ++/** Config for caches.list method. */ ++export declare interface ListCachedContentsConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ pageSize?: number; ++ pageToken?: string; ++} ++/** Parameters for caches.list method. */ ++export declare interface ListCachedContentsParameters { ++ /** Configuration that contains optional parameters. ++ */ ++ config?: ListCachedContentsConfig; ++} ++export declare class ListCachedContentsResponse { ++ nextPageToken?: string; ++ /** List of cached contents. ++ */ ++ cachedContents?: CachedContent[]; ++} ++/** Used to override the default configuration. */ ++export declare interface ListFilesConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ pageSize?: number; ++ pageToken?: string; ++} ++/** Generates the parameters for the list method. */ ++export declare interface ListFilesParameters { ++ /** Used to override the default configuration. */ ++ config?: ListFilesConfig; ++} ++/** Status of a File that uses a common error model. */ ++export declare interface FileStatus { ++ /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */ ++ details?: Record[]; ++ /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */ ++ message?: string; ++ /** The status code. 0 for OK, 1 for CANCELLED */ ++ code?: number; ++} ++/** A file uploaded to the API. */ ++export declare interface File { ++ /** The `File` resource name. The ID (name excluding the "files/" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be generated. Example: `files/123-456` */ ++ name?: string; ++ /** Optional. The human-readable display name for the `File`. The display name must be no more than 512 characters in length, including spaces. Example: 'Welcome Image' */ ++ displayName?: string; ++ /** Output only. MIME type of the file. */ ++ mimeType?: string; ++ /** Output only. Size of the file in bytes. */ ++ sizeBytes?: string; ++ /** Output only. The timestamp of when the `File` was created. */ ++ createTime?: string; ++ /** Output only. The timestamp of when the `File` will be deleted. Only set if the `File` is scheduled to expire. */ ++ expirationTime?: string; ++ /** Output only. The timestamp of when the `File` was last updated. */ ++ updateTime?: string; ++ /** Output only. SHA-256 hash of the uploaded bytes. The hash value is encoded in base64 format. */ ++ sha256Hash?: string; ++ /** Output only. The URI of the `File`. */ ++ uri?: string; ++ /** Output only. The URI of the `File`, only set for downloadable (generated) files. */ ++ downloadUri?: string; ++ /** Output only. Processing state of the File. */ ++ state?: FileState; ++ /** Output only. The source of the `File`. */ ++ source?: FileSource; ++ /** Output only. Metadata for a video. */ ++ videoMetadata?: Record; ++ /** Output only. Error status if File processing failed. */ ++ error?: FileStatus; ++} ++/** Response for the list files method. */ ++export declare class ListFilesResponse { ++ /** A token to retrieve next page of results. */ ++ nextPageToken?: string; ++ /** The list of files. */ ++ files?: File[]; ++} ++/** Used to override the default configuration. */ ++export declare interface CreateFileConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Generates the parameters for the private _create method. */ ++export declare interface CreateFileParameters { ++ /** The file to be uploaded. ++ mime_type: (Required) The MIME type of the file. Must be provided. ++ name: (Optional) The name of the file in the destination (e.g. ++ 'files/sample-image'). ++ display_name: (Optional) The display name of the file. ++ */ ++ file: File; ++ /** Used to override the default configuration. */ ++ config?: CreateFileConfig; ++} ++/** A wrapper class for the http response. */ ++export declare class HttpResponse { ++ /** Used to retain the processed HTTP headers in the response. */ ++ headers?: Record; ++ /** ++ * The original http response. ++ */ ++ responseInternal: Response; ++ constructor(response: Response); ++ json(): Promise; ++} ++/** Callbacks for the live API. */ ++export interface LiveCallbacks { ++ /** ++ * Called when the websocket connection is established. ++ */ ++ onopen?: (() => void) | null; ++ /** ++ * Called when a message is received from the server. ++ */ ++ onmessage: (e: LiveServerMessage) => void; ++ /** ++ * Called when an error occurs. ++ */ ++ onerror?: ((e: ErrorEvent) => void) | null; ++ /** ++ * Called when the websocket connection is closed. ++ */ ++ onclose?: ((e: CloseEvent) => void) | null; ++} ++/** Parameters for the upload file method. */ ++export interface UploadFileParameters { ++ /** The string path to the file to be uploaded or a Blob object. */ ++ file: string | globalThis.Blob; ++ /** Configuration that contains optional parameters. */ ++ config?: UploadFileConfig; ++} ++/** Response for the create file method. */ ++export declare class CreateFileResponse { ++ /** Used to retain the full HTTP response. */ ++ sdkHttpResponse?: HttpResponse; ++} ++/** Used to override the default configuration. */ ++export declare interface GetFileConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Generates the parameters for the get method. */ ++export declare interface GetFileParameters { ++ /** The name identifier for the file to retrieve. */ ++ name: string; ++ /** Used to override the default configuration. */ ++ config?: GetFileConfig; ++} ++/** Used to override the default configuration. */ ++export declare interface DeleteFileConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Generates the parameters for the get method. */ ++export declare interface DeleteFileParameters { ++ /** The name identifier for the file to be deleted. */ ++ name: string; ++ /** Used to override the default configuration. */ ++ config?: DeleteFileConfig; ++} ++/** Response for the delete file method. */ ++export declare class DeleteFileResponse { ++} ++export declare interface GetOperationConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Parameters for the GET method. */ ++export declare interface GetOperationParameters { ++ /** The server-assigned name for the operation. */ ++ operationName: string; ++ /** Used to override the default configuration. */ ++ config?: GetOperationConfig; ++} ++export declare interface FetchPredictOperationConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Parameters for the fetchPredictOperation method. */ ++export declare interface FetchPredictOperationParameters { ++ /** The server-assigned name for the operation. */ ++ operationName: string; ++ resourceName: string; ++ /** Used to override the default configuration. */ ++ config?: FetchPredictOperationConfig; ++} ++export declare interface TestTableItem { ++ /** The name of the test. This is used to derive the replay id. */ ++ name?: string; ++ /** The parameters to the test. Use pydantic models. */ ++ parameters?: Record; ++ /** Expects an exception for MLDev matching the string. */ ++ exceptionIfMldev?: string; ++ /** Expects an exception for Vertex matching the string. */ ++ exceptionIfVertex?: string; ++ /** Use if you don't want to use the default replay id which is derived from the test name. */ ++ overrideReplayId?: string; ++ /** True if the parameters contain an unsupported union type. This test will be skipped for languages that do not support the union type. */ ++ hasUnion?: boolean; ++ /** When set to a reason string, this test will be skipped in the API mode. Use this flag for tests that can not be reproduced with the real API. E.g. a test that deletes a resource. */ ++ skipInApiMode?: string; ++ /** Keys to ignore when comparing the request and response. This is useful for tests that are not deterministic. */ ++ ignoreKeys?: string[]; ++} ++export declare interface TestTableFile { ++ comment?: string; ++ testMethod?: string; ++ parameterNames?: string[]; ++ testTable?: TestTableItem[]; ++} ++/** Represents a single request in a replay. */ ++export declare interface ReplayRequest { ++ method?: string; ++ url?: string; ++ headers?: Record; ++ bodySegments?: Record[]; ++} ++/** Represents a single response in a replay. */ ++export declare class ReplayResponse { ++ statusCode?: number; ++ headers?: Record; ++ bodySegments?: Record[]; ++ sdkResponseSegments?: Record[]; ++} ++/** Represents a single interaction, request and response in a replay. */ ++export declare interface ReplayInteraction { ++ request?: ReplayRequest; ++ response?: ReplayResponse; ++} ++/** Represents a recorded session. */ ++export declare interface ReplayFile { ++ replayId?: string; ++ interactions?: ReplayInteraction[]; ++} ++/** Used to override the default configuration. */ ++export declare interface UploadFileConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** The name of the file in the destination (e.g., 'files/sample-image'. If not provided one will be generated. */ ++ name?: string; ++ /** mime_type: The MIME type of the file. If not provided, it will be inferred from the file extension. */ ++ mimeType?: string; ++ /** Optional display name of the file. */ ++ displayName?: string; ++} ++/** Used to override the default configuration. */ ++export declare interface DownloadFileConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++} ++/** Configuration for upscaling an image. ++ ++ For more information on this configuration, refer to ++ the `Imagen API reference documentation ++ `_. ++ */ ++export declare interface UpscaleImageConfig { ++ /** Used to override HTTP request options. */ ++ httpOptions?: HttpOptions; ++ /** Whether to include a reason for filtered-out images in the ++ response. */ ++ includeRaiReason?: boolean; ++ /** The image format that the output should be saved as. */ ++ outputMimeType?: string; ++ /** The level of compression if the ``output_mime_type`` is ++ ``image/jpeg``. */ ++ outputCompressionQuality?: number; ++} ++/** User-facing config UpscaleImageParameters. */ ++export declare interface UpscaleImageParameters { ++ /** The model to use. */ ++ model: string; ++ /** The input image to upscale. */ ++ image: Image; ++ /** The factor to upscale the image (x2 or x4). */ ++ upscaleFactor: string; ++ /** Configuration for upscaling. */ ++ config?: UpscaleImageConfig; ++} ++/** A raw reference image. ++ ++ A raw reference image represents the base image to edit, provided by the user. ++ It can optionally be provided in addition to a mask reference image or ++ a style reference image. ++ */ ++export declare interface RawReferenceImage { ++ /** The reference image for the editing operation. */ ++ referenceImage?: Image; ++ /** The id of the reference image. */ ++ referenceId?: number; ++ /** The type of the reference image. Only set by the SDK. */ ++ referenceType?: string; ++} ++/** Configuration for a Mask reference image. */ ++export declare interface MaskReferenceConfig { ++ /** Prompts the model to generate a mask instead of you needing to ++ provide one (unless MASK_MODE_USER_PROVIDED is used). */ ++ maskMode?: MaskReferenceMode; ++ /** A list of up to 5 class ids to use for semantic segmentation. ++ Automatically creates an image mask based on specific objects. */ ++ segmentationClasses?: number[]; ++ /** Dilation percentage of the mask provided. ++ Float between 0 and 1. */ ++ maskDilation?: number; ++} ++/** A mask reference image. ++ ++ This encapsulates either a mask image provided by the user and configs for ++ the user provided mask, or only config parameters for the model to generate ++ a mask. ++ ++ A mask image is an image whose non-zero values indicate where to edit the base ++ image. If the user provides a mask image, the mask must be in the same ++ dimensions as the raw image. ++ */ ++export declare interface MaskReferenceImage { ++ /** The reference image for the editing operation. */ ++ referenceImage?: Image; ++ /** The id of the reference image. */ ++ referenceId?: number; ++ /** The type of the reference image. Only set by the SDK. */ ++ referenceType?: string; ++ /** Configuration for the mask reference image. */ ++ config?: MaskReferenceConfig; ++} ++/** Configuration for a Control reference image. */ ++export declare interface ControlReferenceConfig { ++ /** The type of control reference image to use. */ ++ controlType?: ControlReferenceType; ++ /** Defaults to False. When set to True, the control image will be ++ computed by the model based on the control type. When set to False, ++ the control image must be provided by the user. */ ++ enableControlImageComputation?: boolean; ++} ++/** A control reference image. ++ ++ The image of the control reference image is either a control image provided ++ by the user, or a regular image which the backend will use to generate a ++ control image of. In the case of the latter, the ++ enable_control_image_computation field in the config should be set to True. ++ ++ A control image is an image that represents a sketch image of areas for the ++ model to fill in based on the prompt. ++ */ ++export declare interface ControlReferenceImage { ++ /** The reference image for the editing operation. */ ++ referenceImage?: Image; ++ /** The id of the reference image. */ ++ referenceId?: number; ++ /** The type of the reference image. Only set by the SDK. */ ++ referenceType?: string; ++ /** Configuration for the control reference image. */ ++ config?: ControlReferenceConfig; ++} ++/** Configuration for a Style reference image. */ ++export declare interface StyleReferenceConfig { ++ /** A text description of the style to use for the generated image. */ ++ styleDescription?: string; ++} ++/** A style reference image. ++ ++ This encapsulates a style reference image provided by the user, and ++ additionally optional config parameters for the style reference image. ++ ++ A raw reference image can also be provided as a destination for the style to ++ be applied to. ++ */ ++export declare interface StyleReferenceImage { ++ /** The reference image for the editing operation. */ ++ referenceImage?: Image; ++ /** The id of the reference image. */ ++ referenceId?: number; ++ /** The type of the reference image. Only set by the SDK. */ ++ referenceType?: string; ++ /** Configuration for the style reference image. */ ++ config?: StyleReferenceConfig; ++} ++/** Configuration for a Subject reference image. */ ++export declare interface SubjectReferenceConfig { ++ /** The subject type of a subject reference image. */ ++ subjectType?: SubjectReferenceType; ++ /** Subject description for the image. */ ++ subjectDescription?: string; ++} ++/** A subject reference image. ++ ++ This encapsulates a subject reference image provided by the user, and ++ additionally optional config parameters for the subject reference image. ++ ++ A raw reference image can also be provided as a destination for the subject to ++ be applied to. ++ */ ++export declare interface SubjectReferenceImage { ++ /** The reference image for the editing operation. */ ++ referenceImage?: Image; ++ /** The id of the reference image. */ ++ referenceId?: number; ++ /** The type of the reference image. Only set by the SDK. */ ++ referenceType?: string; ++ /** Configuration for the subject reference image. */ ++ config?: SubjectReferenceConfig; ++} ++/** Sent in response to a `LiveGenerateContentSetup` message from the client. */ ++export declare interface LiveServerSetupComplete { ++} ++/** Incremental server update generated by the model in response to client messages. ++ ++ Content is generated as quickly as possible, and not in real time. Clients ++ may choose to buffer and play it out in real time. ++ */ ++export declare interface LiveServerContent { ++ /** The content that the model has generated as part of the current conversation with the user. */ ++ modelTurn?: Content; ++ /** If true, indicates that the model is done generating. Generation will only start in response to additional client messages. Can be set alongside `content`, indicating that the `content` is the last in the turn. */ ++ turnComplete?: boolean; ++ /** If true, indicates that a client message has interrupted current model generation. If the client is playing out the content in realtime, this is a good signal to stop and empty the current queue. */ ++ interrupted?: boolean; ++ /** If true, indicates that the model is done generating. When model is ++ interrupted while generating there will be no generation_complete message ++ in interrupted turn, it will go through interrupted > turn_complete. ++ When model assumes realtime playback there will be delay between ++ generation_complete and turn_complete that is caused by model ++ waiting for playback to finish. If true, indicates that the model ++ has finished generating all content. This is a signal to the client ++ that it can stop sending messages. */ ++ generationComplete?: boolean; ++} ++/** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */ ++export declare interface LiveServerToolCall { ++ /** The function call to be executed. */ ++ functionCalls?: FunctionCall[]; ++} ++/** Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled. ++ ++ If there were side-effects to those tool calls, clients may attempt to undo ++ the tool calls. This message occurs only in cases where the clients interrupt ++ server turns. ++ */ ++export declare interface LiveServerToolCallCancellation { ++ /** The ids of the tool calls to be cancelled. */ ++ ids?: string[]; ++} ++/** Usage metadata about response(s). */ ++export declare interface UsageMetadata { ++ /** Number of tokens in the prompt. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */ ++ promptTokenCount?: number; ++ /** Number of tokens in the cached part of the prompt (the cached content). */ ++ cachedContentTokenCount?: number; ++ /** Total number of tokens across all the generated response candidates. */ ++ responseTokenCount?: number; ++ /** Number of tokens present in tool-use prompt(s). */ ++ toolUsePromptTokenCount?: number; ++ /** Number of tokens of thoughts for thinking models. */ ++ thoughtsTokenCount?: number; ++ /** Total token count for prompt, response candidates, and tool-use prompts(if present). */ ++ totalTokenCount?: number; ++ /** List of modalities that were processed in the request input. */ ++ promptTokensDetails?: ModalityTokenCount[]; ++ /** List of modalities that were processed in the cache input. */ ++ cacheTokensDetails?: ModalityTokenCount[]; ++ /** List of modalities that were returned in the response. */ ++ responseTokensDetails?: ModalityTokenCount[]; ++ /** List of modalities that were processed in the tool-use prompt. */ ++ toolUsePromptTokensDetails?: ModalityTokenCount[]; ++ /** Traffic type. This shows whether a request consumes Pay-As-You-Go ++ or Provisioned Throughput quota. */ ++ trafficType?: TrafficType; ++} ++/** Server will not be able to service client soon. */ ++export declare interface LiveServerGoAway { ++ /** The remaining time before the connection will be terminated as ABORTED. The minimal time returned here is specified differently together with the rate limits for a given model. */ ++ timeLeft?: string; ++} ++/** Update of the session resumption state. ++ ++ Only sent if `session_resumption` was set in the connection config. ++ */ ++export declare interface LiveServerSessionResumptionUpdate { ++ /** New handle that represents state that can be resumed. Empty if `resumable`=false. */ ++ newHandle?: string; ++ /** True if session can be resumed at this point. It might be not possible to resume session at some points. In that case we send update empty new_handle and resumable=false. Example of such case could be model executing function calls or just generating. Resuming session (using previous session token) in such state will result in some data loss. */ ++ resumable?: boolean; ++ /** Index of last message sent by client that is included in state represented by this SessionResumptionToken. Only sent when `SessionResumptionConfig.transparent` is set. ++ ++ Presence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `SessionResmumptionTokenUpdate`. This field will enable them to limit buffering (avoid keeping all requests in RAM). ++ ++ Note: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames arelikely not needed. */ ++ lastConsumedClientMessageIndex?: string; ++} ++/** Response message for API call. */ ++export declare interface LiveServerMessage { ++ /** Sent in response to a `LiveClientSetup` message from the client. */ ++ setupComplete?: LiveServerSetupComplete; ++ /** Content generated by the model in response to client messages. */ ++ serverContent?: LiveServerContent; ++ /** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */ ++ toolCall?: LiveServerToolCall; ++ /** Notification for the client that a previously issued `ToolCallMessage` with the specified `id`s should have been not executed and should be cancelled. */ ++ toolCallCancellation?: LiveServerToolCallCancellation; ++ /** Usage metadata about model response(s). */ ++ usageMetadata?: UsageMetadata; ++ /** Server will disconnect soon. */ ++ goAway?: LiveServerGoAway; ++ /** Update of the session resumption state. */ ++ sessionResumptionUpdate?: LiveServerSessionResumptionUpdate; ++} ++/** Configures automatic detection of activity. */ ++export declare interface AutomaticActivityDetection { ++ /** If enabled, detected voice and text input count as activity. If disabled, the client must send activity signals. */ ++ disabled?: boolean; ++ /** Determines how likely speech is to be detected. */ ++ startOfSpeechSensitivity?: StartSensitivity; ++ /** Determines how likely detected speech is ended. */ ++ endOfSpeechSensitivity?: EndSensitivity; ++ /** The required duration of detected speech before start-of-speech is committed. The lower this value the more sensitive the start-of-speech detection is and the shorter speech can be recognized. However, this also increases the probability of false positives. */ ++ prefixPaddingMs?: number; ++ /** The required duration of detected non-speech (e.g. silence) before end-of-speech is committed. The larger this value, the longer speech gaps can be without interrupting the user's activity but this will increase the model's latency. */ ++ silenceDurationMs?: number; ++} ++/** Marks the end of user activity. ++ ++ This can only be sent if automatic (i.e. server-side) activity detection is ++ disabled. ++ */ ++export declare interface RealtimeInputConfig { ++ /** If not set, automatic activity detection is enabled by default. If automatic voice detection is disabled, the client must send activity signals. */ ++ automaticActivityDetection?: AutomaticActivityDetection; ++ /** Defines what effect activity has. */ ++ activityHandling?: ActivityHandling; ++ /** Defines which input is included in the user's turn. */ ++ turnCoverage?: TurnCoverage; ++} ++/** Configuration of session resumption mechanism. ++ ++ Included in `LiveConnectConfig.session_resumption`. If included server ++ will send `LiveServerSessionResumptionUpdate` messages. ++ */ ++export declare interface SessionResumptionConfig { ++ /** Session resumption handle of previous session (session to restore). ++ ++ If not present new session will be started. */ ++ handle?: string; ++ /** If set the server will send `last_consumed_client_message_index` in the `session_resumption_update` messages to allow for transparent reconnections. */ ++ transparent?: boolean; ++} ++/** Context window will be truncated by keeping only suffix of it. ++ ++ Context window will always be cut at start of USER role turn. System ++ instructions and `BidiGenerateContentSetup.prefix_turns` will not be ++ subject to the sliding window mechanism, they will always stay at the ++ beginning of context window. ++ */ ++export declare interface SlidingWindow { ++ /** Session reduction target -- how many tokens we should keep. Window shortening operation has some latency costs, so we should avoid running it on every turn. Should be < trigger_tokens. If not set, trigger_tokens/2 is assumed. */ ++ targetTokens?: string; ++} ++/** Enables context window compression -- mechanism managing model context window so it does not exceed given length. */ ++export declare interface ContextWindowCompressionConfig { ++ /** Number of tokens (before running turn) that triggers context window compression mechanism. */ ++ triggerTokens?: string; ++ /** Sliding window compression mechanism. */ ++ slidingWindow?: SlidingWindow; ++} ++/** The audio transcription configuration in Setup. */ ++export declare interface AudioTranscriptionConfig { ++} ++/** Message contains configuration that will apply for the duration of the streaming session. */ ++export declare interface LiveClientSetup { ++ /** ++ The fully qualified name of the publisher model or tuned model endpoint to ++ use. ++ */ ++ model?: string; ++ /** The generation configuration for the session. ++ Note: only a subset of fields are supported. ++ */ ++ generationConfig?: GenerationConfig; ++ /** The user provided system instructions for the model. ++ Note: only text should be used in parts and content in each part will be ++ in a separate paragraph. */ ++ systemInstruction?: ContentUnion; ++ /** A list of `Tools` the model may use to generate the next response. ++ ++ A `Tool` is a piece of code that enables the system to interact with ++ external systems to perform an action, or set of actions, outside of ++ knowledge and scope of the model. */ ++ tools?: ToolListUnion; ++ /** Configures the realtime input behavior in BidiGenerateContent. */ ++ realtimeInputConfig?: RealtimeInputConfig; ++ /** Configures session resumption mechanism. ++ ++ If included server will send SessionResumptionUpdate messages. */ ++ sessionResumption?: SessionResumptionConfig; ++ /** Configures context window compression mechanism. ++ ++ If included, server will compress context window to fit into given length. */ ++ contextWindowCompression?: ContextWindowCompressionConfig; ++} ++/** Incremental update of the current conversation delivered from the client. ++ ++ All the content here will unconditionally be appended to the conversation ++ history and used as part of the prompt to the model to generate content. ++ ++ A message here will interrupt any current model generation. ++ */ ++export declare interface LiveClientContent { ++ /** The content appended to the current conversation with the model. ++ ++ For single-turn queries, this is a single instance. For multi-turn ++ queries, this is a repeated field that contains conversation history and ++ latest request. ++ */ ++ turns?: Content[]; ++ /** If true, indicates that the server content generation should start with ++ the currently accumulated prompt. Otherwise, the server will await ++ additional messages before starting generation. */ ++ turnComplete?: boolean; ++} ++/** Marks the start of user activity. ++ ++ This can only be sent if automatic (i.e. server-side) activity detection is ++ disabled. ++ */ ++export declare interface ActivityStart { ++} ++/** Marks the end of user activity. ++ ++ This can only be sent if automatic (i.e. server-side) activity detection is ++ disabled. ++ */ ++export declare interface ActivityEnd { ++} ++/** User input that is sent in real time. ++ ++ This is different from `LiveClientContent` in a few ways: ++ ++ - Can be sent continuously without interruption to model generation. ++ - If there is a need to mix data interleaved across the ++ `LiveClientContent` and the `LiveClientRealtimeInput`, server attempts to ++ optimize for best response, but there are no guarantees. ++ - End of turn is not explicitly specified, but is rather derived from user ++ activity (for example, end of speech). ++ - Even before the end of turn, the data is processed incrementally ++ to optimize for a fast start of the response from the model. ++ - Is always assumed to be the user's input (cannot be used to populate ++ conversation history). ++ */ ++export declare interface LiveClientRealtimeInput { ++ /** Inlined bytes data for media input. */ ++ mediaChunks?: Blob[]; ++ /** Marks the start of user activity. */ ++ activityStart?: ActivityStart; ++ /** Marks the end of user activity. */ ++ activityEnd?: ActivityEnd; ++} ++/** Client generated response to a `ToolCall` received from the server. ++ ++ Individual `FunctionResponse` objects are matched to the respective ++ `FunctionCall` objects by the `id` field. ++ ++ Note that in the unary and server-streaming GenerateContent APIs function ++ calling happens by exchanging the `Content` parts, while in the bidi ++ GenerateContent APIs function calling happens over this dedicated set of ++ messages. ++ */ ++export declare class LiveClientToolResponse { ++ /** The response to the function calls. */ ++ functionResponses?: FunctionResponse[]; ++} ++/** Messages sent by the client in the API call. */ ++export declare interface LiveClientMessage { ++ /** Message to be sent by the system when connecting to the API. SDK users should not send this message. */ ++ setup?: LiveClientSetup; ++ /** Incremental update of the current conversation delivered from the client. */ ++ clientContent?: LiveClientContent; ++ /** User input that is sent in real time. */ ++ realtimeInput?: LiveClientRealtimeInput; ++ /** Response to a `ToolCallMessage` received from the server. */ ++ toolResponse?: LiveClientToolResponse; ++} ++/** Session config for the API connection. */ ++export declare interface LiveConnectConfig { ++ /** The generation configuration for the session. */ ++ generationConfig?: GenerationConfig; ++ /** The requested modalities of the response. Represents the set of ++ modalities that the model can return. Defaults to AUDIO if not specified. ++ */ ++ responseModalities?: Modality[]; ++ /** The speech generation configuration. ++ */ ++ speechConfig?: SpeechConfig; ++ /** The user provided system instructions for the model. ++ Note: only text should be used in parts and content in each part will be ++ in a separate paragraph. */ ++ systemInstruction?: ContentUnion; ++ /** A list of `Tools` the model may use to generate the next response. ++ ++ A `Tool` is a piece of code that enables the system to interact with ++ external systems to perform an action, or set of actions, outside of ++ knowledge and scope of the model. */ ++ tools?: ToolListUnion; ++ /** Configures session resumption mechanism. ++ ++ If included the server will send SessionResumptionUpdate messages. */ ++ sessionResumption?: SessionResumptionConfig; ++ /** Configures the realtime input behavior in BidiGenerateContent. */ ++ realtimeInputConfig?: RealtimeInputConfig; ++ /** Configures context window compression mechanism. ++ ++ If included, server will compress context window to fit into given length. */ ++ contextWindowCompression?: ContextWindowCompressionConfig; ++} ++/** Parameters for connecting to the live API. */ ++export declare interface LiveConnectParameters { ++ /** ID of the model to use. For a list of models, see `Google models ++ `_. */ ++ model: string; ++ /** callbacks */ ++ callbacks: LiveCallbacks; ++ /** Optional configuration parameters for the request. ++ */ ++ config?: LiveConnectConfig; ++} ++/** Parameters for initializing a new chat session. ++ ++ These parameters are used when creating a chat session with the ++ `chats.create()` method. ++ */ ++export declare interface CreateChatParameters { ++ /** The name of the model to use for the chat session. ++ ++ For example: 'gemini-2.0-flash', 'gemini-1.5-pro', etc. See gemini API ++ docs to find the available models. ++ */ ++ model: string; ++ /** Config for the entire chat session. ++ ++ This config applies to all requests within the session ++ unless overridden by a per-request `config` in `SendMessageParameters`. ++ */ ++ config?: GenerateContentConfig; ++ /** The initial conversation history for the chat session. ++ ++ This allows you to start the chat with a pre-existing history. The history ++ must be a list of `Content` alternating between 'user' and 'model' roles. ++ It should start with a 'user' message. ++ */ ++ history?: Content[]; ++} ++/** Parameters for sending a message within a chat session. ++ ++ These parameters are used with the `chat.sendMessage()` method. ++ */ ++export declare interface SendMessageParameters { ++ /** The message to send to the model. ++ ++ The SDK will combine all parts into a single 'user' content to send to ++ the model. ++ */ ++ message: PartListUnion; ++ /** Config for this specific request. ++ ++ Please note that the per-request config does not change the chat level ++ config, nor inherit from it. If you intend to use some values from the ++ chat's default config, you must explicitly copy them into this per-request ++ config. ++ */ ++ config?: GenerateContentConfig; ++} ++/** Parameters for sending client content to the live API. */ ++export declare interface LiveSendClientContentParameters { ++ /** Client content to send to the session. */ ++ turns?: ContentListUnion; ++ /** If true, indicates that the server content generation should start with ++ the currently accumulated prompt. Otherwise, the server will await ++ additional messages before starting generation. */ ++ turnComplete?: boolean; ++} ++/** Parameters for sending realtime input to the live API. */ ++export declare interface LiveSendRealtimeInputParameters { ++ /** Realtime input to send to the session. */ ++ media: Blob; ++ /** Marks the start of user activity. */ ++ activityStart?: ActivityStart; ++ /** Marks the end of user activity. */ ++ activityEnd?: ActivityEnd; ++} ++/** Parameters for sending tool responses to the live API. */ ++export declare class LiveSendToolResponseParameters { ++ /** Tool responses to send to the session. */ ++ functionResponses: FunctionResponse[] | FunctionResponse; ++} ++/** Parameters for the get method of the operations module. */ ++export declare interface OperationGetParameters { ++ /** The operation to be retrieved. */ ++ operation: GenerateVideosOperation; ++ /** Used to override the default configuration. */ ++ config?: GetOperationConfig; ++} ++export type PartUnion = Part | string; ++export type PartListUnion = PartUnion[] | PartUnion; ++export type ContentUnion = Content | PartUnion[] | PartUnion; ++export type ContentListUnion = Content | Content[] | PartUnion | PartUnion[]; ++export type SchemaUnion = Schema; ++export type SpeechConfigUnion = SpeechConfig | string; ++export type ToolListUnion = Tool[]; +diff --git a/dist/web/src/web/_browser_uploader.d.ts b/dist/web/src/web/_browser_uploader.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..e3397e3a8cb937cd13fe5a1487808fade9a47844 +--- /dev/null ++++ b/dist/web/src/web/_browser_uploader.d.ts +@@ -0,0 +1,12 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import { FileStat, Uploader } from '../_uploader'; ++import { File } from '../types'; ++export declare class BrowserUploader implements Uploader { ++ upload(file: string | Blob, uploadUrl: string, apiClient: ApiClient): Promise; ++ stat(file: string | Blob): Promise; ++} +diff --git a/dist/web/src/web/_browser_websocket.d.ts b/dist/web/src/web/_browser_websocket.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..f7d343165a48766c9a7bf013924e3acd4d0f0ba1 +--- /dev/null ++++ b/dist/web/src/web/_browser_websocket.d.ts +@@ -0,0 +1,19 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { WebSocketCallbacks, WebSocketFactory, WebSocket as Ws } from '../_websocket'; ++export declare class BrowserWebSocketFactory implements WebSocketFactory { ++ create(url: string, headers: Record, callbacks: WebSocketCallbacks): Ws; ++} ++export declare class BrowserWebSocket implements Ws { ++ private readonly url; ++ private readonly headers; ++ private readonly callbacks; ++ private ws?; ++ constructor(url: string, headers: Record, callbacks: WebSocketCallbacks); ++ connect(): void; ++ send(message: string): void; ++ close(): void; ++} +diff --git a/dist/web/src/web/_web_auth.d.ts b/dist/web/src/web/_web_auth.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..f5bfea2ad0fc6c27fc05c98b6dd7775bc97209d7 +--- /dev/null ++++ b/dist/web/src/web/_web_auth.d.ts +@@ -0,0 +1,12 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { Auth } from '../_auth'; ++export declare const GOOGLE_API_KEY_HEADER = "x-goog-api-key"; ++export declare class WebAuth implements Auth { ++ private readonly apiKey; ++ constructor(apiKey: string); ++ addAuthHeaders(headers: Headers): Promise; ++} +diff --git a/dist/web/src/web/index.d.ts b/dist/web/src/web/index.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..7f13c95f443a06be27a459c5c56e90415bfebf85 +--- /dev/null ++++ b/dist/web/src/web/index.d.ts +@@ -0,0 +1,15 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++export * from '../caches'; ++export * from '../chats'; ++export { GoogleGenAIOptions } from '../client'; ++export { Files } from '../files'; ++export * from '../live'; ++export { Models } from '../models'; ++export { Operations } from '../operations'; ++export { PagedItem, Pager } from '../pagers'; ++export * from '../types'; ++export * from './web_client'; +diff --git a/dist/web/src/web/web_client.d.ts b/dist/web/src/web/web_client.d.ts +new file mode 100644 +index 0000000000000000000000000000000000000000..008b8be929a02392e3fb0997412a619985f23d33 +--- /dev/null ++++ b/dist/web/src/web/web_client.d.ts +@@ -0,0 +1,62 @@ ++/** ++ * @license ++ * Copyright 2025 Google LLC ++ * SPDX-License-Identifier: Apache-2.0 ++ */ ++import { ApiClient } from '../_api_client'; ++import { Caches } from '../caches'; ++import { Chats } from '../chats'; ++import { GoogleGenAIOptions } from '../client'; ++import { Files } from '../files'; ++import { Live } from '../live'; ++import { Models } from '../models'; ++import { Operations } from '../operations'; ++/** ++ * The Google GenAI SDK. ++ * ++ * @remarks ++ * Provides access to the GenAI features through either the {@link ++ * https://cloud.google.com/vertex-ai/docs/reference/rest | Gemini API} or ++ * the {@link https://cloud.google.com/vertex-ai/docs/reference/rest | Vertex AI ++ * API}. ++ * ++ * The {@link GoogleGenAIOptions.vertexai} value determines which of the API ++ * services to use. ++ * ++ * When using the Gemini API, a {@link GoogleGenAIOptions.apiKey} must also be ++ * set. When using Vertex AI, currently only {@link GoogleGenAIOptions.apiKey} ++ * is supported via Express mode. {@link GoogleGenAIOptions.project} and {@link ++ * GoogleGenAIOptions.location} should not be set. ++ * ++ * @example ++ * Initializing the SDK for using the Gemini API: ++ * ```ts ++ * import {GoogleGenAI} from '@google/genai'; ++ * const ai = new GoogleGenAI({apiKey: 'GEMINI_API_KEY'}); ++ * ``` ++ * ++ * @example ++ * Initializing the SDK for using the Vertex AI API: ++ * ```ts ++ * import {GoogleGenAI} from '@google/genai'; ++ * const ai = new GoogleGenAI({ ++ * vertexai: true, ++ * project: 'PROJECT_ID', ++ * location: 'PROJECT_LOCATION' ++ * }); ++ * ``` ++ * ++ */ ++export declare class GoogleGenAI { ++ protected readonly apiClient: ApiClient; ++ private readonly apiKey?; ++ readonly vertexai: boolean; ++ private readonly apiVersion?; ++ readonly models: Models; ++ readonly live: Live; ++ readonly chats: Chats; ++ readonly caches: Caches; ++ readonly files: Files; ++ readonly operations: Operations; ++ constructor(options: GoogleGenAIOptions); ++} +diff --git a/dist/web/tsdoc-metadata.json b/dist/web/tsdoc-metadata.json +new file mode 100644 +index 0000000000000000000000000000000000000000..53df58127701f2ee2bf59192ced518d91ffda2af +--- /dev/null ++++ b/dist/web/tsdoc-metadata.json +@@ -0,0 +1,11 @@ ++// This file is read by tools that parse documentation comments conforming to the TSDoc standard. ++// It should be published with your NPM package. It should not be tracked by Git. ++{ ++ "tsdocVersion": "0.12", ++ "toolPackages": [ ++ { ++ "packageName": "@microsoft/api-extractor", ++ "packageVersion": "7.50.1" ++ } ++ ] ++} +diff --git a/dist/web/web.d.ts b/dist/web/web.d.ts +index 99bf1d5937d6dfd88639b3a332d1a87304c848e2..54dffed6ef169268850a09997349dab1f84cadaa 100644 +--- a/dist/web/web.d.ts ++++ b/dist/web/web.d.ts +@@ -46,11 +46,11 @@ declare class ApiClient { + private shouldPrependVertexProjectPath; + request(request: HttpRequest): Promise; + private patchHttpOptions; +- requestStream(request: HttpRequest): Promise; ++ requestStream(request: HttpRequest): Promise>; + private includeExtraHttpOptionsToRequestInit; + private unaryApiCall; + private streamApiCall; +- processStreamResponse(response: Response): AsyncGenerator; ++ processStreamResponse(response: Response): AsyncGenerator; + private apiCall; + getDefaultHeaders(): Record; + private getHeadersInternal; +@@ -237,8 +237,8 @@ export declare class Caches extends BaseModule { + * + * @remarks + * Context caching is only supported for specific models. See [Gemini +- * Developer API reference] (https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac) +- * and [Vertex AI reference] (https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models) ++ * Developer API reference](https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac) ++ * and [Vertex AI reference](https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models) + * for more information. + * + * @param params - The parameters for the create request. +@@ -540,7 +540,7 @@ export declare interface ContentEmbeddingStatistics { + tokenCount?: number; + } + +-export declare type ContentListUnion = ContentUnion[] | ContentUnion; ++export declare type ContentListUnion = Content | Content[] | PartUnion | PartUnion[]; + + export declare type ContentUnion = Content | PartUnion[] | PartUnion; + +@@ -897,6 +897,14 @@ export declare interface ExecutableCode { + language?: Language; + } + ++/** Options for feature selection preference. */ ++export declare enum FeatureSelectionPreference { ++ FEATURE_SELECTION_PREFERENCE_UNSPECIFIED = "FEATURE_SELECTION_PREFERENCE_UNSPECIFIED", ++ PRIORITIZE_QUALITY = "PRIORITIZE_QUALITY", ++ BALANCED = "BALANCED", ++ PRIORITIZE_COST = "PRIORITIZE_COST" ++} ++ + export declare interface FetchPredictOperationConfig { + /** Used to override HTTP request options. */ + httpOptions?: HttpOptions; +@@ -1239,6 +1247,9 @@ export declare interface GenerateContentConfig { + /** Configuration for model router requests. + */ + routingConfig?: GenerationConfigRoutingConfig; ++ /** Configuration for model selection. ++ */ ++ modelSelectionConfig?: ModelSelectionConfig; + /** Safety settings in the request to block unsafe content in the + response. + */ +@@ -1982,6 +1993,8 @@ export declare interface HttpOptions { + headers?: Record; + /** Timeout for the request in milliseconds. */ + timeout?: number; ++ /** Signal for the request. */ ++ signal?: AbortSignal; + } + + /** +@@ -2133,17 +2146,20 @@ export declare class Live { + @experimental + + @remarks +- If using the Gemini API, Live is currently only supported behind API +- version `v1alpha`. Ensure that the API version is set to `v1alpha` when +- initializing the SDK if relying on the Gemini API. + + @param params - The parameters for establishing a connection to the model. + @return A live session. + + @example + ```ts ++ let model: string; ++ if (GOOGLE_GENAI_USE_VERTEXAI) { ++ model = 'gemini-2.0-flash-live-preview-04-09'; ++ } else { ++ model = 'gemini-2.0-flash-live-001'; ++ } + const session = await ai.live.connect({ +- model: 'gemini-2.0-flash-exp', ++ model: model, + config: { + responseModalities: [Modality.AUDIO], + }, +@@ -2258,7 +2274,7 @@ export declare interface LiveClientSetup { + /** The user provided system instructions for the model. + Note: only text should be used in parts and content in each part will be + in a separate paragraph. */ +- systemInstruction?: Content; ++ systemInstruction?: ContentUnion; + /** A list of `Tools` the model may use to generate the next response. + + A `Tool` is a piece of code that enables the system to interact with +@@ -2306,7 +2322,7 @@ export declare interface LiveConnectConfig { + /** The user provided system instructions for the model. + Note: only text should be used in parts and content in each part will be + in a separate paragraph. */ +- systemInstruction?: Content; ++ systemInstruction?: ContentUnion; + /** A list of `Tools` the model may use to generate the next response. + + A `Tool` is a piece of code that enables the system to interact with +@@ -2804,6 +2820,12 @@ export declare class Models extends BaseModule { + generateVideos(params: types.GenerateVideosParameters): Promise; + } + ++/** Config for model selection. */ ++export declare interface ModelSelectionConfig { ++ /** Options for feature selection preference. */ ++ featureSelectionPreference?: FeatureSelectionPreference; ++} ++ + /** Parameters for the get method of the operations module. */ + export declare interface OperationGetParameters { + /** The operation to be retrieved. */ +@@ -3011,6 +3033,54 @@ export declare interface PrebuiltVoiceConfig { + voiceName?: string; + } + ++/** Specifies the context retrieval config. */ ++export declare interface RagRetrievalConfig { ++ /** Optional. Config for filters. */ ++ filter?: RagRetrievalConfigFilter; ++ /** Optional. Config for Hybrid Search. */ ++ hybridSearch?: RagRetrievalConfigHybridSearch; ++ /** Optional. Config for ranking and reranking. */ ++ ranking?: RagRetrievalConfigRanking; ++ /** Optional. The number of contexts to retrieve. */ ++ topK?: number; ++} ++ ++/** Config for filters. */ ++export declare interface RagRetrievalConfigFilter { ++ /** Optional. String for metadata filtering. */ ++ metadataFilter?: string; ++ /** Optional. Only returns contexts with vector distance smaller than the threshold. */ ++ vectorDistanceThreshold?: number; ++ /** Optional. Only returns contexts with vector similarity larger than the threshold. */ ++ vectorSimilarityThreshold?: number; ++} ++ ++/** Config for Hybrid Search. */ ++export declare interface RagRetrievalConfigHybridSearch { ++ /** Optional. Alpha value controls the weight between dense and sparse vector search results. The range is [0, 1], while 0 means sparse vector search only and 1 means dense vector search only. The default value is 0.5 which balances sparse and dense vector search equally. */ ++ alpha?: number; ++} ++ ++/** Config for ranking and reranking. */ ++export declare interface RagRetrievalConfigRanking { ++ /** Optional. Config for LlmRanker. */ ++ llmRanker?: RagRetrievalConfigRankingLlmRanker; ++ /** Optional. Config for Rank Service. */ ++ rankService?: RagRetrievalConfigRankingRankService; ++} ++ ++/** Config for LlmRanker. */ ++export declare interface RagRetrievalConfigRankingLlmRanker { ++ /** Optional. The model name used for ranking. Format: `gemini-1.5-pro` */ ++ modelName?: string; ++} ++ ++/** Config for Rank Service. */ ++export declare interface RagRetrievalConfigRankingRankService { ++ /** Optional. The model name of the rank service. Format: `semantic-ranker-512@latest` */ ++ modelName?: string; ++} ++ + /** A raw reference image. + + A raw reference image represents the base image to edit, provided by the user. +@@ -3333,8 +3403,14 @@ export declare class Session { + + @example + ```ts ++ let model: string; ++ if (GOOGLE_GENAI_USE_VERTEXAI) { ++ model = 'gemini-2.0-flash-live-preview-04-09'; ++ } else { ++ model = 'gemini-2.0-flash-live-001'; ++ } + const session = await ai.live.connect({ +- model: 'gemini-2.0-flash-exp', ++ model: model, + config: { + responseModalities: [Modality.AUDIO], + } +@@ -3377,6 +3453,10 @@ export declare interface SpeechConfig { + /** The configuration for the speaker to use. + */ + voiceConfig?: VoiceConfig; ++ /** Language code (ISO 639. e.g. en-US) for the speech synthesization. ++ Only available for Live API. ++ */ ++ languageCode?: string; + } + + export declare type SpeechConfigUnion = SpeechConfig | string; +@@ -3584,6 +3664,7 @@ declare namespace types { + TrafficType, + Modality, + MediaResolution, ++ FeatureSelectionPreference, + DynamicRetrievalConfigMode, + FunctionCallingConfigMode, + SafetyFilterLevel, +@@ -3610,6 +3691,7 @@ declare namespace types { + Content, + HttpOptions, + Schema, ++ ModelSelectionConfig, + SafetySetting, + FunctionDeclaration, + GoogleSearch, +@@ -3617,6 +3699,12 @@ declare namespace types { + GoogleSearchRetrieval, + VertexAISearch, + VertexRagStoreRagResource, ++ RagRetrievalConfigFilter, ++ RagRetrievalConfigHybridSearch, ++ RagRetrievalConfigRankingLlmRanker, ++ RagRetrievalConfigRankingRankService, ++ RagRetrievalConfigRanking, ++ RagRetrievalConfig, + VertexRagStore, + Retrieval, + ToolCodeExecution, +@@ -3749,6 +3837,7 @@ declare namespace types { + SessionResumptionConfig, + SlidingWindow, + ContextWindowCompressionConfig, ++ AudioTranscriptionConfig, + LiveClientSetup, + LiveClientContent, + ActivityStart, +@@ -3756,7 +3845,6 @@ declare namespace types { + LiveClientRealtimeInput, + LiveClientToolResponse, + LiveClientMessage, +- AudioTranscriptionConfig, + LiveConnectConfig, + LiveConnectParameters, + CreateChatParameters, +@@ -3909,6 +3997,8 @@ export declare interface VertexRagStore { + ragCorpora?: string[]; + /** Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. */ + ragResources?: VertexRagStoreRagResource[]; ++ /** Optional. The retrieval config for the Rag query. */ ++ ragRetrievalConfig?: RagRetrievalConfig; + /** Optional. Number of top k results to return from the selected corpora. */ + similarityTopK?: number; + /** Optional. Only return results with vector distance smaller than the threshold. */ diff --git a/electron.vite.config.ts b/electron.vite.config.ts index d0ceafc0..9bc9c472 100644 --- a/electron.vite.config.ts +++ b/electron.vite.config.ts @@ -1,4 +1,4 @@ -import react from '@vitejs/plugin-react' +import viteReact from '@vitejs/plugin-react' import { defineConfig, externalizeDepsPlugin } from 'electron-vite' import { resolve } from 'path' import { visualizer } from 'rollup-plugin-visualizer' @@ -6,7 +6,7 @@ import { visualizer } from 'rollup-plugin-visualizer' const visualizerPlugin = (type: 'renderer' | 'main') => { return process.env[`VISUALIZER_${type.toUpperCase()}`] ? [visualizer({ open: true })] : [] } - +// const viteReact = await import('@vitejs/plugin-react') export default defineConfig({ main: { plugins: [ @@ -51,7 +51,7 @@ export default defineConfig({ }, renderer: { plugins: [ - react({ + viteReact({ babel: { plugins: [ [ diff --git a/package.json b/package.json index 902071d3..bd300c04 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,6 @@ "@cherrystudio/embedjs-openai": "^0.1.28", "@electron-toolkit/utils": "^3.0.0", "@electron/notarize": "^2.5.0", - "@google/generative-ai": "^0.24.0", "@langchain/community": "^0.3.36", "@mozilla/readability": "^0.6.0", "@notionhq/client": "^2.2.15", @@ -74,6 +73,7 @@ "@xyflow/react": "^12.4.4", "adm-zip": "^0.5.16", "async-mutex": "^0.5.0", + "bufferutil": "^4.0.9", "color": "^5.0.0", "diff": "^7.0.0", "docx": "^9.0.2", @@ -96,6 +96,7 @@ "turndown-plugin-gfm": "^1.0.2", "undici": "^7.4.0", "webdav": "^5.8.0", + "ws": "^8.18.1", "zipread": "^1.3.3" }, "devDependencies": { @@ -112,7 +113,7 @@ "@emotion/is-prop-valid": "^1.3.1", "@eslint-react/eslint-plugin": "^1.36.1", "@eslint/js": "^9.22.0", - "@google/genai": "^0.4.0", + "@google/genai": "patch:@google/genai@npm%3A0.8.0#~/.yarn/patches/@google-genai-npm-0.8.0-450d0d9a7d.patch", "@hello-pangea/dnd": "^16.6.0", "@kangfenmao/keyv-storage": "^0.1.0", "@modelcontextprotocol/sdk": "^1.9.0", @@ -133,7 +134,8 @@ "@types/react-dom": "^19.0.4", "@types/react-infinite-scroll-component": "^5.0.0", "@types/tinycolor2": "^1", - "@vitejs/plugin-react": "^4.2.1", + "@types/ws": "^8", + "@vitejs/plugin-react": "4.3.4", "analytics": "^0.8.16", "antd": "^5.22.5", "applescript": "^1.0.0", diff --git a/src/main/services/GeminiService.ts b/src/main/services/GeminiService.ts index b79193ff..d2e46f4b 100644 --- a/src/main/services/GeminiService.ts +++ b/src/main/services/GeminiService.ts @@ -1,4 +1,4 @@ -import { FileMetadataResponse, FileState, GoogleAIFileManager } from '@google/generative-ai/server' +import { File, FileState, GoogleGenAI, Pager } from '@google/genai' import { FileType } from '@types' import fs from 'fs' @@ -8,11 +8,15 @@ export class GeminiService { private static readonly FILE_LIST_CACHE_KEY = 'gemini_file_list' private static readonly CACHE_DURATION = 3000 - static async uploadFile(_: Electron.IpcMainInvokeEvent, file: FileType, apiKey: string) { - const fileManager = new GoogleAIFileManager(apiKey) - const uploadResult = await fileManager.uploadFile(file.path, { - mimeType: 'application/pdf', - displayName: file.origin_name + static async uploadFile(_: Electron.IpcMainInvokeEvent, file: FileType, apiKey: string): Promise { + const sdk = new GoogleGenAI({ vertexai: false, apiKey }) + const uploadResult = await sdk.files.upload({ + file: file.path, + config: { + mimeType: 'application/pdf', + name: file.id, + displayName: file.origin_name + } }) return uploadResult } @@ -24,40 +28,42 @@ export class GeminiService { } } - static async retrieveFile( - _: Electron.IpcMainInvokeEvent, - file: FileType, - apiKey: string - ): Promise { - const fileManager = new GoogleAIFileManager(apiKey) - + static async retrieveFile(_: Electron.IpcMainInvokeEvent, file: FileType, apiKey: string): Promise { + const sdk = new GoogleGenAI({ vertexai: false, apiKey }) const cachedResponse = CacheService.get(GeminiService.FILE_LIST_CACHE_KEY) if (cachedResponse) { return GeminiService.processResponse(cachedResponse, file) } - const response = await fileManager.listFiles() + const response = await sdk.files.list() CacheService.set(GeminiService.FILE_LIST_CACHE_KEY, response, GeminiService.CACHE_DURATION) return GeminiService.processResponse(response, file) } - private static processResponse(response: any, file: FileType) { - if (response.files) { - return response.files - .filter((file) => file.state === FileState.ACTIVE) - .find((i) => i.displayName === file.origin_name && Number(i.sizeBytes) === file.size) + private static async processResponse(response: Pager, file: FileType) { + for await (const f of response) { + if (f.state === FileState.ACTIVE) { + if (f.displayName === file.origin_name && Number(f.sizeBytes) === file.size) { + return f + } + } } + return undefined } - static async listFiles(_: Electron.IpcMainInvokeEvent, apiKey: string) { - const fileManager = new GoogleAIFileManager(apiKey) - return await fileManager.listFiles() + static async listFiles(_: Electron.IpcMainInvokeEvent, apiKey: string): Promise { + const sdk = new GoogleGenAI({ vertexai: false, apiKey }) + const files: File[] = [] + for await (const f of await sdk.files.list()) { + files.push(f) + } + return files } - static async deleteFile(_: Electron.IpcMainInvokeEvent, apiKey: string, fileId: string) { - const fileManager = new GoogleAIFileManager(apiKey) - await fileManager.deleteFile(fileId) + static async deleteFile(_: Electron.IpcMainInvokeEvent, fileId: string, apiKey: string) { + const sdk = new GoogleGenAI({ vertexai: false, apiKey }) + await sdk.files.delete({ name: fileId }) } } diff --git a/src/preload/index.d.ts b/src/preload/index.d.ts index 163780e5..536850f8 100644 --- a/src/preload/index.d.ts +++ b/src/preload/index.d.ts @@ -1,6 +1,6 @@ import { ExtractChunkData } from '@cherrystudio/embedjs-interfaces' import { ElectronAPI } from '@electron-toolkit/preload' -import type { FileMetadataResponse, ListFilesResponse, UploadFileResponse } from '@google/generative-ai/server' +import type { File } from '@google/genai' import type { GetMCPPromptResponse, MCPPrompt, MCPResource, MCPServer, MCPTool } from '@renderer/types' import { AppInfo, FileType, KnowledgeBaseParams, KnowledgeItem, LanguageVarious, WebDavConfig } from '@renderer/types' import type { LoaderReturn } from '@shared/config/types' @@ -119,11 +119,11 @@ declare global { resetMinimumSize: () => Promise } gemini: { - uploadFile: (file: FileType, apiKey: string) => Promise - retrieveFile: (file: FileType, apiKey: string) => Promise + uploadFile: (file: FileType, apiKey: string) => Promise + retrieveFile: (file: FileType, apiKey: string) => Promise base64File: (file: FileType) => Promise<{ data: string; mimeType: string }> - listFiles: (apiKey: string) => Promise - deleteFile: (apiKey: string, fileId: string) => Promise + listFiles: (apiKey: string) => Promise + deleteFile: (fileId: string, apiKey: string) => Promise } selectionMenu: { action: (action: string) => Promise diff --git a/src/renderer/src/pages/files/GeminiFiles.tsx b/src/renderer/src/pages/files/GeminiFiles.tsx index 9d9035f8..71ad3a1e 100644 --- a/src/renderer/src/pages/files/GeminiFiles.tsx +++ b/src/renderer/src/pages/files/GeminiFiles.tsx @@ -1,5 +1,5 @@ import { DeleteOutlined } from '@ant-design/icons' -import type { FileMetadataResponse } from '@google/generative-ai/server' +import type { File } from '@google/genai' import { useProvider } from '@renderer/hooks/useProvider' import { runAsyncFunction } from '@renderer/utils' import { MB } from '@shared/config/constant' @@ -16,11 +16,11 @@ interface GeminiFilesProps { const GeminiFiles: FC = ({ id }) => { const { provider } = useProvider(id) - const [files, setFiles] = useState([]) + const [files, setFiles] = useState([]) const [loading, setLoading] = useState(false) const fetchFiles = useCallback(async () => { - const { files } = await window.api.gemini.listFiles(provider.apiKey) + const files = await window.api.gemini.listFiles(provider.apiKey) files && setFiles(files.filter((file) => file.state === 'ACTIVE')) }, [provider]) @@ -60,14 +60,14 @@ const GeminiFiles: FC = ({ id }) => { key={file.name} fileInfo={{ name: file.displayName, - ext: `.${file.name.split('.').pop()}`, - extra: `${dayjs(file.createTime).format('MM-DD HH:mm')} · ${(parseInt(file.sizeBytes) / MB).toFixed(2)} MB`, + ext: `.${file.name?.split('.').pop()}`, + extra: `${dayjs(file.createTime).format('MM-DD HH:mm')} · ${(parseInt(file.sizeBytes || '0') / MB).toFixed(2)} MB`, actions: ( { setFiles(files.filter((f) => f.name !== file.name)) - window.api.gemini.deleteFile(provider.apiKey, file.name).catch((error) => { + window.api.gemini.deleteFile(file.name!, provider.apiKey).catch((error) => { console.error('Failed to delete file:', error) setFiles((prev) => [...prev, file]) }) diff --git a/src/renderer/src/pages/settings/AssistantSettings/AssistantMCPSettings.tsx b/src/renderer/src/pages/settings/AssistantSettings/AssistantMCPSettings.tsx index 36fbd5a1..51fed3d5 100644 --- a/src/renderer/src/pages/settings/AssistantSettings/AssistantMCPSettings.tsx +++ b/src/renderer/src/pages/settings/AssistantSettings/AssistantMCPSettings.tsx @@ -173,13 +173,13 @@ const ServerName = styled.div` const ServerDescription = styled.div` font-size: 0.85rem; - color: ${(props) => props.theme.colors?.textSecondary || '#8c8c8c'}; + color: var(--color-text-2); margin-bottom: 3px; ` const ServerUrl = styled.div` font-size: 0.8rem; - color: ${(props) => props.theme.colors?.textTertiary || '#bfbfbf'}; + color: var(--color-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; diff --git a/src/renderer/src/providers/AiProvider/GeminiProvider.ts b/src/renderer/src/providers/AiProvider/GeminiProvider.ts index f337f802..40bdfc5e 100644 --- a/src/renderer/src/providers/AiProvider/GeminiProvider.ts +++ b/src/renderer/src/providers/AiProvider/GeminiProvider.ts @@ -1,25 +1,18 @@ -import { - ContentListUnion, - createPartFromBase64, - FinishReason, - GenerateContentResponse, - GoogleGenAI -} from '@google/genai' import { Content, - FileDataPart, - GenerateContentStreamResult, - GoogleGenerativeAI, + File, + GenerateContentConfig, + GenerateContentResponse, + GoogleGenAI, HarmBlockThreshold, HarmCategory, - InlineDataPart, + Modality, Part, - RequestOptions, + PartUnion, SafetySetting, - TextPart, - Tool -} from '@google/generative-ai' -import { isGemmaModel, isVisionModel, isWebSearchModel } from '@renderer/config/models' + ToolListUnion +} from '@google/genai' +import { isGemmaModel, isGenerateImageModel, isVisionModel, isWebSearchModel } from '@renderer/config/models' import { getStoreSetting } from '@renderer/hooks/useSettings' import i18n from '@renderer/i18n' import { getAssistantSettings, getDefaultModel, getTopNamingModel } from '@renderer/services/AssistantService' @@ -39,22 +32,15 @@ import axios from 'axios' import { flatten, isEmpty, takeRight } from 'lodash' import OpenAI from 'openai' -import { ChunkCallbackData, CompletionsParams } from '.' +import { CompletionsParams } from '.' import BaseProvider from './BaseProvider' export default class GeminiProvider extends BaseProvider { - private sdk: GoogleGenerativeAI - private requestOptions: RequestOptions - private imageSdk: GoogleGenAI + private sdk: GoogleGenAI constructor(provider: Provider) { super(provider) - this.sdk = new GoogleGenerativeAI(this.apiKey) - /// this sdk is experimental - this.imageSdk = new GoogleGenAI({ apiKey: this.apiKey, httpOptions: { baseUrl: this.getBaseURL() } }) - this.requestOptions = { - baseUrl: this.getBaseURL() - } + this.sdk = new GoogleGenAI({ vertexai: false, apiKey: this.apiKey, httpOptions: { baseUrl: this.getBaseURL() } }) } public getBaseURL(): string { @@ -76,31 +62,31 @@ export default class GeminiProvider extends BaseProvider { inlineData: { data, mimeType - } - } as InlineDataPart + } as Part['inlineData'] + } } // Retrieve file from Gemini uploaded files - const fileMetadata = await window.api.gemini.retrieveFile(file, this.apiKey) + const fileMetadata: File | undefined = await window.api.gemini.retrieveFile(file, this.apiKey) if (fileMetadata) { return { fileData: { fileUri: fileMetadata.uri, mimeType: fileMetadata.mimeType - } - } as FileDataPart + } as Part['fileData'] + } } // If file is not found, upload it to Gemini - const uploadResult = await window.api.gemini.uploadFile(file, this.apiKey) + const result = await window.api.gemini.uploadFile(file, this.apiKey) return { fileData: { - fileUri: uploadResult.file.uri, - mimeType: uploadResult.file.mimeType - } - } as FileDataPart + fileUri: result.uri, + mimeType: result.mimeType + } as Part['fileData'] + } } /** @@ -125,8 +111,8 @@ export default class GeminiProvider extends BaseProvider { inlineData: { data: base64Data, mimeType: mimeType - } - } as InlineDataPart) + } as Part['inlineData'] + }) } } } @@ -139,8 +125,8 @@ export default class GeminiProvider extends BaseProvider { inlineData: { data: base64Data.base64, mimeType: base64Data.mime - } - } as InlineDataPart) + } as Part['inlineData'] + }) } if (file.ext === '.pdf') { @@ -152,13 +138,13 @@ export default class GeminiProvider extends BaseProvider { const fileContent = await (await window.api.file.read(file.id + file.ext)).trim() parts.push({ text: file.origin_name + '\n' + fileContent - } as TextPart) + }) } } return { role, - parts + parts: parts } } @@ -204,165 +190,215 @@ export default class GeminiProvider extends BaseProvider { * @param onChunk - The onChunk callback * @param onFilterMessages - The onFilterMessages callback */ - public async completions({ messages, assistant, mcpTools, onChunk, onFilterMessages }: CompletionsParams) { - if (assistant.enableGenerateImage) { - await this.generateImageExp({ messages, assistant, onFilterMessages, onChunk }) - } else { - const defaultModel = getDefaultModel() - const model = assistant.model || defaultModel - const { contextCount, maxTokens, streamOutput } = getAssistantSettings(assistant) + public async completions({ + messages, + assistant, + mcpTools, + onChunk, + onFilterMessages + }: CompletionsParams): Promise { + const defaultModel = getDefaultModel() + const model = assistant.model || defaultModel + const { contextCount, maxTokens, streamOutput } = getAssistantSettings(assistant) - const userMessages = filterUserRoleStartMessages( - filterEmptyMessages(filterContextMessages(takeRight(messages, contextCount + 2))) - ) - onFilterMessages(userMessages) + const userMessages = filterUserRoleStartMessages( + filterEmptyMessages(filterContextMessages(takeRight(messages, contextCount + 2))) + ) + onFilterMessages(userMessages) - const userLastMessage = userMessages.pop() + const userLastMessage = userMessages.pop() - const history: Content[] = [] + const history: Content[] = [] - for (const message of userMessages) { - history.push(await this.getMessageContents(message)) - } + for (const message of userMessages) { + history.push(await this.getMessageContents(message)) + } - let systemInstruction = assistant.prompt + let systemInstruction = assistant.prompt - if (mcpTools && mcpTools.length > 0) { - systemInstruction = buildSystemPrompt(assistant.prompt || '', mcpTools) - } + if (mcpTools && mcpTools.length > 0) { + systemInstruction = buildSystemPrompt(assistant.prompt || '', mcpTools) + } - // const tools = mcpToolsToGeminiTools(mcpTools) - const tools: Tool[] = [] - const toolResponses: MCPToolResponse[] = [] + // const tools = mcpToolsToGeminiTools(mcpTools) + const tools: ToolListUnion = [] + const toolResponses: MCPToolResponse[] = [] - if (!WebSearchService.isOverwriteEnabled() && assistant.enableWebSearch && isWebSearchModel(model)) { - tools.push({ - // @ts-ignore googleSearch is not a valid tool for Gemini - googleSearch: {} - }) - } + if (!WebSearchService.isOverwriteEnabled() && assistant.enableWebSearch && isWebSearchModel(model)) { + tools.push({ + // @ts-ignore googleSearch is not a valid tool for Gemini + googleSearch: {} + }) + } - const geminiModel = this.sdk.getGenerativeModel( - { - model: model.id, - ...(isGemmaModel(model) ? {} : { systemInstruction: systemInstruction }), - safetySettings: this.getSafetySettings(model.id), - tools: tools, - generationConfig: { - maxOutputTokens: maxTokens, - temperature: assistant?.settings?.temperature, - topP: assistant?.settings?.topP, - ...this.getCustomParameters(assistant) + const generateContentConfig: GenerateContentConfig = { + responseModalities: [Modality.TEXT, Modality.IMAGE], + responseMimeType: 'text/plain', + safetySettings: this.getSafetySettings(model.id), + // generate image don't need system instruction + systemInstruction: isGemmaModel(model) || isGenerateImageModel(model) ? undefined : systemInstruction, + temperature: assistant?.settings?.temperature, + topP: assistant?.settings?.topP, + maxOutputTokens: maxTokens, + tools: tools, + ...this.getCustomParameters(assistant) + } + + const messageContents: Content = await this.getMessageContents(userLastMessage!) + + const chat = this.sdk.chats.create({ + model: model.id, + config: generateContentConfig, + history: history + }) + + if (isGemmaModel(model) && assistant.prompt) { + const isFirstMessage = history.length === 0 + if (isFirstMessage && messageContents) { + const systemMessage = [ + { + text: + 'user\n' + + systemInstruction + + '\n' + + 'user\n' + + (messageContents?.parts?.[0] as Part).text + + '' } - }, - this.requestOptions - ) - - const chat = geminiModel.startChat({ history }) - const messageContents = await this.getMessageContents(userLastMessage!) - - if (isGemmaModel(model) && assistant.prompt) { - const isFirstMessage = history.length === 0 - if (isFirstMessage) { - const systemMessage = { - role: 'user', - parts: [ - { - text: - 'user\n' + - systemInstruction + - '\n' + - 'user\n' + - messageContents.parts[0].text + - '' - } - ] - } - messageContents.parts = systemMessage.parts + ] as Part[] + if (messageContents && messageContents.parts) { + messageContents.parts[0] = systemMessage[0] } } + } - const start_time_millsec = new Date().getTime() - const { abortController, cleanup } = this.createAbortController(userLastMessage?.id) - const { signal } = abortController + const start_time_millsec = new Date().getTime() + + const { cleanup, abortController } = this.createAbortController(userLastMessage?.id, true) + const signalProxy = { + _originalSignal: abortController.signal, + + addEventListener: (eventName: string, listener: () => void) => { + if (eventName === 'abort') { + abortController.signal.addEventListener('abort', listener) + } + }, + removeEventListener: (eventName: string, listener: () => void) => { + if (eventName === 'abort') { + abortController.signal.removeEventListener('abort', listener) + } + }, + get aborted() { + return abortController.signal.aborted + } + } + + if (!streamOutput) { + const response = await chat.sendMessage({ + message: messageContents as PartUnion, + config: { + ...generateContentConfig, + httpOptions: { + signal: signalProxy as any + } + } + }) + const time_completion_millsec = new Date().getTime() - start_time_millsec + onChunk({ + text: response.text, + usage: { + prompt_tokens: response.usageMetadata?.promptTokenCount || 0, + completion_tokens: response.usageMetadata?.candidatesTokenCount || 0, + total_tokens: response.usageMetadata?.totalTokenCount || 0 + }, + metrics: { + completion_tokens: response.usageMetadata?.candidatesTokenCount, + time_completion_millsec, + time_first_token_millsec: 0 + }, + search: response.candidates?.[0]?.groundingMetadata + }) + return + } + + const userMessagesStream = await chat.sendMessageStream({ + message: messageContents as PartUnion, + config: { + ...generateContentConfig, + httpOptions: { + signal: signalProxy as any + } + } + }) + let time_first_token_millsec = 0 + + const processToolUses = async (content: string, idx: number) => { + const toolResults = await parseAndCallTools( + content, + toolResponses, + onChunk, + idx, + mcpToolCallResponseToGeminiMessage, + mcpTools, + isVisionModel(model) + ) + if (toolResults && toolResults.length > 0) { + history.push(messageContents) + const newChat = this.sdk.chats.create({ + model: model.id, + config: generateContentConfig, + history: history as Content[] + }) + const newStream = await newChat.sendMessageStream({ + message: flatten(toolResults.map((ts) => (ts as Content).parts)) as PartUnion, + config: { + ...generateContentConfig, + httpOptions: { + signal: signalProxy as any + } + } + }) + await processStream(newStream, idx + 1) + } + } + + const processStream = async (stream: AsyncGenerator, idx: number) => { + let content = '' + for await (const chunk of stream) { + if (window.keyv.get(EVENT_NAMES.CHAT_COMPLETION_PAUSED)) break + + if (time_first_token_millsec == 0) { + time_first_token_millsec = new Date().getTime() - start_time_millsec + } - if (!streamOutput) { - const { response } = await chat.sendMessage(messageContents.parts, { signal }) const time_completion_millsec = new Date().getTime() - start_time_millsec + + if (chunk.text !== undefined) { + content += chunk.text + } + await processToolUses(content, idx) + const generateImage = this.processGeminiImageResponse(chunk) + onChunk({ - text: response.candidates?.[0].content.parts[0].text, + text: chunk.text !== undefined ? chunk.text : '', usage: { - prompt_tokens: response.usageMetadata?.promptTokenCount || 0, - completion_tokens: response.usageMetadata?.candidatesTokenCount || 0, - total_tokens: response.usageMetadata?.totalTokenCount || 0 + prompt_tokens: chunk.usageMetadata?.promptTokenCount || 0, + completion_tokens: chunk.usageMetadata?.candidatesTokenCount || 0, + total_tokens: chunk.usageMetadata?.totalTokenCount || 0 }, metrics: { - completion_tokens: response.usageMetadata?.candidatesTokenCount, + completion_tokens: chunk.usageMetadata?.candidatesTokenCount, time_completion_millsec, - time_first_token_millsec: 0 + time_first_token_millsec }, - search: response.candidates?.[0]?.groundingMetadata + search: chunk.candidates?.[0]?.groundingMetadata, + mcpToolResponse: toolResponses, + generateImage: generateImage }) - return } - - const userMessagesStream = await chat.sendMessageStream(messageContents.parts, { signal }) - let time_first_token_millsec = 0 - - const processToolUses = async (content: string, idx: number) => { - const toolResults = await parseAndCallTools( - content, - toolResponses, - onChunk, - idx, - mcpToolCallResponseToGeminiMessage, - mcpTools, - isVisionModel(model) - ) - if (toolResults && toolResults.length > 0) { - history.push(messageContents) - const newChat = geminiModel.startChat({ history }) - const newStream = await newChat.sendMessageStream(flatten(toolResults.map((ts) => (ts as Content).parts)), { - signal - }) - await processStream(newStream, idx + 1) - } - } - - const processStream = async (stream: GenerateContentStreamResult, idx: number) => { - let content = '' - for await (const chunk of stream.stream) { - if (window.keyv.get(EVENT_NAMES.CHAT_COMPLETION_PAUSED)) break - - if (time_first_token_millsec == 0) { - time_first_token_millsec = new Date().getTime() - start_time_millsec - } - - const time_completion_millsec = new Date().getTime() - start_time_millsec - - content += chunk.text() - processToolUses(content, idx) - - onChunk({ - text: chunk.text(), - usage: { - prompt_tokens: chunk.usageMetadata?.promptTokenCount || 0, - completion_tokens: chunk.usageMetadata?.candidatesTokenCount || 0, - total_tokens: chunk.usageMetadata?.totalTokenCount || 0 - }, - metrics: { - completion_tokens: chunk.usageMetadata?.candidatesTokenCount, - time_completion_millsec, - time_first_token_millsec - }, - search: chunk.candidates?.[0]?.groundingMetadata, - mcpToolResponse: toolResponses - }) - } - } - - await processStream(userMessagesStream, 0).finally(cleanup) } + + await processStream(userMessagesStream, 0).finally(cleanup) } /** @@ -372,39 +408,51 @@ export default class GeminiProvider extends BaseProvider { * @param onResponse - The onResponse callback * @returns The translated message */ - async translate(message: Message, assistant: Assistant, onResponse?: (text: string) => void) { + public async translate(message: Message, assistant: Assistant, onResponse?: (text: string) => void) { const defaultModel = getDefaultModel() const { maxTokens } = getAssistantSettings(assistant) const model = assistant.model || defaultModel - const geminiModel = this.sdk.getGenerativeModel( - { - model: model.id, - ...(isGemmaModel(model) ? {} : { systemInstruction: assistant.prompt }), - generationConfig: { - maxOutputTokens: maxTokens, - temperature: assistant?.settings?.temperature - } - }, - this.requestOptions - ) - const content = isGemmaModel(model) && assistant.prompt ? `user\n${assistant.prompt}\nuser\n${message.content}` : message.content - if (!onResponse) { - const { response } = await geminiModel.generateContent(content) - return response.text() + const response = await this.sdk.models.generateContent({ + model: model.id, + config: { + maxOutputTokens: maxTokens, + temperature: assistant?.settings?.temperature, + systemInstruction: isGemmaModel(model) ? undefined : assistant.prompt + }, + contents: [ + { + role: 'user', + parts: [{ text: content }] + } + ] + }) + return response.text || '' } - const response = await geminiModel.generateContentStream(content) - + const response = await this.sdk.models.generateContentStream({ + model: model.id, + config: { + maxOutputTokens: maxTokens, + temperature: assistant?.settings?.temperature, + systemInstruction: isGemmaModel(model) ? undefined : assistant.prompt + }, + contents: [ + { + role: 'user', + parts: [{ text: content }] + } + ] + }) let text = '' - for await (const chunk of response.stream) { - text += chunk.text() + for await (const chunk of response) { + text += chunk.text onResponse(text) } @@ -442,25 +490,24 @@ export default class GeminiProvider extends BaseProvider { content: userMessageContent } - const geminiModel = this.sdk.getGenerativeModel( - { - model: model.id, - ...(isGemmaModel(model) ? {} : { systemInstruction: systemMessage.content }), - generationConfig: { - temperature: assistant?.settings?.temperature - } - }, - this.requestOptions - ) - - const chat = await geminiModel.startChat() const content = isGemmaModel(model) ? `user\n${systemMessage.content}\nuser\n${userMessage.content}` : userMessage.content - const { response } = await chat.sendMessage(content) + const response = await this.sdk.models.generateContent({ + model: model.id, + config: { + systemInstruction: isGemmaModel(model) ? undefined : systemMessage.content + }, + contents: [ + { + role: 'user', + parts: [{ text: content }] + } + ] + }) - return removeSpecialCharactersForTopicName(response.text()) + return removeSpecialCharactersForTopicName(response.text || '') } /** @@ -471,24 +518,23 @@ export default class GeminiProvider extends BaseProvider { */ public async generateText({ prompt, content }: { prompt: string; content: string }): Promise { const model = getDefaultModel() - const systemMessage = { role: 'system', content: prompt } - - const geminiModel = this.sdk.getGenerativeModel( - { - model: model.id, - ...(isGemmaModel(model) ? {} : { systemInstruction: systemMessage.content }) - }, - this.requestOptions - ) - - const chat = await geminiModel.startChat() - const messageContent = isGemmaModel(model) + const MessageContent = isGemmaModel(model) ? `user\n${prompt}\nuser\n${content}` : content + const response = await this.sdk.models.generateContent({ + model: model.id, + config: { + systemInstruction: isGemmaModel(model) ? undefined : prompt + }, + contents: [ + { + role: 'user', + parts: [{ text: MessageContent }] + } + ] + }) - const { response } = await chat.sendMessage(messageContent) - - return response.text() + return response.text || '' } /** @@ -518,24 +564,28 @@ export default class GeminiProvider extends BaseProvider { content: messages.map((m) => m.content).join('\n') } - const geminiModel = this.sdk.getGenerativeModel( - { - model: model.id, - systemInstruction: systemMessage.content, - generationConfig: { - temperature: assistant?.settings?.temperature + const content = isGemmaModel(model) + ? `user\n${systemMessage.content}\nuser\n${userMessage.content}` + : userMessage.content + + const response = await this.sdk.models.generateContent({ + model: model.id, + config: { + systemInstruction: isGemmaModel(model) ? undefined : systemMessage.content, + temperature: assistant?.settings?.temperature, + httpOptions: { + timeout: 20 * 1000 } }, - { - ...this.requestOptions, - timeout: 20 * 1000 - } - ) + contents: [ + { + role: 'user', + parts: [{ text: content }] + } + ] + }) - const chat = await geminiModel.startChat() - const { response } = await chat.sendMessage(userMessage.content) - - return response.text() + return response.text || '' } /** @@ -546,144 +596,13 @@ export default class GeminiProvider extends BaseProvider { return [] } - /** - * 生成图像 - * @param messages - 消息列表 - * @param assistant - 助手配置 - * @param onChunk - 处理生成块的回调 - * @param onFilterMessages - 过滤消息的回调 - * @returns Promise - */ - private async generateImageExp({ messages, assistant, onChunk, onFilterMessages }: CompletionsParams): Promise { - const defaultModel = getDefaultModel() - const model = assistant.model || defaultModel - const { contextCount, streamOutput, maxTokens } = getAssistantSettings(assistant) - - const userMessages = filterUserRoleStartMessages(filterContextMessages(takeRight(messages, contextCount + 2))) - onFilterMessages(userMessages) - - const userLastMessage = userMessages.pop() - if (!userLastMessage) { - throw new Error('No user message found') - } - - const history: Content[] = [] - - for (const message of userMessages) { - history.push(await this.getMessageContents(message)) - } - - const userLastMessageContent = await this.getMessageContents(userLastMessage) - const allContents = [...history, userLastMessageContent] - - let contents: ContentListUnion = allContents.length > 0 ? (allContents as ContentListUnion) : [] - - contents = await this.addImageFileToContents(userLastMessage, contents) - - if (!streamOutput) { - const response = await this.callGeminiGenerateContent(model.id, contents, maxTokens) - - const { isValid, message } = this.isValidGeminiResponse(response) - if (!isValid) { - throw new Error(`Gemini API error: ${message}`) - } - - this.processGeminiImageResponse(response, onChunk) - return - } - const response = await this.callGeminiGenerateContentStream(model.id, contents, maxTokens) - - for await (const chunk of response) { - this.processGeminiImageResponse(chunk, onChunk) - } - } - - /** - * 添加图片文件到内容列表 - * @param message - 用户消息 - * @param contents - 内容列表 - * @returns 更新后的内容列表 - */ - private async addImageFileToContents(message: Message, contents: ContentListUnion): Promise { - if (message.files && message.files.length > 0) { - const file = message.files[0] - const fileContent = await window.api.file.base64Image(file.id + file.ext) - - if (fileContent && fileContent.base64) { - const contentsArray = Array.isArray(contents) ? contents : [contents] - return [...contentsArray, createPartFromBase64(fileContent.base64, fileContent.mime)] - } - } - return contents - } - - /** - * 调用Gemini API生成内容 - * @param modelId - 模型ID - * @param contents - 内容列表 - * @returns 生成结果 - */ - private async callGeminiGenerateContent( - modelId: string, - contents: ContentListUnion, - maxTokens?: number - ): Promise { - try { - return await this.imageSdk.models.generateContent({ - model: modelId, - contents: contents, - config: { - responseModalities: ['Text', 'Image'], - responseMimeType: 'text/plain', - maxOutputTokens: maxTokens - } - }) - } catch (error) { - console.error('Gemini API error:', error) - throw error - } - } - - private async callGeminiGenerateContentStream( - modelId: string, - contents: ContentListUnion, - maxTokens?: number - ): Promise> { - try { - return await this.imageSdk.models.generateContentStream({ - model: modelId, - contents: contents, - config: { - responseModalities: ['Text', 'Image'], - responseMimeType: 'text/plain', - maxOutputTokens: maxTokens - } - }) - } catch (error) { - console.error('Gemini API error:', error) - throw error - } - } - - /** - * 检查Gemini响应是否有效 - * @param response - Gemini响应 - * @returns 是否有效 - */ - private isValidGeminiResponse(response: GenerateContentResponse): { isValid: boolean; message: string } { - return { - isValid: response?.candidates?.[0]?.finishReason === FinishReason.STOP ? true : false, - message: response?.candidates?.[0]?.finishReason || '' - } - } - /** * 处理Gemini图像响应 * @param response - Gemini响应 * @param onChunk - 处理生成块的回调 */ - private processGeminiImageResponse(response: any, onChunk: (chunk: ChunkCallbackData) => void): void { - const parts = response.candidates[0].content.parts + private processGeminiImageResponse(chunk: GenerateContentResponse): { type: 'base64'; images: string[] } | undefined { + const parts = chunk.candidates?.[0]?.content?.parts if (!parts) { return } @@ -695,31 +614,13 @@ export default class GeminiProvider extends BaseProvider { return null } const dataPrefix = `data:${part.inlineData.mimeType || 'image/png'};base64,` - return part.inlineData.data.startsWith('data:') ? part.inlineData.data : dataPrefix + part.inlineData.data + return part.inlineData.data?.startsWith('data:') ? part.inlineData.data : dataPrefix + part.inlineData.data }) - // 提取文本数据 - const text = parts - .filter((part: Part) => part.text !== undefined) - .map((part: Part) => part.text) - .join('') - - // 返回结果 - onChunk({ - text, - generateImage: { - type: 'base64', - images - }, - usage: { - prompt_tokens: response.usageMetadata?.promptTokenCount || 0, - completion_tokens: response.usageMetadata?.candidatesTokenCount || 0, - total_tokens: response.usageMetadata?.totalTokenCount || 0 - }, - metrics: { - completion_tokens: response.usageMetadata?.candidatesTokenCount - } - }) + return { + type: 'base64', + images: images.filter((image) => image !== null) + } } /** @@ -732,18 +633,16 @@ export default class GeminiProvider extends BaseProvider { return { valid: false, error: new Error('No model found') } } - const body = { - model: model.id, - messages: [{ role: 'user', content: 'hi' }], - max_tokens: 100, - stream: false - } - try { - const geminiModel = this.sdk.getGenerativeModel({ model: body.model }, this.requestOptions) - const result = await geminiModel.generateContent(body.messages[0].content) + const result = await this.sdk.models.generateContent({ + model: model.id, + contents: [{ role: 'user', parts: [{ text: 'hi' }] }], + config: { + maxOutputTokens: 100 + } + }) return { - valid: !isEmpty(result.response.text()), + valid: !isEmpty(result.text), error: null } } catch (error: any) { @@ -785,7 +684,10 @@ export default class GeminiProvider extends BaseProvider { * @returns The embedding dimensions */ public async getEmbeddingDimensions(model: Model): Promise { - const data = await this.sdk.getGenerativeModel({ model: model.id }, this.requestOptions).embedContent('hi') - return data.embedding.values.length + const data = await this.sdk.models.embedContent({ + model: model.id, + contents: [{ role: 'user', parts: [{ text: 'hi' }] }] + }) + return data.embeddings?.[0]?.values?.length || 0 } } diff --git a/src/renderer/src/providers/AiProvider/index.ts b/src/renderer/src/providers/AiProvider/index.ts index 5a377e30..c31ddae7 100644 --- a/src/renderer/src/providers/AiProvider/index.ts +++ b/src/renderer/src/providers/AiProvider/index.ts @@ -1,4 +1,4 @@ -import type { GroundingMetadata } from '@google/generative-ai' +import type { GroundingMetadata } from '@google/genai' import BaseProvider from '@renderer/providers/AiProvider/BaseProvider' import ProviderFactory from '@renderer/providers/AiProvider/ProviderFactory' import type { diff --git a/src/renderer/src/services/ApiService.ts b/src/renderer/src/services/ApiService.ts index c587bc18..ff1e3457 100644 --- a/src/renderer/src/services/ApiService.ts +++ b/src/renderer/src/services/ApiService.ts @@ -282,6 +282,7 @@ export async function fetchChatCompletion({ } } + console.log('message', message) // Emit chat completion event EventEmitter.emit(EVENT_NAMES.RECEIVE_MESSAGE, message) onResponse(message) diff --git a/src/renderer/src/types/index.ts b/src/renderer/src/types/index.ts index 952b766b..803790c2 100644 --- a/src/renderer/src/types/index.ts +++ b/src/renderer/src/types/index.ts @@ -1,4 +1,4 @@ -import { GroundingMetadata } from '@google/generative-ai' +import { GroundingMetadata } from '@google/genai' import OpenAI from 'openai' import React from 'react' import { BuiltinTheme } from 'shiki' diff --git a/src/renderer/src/utils/formats.ts b/src/renderer/src/utils/formats.ts index 23a57913..e20e44b9 100644 --- a/src/renderer/src/utils/formats.ts +++ b/src/renderer/src/utils/formats.ts @@ -71,8 +71,8 @@ export function withGeminiGrounding(message: Message) { let content = message.content groundingSupports.forEach((support) => { - const text = support?.segment - const indices = support?.groundingChunckIndices + const text = support?.segment?.text + const indices = support?.groundingChunkIndices if (!text || !indices) return diff --git a/src/renderer/src/utils/mcp-tools.ts b/src/renderer/src/utils/mcp-tools.ts index 941cc202..d5a7a8ec 100644 --- a/src/renderer/src/utils/mcp-tools.ts +++ b/src/renderer/src/utils/mcp-tools.ts @@ -1,186 +1,165 @@ import { ContentBlockParam, ToolUnion, ToolUseBlock } from '@anthropic-ai/sdk/resources' import { MessageParam } from '@anthropic-ai/sdk/resources' -import { - ArraySchema, - BaseSchema, - BooleanSchema, - EnumStringSchema, - FunctionCall, - FunctionDeclaration, - FunctionDeclarationSchema, - FunctionDeclarationSchemaProperty, - IntegerSchema, - NumberSchema, - ObjectSchema, - SchemaType, - SimpleStringSchema, - Tool as geminiTool -} from '@google/generative-ai' -import { Content, Part } from '@google/generative-ai' +import { Content, FunctionCall, Part } from '@google/genai' import store from '@renderer/store' import { MCPCallToolResponse, MCPServer, MCPTool, MCPToolResponse } from '@renderer/types' -import { - ChatCompletionContentPart, - ChatCompletionMessageParam, - ChatCompletionMessageToolCall, - ChatCompletionTool -} from 'openai/resources' +import { ChatCompletionContentPart, ChatCompletionMessageParam, ChatCompletionMessageToolCall } from 'openai/resources' import { ChunkCallbackData, CompletionsParams } from '../providers/AiProvider' -const ensureValidSchema = (obj: Record): FunctionDeclarationSchemaProperty => { - // Filter out unsupported keys for Gemini - const filteredObj = filterUnsupportedKeys(obj) +// const ensureValidSchema = (obj: Record) => { +// // Filter out unsupported keys for Gemini +// const filteredObj = filterUnsupportedKeys(obj) - // Handle base schema properties - const baseSchema = { - description: filteredObj.description, - nullable: filteredObj.nullable - } as BaseSchema +// // Handle base schema properties +// const baseSchema = { +// description: filteredObj.description, +// nullable: filteredObj.nullable +// } as BaseSchema - // Handle string type - if (filteredObj.type?.toLowerCase() === SchemaType.STRING) { - if (filteredObj.enum && Array.isArray(filteredObj.enum)) { - return { - ...baseSchema, - type: SchemaType.STRING, - format: 'enum', - enum: filteredObj.enum as string[] - } as EnumStringSchema - } - return { - ...baseSchema, - type: SchemaType.STRING, - format: filteredObj.format === 'date-time' ? 'date-time' : undefined - } as SimpleStringSchema - } +// // Handle string type +// if (filteredObj.type?.toLowerCase() === SchemaType.STRING) { +// if (filteredObj.enum && Array.isArray(filteredObj.enum)) { +// return { +// ...baseSchema, +// type: SchemaType.STRING, +// format: 'enum', +// enum: filteredObj.enum as string[] +// } as EnumStringSchema +// } +// return { +// ...baseSchema, +// type: SchemaType.STRING, +// format: filteredObj.format === 'date-time' ? 'date-time' : undefined +// } as SimpleStringSchema +// } - // Handle number type - if (filteredObj.type?.toLowerCase() === SchemaType.NUMBER) { - return { - ...baseSchema, - type: SchemaType.NUMBER, - format: ['float', 'double'].includes(filteredObj.format) ? (filteredObj.format as 'float' | 'double') : undefined - } as NumberSchema - } +// // Handle number type +// if (filteredObj.type?.toLowerCase() === SchemaType.NUMBER) { +// return { +// ...baseSchema, +// type: SchemaType.NUMBER, +// format: ['float', 'double'].includes(filteredObj.format) ? (filteredObj.format as 'float' | 'double') : undefined +// } as NumberSchema +// } - // Handle integer type - if (filteredObj.type?.toLowerCase() === SchemaType.INTEGER) { - return { - ...baseSchema, - type: SchemaType.INTEGER, - format: ['int32', 'int64'].includes(filteredObj.format) ? (filteredObj.format as 'int32' | 'int64') : undefined - } as IntegerSchema - } +// // Handle integer type +// if (filteredObj.type?.toLowerCase() === SchemaType.INTEGER) { +// return { +// ...baseSchema, +// type: SchemaType.INTEGER, +// format: ['int32', 'int64'].includes(filteredObj.format) ? (filteredObj.format as 'int32' | 'int64') : undefined +// } as IntegerSchema +// } - // Handle boolean type - if (filteredObj.type?.toLowerCase() === SchemaType.BOOLEAN) { - return { - ...baseSchema, - type: SchemaType.BOOLEAN - } as BooleanSchema - } +// // Handle boolean type +// if (filteredObj.type?.toLowerCase() === SchemaType.BOOLEAN) { +// return { +// ...baseSchema, +// type: SchemaType.BOOLEAN +// } as BooleanSchema +// } - // Handle array type - if (filteredObj.type?.toLowerCase() === SchemaType.ARRAY) { - return { - ...baseSchema, - type: SchemaType.ARRAY, - items: filteredObj.items - ? ensureValidSchema(filteredObj.items as Record) - : ({ type: SchemaType.STRING } as SimpleStringSchema), - minItems: filteredObj.minItems, - maxItems: filteredObj.maxItems - } as ArraySchema - } +// // Handle array type +// if (filteredObj.type?.toLowerCase() === SchemaType.ARRAY) { +// return { +// ...baseSchema, +// type: SchemaType.ARRAY, +// items: filteredObj.items +// ? ensureValidSchema(filteredObj.items as Record) +// : ({ type: SchemaType.STRING } as SimpleStringSchema), +// minItems: filteredObj.minItems, +// maxItems: filteredObj.maxItems +// } as ArraySchema +// } - // Handle object type (default) - const properties = filteredObj.properties - ? Object.fromEntries( - Object.entries(filteredObj.properties).map(([key, value]) => [ - key, - ensureValidSchema(value as Record) - ]) - ) - : { _empty: { type: SchemaType.STRING } as SimpleStringSchema } // Ensure properties is never empty +// // Handle object type (default) +// const properties = filteredObj.properties +// ? Object.fromEntries( +// Object.entries(filteredObj.properties).map(([key, value]) => [ +// key, +// ensureValidSchema(value as Record) +// ]) +// ) +// : { _empty: { type: SchemaType.STRING } as SimpleStringSchema } // Ensure properties is never empty - return { - ...baseSchema, - type: SchemaType.OBJECT, - properties, - required: Array.isArray(filteredObj.required) ? filteredObj.required : undefined - } as ObjectSchema -} +// return { +// ...baseSchema, +// type: SchemaType.OBJECT, +// properties, +// required: Array.isArray(filteredObj.required) ? filteredObj.required : undefined +// } as ObjectSchema +// } -function filterUnsupportedKeys(obj: Record): Record { - const supportedBaseKeys = ['description', 'nullable'] - const supportedStringKeys = [...supportedBaseKeys, 'type', 'format', 'enum'] - const supportedNumberKeys = [...supportedBaseKeys, 'type', 'format'] - const supportedBooleanKeys = [...supportedBaseKeys, 'type'] - const supportedArrayKeys = [...supportedBaseKeys, 'type', 'items', 'minItems', 'maxItems'] - const supportedObjectKeys = [...supportedBaseKeys, 'type', 'properties', 'required'] +// function filterUnsupportedKeys(obj: Record): Record { +// const supportedBaseKeys = ['description', 'nullable'] +// const supportedStringKeys = [...supportedBaseKeys, 'type', 'format', 'enum'] +// const supportedNumberKeys = [...supportedBaseKeys, 'type', 'format'] +// const supportedBooleanKeys = [...supportedBaseKeys, 'type'] +// const supportedArrayKeys = [...supportedBaseKeys, 'type', 'items', 'minItems', 'maxItems'] +// const supportedObjectKeys = [...supportedBaseKeys, 'type', 'properties', 'required'] - const filtered: Record = {} +// const filtered: Record = {} - let keysToKeep: string[] +// let keysToKeep: string[] - if (obj.type?.toLowerCase() === SchemaType.STRING) { - keysToKeep = supportedStringKeys - } else if (obj.type?.toLowerCase() === SchemaType.NUMBER) { - keysToKeep = supportedNumberKeys - } else if (obj.type?.toLowerCase() === SchemaType.INTEGER) { - keysToKeep = supportedNumberKeys - } else if (obj.type?.toLowerCase() === SchemaType.BOOLEAN) { - keysToKeep = supportedBooleanKeys - } else if (obj.type?.toLowerCase() === SchemaType.ARRAY) { - keysToKeep = supportedArrayKeys - } else { - // Default to object type - keysToKeep = supportedObjectKeys - } +// if (obj.type?.toLowerCase() === SchemaType.STRING) { +// keysToKeep = supportedStringKeys +// } else if (obj.type?.toLowerCase() === SchemaType.NUMBER) { +// keysToKeep = supportedNumberKeys +// } else if (obj.type?.toLowerCase() === SchemaType.INTEGER) { +// keysToKeep = supportedNumberKeys +// } else if (obj.type?.toLowerCase() === SchemaType.BOOLEAN) { +// keysToKeep = supportedBooleanKeys +// } else if (obj.type?.toLowerCase() === SchemaType.ARRAY) { +// keysToKeep = supportedArrayKeys +// } else { +// // Default to object type +// keysToKeep = supportedObjectKeys +// } - // copy supported keys - for (const key of keysToKeep) { - if (obj[key] !== undefined) { - filtered[key] = obj[key] - } - } +// // copy supported keys +// for (const key of keysToKeep) { +// if (obj[key] !== undefined) { +// filtered[key] = obj[key] +// } +// } - return filtered -} +// return filtered +// } -function filterPropertieAttributes(tool: MCPTool, filterNestedObj: boolean = false): Record { - const properties = tool.inputSchema.properties - if (!properties) { - return {} - } +// function filterPropertieAttributes(tool: MCPTool, filterNestedObj: boolean = false): Record { +// const properties = tool.inputSchema.properties +// if (!properties) { +// return {} +// } - // For OpenAI, we don't need to validate as strictly - if (!filterNestedObj) { - return properties - } +// // For OpenAI, we don't need to validate as strictly +// if (!filterNestedObj) { +// return properties +// } - const processedProperties = Object.fromEntries( - Object.entries(properties).map(([key, value]) => [key, ensureValidSchema(value as Record)]) - ) +// const processedProperties = Object.fromEntries( +// Object.entries(properties).map(([key, value]) => [key, ensureValidSchema(value as Record)]) +// ) - return processedProperties -} +// return processedProperties +// } -export function mcpToolsToOpenAITools(mcpTools: MCPTool[]): Array { - return mcpTools.map((tool) => ({ - type: 'function', - name: tool.name, - function: { - name: tool.id, - description: tool.description, - parameters: { - type: 'object', - properties: filterPropertieAttributes(tool) - } - } - })) -} +// export function mcpToolsToOpenAITools(mcpTools: MCPTool[]): Array { +// return mcpTools.map((tool) => ({ +// type: 'function', +// name: tool.name, +// function: { +// name: tool.id, +// description: tool.description, +// parameters: { +// type: 'object', +// properties: filterPropertieAttributes(tool) +// } +// } +// })) +// } export function openAIToolsToMcpTool( mcpTools: MCPTool[] | undefined, @@ -277,35 +256,35 @@ export function anthropicToolUseToMcpTool(mcpTools: MCPTool[] | undefined, toolU return tool } -export function mcpToolsToGeminiTools(mcpTools: MCPTool[] | undefined): geminiTool[] { - if (!mcpTools || mcpTools.length === 0) { - // No tools available - return [] - } - const functions: FunctionDeclaration[] = [] +// export function mcpToolsToGeminiTools(mcpTools: MCPTool[] | undefined): geminiTool[] { +// if (!mcpTools || mcpTools.length === 0) { +// // No tools available +// return [] +// } +// const functions: FunctionDeclaration[] = [] - for (const tool of mcpTools) { - const properties = filterPropertieAttributes(tool, true) - const functionDeclaration: FunctionDeclaration = { - name: tool.id, - description: tool.description, - parameters: { - type: SchemaType.OBJECT, - properties: - Object.keys(properties).length > 0 - ? Object.fromEntries( - Object.entries(properties).map(([key, value]) => [key, ensureValidSchema(value as Record)]) - ) - : { _empty: { type: SchemaType.STRING } as SimpleStringSchema } - } as FunctionDeclarationSchema - } - functions.push(functionDeclaration) - } - const tool: geminiTool = { - functionDeclarations: functions - } - return [tool] -} +// for (const tool of mcpTools) { +// const properties = filterPropertieAttributes(tool, true) +// const functionDeclaration: FunctionDeclaration = { +// name: tool.id, +// description: tool.description, +// parameters: { +// type: SchemaType.OBJECT, +// properties: +// Object.keys(properties).length > 0 +// ? Object.fromEntries( +// Object.entries(properties).map(([key, value]) => [key, ensureValidSchema(value as Record)]) +// ) +// : { _empty: { type: SchemaType.STRING } as SimpleStringSchema } +// } as FunctionDeclarationSchema +// } +// functions.push(functionDeclaration) +// } +// const tool: geminiTool = { +// functionDeclarations: functions +// } +// return [tool] +// } export function geminiFunctionCallToMcpTool( mcpTools: MCPTool[] | undefined, diff --git a/yarn.lock b/yarn.lock index 022f0952..2b4f2fd1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,58 +12,58 @@ __metadata: languageName: node linkType: hard -"@agentic/core@npm:7.5.3": - version: 7.5.3 - resolution: "@agentic/core@npm:7.5.3" +"@agentic/core@npm:7.6.4": + version: 7.6.4 + resolution: "@agentic/core@npm:7.6.4" dependencies: dedent: "npm:^1.5.3" delay: "npm:^6.0.0" - jsonrepair: "npm:^3.9.0" - ky: "npm:^1.7.5" + jsonrepair: "npm:^3.12.0" + ky: "npm:^1.8.0" openai-zod-to-json-schema: "npm:^1.0.3" - p-throttle: "npm:^6.2.0" - type-fest: "npm:^4.37.0" + p-throttle: "npm:6.2.0" + type-fest: "npm:^4.39.1" zod-validation-error: "npm:^3.4.0" peerDependencies: zod: ^3.24.2 - checksum: 10c0/4c12632be50971d44e9d37cd1231d551f8277c99c7b979bb8cb1dddfc1dcfc2f14e901de9eb7ef16d749107e27a62f19d3d276869755187561a5491d39bf3c43 + checksum: 10c0/64e10f9157134d9d8c6fcec54dced649ef044416e2a4c966cf7c7905852dfa5dfe44fd78a3118e199478be8197a9f0016ebb7fe683a9d25cba0ae25544cba9c3 languageName: node linkType: hard "@agentic/exa@npm:^7.3.3": - version: 7.5.3 - resolution: "@agentic/exa@npm:7.5.3" + version: 7.6.4 + resolution: "@agentic/exa@npm:7.6.4" dependencies: - "@agentic/core": "npm:7.5.3" - ky: "npm:^1.7.5" + "@agentic/core": "npm:7.6.4" + ky: "npm:^1.8.0" peerDependencies: zod: ^3.24.2 - checksum: 10c0/b6c5e5c1c009b03c040c9878dec1a1cf3545b8a4b8a6274dda201e2dd85e3d1a34df72cc1ba6986cd5fc4a77461a293c2e9dc17670a101010359956850ec812e + checksum: 10c0/85ca4831f4e9f83d55c8bbe42c0104085e0a07034c8abde9c24368bb4447caf42ded6b9e89a6c2c4f5e128b3152feedcf6fe311edd9cc884d7399cd2d3fb9668 languageName: node linkType: hard "@agentic/searxng@npm:^7.3.3": - version: 7.5.3 - resolution: "@agentic/searxng@npm:7.5.3" + version: 7.6.4 + resolution: "@agentic/searxng@npm:7.6.4" dependencies: - "@agentic/core": "npm:7.5.3" - ky: "npm:^1.7.5" + "@agentic/core": "npm:7.6.4" + ky: "npm:^1.8.0" peerDependencies: zod: ^3.24.2 - checksum: 10c0/5ff5ac276d6157d25449d6d8bdbb047fd3541f15f990597a4b800650864939b24ab3790810b7c66d6f9d737e2468ec030241d80cb02483748e08bbecae7a7849 + checksum: 10c0/59ee1af246c5d9001504b8e2180f7fc0810f5add7ce646041d1d1c2f3244faae160a0c3f0ddb7b27b3c9c37bb8272524228937d0d431fe7ab4e3cf4c46e0402a languageName: node linkType: hard "@agentic/tavily@npm:^7.3.3": - version: 7.5.3 - resolution: "@agentic/tavily@npm:7.5.3" + version: 7.6.4 + resolution: "@agentic/tavily@npm:7.6.4" dependencies: - "@agentic/core": "npm:7.5.3" - ky: "npm:^1.7.5" - p-throttle: "npm:^6.2.0" + "@agentic/core": "npm:7.6.4" + ky: "npm:^1.8.0" + p-throttle: "npm:6.2.0" peerDependencies: zod: ^3.24.2 - checksum: 10c0/3ed7bd79c4f41b8f49577e49d47e76b591d614ddd8b6add450f4e9ec56ff7d6e5024ce8c03823ce25fde809f148c7a1556907552889c7ce1482d5ea0c322fe35 + checksum: 10c0/ce2b45cdcc907c58ae9aaf139fe99d04a6f783095b68502ffb8291f60c079dde02f637d19f42a17b1a671d0b70d9b903d94a8c940dded35d479c56d44409f893 languageName: node linkType: hard @@ -266,15 +266,15 @@ __metadata: linkType: hard "@asamuzakjp/css-color@npm:^3.1.1": - version: 3.1.1 - resolution: "@asamuzakjp/css-color@npm:3.1.1" + version: 3.1.2 + resolution: "@asamuzakjp/css-color@npm:3.1.2" dependencies: "@csstools/css-calc": "npm:^2.1.2" "@csstools/css-color-parser": "npm:^3.0.8" "@csstools/css-parser-algorithms": "npm:^3.0.4" "@csstools/css-tokenizer": "npm:^3.0.3" lru-cache: "npm:^10.4.3" - checksum: 10c0/4abb010fd29de8acae8571eba738468c22cb45a1f77647df3c59a80f1c83d83d728cae3ebbf99e5c73f2517761abaaffbe5e4176fc46b5f9bf60f1478463b51e + checksum: 10c0/aa3c0dc03ba630e0e1c9cbb54b650301773faa8613794d236e2132fe38f1329f68eec92d8b2c4f0f8aa19ce554a3c4be9ea874224d1472d9d9cb410cbd43683d languageName: node linkType: hard @@ -289,7 +289,7 @@ __metadata: languageName: node linkType: hard -"@babel/compat-data@npm:^7.26.5": +"@babel/compat-data@npm:^7.26.8": version: 7.26.8 resolution: "@babel/compat-data@npm:7.26.8" checksum: 10c0/66408a0388c3457fff1c2f6c3a061278dd7b3d2f0455ea29bb7b187fa52c60ae8b4054b3c0a184e21e45f0eaac63cf390737bc7504d1f4a088a6e7f652c068ca @@ -319,16 +319,16 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.26.10": - version: 7.26.10 - resolution: "@babel/generator@npm:7.26.10" +"@babel/generator@npm:^7.26.10, @babel/generator@npm:^7.27.0": + version: 7.27.0 + resolution: "@babel/generator@npm:7.27.0" dependencies: - "@babel/parser": "npm:^7.26.10" - "@babel/types": "npm:^7.26.10" + "@babel/parser": "npm:^7.27.0" + "@babel/types": "npm:^7.27.0" "@jridgewell/gen-mapping": "npm:^0.3.5" "@jridgewell/trace-mapping": "npm:^0.3.25" jsesc: "npm:^3.0.2" - checksum: 10c0/88b3b3ea80592fc89349c4e1a145e1386e4042866d2507298adf452bf972f68d13bf699a845e6ab8c028bd52c2247013eb1221b86e1db5c9779faacba9c4b10e + checksum: 10c0/7cb10693d2b365c278f109a745dc08856cae139d262748b77b70ce1d97da84627f79648cab6940d847392c0e5d180441669ed958b3aee98d9c7d274b37c553bd languageName: node linkType: hard @@ -342,15 +342,15 @@ __metadata: linkType: hard "@babel/helper-compilation-targets@npm:^7.26.5": - version: 7.26.5 - resolution: "@babel/helper-compilation-targets@npm:7.26.5" + version: 7.27.0 + resolution: "@babel/helper-compilation-targets@npm:7.27.0" dependencies: - "@babel/compat-data": "npm:^7.26.5" + "@babel/compat-data": "npm:^7.26.8" "@babel/helper-validator-option": "npm:^7.25.9" browserslist: "npm:^4.24.0" lru-cache: "npm:^5.1.1" semver: "npm:^6.3.1" - checksum: 10c0/9da5c77e5722f1a2fcb3e893049a01d414124522bbf51323bb1a0c9dcd326f15279836450fc36f83c9e8a846f3c40e88be032ed939c5a9840922bed6073edfb4 + checksum: 10c0/375c9f80e6540118f41bd53dd54d670b8bf91235d631bdead44c8b313b26e9cd89aed5c6df770ad13a87a464497b5346bb72b9462ba690473da422f5402618b6 languageName: node linkType: hard @@ -406,23 +406,23 @@ __metadata: linkType: hard "@babel/helpers@npm:^7.26.10": - version: 7.26.10 - resolution: "@babel/helpers@npm:7.26.10" + version: 7.27.0 + resolution: "@babel/helpers@npm:7.27.0" dependencies: - "@babel/template": "npm:^7.26.9" - "@babel/types": "npm:^7.26.10" - checksum: 10c0/f99e1836bcffce96db43158518bb4a24cf266820021f6461092a776cba2dc01d9fc8b1b90979d7643c5c2ab7facc438149064463a52dd528b21c6ab32509784f + "@babel/template": "npm:^7.27.0" + "@babel/types": "npm:^7.27.0" + checksum: 10c0/a3c64fd2d8b164c041808826cc00769d814074ea447daaacaf2e3714b66d3f4237ef6e420f61d08f463d6608f3468c2ac5124ab7c68f704e20384def5ade95f4 languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.26.10, @babel/parser@npm:^7.26.9": - version: 7.26.10 - resolution: "@babel/parser@npm:7.26.10" +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.26.10, @babel/parser@npm:^7.27.0": + version: 7.27.0 + resolution: "@babel/parser@npm:7.27.0" dependencies: - "@babel/types": "npm:^7.26.10" + "@babel/types": "npm:^7.27.0" bin: parser: ./bin/babel-parser.js - checksum: 10c0/c47f5c0f63cd12a663e9dc94a635f9efbb5059d98086a92286d7764357c66bceba18ccbe79333e01e9be3bfb8caba34b3aaebfd8e62c3d5921c8cf907267be75 + checksum: 10c0/ba2ed3f41735826546a3ef2a7634a8d10351df221891906e59b29b0a0cd748f9b0e7a6f07576858a9de8e77785aad925c8389ddef146de04ea2842047c9d2859 languageName: node linkType: hard @@ -471,47 +471,47 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.10.1, @babel/runtime@npm:^7.10.4, @babel/runtime@npm:^7.11.1, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.16.7, @babel/runtime@npm:^7.18.0, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.0, @babel/runtime@npm:^7.20.7, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.22.5, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.23.6, @babel/runtime@npm:^7.23.9, @babel/runtime@npm:^7.24.1, @babel/runtime@npm:^7.24.4, @babel/runtime@npm:^7.24.7, @babel/runtime@npm:^7.24.8, @babel/runtime@npm:^7.25.7, @babel/runtime@npm:^7.26.0, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.9.2": - version: 7.26.10 - resolution: "@babel/runtime@npm:7.26.10" + version: 7.27.0 + resolution: "@babel/runtime@npm:7.27.0" dependencies: regenerator-runtime: "npm:^0.14.0" - checksum: 10c0/6dc6d88c7908f505c4f7770fb4677dfa61f68f659b943c2be1f2a99cb6680343462867abf2d49822adc435932919b36c77ac60125793e719ea8745f2073d3745 + checksum: 10c0/35091ea9de48bd7fd26fb177693d64f4d195eb58ab2b142b893b7f3fa0f1d7c677604d36499ae0621a3703f35ba0c6a8f6c572cc8f7dc0317213841e493cf663 languageName: node linkType: hard -"@babel/template@npm:^7.26.9": - version: 7.26.9 - resolution: "@babel/template@npm:7.26.9" +"@babel/template@npm:^7.26.9, @babel/template@npm:^7.27.0": + version: 7.27.0 + resolution: "@babel/template@npm:7.27.0" dependencies: "@babel/code-frame": "npm:^7.26.2" - "@babel/parser": "npm:^7.26.9" - "@babel/types": "npm:^7.26.9" - checksum: 10c0/019b1c4129cc01ad63e17529089c2c559c74709d225f595eee017af227fee11ae8a97a6ab19ae6768b8aa22d8d75dcb60a00b28f52e9fa78140672d928bc1ae9 + "@babel/parser": "npm:^7.27.0" + "@babel/types": "npm:^7.27.0" + checksum: 10c0/13af543756127edb5f62bf121f9b093c09a2b6fe108373887ccffc701465cfbcb17e07cf48aa7f440415b263f6ec006e9415c79dfc2e8e6010b069435f81f340 languageName: node linkType: hard "@babel/traverse@npm:^7.25.9, @babel/traverse@npm:^7.26.10": - version: 7.26.10 - resolution: "@babel/traverse@npm:7.26.10" + version: 7.27.0 + resolution: "@babel/traverse@npm:7.27.0" dependencies: "@babel/code-frame": "npm:^7.26.2" - "@babel/generator": "npm:^7.26.10" - "@babel/parser": "npm:^7.26.10" - "@babel/template": "npm:^7.26.9" - "@babel/types": "npm:^7.26.10" + "@babel/generator": "npm:^7.27.0" + "@babel/parser": "npm:^7.27.0" + "@babel/template": "npm:^7.27.0" + "@babel/types": "npm:^7.27.0" debug: "npm:^4.3.1" globals: "npm:^11.1.0" - checksum: 10c0/4e86bb4e3c30a6162bb91df86329df79d96566c3e2d9ccba04f108c30473a3a4fd360d9990531493d90f6a12004f10f616bf9b9229ca30c816b708615e9de2ac + checksum: 10c0/c7af29781960dacaae51762e8bc6c4b13d6ab4b17312990fbca9fc38e19c4ad7fecaae24b1cf52fb844e8e6cdc76c70ad597f90e496bcb3cc0a1d66b41a0aa5b languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.25.9, @babel/types@npm:^7.26.10, @babel/types@npm:^7.26.9": - version: 7.26.10 - resolution: "@babel/types@npm:7.26.10" +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.25.9, @babel/types@npm:^7.26.10, @babel/types@npm:^7.27.0": + version: 7.27.0 + resolution: "@babel/types@npm:7.27.0" dependencies: "@babel/helper-string-parser": "npm:^7.25.9" "@babel/helper-validator-identifier": "npm:^7.25.9" - checksum: 10c0/7a7f83f568bfc3dfabfaf9ae3a97ab5c061726c0afa7dcd94226d4f84a81559da368ed79671e3a8039d16f12476cf110381a377ebdea07587925f69628200dac + checksum: 10c0/6f1592eabe243c89a608717b07b72969be9d9d2fce1dee21426238757ea1fa60fdfc09b29de9e48d8104311afc6e6fb1702565a9cc1e09bc1e76f2b2ddb0f6e1 languageName: node linkType: hard @@ -789,19 +789,19 @@ __metadata: linkType: hard "@electron-toolkit/eslint-config-ts@npm:^3.0.0": - version: 3.0.0 - resolution: "@electron-toolkit/eslint-config-ts@npm:3.0.0" + version: 3.1.0 + resolution: "@electron-toolkit/eslint-config-ts@npm:3.1.0" dependencies: - "@eslint/js": "npm:^9.18.0" - globals: "npm:^15.14.0" - typescript-eslint: "npm:^8.21.0" + "@eslint/js": "npm:^9.24.0" + globals: "npm:^16.0.0" + typescript-eslint: "npm:^8.29.1" peerDependencies: eslint: ">=9.0.0" typescript: "*" peerDependenciesMeta: typescript: optional: true - checksum: 10c0/a972049fb9b08760c4d73c2915e29e1ac0d6bc747c879bde0fe9504b5640982ffa3d8e41f2d3f7e3870dd39424849094a80d4142f27dd757384ae6260dad2bed + checksum: 10c0/9c007612fdfc8e4ba3ed6c330ceb42e3a28370125954dfa4bfe156260770f33c5e9a0aa35020295c795b598116944d126c1f1b27e23d2912940bf0827a47f17e languageName: node linkType: hard @@ -1368,13 +1368,13 @@ __metadata: linkType: hard "@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": - version: 4.5.1 - resolution: "@eslint-community/eslint-utils@npm:4.5.1" + version: 4.6.0 + resolution: "@eslint-community/eslint-utils@npm:4.6.0" dependencies: eslint-visitor-keys: "npm:^3.4.3" peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - checksum: 10c0/b520ae1b7bd04531a5c5da2021071815df4717a9f7d13720e3a5ddccf5c9c619532039830811fcbae1c2f1c9d133e63af2435ee69e0fc0fabbd6d928c6800fb2 + checksum: 10c0/a64131c1b43021e3a84267f6011fd678a936718097c9be169c37a40ada2c7016bec7d6685ecc88112737d57733f36837bb90d9425ad48d2e2aa351d999d32443 languageName: node linkType: hard @@ -1385,62 +1385,63 @@ __metadata: languageName: node linkType: hard -"@eslint-react/ast@npm:1.37.0": - version: 1.37.0 - resolution: "@eslint-react/ast@npm:1.37.0" +"@eslint-react/ast@npm:1.48.1": + version: 1.48.1 + resolution: "@eslint-react/ast@npm:1.48.1" dependencies: - "@eslint-react/eff": "npm:1.37.0" - "@typescript-eslint/types": "npm:^8.27.0" - "@typescript-eslint/typescript-estree": "npm:^8.27.0" - "@typescript-eslint/utils": "npm:^8.27.0" + "@eslint-react/eff": "npm:1.48.1" + "@typescript-eslint/types": "npm:^8.30.1" + "@typescript-eslint/typescript-estree": "npm:^8.30.1" + "@typescript-eslint/utils": "npm:^8.30.1" string-ts: "npm:^2.2.1" - ts-pattern: "npm:^5.6.2" - checksum: 10c0/17f3c1b72240b297251182f959deba9a6e05b13ee7dd1e86bee6229537ffeeb3ae9f1e2fa340fb47dc53afeb11aa2962d554d25a25f9b9caba8b6b531d52893a + ts-pattern: "npm:^5.7.0" + checksum: 10c0/7eb815c067da5449b1e6b8ed2b89a5ad6ee13206e2dba01a454616fc7c395a7f5a394c68527778efe08307bcf54ee596d092774d56088ba068156bed4e9caea9 languageName: node linkType: hard -"@eslint-react/core@npm:1.37.0": - version: 1.37.0 - resolution: "@eslint-react/core@npm:1.37.0" +"@eslint-react/core@npm:1.48.1": + version: 1.48.1 + resolution: "@eslint-react/core@npm:1.48.1" dependencies: - "@eslint-react/ast": "npm:1.37.0" - "@eslint-react/eff": "npm:1.37.0" - "@eslint-react/jsx": "npm:1.37.0" - "@eslint-react/shared": "npm:1.37.0" - "@eslint-react/var": "npm:1.37.0" - "@typescript-eslint/scope-manager": "npm:^8.27.0" - "@typescript-eslint/type-utils": "npm:^8.27.0" - "@typescript-eslint/types": "npm:^8.27.0" - "@typescript-eslint/utils": "npm:^8.27.0" + "@eslint-react/ast": "npm:1.48.1" + "@eslint-react/eff": "npm:1.48.1" + "@eslint-react/kit": "npm:1.48.1" + "@eslint-react/shared": "npm:1.48.1" + "@eslint-react/var": "npm:1.48.1" + "@typescript-eslint/scope-manager": "npm:^8.30.1" + "@typescript-eslint/type-utils": "npm:^8.30.1" + "@typescript-eslint/types": "npm:^8.30.1" + "@typescript-eslint/utils": "npm:^8.30.1" birecord: "npm:^0.1.1" - ts-pattern: "npm:^5.6.2" - checksum: 10c0/0434b92e9cf2c2d2502c0a97e29a66ae6906da861b2fe10e701485bbb20575c7cea0ba72f859ca4c48c359a1aed4744f3d3d99ba3cd43a155ca3efab60852f41 + ts-pattern: "npm:^5.7.0" + checksum: 10c0/0215e5613bfd118b16e88e9be1b7ad5d7784fc373b72ff48be687d8029bd6f0660d16cccb60156124a13129eee3003b8e224118d758f74939bb41c8af6693af9 languageName: node linkType: hard -"@eslint-react/eff@npm:1.37.0": - version: 1.37.0 - resolution: "@eslint-react/eff@npm:1.37.0" - checksum: 10c0/85aa7db15f0e47d49e06fd55f006f0d178fcfbd740b34c9d79204bf06d9e8bcd3a7619165a615607d0aba645a45c01d082c11b4f0afd29fe895f97b7d032f0f9 +"@eslint-react/eff@npm:1.48.1": + version: 1.48.1 + resolution: "@eslint-react/eff@npm:1.48.1" + checksum: 10c0/f99f5cbf09b1b317a1689502e0a3e7a1e26c46f23f602139673556f2b7e2abefe8b3ecfc32f8afc1476432e592a38646f7c57b890fdfb01dc0a507bbb0304a90 languageName: node linkType: hard "@eslint-react/eslint-plugin@npm:^1.36.1": - version: 1.37.0 - resolution: "@eslint-react/eslint-plugin@npm:1.37.0" + version: 1.48.1 + resolution: "@eslint-react/eslint-plugin@npm:1.48.1" dependencies: - "@eslint-react/eff": "npm:1.37.0" - "@eslint-react/shared": "npm:1.37.0" - "@typescript-eslint/scope-manager": "npm:^8.27.0" - "@typescript-eslint/type-utils": "npm:^8.27.0" - "@typescript-eslint/types": "npm:^8.27.0" - "@typescript-eslint/utils": "npm:^8.27.0" - eslint-plugin-react-debug: "npm:1.37.0" - eslint-plugin-react-dom: "npm:1.37.0" - eslint-plugin-react-hooks-extra: "npm:1.37.0" - eslint-plugin-react-naming-convention: "npm:1.37.0" - eslint-plugin-react-web-api: "npm:1.37.0" - eslint-plugin-react-x: "npm:1.37.0" + "@eslint-react/eff": "npm:1.48.1" + "@eslint-react/kit": "npm:1.48.1" + "@eslint-react/shared": "npm:1.48.1" + "@typescript-eslint/scope-manager": "npm:^8.30.1" + "@typescript-eslint/type-utils": "npm:^8.30.1" + "@typescript-eslint/types": "npm:^8.30.1" + "@typescript-eslint/utils": "npm:^8.30.1" + eslint-plugin-react-debug: "npm:1.48.1" + eslint-plugin-react-dom: "npm:1.48.1" + eslint-plugin-react-hooks-extra: "npm:1.48.1" + eslint-plugin-react-naming-convention: "npm:1.48.1" + eslint-plugin-react-web-api: "npm:1.48.1" + eslint-plugin-react-x: "npm:1.48.1" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ^4.9.5 || ^5.3.3 @@ -1449,67 +1450,65 @@ __metadata: optional: false typescript: optional: true - checksum: 10c0/e561e2d9af58cd0c2f34172cef0d6c6a21e2e174fee7becb9e5facb856bbd69da536a66d435f213b4d8f97f4739562d37fb1589a9c3fd1fffbc9a02c0b9074e5 + checksum: 10c0/99db8460d94c91567f2ba63f7c517b56eec88b88acd256e58dee1ab808a099f5679e568e11288c25afbbd5fcc16909cb758216d44a18a1e3847d181d8dc66c2e languageName: node linkType: hard -"@eslint-react/jsx@npm:1.37.0": - version: 1.37.0 - resolution: "@eslint-react/jsx@npm:1.37.0" +"@eslint-react/kit@npm:1.48.1": + version: 1.48.1 + resolution: "@eslint-react/kit@npm:1.48.1" dependencies: - "@eslint-react/ast": "npm:1.37.0" - "@eslint-react/eff": "npm:1.37.0" - "@eslint-react/var": "npm:1.37.0" - "@typescript-eslint/scope-manager": "npm:^8.27.0" - "@typescript-eslint/types": "npm:^8.27.0" - "@typescript-eslint/utils": "npm:^8.27.0" - ts-pattern: "npm:^5.6.2" - checksum: 10c0/76bb1624b6f402cc94081be66ec0d43b2aa0afa1285c53a161800e659ba1366a8d4731f51e5289980498410c1615773a691fe4601086e7a6c61c442dc3e02828 + "@eslint-react/eff": "npm:1.48.1" + "@typescript-eslint/utils": "npm:^8.30.1" + "@zod/mini": "npm:^4.0.0-beta.0" + ts-pattern: "npm:^5.7.0" + checksum: 10c0/4d59b433371871ac8913c60296f41b0770a6e11f3094a79cf8aa5bcd07dae75b69196e078ce5cd91c0afec11b69d4108bde4e09ff5508823e63d55a149ebd896 languageName: node linkType: hard -"@eslint-react/shared@npm:1.37.0": - version: 1.37.0 - resolution: "@eslint-react/shared@npm:1.37.0" +"@eslint-react/shared@npm:1.48.1": + version: 1.48.1 + resolution: "@eslint-react/shared@npm:1.48.1" dependencies: - "@eslint-react/eff": "npm:1.37.0" - "@typescript-eslint/utils": "npm:^8.27.0" - picomatch: "npm:^4.0.2" - ts-pattern: "npm:^5.6.2" - checksum: 10c0/f40803f391ca8acd00d33dc1dcfed7d49b91d767a202541beb75b7bd18701456415576345ba07e61ab0f3076d9e32a5e28c0532d11c6d4e80092423cdc118473 + "@eslint-react/eff": "npm:1.48.1" + "@eslint-react/kit": "npm:1.48.1" + "@typescript-eslint/utils": "npm:^8.30.1" + "@zod/mini": "npm:^4.0.0-beta.0" + ts-pattern: "npm:^5.7.0" + checksum: 10c0/bb0fdbe362fd1f63c3d9b8416fc99b66a5f66a7757c0a3eb4cb9108d99296ee6ebbc78f812c8db68487f80c6cc5ca4ba6464421964ea488409b006b9891525b2 languageName: node linkType: hard -"@eslint-react/var@npm:1.37.0": - version: 1.37.0 - resolution: "@eslint-react/var@npm:1.37.0" +"@eslint-react/var@npm:1.48.1": + version: 1.48.1 + resolution: "@eslint-react/var@npm:1.48.1" dependencies: - "@eslint-react/ast": "npm:1.37.0" - "@eslint-react/eff": "npm:1.37.0" - "@typescript-eslint/scope-manager": "npm:^8.27.0" - "@typescript-eslint/types": "npm:^8.27.0" - "@typescript-eslint/utils": "npm:^8.27.0" + "@eslint-react/ast": "npm:1.48.1" + "@eslint-react/eff": "npm:1.48.1" + "@typescript-eslint/scope-manager": "npm:^8.30.1" + "@typescript-eslint/types": "npm:^8.30.1" + "@typescript-eslint/utils": "npm:^8.30.1" string-ts: "npm:^2.2.1" - ts-pattern: "npm:^5.6.2" - checksum: 10c0/d6a810a5e751684c23c848697013340885df70dc0d41c9afe439d26f589c8ca4fb68511b2c4207184d2c9b3ed5bc0b55c6c7321c1ba1d3b3038a591472eda5f0 + ts-pattern: "npm:^5.7.0" + checksum: 10c0/c5e0e23ef90da4f0e0df5cc006ce7b48e91478772d49f97f7d6214f8d4330b0d14af7f95a80ddece384f27c2a0439c4b62be5af0b12b5f2b23401abf290997bb languageName: node linkType: hard -"@eslint/config-array@npm:^0.19.2": - version: 0.19.2 - resolution: "@eslint/config-array@npm:0.19.2" +"@eslint/config-array@npm:^0.20.0": + version: 0.20.0 + resolution: "@eslint/config-array@npm:0.20.0" dependencies: "@eslint/object-schema": "npm:^2.1.6" debug: "npm:^4.3.1" minimatch: "npm:^3.1.2" - checksum: 10c0/dd68da9abb32d336233ac4fe0db1e15a0a8d794b6e69abb9e57545d746a97f6f542496ff9db0d7e27fab1438546250d810d90b1904ac67677215b8d8e7573f3d + checksum: 10c0/94bc5d0abb96dc5295ff559925242ff75a54eacfb3576677e95917e42f7175e1c4b87bf039aa2a872f949b4852ad9724bf2f7529aaea6b98f28bb3fca7f1d659 languageName: node linkType: hard -"@eslint/config-helpers@npm:^0.1.0": - version: 0.1.0 - resolution: "@eslint/config-helpers@npm:0.1.0" - checksum: 10c0/3562b5325f42740fc83b0b92b7d13a61b383f8db064915143eec36184f09a09fad73eca6c2955ab6c248b0d04fa03c140f9af2f2c4c06770781a6b79f300a01e +"@eslint/config-helpers@npm:^0.2.0": + version: 0.2.1 + resolution: "@eslint/config-helpers@npm:0.2.1" + checksum: 10c0/3e829a78b0bb4f7c44384ba1df3986e5de24b7f440ad5c6bb3cfc366ded773a869ca9ee8d212b5a563ae94596c5940dea6fd2ea1ee53a84c6241ac953dcb8bb7 languageName: node linkType: hard @@ -1522,9 +1521,18 @@ __metadata: languageName: node linkType: hard -"@eslint/eslintrc@npm:^3.3.0": - version: 3.3.0 - resolution: "@eslint/eslintrc@npm:3.3.0" +"@eslint/core@npm:^0.13.0": + version: 0.13.0 + resolution: "@eslint/core@npm:0.13.0" + dependencies: + "@types/json-schema": "npm:^7.0.15" + checksum: 10c0/ba724a7df7ed9dab387481f11d0d0f708180f40be93acce2c21dacca625c5867de3528760c42f1c457ccefe6a669d525ff87b779017eabc0d33479a36300797b + languageName: node + linkType: hard + +"@eslint/eslintrc@npm:^3.3.1": + version: 3.3.1 + resolution: "@eslint/eslintrc@npm:3.3.1" dependencies: ajv: "npm:^6.12.4" debug: "npm:^4.3.2" @@ -1535,14 +1543,14 @@ __metadata: js-yaml: "npm:^4.1.0" minimatch: "npm:^3.1.2" strip-json-comments: "npm:^3.1.1" - checksum: 10c0/215de990231b31e2fe6458f225d8cea0f5c781d3ecb0b7920703501f8cd21b3101fc5ef2f0d4f9a38865d36647b983e0e8ce8bf12fd2bcdd227fc48a5b1a43be + checksum: 10c0/b0e63f3bc5cce4555f791a4e487bf999173fcf27c65e1ab6e7d63634d8a43b33c3693e79f192cbff486d7df1be8ebb2bd2edc6e70ddd486cbfa84a359a3e3b41 languageName: node linkType: hard -"@eslint/js@npm:9.22.0, @eslint/js@npm:^9.18.0, @eslint/js@npm:^9.22.0": - version: 9.22.0 - resolution: "@eslint/js@npm:9.22.0" - checksum: 10c0/5bcd009bb579dc6c6ed760703bdd741e08a48cd9decd677aa2cf67fe66236658cb09a00185a0369f3904e5cffba9e6e0f2ff4d9ba4fdf598fcd81d34c49213a5 +"@eslint/js@npm:9.24.0, @eslint/js@npm:^9.22.0, @eslint/js@npm:^9.24.0": + version: 9.24.0 + resolution: "@eslint/js@npm:9.24.0" + checksum: 10c0/efe22e29469e4140ac3e2916be8143b1bcfd1084a6edf692b7a58a3e54949d53c67f7f979bc0a811db134d9cc1e7bff8aa71ef1376b47eecd7e226b71206bb36 languageName: node linkType: hard @@ -1554,12 +1562,12 @@ __metadata: linkType: hard "@eslint/plugin-kit@npm:^0.2.7": - version: 0.2.7 - resolution: "@eslint/plugin-kit@npm:0.2.7" + version: 0.2.8 + resolution: "@eslint/plugin-kit@npm:0.2.8" dependencies: - "@eslint/core": "npm:^0.12.0" + "@eslint/core": "npm:^0.13.0" levn: "npm:^0.4.1" - checksum: 10c0/0a1aff1ad63e72aca923217e556c6dfd67d7cd121870eb7686355d7d1475d569773528a8b2111b9176f3d91d2ea81f7413c34600e8e5b73d59e005d70780b633 + checksum: 10c0/554847c8f2b6bfe0e634f317fc43d0b54771eea0015c4f844f75915fdb9e6170c830c004291bad57db949d61771732e459f36ed059f45cf750af223f77357c5c languageName: node linkType: hard @@ -1570,20 +1578,23 @@ __metadata: languageName: node linkType: hard -"@google/genai@npm:^0.4.0": - version: 0.4.0 - resolution: "@google/genai@npm:0.4.0" +"@google/genai@npm:0.8.0": + version: 0.8.0 + resolution: "@google/genai@npm:0.8.0" dependencies: google-auth-library: "npm:^9.14.2" ws: "npm:^8.18.0" - checksum: 10c0/4feb837b373cdbe60a5388b880b2384b116ffa369ae17ec2562c4e9da0f90e315d5e30c413ee3a620b6d147c55e1e9165f0e143aba6d945f1dfbe61fa584fefc + checksum: 10c0/8a26a7dd1ab26aeeef5b5610612965ab271142460912c31b12f201cf6e00f5a4965910b195033992bdee1a7ee2b88c55f55d3a2727e09e4cd8d30ecbd0d655d0 languageName: node linkType: hard -"@google/generative-ai@npm:^0.24.0": - version: 0.24.0 - resolution: "@google/generative-ai@npm:0.24.0" - checksum: 10c0/31452bf2653cdee7fd61eb209f16ac0ef82c94c4175909ba40e1088e938e3e19e01f628dfb80d429dae3338fc8487e9a0fd8a6ff0164189f2722211175690b0b +"@google/genai@patch:@google/genai@npm%3A0.8.0#~/.yarn/patches/@google-genai-npm-0.8.0-450d0d9a7d.patch": + version: 0.8.0 + resolution: "@google/genai@patch:@google/genai@npm%3A0.8.0#~/.yarn/patches/@google-genai-npm-0.8.0-450d0d9a7d.patch::version=0.8.0&hash=e4f82c" + dependencies: + google-auth-library: "npm:^9.14.2" + ws: "npm:^8.18.0" + checksum: 10c0/b2082599cbdb9ffe18020461a2290ac60b0912f21106254bb618a1a1faa6e400caf16f92479fdb877928fd9670617ec0131f5787b4e3db2e5918daf2c7b87def languageName: node linkType: hard @@ -2140,10 +2151,10 @@ __metadata: linkType: hard "@langchain/community@npm:^0.3.36": - version: 0.3.36 - resolution: "@langchain/community@npm:0.3.36" + version: 0.3.40 + resolution: "@langchain/community@npm:0.3.40" dependencies: - "@langchain/openai": "npm:>=0.2.0 <0.5.0" + "@langchain/openai": "npm:>=0.2.0 <0.6.0" binary-extensions: "npm:^2.2.0" expr-eval: "npm:^2.0.2" flat: "npm:^5.0.2" @@ -2219,6 +2230,7 @@ __metadata: "@zilliz/milvus2-sdk-node": ">=2.3.5" apify-client: ^2.7.1 assemblyai: ^4.6.0 + azion: ^1.11.1 better-sqlite3: ">=9.4.0 <12.0.0" cassandra-driver: ^4.7.2 cborg: ^4.1.1 @@ -2253,6 +2265,7 @@ __metadata: lunary: ^0.7.10 mammoth: ^1.6.0 mariadb: ^3.4.0 + mem0ai: ^2.1.8 mongodb: ">=5.2.0" mysql2: ^3.9.8 neo4j-driver: "*" @@ -2407,6 +2420,8 @@ __metadata: optional: true assemblyai: optional: true + azion: + optional: true better-sqlite3: optional: true cassandra-driver: @@ -2473,6 +2488,8 @@ __metadata: optional: true mariadb: optional: true + mem0ai: + optional: true mongodb: optional: true mysql2: @@ -2525,13 +2542,13 @@ __metadata: optional: true youtubei.js: optional: true - checksum: 10c0/7945ba936c1b18506ca8ca70449d41208c627cadf52782a9d41e54e395fdc86a4421c01fa4977b582f7eddf5458dd7c418f932016c558a058abea3442828b8dd + checksum: 10c0/5ece515520fea34c19f9cf8d672a3afe86ffa55b5ccfb780ff2df743f7ab1bbea96875df9bb34857916cfac9ef9577b6d85b7288676ffb4ad5af84380451e190 languageName: node linkType: hard "@langchain/core@npm:^0.3.26": - version: 0.3.42 - resolution: "@langchain/core@npm:0.3.42" + version: 0.3.44 + resolution: "@langchain/core@npm:0.3.44" dependencies: "@cfworker/json-schema": "npm:^4.0.2" ansi-styles: "npm:^5.0.0" @@ -2545,7 +2562,7 @@ __metadata: uuid: "npm:^10.0.0" zod: "npm:^3.22.4" zod-to-json-schema: "npm:^3.22.3" - checksum: 10c0/7dd6ca7a0c54ca2bc40b1689387bc705cff2993ed8e9ac674eabeb65b10131f73ec0062fa7fc86ee46bada5120f4c7f645571256cbe2839745323d0228ddd693 + checksum: 10c0/fb8d7c5760419cc9d0a3ed4f04473e103c8a27031566ba0c89438879bbd66e3d8869349f943045e86ddb33c4e8db4ae59311a3aad45e832d273b0e7d7db3f939 languageName: node linkType: hard @@ -2563,9 +2580,9 @@ __metadata: languageName: node linkType: hard -"@langchain/openai@npm:>=0.1.0 <0.5.0": - version: 0.4.5 - resolution: "@langchain/openai@npm:0.4.5" +"@langchain/openai@npm:>=0.1.0 <0.6.0, @langchain/openai@npm:>=0.2.0 <0.6.0": + version: 0.5.5 + resolution: "@langchain/openai@npm:0.5.5" dependencies: js-tiktoken: "npm:^1.0.12" openai: "npm:^4.87.3" @@ -2573,21 +2590,7 @@ __metadata: zod-to-json-schema: "npm:^3.22.3" peerDependencies: "@langchain/core": ">=0.3.39 <0.4.0" - checksum: 10c0/23d03a64a571700e84df9ded8e90facc2cb84b65ff43efdd0249bcfb95511974db4d1b8fc5072bdf7eb993903d8613970ea47ba979af643cce9315661208163d - languageName: node - linkType: hard - -"@langchain/openai@npm:>=0.2.0 <0.5.0": - version: 0.4.7 - resolution: "@langchain/openai@npm:0.4.7" - dependencies: - js-tiktoken: "npm:^1.0.12" - openai: "npm:^4.87.3" - zod: "npm:^3.22.4" - zod-to-json-schema: "npm:^3.22.3" - peerDependencies: - "@langchain/core": ">=0.3.39 <0.4.0" - checksum: 10c0/4c809100c1e039c8c786141f097764cc399699ca9b149861396b2339147ad8b7fec5c97e5365a546bb7c123c4ec1943cfe3ef2eb5f056d6ab5a3fd1dc35940bc + checksum: 10c0/475c040f473f9c9270e8130c86d480f68834af5723e7e9b761c60152cafe5bc162e87856a4c654b12d6fe8f0cf99b27247b3869e4c0c79797847263523e045d4 languageName: node linkType: hard @@ -2994,10 +2997,10 @@ __metadata: languageName: node linkType: hard -"@pkgr/core@npm:^0.1.0": - version: 0.1.2 - resolution: "@pkgr/core@npm:0.1.2" - checksum: 10c0/fd4acc154c8f1b5c544b6dd152b7ce68f6cbb8b92e9abf2e5d756d6e95052d08d0d693a668dea67af1386d62635b50adfe463cce03c5620402b468498cc7592f +"@pkgr/core@npm:^0.2.3": + version: 0.2.4 + resolution: "@pkgr/core@npm:0.2.4" + checksum: 10c0/2528a443bbbef5d4686614e1d73f834f19ccbc975f62b2a64974a6b97bcdf677b9c5e8948e04808ac4f0d853e2f422adfaae2a06e9e9f4f5cf8af76f1adf8dc1 languageName: node linkType: hard @@ -3306,64 +3309,64 @@ __metadata: languageName: node linkType: hard -"@shikijs/core@npm:3.2.1": - version: 3.2.1 - resolution: "@shikijs/core@npm:3.2.1" +"@shikijs/core@npm:3.2.2": + version: 3.2.2 + resolution: "@shikijs/core@npm:3.2.2" dependencies: - "@shikijs/types": "npm:3.2.1" + "@shikijs/types": "npm:3.2.2" "@shikijs/vscode-textmate": "npm:^10.0.2" "@types/hast": "npm:^3.0.4" hast-util-to-html: "npm:^9.0.5" - checksum: 10c0/d9d1d5587e40ab15f343dfac4c1f109f6a4b9b97640ec22d5c831917a3932958cbcfce36e90ff92fffe9f4d286f902c0d16d0ad2ebdcfbbaa808a1fb87b4f680 + checksum: 10c0/69afe788994653b69f1bafd4fd3c2143609b4b0c05e970c8dc8d82ec660d617850ad9eeb2b6aa5be2dd534cefa0213d577129cb9ae1070eb4890cbbf1ac0f63e languageName: node linkType: hard -"@shikijs/engine-javascript@npm:3.2.1": - version: 3.2.1 - resolution: "@shikijs/engine-javascript@npm:3.2.1" +"@shikijs/engine-javascript@npm:3.2.2": + version: 3.2.2 + resolution: "@shikijs/engine-javascript@npm:3.2.2" dependencies: - "@shikijs/types": "npm:3.2.1" + "@shikijs/types": "npm:3.2.2" "@shikijs/vscode-textmate": "npm:^10.0.2" oniguruma-to-es: "npm:^4.1.0" - checksum: 10c0/7b629bdbc54c51d198628a6c2dcf85db80259b8ebc70b622517837990d75d91a6240cc51cce36f7dc8a0776d0445b5b02a5b23726d9cf4e084712820528cb45c + checksum: 10c0/2db8f9c04cc8e40352eb69ddd4de81bda95c5318c897f43215622352c91591974522cefb3959bcfaa183fd36a18d1af9e704289ed7999273dcd763bfaa5a1827 languageName: node linkType: hard -"@shikijs/engine-oniguruma@npm:3.2.1": - version: 3.2.1 - resolution: "@shikijs/engine-oniguruma@npm:3.2.1" +"@shikijs/engine-oniguruma@npm:3.2.2": + version: 3.2.2 + resolution: "@shikijs/engine-oniguruma@npm:3.2.2" dependencies: - "@shikijs/types": "npm:3.2.1" + "@shikijs/types": "npm:3.2.2" "@shikijs/vscode-textmate": "npm:^10.0.2" - checksum: 10c0/8c4c51738740f9cfa610ccefaaea2378833820336e4329bb88b9a2208e3deb994b0b7bea2d6657eb915fb668ca2090a2168a84dfeac2b820c1fee00631ca9bed + checksum: 10c0/b5eedfca26f7e1525fd079c1827ae9bdedafb574ce4eb535c54d484218b7428fb9ac93607f79a2adc1482483dd0366fdf07b0846403a76cd4767649adb8fa590 languageName: node linkType: hard -"@shikijs/langs@npm:3.2.1": - version: 3.2.1 - resolution: "@shikijs/langs@npm:3.2.1" +"@shikijs/langs@npm:3.2.2": + version: 3.2.2 + resolution: "@shikijs/langs@npm:3.2.2" dependencies: - "@shikijs/types": "npm:3.2.1" - checksum: 10c0/8a4e8c066795f1e96686bee271ad9783febcb1cece2ebb9815dfb3d59c856ac869cf9dddc7d90cbcd186a782ddc0628b37486fcc4a46516be6825907f0e74178 + "@shikijs/types": "npm:3.2.2" + checksum: 10c0/04b5c9b92de9070624d24e20a2b3607edcbe4894a1db8056927f0d0637f080e2eed4e54925f0ded36874361db14bab9e4d9c2d06614ddd733f3f314250eabaf8 languageName: node linkType: hard -"@shikijs/themes@npm:3.2.1": - version: 3.2.1 - resolution: "@shikijs/themes@npm:3.2.1" +"@shikijs/themes@npm:3.2.2": + version: 3.2.2 + resolution: "@shikijs/themes@npm:3.2.2" dependencies: - "@shikijs/types": "npm:3.2.1" - checksum: 10c0/674aae42244832142f584037504ab102dc141f9918f5b11b62aa0dc1abb6a763daf74f86124ae5f2362116dd095b5fc62c9a249aa8c14fdae847e5b8b955b11b + "@shikijs/types": "npm:3.2.2" + checksum: 10c0/93745e76e7ed6cab1d797ec68b53a0a183d989201e5064b33a78b516e128848d2c9be194d29cf602d5017dc2a74013699c773d052aeb45593851ae35b035afaa languageName: node linkType: hard -"@shikijs/types@npm:3.2.1": - version: 3.2.1 - resolution: "@shikijs/types@npm:3.2.1" +"@shikijs/types@npm:3.2.2": + version: 3.2.2 + resolution: "@shikijs/types@npm:3.2.2" dependencies: "@shikijs/vscode-textmate": "npm:^10.0.2" "@types/hast": "npm:^3.0.4" - checksum: 10c0/3380fde198d466a8771137b7ca3d4756a54d7d24c6e65f852737472a280c12c07f2123b9ad3d7eb2edec86d8d2c53bc207abe0fc0c7f78d337e52e742dc34edf + checksum: 10c0/aec3327d0cfc89af138ce195ac070ba62d8229864c079a3f06dff5a180036fdd963282068d67bd4c89a04ae688005c2b7c214c274ad0bb265f6f7ab6907a67a6 languageName: node linkType: hard @@ -3475,15 +3478,6 @@ __metadata: languageName: node linkType: hard -"@types/acorn@npm:^4.0.0": - version: 4.0.6 - resolution: "@types/acorn@npm:4.0.6" - dependencies: - "@types/estree": "npm:*" - checksum: 10c0/5a65a1d7e91fc95703f0a717897be60fa7ccd34b17f5462056274a246e6690259fe0a1baabc86fd3260354f87245cb3dc483346d7faad2b78fc199763978ede9 - languageName: node - linkType: hard - "@types/adm-zip@npm:^0": version: 0.5.7 resolution: "@types/adm-zip@npm:0.5.7" @@ -3507,11 +3501,11 @@ __metadata: linkType: hard "@types/babel__generator@npm:*": - version: 7.6.8 - resolution: "@types/babel__generator@npm:7.6.8" + version: 7.27.0 + resolution: "@types/babel__generator@npm:7.27.0" dependencies: "@babel/types": "npm:^7.0.0" - checksum: 10c0/f0ba105e7d2296bf367d6e055bb22996886c114261e2cb70bf9359556d0076c7a57239d019dee42bb063f565bade5ccb46009bce2044b2952d964bf9a454d6d2 + checksum: 10c0/9f9e959a8792df208a9d048092fda7e1858bddc95c6314857a8211a99e20e6830bdeb572e3587ae8be5429e37f2a96fcf222a9f53ad232f5537764c9e13a2bbd languageName: node linkType: hard @@ -3526,11 +3520,11 @@ __metadata: linkType: hard "@types/babel__traverse@npm:*": - version: 7.20.6 - resolution: "@types/babel__traverse@npm:7.20.6" + version: 7.20.7 + resolution: "@types/babel__traverse@npm:7.20.7" dependencies: "@babel/types": "npm:^7.20.7" - checksum: 10c0/7ba7db61a53e28cac955aa99af280d2600f15a8c056619c05b6fc911cbe02c61aa4f2823299221b23ce0cce00b294c0e5f618ec772aa3f247523c2e48cf7b888 + checksum: 10c0/5386f0af44f8746b063b87418f06129a814e16bb2686965a575e9d7376b360b088b89177778d8c426012abc43dd1a2d8ec3218bfc382280c898682746ce2ffbd languageName: node linkType: hard @@ -3622,14 +3616,7 @@ __metadata: languageName: node linkType: hard -"@types/estree@npm:*, @types/estree@npm:^1.0.0, @types/estree@npm:^1.0.6": - version: 1.0.6 - resolution: "@types/estree@npm:1.0.6" - checksum: 10c0/cdfd751f6f9065442cd40957c07fd80361c962869aa853c1c2fd03e101af8b9389d8ff4955a43a6fcfa223dd387a089937f95be0f3eec21ca527039fd2d9859a - languageName: node - linkType: hard - -"@types/estree@npm:1.0.7": +"@types/estree@npm:*, @types/estree@npm:1.0.7, @types/estree@npm:^1.0.0, @types/estree@npm:^1.0.6": version: 1.0.7 resolution: "@types/estree@npm:1.0.7" checksum: 10c0/be815254316882f7c40847336cd484c3bc1c3e34f710d197160d455dc9d6d050ffbf4c3bc76585dba86f737f020ab20bdb137ebe0e9116b0c86c7c0342221b8c @@ -3801,11 +3788,11 @@ __metadata: linkType: hard "@types/node@npm:*, @types/node@npm:^22.7.5": - version: 22.13.10 - resolution: "@types/node@npm:22.13.10" + version: 22.14.1 + resolution: "@types/node@npm:22.14.1" dependencies: - undici-types: "npm:~6.20.0" - checksum: 10c0/a3865f9503d6f718002374f7b87efaadfae62faa499c1a33b12c527cfb9fd86f733e1a1b026b80c5a0e4a965701174bc3305595a7d36078aa1abcf09daa5dee9 + undici-types: "npm:~6.21.0" + checksum: 10c0/d49c4d00403b1c2348cf0701b505fd636d80aabe18102105998dc62fdd36dcaf911e73c7a868c48c21c1022b825c67b475b65b1222d84b704d8244d152bb7f86 languageName: node linkType: hard @@ -3817,20 +3804,20 @@ __metadata: linkType: hard "@types/node@npm:^18.11.18, @types/node@npm:^18.19.9": - version: 18.19.80 - resolution: "@types/node@npm:18.19.80" + version: 18.19.86 + resolution: "@types/node@npm:18.19.86" dependencies: undici-types: "npm:~5.26.4" - checksum: 10c0/6a272d17b3057096ed49cc2780b9739b6f91ffb7f555926a2dc2bf59577b9ee2cf71832003927aa6db21939dca9eb9654a6cd55504fe957c0330b19ce628c8b7 + checksum: 10c0/1017c4ba61661ab30e4b4a78040cb66980919549f56d85755326dcccbe7a0405be7d6be1b2a91bace8eaef0d2a24b63d4f104b381be7f957c2483e465d829690 languageName: node linkType: hard "@types/node@npm:^20.9.0": - version: 20.17.24 - resolution: "@types/node@npm:20.17.24" + version: 20.17.30 + resolution: "@types/node@npm:20.17.30" dependencies: undici-types: "npm:~6.19.2" - checksum: 10c0/2a39ce4c4cd4588a05b2a485cc0a1407cbea608dd1ab03e36add59d61712718d95c84b492ca5190753f0be2bce748aeeb0f2a1412e712775462befe3820b3ff9 + checksum: 10c0/649782c7822367d751472d70c948bcc50cded1a4744610f706f81cd54e1fc015523567d7e3e17f6b19e3e2797f6f23b653e898bdb4a2f21f8759ceba49976310 languageName: node linkType: hard @@ -3852,11 +3839,11 @@ __metadata: linkType: hard "@types/react-dom@npm:^19.0.4": - version: 19.0.4 - resolution: "@types/react-dom@npm:19.0.4" + version: 19.1.2 + resolution: "@types/react-dom@npm:19.1.2" peerDependencies: "@types/react": ^19.0.0 - checksum: 10c0/4e71853919b94df9e746a4bd73f8180e9ae13016333ce9c543dcba9f4f4c8fe6e28b038ca6ee61c24e291af8e03ca3bc5ded17c46dee938fcb32d71186fda7a3 + checksum: 10c0/100c341cacba9ec8ae1d47ee051072a3450e9573bf8eeb7262490e341cb246ea0f95a07a1f2077e61cf92648f812a0324c602fcd811bd87b7ce41db2811510cd languageName: node linkType: hard @@ -3870,11 +3857,11 @@ __metadata: linkType: hard "@types/react@npm:*, @types/react@npm:^19.0.12": - version: 19.0.12 - resolution: "@types/react@npm:19.0.12" + version: 19.1.2 + resolution: "@types/react@npm:19.1.2" dependencies: csstype: "npm:^3.0.2" - checksum: 10c0/c814b6af5c0fbcf5c65d031b1c9bf98c5b857e015254d95811f2851b27b869c3d31c6f35dab127dc6921a3dbda0b0622c6323d493a14b31b231a6a58c41c5e84 + checksum: 10c0/76ffe71395c713d4adc3c759465012d3c956db00af35ab7c6d0d91bd07b274b7ce69caa0478c0760311587bd1e38c78ffc9688ebc629f2b266682a19d8750947 languageName: node linkType: hard @@ -3950,12 +3937,12 @@ __metadata: languageName: node linkType: hard -"@types/ws@npm:^8.5.4": - version: 8.18.0 - resolution: "@types/ws@npm:8.18.0" +"@types/ws@npm:^8, @types/ws@npm:^8.5.4": + version: 8.18.1 + resolution: "@types/ws@npm:8.18.1" dependencies: "@types/node": "npm:*" - checksum: 10c0/a56d2e0d1da7411a1f3548ce02b51a50cbe9e23f025677d03df48f87e4a3c72e1342fbf1d12e487d7eafa8dc670c605152b61bbf9165891ec0e9694b0d3ea8d4 + checksum: 10c0/61aff1129143fcc4312f083bc9e9e168aa3026b7dd6e70796276dcfb2c8211c4292603f9c4864fae702f2ed86e4abd4d38aa421831c2fd7f856c931a481afbab languageName: node linkType: hard @@ -3968,15 +3955,15 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:8.27.0": - version: 8.27.0 - resolution: "@typescript-eslint/eslint-plugin@npm:8.27.0" +"@typescript-eslint/eslint-plugin@npm:8.30.1": + version: 8.30.1 + resolution: "@typescript-eslint/eslint-plugin@npm:8.30.1" dependencies: "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:8.27.0" - "@typescript-eslint/type-utils": "npm:8.27.0" - "@typescript-eslint/utils": "npm:8.27.0" - "@typescript-eslint/visitor-keys": "npm:8.27.0" + "@typescript-eslint/scope-manager": "npm:8.30.1" + "@typescript-eslint/type-utils": "npm:8.30.1" + "@typescript-eslint/utils": "npm:8.30.1" + "@typescript-eslint/visitor-keys": "npm:8.30.1" graphemer: "npm:^1.4.0" ignore: "npm:^5.3.1" natural-compare: "npm:^1.4.0" @@ -3985,64 +3972,64 @@ __metadata: "@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0 eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <5.9.0" - checksum: 10c0/95bbab011bfe51ca657ff346e4c6cac25652c88e5188a5e74d14372dba45c3d7aa713f4c90f80ebc885d77a8be89e131e8b77c096145c90da6c251a475b125fc + checksum: 10c0/e34e067c977a20fe927a30e5ffd5402b03eb12d1c9dc932e7c4a772e78fda9e34708fa2d12ace34bad2c51ecaf5b8cfaa4b372c0c5550fe06587b721f6eae57b languageName: node linkType: hard -"@typescript-eslint/parser@npm:8.27.0": - version: 8.27.0 - resolution: "@typescript-eslint/parser@npm:8.27.0" +"@typescript-eslint/parser@npm:8.30.1": + version: 8.30.1 + resolution: "@typescript-eslint/parser@npm:8.30.1" dependencies: - "@typescript-eslint/scope-manager": "npm:8.27.0" - "@typescript-eslint/types": "npm:8.27.0" - "@typescript-eslint/typescript-estree": "npm:8.27.0" - "@typescript-eslint/visitor-keys": "npm:8.27.0" + "@typescript-eslint/scope-manager": "npm:8.30.1" + "@typescript-eslint/types": "npm:8.30.1" + "@typescript-eslint/typescript-estree": "npm:8.30.1" + "@typescript-eslint/visitor-keys": "npm:8.30.1" debug: "npm:^4.3.4" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <5.9.0" - checksum: 10c0/2ada98167ca5a474544fada7658d7c8d54ea4dfdd692e3d30d18b5531e50d7308a5b09d23dca651f9fe841f96075ccd18643431f4b61d0e4e7e7ccde888258e8 + checksum: 10c0/add025d5cfca5cd4d1f74c9297e71de95c945f4efbe6cbfbc72e2cd794cd2684397c7d832bdb5177a1f54398111243d20bd0d2ffdb32a4d5230f1db7cd6fbfb6 languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:8.27.0, @typescript-eslint/scope-manager@npm:^8.27.0": - version: 8.27.0 - resolution: "@typescript-eslint/scope-manager@npm:8.27.0" +"@typescript-eslint/scope-manager@npm:8.30.1, @typescript-eslint/scope-manager@npm:^8.30.1": + version: 8.30.1 + resolution: "@typescript-eslint/scope-manager@npm:8.30.1" dependencies: - "@typescript-eslint/types": "npm:8.27.0" - "@typescript-eslint/visitor-keys": "npm:8.27.0" - checksum: 10c0/d87daeffb81f4e70f168c38f01c667713bda71c4545e28fcdf0792378fb3df171894ef77854c5c1a5e5a22c784ee1ccea2dd856b5baf825840710a6a74c14ac9 + "@typescript-eslint/types": "npm:8.30.1" + "@typescript-eslint/visitor-keys": "npm:8.30.1" + checksum: 10c0/8560fd02bb2a73b56f79af1dfa311491926f3625a04c0f32777c7c0bdec47b4a677addf2d2e2cc313416bb59b7a6e0bff7837449816a5ec5ff81e923daa76ca7 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:8.27.0, @typescript-eslint/type-utils@npm:^8.27.0": - version: 8.27.0 - resolution: "@typescript-eslint/type-utils@npm:8.27.0" +"@typescript-eslint/type-utils@npm:8.30.1, @typescript-eslint/type-utils@npm:^8.0.0, @typescript-eslint/type-utils@npm:^8.30.1": + version: 8.30.1 + resolution: "@typescript-eslint/type-utils@npm:8.30.1" dependencies: - "@typescript-eslint/typescript-estree": "npm:8.27.0" - "@typescript-eslint/utils": "npm:8.27.0" + "@typescript-eslint/typescript-estree": "npm:8.30.1" + "@typescript-eslint/utils": "npm:8.30.1" debug: "npm:^4.3.4" ts-api-utils: "npm:^2.0.1" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <5.9.0" - checksum: 10c0/f38cdc660ebcb3b71496182b9ea52301ab08a4f062558aa7061a5f0b759ae3e8f68ae250a29e74251cb52c6c56733d7dabed7002b993544cbe0933bb75d67a57 + checksum: 10c0/c233d2b0b06bd8eca4ee38aebb7544d4084143590328f38c00302f98a62b06868394d4ab1cd798af68d5a47efd84976cc14d415e9e519396dc89aa8d4d47c9ee languageName: node linkType: hard -"@typescript-eslint/types@npm:8.27.0, @typescript-eslint/types@npm:^8.27.0": - version: 8.27.0 - resolution: "@typescript-eslint/types@npm:8.27.0" - checksum: 10c0/9c5f2ba816a9baea5982feeadebe4d19f4df77ddb025a7b2307f9e1e6914076b63cbad81f7f915814e64b4d915052cf27bd79ce3e5a831340cb5ab244133941b +"@typescript-eslint/types@npm:8.30.1, @typescript-eslint/types@npm:^8.30.1": + version: 8.30.1 + resolution: "@typescript-eslint/types@npm:8.30.1" + checksum: 10c0/461e800bf911c24d9b61bdbeed897921454acc0c24b4e8a79f943c14234241828c13a31dce31dcce77511185f806a2fb94769075e122e3182ba5a32dd55573eb languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:8.27.0, @typescript-eslint/typescript-estree@npm:^8.27.0": - version: 8.27.0 - resolution: "@typescript-eslint/typescript-estree@npm:8.27.0" +"@typescript-eslint/typescript-estree@npm:8.30.1, @typescript-eslint/typescript-estree@npm:^8.30.1": + version: 8.30.1 + resolution: "@typescript-eslint/typescript-estree@npm:8.30.1" dependencies: - "@typescript-eslint/types": "npm:8.27.0" - "@typescript-eslint/visitor-keys": "npm:8.27.0" + "@typescript-eslint/types": "npm:8.30.1" + "@typescript-eslint/visitor-keys": "npm:8.30.1" debug: "npm:^4.3.4" fast-glob: "npm:^3.3.2" is-glob: "npm:^4.0.3" @@ -4051,32 +4038,32 @@ __metadata: ts-api-utils: "npm:^2.0.1" peerDependencies: typescript: ">=4.8.4 <5.9.0" - checksum: 10c0/c04d602825ff2a7b2a89746a68b32f7052fb4ce3d2355d1f4e6f43fd064f17c3b44fb974c98838a078fdebdc35152d2ab0af34663dfca99db7a790bd3fc5d8ac + checksum: 10c0/9eb0b1bc4b5df37c84ac411d77ce0edf934b5fdde021ed45c984aa7894132ff7a276d2b95e2d29ef84c411df8ecdf096eec3e07ec1ee5b1fa8c623d40a82ecf0 languageName: node linkType: hard -"@typescript-eslint/utils@npm:8.27.0, @typescript-eslint/utils@npm:^8.27.0": - version: 8.27.0 - resolution: "@typescript-eslint/utils@npm:8.27.0" +"@typescript-eslint/utils@npm:8.30.1, @typescript-eslint/utils@npm:^8.30.1": + version: 8.30.1 + resolution: "@typescript-eslint/utils@npm:8.30.1" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:8.27.0" - "@typescript-eslint/types": "npm:8.27.0" - "@typescript-eslint/typescript-estree": "npm:8.27.0" + "@typescript-eslint/scope-manager": "npm:8.30.1" + "@typescript-eslint/types": "npm:8.30.1" + "@typescript-eslint/typescript-estree": "npm:8.30.1" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <5.9.0" - checksum: 10c0/dcfd5f2c17f1a33061e3ec70d0946ff23a4238aabacae3d85087165beccedf84fb8506d30848f2470e3b60ab98b230aef79c6e8b4c5d39648a37ac559ac5b1e0 + checksum: 10c0/ad54aa386edc2e19957c73ef25eea3e263e7e15e941c72e91ca6c8ea2536979d343a6069de0e40b15f0e732ddaacbfcc3d5f25a1583e11a32120c42c471802ea languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:8.27.0": - version: 8.27.0 - resolution: "@typescript-eslint/visitor-keys@npm:8.27.0" +"@typescript-eslint/visitor-keys@npm:8.30.1": + version: 8.30.1 + resolution: "@typescript-eslint/visitor-keys@npm:8.30.1" dependencies: - "@typescript-eslint/types": "npm:8.27.0" + "@typescript-eslint/types": "npm:8.30.1" eslint-visitor-keys: "npm:^4.2.0" - checksum: 10c0/d86fd4032db07123816aab3a6b8b53f840387385ab2a4d8f96b22fc76b5438fb27ac8dc42b63caf23f3d265c33e9075dbf1ce8d31f939df12f5cd077d3b10295 + checksum: 10c0/bdc182289c68a5c8f891f9aecf6ccb59743c3f2b1bbe57f57f8c7ce1688f4381182e301919895cefc929539eea914eeb847f7d351cdc3f685ed6c5ee67a10c9e languageName: node linkType: hard @@ -4087,7 +4074,7 @@ __metadata: languageName: node linkType: hard -"@vitejs/plugin-react@npm:^4.2.1": +"@vitejs/plugin-react@npm:4.3.4": version: 4.3.4 resolution: "@vitejs/plugin-react@npm:4.3.4" dependencies: @@ -4102,6 +4089,13 @@ __metadata: languageName: node linkType: hard +"@xmldom/xmldom@npm:0.9.8": + version: 0.9.8 + resolution: "@xmldom/xmldom@npm:0.9.8" + checksum: 10c0/2ea984270832de2843ab0bbb6df71bde9aa02126b69e5fd56b5512b98ace48e94aff7186e77d0b22fe4b6780483862be752bcf8577436638a9210109029a0503 + languageName: node + linkType: hard + "@xmldom/xmldom@npm:^0.8.10, @xmldom/xmldom@npm:^0.8.6, @xmldom/xmldom@npm:^0.8.8": version: 0.8.10 resolution: "@xmldom/xmldom@npm:0.8.10" @@ -4110,22 +4104,22 @@ __metadata: linkType: hard "@xyflow/react@npm:^12.4.4": - version: 12.4.4 - resolution: "@xyflow/react@npm:12.4.4" + version: 12.5.6 + resolution: "@xyflow/react@npm:12.5.6" dependencies: - "@xyflow/system": "npm:0.0.52" + "@xyflow/system": "npm:0.0.56" classcat: "npm:^5.0.3" zustand: "npm:^4.4.0" peerDependencies: react: ">=17" react-dom: ">=17" - checksum: 10c0/abce710e98a414def5f5cb847831ad49e25e3de5ebeaee4e4f9c8b651c1a507b1d61b8e11b8f1f519e9f7500f37d07218fbbd23d797c137e1e3f5515dc759c98 + checksum: 10c0/cb3a533e7fe8c9326230da41c4234cf88a98d5a33bceac93345b14e40d25961147bb9009fa124d483b413dbd028cdcecb576a71dd26b31c7761f548350181524 languageName: node linkType: hard -"@xyflow/system@npm:0.0.52": - version: 0.0.52 - resolution: "@xyflow/system@npm:0.0.52" +"@xyflow/system@npm:0.0.56": + version: 0.0.56 + resolution: "@xyflow/system@npm:0.0.56" dependencies: "@types/d3-drag": "npm:^3.0.7" "@types/d3-selection": "npm:^3.0.10" @@ -4134,7 +4128,23 @@ __metadata: d3-drag: "npm:^3.0.0" d3-selection: "npm:^3.0.0" d3-zoom: "npm:^3.0.0" - checksum: 10c0/34822192065f4d1358c781882b5f7e1eba6d6953aa741e480de704080a7d0609823b124d90fec17a747226150e980c12d9cd145642aa795ff94054c6cc67dbaa + checksum: 10c0/4291dde519e34c048e9006b6bad9c4e746e07911373ab2c9c054d6c5b52e71ebc15f3c3e85ee537012b1783db06f933b21b57e593c3e350ec8de614c378b4a49 + languageName: node + linkType: hard + +"@zod/core@npm:0.5.1": + version: 0.5.1 + resolution: "@zod/core@npm:0.5.1" + checksum: 10c0/3a48af3aaacfd75c8f40da7d717f70bd5a2c716d1eaba572d6354457a58272011d2a2d7142564e7f3cf1ee2489ad8ac90f8c67ae25b28afd263b12f931b10d31 + languageName: node + linkType: hard + +"@zod/mini@npm:^4.0.0-beta.0": + version: 4.0.0-beta.20250415T232143 + resolution: "@zod/mini@npm:4.0.0-beta.20250415T232143" + dependencies: + "@zod/core": "npm:0.5.1" + checksum: 10c0/06119e6edc86737f1869551fb51e7bb15ac3be28aa7371e1eac5f991c5a5517a0e9bb21dcfb2acb392f6c0182f1612c689ee9feadf180838b16b4bed9fdb8548 languageName: node linkType: hard @@ -4168,8 +4178,7 @@ __metadata: "@emotion/is-prop-valid": "npm:^1.3.1" "@eslint-react/eslint-plugin": "npm:^1.36.1" "@eslint/js": "npm:^9.22.0" - "@google/genai": "npm:^0.4.0" - "@google/generative-ai": "npm:^0.24.0" + "@google/genai": "patch:@google/genai@npm%3A0.8.0#~/.yarn/patches/@google-genai-npm-0.8.0-450d0d9a7d.patch" "@hello-pangea/dnd": "npm:^16.6.0" "@kangfenmao/keyv-storage": "npm:^0.1.0" "@langchain/community": "npm:^0.3.36" @@ -4193,7 +4202,8 @@ __metadata: "@types/react-dom": "npm:^19.0.4" "@types/react-infinite-scroll-component": "npm:^5.0.0" "@types/tinycolor2": "npm:^1" - "@vitejs/plugin-react": "npm:^4.2.1" + "@types/ws": "npm:^8" + "@vitejs/plugin-react": "npm:4.3.4" "@xyflow/react": "npm:^12.4.4" adm-zip: "npm:^0.5.16" analytics: "npm:^0.8.16" @@ -4203,6 +4213,7 @@ __metadata: axios: "npm:^1.7.3" babel-plugin-styled-components: "npm:^2.1.4" browser-image-compression: "npm:^2.0.2" + bufferutil: "npm:^4.0.9" color: "npm:^5.0.0" dayjs: "npm:^1.11.11" dexie: "npm:^4.0.8" @@ -4282,6 +4293,7 @@ __metadata: uuid: "npm:^10.0.0" vite: "npm:6.2.6" webdav: "npm:^5.8.0" + ws: "npm:^8.18.1" zipread: "npm:^1.3.3" languageName: unknown linkType: soft @@ -4511,8 +4523,8 @@ __metadata: linkType: hard "antd@npm:^5.22.5": - version: 5.24.4 - resolution: "antd@npm:5.24.4" + version: 5.24.7 + resolution: "antd@npm:5.24.7" dependencies: "@ant-design/colors": "npm:^7.2.0" "@ant-design/cssinjs": "npm:^1.23.0" @@ -4536,10 +4548,10 @@ __metadata: rc-drawer: "npm:~7.2.0" rc-dropdown: "npm:~4.2.1" rc-field-form: "npm:~2.7.0" - rc-image: "npm:~7.11.0" - rc-input: "npm:~1.7.3" - rc-input-number: "npm:~9.4.0" - rc-mentions: "npm:~2.19.1" + rc-image: "npm:~7.11.1" + rc-input: "npm:~1.8.0" + rc-input-number: "npm:~9.5.0" + rc-mentions: "npm:~2.20.0" rc-menu: "npm:~9.16.1" rc-motion: "npm:^2.9.5" rc-notification: "npm:~5.6.3" @@ -4554,8 +4566,8 @@ __metadata: rc-steps: "npm:~6.0.1" rc-switch: "npm:~4.1.0" rc-table: "npm:~7.50.4" - rc-tabs: "npm:~15.5.1" - rc-textarea: "npm:~1.9.0" + rc-tabs: "npm:~15.5.2" + rc-textarea: "npm:~1.10.0" rc-tooltip: "npm:~6.4.0" rc-tree: "npm:~5.13.1" rc-tree-select: "npm:~5.27.0" @@ -4566,7 +4578,7 @@ __metadata: peerDependencies: react: ">=16.9.0" react-dom: ">=16.9.0" - checksum: 10c0/ce8597467ae5c9beb850a292337aa652636467d6c5dadf4d8602b82366c4bcbf05d9880c185f5013b8ce189e4a9671ba7a5472db75345189a2179353ce4b9190 + checksum: 10c0/d9b6d24cf0c74c3d22b5f799158694aba946e1971b0c1602b3319c85663b5ba6fc7b2135c91a0839d13ecd28a1643c5eb84de8a2586b8362e5a3a166c709b1ed languageName: node linkType: hard @@ -4872,9 +4884,9 @@ __metadata: linkType: hard "bignumber.js@npm:^9.0.0": - version: 9.1.2 - resolution: "bignumber.js@npm:9.1.2" - checksum: 10c0/e17786545433f3110b868725c449fa9625366a6e675cd70eb39b60938d6adbd0158cb4b3ad4f306ce817165d37e63f4aa3098ba4110db1d9a3b9f66abfbaf10d + version: 9.2.1 + resolution: "bignumber.js@npm:9.2.1" + checksum: 10c0/f50b2f2d633382ac5ab86f8baa90437cf6f14adfa8bd47b7159f1b893d19777853429565c33dfe6f8f695c5361c1e3cd2aae5067b99093d5608d671683c56cb4 languageName: node linkType: hard @@ -4936,20 +4948,20 @@ __metadata: languageName: node linkType: hard -"body-parser@npm:^2.0.1": - version: 2.1.0 - resolution: "body-parser@npm:2.1.0" +"body-parser@npm:^2.2.0": + version: 2.2.0 + resolution: "body-parser@npm:2.2.0" dependencies: bytes: "npm:^3.1.2" content-type: "npm:^1.0.5" debug: "npm:^4.4.0" http-errors: "npm:^2.0.0" - iconv-lite: "npm:^0.5.2" + iconv-lite: "npm:^0.6.3" on-finished: "npm:^2.4.1" qs: "npm:^6.14.0" raw-body: "npm:^3.0.0" type-is: "npm:^2.0.0" - checksum: 10c0/aec9bb327ba025808f04f86350ae9152ff9a6a8bc7429b69827cb7721b09f477ffd5e18cc954152a6a259b765322e33ebc4c50ab940f66d8e45ff1466e49ff2e + checksum: 10c0/a9ded39e71ac9668e2211afa72e82ff86cc5ef94de1250b7d1ba9cc299e4150408aaa5f1e8b03dd4578472a3ce6d1caa2a23b27a6c18e526e48b4595174c116c languageName: node linkType: hard @@ -5083,13 +5095,13 @@ __metadata: languageName: node linkType: hard -"builder-util-runtime@npm:9.3.1": - version: 9.3.1 - resolution: "builder-util-runtime@npm:9.3.1" +"bufferutil@npm:^4.0.9": + version: 4.0.9 + resolution: "bufferutil@npm:4.0.9" dependencies: - debug: "npm:^4.3.4" - sax: "npm:^1.2.4" - checksum: 10c0/32de87e5f294154de707f40acf59a5600af9d1ce903ccbba53b81824de7a1dd9568c5f0c033ed765e14c4ea73347aac09ecbce686e1bc7fefbd7b4f64d2c9d68 + node-gyp: "npm:latest" + node-gyp-build: "npm:^4.3.0" + checksum: 10c0/f8a93279fc9bdcf32b42eba97edc672b39ca0fe5c55a8596099886cffc76ea9dd78e0f6f51ecee3b5ee06d2d564aa587036b5d4ea39b8b5ac797262a363cdf7d languageName: node linkType: hard @@ -5297,9 +5309,9 @@ __metadata: linkType: hard "caniuse-lite@npm:^1.0.30001688": - version: 1.0.30001706 - resolution: "caniuse-lite@npm:1.0.30001706" - checksum: 10c0/b502d0a509611fd5b009e1123d482e983696984b6b749c3f485fd8d02cc58376c59cf0bb15f22fa2d337da104970edd27dd525d4663cebc728e26ac4adedff0d + version: 1.0.30001714 + resolution: "caniuse-lite@npm:1.0.30001714" + checksum: 10c0/b0e3372f018c5c177912f0282af98049057d83c80846293a4e3df728644a622db42a9e8971d6b7708d76e0fd4e9f6d5ce93802cf4e6818de80fdf371dc0f6a06 languageName: node linkType: hard @@ -5671,14 +5683,7 @@ __metadata: languageName: node linkType: hard -"commander@npm:9.2.0": - version: 9.2.0 - resolution: "commander@npm:9.2.0" - checksum: 10c0/42eb2cf427fc5a1ca2ddf7ff6467d1a3cbec5c3e68dd61ead42eb01489ff068beadd4dc8303ab3cc48470d808372063c87fc8d9ed9e1be86365c3b0fc0a92732 - languageName: node - linkType: hard - -"commander@npm:^13.1.0": +"commander@npm:13.1.0, commander@npm:^13.1.0": version: 13.1.0 resolution: "commander@npm:13.1.0" checksum: 10c0/7b8c5544bba704fbe84b7cab2e043df8586d5c114a4c5b607f83ae5060708940ed0b5bd5838cf8ce27539cde265c1cbd59ce3c8c6b017ed3eec8943e3a415164 @@ -5806,7 +5811,7 @@ __metadata: languageName: node linkType: hard -"content-type@npm:^1.0.5, content-type@npm:~1.0.4": +"content-type@npm:^1.0.5": version: 1.0.5 resolution: "content-type@npm:1.0.5" checksum: 10c0/b76ebed15c000aee4678c3707e0860cb6abd4e680a598c0a26e17f0bfae723ec9cc2802f0ff1bc6e4d80603719010431d2231018373d4dde10f9ccff9dadf5af @@ -5827,10 +5832,10 @@ __metadata: languageName: node linkType: hard -"cookie@npm:0.7.1": - version: 0.7.1 - resolution: "cookie@npm:0.7.1" - checksum: 10c0/5de60c67a410e7c8dc8a46a4b72eb0fe925871d057c9a5d2c0e8145c4270a4f81076de83410c4d397179744b478e33cd80ccbcc457abf40a9409ad27dcd21dde +"cookie@npm:^0.7.1": + version: 0.7.2 + resolution: "cookie@npm:0.7.2" + checksum: 10c0/9596e8ccdbf1a3a88ae02cf5ee80c1c50959423e1022e4e60b91dd87c622af1da309253d8abdb258fb5e3eacb4f08e579dc58b4897b8087574eee0fd35dfa5d2 languageName: node linkType: hard @@ -6097,18 +6102,6 @@ __metadata: languageName: node linkType: hard -"debug@npm:4.3.6": - version: 4.3.6 - resolution: "debug@npm:4.3.6" - dependencies: - ms: "npm:2.1.2" - peerDependenciesMeta: - supports-color: - optional: true - checksum: 10c0/3293416bff072389c101697d4611c402a6bacd1900ac20c0492f61a9cdd6b3b29750fc7f5e299f8058469ef60ff8fb79b86395a30374fbd2490113c1c7112285 - languageName: node - linkType: hard - "debug@npm:^2.6.9": version: 2.6.9 resolution: "debug@npm:2.6.9" @@ -6134,7 +6127,7 @@ __metadata: languageName: node linkType: hard -"decimal.js@npm:^10.4.3": +"decimal.js@npm:^10.5.0": version: 10.5.0 resolution: "decimal.js@npm:10.5.0" checksum: 10c0/785c35279df32762143914668df35948920b6c1c259b933e0519a69b7003fc0a5ed2a766b1e1dda02574450c566b21738a45f15e274b47c2ac02072c0d1f3ac3 @@ -6348,7 +6341,7 @@ __metadata: languageName: node linkType: hard -"depd@npm:2.0.0": +"depd@npm:2.0.0, depd@npm:^2.0.0": version: 2.0.0 resolution: "depd@npm:2.0.0" checksum: 10c0/58bd06ec20e19529b06f7ad07ddab60e504d9e0faca4bd23079fac2d279c3594334d736508dc350e06e510aba5e22e4594483b3a6562ce7c17dd797f4cc4ad2c @@ -6362,13 +6355,6 @@ __metadata: languageName: node linkType: hard -"destroy@npm:^1.2.0": - version: 1.2.0 - resolution: "destroy@npm:1.2.0" - checksum: 10c0/bd7633942f57418f5a3b80d5cb53898127bcf53e24cdf5d5f4396be471417671f0fee48a4ebe9a1e9defbde2a31280011af58a57e090ff822f589b443ed4e643 - languageName: node - linkType: hard - "detect-libc@npm:2.0.2": version: 2.0.2 resolution: "detect-libc@npm:2.0.2" @@ -6609,14 +6595,7 @@ __metadata: languageName: node linkType: hard -"dotenv@npm:^16.3.0": - version: 16.4.7 - resolution: "dotenv@npm:16.4.7" - checksum: 10c0/be9f597e36a8daf834452daa1f4cc30e5375a5968f98f46d89b16b983c567398a330580c88395069a77473943c06b877d1ca25b4afafcdd6d4adb549e8293462 - languageName: node - linkType: hard - -"dotenv@npm:^16.4.5": +"dotenv@npm:^16.3.0, dotenv@npm:^16.4.5": version: 16.5.0 resolution: "dotenv@npm:16.5.0" checksum: 10c0/5bc94c919fbd955bf0ba44d33922a1e93d1078e64a1db5c30faeded1d996e7a83c55332cb8ea4fae5a9ca4d0be44cbceb95c5811e70f9f095298df09d1997dd9 @@ -6734,9 +6713,9 @@ __metadata: linkType: hard "electron-log@npm:^5.1.5": - version: 5.3.2 - resolution: "electron-log@npm:5.3.2" - checksum: 10c0/8cfcd6eb6ab2dff010941f9a39793a411646dc0462991632d2427fc9a45f22b00ec758996629f8c203612d99cb01713c08c72d2b0454603d13386f433f5b755b + version: 5.3.3 + resolution: "electron-log@npm:5.3.3" + checksum: 10c0/8379736e6c9123ccc55d7ba58ed3d8c6916f1d5c97e9a714a4855513c098bf7843642d896a89cb068b3ebae3835692500322dd1ce316ca6fe7154e67fb3e3b90 languageName: node linkType: hard @@ -6767,17 +6746,17 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.5.73": - version: 1.5.123 - resolution: "electron-to-chromium@npm:1.5.123" - checksum: 10c0/ffaa65e9337f5ba0b51d5709795c3d1074e0cae8efda24116561feed6cedd281f523be50339d991c2fc65344e66e65e7308a157ff87047a8bb4e8008412e9eb1 + version: 1.5.137 + resolution: "electron-to-chromium@npm:1.5.137" + checksum: 10c0/678613e0a3d023563a1acca4d8103a69d389168efeb3b78c1fcc683ed0778d81bfb00c6f621d6535f3fa9530664fc948fc8f2ed27e7548d46cd3987d4b0add6a languageName: node linkType: hard "electron-updater@npm:^6.3.9": - version: 6.6.2 - resolution: "electron-updater@npm:6.6.2" + version: 6.6.3 + resolution: "electron-updater@npm:6.6.3" dependencies: - builder-util-runtime: "npm:9.3.1" + builder-util-runtime: "npm:9.3.2" fs-extra: "npm:^10.1.0" js-yaml: "npm:^4.1.0" lazy-val: "npm:^1.0.5" @@ -6785,7 +6764,7 @@ __metadata: lodash.isequal: "npm:^4.5.0" semver: "npm:^7.6.3" tiny-typed-emitter: "npm:^2.1.0" - checksum: 10c0/2b9ae5583b95f6772c4a2515ddba7ba52b65460ab81f09ae4f0b97c7e3d7b7e3d9426775eb9a53d3193bd4c3d5466bf30827c1a6ee75e4aca739c647f6ac46ff + checksum: 10c0/fb924eb0fb8d692b703f49196400422faf4c25416abe22c9b3aad0a48890929fa3dde4c8671a74cd71b4a4ef93937f3d9f78ea3c2891a5c6d7938355bc699863 languageName: node linkType: hard @@ -6842,9 +6821,9 @@ __metadata: linkType: hard "emoji-picker-element@npm:^1.22.1": - version: 1.26.1 - resolution: "emoji-picker-element@npm:1.26.1" - checksum: 10c0/e5cd7a070e55a24931919a7c2a65b9047910d2733a14885cde447199c5a3b9bb3b000b87fe78dd2f119d548934c14e262efded561aa15ad2f8b4f2bfa467952e + version: 1.26.3 + resolution: "emoji-picker-element@npm:1.26.3" + checksum: 10c0/2a2e8584cd321221355506cf035ce2dcb61c2f9a7b5d7d6f758016c172493a4b1451c8005dd6d8bdaf03d18046293fd0f43a18f7973febe4fb010687f3a12679 languageName: node linkType: hard @@ -6876,7 +6855,7 @@ __metadata: languageName: node linkType: hard -"encodeurl@npm:^2.0.0, encodeurl@npm:~2.0.0": +"encodeurl@npm:^2.0.0": version: 2.0.0 resolution: "encodeurl@npm:2.0.0" checksum: 10c0/5d317306acb13e6590e28e27924c754163946a2480de11865c991a3a7eed4315cd3fba378b543ca145829569eefe9b899f3d84bb09870f675ae60bc924b01ceb @@ -7195,7 +7174,7 @@ __metadata: languageName: node linkType: hard -"escape-html@npm:^1.0.3, escape-html@npm:~1.0.3": +"escape-html@npm:^1.0.3": version: 1.0.3 resolution: "escape-html@npm:1.0.3" checksum: 10c0/524c739d776b36c3d29fa08a22e03e8824e3b2fd57500e5e44ecf3cc4707c34c60f9ca0781c0e33d191f2991161504c295e98f68c78fe7baa6e57081ec6ac0a3 @@ -7242,52 +7221,52 @@ __metadata: linkType: hard "eslint-config-prettier@npm:^10.0.1": - version: 10.1.1 - resolution: "eslint-config-prettier@npm:10.1.1" + version: 10.1.2 + resolution: "eslint-config-prettier@npm:10.1.2" peerDependencies: eslint: ">=7.0.0" bin: eslint-config-prettier: bin/cli.js - checksum: 10c0/3dbfdf6495dd62e2e1644ea9e8e978100dabcd8740fd264df1222d130001a1e8de05d6ed6c67d3a60727386a07507f067d1ca79af6d546910414beab19e7966e + checksum: 10c0/c22c8e29193cc8fd70becf1c2dd072513f2b3004a175c2a49404c79d1745ba4dc0edc2afd00d16b0e26d24f95813a0469e7445a25104aec218f6d84cdb1697e9 languageName: node linkType: hard "eslint-plugin-prettier@npm:^5.2.3": - version: 5.2.3 - resolution: "eslint-plugin-prettier@npm:5.2.3" + version: 5.2.6 + resolution: "eslint-plugin-prettier@npm:5.2.6" dependencies: prettier-linter-helpers: "npm:^1.0.0" - synckit: "npm:^0.9.1" + synckit: "npm:^0.11.0" peerDependencies: "@types/eslint": ">=8.0.0" eslint: ">=8.0.0" - eslint-config-prettier: "*" + eslint-config-prettier: ">= 7.0.0 <10.0.0 || >=10.1.0" prettier: ">=3.0.0" peerDependenciesMeta: "@types/eslint": optional: true eslint-config-prettier: optional: true - checksum: 10c0/60d9c03491ec6080ac1d71d0bee1361539ff6beb9b91ac98cfa7176c9ed52b7dbe7119ebee5b441b479d447d17d802a4a492ee06095ef2f22c460e3dd6459302 + checksum: 10c0/9911740a5edac7933d92671381908671c61ffa32a3cee7aed667ebab89831ee2c0b69eb9530f68dbe172ca9d4b3fa3d47350762dc1eb096a3ce125fa31c0e616 languageName: node linkType: hard -"eslint-plugin-react-debug@npm:1.37.0": - version: 1.37.0 - resolution: "eslint-plugin-react-debug@npm:1.37.0" +"eslint-plugin-react-debug@npm:1.48.1": + version: 1.48.1 + resolution: "eslint-plugin-react-debug@npm:1.48.1" dependencies: - "@eslint-react/ast": "npm:1.37.0" - "@eslint-react/core": "npm:1.37.0" - "@eslint-react/eff": "npm:1.37.0" - "@eslint-react/jsx": "npm:1.37.0" - "@eslint-react/shared": "npm:1.37.0" - "@eslint-react/var": "npm:1.37.0" - "@typescript-eslint/scope-manager": "npm:^8.27.0" - "@typescript-eslint/type-utils": "npm:^8.27.0" - "@typescript-eslint/types": "npm:^8.27.0" - "@typescript-eslint/utils": "npm:^8.27.0" + "@eslint-react/ast": "npm:1.48.1" + "@eslint-react/core": "npm:1.48.1" + "@eslint-react/eff": "npm:1.48.1" + "@eslint-react/kit": "npm:1.48.1" + "@eslint-react/shared": "npm:1.48.1" + "@eslint-react/var": "npm:1.48.1" + "@typescript-eslint/scope-manager": "npm:^8.30.1" + "@typescript-eslint/type-utils": "npm:^8.30.1" + "@typescript-eslint/types": "npm:^8.30.1" + "@typescript-eslint/utils": "npm:^8.30.1" string-ts: "npm:^2.2.1" - ts-pattern: "npm:^5.6.2" + ts-pattern: "npm:^5.7.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ^4.9.5 || ^5.3.3 @@ -7296,26 +7275,26 @@ __metadata: optional: false typescript: optional: true - checksum: 10c0/cbff00b7fcfcabd044a3d7281f4aa83e603fa60f1a2300e3469ab2520c63074d0c1636fde8e0826b3137a46fe98feb708f0c23c3a00b605d3c4560cd89bded6e + checksum: 10c0/262f7001cb41a24830a0943aec82ae029f271e2433990041f975f3ecc9fe904a1a1199e1cf85934429fcd17459cec3557f0fd77bd20b209d3a6e0e61ea5fe16a languageName: node linkType: hard -"eslint-plugin-react-dom@npm:1.37.0": - version: 1.37.0 - resolution: "eslint-plugin-react-dom@npm:1.37.0" +"eslint-plugin-react-dom@npm:1.48.1": + version: 1.48.1 + resolution: "eslint-plugin-react-dom@npm:1.48.1" dependencies: - "@eslint-react/ast": "npm:1.37.0" - "@eslint-react/core": "npm:1.37.0" - "@eslint-react/eff": "npm:1.37.0" - "@eslint-react/jsx": "npm:1.37.0" - "@eslint-react/shared": "npm:1.37.0" - "@eslint-react/var": "npm:1.37.0" - "@typescript-eslint/scope-manager": "npm:^8.27.0" - "@typescript-eslint/types": "npm:^8.27.0" - "@typescript-eslint/utils": "npm:^8.27.0" + "@eslint-react/ast": "npm:1.48.1" + "@eslint-react/core": "npm:1.48.1" + "@eslint-react/eff": "npm:1.48.1" + "@eslint-react/kit": "npm:1.48.1" + "@eslint-react/shared": "npm:1.48.1" + "@eslint-react/var": "npm:1.48.1" + "@typescript-eslint/scope-manager": "npm:^8.30.1" + "@typescript-eslint/types": "npm:^8.30.1" + "@typescript-eslint/utils": "npm:^8.30.1" compare-versions: "npm:^6.1.1" string-ts: "npm:^2.2.1" - ts-pattern: "npm:^5.6.2" + ts-pattern: "npm:^5.7.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ^4.9.5 || ^5.3.3 @@ -7324,26 +7303,26 @@ __metadata: optional: false typescript: optional: true - checksum: 10c0/ed848fcdf61e68d5ec7bb4b7e6fff7073a2f40afe584a0c64cb8c2df4bd87f52490461f10ef2596030b7eb678a5b753843bc94632accfc84696f3ba89c6c92dd + checksum: 10c0/974bec8d6be6a17c395942d3497d991684dbf91a840c61d3ae70b847121ce32f5d20cde1bf0ded5d367ce81b8f5c584ea8ad3b1426389d67ec4fe99463fe38b5 languageName: node linkType: hard -"eslint-plugin-react-hooks-extra@npm:1.37.0": - version: 1.37.0 - resolution: "eslint-plugin-react-hooks-extra@npm:1.37.0" +"eslint-plugin-react-hooks-extra@npm:1.48.1": + version: 1.48.1 + resolution: "eslint-plugin-react-hooks-extra@npm:1.48.1" dependencies: - "@eslint-react/ast": "npm:1.37.0" - "@eslint-react/core": "npm:1.37.0" - "@eslint-react/eff": "npm:1.37.0" - "@eslint-react/jsx": "npm:1.37.0" - "@eslint-react/shared": "npm:1.37.0" - "@eslint-react/var": "npm:1.37.0" - "@typescript-eslint/scope-manager": "npm:^8.27.0" - "@typescript-eslint/type-utils": "npm:^8.27.0" - "@typescript-eslint/types": "npm:^8.27.0" - "@typescript-eslint/utils": "npm:^8.27.0" + "@eslint-react/ast": "npm:1.48.1" + "@eslint-react/core": "npm:1.48.1" + "@eslint-react/eff": "npm:1.48.1" + "@eslint-react/kit": "npm:1.48.1" + "@eslint-react/shared": "npm:1.48.1" + "@eslint-react/var": "npm:1.48.1" + "@typescript-eslint/scope-manager": "npm:^8.30.1" + "@typescript-eslint/type-utils": "npm:^8.30.1" + "@typescript-eslint/types": "npm:^8.30.1" + "@typescript-eslint/utils": "npm:^8.30.1" string-ts: "npm:^2.2.1" - ts-pattern: "npm:^5.6.2" + ts-pattern: "npm:^5.7.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ^4.9.5 || ^5.3.3 @@ -7352,7 +7331,7 @@ __metadata: optional: false typescript: optional: true - checksum: 10c0/fb2b327ab87bdbc52e6da1b18502f4e9cebbb0e0e1ccc8f8aa18564d5987cec9f230e665d7a0388079ea3ae40615e30b7423426e7f6a2c90c897f23a98708a21 + checksum: 10c0/e04e42492744d25bb6ceece43d22ab541386b29c720c203eb6d51dc2b1e04f961f23218ec9dfe97571bc9a56d86971a0f1833f680feb242559d9a6d19333f7e4 languageName: node linkType: hard @@ -7365,22 +7344,22 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-react-naming-convention@npm:1.37.0": - version: 1.37.0 - resolution: "eslint-plugin-react-naming-convention@npm:1.37.0" +"eslint-plugin-react-naming-convention@npm:1.48.1": + version: 1.48.1 + resolution: "eslint-plugin-react-naming-convention@npm:1.48.1" dependencies: - "@eslint-react/ast": "npm:1.37.0" - "@eslint-react/core": "npm:1.37.0" - "@eslint-react/eff": "npm:1.37.0" - "@eslint-react/jsx": "npm:1.37.0" - "@eslint-react/shared": "npm:1.37.0" - "@eslint-react/var": "npm:1.37.0" - "@typescript-eslint/scope-manager": "npm:^8.27.0" - "@typescript-eslint/type-utils": "npm:^8.27.0" - "@typescript-eslint/types": "npm:^8.27.0" - "@typescript-eslint/utils": "npm:^8.27.0" + "@eslint-react/ast": "npm:1.48.1" + "@eslint-react/core": "npm:1.48.1" + "@eslint-react/eff": "npm:1.48.1" + "@eslint-react/kit": "npm:1.48.1" + "@eslint-react/shared": "npm:1.48.1" + "@eslint-react/var": "npm:1.48.1" + "@typescript-eslint/scope-manager": "npm:^8.30.1" + "@typescript-eslint/type-utils": "npm:^8.30.1" + "@typescript-eslint/types": "npm:^8.30.1" + "@typescript-eslint/utils": "npm:^8.30.1" string-ts: "npm:^2.2.1" - ts-pattern: "npm:^5.6.2" + ts-pattern: "npm:^5.7.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ^4.9.5 || ^5.3.3 @@ -7389,25 +7368,25 @@ __metadata: optional: false typescript: optional: true - checksum: 10c0/bb1c2536926e0cf41a238cb541a65726d16a9d7423861dcb8e67893f9a5dd56cb306b6cc9d1ec3d354f33604eeeacb8f1fe8c095ca16d7de52d01c2b65ac29eb + checksum: 10c0/3dfbed619a63ccb8db113cc12777c5b41da422c5afc487bb525dd986e6c73885dcf1f983eb5aaa2507db639b31945c1d886db5ad39df1d9e37b4421e7827884a languageName: node linkType: hard -"eslint-plugin-react-web-api@npm:1.37.0": - version: 1.37.0 - resolution: "eslint-plugin-react-web-api@npm:1.37.0" +"eslint-plugin-react-web-api@npm:1.48.1": + version: 1.48.1 + resolution: "eslint-plugin-react-web-api@npm:1.48.1" dependencies: - "@eslint-react/ast": "npm:1.37.0" - "@eslint-react/core": "npm:1.37.0" - "@eslint-react/eff": "npm:1.37.0" - "@eslint-react/jsx": "npm:1.37.0" - "@eslint-react/shared": "npm:1.37.0" - "@eslint-react/var": "npm:1.37.0" - "@typescript-eslint/scope-manager": "npm:^8.27.0" - "@typescript-eslint/types": "npm:^8.27.0" - "@typescript-eslint/utils": "npm:^8.27.0" + "@eslint-react/ast": "npm:1.48.1" + "@eslint-react/core": "npm:1.48.1" + "@eslint-react/eff": "npm:1.48.1" + "@eslint-react/kit": "npm:1.48.1" + "@eslint-react/shared": "npm:1.48.1" + "@eslint-react/var": "npm:1.48.1" + "@typescript-eslint/scope-manager": "npm:^8.30.1" + "@typescript-eslint/types": "npm:^8.30.1" + "@typescript-eslint/utils": "npm:^8.30.1" string-ts: "npm:^2.2.1" - ts-pattern: "npm:^5.6.2" + ts-pattern: "npm:^5.7.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ^4.9.5 || ^5.3.3 @@ -7416,30 +7395,31 @@ __metadata: optional: false typescript: optional: true - checksum: 10c0/6bf565dffbb75f04ccb9469c708c753c1e7fc1d99b551a89dd80c0e8a277d35c832d7b612cc95c03acd5bb44ed2fe471ecf10770704dee6da00898b60a4b80d0 + checksum: 10c0/84d7fe52cb77fb097723d1dfccb7b9c5f51b83b4207e504599b8e89ba85b3237247131a8bf357c0dbff6cfac20fdcd7328db8e88f6ae7ba313dd2f812a5d06e6 languageName: node linkType: hard -"eslint-plugin-react-x@npm:1.37.0": - version: 1.37.0 - resolution: "eslint-plugin-react-x@npm:1.37.0" +"eslint-plugin-react-x@npm:1.48.1": + version: 1.48.1 + resolution: "eslint-plugin-react-x@npm:1.48.1" dependencies: - "@eslint-react/ast": "npm:1.37.0" - "@eslint-react/core": "npm:1.37.0" - "@eslint-react/eff": "npm:1.37.0" - "@eslint-react/jsx": "npm:1.37.0" - "@eslint-react/shared": "npm:1.37.0" - "@eslint-react/var": "npm:1.37.0" - "@typescript-eslint/scope-manager": "npm:^8.27.0" - "@typescript-eslint/type-utils": "npm:^8.27.0" - "@typescript-eslint/types": "npm:^8.27.0" - "@typescript-eslint/utils": "npm:^8.27.0" + "@eslint-react/ast": "npm:1.48.1" + "@eslint-react/core": "npm:1.48.1" + "@eslint-react/eff": "npm:1.48.1" + "@eslint-react/kit": "npm:1.48.1" + "@eslint-react/shared": "npm:1.48.1" + "@eslint-react/var": "npm:1.48.1" + "@typescript-eslint/scope-manager": "npm:^8.30.1" + "@typescript-eslint/type-utils": "npm:^8.30.1" + "@typescript-eslint/types": "npm:^8.30.1" + "@typescript-eslint/utils": "npm:^8.30.1" compare-versions: "npm:^6.1.1" + is-immutable-type: "npm:^5.0.1" string-ts: "npm:^2.2.1" - ts-pattern: "npm:^5.6.2" + ts-pattern: "npm:^5.7.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 - ts-api-utils: ^2.0.1 + ts-api-utils: ^2.1.0 typescript: ^4.9.5 || ^5.3.3 peerDependenciesMeta: eslint: @@ -7448,7 +7428,7 @@ __metadata: optional: true typescript: optional: true - checksum: 10c0/70f12a37b0e2ecc02c923759ca9db1c912966427fe41a30315eac1dcaf7c5ef9a05ea0ad7193dc2f7a4021ba21ee34b1fc2b0e84e6f66fc781201ebda9a39f99 + checksum: 10c0/895517645dca3f2103ab8b86842440db593e695ef2d98f4d53942687e19820c448419c6167be30e820658eb3516524f853dce8941c25e90b7863c2b84321b95c languageName: node linkType: hard @@ -7499,16 +7479,16 @@ __metadata: linkType: hard "eslint@npm:^9.22.0": - version: 9.22.0 - resolution: "eslint@npm:9.22.0" + version: 9.24.0 + resolution: "eslint@npm:9.24.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.2.0" "@eslint-community/regexpp": "npm:^4.12.1" - "@eslint/config-array": "npm:^0.19.2" - "@eslint/config-helpers": "npm:^0.1.0" + "@eslint/config-array": "npm:^0.20.0" + "@eslint/config-helpers": "npm:^0.2.0" "@eslint/core": "npm:^0.12.0" - "@eslint/eslintrc": "npm:^3.3.0" - "@eslint/js": "npm:9.22.0" + "@eslint/eslintrc": "npm:^3.3.1" + "@eslint/js": "npm:9.24.0" "@eslint/plugin-kit": "npm:^0.2.7" "@humanfs/node": "npm:^0.16.6" "@humanwhocodes/module-importer": "npm:^1.0.1" @@ -7544,7 +7524,7 @@ __metadata: optional: true bin: eslint: bin/eslint.js - checksum: 10c0/7b5ab6f2365971c16efe97349565f75d8343347562fb23f12734c6ab2cd5e35301373a0d51e194789ddcfdfca21db7b62ff481b03d524b8169896c305b65ff48 + checksum: 10c0/f758ff1b9d2f2af5335f562f3f40aa8f71607b3edca33f7616840a222ed224555aeb3ac6943cc86e4f9ac5dc124a60bbfde624d054fb235631a8c04447e39ecc languageName: node linkType: hard @@ -7625,7 +7605,7 @@ __metadata: languageName: node linkType: hard -"etag@npm:^1.8.1, etag@npm:~1.8.1": +"etag@npm:^1.8.1": version: 1.8.1 resolution: "etag@npm:1.8.1" checksum: 10c0/12be11ef62fb9817314d790089a0a49fae4e1b50594135dcb8076312b7d7e470884b5100d249b28c18581b7fd52f8b485689ffae22a11ed9ec17377a33a08f84 @@ -7660,19 +7640,19 @@ __metadata: languageName: node linkType: hard -"eventsource-parser@npm:^3.0.0": - version: 3.0.0 - resolution: "eventsource-parser@npm:3.0.0" - checksum: 10c0/74ded91ff93330bd95243bd5a8fc61c805ea1843dd7ffac8e8ac36287fff419a7eec21b2fadf50d4e554ce0506de72f47928513e3c5b886fa4613fd49ef0024f +"eventsource-parser@npm:^3.0.1": + version: 3.0.1 + resolution: "eventsource-parser@npm:3.0.1" + checksum: 10c0/146ce5ae8325d07645a49bbc54d7ac3aef42f5138bfbbe83d5cf96293b50eab2219926d6cf41eed0a0f90132578089652ba9286a19297662900133a9da6c2fd0 languageName: node linkType: hard "eventsource@npm:^3.0.2": - version: 3.0.5 - resolution: "eventsource@npm:3.0.5" + version: 3.0.6 + resolution: "eventsource@npm:3.0.6" dependencies: - eventsource-parser: "npm:^3.0.0" - checksum: 10c0/0283045a70b7ab7501fc290e60ee5ebd6e24648e0f0a6d6a1c1bbb7a421971e8140b85d6239d08c360e0a0b196205ca86b4ff7f9efe3c06877ba628136856489 + eventsource-parser: "npm:^3.0.1" + checksum: 10c0/074d865ea1c7e29e3243f85a13306e89fca2d775b982dca03fa6bfa75c56827fa89cf1ab9e730db24bd6b104cbdcae074f2b37ba498874e9dd9710fbff4979bb languageName: node linkType: hard @@ -7738,42 +7718,37 @@ __metadata: linkType: hard "express@npm:^5.0.1": - version: 5.0.1 - resolution: "express@npm:5.0.1" + version: 5.1.0 + resolution: "express@npm:5.1.0" dependencies: accepts: "npm:^2.0.0" - body-parser: "npm:^2.0.1" + body-parser: "npm:^2.2.0" content-disposition: "npm:^1.0.0" - content-type: "npm:~1.0.4" - cookie: "npm:0.7.1" + content-type: "npm:^1.0.5" + cookie: "npm:^0.7.1" cookie-signature: "npm:^1.2.1" - debug: "npm:4.3.6" - depd: "npm:2.0.0" - encodeurl: "npm:~2.0.0" - escape-html: "npm:~1.0.3" - etag: "npm:~1.8.1" - finalhandler: "npm:^2.0.0" - fresh: "npm:2.0.0" - http-errors: "npm:2.0.0" + debug: "npm:^4.4.0" + encodeurl: "npm:^2.0.0" + escape-html: "npm:^1.0.3" + etag: "npm:^1.8.1" + finalhandler: "npm:^2.1.0" + fresh: "npm:^2.0.0" + http-errors: "npm:^2.0.0" merge-descriptors: "npm:^2.0.0" - methods: "npm:~1.1.2" mime-types: "npm:^3.0.0" - on-finished: "npm:2.4.1" - once: "npm:1.4.0" - parseurl: "npm:~1.3.3" - proxy-addr: "npm:~2.0.7" - qs: "npm:6.13.0" - range-parser: "npm:~1.2.1" - router: "npm:^2.0.0" - safe-buffer: "npm:5.2.1" + on-finished: "npm:^2.4.1" + once: "npm:^1.4.0" + parseurl: "npm:^1.3.3" + proxy-addr: "npm:^2.0.7" + qs: "npm:^6.14.0" + range-parser: "npm:^1.2.1" + router: "npm:^2.2.0" send: "npm:^1.1.0" - serve-static: "npm:^2.1.0" - setprototypeof: "npm:1.2.0" - statuses: "npm:2.0.1" - type-is: "npm:^2.0.0" - utils-merge: "npm:1.0.1" - vary: "npm:~1.1.2" - checksum: 10c0/6e533f28adb64178c90c3e357cbcdb5d1f233ca1290d023b3c4936c4ac67c6699aaba726edf6c148979220ec7ce6ed2e5e374cff904e3a2bf9ce91620cf8afff + serve-static: "npm:^2.2.0" + statuses: "npm:^2.0.1" + type-is: "npm:^2.0.1" + vary: "npm:^1.1.2" + checksum: 10c0/80ce7c53c5f56887d759b94c3f2283e2e51066c98d4b72a4cc1338e832b77f1e54f30d0239cc10815a0f849bdb753e6a284d2fa48d4ab56faf9c501f55d751d6 languageName: node linkType: hard @@ -7889,13 +7864,13 @@ __metadata: linkType: hard "fast-xml-parser@npm:^5.0.9": - version: 5.0.9 - resolution: "fast-xml-parser@npm:5.0.9" + version: 5.2.0 + resolution: "fast-xml-parser@npm:5.2.0" dependencies: strnum: "npm:^2.0.5" bin: fxparser: src/cli/cli.js - checksum: 10c0/29aaa74cb5224ddf755c2777fefce41961514fb525ce153ba9a8cbfd03292c93b67c0c19f3f4fdb5d8fa96a4b70c42dc31504eefc6477a668cea71a11999bc45 + checksum: 10c0/9d65ea8edeff114200313a7df7b9b1c62ff848099529ab82ed2de75ef789ebf1d7105442a12a1a51899f4dae3961f776adc6ddd85dd461272bc3f1e62211fc37 languageName: node linkType: hard @@ -8039,7 +8014,7 @@ __metadata: languageName: node linkType: hard -"finalhandler@npm:^2.0.0": +"finalhandler@npm:^2.1.0": version: 2.1.0 resolution: "finalhandler@npm:2.1.0" dependencies: @@ -8156,7 +8131,7 @@ __metadata: languageName: node linkType: hard -"form-data@npm:^4.0.0, form-data@npm:^4.0.1": +"form-data@npm:^4.0.0": version: 4.0.2 resolution: "form-data@npm:4.0.2" dependencies: @@ -8205,20 +8180,13 @@ __metadata: languageName: node linkType: hard -"fresh@npm:2.0.0": +"fresh@npm:^2.0.0": version: 2.0.0 resolution: "fresh@npm:2.0.0" checksum: 10c0/0557548194cb9a809a435bf92bcfbc20c89e8b5eb38861b73ced36750437251e39a111fc3a18b98531be9dd91fe1411e4969f229dc579ec0251ce6c5d4900bbc languageName: node linkType: hard -"fresh@npm:^0.5.2": - version: 0.5.2 - resolution: "fresh@npm:0.5.2" - checksum: 10c0/c6d27f3ed86cc5b601404822f31c900dd165ba63fff8152a3ef714e2012e7535027063bc67ded4cb5b3a49fa596495d46cacd9f47d6328459cf570f08b7d9e5a - languageName: node - linkType: hard - "fs-constants@npm:^1.0.0": version: 1.0.0 resolution: "fs-constants@npm:1.0.0" @@ -8634,10 +8602,10 @@ __metadata: languageName: node linkType: hard -"globals@npm:^15.14.0": - version: 15.15.0 - resolution: "globals@npm:15.15.0" - checksum: 10c0/f9ae80996392ca71316495a39bec88ac43ae3525a438b5626cd9d5ce9d5500d0a98a266409605f8cd7241c7acf57c354a48111ea02a767ba4f374b806d6861fe +"globals@npm:^16.0.0": + version: 16.0.0 + resolution: "globals@npm:16.0.0" + checksum: 10c0/8906d5f01838df64a81d6c2a7b7214312e2216cf65c5ed1546dc9a7d0febddf55ffa906cf04efd5b01eec2534d6f14859a89535d1a68241832810e41ef3fd5bb languageName: node linkType: hard @@ -9324,7 +9292,7 @@ __metadata: languageName: node linkType: hard -"iconv-lite@npm:0.6.3, iconv-lite@npm:^0.6.2": +"iconv-lite@npm:0.6.3, iconv-lite@npm:^0.6.2, iconv-lite@npm:^0.6.3": version: 0.6.3 resolution: "iconv-lite@npm:0.6.3" dependencies: @@ -9342,15 +9310,6 @@ __metadata: languageName: node linkType: hard -"iconv-lite@npm:^0.5.2": - version: 0.5.2 - resolution: "iconv-lite@npm:0.5.2" - dependencies: - safer-buffer: "npm:>= 2.1.2 < 3" - checksum: 10c0/6c51c9996fe360b03f501c0f76f122f007c6a9be924cfdf0b007044cfbcdeeb9c9decb5435465934dbd3804f37e67fdc2fb3ed8c9948464299165776541dff25 - languageName: node - linkType: hard - "ieee754@npm:^1.1.13, ieee754@npm:^1.2.1": version: 1.2.1 resolution: "ieee754@npm:1.2.1" @@ -9398,9 +9357,9 @@ __metadata: linkType: hard "immutable@npm:^5.0.2": - version: 5.0.3 - resolution: "immutable@npm:5.0.3" - checksum: 10c0/3269827789e1026cd25c2ea97f0b2c19be852ffd49eda1b674b20178f73d84fa8d945ad6f5ac5bc4545c2b4170af9f6e1f77129bc1cae7974a4bf9b04a9cdfb9 + version: 5.1.1 + resolution: "immutable@npm:5.1.1" + checksum: 10c0/5fd129ee9e448884003cc4f9e43bb91bab3b39dfeb3b49ddfb8bd563e0620eb47ae1f5b3ef96615d3ec38b52ab9a966dcacf9e39df00ed1a8ad062ddfba01cdf languageName: node linkType: hard @@ -9664,6 +9623,20 @@ __metadata: languageName: node linkType: hard +"is-immutable-type@npm:^5.0.1": + version: 5.0.1 + resolution: "is-immutable-type@npm:5.0.1" + dependencies: + "@typescript-eslint/type-utils": "npm:^8.0.0" + ts-api-utils: "npm:^2.0.0" + ts-declaration-location: "npm:^1.0.4" + peerDependencies: + eslint: "*" + typescript: ">=4.7.4" + checksum: 10c0/a46dec39942844f14d9938dd3ff7a9b345ecbb7d9a308a3719b303a088859e5efcfd765730d3bbfcc80fd32bd267d53fa49abaa2313bc792cdaa95ccce0e54c4 + languageName: node + linkType: hard + "is-interactive@npm:^1.0.0": version: 1.0.0 resolution: "is-interactive@npm:1.0.0" @@ -9930,13 +9903,12 @@ __metadata: linkType: hard "jsdom@npm:^26.0.0": - version: 26.0.0 - resolution: "jsdom@npm:26.0.0" + version: 26.1.0 + resolution: "jsdom@npm:26.1.0" dependencies: cssstyle: "npm:^4.2.1" data-urls: "npm:^5.0.0" - decimal.js: "npm:^10.4.3" - form-data: "npm:^4.0.1" + decimal.js: "npm:^10.5.0" html-encoding-sniffer: "npm:^4.0.0" http-proxy-agent: "npm:^7.0.2" https-proxy-agent: "npm:^7.0.6" @@ -9946,12 +9918,12 @@ __metadata: rrweb-cssom: "npm:^0.8.0" saxes: "npm:^6.0.0" symbol-tree: "npm:^3.2.4" - tough-cookie: "npm:^5.0.0" + tough-cookie: "npm:^5.1.1" w3c-xmlserializer: "npm:^5.0.0" webidl-conversions: "npm:^7.0.0" whatwg-encoding: "npm:^3.1.1" whatwg-mimetype: "npm:^4.0.0" - whatwg-url: "npm:^14.1.0" + whatwg-url: "npm:^14.1.1" ws: "npm:^8.18.0" xml-name-validator: "npm:^5.0.0" peerDependencies: @@ -9959,7 +9931,7 @@ __metadata: peerDependenciesMeta: canvas: optional: true - checksum: 10c0/e48725ba4027edcfc9bca5799eaec72c6561ecffe3675a8ff87fe9c3541ca4ff9f82b4eff5b3d9c527302da0d859b2f60e9364347a5d42b77f5c76c436c569dc + checksum: 10c0/5b14a5bc32ce077a06fb42d1ab95b1191afa5cbbce8859e3b96831c5143becbbcbf0511d4d4934e922d2901443ced2cdc3b734c1cf30b5f73b3e067ce457d0f4 languageName: node linkType: hard @@ -10092,7 +10064,7 @@ __metadata: languageName: node linkType: hard -"jsonrepair@npm:^3.9.0": +"jsonrepair@npm:^3.12.0": version: 3.12.0 resolution: "jsonrepair@npm:3.12.0" bin: @@ -10158,13 +10130,13 @@ __metadata: linkType: hard "katex@npm:^0.16.0": - version: 0.16.21 - resolution: "katex@npm:0.16.21" + version: 0.16.22 + resolution: "katex@npm:0.16.22" dependencies: commander: "npm:^8.3.0" bin: katex: cli.js - checksum: 10c0/e2e4139ba72a13f2393308fbb2b4c5511611a19a40a6e39d956cf775e553af3517dbfd0a54477faaf401c923e4654e32296347846b8ff15dfa579f88ff8579bb + checksum: 10c0/07b8b1f07ae53171b5f1ea0cf6f18841d2055825c8b11cd81cfe039afcd3af2cfc84ad033531ee3875088329105195b039c267e0dd4b0c237807e3c3b2009913 languageName: node linkType: hard @@ -10196,18 +10168,18 @@ __metadata: languageName: node linkType: hard -"ky@npm:^1.7.5": - version: 1.7.5 - resolution: "ky@npm:1.7.5" - checksum: 10c0/9f9c70a4916592f728c90e38ecbe2ed468eb7161b7525a4561a861e457edd5cb706751e2aba615d350380231d021f535147f9ed3ca07271af836465ecc725761 +"ky@npm:^1.8.0": + version: 1.8.1 + resolution: "ky@npm:1.8.1" + checksum: 10c0/48ab4b348dd7d8c6aa0f82df76fa32e99ade3c5513d50f58b0db5b945146deb6d8c18b2a61a0655b08385efa04b3bf1ed4098fff0329e3bd6c670c8a88668d9f languageName: node linkType: hard "langchain@npm:>=0.2.3 <0.3.0 || >=0.3.4 <0.4.0, langchain@npm:^0.3.8": - version: 0.3.19 - resolution: "langchain@npm:0.3.19" + version: 0.3.21 + resolution: "langchain@npm:0.3.21" dependencies: - "@langchain/openai": "npm:>=0.1.0 <0.5.0" + "@langchain/openai": "npm:>=0.1.0 <0.6.0" "@langchain/textsplitters": "npm:>=0.0.0 <0.2.0" js-tiktoken: "npm:^1.0.12" js-yaml: "npm:^4.1.0" @@ -10273,13 +10245,13 @@ __metadata: optional: true typeorm: optional: true - checksum: 10c0/251d743a0bcaf88b2837e93de5655c0edcd61cfb3b75bbbde60c50ae8ec2855781c533e8001fbdaef1ffffdbd4ae1bef2832ee7fcd476603b146c49e14a766bf + checksum: 10c0/f735b40a71744b2318fc1ad8563269586239f3baf29798c6eb7faa86f980e7d2c84b2fe2d88ed9378dbccd5e535b74ba66907ad21982b1cbb1d784b2ca6c082f languageName: node linkType: hard "langsmith@npm:>=0.2.8 <0.4.0": - version: 0.3.14 - resolution: "langsmith@npm:0.3.14" + version: 0.3.16 + resolution: "langsmith@npm:0.3.16" dependencies: "@types/uuid": "npm:^10.0.0" chalk: "npm:^4.1.2" @@ -10293,7 +10265,7 @@ __metadata: peerDependenciesMeta: openai: optional: true - checksum: 10c0/3e9ddaafc708cdb7e09d0b7bf44bf0813fdf9694722bd8158267acf213951f109c3142660a066e099a3161fb4eb89a2a1db330c3ee6edc01f587d392b85a9f80 + checksum: 10c0/7ab1d82b525a0916f950a2575bd44941785e699522cc251e03fcad699f198b3b99a3f67ec7dd0ec721eb661d060240ce7dd8326442b4cb227098389b88a1cb82 languageName: node linkType: hard @@ -10436,8 +10408,8 @@ __metadata: linkType: hard "lint-staged@npm:^15.5.0": - version: 15.5.0 - resolution: "lint-staged@npm:15.5.0" + version: 15.5.1 + resolution: "lint-staged@npm:15.5.1" dependencies: chalk: "npm:^5.4.1" commander: "npm:^13.1.0" @@ -10451,13 +10423,13 @@ __metadata: yaml: "npm:^2.7.0" bin: lint-staged: bin/lint-staged.js - checksum: 10c0/393b24d85d705a36e6556dc9d9b710594163be60f7789a2ca71bbf8f31debc10f7fde9cd0e868466ac2b7c154661983602decd7abbb6c685b21007bc70dbbdd6 + checksum: 10c0/86deddb08bf10428f2eb96c02326a9ee403360729225f0b12afb0c0f13c287a75daa01e179d86f64e3432576446d8643d204a47417296f9ef0aa56f1340ff2af languageName: node linkType: hard "listr2@npm:^8.2.5": - version: 8.2.5 - resolution: "listr2@npm:8.2.5" + version: 8.3.2 + resolution: "listr2@npm:8.3.2" dependencies: cli-truncate: "npm:^4.0.0" colorette: "npm:^2.0.20" @@ -10465,7 +10437,7 @@ __metadata: log-update: "npm:^6.1.0" rfdc: "npm:^1.4.1" wrap-ansi: "npm:^9.0.0" - checksum: 10c0/f5a9599514b00c27d7eb32d1117c83c61394b2a985ec20e542c798bf91cf42b19340215701522736f5b7b42f557e544afeadec47866e35e5d4f268f552729671 + checksum: 10c0/6b6378e28debda863d31f03ffe880a76b45c07388c74e8e0676fc957de7f2aff24fdea7f48b17d12808440f64680215c36df388c79d2b367c7866dd66f75fb09 languageName: node linkType: hard @@ -11163,13 +11135,6 @@ __metadata: languageName: node linkType: hard -"methods@npm:~1.1.2": - version: 1.1.2 - resolution: "methods@npm:1.1.2" - checksum: 10c0/bdf7cc72ff0a33e3eede03708c08983c4d7a173f91348b4b1e4f47d4cdbf734433ad971e7d1e8c77247d9e5cd8adb81ea4c67b0a2db526b758b2233d7814b8b2 - languageName: node - linkType: hard - "mhchemparser@npm:^4.1.0": version: 4.2.1 resolution: "mhchemparser@npm:4.2.1" @@ -11410,10 +11375,9 @@ __metadata: linkType: hard "micromark-extension-mdx-jsx@npm:^3.0.1": - version: 3.0.1 - resolution: "micromark-extension-mdx-jsx@npm:3.0.1" + version: 3.0.2 + resolution: "micromark-extension-mdx-jsx@npm:3.0.2" dependencies: - "@types/acorn": "npm:^4.0.0" "@types/estree": "npm:^1.0.0" devlop: "npm:^1.0.0" estree-util-is-identifier-name: "npm:^3.0.0" @@ -11424,7 +11388,7 @@ __metadata: micromark-util-symbol: "npm:^2.0.0" micromark-util-types: "npm:^2.0.0" vfile-message: "npm:^4.0.0" - checksum: 10c0/11e65abd6b57bcf82665469cd1ff238b7cfc4ebb4942a0361df2dc7dd4ab133681b2bcbd4c388dddf6e4db062665d31efeb48cc844ee61c8d8de9d167cc946d8 + checksum: 10c0/5693b2e51934ac29a6aab521eaa2151f891d1fe092550bbd4ce24e4dd7567c1421a54f5e585a57dfa1769a79570f6df57ddd7a98bf0889dd11d495847a266dd7 languageName: node linkType: hard @@ -11452,8 +11416,8 @@ __metadata: linkType: hard "micromark-factory-mdx-expression@npm:^2.0.0": - version: 2.0.2 - resolution: "micromark-factory-mdx-expression@npm:2.0.2" + version: 2.0.3 + resolution: "micromark-factory-mdx-expression@npm:2.0.3" dependencies: "@types/estree": "npm:^1.0.0" devlop: "npm:^1.0.0" @@ -11464,7 +11428,7 @@ __metadata: micromark-util-types: "npm:^2.0.0" unist-util-position-from-estree: "npm:^2.0.0" vfile-message: "npm:^4.0.0" - checksum: 10c0/87372775ae06478ab754efa058a5e382972f634c14f0afa303111037c30abf733fe65329a7e59cda969266e63f82104d9ed8ff9ada39189eab0651b6540ca64a + checksum: 10c0/a6004ef6272dd01a5d718f2affd7bfb5e08f0849340f5fd96ac823fbc5e9d3b3343acedda50805873ccda5e3b8af4d5fbb302abc874544044ac90c217345cf97 languageName: node linkType: hard @@ -11571,10 +11535,9 @@ __metadata: linkType: hard "micromark-util-events-to-acorn@npm:^2.0.0": - version: 2.0.2 - resolution: "micromark-util-events-to-acorn@npm:2.0.2" + version: 2.0.3 + resolution: "micromark-util-events-to-acorn@npm:2.0.3" dependencies: - "@types/acorn": "npm:^4.0.0" "@types/estree": "npm:^1.0.0" "@types/unist": "npm:^3.0.0" devlop: "npm:^1.0.0" @@ -11582,7 +11545,7 @@ __metadata: micromark-util-symbol: "npm:^2.0.0" micromark-util-types: "npm:^2.0.0" vfile-message: "npm:^4.0.0" - checksum: 10c0/2bd2660a49efddb625e6adcabdc3384ae4c50c7a04270737270f4aab53d09e8253e6d2607cd947c4c77f8a9900278915babb240e61fd143dc5bab51d9fd50709 + checksum: 10c0/a4e0716e943ffdd16a918edf51d4f8291ec2692f5c4d04693dbef3358716fba891f288197afd102c14f4d98dac09d52351046ab7aad1d50b74677bdd5fa683c0 languageName: node linkType: hard @@ -11700,7 +11663,7 @@ __metadata: languageName: node linkType: hard -"mime-db@npm:^1.53.0": +"mime-db@npm:^1.54.0": version: 1.54.0 resolution: "mime-db@npm:1.54.0" checksum: 10c0/8d907917bc2a90fa2df842cdf5dfeaf509adc15fe0531e07bb2f6ab15992416479015828d6a74200041c492e42cce3ebf78e5ce714388a0a538ea9c53eece284 @@ -11716,12 +11679,12 @@ __metadata: languageName: node linkType: hard -"mime-types@npm:^3.0.0": - version: 3.0.0 - resolution: "mime-types@npm:3.0.0" +"mime-types@npm:^3.0.0, mime-types@npm:^3.0.1": + version: 3.0.1 + resolution: "mime-types@npm:3.0.1" dependencies: - mime-db: "npm:^1.53.0" - checksum: 10c0/8624501c75568f14e53fd9e12327fa18e70d6a85047c5beb9146990178f3adb31f893cb54d25ab58145cabf3e06c61953f2c5427ccd05b6b38fe09db8c5f5e7f + mime-db: "npm:^1.54.0" + checksum: 10c0/bd8c20d3694548089cf229016124f8f40e6a60bbb600161ae13e45f793a2d5bb40f96bbc61f275836696179c77c1d6bf4967b2a75e0a8ad40fe31f4ed5be4da5 languageName: node linkType: hard @@ -11744,11 +11707,11 @@ __metadata: linkType: hard "mime@npm:^4.0.4, mime@npm:^4.0.6": - version: 4.0.6 - resolution: "mime@npm:4.0.6" + version: 4.0.7 + resolution: "mime@npm:4.0.7" bin: mime: bin/cli.js - checksum: 10c0/1797b1c6da4cdb817fc18a4b8d99d6034885946f3d3680c2e4eb18bf19d4a64b42559f1eae0d1607e216f584311f9f806b5bfa1426baebeae4807bec5e14188a + checksum: 10c0/2fd22ee2012a3f1dcac7dd06b7dc314dd677ebcefb14355b7c9453f0092af6eabbe9d754d9849d2a1f346ddd53d716a851379be05386f7a6ccb40af4bd61f32b languageName: node linkType: hard @@ -11964,12 +11927,11 @@ __metadata: linkType: hard "minizlib@npm:^3.0.1": - version: 3.0.1 - resolution: "minizlib@npm:3.0.1" + version: 3.0.2 + resolution: "minizlib@npm:3.0.2" dependencies: - minipass: "npm:^7.0.4" - rimraf: "npm:^5.0.5" - checksum: 10c0/82f8bf70da8af656909a8ee299d7ed3b3372636749d29e105f97f20e88971be31f5ed7642f2e898f00283b68b701cc01307401cdc209b0efc5dd3818220e5093 + minipass: "npm:^7.1.2" + checksum: 10c0/9f3bd35e41d40d02469cb30470c55ccc21cae0db40e08d1d0b1dff01cc8cc89a6f78e9c5d2b7c844e485ec0a8abc2238111213fdc5b2038e6d1012eacf316f78 languageName: node linkType: hard @@ -12030,13 +11992,6 @@ __metadata: languageName: node linkType: hard -"ms@npm:2.1.2": - version: 2.1.2 - resolution: "ms@npm:2.1.2" - checksum: 10c0/a437714e2f90dbf881b5191d35a6db792efbca5badf112f87b9e1c712aace4b4b9b742dd6537f3edf90fd6f684de897cec230abde57e87883766712ddda297cc - languageName: node - linkType: hard - "ms@npm:^2.0.0, ms@npm:^2.1.1, ms@npm:^2.1.3": version: 2.1.3 resolution: "ms@npm:2.1.3" @@ -12210,6 +12165,17 @@ __metadata: languageName: node linkType: hard +"node-gyp-build@npm:^4.3.0": + version: 4.8.4 + resolution: "node-gyp-build@npm:4.8.4" + bin: + node-gyp-build: bin.js + node-gyp-build-optional: optional.js + node-gyp-build-test: build-test.js + checksum: 10c0/444e189907ece2081fe60e75368784f7782cfddb554b60123743dfb89509df89f1f29c03bbfa16b3a3e0be3f48799a4783f487da6203245fa5bed239ba7407e1 + languageName: node + linkType: hard + "node-gyp@npm:^9.1.0": version: 9.4.1 resolution: "node-gyp@npm:9.4.1" @@ -12455,7 +12421,7 @@ __metadata: languageName: node linkType: hard -"on-finished@npm:2.4.1, on-finished@npm:^2.4.1": +"on-finished@npm:^2.4.1": version: 2.4.1 resolution: "on-finished@npm:2.4.1" dependencies: @@ -12464,7 +12430,7 @@ __metadata: languageName: node linkType: hard -"once@npm:1.4.0, once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0": +"once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0": version: 1.4.0 resolution: "once@npm:1.4.0" dependencies: @@ -12500,22 +12466,22 @@ __metadata: languageName: node linkType: hard -"oniguruma-parser@npm:^0.5.4": - version: 0.5.4 - resolution: "oniguruma-parser@npm:0.5.4" - checksum: 10c0/934866661ab8ff379f7605121c96d0f22bede073c7fda5b7ae60da2eebdd1380dff5058118dd67df2cdacbdd275167f3e72cf87dc87882f8b7feda014785de00 +"oniguruma-parser@npm:^0.11.0": + version: 0.11.1 + resolution: "oniguruma-parser@npm:0.11.1" + checksum: 10c0/d721cabe5632d0b772fec95dd6920cb6d6ba7a8e9b247dbb32a82b8a997137ecb62110d1788578dfd43596d4461a3319ca320d30aa2b6ebbaa19552a98e507ba languageName: node linkType: hard "oniguruma-to-es@npm:^4.1.0": - version: 4.1.0 - resolution: "oniguruma-to-es@npm:4.1.0" + version: 4.2.0 + resolution: "oniguruma-to-es@npm:4.2.0" dependencies: emoji-regex-xs: "npm:^1.0.0" - oniguruma-parser: "npm:^0.5.4" + oniguruma-parser: "npm:^0.11.0" regex: "npm:^6.0.1" regex-recursion: "npm:^6.0.2" - checksum: 10c0/8f3fc7f524a7fa78cecc3a2af29d19a834563b25de4eb3ed138ffe062075dfedacd997d86951b38cc5c5d6b5c083df1f5a10a442b742df9399eaa6ea9aa68392 + checksum: 10c0/a2c505ad9d4ccca9f71a5ea22dc68ab94f244e2fab5b04fea54f355411a2c13d65b5c28925af508ea3a694ce8cf9e86931681bfe3ea4a89722d9b50e24bf21fd languageName: node linkType: hard @@ -12565,8 +12531,8 @@ __metadata: linkType: hard "openai@npm:^4.87.3": - version: 4.89.0 - resolution: "openai@npm:4.89.0" + version: 4.94.0 + resolution: "openai@npm:4.94.0" dependencies: "@types/node": "npm:^18.11.18" "@types/node-fetch": "npm:^2.6.4" @@ -12585,7 +12551,7 @@ __metadata: optional: true bin: openai: bin/cli - checksum: 10c0/9f50ea2dc8678a9e80c7699095025e5eea37bf7dafdbbc5ad44ab8b46ad59d41b0a0f2150a76c1d539fa846881864b5a9a0f9eddbf0c1a3ca2223aca2fd7d214 + checksum: 10c0/4b9bf824b2ad07645b98c448e667986ac7bbc4aa319e48d577db7dab3ca9f8aadb3f7732447b33453ed25d0f4040a0dccbb0ddc1801b163fd6cfcdd6f60e92d2 languageName: node linkType: hard @@ -12821,7 +12787,7 @@ __metadata: languageName: node linkType: hard -"p-throttle@npm:^6.2.0": +"p-throttle@npm:6.2.0": version: 6.2.0 resolution: "p-throttle@npm:6.2.0" checksum: 10c0/3be65f66eb21137be78b8d18a5240117312b942e3aa788f838ac4be785ab3c40b64ee34b2c393cd948ec7845c0a00241f446395b98ff4754e718fe54fdee0b00 @@ -12988,7 +12954,7 @@ __metadata: languageName: node linkType: hard -"parseurl@npm:^1.3.3, parseurl@npm:~1.3.3": +"parseurl@npm:^1.3.3": version: 1.3.3 resolution: "parseurl@npm:1.3.3" checksum: 10c0/90dd4760d6f6174adb9f20cf0965ae12e23879b5f5464f38e92fce8073354341e4b3b76fa3d878351efe7d01e617121955284cfd002ab087fba1a0726ec0b4f5 @@ -13453,7 +13419,7 @@ __metadata: languageName: node linkType: hard -"proxy-addr@npm:~2.0.7": +"proxy-addr@npm:^2.0.7": version: 2.0.7 resolution: "proxy-addr@npm:2.0.7" dependencies: @@ -13519,15 +13485,6 @@ __metadata: languageName: node linkType: hard -"qs@npm:6.13.0": - version: 6.13.0 - resolution: "qs@npm:6.13.0" - dependencies: - side-channel: "npm:^1.0.6" - checksum: 10c0/62372cdeec24dc83a9fb240b7533c0fdcf0c5f7e0b83343edd7310f0ab4c8205a5e7c56406531f2e47e1b4878a3821d652be4192c841de5b032ca83619d8f860 - languageName: node - linkType: hard - "qs@npm:^6.14.0": version: 6.14.0 resolution: "qs@npm:6.14.0" @@ -13566,9 +13523,9 @@ __metadata: linkType: hard "quick-lru@npm:^7.0.0": - version: 7.0.0 - resolution: "quick-lru@npm:7.0.0" - checksum: 10c0/d46e3dc6d2f79f83d3dc852b32b3d9fcf5337bf5b4016122c1b729aa7bcd54dd79b2f3cb36b59a5a3f5c30443ecfbc9e7d400cfc30feedd8d58d3d4213d08a18 + version: 7.0.1 + resolution: "quick-lru@npm:7.0.1" + checksum: 10c0/631d031d9aba116311b1db57fbf8637874f2b72731f435a9d015cc0405aae5d18206336953563627ca7c9ed971a3824f11cb4dc1575d03283252a8cea22ac8e1 languageName: node linkType: hard @@ -13579,7 +13536,7 @@ __metadata: languageName: node linkType: hard -"range-parser@npm:^1.2.1, range-parser@npm:~1.2.1": +"range-parser@npm:^1.2.1": version: 1.2.1 resolution: "range-parser@npm:1.2.1" checksum: 10c0/96c032ac2475c8027b7a4e9fe22dc0dfe0f6d90b85e496e0f016fbdb99d6d066de0112e680805075bd989905e2123b3b3d002765149294dce0c1f7f01fcc2ea0 @@ -13704,7 +13661,7 @@ __metadata: languageName: node linkType: hard -"rc-image@npm:~7.11.0": +"rc-image@npm:~7.11.1": version: 7.11.1 resolution: "rc-image@npm:7.11.1" dependencies: @@ -13721,25 +13678,25 @@ __metadata: languageName: node linkType: hard -"rc-input-number@npm:~9.4.0": - version: 9.4.0 - resolution: "rc-input-number@npm:9.4.0" +"rc-input-number@npm:~9.5.0": + version: 9.5.0 + resolution: "rc-input-number@npm:9.5.0" dependencies: "@babel/runtime": "npm:^7.10.1" "@rc-component/mini-decimal": "npm:^1.0.1" classnames: "npm:^2.2.5" - rc-input: "npm:~1.7.1" + rc-input: "npm:~1.8.0" rc-util: "npm:^5.40.1" peerDependencies: react: ">=16.9.0" react-dom: ">=16.9.0" - checksum: 10c0/6589a0e9f0a3899b67207e0f9aa4ad9a783db90f59c314cf4ffa4c12733c52de951e6bd58c414ca9a0485a8d70172148f57532e21c1f959f4e5c9f7af2b0b021 + checksum: 10c0/332aef42cd1f0e9eeee08c85db978c9615dfec5c8972e91c37a2ba4e06c3578d84dda05698e98893c6e62620d0d53aa910c0fbee2afac8f54c6f68759c296a58 languageName: node linkType: hard -"rc-input@npm:~1.7.1, rc-input@npm:~1.7.3": - version: 1.7.3 - resolution: "rc-input@npm:1.7.3" +"rc-input@npm:~1.8.0": + version: 1.8.0 + resolution: "rc-input@npm:1.8.0" dependencies: "@babel/runtime": "npm:^7.11.1" classnames: "npm:^2.2.1" @@ -13747,25 +13704,25 @@ __metadata: peerDependencies: react: ">=16.0.0" react-dom: ">=16.0.0" - checksum: 10c0/485ecac73a1eaf8503cb37b93b2d7874a44d65354bda7abfb58c648af8824ec3d275f588e39ee1841929e5d18f1854afa62c5b4db719bcc6c3dc6db3030904cd + checksum: 10c0/fe4e67b6980b22f77d62dcd87177a2381976baeaff265a27c4adb63bab48735f7c89b271c541eb0aab8c9d58af66979f45e79b44b72342838ac038ee5db0ba73 languageName: node linkType: hard -"rc-mentions@npm:~2.19.1": - version: 2.19.1 - resolution: "rc-mentions@npm:2.19.1" +"rc-mentions@npm:~2.20.0": + version: 2.20.0 + resolution: "rc-mentions@npm:2.20.0" dependencies: "@babel/runtime": "npm:^7.22.5" "@rc-component/trigger": "npm:^2.0.0" classnames: "npm:^2.2.6" - rc-input: "npm:~1.7.1" + rc-input: "npm:~1.8.0" rc-menu: "npm:~9.16.0" - rc-textarea: "npm:~1.9.0" + rc-textarea: "npm:~1.10.0" rc-util: "npm:^5.34.1" peerDependencies: react: ">=16.9.0" react-dom: ">=16.9.0" - checksum: 10c0/7745b6cad8f5ae950b735b0771b3aad204505dc9f01ff2fd54807c51f8618183037d17c88a4f81cf99606dd7eb1378a0b0081cca64676b4f07ed2d74d678ffb0 + checksum: 10c0/2b242221772bad982c47916328e0245365134ba48519d171a93a8d79ddbdfb20a98421d7962215867dc9097dd58c307ea9bb6c9590125c0484c01d0b78e207e0 languageName: node linkType: hard @@ -14009,9 +13966,9 @@ __metadata: languageName: node linkType: hard -"rc-tabs@npm:~15.5.1": - version: 15.5.1 - resolution: "rc-tabs@npm:15.5.1" +"rc-tabs@npm:~15.5.2": + version: 15.5.2 + resolution: "rc-tabs@npm:15.5.2" dependencies: "@babel/runtime": "npm:^7.11.2" classnames: "npm:2.x" @@ -14023,23 +13980,23 @@ __metadata: peerDependencies: react: ">=16.9.0" react-dom: ">=16.9.0" - checksum: 10c0/58b7318eb13d0e6124fc66a1539b131e710a3665585d511f8645fc468e7f93caf96386f7d7613e9a3c0383bb5372979962bf8d7617ad8478c7abcd00bf521659 + checksum: 10c0/59b66c809da92b3d6943020bc71ce1702f9c92c59ca48d6922aaa739bec20796f96c9ce37fd8ef0553c21e312db7a51b1ab700c6b7993761727951386276585a languageName: node linkType: hard -"rc-textarea@npm:~1.9.0": - version: 1.9.0 - resolution: "rc-textarea@npm:1.9.0" +"rc-textarea@npm:~1.10.0": + version: 1.10.0 + resolution: "rc-textarea@npm:1.10.0" dependencies: "@babel/runtime": "npm:^7.10.1" classnames: "npm:^2.2.1" - rc-input: "npm:~1.7.1" + rc-input: "npm:~1.8.0" rc-resize-observer: "npm:^1.0.0" rc-util: "npm:^5.27.0" peerDependencies: react: ">=16.9.0" react-dom: ">=16.9.0" - checksum: 10c0/4b2195361fae64e2ede9eb0dd5815ff1ceef4504a74dd0e5964c24f5ee9103ebf83e1d0083920a26233553ec7c43ae6b9f05bb508caef117b453cf292fa9e54a + checksum: 10c0/aef90816078afa4bae54f152ca8a06834bb86d700e22a30f65979dc45fa5fbb10fe9894ecf2acb10102a3183c5a03b3518134db0df3ba3a32a79fe6de398fde0 languageName: node linkType: hard @@ -14147,23 +14104,23 @@ __metadata: linkType: hard "react-dom@npm:^19.0.0": - version: 19.0.0 - resolution: "react-dom@npm:19.0.0" + version: 19.1.0 + resolution: "react-dom@npm:19.1.0" dependencies: - scheduler: "npm:^0.25.0" + scheduler: "npm:^0.26.0" peerDependencies: - react: ^19.0.0 - checksum: 10c0/a36ce7ab507b237ae2759c984cdaad4af4096d8199fb65b3815c16825e5cfeb7293da790a3fc2184b52bfba7ba3ff31c058c01947aff6fd1a3701632aabaa6a9 + react: ^19.1.0 + checksum: 10c0/3e26e89bb6c67c9a6aa86cb888c7a7f8258f2e347a6d2a15299c17eb16e04c19194e3452bc3255bd34000a61e45e2cb51e46292392340432f133e5a5d2dfb5fc languageName: node linkType: hard "react-hotkeys-hook@npm:^4.6.1": - version: 4.6.1 - resolution: "react-hotkeys-hook@npm:4.6.1" + version: 4.6.2 + resolution: "react-hotkeys-hook@npm:4.6.2" peerDependencies: react: ">=16.8.1" react-dom: ">=16.8.1" - checksum: 10c0/e23916567b0b863831cf7e2ddba591e82988a3212a9e4b818ac7da6d751b7e8b102f2245d8bf7e9526a97766ffd092efdbfbcc457b74564415f5d5f8ab51919e + checksum: 10c0/ef30c49260f47972acea37f3d2cae4de871a6f65bd25ebe0d266586ccf6fb495ed44ba78296dbeed82f3493b1dec8bde5df63e6f0f9a4f99697394e512049f84 languageName: node linkType: hard @@ -14325,9 +14282,9 @@ __metadata: linkType: hard "react@npm:^19.0.0": - version: 19.0.0 - resolution: "react@npm:19.0.0" - checksum: 10c0/9cad8f103e8e3a16d15cb18a0d8115d8bd9f9e1ce3420310aea381eb42aa0a4f812cf047bb5441349257a05fba8a291515691e3cb51267279b2d2c3253f38471 + version: 19.1.0 + resolution: "react@npm:19.1.0" + checksum: 10c0/530fb9a62237d54137a13d2cfb67a7db6a2156faed43eecc423f4713d9b20c6f2728b026b45e28fcd72e8eadb9e9ed4b089e99f5e295d2f0ad3134251bdd3698 languageName: node linkType: hard @@ -14616,15 +14573,15 @@ __metadata: linkType: hard "remark-rehype@npm:^11.0.0": - version: 11.1.1 - resolution: "remark-rehype@npm:11.1.1" + version: 11.1.2 + resolution: "remark-rehype@npm:11.1.2" dependencies: "@types/hast": "npm:^3.0.0" "@types/mdast": "npm:^4.0.0" mdast-util-to-hast: "npm:^13.0.0" unified: "npm:^11.0.0" vfile: "npm:^6.0.0" - checksum: 10c0/68f986e8ee758d415e93babda2a0d89477c15b7c200edc23b8b1d914dd6e963c5fc151a11cbbbcfa7dd237367ff3ef86e302be90f31f37a17b0748668bd8c65b + checksum: 10c0/f9eccacfb596d9605581dc05bfad28635d6ded5dd0a18e88af5fd4df0d3fcf9612e1501d4513bc2164d833cfe9636dab20400080b09e53f155c6e1442a1231fb languageName: node linkType: hard @@ -14862,7 +14819,7 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:^5.0.10, rimraf@npm:^5.0.5": +"rimraf@npm:^5.0.10": version: 5.0.10 resolution: "rimraf@npm:5.0.10" dependencies: @@ -14984,14 +14941,16 @@ __metadata: languageName: node linkType: hard -"router@npm:^2.0.0": - version: 2.1.0 - resolution: "router@npm:2.1.0" +"router@npm:^2.2.0": + version: 2.2.0 + resolution: "router@npm:2.2.0" dependencies: + debug: "npm:^4.4.0" + depd: "npm:^2.0.0" is-promise: "npm:^4.0.0" parseurl: "npm:^1.3.3" path-to-regexp: "npm:^8.0.0" - checksum: 10c0/df17c5c07210cb72922185ea9378b318676c1e1af9110c52cfa8339bff43004f240cb6660d3b23c932f7867ab6a3ed3fe9d8e8fb0d7ac7402d0b7e7a59f9ba07 + checksum: 10c0/3279de7450c8eae2f6e095e9edacbdeec0abb5cb7249c6e719faa0db2dba43574b4fff5892d9220631c9abaff52dd3cad648cfea2aaace845e1a071915ac8867 languageName: node linkType: hard @@ -15042,8 +15001,8 @@ __metadata: linkType: hard "sass@npm:^1.77.2": - version: 1.86.0 - resolution: "sass@npm:1.86.0" + version: 1.86.3 + resolution: "sass@npm:1.86.3" dependencies: "@parcel/watcher": "npm:^2.4.1" chokidar: "npm:^4.0.0" @@ -15054,7 +15013,7 @@ __metadata: optional: true bin: sass: sass.js - checksum: 10c0/921caea1fd8a450d4a986e5570ce13c4ca7b2a57da390811add3d2087ad8f46f53b34652ddcb237d8bdaad49c560b8d6eee130c733c787d058bc5a71a914c139 + checksum: 10c0/ba819a0828f732adf7a94cd8ca017bce92bc299ffb878836ed1da80a30612bfbbf56a5e42d6dff3ad80d919c2025afb42948fc7b54a7bc61a9a2d58e1e0c558a languageName: node linkType: hard @@ -15074,10 +15033,10 @@ __metadata: languageName: node linkType: hard -"scheduler@npm:^0.25.0": - version: 0.25.0 - resolution: "scheduler@npm:0.25.0" - checksum: 10c0/a4bb1da406b613ce72c1299db43759526058fdcc413999c3c3e0db8956df7633acf395cb20eb2303b6a65d658d66b6585d344460abaee8080b4aa931f10eaafe +"scheduler@npm:^0.26.0": + version: 0.26.0 + resolution: "scheduler@npm:0.26.0" + checksum: 10c0/5b8d5bfddaae3513410eda54f2268e98a376a429931921a81b5c3a2873aab7ca4d775a8caac5498f8cbc7d0daeab947cf923dbd8e215d61671f9f4e392d34356 languageName: node linkType: hard @@ -15145,23 +15104,22 @@ __metadata: languageName: node linkType: hard -"send@npm:^1.0.0, send@npm:^1.1.0": - version: 1.1.0 - resolution: "send@npm:1.1.0" +"send@npm:^1.1.0, send@npm:^1.2.0": + version: 1.2.0 + resolution: "send@npm:1.2.0" dependencies: debug: "npm:^4.3.5" - destroy: "npm:^1.2.0" encodeurl: "npm:^2.0.0" escape-html: "npm:^1.0.3" etag: "npm:^1.8.1" - fresh: "npm:^0.5.2" + fresh: "npm:^2.0.0" http-errors: "npm:^2.0.0" - mime-types: "npm:^2.1.35" + mime-types: "npm:^3.0.1" ms: "npm:^2.1.3" on-finished: "npm:^2.4.1" range-parser: "npm:^1.2.1" statuses: "npm:^2.0.1" - checksum: 10c0/0d73408bccfd008bb50cb97225434cf565f653b66cb7961befa962a321a936eaefa6c481a1a9c30606f341afb1f08d990bcbf44949f48a68e06d63344eb91105 + checksum: 10c0/531bcfb5616948d3468d95a1fd0adaeb0c20818ba4a500f439b800ca2117971489e02074ce32796fd64a6772ea3e7235fe0583d8241dbd37a053dc3378eff9a5 languageName: node linkType: hard @@ -15174,15 +15132,15 @@ __metadata: languageName: node linkType: hard -"serve-static@npm:^2.1.0": - version: 2.1.0 - resolution: "serve-static@npm:2.1.0" +"serve-static@npm:^2.2.0": + version: 2.2.0 + resolution: "serve-static@npm:2.2.0" dependencies: encodeurl: "npm:^2.0.0" escape-html: "npm:^1.0.3" parseurl: "npm:^1.3.3" - send: "npm:^1.0.0" - checksum: 10c0/f5b36fd3a763cdb4bf367c9be2eff587c0e52685fcf9109aa28428457c4aad0f83d8b6a1bf4929488963270026f3647f2d221c898e6dbdf9f4f5b09ed0b1f51a + send: "npm:^1.2.0" + checksum: 10c0/30e2ed1dbff1984836cfd0c65abf5d3f3f83bcd696c99d2d3c97edbd4e2a3ff4d3f87108a7d713640d290a7b6fe6c15ddcbc61165ab2eaad48ea8d3b52c7f913 languageName: node linkType: hard @@ -15231,18 +15189,18 @@ __metadata: linkType: hard "shiki@npm:^3.2.1": - version: 3.2.1 - resolution: "shiki@npm:3.2.1" + version: 3.2.2 + resolution: "shiki@npm:3.2.2" dependencies: - "@shikijs/core": "npm:3.2.1" - "@shikijs/engine-javascript": "npm:3.2.1" - "@shikijs/engine-oniguruma": "npm:3.2.1" - "@shikijs/langs": "npm:3.2.1" - "@shikijs/themes": "npm:3.2.1" - "@shikijs/types": "npm:3.2.1" + "@shikijs/core": "npm:3.2.2" + "@shikijs/engine-javascript": "npm:3.2.2" + "@shikijs/engine-oniguruma": "npm:3.2.2" + "@shikijs/langs": "npm:3.2.2" + "@shikijs/themes": "npm:3.2.2" + "@shikijs/types": "npm:3.2.2" "@shikijs/vscode-textmate": "npm:^10.0.2" "@types/hast": "npm:^3.0.4" - checksum: 10c0/8153b5a354c508815c8a20c03bf182aa863d07e865bc603e136c633c60abb729655c5487109111ed8a3e5a4aff0275f3b714b05c5b129085c8ed69069537f0c0 + checksum: 10c0/0183f889029ff1d14f79aa34e36f1e5a67b667661422f8a7de8936164099827588df7b2b4ed6835ad2eb3efb11ea882b4cb8022550503108c958a796df01f35c languageName: node linkType: hard @@ -15281,7 +15239,7 @@ __metadata: languageName: node linkType: hard -"side-channel@npm:^1.0.6, side-channel@npm:^1.1.0": +"side-channel@npm:^1.1.0": version: 1.1.0 resolution: "side-channel@npm:1.1.0" dependencies: @@ -15504,15 +15462,15 @@ __metadata: linkType: hard "speech-rule-engine@npm:^4.0.6": - version: 4.0.7 - resolution: "speech-rule-engine@npm:4.0.7" + version: 4.1.1 + resolution: "speech-rule-engine@npm:4.1.1" dependencies: - commander: "npm:9.2.0" + "@xmldom/xmldom": "npm:0.9.8" + commander: "npm:13.1.0" wicked-good-xpath: "npm:1.3.0" - xmldom-sre: "npm:0.1.31" bin: sre: bin/sre - checksum: 10c0/f9e17b5c6e09de41b67a1895f246706e4f36f8338575cd61f1653a16a0babad90db28365da350a10c4ab561a268d2cd3212cae9eff921556c274deac6e92df3c + checksum: 10c0/f3b3bf0d64b14592540be813d1914255648658710c343157d1d5edb0c3e279014cb0795e2b1867cace71bf9beebd05ffb5cce845244fe5b97ecf46bf6d7de8d6 languageName: node linkType: hard @@ -15827,8 +15785,8 @@ __metadata: linkType: hard "styled-components@npm:^6.1.11": - version: 6.1.16 - resolution: "styled-components@npm:6.1.16" + version: 6.1.17 + resolution: "styled-components@npm:6.1.17" dependencies: "@emotion/is-prop-valid": "npm:1.2.2" "@emotion/unitless": "npm:0.8.1" @@ -15842,7 +15800,7 @@ __metadata: peerDependencies: react: ">= 16.8.0" react-dom: ">= 16.8.0" - checksum: 10c0/190d6d5dc9099489fac37e23be5bda7fef399ca9f9230f1de81100b98ec1c75070ef5990241c007126d97f40069d3c864f4239e185161a70ff111dd3e3bf5370 + checksum: 10c0/87f35173c5fc2291ddba7ed8224d19fe6872d056a577f55fe130248f5ea23e5c48c012e881fa1ad93df60b56a12c1c2d553f628e204f090189221734927e50b0 languageName: node linkType: hard @@ -15915,13 +15873,13 @@ __metadata: languageName: node linkType: hard -"synckit@npm:^0.9.1": - version: 0.9.2 - resolution: "synckit@npm:0.9.2" +"synckit@npm:^0.11.0": + version: 0.11.4 + resolution: "synckit@npm:0.11.4" dependencies: - "@pkgr/core": "npm:^0.1.0" - tslib: "npm:^2.6.2" - checksum: 10c0/e0c262817444e5b872708adb6f5ad37951ba33f6b2d1d4477d45db1f57573a784618ceed5e6614e0225db330632b1f6b95bb74d21e4d013e45ad4bde03d0cb59 + "@pkgr/core": "npm:^0.2.3" + tslib: "npm:^2.8.1" + checksum: 10c0/dd2965a37c93c0b652bf07b1fd8d1639a803b65cf34c0cb1b827b8403044fc3b09ec87f681d922a324825127ee95b2e0394e7caccb502f407892d63e903c5276 languageName: node linkType: hard @@ -16106,21 +16064,21 @@ __metadata: languageName: node linkType: hard -"tldts-core@npm:^6.1.85": - version: 6.1.85 - resolution: "tldts-core@npm:6.1.85" - checksum: 10c0/f028759b361bef86d3dd8dbaaa010b4c3aca236ec7ba097658b9a595243bb34c98206e410cc3631055af6ed34012f5da7e9af2c4e38e218d5fc693df6ab3da33 +"tldts-core@npm:^6.1.86": + version: 6.1.86 + resolution: "tldts-core@npm:6.1.86" + checksum: 10c0/8133c29375f3f99f88fce5f4d62f6ecb9532b106f31e5423b27c1eb1b6e711bd41875184a456819ceaed5c8b94f43911b1ad57e25c6eb86e1fc201228ff7e2af languageName: node linkType: hard "tldts@npm:^6.1.32": - version: 6.1.85 - resolution: "tldts@npm:6.1.85" + version: 6.1.86 + resolution: "tldts@npm:6.1.86" dependencies: - tldts-core: "npm:^6.1.85" + tldts-core: "npm:^6.1.86" bin: tldts: bin/cli.js - checksum: 10c0/83bc222046f36a9ca071b662e3272bb1e98e849fa4bddfab0a3eba8804a4a539b02bcbe55e1277fe713de6677e55104da2ef9a54d006c642b6e9f26c7595d5aa + checksum: 10c0/27ae7526d9d78cb97b2de3f4d102e0b4321d1ccff0648a7bb0e039ed54acbce86bacdcd9cd3c14310e519b457854e7bafbef1f529f58a1e217a737ced63f0940 languageName: node linkType: hard @@ -16197,7 +16155,7 @@ __metadata: languageName: node linkType: hard -"tough-cookie@npm:^5.0.0": +"tough-cookie@npm:^5.1.1": version: 5.1.2 resolution: "tough-cookie@npm:5.1.2" dependencies: @@ -16262,7 +16220,7 @@ __metadata: languageName: node linkType: hard -"ts-api-utils@npm:^2.0.1": +"ts-api-utils@npm:^2.0.0, ts-api-utils@npm:^2.0.1": version: 2.1.0 resolution: "ts-api-utils@npm:2.1.0" peerDependencies: @@ -16271,10 +16229,21 @@ __metadata: languageName: node linkType: hard -"ts-pattern@npm:^5.6.2": - version: 5.6.2 - resolution: "ts-pattern@npm:5.6.2" - checksum: 10c0/f7b2442d9694fb94070acd7e564589744a581a252ab8a33bdda7b018f280cfa5ee247aa1a8a1eb8e2c843542cc07e36f491cbeb838abfc626eaeff1cc801ac2d +"ts-declaration-location@npm:^1.0.4": + version: 1.0.7 + resolution: "ts-declaration-location@npm:1.0.7" + dependencies: + picomatch: "npm:^4.0.2" + peerDependencies: + typescript: ">=4.0.0" + checksum: 10c0/b579b7630907052cc174b051dffdb169424824d887d8fb5abdc61e7ab0eede348c2b71c998727b9e4b314c0436f5003a15bb7eedb1c851afe96e12499f159630 + languageName: node + linkType: hard + +"ts-pattern@npm:^5.7.0": + version: 5.7.0 + resolution: "ts-pattern@npm:5.7.0" + checksum: 10c0/6a49d2b502a916def7b07ed66d5675aaf5159dd09b9dbdb334ebfc464af6307e33ae9fbec8ece9182f7ae6a9b2589087da5924d35a74bd52323c3f3745b15d1e languageName: node linkType: hard @@ -16285,7 +16254,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.0.1, tslib@npm:^2.1.0, tslib@npm:^2.4.0, tslib@npm:^2.6.2": +"tslib@npm:^2.0.1, tslib@npm:^2.1.0, tslib@npm:^2.4.0, tslib@npm:^2.6.2, tslib@npm:^2.8.1": version: 2.8.1 resolution: "tslib@npm:2.8.1" checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62 @@ -16347,28 +16316,21 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^4.26.1": - version: 4.39.1 - resolution: "type-fest@npm:4.39.1" - checksum: 10c0/f5bf302eb2e2f70658be1757aa578f4a09da3f65699b0b12b7ae5502ccea76e5124521a6e6b69540f442c3dc924c394202a2ab58718d0582725c7ac23c072594 +"type-fest@npm:^4.26.1, type-fest@npm:^4.39.1": + version: 4.40.0 + resolution: "type-fest@npm:4.40.0" + checksum: 10c0/b39d4da6f9a154e3db7e714cd05ccf56b53f4f0bbf74dd294cb6be4921b16ecca5cb00cb81b53ab621a31c8e8509c74b5101895ada47af9de368a317d24538a3 languageName: node linkType: hard -"type-fest@npm:^4.37.0": - version: 4.37.0 - resolution: "type-fest@npm:4.37.0" - checksum: 10c0/5bad189f66fbe3431e5d36befa08cab6010e56be68b7467530b7ef94c3cf81ef775a8ac3047c8bbda4dd3159929285870357498d7bc1df062714f9c5c3a84926 - languageName: node - linkType: hard - -"type-is@npm:^2.0.0": - version: 2.0.0 - resolution: "type-is@npm:2.0.0" +"type-is@npm:^2.0.0, type-is@npm:^2.0.1": + version: 2.0.1 + resolution: "type-is@npm:2.0.1" dependencies: content-type: "npm:^1.0.5" media-typer: "npm:^1.1.0" mime-types: "npm:^3.0.0" - checksum: 10c0/c1fa697c8cb77bcb3f4aa3673a3fdbe3f1c2fe51ce8c9736e9773f25c3118562723369b471063c3945722bcda5d8bf969a0693ab7b6e7da012ff667294efe988 + checksum: 10c0/7f7ec0a060b16880bdad36824ab37c26019454b67d73e8a465ed5a3587440fbe158bc765f0da68344498235c877e7dbbb1600beccc94628ed05599d667951b99 languageName: node linkType: hard @@ -16379,21 +16341,21 @@ __metadata: languageName: node linkType: hard -"typescript-eslint@npm:^8.21.0": - version: 8.27.0 - resolution: "typescript-eslint@npm:8.27.0" +"typescript-eslint@npm:^8.29.1": + version: 8.30.1 + resolution: "typescript-eslint@npm:8.30.1" dependencies: - "@typescript-eslint/eslint-plugin": "npm:8.27.0" - "@typescript-eslint/parser": "npm:8.27.0" - "@typescript-eslint/utils": "npm:8.27.0" + "@typescript-eslint/eslint-plugin": "npm:8.30.1" + "@typescript-eslint/parser": "npm:8.30.1" + "@typescript-eslint/utils": "npm:8.30.1" peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: ">=4.8.4 <5.9.0" - checksum: 10c0/f66f8311418b12bca751e8e1c68e42c638745765be40621b65f287a15dd58d4a71e3a0f80756d5c3cc9070a93bb1745887fce2260117e19e1b70f2804cefd351 + checksum: 10c0/41c53910308fa03d2216ccae9885e82422b8abc96b384a6e47277b5b351f462e6da3a4dfbb8c9bc7defa8c96fb71c4371fa5759eaa86c7c1b3b53a4a9994e6ab languageName: node linkType: hard -"typescript@npm:^5.4.3": +"typescript@npm:^5.4.3, typescript@npm:^5.6.2": version: 5.8.3 resolution: "typescript@npm:5.8.3" bin: @@ -16403,17 +16365,7 @@ __metadata: languageName: node linkType: hard -"typescript@npm:^5.6.2": - version: 5.8.2 - resolution: "typescript@npm:5.8.2" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/5c4f6fbf1c6389b6928fe7b8fcd5dc73bb2d58cd4e3883f1d774ed5bd83b151cbac6b7ecf11723de56d4676daeba8713894b1e9af56174f2f9780ae7848ec3c6 - languageName: node - linkType: hard - -"typescript@patch:typescript@npm%3A^5.4.3#optional!builtin": +"typescript@patch:typescript@npm%3A^5.4.3#optional!builtin, typescript@patch:typescript@npm%3A^5.6.2#optional!builtin": version: 5.8.3 resolution: "typescript@patch:typescript@npm%3A5.8.3#optional!builtin::version=5.8.3&hash=5786d5" bin: @@ -16423,16 +16375,6 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@npm%3A^5.6.2#optional!builtin": - version: 5.8.2 - resolution: "typescript@patch:typescript@npm%3A5.8.2#optional!builtin::version=5.8.2&hash=5786d5" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/5448a08e595cc558ab321e49d4cac64fb43d1fa106584f6ff9a8d8e592111b373a995a1d5c7f3046211c8a37201eb6d0f1566f15cdb7a62a5e3be01d087848e2 - languageName: node - linkType: hard - "uc.micro@npm:^2.0.0, uc.micro@npm:^2.1.0": version: 2.1.0 resolution: "uc.micro@npm:2.1.0" @@ -16471,17 +16413,17 @@ __metadata: languageName: node linkType: hard -"undici-types@npm:~6.20.0": - version: 6.20.0 - resolution: "undici-types@npm:6.20.0" - checksum: 10c0/68e659a98898d6a836a9a59e6adf14a5d799707f5ea629433e025ac90d239f75e408e2e5ff086afc3cace26f8b26ee52155293564593fbb4a2f666af57fc59bf +"undici-types@npm:~6.21.0": + version: 6.21.0 + resolution: "undici-types@npm:6.21.0" + checksum: 10c0/c01ed51829b10aa72fc3ce64b747f8e74ae9b60eafa19a7b46ef624403508a54c526ffab06a14a26b3120d055e1104d7abe7c9017e83ced038ea5cf52f8d5e04 languageName: node linkType: hard "undici@npm:>=6, undici@npm:^7.4.0": - version: 7.5.0 - resolution: "undici@npm:7.5.0" - checksum: 10c0/07e1c984ff1d83516c02a716bb81abfa05087201e511c78147822073440365d2b8e875876804fb4e45857c11c412b46599c961f52aa5bdd2df481fa823e8b629 + version: 7.8.0 + resolution: "undici@npm:7.8.0" + checksum: 10c0/7141f63ea405208a88120d211d83d77bf21327b16b451d3149fb266c28884fbcf78ec370ac2d3412a0e68ba6132ab85265ba85a2f4fde24cb47dc77f5c5a158c languageName: node linkType: hard @@ -16717,11 +16659,11 @@ __metadata: linkType: hard "use-sync-external-store@npm:^1.0.0, use-sync-external-store@npm:^1.2.2, use-sync-external-store@npm:^1.4.0": - version: 1.4.0 - resolution: "use-sync-external-store@npm:1.4.0" + version: 1.5.0 + resolution: "use-sync-external-store@npm:1.5.0" peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - checksum: 10c0/ec011a5055962c0f6b509d6e78c0b143f8cd069890ae370528753053c55e3b360d3648e76cfaa854faa7a59eb08d6c5fb1015e60ffde9046d32f5b2a295acea5 + checksum: 10c0/1b8663515c0be34fa653feb724fdcce3984037c78dd4a18f68b2c8be55cc1a1084c578d5b75f158d41b5ddffc2bf5600766d1af3c19c8e329bb20af2ec6f52f4 languageName: node linkType: hard @@ -16748,13 +16690,6 @@ __metadata: languageName: node linkType: hard -"utils-merge@npm:1.0.1": - version: 1.0.1 - resolution: "utils-merge@npm:1.0.1" - checksum: 10c0/02ba649de1b7ca8854bfe20a82f1dfbdda3fb57a22ab4a8972a63a34553cf7aa51bc9081cf7e001b035b88186d23689d69e71b510e610a09a4c66f68aa95b672 - languageName: node - linkType: hard - "uuid@npm:^10.0.0": version: 10.0.0 resolution: "uuid@npm:10.0.0" @@ -16824,7 +16759,7 @@ __metadata: languageName: node linkType: hard -"vary@npm:^1, vary@npm:~1.1.2": +"vary@npm:^1, vary@npm:^1.1.2": version: 1.1.2 resolution: "vary@npm:1.1.2" checksum: 10c0/f15d588d79f3675135ba783c91a4083dcd290a2a5be9fcb6514220a1634e23df116847b1cc51f66bfb0644cf9353b2abb7815ae499bab06e46dd33c1a6bf1f4f @@ -17055,7 +16990,7 @@ __metadata: languageName: node linkType: hard -"whatwg-url@npm:^14.0.0, whatwg-url@npm:^14.1.0": +"whatwg-url@npm:^14.0.0, whatwg-url@npm:^14.1.1": version: 14.2.0 resolution: "whatwg-url@npm:14.2.0" dependencies: @@ -17177,7 +17112,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^8.13.0, ws@npm:^8.18.0": +"ws@npm:^8.13.0, ws@npm:^8.18.0, ws@npm:^8.18.1": version: 8.18.1 resolution: "ws@npm:8.18.1" peerDependencies: @@ -17303,13 +17238,6 @@ __metadata: languageName: node linkType: hard -"xmldom-sre@npm:0.1.31": - version: 0.1.31 - resolution: "xmldom-sre@npm:0.1.31" - checksum: 10c0/d4250a44949b7874661fc05cb708c84a1258871d63aae67271f6a0dec3003d301238f7b477ab7a31b828c9bdc1fc46f7469e81d04fe4a1bb6d3f527dfb602029 - languageName: node - linkType: hard - "xtend@npm:^4.0.0": version: 4.0.2 resolution: "xtend@npm:4.0.2" @@ -17360,11 +17288,11 @@ __metadata: linkType: hard "yaml@npm:^2.2.1, yaml@npm:^2.7.0": - version: 2.7.0 - resolution: "yaml@npm:2.7.0" + version: 2.7.1 + resolution: "yaml@npm:2.7.1" bin: yaml: bin.mjs - checksum: 10c0/886a7d2abbd70704b79f1d2d05fe9fb0aa63aefb86e1cb9991837dced65193d300f5554747a872b4b10ae9a12bc5d5327e4d04205f70336e863e35e89d8f4ea9 + checksum: 10c0/ee2126398ab7d1fdde566b4013b68e36930b9e6d8e68b6db356875c99614c10d678b6f45597a145ff6d63814961221fc305bf9242af8bf7450177f8a68537590 languageName: node linkType: hard @@ -17456,16 +17384,7 @@ __metadata: languageName: node linkType: hard -"zod-to-json-schema@npm:^3.22.3, zod-to-json-schema@npm:^3.24.1": - version: 3.24.4 - resolution: "zod-to-json-schema@npm:3.24.4" - peerDependencies: - zod: ^3.24.1 - checksum: 10c0/eacef9f18159038cac87132005690c8e3da3a3aeb9dfbac2c2450f36f3b0345e895abcb165b5d81294b2dae3fedfb11b8b733daecc649b7c0584fcc9858a312d - languageName: node - linkType: hard - -"zod-to-json-schema@npm:^3.22.5": +"zod-to-json-schema@npm:^3.22.3, zod-to-json-schema@npm:^3.22.5, zod-to-json-schema@npm:^3.24.1": version: 3.24.5 resolution: "zod-to-json-schema@npm:3.24.5" peerDependencies: