Skip to content

Commit c9fc649

Browse files
authored
Merge branch 'main' into codex/semantic-kernel-12442-google-ai-anyof
2 parents d18fa20 + 082e28e commit c9fc649

File tree

86 files changed

+1291
-2119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1291
-2119
lines changed
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
name: DevFlow PR Review
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- reopened
8+
- ready_for_review
9+
workflow_dispatch:
10+
inputs:
11+
pr_url:
12+
description: Pull request URL to review
13+
required: true
14+
type: string
15+
16+
permissions:
17+
contents: read
18+
issues: write
19+
pull-requests: write
20+
21+
concurrency:
22+
group: devflow-pr-review-${{ github.repository }}-${{ github.event.pull_request.number || github.run_id }}
23+
cancel-in-progress: true
24+
25+
env:
26+
DEVFLOW_REPOSITORY: ${{ vars.DF_REPO }}
27+
DEVFLOW_REF: main
28+
TARGET_REPO_PATH: ${{ github.workspace }}/target-repo
29+
DEVFLOW_PATH: ${{ github.workspace }}/devflow
30+
31+
jobs:
32+
review:
33+
runs-on: ubuntu-latest
34+
timeout-minutes: 60
35+
if: ${{ github.event_name != 'pull_request_target' || !github.event.pull_request.draft }}
36+
37+
steps:
38+
- name: Resolve PR metadata
39+
id: pr
40+
shell: bash
41+
env:
42+
PR_HTML_URL: ${{ github.event.pull_request.html_url }}
43+
PR_NUMBER: ${{ github.event.pull_request.number }}
44+
PR_URL_INPUT: ${{ inputs.pr_url }}
45+
run: |
46+
set -euo pipefail
47+
48+
if [[ "${GITHUB_EVENT_NAME}" == "pull_request_target" ]]; then
49+
echo "pr_url=${PR_HTML_URL}" >> "$GITHUB_OUTPUT"
50+
echo "pr_number=${PR_NUMBER}" >> "$GITHUB_OUTPUT"
51+
echo "repo=${GITHUB_REPOSITORY}" >> "$GITHUB_OUTPUT"
52+
exit 0
53+
fi
54+
55+
if [[ -z "$PR_URL_INPUT" ]]; then
56+
echo "workflow_dispatch requires pr_url" >&2
57+
exit 1
58+
fi
59+
60+
if [[ ! "$PR_URL_INPUT" =~ ^https://github\.com/([^/]+/[^/]+)/pull/([0-9]+)([/?].*)?$ ]]; then
61+
echo "Could not parse pull request URL (expected https://github.com/<owner>/<repo>/pull/<number>): $PR_URL_INPUT" >&2
62+
exit 1
63+
fi
64+
65+
pr_repo="${BASH_REMATCH[1]}"
66+
pr_number="${BASH_REMATCH[2]}"
67+
68+
if [[ "$pr_repo" != "$GITHUB_REPOSITORY" ]]; then
69+
echo "PR URL repository ($pr_repo) does not match current repository ($GITHUB_REPOSITORY)" >&2
70+
exit 1
71+
fi
72+
73+
echo "pr_url=${PR_URL_INPUT}" >> "$GITHUB_OUTPUT"
74+
echo "pr_number=${pr_number}" >> "$GITHUB_OUTPUT"
75+
echo "repo=${pr_repo}" >> "$GITHUB_OUTPUT"
76+
77+
# Safe checkout: base repo only, not the untrusted PR head.
78+
- name: Checkout target repo base
79+
uses: actions/checkout@v5
80+
with:
81+
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.base.sha || github.sha }}
82+
fetch-depth: 0
83+
persist-credentials: false
84+
path: target-repo
85+
86+
# Private DevFlow checkout: the PAT/token grants access to this repo's code.
87+
- name: Checkout DevFlow
88+
uses: actions/checkout@v5
89+
with:
90+
repository: ${{ env.DEVFLOW_REPOSITORY }}
91+
ref: ${{ env.DEVFLOW_REF }}
92+
token: ${{ secrets.DEVFLOW_TOKEN }}
93+
fetch-depth: 1
94+
persist-credentials: false
95+
path: devflow
96+
97+
- name: Set up Python
98+
uses: actions/setup-python@v5
99+
with:
100+
python-version: "3.13"
101+
102+
- name: Set up uv
103+
uses: astral-sh/setup-uv@v6
104+
with:
105+
version: "0.5.x"
106+
enable-cache: true
107+
108+
- name: Install DevFlow dependencies
109+
working-directory: ${{ env.DEVFLOW_PATH }}
110+
run: uv sync --frozen
111+
112+
- name: Classify PR relevance
113+
id: spam
114+
working-directory: ${{ env.DEVFLOW_PATH }}
115+
env:
116+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
117+
GH_COPILOT_TOKEN: ${{ secrets.GH_COPILOT_TOKEN }}
118+
SK_REPO_PATH: ${{ env.TARGET_REPO_PATH }}
119+
AGENT_REPO_PATH: ${{ env.TARGET_REPO_PATH }}
120+
PR_REPO: ${{ steps.pr.outputs.repo }}
121+
PR_NUMBER: ${{ steps.pr.outputs.pr_number }}
122+
run: |
123+
uv run python scripts/classify_pr_spam.py \
124+
--repo "$PR_REPO" \
125+
--pr-number "$PR_NUMBER" \
126+
--repo-path "${TARGET_REPO_PATH}" \
127+
--apply-labels
128+
129+
- name: Stop after spam gate
130+
if: ${{ steps.spam.outputs.decision != 'allow' }}
131+
shell: bash
132+
env:
133+
SPAM_DECISION: ${{ steps.spam.outputs.decision }}
134+
run: |
135+
echo "Skipping review because spam gate decided: ${SPAM_DECISION}"
136+
137+
- name: Run PR review
138+
if: ${{ steps.spam.outputs.decision == 'allow' }}
139+
id: review
140+
working-directory: ${{ env.DEVFLOW_PATH }}
141+
env:
142+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
143+
GH_COPILOT_TOKEN: ${{ secrets.GH_COPILOT_TOKEN }}
144+
SK_REPO_PATH: ${{ env.TARGET_REPO_PATH }}
145+
AGENT_REPO_PATH: ${{ env.TARGET_REPO_PATH }}
146+
PR_URL: ${{ steps.pr.outputs.pr_url }}
147+
run: |
148+
uv run python scripts/trigger_pr_review.py \
149+
--pr-url "$PR_URL" \
150+
--github-username "$GITHUB_ACTOR" \
151+
--no-require-comment-selection

