@adaline/google
Version:
Adaline Google
1,629 lines (1,618 loc) • 124 kB
TypeScript
import * as zod from 'zod';
import { z } from 'zod';
import { ChatModelSchemaType, ChatModelV1, UrlType, HeadersType, ParamsType, EmbeddingModelSchemaType, EmbeddingModelV1, ProviderV1 } from '@adaline/provider';
import { MessageType, ConfigType, ToolType, ChatResponseType, PartialChatResponseType, ChatModelPriceType, EmbeddingRequestsType, EmbeddingResponseType } from '@adaline/types';
declare const GoogleChatModelConfigs: {
readonly base: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number) => {
def: {
readonly temperature: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
readonly maxTokens: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
readonly stop: {
type: "multi-string";
param: string;
title: string;
description: string;
max: number;
};
readonly topP: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
readonly toolChoice: {
type: "select-string";
param: string;
title: string;
description: string;
default: string;
choices: string[];
};
readonly safetySettings: {
type: "object-schema";
param: string;
title: string;
description: string;
objectSchema?: any;
};
};
schema: zod.ZodObject<{
temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
stop: zod.ZodOptional<zod.ZodDefault<zod.ZodArray<zod.ZodString, "many">>>;
topP: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
toolChoice: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
safetySettings: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
[x: string]: any;
}, {
[x: string]: any;
}>>;
}, "strip", zod.ZodTypeAny, {
toolChoice?: string | null | undefined;
safetySettings?: {
[x: string]: any;
} | undefined;
temperature?: number | undefined;
topP?: number | undefined;
maxTokens?: number | undefined;
stop?: string[] | undefined;
}, {
toolChoice?: string | null | undefined;
safetySettings?: {
[x: string]: any;
} | undefined;
temperature?: number | undefined;
topP?: number | undefined;
maxTokens?: number | undefined;
stop?: string[] | undefined;
}>;
};
readonly responseSchema: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number) => {
def: {
responseFormat: {
type: "select-string";
param: string;
title: string;
description: string;
default: string;
choices: string[];
};
responseSchema: {
type: "object-schema";
param: string;
title: string;
description: string;
objectSchema?: any;
};
temperature: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
maxTokens: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
stop: {
type: "multi-string";
param: string;
title: string;
description: string;
max: number;
};
topP: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
toolChoice: {
type: "select-string";
param: string;
title: string;
description: string;
default: string;
choices: string[];
};
safetySettings: {
type: "object-schema";
param: string;
title: string;
description: string;
objectSchema?: any;
};
};
schema: zod.ZodObject<zod.objectUtil.extendShape<{
temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
stop: zod.ZodOptional<zod.ZodDefault<zod.ZodArray<zod.ZodString, "many">>>;
topP: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
toolChoice: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
safetySettings: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
[x: string]: any;
}, {
[x: string]: any;
}>>;
}, {
responseFormat: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
responseSchema: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
[x: string]: any;
}, {
[x: string]: any;
}>>;
}>, "strip", zod.ZodTypeAny, {
toolChoice?: string | null | undefined;
safetySettings?: {
[x: string]: any;
} | undefined;
temperature?: number | undefined;
topP?: number | undefined;
maxTokens?: number | undefined;
stop?: string[] | undefined;
responseFormat?: string | null | undefined;
responseSchema?: {
[x: string]: any;
} | undefined;
}, {
toolChoice?: string | null | undefined;
safetySettings?: {
[x: string]: any;
} | undefined;
temperature?: number | undefined;
topP?: number | undefined;
maxTokens?: number | undefined;
stop?: string[] | undefined;
responseFormat?: string | null | undefined;
responseSchema?: {
[x: string]: any;
} | undefined;
}>;
};
readonly reasoning: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number) => {
def: {
reasoningEnabled: {
type: "select-boolean";
param: string;
title: string;
description: string;
default: boolean | null;
};
responseFormat: {
type: "select-string";
param: string;
title: string;
description: string;
default: string;
choices: string[];
};
responseSchema: {
type: "object-schema";
param: string;
title: string;
description: string;
objectSchema?: any;
};
temperature: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
maxTokens: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
stop: {
type: "multi-string";
param: string;
title: string;
description: string;
max: number;
};
topP: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
toolChoice: {
type: "select-string";
param: string;
title: string;
description: string;
default: string;
choices: string[];
};
safetySettings: {
type: "object-schema";
param: string;
title: string;
description: string;
objectSchema?: any;
};
};
schema: zod.ZodObject<zod.objectUtil.extendShape<zod.objectUtil.extendShape<{
temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
stop: zod.ZodOptional<zod.ZodDefault<zod.ZodArray<zod.ZodString, "many">>>;
topP: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
toolChoice: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
safetySettings: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
[x: string]: any;
}, {
[x: string]: any;
}>>;
}, {
responseFormat: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
responseSchema: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
[x: string]: any;
}, {
[x: string]: any;
}>>;
}>, {
reasoningEnabled: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodBoolean>>>;
}>, "strip", zod.ZodTypeAny, {
toolChoice?: string | null | undefined;
safetySettings?: {
[x: string]: any;
} | undefined;
reasoningEnabled?: boolean | null | undefined;
temperature?: number | undefined;
topP?: number | undefined;
maxTokens?: number | undefined;
stop?: string[] | undefined;
responseFormat?: string | null | undefined;
responseSchema?: {
[x: string]: any;
} | undefined;
}, {
toolChoice?: string | null | undefined;
safetySettings?: {
[x: string]: any;
} | undefined;
reasoningEnabled?: boolean | null | undefined;
temperature?: number | undefined;
topP?: number | undefined;
maxTokens?: number | undefined;
stop?: string[] | undefined;
responseFormat?: string | null | undefined;
responseSchema?: {
[x: string]: any;
} | undefined;
}>;
};
};
declare const GoogleEmbeddingModelConfigs: {
readonly base: (maxDimensions: number) => {
def: {
readonly dimensions: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
};
schema: zod.ZodObject<{
dimensions: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
}, "strip", zod.ZodTypeAny, {
dimensions?: number | undefined;
}, {
dimensions?: number | undefined;
}>;
};
};
declare const ChatModelBaseConfigSchema: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number) => z.ZodObject<{
temperature: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
maxTokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
stop: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
topP: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
toolChoice: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEnum<[string, ...string[]]>>>>;
safetySettings: z.ZodOptional<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, {
[x: string]: any;
}, {
[x: string]: any;
}>>;
}, "strip", z.ZodTypeAny, {
toolChoice?: string | null | undefined;
safetySettings?: {
[x: string]: any;
} | undefined;
temperature?: number | undefined;
topP?: number | undefined;
maxTokens?: number | undefined;
stop?: string[] | undefined;
}, {
toolChoice?: string | null | undefined;
safetySettings?: {
[x: string]: any;
} | undefined;
temperature?: number | undefined;
topP?: number | undefined;
maxTokens?: number | undefined;
stop?: string[] | undefined;
}>;
declare const ChatModelBaseConfigDef: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number) => {
readonly temperature: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
readonly maxTokens: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
readonly stop: {
type: "multi-string";
param: string;
title: string;
description: string;
max: number;
};
readonly topP: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
readonly toolChoice: {
type: "select-string";
param: string;
title: string;
description: string;
default: string;
choices: string[];
};
readonly safetySettings: {
type: "object-schema";
param: string;
title: string;
description: string;
objectSchema?: any;
};
};
declare const temperature: (max: number, _default: number) => {
def: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
schema: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
};
declare const maxTokens: (maxOutputTokens: number) => {
def: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
schema: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
};
declare const stop: (maxSequences: number) => {
def: {
type: "multi-string";
param: string;
title: string;
description: string;
max: number;
};
schema: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
};
declare const topP: (_default: number) => {
def: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
schema: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
};
declare const topK: (_default: number) => {
def: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
schema: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
};
declare const frequencyPenalty: {
def: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
schema: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
};
declare const presencePenalty: {
def: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
schema: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
};
declare const seed: {
def: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
schema: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
};
declare const toolChoice: {
def: {
type: "select-string";
param: string;
title: string;
description: string;
default: string;
choices: string[];
};
schema: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEnum<[string, ...string[]]>>>>;
};
declare const safetySettings: {
def: {
type: "object-schema";
param: string;
title: string;
description: string;
objectSchema?: any;
};
schema: z.ZodOptional<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, {
[x: string]: any;
}, {
[x: string]: any;
}>>;
};
declare const reasoningEnabled: {
def: {
type: "select-boolean";
param: string;
title: string;
description: string;
default: boolean | null;
};
schema: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodBoolean>>>;
};
declare const ChatModelReasoningConfigSchema: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number) => zod.ZodObject<zod.objectUtil.extendShape<zod.objectUtil.extendShape<{
temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
stop: zod.ZodOptional<zod.ZodDefault<zod.ZodArray<zod.ZodString, "many">>>;
topP: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
toolChoice: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
safetySettings: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
[x: string]: any;
}, {
[x: string]: any;
}>>;
}, {
responseFormat: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
responseSchema: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
[x: string]: any;
}, {
[x: string]: any;
}>>;
}>, {
reasoningEnabled: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodBoolean>>>;
}>, "strip", zod.ZodTypeAny, {
toolChoice?: string | null | undefined;
safetySettings?: {
[x: string]: any;
} | undefined;
reasoningEnabled?: boolean | null | undefined;
temperature?: number | undefined;
topP?: number | undefined;
maxTokens?: number | undefined;
stop?: string[] | undefined;
responseFormat?: string | null | undefined;
responseSchema?: {
[x: string]: any;
} | undefined;
}, {
toolChoice?: string | null | undefined;
safetySettings?: {
[x: string]: any;
} | undefined;
reasoningEnabled?: boolean | null | undefined;
temperature?: number | undefined;
topP?: number | undefined;
maxTokens?: number | undefined;
stop?: string[] | undefined;
responseFormat?: string | null | undefined;
responseSchema?: {
[x: string]: any;
} | undefined;
}>;
declare const ChatModelReasoningConfigDef: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number) => {
reasoningEnabled: {
type: "select-boolean";
param: string;
title: string;
description: string;
default: boolean | null;
};
responseFormat: {
type: "select-string";
param: string;
title: string;
description: string;
default: string;
choices: string[];
};
responseSchema: {
type: "object-schema";
param: string;
title: string;
description: string;
objectSchema?: any;
};
temperature: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
maxTokens: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
stop: {
type: "multi-string";
param: string;
title: string;
description: string;
max: number;
};
topP: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
toolChoice: {
type: "select-string";
param: string;
title: string;
description: string;
default: string;
choices: string[];
};
safetySettings: {
type: "object-schema";
param: string;
title: string;
description: string;
objectSchema?: any;
};
};
declare const GoogleChatModelResponseSchemaConfigDef: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number) => {
responseFormat: {
type: "select-string";
param: string;
title: string;
description: string;
default: string;
choices: string[];
};
responseSchema: {
type: "object-schema";
param: string;
title: string;
description: string;
objectSchema?: any;
};
temperature: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
maxTokens: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
stop: {
type: "multi-string";
param: string;
title: string;
description: string;
max: number;
};
topP: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
toolChoice: {
type: "select-string";
param: string;
title: string;
description: string;
default: string;
choices: string[];
};
safetySettings: {
type: "object-schema";
param: string;
title: string;
description: string;
objectSchema?: any;
};
};
declare const GoogleChatModelResponseSchemaConfigSchema: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number) => zod.ZodObject<zod.objectUtil.extendShape<{
temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
stop: zod.ZodOptional<zod.ZodDefault<zod.ZodArray<zod.ZodString, "many">>>;
topP: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
toolChoice: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
safetySettings: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
[x: string]: any;
}, {
[x: string]: any;
}>>;
}, {
responseFormat: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
responseSchema: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
[x: string]: any;
}, {
[x: string]: any;
}>>;
}>, "strip", zod.ZodTypeAny, {
toolChoice?: string | null | undefined;
safetySettings?: {
[x: string]: any;
} | undefined;
temperature?: number | undefined;
topP?: number | undefined;
maxTokens?: number | undefined;
stop?: string[] | undefined;
responseFormat?: string | null | undefined;
responseSchema?: {
[x: string]: any;
} | undefined;
}, {
toolChoice?: string | null | undefined;
safetySettings?: {
[x: string]: any;
} | undefined;
temperature?: number | undefined;
topP?: number | undefined;
maxTokens?: number | undefined;
stop?: string[] | undefined;
responseFormat?: string | null | undefined;
responseSchema?: {
[x: string]: any;
} | undefined;
}>;
declare const EmbeddingModelBaseConfigSchema: (maxDimensions: number) => z.ZodObject<{
dimensions: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
}, "strip", z.ZodTypeAny, {
dimensions?: number | undefined;
}, {
dimensions?: number | undefined;
}>;
declare const EmbeddingModelBaseConfigDef: (maxDimensions: number) => {
readonly dimensions: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
};
declare const dimensions: (maxDimensions: number) => {
def: {
type: "range";
param: string;
title: string;
description: string;
max: number;
default: number;
min: number;
step: number;
};
schema: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
};
declare const GoogleChatModelRoles: z.ZodEnum<["system", "user", "assistant", "tool"]>;
declare const GoogleChatAssistantRoleLiteral = "model";
declare const GoogleChatToolRoleLiteral = "function";
declare const GoogleChatModelRolesMap: {
readonly system: "user";
readonly user: "user";
readonly assistant: "model";
readonly tool: "function";
};
declare const GoogleChatModelModalities: ChatModelSchemaType["modalities"];
declare const GoogleChatModelModalitiesEnum: z.ZodEnum<["text", "image", "pdf", "tool-call", "tool-response"]>;
declare const GoogleChatModelTextModalities: ChatModelSchemaType["modalities"];
declare const GoogleChatModelTextModalitiesEnum: z.ZodEnum<["text"]>;
declare const GoogleChatModelTextVisionModalities: ChatModelSchemaType["modalities"];
declare const GoogleChatModelTextVisionModalitiesEnum: z.ZodEnum<["text", "image"]>;
declare const GoogleChatModelTextToolModalities: ChatModelSchemaType["modalities"];
declare const GoogleChatModelTextToolModalitiesEnum: z.ZodEnum<["text", "tool-call", "tool-response"]>;
declare const GoogleCompleteChatTextResponse: z.ZodObject<{
text: z.ZodString;
}, "strip", z.ZodTypeAny, {
text: string;
}, {
text: string;
}>;
declare const GoogleCompleteChatToolResponse: z.ZodObject<{
functionCall: z.ZodObject<{
name: z.ZodString;
args: z.ZodRecord<z.ZodString, z.ZodAny>;
}, "strip", z.ZodTypeAny, {
name: string;
args: Record<string, any>;
}, {
name: string;
args: Record<string, any>;
}>;
}, "strip", z.ZodTypeAny, {
functionCall: {
name: string;
args: Record<string, any>;
};
}, {
functionCall: {
name: string;
args: Record<string, any>;
};
}>;
declare const GoogleCompleteChatResponse: z.ZodObject<{
candidates: z.ZodArray<z.ZodObject<{
content: z.ZodOptional<z.ZodObject<{
role: z.ZodString;
parts: z.ZodArray<z.ZodUnion<[z.ZodObject<{
text: z.ZodString;
}, "strip", z.ZodTypeAny, {
text: string;
}, {
text: string;
}>, z.ZodObject<{
functionCall: z.ZodObject<{
name: z.ZodString;
args: z.ZodRecord<z.ZodString, z.ZodAny>;
}, "strip", z.ZodTypeAny, {
name: string;
args: Record<string, any>;
}, {
name: string;
args: Record<string, any>;
}>;
}, "strip", z.ZodTypeAny, {
functionCall: {
name: string;
args: Record<string, any>;
};
}, {
functionCall: {
name: string;
args: Record<string, any>;
};
}>]>, "many">;
}, "strip", z.ZodTypeAny, {
role: string;
parts: ({
text: string;
} | {
functionCall: {
name: string;
args: Record<string, any>;
};
})[];
}, {
role: string;
parts: ({
text: string;
} | {
functionCall: {
name: string;
args: Record<string, any>;
};
})[];
}>>;
finishReason: z.ZodString;
index: z.ZodOptional<z.ZodNumber>;
safetyRatings: z.ZodOptional<z.ZodArray<z.ZodObject<{
category: z.ZodString;
probability: z.ZodString;
blocked: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
category: string;
probability: string;
blocked?: boolean | undefined;
}, {
category: string;
probability: string;
blocked?: boolean | undefined;
}>, "many">>;
}, "strip", z.ZodTypeAny, {
finishReason: string;
content?: {
role: string;
parts: ({
text: string;
} | {
functionCall: {
name: string;
args: Record<string, any>;
};
})[];
} | undefined;
index?: number | undefined;
safetyRatings?: {
category: string;
probability: string;
blocked?: boolean | undefined;
}[] | undefined;
}, {
finishReason: string;
content?: {
role: string;
parts: ({
text: string;
} | {
functionCall: {
name: string;
args: Record<string, any>;
};
})[];
} | undefined;
index?: number | undefined;
safetyRatings?: {
category: string;
probability: string;
blocked?: boolean | undefined;
}[] | undefined;
}>, "many">;
promptFeedback: z.ZodOptional<z.ZodObject<{
safetyRatings: z.ZodOptional<z.ZodArray<z.ZodObject<{
category: z.ZodString;
probability: z.ZodString;
}, "strip", z.ZodTypeAny, {
category: string;
probability: string;
}, {
category: string;
probability: string;
}>, "many">>;
}, "strip", z.ZodTypeAny, {
safetyRatings?: {
category: string;
probability: string;
}[] | undefined;
}, {
safetyRatings?: {
category: string;
probability: string;
}[] | undefined;
}>>;
usageMetadata: z.ZodOptional<z.ZodObject<{
promptTokenCount: z.ZodNumber;
cachedContentTokenCount: z.ZodOptional<z.ZodNumber>;
candidatesTokenCount: z.ZodOptional<z.ZodNumber>;
totalTokenCount: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
promptTokenCount: number;
totalTokenCount: number;
cachedContentTokenCount?: number | undefined;
candidatesTokenCount?: number | undefined;
}, {
promptTokenCount: number;
totalTokenCount: number;
cachedContentTokenCount?: number | undefined;
candidatesTokenCount?: number | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
candidates: {
finishReason: string;
content?: {
role: string;
parts: ({
text: string;
} | {
functionCall: {
name: string;
args: Record<string, any>;
};
})[];
} | undefined;
index?: number | undefined;
safetyRatings?: {
category: string;
probability: string;
blocked?: boolean | undefined;
}[] | undefined;
}[];
promptFeedback?: {
safetyRatings?: {
category: string;
probability: string;
}[] | undefined;
} | undefined;
usageMetadata?: {
promptTokenCount: number;
totalTokenCount: number;
cachedContentTokenCount?: number | undefined;
candidatesTokenCount?: number | undefined;
} | undefined;
}, {
candidates: {
finishReason: string;
content?: {
role: string;
parts: ({
text: string;
} | {
functionCall: {
name: string;
args: Record<string, any>;
};
})[];
} | undefined;
index?: number | undefined;
safetyRatings?: {
category: string;
probability: string;
blocked?: boolean | undefined;
}[] | undefined;
}[];
promptFeedback?: {
safetyRatings?: {
category: string;
probability: string;
}[] | undefined;
} | undefined;
usageMetadata?: {
promptTokenCount: number;
totalTokenCount: number;
cachedContentTokenCount?: number | undefined;
candidatesTokenCount?: number | undefined;
} | undefined;
}>;
type GoogleCompleteChatResponseType = z.infer<typeof GoogleCompleteChatResponse>;
declare const GoogleStreamChatTextResponse: z.ZodObject<{
text: z.ZodString;
}, "strip", z.ZodTypeAny, {
text: string;
}, {
text: string;
}>;
declare const GoogleStreamChatToolResponse: z.ZodObject<{
functionCall: z.ZodObject<{
name: z.ZodString;
args: z.ZodRecord<z.ZodString, z.ZodAny>;
}, "strip", z.ZodTypeAny, {
name: string;
args: Record<string, any>;
}, {
name: string;
args: Record<string, any>;
}>;
}, "strip", z.ZodTypeAny, {
functionCall: {
name: string;
args: Record<string, any>;
};
}, {
functionCall: {
name: string;
args: Record<string, any>;
};
}>;
declare const GoogleStreamChatResponse: z.ZodObject<{
candidates: z.ZodArray<z.ZodObject<{
content: z.ZodOptional<z.ZodObject<{
role: z.ZodString;
parts: z.ZodArray<z.ZodUnion<[z.ZodObject<{
text: z.ZodString;
}, "strip", z.ZodTypeAny, {
text: string;
}, {
text: string;
}>, z.ZodObject<{
functionCall: z.ZodObject<{
name: z.ZodString;
args: z.ZodRecord<z.ZodString, z.ZodAny>;
}, "strip", z.ZodTypeAny, {
name: string;
args: Record<string, any>;
}, {
name: string;
args: Record<string, any>;
}>;
}, "strip", z.ZodTypeAny, {
functionCall: {
name: string;
args: Record<string, any>;
};
}, {
functionCall: {
name: string;
args: Record<string, any>;
};
}>]>, "many">;
}, "strip", z.ZodTypeAny, {
role: string;
parts: ({
text: string;
} | {
functionCall: {
name: string;
args: Record<string, any>;
};
})[];
}, {
role: string;
parts: ({
text: string;
} | {
functionCall: {
name: string;
args: Record<string, any>;
};
})[];
}>>;
finishReason: z.ZodOptional<z.ZodString>;
index: z.ZodOptional<z.ZodNumber>;
safetyRatings: z.ZodOptional<z.ZodArray<z.ZodObject<{
category: z.ZodString;
probability: z.ZodString;
blocked: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
category: string;
probability: string;
blocked?: boolean | undefined;
}, {
category: string;
probability: string;
blocked?: boolean | undefined;
}>, "many">>;
}, "strip", z.ZodTypeAny, {
content?: {
role: string;
parts: ({
text: string;
} | {
functionCall: {
name: string;
args: Record<string, any>;
};
})[];
} | undefined;
index?: number | undefined;
finishReason?: string | undefined;
safetyRatings?: {
category: string;
probability: string;
blocked?: boolean | undefined;
}[] | undefined;
}, {
content?: {
role: string;
parts: ({
text: string;
} | {
functionCall: {
name: string;
args: Record<string, any>;
};
})[];
} | undefined;
index?: number | undefined;
finishReason?: string | undefined;
safetyRatings?: {
category: string;
probability: string;
blocked?: boolean | undefined;
}[] | undefined;
}>, "many">;
promptFeedback: z.ZodOptional<z.ZodObject<{
safetyRatings: z.ZodOptional<z.ZodArray<z.ZodObject<{
category: z.ZodString;
probability: z.ZodString;
}, "strip", z.ZodTypeAny, {
category: string;
probability: string;
}, {
category: string;
probability: string;
}>, "many">>;
}, "strip", z.ZodTypeAny, {
safetyRatings?: {
category: string;
probability: string;
}[] | undefined;
}, {
safetyRatings?: {
category: string;
probability: string;
}[] | undefined;
}>>;
usageMetadata: z.ZodOptional<z.ZodObject<{
promptTokenCount: z.ZodOptional<z.ZodNumber>;
cachedContentTokenCount: z.ZodOptional<z.ZodNumber>;
candidatesTokenCount: z.ZodOptional<z.ZodNumber>;
totalTokenCount: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
promptTokenCount?: number | undefined;
cachedContentTokenCount?: number | undefined;
candidatesTokenCount?: number | undefined;
totalTokenCount?: number | undefined;
}, {
promptTokenCount?: number | undefined;
cachedContentTokenCount?: number | undefined;
candidatesTokenCount?: number | undefined;
totalTokenCount?: number | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
candidates: {
content?: {
role: string;
parts: ({
text: string;
} | {
functionCall: {
name: string;
args: Record<string, any>;
};
})[];
} | undefined;
index?: number | undefined;
finishReason?: string | undefined;
safetyRatings?: {
category: string;
probability: string;
blocked?: boolean | undefined;
}[] | undefined;
}[];
promptFeedback?: {
safetyRatings?: {
category: string;
probability: string;
}[] | undefined;
} | undefined;
usageMetadata?: {
promptTokenCount?: number | undefined;
cachedContentTokenCount?: number | undefined;
candidatesTokenCount?: number | undefined;
totalTokenCount?: number | undefined;
} | undefined;
}, {
candidates: {
content?: {
role: string;
parts: ({
text: string;
} | {
functionCall: {
name: string;
args: Record<string, any>;
};
})[];
} | undefined;
index?: number | undefined;
finishReason?: string | undefined;
safetyRatings?: {
category: string;
probability: string;
blocked?: boolean | undefined;
}[] | undefined;
}[];
promptFeedback?: {
safetyRatings?: {
category: string;
probability: string;
}[] | undefined;
} | undefined;
usageMetadata?: {
promptTokenCount?: number | undefined;
cachedContentTokenCount?: number | undefined;
candidatesTokenCount?: number | undefined;
totalTokenCount?: number | undefined;
} | undefined;
}>;
type GoogleStreamChatResponseType = z.infer<typeof GoogleStreamChatResponse>;
declare const GoogleChatContentPartText: z.ZodObject<{
text: z.ZodString;
}, "strip", z.ZodTypeAny, {
text: string;
}, {
text: string;
}>;
type GoogleChatContentPartTextType = z.infer<typeof GoogleChatContentPartText>;
declare const GoogleChatContentPartInlineData: z.ZodObject<{
inline_data: z.ZodObject<{
mime_type: z.ZodString;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
mime_type: string;
data: string;
}, {
mime_type: string;
data: string;
}>;
}, "strip", z.ZodTypeAny, {
inline_data: {
mime_type: string;
data: string;
};
}, {
inline_data: {
mime_type: string;
data: string;
};
}>;
type GoogleChatContentPartInlineDataType = z.infer<typeof GoogleChatContentPartInlineData>;
declare const GoogleChatContentPartFileData: z.ZodObject<{
file_data: z.ZodObject<{
mime_type: z.ZodString;
file_uri: z.ZodString;
}, "strip", z.ZodTypeAny, {
mime_type: string;
file_uri: string;
}, {
mime_type: string;
file_uri: string;
}>;
}, "strip", z.ZodTypeAny, {
file_data: {
mime_type: string;
file_uri: string;
};
}, {
file_data: {
mime_type: string;
file_uri: string;
};
}>;
type GoogleChatContentPartFileDataType = z.infer<typeof GoogleChatContentPartFileData>;
declare const GoogleChatContentPartFunctionCall: z.ZodObject<{
function_call: z.ZodObject<{
name: z.ZodString;
args: z.ZodRecord<z.ZodString, z.ZodString>;
}, "strip", z.ZodTypeAny, {
name: string;
args: Record<string, string>;
}, {
name: string;
args: Record<string, string>;
}>;
}, "strip", z.ZodTypeAny, {
function_call: {
name: string;
args: Record<string, string>;
};
}, {
function_call: {
name: string;
args: Record<string, string>;
};
}>;
type GoogleChatContentPartFunctionCallType = z.infer<typeof GoogleChatContentPartFunctionCall>;
declare const GoogleChatContentPartFunctionResponse: z.ZodObject<{
function_response: z.ZodObject<{
name: z.ZodString;
response: z.ZodRecord<z.ZodString, z.ZodString>;
}, "strip", z.ZodTypeAny, {
name: string;
response: Record<string, string>;
}, {
name: string;
response: Record<string, string>;
}>;
}, "strip", z.ZodTypeAny, {
function_response: {
name: string;
response: Record<string, string>;
};
}, {
function_response: {
name: string;
response: Record<string, string>;
};
}>;
type GoogleChatContentPartFunctionResponseType = z.infer<typeof GoogleChatContentPartFunctionResponse>;
declare const GoogleChatContent: z.ZodObject<{
role: z.ZodEnum<["user", "model", "function"]>;
parts: z.ZodArray<z.ZodUnion<[z.ZodObject<{
text: z.ZodString;
}, "strip", z.ZodTypeAny, {
text: string;
}, {
text: string;
}>, z.ZodObject<{
inline_data: z.ZodObject<{
mime_type: z.ZodString;
data: z.ZodString;
}, "strip", z.ZodTypeAny, {
mime_type: string;
data: string;
}, {
mime_type: string;
data: string;
}>;
}, "strip", z.ZodTypeAny, {
inline_data: {
mime_type: string;
data: string;
};
}, {
inline_data: {
mime_type: string;
data: string;
};
}>, z.ZodObject<{
file_data: z.ZodObject<{
mime_type: z.ZodString;
file_uri: z.ZodString;
}, "strip", z.ZodTypeAny, {
mime_type: string;
file_uri: string;
}, {
mime_type: string;
file_uri: string;
}>;
}, "strip", z.ZodTypeAny, {
file_data: {
mime_type: string;
file_uri: string;
};
}, {
file_data: {
mime_type: string;
file_uri: string;
};
}>, z.ZodObject<{
function_call: z.ZodObject<{
name: z.ZodString;
args: z.ZodRecord<z.ZodString, z.ZodString>;
}, "strip", z.ZodTypeAny, {
name: string;
args: Record<string, string>;
}, {
name: string;
args: Record<string, string>;
}>;
}, "strip", z.ZodTypeAny, {
function_call: {
name: string;
args: Record<string, string>;
};
}, {
function_call: {
name: string;
args: Record<string, string>;
};
}>, z.ZodObject<{
function_response: z.ZodObject<{
name: z.ZodString;
response: z.ZodRecord<z.ZodString, z.ZodString>;
}, "strip", z.ZodTypeAny, {
name: string;
response: Record<string, string>;
}, {
name: string;
response: Record<string, string>;
}>;
}, "strip", z.ZodTypeAny, {
function_response: {
name: string;
response: Record<string, string>;
};
}, {
function_response: {
name: string;
response: Record<string, string>;
};
}>]>, "many">;
}, "strip", z.ZodTypeAny, {
role: "function" | "user" | "model";
parts: ({
text: string;
} | {
inline_data: {
mime_type: string;
data: string;
};
} | {
file_data: {
mime_type: string;
file_uri: string;
};
} | {
function_call: {
name: string;
args: Record<string, string>;
};
} | {
function_response: {
name: string;
response: Record<string, string>;
};
})[];
}, {
role: "function" | "user" | "model";
parts: ({
text: string;
} | {
inline_data: {
mime_type: string;
data: string;
};
} | {
file_data: {
mime_type: string;
file_uri: string;
};
} | {
function_call: {
name: string;
args: Record<string, string>;
};
} | {
function_response: {
name: string;
response: Record<string, string>;
};
})[];
}>;
type GoogleChatContentType = z.infer<typeof GoogleChatContent>;
declare const GoogleChatSystemInstruction: z.ZodObject<{
parts: z.ZodArray<z.ZodObject<{
text: z.ZodString;
}, "strip", z.ZodTypeAny, {
text: string;
}, {
text: string;
}>, "many">;
}, "strip", z.ZodTypeAny, {
parts: {
text: string;
}[];
}, {
parts: {
text: string;
}[];
}>;
type GoogleChatSystemInstructionType = z.infer<typeof GoogleChatSystemInstruction>;
declare const GoogleChatTool: z.ZodObject<{
name: z.ZodString;
description: z.ZodString;
parameters: z.ZodAny;
},