Azure / Azure/azure-sdk-for-python

Getting openai.BadRequestError- Failed to decode AML connections- while running the sample code from new AI foundry Agent playground

Offen
#44,130 2 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @howieleung Auf GitHub ansehen
AI Agents AI Projects customer-reported needs-team-attention question Service Attention
Vorherrschende Sprache
Python
Sterne
5.6k
Forks
3.4k
Ø Merge
2 T. 2 Std.
Gemergte PRs (30 T.)
213

Beschreibung

Packages:
**azure-ai-agents 1.1.0
azure-ai-projects 2.0.0b2
azure-core 1.36.0
azure-identity 1.20.0**

I was exploring the new AI foundry that was released few days back and came across this error while trying the sample agent code.

I am getting below error:

openai.BadRequestError: Error code: 400 - {'error': {'message': 'Failed to decode AML connections.', 'type': 'invalid_request_error', 'param': None, 'code': 'aml_connections_decode_error'}}

This remains same whether im running locally or on the web vs code option that is present there.

```
from azure.identity import DefaultAzureCredential
from azure.ai.projects import AIProjectClient

myEndpoint =

project_client = AIProjectClient(
endpoint=myEndpoint,
credential=DefaultAzureCredential(),
)

myAgent = "IcecreamSellerAgent"
# Get an existing agent
agent = project_client.agents.get(agent_name=myAgent)
print(f"Retrieved agent: {agent.name}")

openai_client = project_client.get_openai_client()

# Reference the agent to get a response
response = openai_client.responses.create(
input=[{"role": "user", "content": "Tell me what you can help with."}],
extra_body={"agent": {"name": agent.name, "type": "agent_reference"}},
)

print(f"Response output: {response.output_text}")
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.