Skip to content

Commit 1fac792

Browse files
Bump the dotnet group in /docs/ai/quickstarts/snippets/function-calling/openai with 4 updates (#45307)
* Bump the dotnet group Bumps the dotnet group in /docs/ai/quickstarts/snippets/function-calling/openai with 4 updates: [Microsoft.Extensions.AI](https://github.com/dotnet/extensions), [Microsoft.Extensions.AI.OpenAI](https://github.com/dotnet/extensions), [Microsoft.Extensions.Configuration](https://github.com/dotnet/runtime) and [Microsoft.Extensions.Configuration.UserSecrets](https://github.com/dotnet/runtime). Updates `Microsoft.Extensions.AI` from 9.3.0-preview.1.25114.11 to 9.3.0-preview.1.25161.3 - [Release notes](https://github.com/dotnet/extensions/releases) - [Commits](https://github.com/dotnet/extensions/commits) Updates `Microsoft.Extensions.AI.OpenAI` from 9.3.0-preview.1.25114.11 to 9.3.0-preview.1.25161.3 - [Release notes](https://github.com/dotnet/extensions/releases) - [Commits](https://github.com/dotnet/extensions/commits) Updates `Microsoft.Extensions.Configuration` from 9.0.2 to 9.0.3 - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](dotnet/runtime@v9.0.2...v9.0.3) Updates `Microsoft.Extensions.Configuration` from 9.0.2 to 9.0.3 - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](dotnet/runtime@v9.0.2...v9.0.3) Updates `Microsoft.Extensions.Configuration.UserSecrets` from 9.0.2 to 9.0.3 - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](dotnet/runtime@v9.0.2...v9.0.3) --- updated-dependencies: - dependency-name: Microsoft.Extensions.AI dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet - dependency-name: Microsoft.Extensions.AI.OpenAI dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet - dependency-name: Microsoft.Extensions.Configuration dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet - dependency-name: Microsoft.Extensions.Configuration dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet - dependency-name: Microsoft.Extensions.Configuration.UserSecrets dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dotnet ... Signed-off-by: dependabot[bot] <[email protected]> * fix build errors --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Genevieve Warren <[email protected]>
1 parent af980f6 commit 1fac792

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

docs/ai/quickstarts/snippets/function-calling/openai/FunctionCallingAI.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.Extensions.AI" Version="9.3.0-preview.1.25114.11" />
12-
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.3.0-preview.1.25114.11" />
13-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.2" />
14-
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.2" />
11+
<PackageReference Include="Microsoft.Extensions.AI" Version="9.3.0-preview.1.25161.3" />
12+
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.3.0-preview.1.25161.3" />
13+
<PackageReference Include="Microsoft.Extensions.Configuration" Version="10.0.0-preview.1.25080.5" />
14+
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="10.0.0-preview.1.25080.5" />
1515
</ItemGroup>
1616

1717
</Project>

docs/ai/quickstarts/snippets/function-calling/openai/Program.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
{
1818
Tools = [AIFunctionFactory.Create((string location, string unit) =>
1919
{
20-
// Here you would call a weather API to get the weather for the location
20+
// Here you would call a weather API
21+
// to get the weather for the location.
2122
return "Periods of rain or drizzle, 15 C";
2223
},
2324
"get_current_weather",
@@ -31,9 +32,8 @@ You are a hiking enthusiast who helps people discover fun hikes in their area. Y
3132

3233
// Weather conversation relevant to the registered function.
3334
chatHistory.Add(new ChatMessage(ChatRole.User,
34-
"I live in Montreal and I'm looking for a moderate intensity hike. What's the current weather like? "));
35+
"I live in Montreal and I'm looking for a moderate intensity hike. What's the current weather like?"));
3536
Console.WriteLine($"{chatHistory.Last().Role} >>> {chatHistory.Last()}");
3637

3738
ChatResponse response = await client.GetResponseAsync(chatHistory, chatOptions);
38-
chatHistory.Add(new ChatMessage(ChatRole.Assistant, response.Message.Contents));
39-
Console.WriteLine($"{chatHistory.Last().Role} >>> {chatHistory.Last()}");
39+
Console.WriteLine($"Assistant >>> {response.Text}");

docs/ai/quickstarts/use-function-calling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ The app uses the [`Microsoft.Extensions.AI`](https://www.nuget.org/packages/Micr
138138
dotnet run
139139
```
140140
141-
The app prints a the completion response from the AI model that includes data provided by the .NET function. The AI model understood the registered function was available and called it automatically to generate a proper response.
141+
The app prints the completion response from the AI model that includes data provided by the .NET function. The AI model understood the registered function was available and called it automatically to generate a proper response.
142142
143143
:::zone target="docs" pivot="azure-openai"
144144

0 commit comments

Comments
 (0)