Yandex Cloud
Поиск
Связаться с намиПопробовать бесплатно
  • Истории успеха
  • Документация
  • Блог
  • Все сервисы
  • Статус работы сервисов
  • Marketplace
    • Популярные
    • Инфраструктура и сеть
    • Платформа данных
    • Искусственный интеллект
    • Безопасность
    • Инструменты DevOps
    • Бессерверные вычисления
    • Управление ресурсами
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Облако для интеграторов
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Контент-программа
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Калькулятор цен
    • Тарифы
    • Акции и free tier
  • Истории успеха
  • Документация
  • Блог
Создавайте контент и получайте гранты!Готовы написать своё руководство? Участвуйте в контент-программе и получайте гранты на работу с облачными сервисами!
Подробнее о программе
Проект Яндекса
© 2026 ООО «Яндекс.Облако»
Yandex AI Studio
  • О сервисе Yandex AI Studio
  • Начало работы с Model Gallery
  • Yandex Workflows
  • Переход с AI Assistant API на Responses API
  • Совместимость с OpenAI
    • О Yandex AI Studio SDK
      • Overview
        • Overview
        • Models domain
        • Assistants domain
        • Tools domain
        • Files domain
        • Threads domain
        • Runs domain
        • Search indexes domain
        • Search API domain
        • Datasets domain
        • Tuning domain
        • Batch domain
        • Chat domain
        • SpheechKit domain
      • Authentication
      • Request retries
  • Квоты и лимиты
  • Правила тарификации
  • Управление доступом
  • Аудитные логи Audit Trails
  • Публичные материалы
  • История изменений
  • Термины и определения

В этой статье:

  • class yandex_ai_studio_sdk._tools.domain.Tools
  • Types
  • class yandex_ai_studio_sdk._tools.tool_call.ToolCall
  • class yandex_ai_studio_sdk._tools.function_call.FunctionCall
  1. Yandex AI Studio SDK
  2. Справочник SDK (англ.)
  3. SDK
  4. Tools domain

Tools domain

Статья создана
Yandex Cloud
Обновлена 28 января 2026 г.
  • class yandex_ai_studio_sdk._tools.domain.Tools
  • Types
    • class yandex_ai_studio_sdk._tools.tool_call.ToolCall
    • class yandex_ai_studio_sdk._tools.function_call.FunctionCall

class yandexaistudiosdk.tools.domain.Toolsclass yandex_ai_studio_sdk._tools.domain.Tools

Class for tools functionality.

Tools are specialized utilities that extend the capabilities of language models and AI assistants by providing access to external functions, data sources, and computational resources. They enable models to perform actions beyond text generation, such as searching through knowledge bases, executing custom functions, and processing structured data.

This class serves as the foundation for tool management in both synchronous and asynchronous contexts, providing a unified interface for tools. For more information see the description of members of this class.

Tools are particularly useful in:

  • AI Assistants: Extending conversational agents with external capabilities like web search, database queries, or API calls
  • Completions: Enabling language models to invoke functions during text generation for dynamic content creation and problem-solving

The tools framework supports both streaming and non-streaming operations, making it suitable for real-time applications and batch processing scenarios.

property function: FunctionToolsTypeT

Get the function sub-domain for creating function tools.

generative_search(*, description, site=Undefined, host=Undefined, url=Undefined, enable_nrfm_docs=Undefined, search_filters=Undefined)

Creates GeberativeSearch tool which provide access to generative search by Search API for LLMs.

Not to be confused with sdk.search_api.generative. Tools domain is for creating tools for using in LLMs/Assistants and search_api domain is for using Search API directly.

To learn more about parameters and their formats and possible values, refer to generative search documentation

NB: All of the site, host, url parameters are mutually exclusive.

Parameters

  • site (str | Sequence[str] | Undefined) – parameter for limiting search to specific location or list of sites.
  • host (str | Sequence[str] | Undefined) – parameter for limiting search to specific location or list of hosts.
  • url (str | Sequence[str] | Undefined) – parameter for limiting search to specific location or list of URLs.
  • enable_nrfm_docs (bool | Undefined) – 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.
  • search_filters (Sequence[DateFilterType | FormatFilterType | LangFilterType] | DateFilterType | FormatFilterType | LangFilterType | Undefined) – allows to limit search results with additional filters.
>>> date_filter = {'date': '<20250101'}
>>> format_filter = {'format': 'doc'}
>>> lang_filter = {'lang': 'ru'}
>>> tool = sdk.tools.generative_search(
...     search_filters=[date_filter, format_filter, lang_filter],
...     description="description when model should call a tool"
... )
  • description (str)

Return type

GenerativeSearchTool

property rephraser: RephraserFunction

Get the rephraser for creating query transformation models.

The rephraser provides access to specialized language models designed to intelligently rewrite and enhance user search queries by incorporating conversational context. This is particularly useful in multi-turn conversations where the latest user message may lack context from previous exchanges.

The rephraser works by: - Analyzing the conversation history and current user query - Reformulating the query to be more specific and contextually complete - Improving search relevance by expanding abbreviated or ambiguous terms - Maintaining semantic intent while adding necessary context

The rephraser returns a factory that can create Rephraser model instances with different configurations, supporting various model types including the default ‘rephraser’ model or custom rephrasing models.

search_index(indexes, *, max_num_results=Undefined, rephraser=Undefined, call_strategy=Undefined)

Creates SearchIndexTool (not to be confused with SearchIndex/AsyncSearchIndex).

Parameters

  • indexes (str | BaseSearchIndex | Iterable[BaseSearchIndex] | Iterable[str]) – parameter takes BaseSearchIndex, string with search index id, or a list of this values in any combination.
  • max_num_results (int | Undefined) – 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.
  • rephraser (str | Literal[True] | ~yandex_ai_studio_sdk._tools.search_index.rephraser.model.Rephraser | ~yandex_ai_studio_sdk._types.misc.Undefined) – setting for rephrasing user queries; refer to Rephraser documentation for details.
  • call_strategy (Literal['always'] | ~yandex_ai_studio_sdk._types.tools.function.FunctionDictType | ~yandex_ai_studio_sdk._tools.search_index.call_strategy.CallStrategy | ~yandex_ai_studio_sdk._types.misc.Undefined)

Return type

SearchIndexTool

TypesTypes

class yandexaistudiosdk.tools.toolcall.ToolCallclass yandex_ai_studio_sdk._tools.tool_call.ToolCall

A tool call returned by models as a result of server-side tool calls.

This class encapsulates the response from language models when they invoke tools during conversation or completion. It contains information about the specific tool that was called, including its unique identifier and the associated function call with parameters and results.

id: str | None

Unique tool call identifier

function: FunctionCallTypeT | None

Function call associated with this tool call

class yandexaistudiosdk.tools.functioncall.FunctionCallclass yandex_ai_studio_sdk._tools.function_call.FunctionCall

Represents a function call returned by models as a result of server-side tool calls.

This class encapsulates the details of a function call that was invoked by the model during processing, including the function name and the arguments passed to it.

name: str

Name of the function being called

arguments: JsonObject

Arguments passed to the function

Была ли статья полезна?

Предыдущая
Assistants domain
Следующая
Files domain
Создавайте контент и получайте гранты!Готовы написать своё руководство? Участвуйте в контент-программе и получайте гранты на работу с облачными сервисами!
Подробнее о программе
Проект Яндекса
© 2026 ООО «Яндекс.Облако»