fixes to azure ai search init, samples (#5021)

This commit is contained in:
Eduard van Valkenburg
2026-04-01 11:59:52 +02:00
committed by GitHub
Unverified
parent e43fc8ccec
commit 2a8c3e2dcf
9 changed files with 333 additions and 53 deletions
@@ -100,7 +100,7 @@ async def main() -> None:
credential=AzureCliCredential() if not search_key else None,
mode="agentic",
azure_openai_resource_url=azure_openai_resource_url,
model_model=model_deployment,
model_deployment_name=model_deployment,
# Optional: Configure retrieval behavior
knowledge_base_output_mode="extractive_data", # or "answer_synthesis"
retrieval_reasoning_effort="minimal", # or "medium", "low"
@@ -110,13 +110,12 @@ async def main() -> None:
# Create agent with search context provider
async with (
search_provider,
FoundryChatClient(
project_endpoint=project_endpoint,
model_model=model_deployment,
credential=AzureCliCredential(),
) as client,
Agent(
client=client,
client=FoundryChatClient(
project_endpoint=project_endpoint,
model=model_deployment,
credential=AzureCliCredential(),
),
name="SearchAgent",
instructions=(
"You are a helpful assistant with advanced reasoning capabilities. "
@@ -85,13 +85,12 @@ async def main() -> None:
# Create agent with search context provider
async with (
search_provider,
FoundryChatClient(
project_endpoint=project_endpoint,
model_model=model_deployment,
credential=credential,
) as client,
Agent(
client=client,
client=FoundryChatClient(
project_endpoint=project_endpoint,
model=model_deployment,
credential=credential,
),
name="SearchAgent",
instructions=(
"You are a helpful assistant. Use the provided context from the "