Fixing indentation in code editor when creating a Multi Agent Solution (ticketing)
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### Describe the bug
Hi all,
I'm creating a multi agent ticket triaging solution.
Within the code editor and I have indented the line of code as error fix suggests but still getting the same indention error.
Any help to resolve this is appreciated.
Cheers,
Rebecca
### Related command
# Connect to the agents client
agents_client = AgentsClient(
endpoint=project_endpoint,
credential=DefaultAzureCredential(
exclude_environment_credential=True,
exclude_managed_identity_credential=True
),
)
with agents_client:
# Create an agent to prioritize support tickets
priority_agent_name = "priority_agent"
priority_agent_instructions = """..."""
priority_agent = agents_client.create_agent(
model=model_deployment,
name=priority_agent_name,
instructions=priority_agent_instructions
### Errors
IndentationError: expected an indented block after 'with' statement on line 29
rebecca [ ~/ai-agents/Labfiles/03b-build-multi-agent-solution/Python ]$ python agent_triage.py
File "/home/rebecca/ai-agents/Labfiles/03b-build-multi-agent-solution/Python/agent_triage.py", line 33
priority_agent_name = "priority_agent"
^^^^^^^^^^^^^^^^^^^
IndentationError: expected an indented block after 'with' statement on line 29
### Issue script & Debug output
IndentationError: expected an indented block after 'with' statement on line 29
rebecca [ ~/ai-agents/Labfiles/03b-build-multi-agent-solution/Python ]$ python agent_triage.py
File "/home/rebecca/ai-agents/Labfiles/03b-build-multi-agent-solution/Python/agent_triage.py", line 33
priority_agent_name = "priority_agent"
^^^^^^^^^^^^^^^^^^^
IndentationError: expected an indented block after 'with' statement on line 29
### Expected behavior
The following command python agent_triage.py should be executed successfully without indention errors.
### Environment Summary
{
"azure-cli": "2.79.0",
"azure-cli-core": "2.79.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"ml": "2.39.0",
"ssh": "2.0.6"
}
}
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.