Skip to content

Commit 2a64e40

Browse files
committed
Update sample
1 parent 78593b6 commit 2a64e40

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

sdk/ai/azure-ai-projects/samples/agents/sample_agent_structured_output.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,14 @@ class CalendarEvent(BaseModel):
6565
agent_name="MyAgent",
6666
definition=PromptAgentDefinition(
6767
model=os.environ["AZURE_AI_MODEL_DEPLOYMENT_NAME"],
68-
# BUG? text=PromptAgentDefinitionText(format=ResponseTextFormatConfigurationJsonSchema(name="CalendarEvent", schema=CalendarEvent.model_json_schema())),
6968
text=PromptAgentDefinitionText(
70-
format={"type": "json_schema", "name": "CalendarEvent", "schema": CalendarEvent.model_json_schema()}
69+
format=ResponseTextFormatConfigurationJsonSchema(
70+
name="CalendarEvent", schema=CalendarEvent.model_json_schema()
71+
)
7172
),
73+
# text=PromptAgentDefinitionText(
74+
# format={"type": "json_schema", "name": "CalendarEvent", "schema": CalendarEvent.model_json_schema()}
75+
# ),
7276
instructions="""
7377
You are a helpful assistant that extracts calendar event information from the input user messages,
7478
and returns it in the desired structured output format.

0 commit comments

Comments
 (0)