Python: AzureAI Agent AI Search Sample (#1281)

* azure ai search sample

* small fix
This commit is contained in:
Giles Odigwe
2025-10-08 08:52:02 -07:00
committed by GitHub
Unverified
parent 523127fbf4
commit 334d52f300
3 changed files with 78 additions and 0 deletions
@@ -907,6 +907,10 @@ class AzureAIAgentClient(BaseChatClient):
filter=additional_props.get("filter", ""),
)
tool_definitions.extend(ai_search.definitions)
# Add tool resources for Azure AI Search
if run_options is not None:
run_options.setdefault("tool_resources", {})
run_options["tool_resources"].update(ai_search.resources)
case ToolDefinition():
tool_definitions.append(tool)
case dict():