Skip to content

Fixing indentation in code editor when creating a Multi Agent Solution (ticketing) #32452

@Thepurplehisbiscus

Description

@Thepurplehisbiscus

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-ResolveAuto resolve by botService AttentionThis issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions