mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 15:39:46 +00:00
Show progress
This commit is contained in:
parent
ccce64ee66
commit
084ad7b695
@ -37,6 +37,7 @@ public abstract partial class AssistantBase : ComponentBase
|
|||||||
private ChatThread? chatThread;
|
private ChatThread? chatThread;
|
||||||
private ContentBlock? resultingContentBlock;
|
private ContentBlock? resultingContentBlock;
|
||||||
private string[] inputIssues = [];
|
private string[] inputIssues = [];
|
||||||
|
private bool isProcessing;
|
||||||
|
|
||||||
#region Overrides of ComponentBase
|
#region Overrides of ComponentBase
|
||||||
|
|
||||||
@ -116,10 +117,15 @@ public abstract partial class AssistantBase : ComponentBase
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.chatThread?.Blocks.Add(this.resultingContentBlock);
|
this.chatThread?.Blocks.Add(this.resultingContentBlock);
|
||||||
|
this.isProcessing = true;
|
||||||
|
this.StateHasChanged();
|
||||||
|
|
||||||
// Use the selected provider to get the AI response.
|
// Use the selected provider to get the AI response.
|
||||||
// By awaiting this line, we wait for the entire
|
// By awaiting this line, we wait for the entire
|
||||||
// content to be streamed.
|
// content to be streamed.
|
||||||
await aiText.CreateFromProviderAsync(this.providerSettings.CreateProvider(), this.JsRuntime, this.SettingsManager, this.providerSettings.Model, this.chatThread);
|
await aiText.CreateFromProviderAsync(this.providerSettings.CreateProvider(), this.JsRuntime, this.SettingsManager, this.providerSettings.Model, this.chatThread);
|
||||||
|
|
||||||
|
this.isProcessing = false;
|
||||||
|
this.StateHasChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user