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 @@ -115,7 +115,7 @@ internal async Task<string> GetAnswerFromGPT(string userPrompt)
{
try
{
if (IsCredentialValid && ChatHistory != null && Client != null)
if (IsCredentialValid && Client != null)
{
ChatHistory = string.Empty;
// Add the system message and user message to the options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class ChartViewModel : INotifyPropertyChanged
private bool isLoading;
private ObservableCollection<IAssistItem> messages = new();

private ChartAIService semanticKernalService = new();
private ChartAIService openAIService = new();

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

var response = await semanticKernalService.GetAnswerFromGPT(prompt);
var response = await openAIService.GetAnswerFromGPT(prompt);

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

// Call the method to get the AI response
var response = await semanticKernalService.GetAnswerFromGPT(prompt);
var response = await openAIService.GetAnswerFromGPT(prompt);

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