Skip to content

Commit 799a1db

Browse files
authored
Remove if'ed code for ollama (#6205)
1 parent 101a7dd commit 799a1db

File tree

2 files changed

+1
-11
lines changed
  • eng
  • src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData.Web-CSharp/Components/Pages/Chat

2 files changed

+1
-11
lines changed

eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
<AzureSearchDocumentsVersion>11.6.0</AzureSearchDocumentsVersion>
154154
<MicrosoftSemanticKernelConnectorsAzureAISearchVersion>1.37.0-preview</MicrosoftSemanticKernelConnectorsAzureAISearchVersion>
155155
<MicrosoftSemanticKernelCoreVersion>1.37.0</MicrosoftSemanticKernelCoreVersion>
156-
<OllamaSharpVersion>5.1.5</OllamaSharpVersion>
156+
<OllamaSharpVersion>5.1.9</OllamaSharpVersion>
157157
<OpenAIVersion>2.2.0-beta.1</OpenAIVersion>
158158
<PdfPigVersion>0.1.9</PdfPigVersion>
159159
<SystemLinqAsyncVersion>6.0.1</SystemLinqAsyncVersion>

src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData.Web-CSharp/Components/Pages/Chat/Chat.razor

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,6 @@
6262
chatSuggestions?.Clear();
6363
await chatInput!.FocusAsync();
6464

65-
@*#if (IsOllama)
66-
// Display a new response from the IChatClient, streaming responses
67-
// aren't supported because Ollama will not support both streaming and using Tools
68-
currentResponseCancellation = new();
69-
var response = await ChatClient.GetResponseAsync(messages, chatOptions, currentResponseCancellation.Token);
70-
71-
// Store responses in the conversation, and begin getting suggestions
72-
messages.AddMessages(response);
73-
#else*@
7465
// Stream and display a new response from the IChatClient
7566
var responseText = new TextContent("");
7667
currentResponseMessage = new ChatMessage(ChatRole.Assistant, [responseText]);
@@ -85,7 +76,6 @@
8576
// Store the final response in the conversation, and begin getting suggestions
8677
messages.Add(currentResponseMessage!);
8778
currentResponseMessage = null;
88-
@*#endif*@
8979
chatSuggestions?.Update(messages);
9080
}
9181

0 commit comments

Comments
 (0)