Skip to content

Commit d0b8602

Browse files
committed
update on SemanticKernel reference
1 parent dc1c51d commit d0b8602

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ChartGeneratorAISample/ChartGenerator/AIService/ChartsAIService.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ internal async Task<string> GetAnswerFromGPT(string userPrompt)
115115
{
116116
try
117117
{
118-
if (IsCredentialValid && ChatHistory != null && Client != null)
118+
if (IsCredentialValid && Client != null)
119119
{
120120
ChatHistory = string.Empty;
121121
// Add the system message and user message to the options

ChartGeneratorAISample/ChartGenerator/ViewModel/ChartViewModel.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class ChartViewModel : INotifyPropertyChanged
2121
private bool isLoading;
2222
private ObservableCollection<IAssistItem> messages = new();
2323

24-
private ChartAIService semanticKernalService = new();
24+
private ChartAIService openAIService = new();
2525

2626
public string? EntryText
2727
{
@@ -269,7 +269,7 @@ public async Task<string> ProcessUserRequest(string request)
269269
+ "- Only plain text should be used; no need to specify 'json' above the data."
270270
+ "- No additional content other than json data should be included!";
271271

272-
var response = await semanticKernalService.GetAnswerFromGPT(prompt);
272+
var response = await openAIService.GetAnswerFromGPT(prompt);
273273

274274
return response.ToString();
275275
}
@@ -344,7 +344,7 @@ public async Task<string> GetAIResponse(string query)
344344
+ "- No additional content other than json data should be included!";
345345

346346
// Call the method to get the AI response
347-
var response = await semanticKernalService.GetAnswerFromGPT(prompt);
347+
var response = await openAIService.GetAnswerFromGPT(prompt);
348348

349349
// Convert the response to a string (assuming the response has a ToString method)
350350
return response.ToString();

0 commit comments

Comments
 (0)