import _m0 from 'protobufjs/minimal'; export declare const protobufPackage = "yandex.cloud.ai.assistants.v1"; /** Defines the options for truncating thread messages within a prompt. */ export interface PromptTruncationOptions { /** * The maximum number of tokens allowed in the prompt. * If the prompt exceeds this limit, the thread messages will be truncated. * Default max_prompt_tokens: 7000 */ maxPromptTokens?: number; autoStrategy?: PromptTruncationOptions_AutoStrategy | undefined; /** * Retains only the last `num_messages` messages in the thread. * If these messages exceed `max_prompt_tokens`, older messages will be further truncated to fit the limit. */ lastMessagesStrategy?: PromptTruncationOptions_LastMessagesStrategy | undefined; } /** Auto truncation strategy. */ export interface PromptTruncationOptions_AutoStrategy { } /** Truncates the prompt by retaining only the last `num_messages` messages in the thread. */ export interface PromptTruncationOptions_LastMessagesStrategy { /** * The number of most recent messages to retain in the prompt. * If these messages exceed `max_prompt_tokens`, older messages will be further truncated to fit the limit. */ numMessages: number; } /** Defines the options for completion generation. */ export interface CompletionOptions { /** * 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; /** * 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; } /** Represents a general tool that can be one of several types. */ export interface Tool { /** SearchIndexTool tool that performs search across specified indexes. */ searchIndex?: SearchIndexTool | undefined; /** Function tool that can be invoked by the assistant. */ function?: FunctionTool | undefined; } /** Represents a call to a tool. */ export interface ToolCall { /** Represents a call to a function. */ functionCall?: FunctionCall | undefined; } /** 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 a list of tool results. */ export interface ToolResultList { /** A list of tool results. */ toolResults: ToolResult[]; } /** Configures a tool that enables Retrieval-Augmented Generation (RAG) by allowing the assistant to search across a specified search index. */ export interface SearchIndexTool { /** A list of search index IDs that this tool will query. Currently, only a single index ID is supported. */ searchIndexIds: string[]; /** * The maximum number of results to return from the search. * Fewer results may be returned if necessary to fit within the prompt's token limit. * This ensures that the combined prompt and search results do not exceed the token constraints. */ maxNumResults?: number; /** * Options for rephrasing user queries. * Used to rewrite the last user message for search, * incorporating context from the previous conversation. */ rephraserOptions?: RephraserOptions; /** * Defines the strategy for triggering search. * Controls whether search results are always included or returned only when * the model explicitly calls the tool. */ callStrategy?: CallStrategy; } /** Defines when the assistant uses the search tool. */ export interface CallStrategy { alwaysCall?: CallStrategy_AlwaysCall | undefined; autoCall?: CallStrategy_AutoCall | undefined; } /** Always includes retrieved search results in the prompt. */ export interface CallStrategy_AlwaysCall { } /** * Exposes the tool as a callable function. * The model decides when to trigger search based on the instruction. */ export interface CallStrategy_AutoCall { /** The name of the tool as exposed to the model. */ name: string; /** Required instruction that helps the model decide when to call the tool. */ instruction: string; } /** Represents a function tool that can be invoked by the assistant. */ 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 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 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; } /** Options for configuring the rephrasing the last user message for search using context from previous conversation. */ export interface RephraserOptions { /** The ID of the model used to rephrase the last user message for search. */ rephraserUri: string; } export declare const PromptTruncationOptions: { encode(message: PromptTruncationOptions, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): PromptTruncationOptions; fromJSON(object: any): PromptTruncationOptions; toJSON(message: PromptTruncationOptions): unknown; fromPartial, never>) | undefined; lastMessagesStrategy?: ({ numMessages?: number | undefined; } & { numMessages?: number | undefined; } & Record, never>) | undefined; } & Record, never>>(object: I): PromptTruncationOptions; }; export declare const PromptTruncationOptions_AutoStrategy: { encode(_: PromptTruncationOptions_AutoStrategy, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): PromptTruncationOptions_AutoStrategy; fromJSON(_: any): PromptTruncationOptions_AutoStrategy; toJSON(_: PromptTruncationOptions_AutoStrategy): unknown; fromPartial, never>>(_: I): PromptTruncationOptions_AutoStrategy; }; export declare const PromptTruncationOptions_LastMessagesStrategy: { encode(message: PromptTruncationOptions_LastMessagesStrategy, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): PromptTruncationOptions_LastMessagesStrategy; fromJSON(object: any): PromptTruncationOptions_LastMessagesStrategy; toJSON(message: PromptTruncationOptions_LastMessagesStrategy): unknown; fromPartial, never>>(object: I): PromptTruncationOptions_LastMessagesStrategy; }; 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>>(object: I): CompletionOptions; }; 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; maxNumResults?: number | undefined; rephraserOptions?: ({ rephraserUri?: string | undefined; } & { rephraserUri?: string | undefined; } & Record, never>) | undefined; callStrategy?: ({ alwaysCall?: {} | undefined; autoCall?: { name?: string | undefined; instruction?: string | undefined; } | undefined; } & { alwaysCall?: ({} & {} & Record, never>) | undefined; autoCall?: ({ name?: string | undefined; instruction?: string | undefined; } & { name?: string | undefined; instruction?: string | undefined; } & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>) | undefined; function?: ({ name?: string | undefined; description?: string | undefined; parameters?: { [x: string]: any; } | undefined; } & { name?: string | undefined; description?: string | undefined; parameters?: ({ [x: string]: any; } & { [x: string]: any; } & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>>(object: I): Tool; }; 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 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 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 SearchIndexTool: { encode(message: SearchIndexTool, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): SearchIndexTool; fromJSON(object: any): SearchIndexTool; toJSON(message: SearchIndexTool): unknown; fromPartial, never>) | undefined; maxNumResults?: number | undefined; rephraserOptions?: ({ rephraserUri?: string | undefined; } & { rephraserUri?: string | undefined; } & Record, never>) | undefined; callStrategy?: ({ alwaysCall?: {} | undefined; autoCall?: { name?: string | undefined; instruction?: string | undefined; } | undefined; } & { alwaysCall?: ({} & {} & Record, never>) | undefined; autoCall?: ({ name?: string | undefined; instruction?: string | undefined; } & { name?: string | undefined; instruction?: string | undefined; } & Record, never>) | undefined; } & Record, never>) | undefined; } & Record, never>>(object: I): SearchIndexTool; }; export declare const CallStrategy: { encode(message: CallStrategy, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CallStrategy; fromJSON(object: any): CallStrategy; toJSON(message: CallStrategy): unknown; fromPartial, never>) | undefined; autoCall?: ({ name?: string | undefined; instruction?: string | undefined; } & { name?: string | undefined; instruction?: string | undefined; } & Record, never>) | undefined; } & Record, never>>(object: I): CallStrategy; }; export declare const CallStrategy_AlwaysCall: { encode(_: CallStrategy_AlwaysCall, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CallStrategy_AlwaysCall; fromJSON(_: any): CallStrategy_AlwaysCall; toJSON(_: CallStrategy_AlwaysCall): unknown; fromPartial, never>>(_: I): CallStrategy_AlwaysCall; }; export declare const CallStrategy_AutoCall: { encode(message: CallStrategy_AutoCall, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): CallStrategy_AutoCall; fromJSON(object: any): CallStrategy_AutoCall; toJSON(message: CallStrategy_AutoCall): unknown; fromPartial, never>>(object: I): CallStrategy_AutoCall; }; 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 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 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 RephraserOptions: { encode(message: RephraserOptions, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): RephraserOptions; fromJSON(object: any): RephraserOptions; toJSON(message: RephraserOptions): unknown; fromPartial, never>>(object: I): RephraserOptions; }; 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 {};