Yandex Cloud
Поиск
Связаться с намиПодключиться
  • Истории успеха
  • Документация
  • Блог
  • Все сервисы
  • Статус работы сервисов
    • Доступны в регионе
    • Инфраструктура и сеть
    • Платформа данных
    • Контейнеры
    • Инструменты разработчика
    • Бессерверные вычисления
    • Безопасность
    • Мониторинг и управление ресурсами
    • ИИ для бизнеса
    • Бизнес-инструменты
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Партнёрская программа
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Тарифы Yandex Cloud
    • Промоакции и free tier
    • Правила тарификации
  • Истории успеха
  • Документация
  • Блог
Проект Яндекса
© 2025 ТОО «Облачные Сервисы Казахстан»
Yandex AI Studio
  • Начало работы с Model Gallery
    • О сервисе Yandex AI Studio
    • Yandex Workflows
    • Квоты и лимиты
    • Термины и определения
  • Переход с AI Assistant API на Responses API
  • Совместимость с OpenAI
    • О Yandex Cloud ML 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
      • Authentication
      • Request retries
  • Управление доступом
  • Правила тарификации
  • Аудитные логи Audit Trails
  • Публичные материалы
  • История изменений

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

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

Tools domain

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

class yandexcloudmlsdk.tools.domain.Toolsclass yandex_cloud_ml_sdk._tools.domain.Tools

property function: FunctionToolsTypeT

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

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_cloud_ml_sdk._tools.search_index.rephraser.model.Rephraser | ~yandex_cloud_ml_sdk._types.misc.Undefined) – setting for rephrasing user queries; refer to Rephraser documentation for details.
  • call_strategy (Literal['always'] | ~yandex_cloud_ml_sdk._types.tools.function.FunctionDictType | ~yandex_cloud_ml_sdk._tools.search_index.call_strategy.CallStrategy | ~yandex_cloud_ml_sdk._types.misc.Undefined)

Return type

SearchIndexTool

TypesTypes

class yandexcloudmlsdk.tools.toolcall.ToolCallclass yandex_cloud_ml_sdk._tools.tool_call.ToolCall

id: str | None

function: FunctionCallTypeT | None

class yandexcloudmlsdk.tools.functioncall.FunctionCallclass yandex_cloud_ml_sdk._tools.function_call.FunctionCall

name: str

arguments: JsonObject

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

Предыдущая
Assistants domain
Следующая
Files domain
Проект Яндекса
© 2025 ТОО «Облачные Сервисы Казахстан»