Currently, we have two ways of constructing agents in samples:
// way 1
new AzureOpenAIClient(new Uri(endpoint), new DefaultAzureCredential())
.GetChatClient(deploymentName)
.AsIChatClient()
.AsAIAgent("You are a helpful assistant");
// way 2
new AzureOpenAIClient(new Uri(endpoint), new DefaultAzureCredential())
.GetChatClient(deploymentName)
.AsAIAgent("You are a helpful assistant");
Which way is used has implications for the required dependencies, since the relevant extension methods live in different package.
To make things simpler for users, we should consistently follow pattern 2, since it reduces the number of lines of code and reduces the number of required dependencies as well.
Currently, we have two ways of constructing agents in samples:
Which way is used has implications for the required dependencies, since the relevant extension methods live in different package.
To make things simpler for users, we should consistently follow pattern 2, since it reduces the number of lines of code and reduces the number of required dependencies as well.