Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@

<ItemGroup>
<!--#if (IsOllama)
<PackageReference Include="OllamaSharp" Version="5.0.5" />
<PackageReference Include="OllamaSharp" Version="5.0.7" />
#elif (IsGHModels)
<PackageReference Include="OpenAI" Version="2.1.0" />
<PackageReference Include="OpenAI" Version="2.2.0-beta.1" />
#elif (IsAzureAiFoundry)
<PackageReference Include="Azure.AI.Projects" Version="1.0.0-beta.3" />
<PackageReference Include="Azure.AI.OpenAI" Version="2.1.0" />
<PackageReference Include="Azure.AI.OpenAI" Version="2.2.0-beta.1" />
#else -->
<PackageReference Include="Azure.AI.OpenAI" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.1.0-preview.1.25064.3" />
<PackageReference Include="Azure.AI.OpenAI" Version="2.2.0-beta.1" />
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" Version="9.3.0-preview.1.25114.11" />
<!--#endif -->
<!--#if (UseManagedIdentity) -->
<PackageReference Include="Azure.Identity" Version="1.13.2" />
<!--#endif -->
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.AI" Version="9.1.0-preview.1.25064.3" />
<PackageReference Include="Microsoft.SemanticKernel.Core" Version="1.34.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.2" />
<PackageReference Include="Microsoft.Extensions.AI" Version="9.3.0-preview.1.25114.11" />
<PackageReference Include="Microsoft.SemanticKernel.Core" Version="1.37.0" />
<PackageReference Include="PdfPig" Version="0.1.9" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
<!--#if (UseAzureAISearch)
<PackageReference Include="Azure.Search.Documents" Version="11.6.0" />
<PackageReference Include="Microsoft.SemanticKernel.Connectors.AzureAISearch" Version="1.34.0-preview" />
<PackageReference Include="Microsoft.SemanticKernel.Connectors.AzureAISearch" Version="1.37.0-preview" />
#endif -->
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@
// Display a new response from the IChatClient, streaming responses
// aren't supported because Ollama will not support both streaming and using Tools
currentResponseCancellation = new();
ChatCompletion response = await ChatClient.CompleteAsync(messages, chatOptions, currentResponseCancellation.Token);
var response = await ChatClient.GetResponseAsync(messages, chatOptions, currentResponseCancellation.Token);
currentResponseMessage = response.Message;
ChatMessageItem.NotifyChanged(currentResponseMessage);
#else*@
// Stream and display a new response from the IChatClient
var responseText = new TextContent("");
currentResponseMessage = new ChatMessage(ChatRole.Assistant, [responseText]);
currentResponseCancellation = new();
await foreach (var chunk in ChatClient.CompleteStreamingAsync(messages, chatOptions, currentResponseCancellation.Token))
await foreach (var chunk in ChatClient.GetStreamingResponseAsync(messages, chatOptions, currentResponseCancellation.Token))
{
responseText.Text += chunk.Text;
ChatMessageItem.NotifyChanged(currentResponseMessage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

try
{
var response = await ChatClient.CompleteAsync<string[]>(
var response = await ChatClient.GetResponseAsync<string[]>(
[.. ReduceMessages(messages), new(ChatRole.User, Prompt)],
useNativeJsonSchema: true, cancellationToken: cancellation.Token);
if (!response.TryGetResult(out suggestions))
Expand Down