File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
ChartGeneratorAISample/ChartGenerator Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 ( ) ;
You can’t perform that action at this time.
0 commit comments