.github/workflows/python-unit-tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
os: [ubuntu-latest, windows-latest, macos-latest]
2222
experimental: [false]
2323
test-suite: ["unit-all-except-dapr", "dapr"]
24+
exclude:
25+
- python-version: "3.10"
26+
os: macos-latest
27+
- python-version: "3.11"
28+
os: macos-latest
2429
include:
2530
- python-version: "3.13"
2631
os: "ubuntu-latest"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Semantic Kernel is a model-agnostic SDK that empowers developers to build, orche
2525
- **Agent Framework**: Build modular AI agents with access to tools/plugins, memory, and planning capabilities
2626
- **Multi-Agent Systems**: Orchestrate complex workflows with collaborating specialist agents
2727
- **Plugin Ecosystem**: Extend with native code functions, prompt templates, OpenAPI specs, or Model Context Protocol (MCP)
28-
- **Vector DB Support**: Seamless integration with [Azure AI Search](https://learn.microsoft.com/en-us/azure/search/search-what-is-azure-search), [Elasticsearch](https://www.elastic.co/), [Chroma](https://docs.trychroma.com/getting-started), and more
28+
- **Vector DB Support**: Seamless integration with [Azure AI Search](https://learn.microsoft.com/en-us/azure/search/search-what-is-azure-search), [Elasticsearch](https://www.elastic.co/), [Chroma](https://docs.trychroma.com/docs/overview/getting-started), and more
2929
- **Multimodal Support**: Process text, vision, and audio inputs
3030
- **Local Deployment**: Run with [Ollama](https://ollama.com/), [LMStudio](https://lmstudio.ai/), or [ONNX](https://onnx.ai/)
3131
- **Process Framework**: Model complex business processes with a structured workflow approach

dotnet/Directory.Packages.props

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
<PackageVersion Include="AWSSDK.SecurityToken" Version="4.0.5.6" />
2323
<PackageVersion Include="Azure.AI.Agents.Persistent" Version="1.1.0" />
2424
<PackageVersion Include="Azure.AI.ContentSafety" Version="1.0.0" />
25-
<PackageVersion Include="Azure.AI.OpenAI" Version="2.8.0-beta.1" />
26-
<PackageVersion Include="Azure.AI.Projects" Version="1.1.0" />
27-
<PackageVersion Include="Azure.Identity" Version="1.17.1" />
25+
<PackageVersion Include="Azure.AI.OpenAI" Version="2.9.0-beta.1" />
26+
<PackageVersion Include="Azure.AI.Projects" Version="2.0.0-beta.2" />
27+
<PackageVersion Include="Azure.Identity" Version="1.19.0" />
2828
<PackageVersion Include="Azure.Monitor.OpenTelemetry.Exporter" Version="1.5.0" />
2929
<PackageVersion Include="Azure.Search.Documents" Version="11.7.0" />
3030
<PackageVersion Include="Community.OData.Linq" Version="2.1.0" />
@@ -92,7 +92,7 @@
9292
<PackageVersion Include="Npgsql" Version="8.0.7" />
9393
<PackageVersion Include="OData2Linq" Version="2.2.0" />
9494
<PackageVersion Include="OllamaSharp" Version="5.4.12" />
95-
<PackageVersion Include="OpenAI" Version="2.8.0" />
95+
<PackageVersion Include="OpenAI" Version="2.9.1" />
9696
<PackageVersion Include="OpenTelemetry.Exporter.Console" Version="1.14.0" />
9797
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.14.0" />
9898
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="1.14.0" />
@@ -102,15 +102,16 @@
102102
<PackageVersion Include="PdfPig" Version="0.1.13" />
103103
<PackageVersion Include="Pinecone.Client" Version="3.1.0" />
104104
<PackageVersion Include="Prompty.Core" Version="0.2.3-beta" />
105+
<PackageVersion Include="Scriban" Version="6.6.0" />
105106
<PackageVersion Include="PuppeteerSharp" Version="20.2.5" />
106107
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="10.0.2" />
107108
<PackageVersion Include="System.IdentityModel.Tokens.Jwt" Version="8.15.0" />
108109
<PackageVersion Include="System.IO.Packaging" Version="10.0.2" />
109110
<PackageVersion Include="System.Linq.AsyncEnumerable" Version="10.0.4" />
110111
<PackageVersion Include="System.Memory.Data" Version="10.0.2" />
111112
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
112-
<PackageVersion Include="System.Numerics.Tensors" Version="10.0.3" />
113-
<PackageVersion Include="System.Text.Json" Version="10.0.3" />
113+
<PackageVersion Include="System.Numerics.Tensors" Version="10.0.4" />
114+
<PackageVersion Include="System.Text.Json" Version="10.0.4" />
114115
<PackageVersion Include="System.ValueTuple" Version="4.6.1" />
115116
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.6.3" />
116117
<PackageVersion Include="A2A" Version="0.3.1-preview" />
@@ -119,10 +120,10 @@
119120
<!-- Tokenizers -->
120121
<PackageVersion Include="Microsoft.ML.Tokenizers" Version="2.0.0" />
121122
<!-- Microsoft.Extensions.* -->
122-
<PackageVersion Include="Microsoft.Extensions.AI" Version="10.3.0" />
123-
<PackageVersion Include="Microsoft.Extensions.AI.Abstractions" Version="10.3.0" />
123+
<PackageVersion Include="Microsoft.Extensions.AI" Version="10.4.0" />
124+
<PackageVersion Include="Microsoft.Extensions.AI.Abstractions" Version="10.4.0" />
124125
<PackageVersion Include="Microsoft.Extensions.AI.AzureAIInference" Version="10.0.0-preview.1.25559.3" />
125-
<PackageVersion Include="Microsoft.Extensions.AI.OpenAI" Version="10.3.0" />
126+
<PackageVersion Include="Microsoft.Extensions.AI.OpenAI" Version="10.4.0" />
126127
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="10.0.2" />
127128
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="10.0.2" />
128129
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.2" />
@@ -131,14 +132,14 @@
131132
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="10.0.2" />
132133
<PackageVersion Include="Microsoft.Extensions.Configuration.UserSecrets" Version="10.0.2" />
133134
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.2" />
134-
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.3" />
135+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.4" />
135136
<PackageVersion Include="Microsoft.Extensions.Diagnostics.Testing" Version="10.0.2" />
136137
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="10.0.2" />
137138
<PackageVersion Include="Microsoft.Extensions.Http" Version="10.0.2" />
138139
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="10.2.0" />
139140
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery" Version="10.2.0" />
140141
<PackageVersion Include="Microsoft.Extensions.Logging" Version="10.0.2" />
141-
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.3" />
142+
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.4" />
142143
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="10.0.2" />
143144
<PackageVersion Include="Microsoft.Extensions.Logging.Debug" Version="10.0.2" />
144145
<PackageVersion Include="Microsoft.Extensions.Options.DataAnnotations" Version="10.0.2" />
@@ -151,7 +152,7 @@
151152
<PackageVersion Include="Moq" Version="[4.18.4]" />
152153
<PackageVersion Include="FluentAssertions" Version="8.2.0" />
153154
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
154-
<PackageVersion Include="System.Threading.Channels" Version="10.0.3" />
155+
<PackageVersion Include="System.Threading.Channels" Version="10.0.4" />
155156
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="10.0.2" />
156157
<PackageVersion Include="xunit" Version="2.9.3" />
157158
<PackageVersion Include="xunit.abstractions" Version="2.0.3" />

dotnet/nuget/nuget-package.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project>
22
<PropertyGroup>
33
<!-- Central version prefix - applies to all nuget packages. -->
4-
<VersionPrefix>1.73.0</VersionPrefix>
4+
<VersionPrefix>1.74.0</VersionPrefix>
55
<PackageVersion Condition="'$(VersionSuffix)' != ''">$(VersionPrefix)-$(VersionSuffix)</PackageVersion>
66
<PackageVersion Condition="'$(VersionSuffix)' == ''">$(VersionPrefix)</PackageVersion>
77

88
<Configurations>Debug;Release;Publish</Configurations>
99
<IsPackable>true</IsPackable>
1010

1111
<!-- Package validation. Baseline Version should be the latest version available on NuGet. -->
12-
<PackageValidationBaselineVersion>1.72.0</PackageValidationBaselineVersion>
12+
<PackageValidationBaselineVersion>1.73.0</PackageValidationBaselineVersion>
1313
<!-- Validate assembly attributes only for Publish builds -->
1414
<NoWarn Condition="'$(Configuration)' != 'Publish'">$(NoWarn);CP0003</NoWarn>
1515
<!-- Do not validate reference assemblies -->

dotnet/samples/AgentFrameworkMigration/AzureOpenAIResponses/Step01_Basics/Program.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Azure.AI.OpenAI;
44
using Azure.Identity;
55
using Microsoft.Agents.AI;
6+
using Microsoft.Extensions.AI;
67
using Microsoft.SemanticKernel.Agents.OpenAI;
78
using OpenAI;
89

@@ -24,8 +25,8 @@ async Task SKAgentAsync()
2425
Console.WriteLine("\n=== SK Agent ===\n");
2526

2627
var responseClient = new AzureOpenAIClient(new Uri(endpoint), new AzureCliCredential())
27-
.GetResponsesClient(deploymentName);
28-
OpenAIResponseAgent agent = new(responseClient)
28+
.GetResponsesClient();
29+
OpenAIResponseAgent agent = new(responseClient, deploymentName)
2930
{
3031
Name = "Joker",
3132
Instructions = "You are good at telling jokes.",
@@ -54,9 +55,9 @@ async Task SKAgent_As_AFAgentAsync()
5455
Console.WriteLine("\n=== SK Agent Converted as an AF Agent ===\n");
5556

5657
var responseClient = new AzureOpenAIClient(new Uri(endpoint), new AzureCliCredential())
57-
.GetResponsesClient(deploymentName);
58+
.GetResponsesClient();
5859

59-
OpenAIResponseAgent skAgent = new(responseClient)
60+
OpenAIResponseAgent skAgent = new(responseClient, deploymentName)
6061
{
6162
Name = "Joker",
6263
Instructions = "You are good at telling jokes.",
@@ -83,7 +84,7 @@ async Task AFAgentAsync()
8384
Console.WriteLine("\n=== AF Agent ===\n");
8485

8586
var agent = new AzureOpenAIClient(new Uri(endpoint), new AzureCliCredential())
86-
.GetResponsesClient(deploymentName)
87+
.GetResponsesClient().AsIChatClient(deploymentName)
8788
.CreateAIAgent(name: "Joker", instructions: "You are good at telling jokes.");
8889

8990
var thread = agent.GetNewThread();

dotnet/samples/AgentFrameworkMigration/AzureOpenAIResponses/Step02_ReasoningModel/Program.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ async Task SKAgentAsync()
5151
Console.WriteLine("\n=== SK Agent ===\n");
5252

5353
var responseClient = new AzureOpenAIClient(new Uri(endpoint), new AzureCliCredential())
54-
.GetResponsesClient(deploymentName);
55-
OpenAIResponseAgent agent = new(responseClient)
54+
.GetResponsesClient();
55+
OpenAIResponseAgent agent = new(responseClient, deploymentName)
5656
{
5757
Name = "Thinker",
5858
Instructions = "You are good at thinking hard before answering.",
@@ -119,11 +119,11 @@ async Task SKAgent_As_AFAgentAsync()
119119
Console.WriteLine("\n=== SK Agent Converted as an AF Agent ===\n");
120120

121121
var responseClient = new AzureOpenAIClient(new Uri(endpoint), new AzureCliCredential())
122-
.GetResponsesClient(deploymentName);
122+
.GetResponsesClient();
123123

124124
#pragma warning disable SKEXP0110 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
125125

126-
OpenAIResponseAgent skAgent = new(responseClient)
126+
OpenAIResponseAgent skAgent = new(responseClient, deploymentName)
127127
{
128128
Name = "Thinker",
129129
Instructions = "You are good at thinking hard before answering.",
@@ -180,7 +180,7 @@ async Task AFAgentAsync()
180180
Console.WriteLine("\n=== AF Agent ===\n");
181181

182182
var agent = new AzureOpenAIClient(new Uri(endpoint), new AzureCliCredential())
183-
.GetResponsesClient(deploymentName)
183+
.GetResponsesClient().AsIChatClient(deploymentName)
184184
.CreateAIAgent(name: "Thinker", instructions: "You are good at thinking hard before answering.");
185185

186186
var thread = agent.GetNewThread();

dotnet/samples/AgentFrameworkMigration/AzureOpenAIResponses/Step03_ToolCall/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static string GetWeather([Description("The location to get the weather for.")] s
2929
async Task SKAgentAsync()
3030
{
3131
OpenAIResponseAgent agent = new(new AzureOpenAIClient(new Uri(endpoint), new AzureCliCredential())
32-
.GetResponsesClient(deploymentName))
32+
.GetResponsesClient(), deploymentName)
3333
{ StoreEnabled = true };
3434

3535
// Initialize plugin and add to the agent's Kernel (same as direct Kernel usage).
@@ -49,7 +49,7 @@ async Task SKAgentAsync()
4949
async Task SKAgent_As_AFAgentAsync()
5050
{
5151
OpenAIResponseAgent skAgent = new(new AzureOpenAIClient(new Uri(endpoint), new AzureCliCredential())
52-
.GetResponsesClient(deploymentName))
52+
.GetResponsesClient(), deploymentName)
5353
{ StoreEnabled = true };
5454

5555
// Initialize plugin and add to the agent's Kernel (same as direct Kernel usage).
@@ -66,7 +66,7 @@ async Task SKAgent_As_AFAgentAsync()
6666
async Task AFAgentAsync()
6767
{
6868
var agent = new AzureOpenAIClient(new Uri(endpoint), new AzureCliCredential())
69-
.GetResponsesClient(deploymentName)
69+
.GetResponsesClient().AsIChatClient(deploymentName)
7070
.CreateAIAgent(instructions: "You are a helpful assistant", tools: [AIFunctionFactory.Create(GetWeather)]);
7171

7272
Console.WriteLine("\n=== AF Agent Response ===\n");

dotnet/samples/AgentFrameworkMigration/AzureOpenAIResponses/Step04_DependencyInjection/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async Task SKAgentAsync()
2828
var serviceCollection = new ServiceCollection();
2929
serviceCollection.AddTransient<Microsoft.SemanticKernel.Agents.Agent>((sp)
3030
=> new OpenAIResponseAgent(new AzureOpenAIClient(new Uri(endpoint), new AzureCliCredential())
31-
.GetResponsesClient(deploymentName))
31+
.GetResponsesClient(), deploymentName)
3232
{
3333
Name = "Joker",
3434
Instructions = "You are good at telling jokes.",
@@ -49,7 +49,7 @@ async Task SKAgent_As_AFAgentAsync()
4949
var serviceCollection = new ServiceCollection();
5050
serviceCollection.AddTransient<Microsoft.SemanticKernel.Agents.Agent>((sp)
5151
=> new OpenAIResponseAgent(new AzureOpenAIClient(new Uri(endpoint), new AzureCliCredential())
52-
.GetResponsesClient(deploymentName))
52+
.GetResponsesClient(), deploymentName)
5353
{
5454
Name = "Joker",
5555
Instructions = "You are good at telling jokes.",
@@ -71,7 +71,7 @@ async Task AFAgentAsync()
7171

7272
var serviceCollection = new ServiceCollection();
7373
serviceCollection.AddTransient<AIAgent>((sp) => new AzureOpenAIClient(new Uri(endpoint), new AzureCliCredential())
74-
.GetResponsesClient(deploymentName)
74+
.GetResponsesClient().AsIChatClient(deploymentName)
7575
.CreateAIAgent(name: "Joker", instructions: "You are good at telling jokes."));
7676

7777
await using ServiceProvider serviceProvider = serviceCollection.BuildServiceProvider();

0 commit comments

Comments
 (0)