import _m0 from 'protobufjs/minimal'; export declare const protobufPackage = "yandex.cloud.ai.foundation_models.v1"; /** Defines the options for completion generation. */ export interface CompletionOptions { /** Enables streaming of partially generated text. */ stream: boolean; /** * Affects creativity and randomness of responses. Should be a double number between 0 (inclusive) and 1 (inclusive). * Lower values produce more straightforward responses while higher values lead to increased creativity and randomness. * Default temperature: 0.3 */ temperature?: number; /** * The limit on the number of tokens used for single completion generation. * Must be greater than zero. This maximum allowed parameter value may depend on the model being used. */ maxTokens?: number; /** Configures reasoning capabilities for the model, allowing it to perform internal reasoning before responding. */ reasoningOptions?: ReasoningOptions; } /** Represents reasoning options that enable the model's ability to perform internal reasoning before generating a response. */ export interface ReasoningOptions { /** Specifies the reasoning mode to be used. */ mode: ReasoningOptions_ReasoningMode; } /** Enum representing the reasoning mode. */ export declare enum ReasoningOptions_ReasoningMode { /** REASONING_MODE_UNSPECIFIED - Unspecified reasoning mode. */ REASONING_MODE_UNSPECIFIED = 0, /** DISABLED - Disables reasoning. The model will generate a response without performing any internal reasoning. */ DISABLED = 1, /** ENABLED_HIDDEN - Enables reasoning in a hidden manner without exposing the reasoning steps to the user. */ ENABLED_HIDDEN = 2, UNRECOGNIZED = -1 } export declare function reasoningOptions_ReasoningModeFromJSON(object: any): ReasoningOptions_ReasoningMode; export declare function reasoningOptions_ReasoningModeToJSON(object: ReasoningOptions_ReasoningMode): string; /** A message object representing a wrapper over the inputs and outputs of the completion model. */ export interface Message { /** * The ID of the message sender. Supported roles: * * `system`: Special role used to define the behaviour of the completion model. * * `assistant`: A role used by the model to generate responses. * * `user`: A role used by the user to describe requests to the model. */ role: string; /** Textual content of the message. */ text: string | undefined; /** List of tool calls made by the model as part of the response generation. */ toolCallList?: ToolCallList | undefined; /** List of tool results returned from external tools that were invoked by the model. */ toolResultList?: ToolResultList | undefined; } /** An object representing the number of content [tokens](/docs/foundation-models/concepts/yandexgpt/tokens) used by the completion model. */ export interface ContentUsage { /** The number of tokens in the textual part of the model input. */ inputTextTokens: number; /** The number of tokens in the generated completion. */ completionTokens: number; /** The total number of tokens, including all input tokens and all generated tokens. */ totalTokens: number; /** Provides additional information about how the completion tokens were utilized. */ completionTokensDetails?: ContentUsage_CompletionTokensDetails; } /** Provides additional information about how the completion tokens were utilized. */ export interface ContentUsage_CompletionTokensDetails { /** The number of tokens used specifically for internal reasoning performed by the model. */ reasoningTokens: number; } /** Represents a generated completion alternative, including its content and generation status. */ export interface Alternative { /** A message with the content of the alternative. */ message?: Message; /** The generation status of the alternative. */ status: Alternative_AlternativeStatus; } /** Enum representing the generation status of the alternative. */ export declare enum Alternative_AlternativeStatus { /** ALTERNATIVE_STATUS_UNSPECIFIED - Unspecified generation status. */ ALTERNATIVE_STATUS_UNSPECIFIED = 0, /** ALTERNATIVE_STATUS_PARTIAL - Partially generated alternative. */ ALTERNATIVE_STATUS_PARTIAL = 1, /** ALTERNATIVE_STATUS_TRUNCATED_FINAL - Incomplete final alternative resulting from reaching the maximum allowed number of tokens. */ ALTERNATIVE_STATUS_TRUNCATED_FINAL = 2, /** ALTERNATIVE_STATUS_FINAL - Final alternative generated without running into any limits. */ ALTERNATIVE_STATUS_FINAL = 3, /** * ALTERNATIVE_STATUS_CONTENT_FILTER - Generation was stopped due to the discovery of potentially sensitive content in the prompt or generated response. * To fix, modify the prompt and restart generation. */ ALTERNATIVE_STATUS_CONTENT_FILTER = 4, /** ALTERNATIVE_STATUS_TOOL_CALLS - Tools were invoked during the completion generation. */ ALTERNATIVE_STATUS_TOOL_CALLS = 5, UNRECOGNIZED = -1 } export declare function alternative_AlternativeStatusFromJSON(object: any): Alternative_AlternativeStatus; export declare function alternative_AlternativeStatusToJSON(object: Alternative_AlternativeStatus): string; /** Represents a token, the basic unit of content, used by the foundation model. */ export interface Token { /** An internal token identifier. */ id: number; /** The textual representation of the token. */ text: string; /** Indicates whether the token is special or not. Special tokens may define the model's behavior and are not visible to users. */ special: boolean; } /** Represents a tool that can be invoked during completion generation. */ export interface Tool { /** Represents a function that can be called. */ function?: FunctionTool | undefined; } /** Represents a function tool that can be invoked during completion generation. */ export interface FunctionTool { /** The name of the function. */ name: string; /** A description of the function's purpose or behavior. */ description: string; /** * A JSON Schema that defines the expected parameters for the function. * The schema should describe the required fields, their types, and any constraints or default values. */ parameters?: { [key: string]: any; }; } /** Represents a call to a tool. */ export interface ToolCall { /** Represents a call to a function. */ functionCall?: FunctionCall | undefined; } /** Represents the invocation of a function with specific arguments. */ export interface FunctionCall { /** The name of the function being called. */ name: string; /** * The structured arguments passed to the function. * These arguments must adhere to the JSON Schema defined in the corresponding function's parameters. */ arguments?: { [key: string]: any; }; } /** Represents a list of tool calls. */ export interface ToolCallList { /** A list of tool calls to be executed. */ toolCalls: ToolCall[]; } /** Represents the result of a tool call. */ export interface ToolResult { /** Represents the result of a function call. */ functionResult?: FunctionResult | undefined; } /** Represents the result of a function call. */ export interface FunctionResult { /** The name of the function that was executed. */ name: string; /** * The result of the function call, represented as a string. * This field can be used to store the output of the function. */ content: string | undefined; } /** Represents a list of tool results. */ export interface ToolResultList { /** A list of tool results. */ toolResults: ToolResult[]; } /** Represents the expected structure of the model's response using a JSON Schema. */ export interface JsonSchema { /** The JSON Schema that the model's output must conform to. */ schema?: { [key: string]: any; }; } export declare const CompletionOptions: { encode(message: CompletionOptions, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CompletionOptions; fromJSON(object: any): CompletionOptions; toJSON(message: CompletionOptions): unknown; fromPartial, never>) | undefined; } & Record, never>>(object: I): CompletionOptions; }; export declare const ReasoningOptions: { encode(message: ReasoningOptions, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ReasoningOptions; fromJSON(object: any): ReasoningOptions; toJSON(message: ReasoningOptions): unknown; fromPartial, never>>(object: I): ReasoningOptions; }; export declare const Message: { encode(message: Message, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): Message; fromJSON(object: any): Message; toJSON(message: Message): unknown; fromPartial, never>) | undefined; } & Record, never>) | undefined; } & Record, never>)[] & Record, never>) | undefined; } & Record, never>) | undefined; toolResultList?: ({ toolResults?: { functionResult?: { name?: string | undefined; content?: string | undefined; } | undefined; }[] | undefined; } & { toolResults?: ({ functionResult?: { name?: string | undefined; content?: string | undefined; } | undefined; }[] & ({ functionResult?: { name?: string | undefined; content?: string | undefined; } | undefined; } & { functionResult?: ({ name?: string | undefined; content?: string | undefined; } & { name?: string | undefined; content?: string | undefined; } & Record, never>) | undefined; } & Record, never>)[] & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>>(object: I): Message; }; export declare const ContentUsage: { encode(message: ContentUsage, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ContentUsage; fromJSON(object: any): ContentUsage; toJSON(message: ContentUsage): unknown; fromPartial, never>) | undefined; } & Record, never>>(object: I): ContentUsage; }; export declare const ContentUsage_CompletionTokensDetails: { encode(message: ContentUsage_CompletionTokensDetails, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ContentUsage_CompletionTokensDetails; fromJSON(object: any): ContentUsage_CompletionTokensDetails; toJSON(message: ContentUsage_CompletionTokensDetails): unknown; fromPartial, never>>(object: I): ContentUsage_CompletionTokensDetails; }; export declare const Alternative: { encode(message: Alternative, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): Alternative; fromJSON(object: any): Alternative; toJSON(message: Alternative): unknown; fromPartial, never>) | undefined; } & Record, never>) | undefined; } & Record, never>)[] & Record, never>) | undefined; } & Record, never>) | undefined; toolResultList?: ({ toolResults?: { functionResult?: { name?: string | undefined; content?: string | undefined; } | undefined; }[] | undefined; } & { toolResults?: ({ functionResult?: { name?: string | undefined; content?: string | undefined; } | undefined; }[] & ({ functionResult?: { name?: string | undefined; content?: string | undefined; } | undefined; } & { functionResult?: ({ name?: string | undefined; content?: string | undefined; } & { name?: string | undefined; content?: string | undefined; } & Record, never>) | undefined; } & Record, never>)[] & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>) | undefined; status?: Alternative_AlternativeStatus | undefined; } & Record, never>>(object: I): Alternative; }; export declare const Token: { encode(message: Token, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): Token; fromJSON(object: any): Token; toJSON(message: Token): unknown; fromPartial, never>>(object: I): Token; }; export declare const Tool: { encode(message: Tool, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): Tool; fromJSON(object: any): Tool; toJSON(message: Tool): unknown; fromPartial, never>) | undefined; } & Record, never>) | undefined; } & Record, never>>(object: I): Tool; }; export declare const FunctionTool: { encode(message: FunctionTool, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): FunctionTool; fromJSON(object: any): FunctionTool; toJSON(message: FunctionTool): unknown; fromPartial, never>) | undefined; } & Record, never>>(object: I): FunctionTool; }; export declare const ToolCall: { encode(message: ToolCall, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ToolCall; fromJSON(object: any): ToolCall; toJSON(message: ToolCall): unknown; fromPartial, never>) | undefined; } & Record, never>) | undefined; } & Record, never>>(object: I): ToolCall; }; export declare const FunctionCall: { encode(message: FunctionCall, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): FunctionCall; fromJSON(object: any): FunctionCall; toJSON(message: FunctionCall): unknown; fromPartial, never>) | undefined; } & Record, never>>(object: I): FunctionCall; }; export declare const ToolCallList: { encode(message: ToolCallList, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ToolCallList; fromJSON(object: any): ToolCallList; toJSON(message: ToolCallList): unknown; fromPartial, never>) | undefined; } & Record, never>) | undefined; } & Record, never>)[] & Record, never>) | undefined; } & Record, never>>(object: I): ToolCallList; }; export declare const ToolResult: { encode(message: ToolResult, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ToolResult; fromJSON(object: any): ToolResult; toJSON(message: ToolResult): unknown; fromPartial, never>) | undefined; } & Record, never>>(object: I): ToolResult; }; export declare const FunctionResult: { encode(message: FunctionResult, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): FunctionResult; fromJSON(object: any): FunctionResult; toJSON(message: FunctionResult): unknown; fromPartial, never>>(object: I): FunctionResult; }; export declare const ToolResultList: { encode(message: ToolResultList, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ToolResultList; fromJSON(object: any): ToolResultList; toJSON(message: ToolResultList): unknown; fromPartial, never>) | undefined; } & Record, never>)[] & Record, never>) | undefined; } & Record, never>>(object: I): ToolResultList; }; export declare const JsonSchema: { encode(message: JsonSchema, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): JsonSchema; fromJSON(object: any): JsonSchema; toJSON(message: JsonSchema): unknown; fromPartial, never>) | undefined; } & Record, never>>(object: I): JsonSchema; }; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array ? Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P : P & { [K in keyof P]: Exact; } & Record>, never>; export {};