Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions agent-framework/tutorials/agents/structured-output.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ ChatOptions chatOptions = new()
ResponseFormat = ChatResponseFormat.ForJsonSchema(
schema: schema,
schemaName: "PersonInfo",
schemaDescription: "Information about a person including their name, age, and occupation")
schemaDescription: "Information about a person including their name, age, and occupation"),
Instructions = "You are a helpful assistant.",
};
```

Expand All @@ -76,16 +77,16 @@ using System;
using Azure.AI.OpenAI;
using Azure.Identity;
using Microsoft.Agents.AI;
using OpenAI;
using Microsoft.Extensions.AI;

AIAgent agent = new AzureOpenAIClient(
new Uri("https://<myresource>.openai.azure.com"),
new AzureCliCredential())
.GetChatClient("gpt-4o-mini")
.AsIChatClient()
.CreateAIAgent(new ChatClientAgentOptions()
{
Name = "HelpfulAssistant",
Instructions = "You are a helpful assistant.",
ChatOptions = chatOptions
});
```
Expand Down