Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
BeepBeepBopBop committed Nov 28, 2024
1 parent 07f6be1 commit aaba4b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions LM-Kit-Maestro/ViewModels/ConversationViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ protected override void HandleSubmit()
string prompt = InputText;
OnNewlySubmittedPrompt(prompt);

LMKitService.PromptResult? promptResult = null;
LMKitService.LMKitResult? promptResult = null;

Task.Run(async () =>
{
Expand All @@ -179,7 +179,7 @@ protected override void HandleSubmit()
});
}

private void OnPromptResult(LMKitService.PromptResult? promptResult, Exception? submitPromptException = null)
private void OnPromptResult(LMKitService.LMKitResult? promptResult, Exception? submitPromptException = null)
{
AwaitingResponse = false;

Expand All @@ -205,9 +205,9 @@ private void OnPromptResult(LMKitService.PromptResult? promptResult, Exception?
_pendingResponse!.Status = LatestPromptStatus;
_pendingPrompt!.Status = LatestPromptStatus;

if (promptResult.Status == LMKitTextGenerationStatus.Undefined && promptResult.TextGenerationResult != null)
if (promptResult.Status == LMKitTextGenerationStatus.Undefined && promptResult.Result is TextGenerationResult textGenerationResult)
{
OnTextGenerationSuccess(promptResult.TextGenerationResult);
OnTextGenerationSuccess(textGenerationResult);
}
else
{
Expand Down

0 comments on commit aaba4b0

Please sign in to comment.