Skip to content

Commit b59f6ea

Browse files
fix: Update agent deletion to use delete_version method for consistency
1 parent cb74296 commit b59f6ea

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

infra/scripts/index_scripts/03_cu_process_data_text.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,8 +647,8 @@ async def delete_agents():
647647
AsyncAzureCliCredential(process_timeout=30) as async_cred,
648648
AIProjectClient(endpoint=AI_PROJECT_ENDPOINT, credential=async_cred) as project_client,
649649
):
650-
await project_client.agents.delete(topic_mining_agent.name)
651-
await project_client.agents.delete(topic_mapping_agent.name)
650+
await project_client.agents.delete_version(topic_mining_agent.name, topic_mining_agent.version)
651+
await project_client.agents.delete_version(topic_mapping_agent.name, topic_mapping_agent.version)
652652

653653
asyncio.run(delete_agents())
654654
print(f"✓ Deleted agents: {topic_mining_agent.name}, {topic_mapping_agent.name}")

infra/scripts/index_scripts/04_cu_process_custom_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,8 +729,8 @@ async def delete_agents():
729729
AsyncAzureCliCredential(process_timeout=30) as async_cred,
730730
AIProjectClient(endpoint=AI_PROJECT_ENDPOINT, credential=async_cred) as project_client,
731731
):
732-
await project_client.agents.delete(topic_mining_agent.name)
733-
await project_client.agents.delete(topic_mapping_agent.name)
732+
await project_client.agents.delete_version(topic_mining_agent.name, topic_mining_agent.version)
733+
await project_client.agents.delete_version(topic_mapping_agent.name, topic_mapping_agent.version)
734734

735735
asyncio.run(delete_agents())
736736
print(f"✓ Deleted agents: {topic_mining_agent.name}, {topic_mapping_agent.name}")

0 commit comments

Comments
 (0)