import { z } from 'genkit'; import { CandidateData, Part as Part$1, MessageData, ModelReference, ToolDefinition } from 'genkit/model'; import { Part, PartialArg, GenerateContentCandidate, FunctionCallingMode, Content, FunctionDeclaration } from './types.js'; /** * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ declare function toGeminiTool(tool: ToolDefinition): FunctionDeclaration; declare function toGeminiPart(part: Part$1): Part; declare function toGeminiMessage(message: MessageData, model?: ModelReference): Content; declare function toGeminiSystemInstruction(message: MessageData): Content; /** * Converts mode from either genkit tool choice (lowercase) * or functionCallingConfig (uppercase). * @param from The mode to convert from * @returns */ declare function toGeminiFunctionModeEnum(from?: string): FunctionCallingMode | undefined; /** * Applies Gemini partial args to the target object. * * https://docs.cloud.google.com/vertex-ai/generative-ai/docs/reference/rest/v1/Content#PartialArg */ declare function applyGeminiPartialArgs(target: object, partialArgs: PartialArg[]): void; declare function fromGeminiPart(part: Part, previousChunks?: CandidateData[]): Part$1; declare function fromGeminiCandidate(candidate: GenerateContentCandidate, previousChunks?: CandidateData[]): CandidateData; declare const TEST_ONLY: { fromGeminiPart: typeof fromGeminiPart; toGeminiPart: typeof toGeminiPart; }; export { TEST_ONLY, applyGeminiPartialArgs, fromGeminiCandidate, toGeminiFunctionModeEnum, toGeminiMessage, toGeminiSystemInstruction, toGeminiTool };