Skip to content

Commit 411a26a

Browse files
fix: Refactor agent names and index identifiers for KM alignment and improved uniqueness
2 parents 63b4c17 + 53f4408 commit 411a26a

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

.github/workflows/deploy-KMGeneric.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ jobs:
120120
az deployment group create \
121121
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
122122
--template-file infra/main.bicep \
123-
124123
--parameters environmentName=${{env.SOLUTION_PREFIX}} contentUnderstandingLocation="swedencentral" secondaryLocation="${{ env.AZURE_LOCATION }}" imageTag=${{ steps.determine_tag.outputs.tagname }} gptDeploymentCapacity=150
125124
126125
@@ -355,4 +354,4 @@ jobs:
355354
if: always()
356355
run: |
357356
az logout
358-
echo "Logged out from Azure."
357+
echo "Logged out from Azure."

.github/workflows/docker-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
id: determine_tag
5050
run: |
5151
if [[ "${{ github.ref_name }}" == "main" ]]; then
52-
echo "tagname=latest" >> $GITHUB_OUTPUT
52+
echo "tagname=latest_fdp" >> $GITHUB_OUTPUT
5353
elif [[ "${{ github.ref_name }}" == "dev" ]]; then
5454
echo "tagname=dev" >> $GITHUB_OUTPUT
5555
elif [[ "${{ github.ref_name }}" == "demo" ]]; then
@@ -78,4 +78,4 @@ jobs:
7878
push: ${{ github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'demo' || github.ref_name == 'dependabotchanges' }}
7979
tags: |
8080
${{ secrets.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io' }}/km-api:${{ steps.determine_tag.outputs.tagname }}
81-
${{ secrets.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io' }}/km-api:${{ steps.determine_tag.outputs.tagname }}_${{ steps.date.outputs.date }}_${{ github.run_number }}
81+
${{ secrets.ACR_LOGIN_SERVER || 'acrlogin.azurecr.io' }}/km-api:${{ steps.determine_tag.outputs.tagname }}_${{ steps.date.outputs.date }}_${{ github.run_number }}

src/api/agents/conversation_agent_factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ async def get_agent(cls) -> AzureAIAgent:
2020
creds = DefaultAzureCredential()
2121
client = AzureAIAgent.create_client(credential=creds, endpoint=ai_agent_settings.endpoint)
2222

23-
agent_name = "ConversationKnowledgeAgent"
23+
agent_name = "KM-ConversationKnowledgeAgent"
2424
agent_instructions = '''You are a helpful assistant.
2525
Always return the citations as is in final response.
2626
Always return citation markers exactly as they appear in the source data, placed in the "answer" field at the correct location. Do not modify, convert, or simplify these markers.

src/api/agents/search_agent_factory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async def get_agent(cls) -> dict:
3535
)
3636

3737
project_index = project_client.indexes.create_or_update(
38-
name=f"project-index-{azure_ai_search_index_name}",
38+
name=f"project-index-{azure_ai_search_connection_name}-{azure_ai_search_index_name}",
3939
version="1",
4040
body={
4141
"connectionName": azure_ai_search_connection_name,
@@ -56,7 +56,7 @@ async def get_agent(cls) -> dict:
5656

5757
agent = project_client.agents.create_agent(
5858
model=deployment_model,
59-
name="ChatWithCallTranscriptsAgent",
59+
name="KM-ChatWithCallTranscriptsAgent",
6060
instructions="You are a helpful agent. Use the tools provided and always cite your sources.",
6161
tools=ai_search.definitions,
6262
tool_resources=ai_search.resources,

src/tests/api/agents/test_search_agent_factory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ async def test_get_agent_creates_new_instance(
5656
assert result["agent"] == mock_agent
5757
assert result["client"] == mock_project_client
5858
mock_project_client.indexes.create_or_update.assert_called_once_with(
59-
name="project-index-fake-index",
59+
name="project-index-fake-connection-fake-index",
6060
version="1",
6161
body={
6262
"connectionName": "fake-connection",

0 commit comments

Comments
 (0)