Skip to content

Commit e26159c

Browse files
Refactor agent factories and update environment variable names for consistency; add agent name settings in configuration
1 parent 8ba2731 commit e26159c

File tree

7 files changed

+220
-635
lines changed

7 files changed

+220
-635
lines changed

infra/scripts/agent_scripts/run_create_agents_scripts.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -289,23 +289,23 @@ echo "Agents creation completed."
289289

290290
# Set azd environment variables
291291
if [ -n "$browseAgentName" ]; then
292-
azd env set AGENT_NAME_BROWSE "$browseAgentName"
293-
echo "Set AGENT_NAME_BROWSE=$browseAgentName"
292+
azd env set AZURE_AI_AGENT_NAME_BROWSE "$browseAgentName"
293+
echo "Set AZURE_AI_AGENT_NAME_BROWSE=$browseAgentName"
294294
fi
295295

296296
if [ -n "$templateAgentName" ]; then
297-
azd env set AGENT_NAME_TEMPLATE "$templateAgentName"
298-
echo "Set AGENT_NAME_TEMPLATE=$templateAgentName"
297+
azd env set AZURE_AI_AGENT_NAME_TEMPLATE "$templateAgentName"
298+
echo "Set AZURE_AI_AGENT_NAME_TEMPLATE=$templateAgentName"
299299
fi
300300

301301
if [ -n "$sectionAgentName" ]; then
302-
azd env set AGENT_NAME_SECTION "$sectionAgentName"
303-
echo "Set AGENT_NAME_SECTION=$sectionAgentName"
302+
azd env set AZURE_AI_AGENT_NAME_SECTION "$sectionAgentName"
303+
echo "Set AZURE_AI_AGENT_NAME_SECTION=$sectionAgentName"
304304
fi
305305

306306
if [ -n "$titleAgentName" ]; then
307-
azd env set AGENT_NAME_TITLE "$titleAgentName"
308-
echo "Set AGENT_NAME_TITLE=$titleAgentName"
307+
azd env set AZURE_AI_AGENT_NAME_TITLE "$titleAgentName"
308+
echo "Set AZURE_AI_AGENT_NAME_TITLE=$titleAgentName"
309309
fi
310310

311311
echo "Environment variables updated successfully!"
@@ -317,7 +317,7 @@ if [ -n "$webAppName" ] && [ -n "$resourceGroupName" ]; then
317317
az webapp config appsettings set \
318318
--resource-group "$resourceGroupName" \
319319
--name "$webAppName" \
320-
--settings AGENT_NAME_BROWSE="$browseAgentName" AGENT_NAME_TEMPLATE="$templateAgentName" AGENT_NAME_SECTION="$sectionAgentName" AGENT_NAME_TITLE="$titleAgentName" \
320+
--settings AZURE_AI_AGENT_NAME_BROWSE="$browseAgentName" AZURE_AI_AGENT_NAME_TEMPLATE="$templateAgentName" AZURE_AI_AGENT_NAME_SECTION="$sectionAgentName" AZURE_AI_AGENT_NAME_TITLE="$titleAgentName" \
321321
-o none
322322

323323
if [ $? -eq 0 ]; then

src/app.py

Lines changed: 207 additions & 324 deletions
Large diffs are not rendered by default.

src/backend/api/agent/agent_factory_base.py

Lines changed: 0 additions & 37 deletions
This file was deleted.

src/backend/api/agent/browse_agent_factory.py

Lines changed: 0 additions & 89 deletions
This file was deleted.

src/backend/api/agent/section_agent_factory.py

Lines changed: 0 additions & 88 deletions
This file was deleted.

src/backend/api/agent/template_agent_factory.py

Lines changed: 0 additions & 88 deletions
This file was deleted.

src/backend/settings.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ class _AzureAISettings(BaseSettings):
221221
agent_endpoint: Optional[str] = None
222222
agent_model_deployment_name: Optional[str] = None
223223
agent_api_version: Optional[str] = None
224+
agent_name_browse: Optional[str] = None
225+
agent_name_template: Optional[str] = None
226+
agent_name_section: Optional[str] = None
227+
agent_name_title: Optional[str] = None
224228

225229

226230
class _SearchCommonSettings(BaseSettings):

0 commit comments

Comments
 (0)