File tree 2 files changed +4
-4
lines changed
ChartGeneratorAISample/ChartGenerator
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)
115
115
{
116
116
try
117
117
{
118
- if ( IsCredentialValid && ChatHistory != null && Client != null )
118
+ if ( IsCredentialValid && Client != null )
119
119
{
120
120
ChatHistory = string . Empty ;
121
121
// 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
21
21
private bool isLoading ;
22
22
private ObservableCollection < IAssistItem > messages = new ( ) ;
23
23
24
- private ChartAIService semanticKernalService = new ( ) ;
24
+ private ChartAIService openAIService = new ( ) ;
25
25
26
26
public string ? EntryText
27
27
{
@@ -269,7 +269,7 @@ public async Task<string> ProcessUserRequest(string request)
269
269
+ "- Only plain text should be used; no need to specify 'json' above the data."
270
270
+ "- No additional content other than json data should be included!" ;
271
271
272
- var response = await semanticKernalService . GetAnswerFromGPT ( prompt ) ;
272
+ var response = await openAIService . GetAnswerFromGPT ( prompt ) ;
273
273
274
274
return response . ToString ( ) ;
275
275
}
@@ -344,7 +344,7 @@ public async Task<string> GetAIResponse(string query)
344
344
+ "- No additional content other than json data should be included!" ;
345
345
346
346
// Call the method to get the AI response
347
- var response = await semanticKernalService . GetAnswerFromGPT ( prompt ) ;
347
+ var response = await openAIService . GetAnswerFromGPT ( prompt ) ;
348
348
349
349
// Convert the response to a string (assuming the response has a ToString method)
350
350
return response . ToString ( ) ;
You can’t perform that action at this time.
0 commit comments