Skip to content

Commit 940748a

Browse files
authored
rollback change to env vars until extension ready, fix bing grounding (#367)
1 parent 2122be1 commit 940748a

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
lines changed

samples/microsoft/python/getting-started-agents/hosted-agents/calculator-agent/agent.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ template:
2121
- name: APPLICATIONINSIGHTS_CONNECTION_STRING
2222
value: ${APPLICATIONINSIGHTS_CONNECTION_STRING}
2323
- name: AZURE_AI_MODEL_DEPLOYMENT_NAME
24-
value: "{{chat}}"
24+
value: "gpt-4o-mini"
25+
# value: "{{chat}}"
2526
resources:
2627
- kind: model
2728
id: gpt-4o-mini

samples/microsoft/python/getting-started-agents/hosted-agents/msft-docs-agent/agent.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ template:
1616
- name: AZURE_AI_PROJECT_ENDPOINT
1717
value: ${AZURE_AI_PROJECT_ENDPOINT}
1818
- name: AZURE_AI_MODEL_DEPLOYMENT_NAME
19-
value: "{{chat}}"
19+
value: "gpt-4o-mini"
20+
# value: "{{chat}}"
2021
resources:
2122
- kind: model
2223
id: gpt-4o-mini

samples/microsoft/python/getting-started-agents/hosted-agents/web-search-agent/agent.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@ template:
1919
environment_variables:
2020
- name: AZURE_AI_PROJECT_ENDPOINT
2121
value: ${AZURE_AI_PROJECT_ENDPOINT}
22-
- name: AI_FOUNDRY_PROJECT_RESOURCE_ID
23-
value: ${AI_FOUNDRY_PROJECT_RESOURCE_ID}
24-
- name: BING_GROUNDING_CONNECTION_NAME
25-
value: ${BING_GROUNDING_CONNECTION_NAME}
22+
- name: BING_GROUNDING_CONNECTION_ID
23+
value: ${BING_GROUNDING_CONNECTION_ID}
2624
- name: AZURE_AI_MODEL_DEPLOYMENT_NAME
27-
value: "{{chat}}"
25+
value: "gpt-4o-mini"
26+
# value: "{{chat}}"
2827
resources:
2928
- kind: model
3029
id: gpt-4o-mini

samples/microsoft/python/getting-started-agents/hosted-agents/web-search-agent/main.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,11 @@ def get_agent() -> ChatAgent:
1010
assert "AZURE_AI_PROJECT_ENDPOINT" in os.environ, (
1111
"AZURE_AI_PROJECT_ENDPOINT environment variable must be set."
1212
)
13-
assert "AI_FOUNDRY_PROJECT_RESOURCE_ID" in os.environ, (
14-
"AI_FOUNDRY_PROJECT_RESOURCE_ID environment variable must be set."
15-
)
1613
assert "AZURE_AI_MODEL_DEPLOYMENT_NAME" in os.environ, (
1714
"AZURE_AI_MODEL_DEPLOYMENT_NAME environment variable must be set."
1815
)
19-
assert "BING_GROUNDING_CONNECTION_NAME" in os.environ, (
20-
"BING_GROUNDING_CONNECTION_NAME environment variable must be set to use HostedWebSearchTool."
16+
assert "BING_GROUNDING_CONNECTION_ID" in os.environ, (
17+
"BING_GROUNDING_CONNECTION_ID environment variable must be set to use HostedWebSearchTool."
2118
)
2219

2320
chat_client = AzureAIAgentClient(
@@ -30,7 +27,7 @@ def get_agent() -> ChatAgent:
3027
bing_search_tool = HostedWebSearchTool(
3128
name="Bing Grounding Search",
3229
description="Search the web for current information using Bing",
33-
connection_id=os.environ["AI_FOUNDRY_PROJECT_RESOURCE_ID"]+"/connections/" + os.environ["BING_GROUNDING_CONNECTION_NAME"],
30+
connection_id=os.environ["BING_GROUNDING_CONNECTION_ID"],
3431
)
3532

3633
# Create ChatAgent with the Bing search tool

0 commit comments

Comments
 (0)