Tools
Search index tool
class yandex_ai_studio_sdk._tools.search_index.tool.SearchIndexTool
Tool for working with search indexes.
A SearchIndexTool represents an executable tool that provides instructions on how to apply and interact with search indexes, as opposed to a SearchIndex which represents the data/resource itself — actual search index data and provides methods for managing the index (adding files, updating metadata, etc.). A SearchIndexTool encapsulates the configuration and behavior for performing search operations across one or more search indexes.
search_index_ids: tuple
Tuple of search index IDs to use with this tool
max_num_results: int
Maximum number of results to return from search, optional
rephraser: Rephraser | None
Rephraser instance for query rephrasing, optional
call_strategy: CallStrategy | None
Strategy for calling the search index, optional
class yandex_ai_studio_sdk._tools.search_index.rephraser.function.RephraserFunction
Function for creating Rephraser object, which incapsulating rephrasing settings.
__call__(model_name, *, model_version='latest')
Creates a Rephraser object, which incapsulating rephrasing settings.
|
Parameters |
|
|
Returns |
Rephraser object, which incapsulating rephrasing settings |
|
Return type |
class yandex_ai_studio_sdk._tools.search_index.rephraser.model.Rephraser
Class for incapsulating rephraser settings.
Used to rewrite the last user message for search, incorporating context from the previous conversation.
For usage search index tool with and without rephraser example see (sync SDK
property config: ConfigTypeT
configure(**kwargs)
|
Return type |
Self |
property fine_tuned: bool
property uri: str
class yandex_ai_studio_sdk._tools.search_index.call_strategy.CallStrategy
Represents call strategy for search index tools.
The call strategy determines when a tool should be called: - ‘always’: call the tool on every request - function dict: call based on function instruction
property value: Literal
Get the current call strategy value.
Function tool
class yandex_ai_studio_sdk._tools.tool.FunctionTool
A function tool that can be called by AI models.
This class represents a callable function that can be used by AI models for function calling capabilities. It encapsulates the function’s metadata including its name, description, parameter schema, and validation settings.
The function tool can be used with both completions and assistants APIs, providing a unified interface for defining external functions that models can invoke during conversations or completion requests.
name: str
Name of the function
Optional function description
parameters: JsonSchemaType
Function parameters schema
Whether to enforce strict parameter validation
Generative search tool
class yandex_ai_studio_sdk._tools.generative_search.GenerativeSearchTool
A generative search tool that can be called by LLMs/Assistants models.
To learn more about generative search itself, refer to generative search documentation
Objects of this class could be used in any place which requires BaseTool instance, but not every place/feature supports all of the tool types.
description: str
Description of tool instance which also instructs model when to call it.
enable_nrfm_docs: bool
tells to backend to include or not to include pages, which are not available via direct clicks from given sites/hosts/urls to search result.
fix_misspell: bool
tells to backend to fix or not to fix misspels in queries.
host: tuple
Parameter for limiting search to specific location or list of hosts.
search_filters: tuple
allows to limit search results with additional filters.
site: tuple
Parameter for limiting search to specific location or list of sites.
url: tuple
Parameter for limiting search to specific location or list of urls.