Integrated data sources into any chat (#282)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2025-02-15 15:41:12 +01:00
1 parent 954cf44939
commit f4780939fc
70 files changed
+1506 -250

No files matched your search

@@ -121,7 +121,7 @@
@if (this.SettingsManager.ConfigurationData.LLMProviders.ShowProviderConfidence)
{
<ConfidenceInfo Mode="ConfidenceInfoMode.BUTTON" LLMProvider="@this.providerSettings.UsedLLMProvider"/>
<ConfidenceInfo Mode="PopoverTriggerMode.BUTTON" LLMProvider="@this.providerSettings.UsedLLMProvider"/>
}
@if (this.AllowProfiles && this.ShowProfileSelection)
@@ -1,12 +1,12 @@
using AIStudio.Chat;
using AIStudio.Provider;
using AIStudio.Settings;
using AIStudio.Tools.Services;
using Microsoft.AspNetCore.Components;
using MudBlazor.Utilities;
using RustService = AIStudio.Tools.RustService;
using Timer = System.Timers.Timer;
namespace AIStudio.Assistants;
@@ -28,6 +28,9 @@ public abstract partial class AssistantBase : ComponentBase, IMessageBusReceiver
[Inject]
protected RustService RustService { get; init; } = null!;
[Inject]
protected DataSourceService DataSourceService { get; init; } = null!;
[Inject]
protected NavigationManager NavigationManager { get; init; } = null!;
@@ -290,7 +293,7 @@ public abstract partial class AssistantBase : ComponentBase, IMessageBusReceiver
// Use the selected provider to get the AI response.
// By awaiting this line, we wait for the entire
// content to be streamed.
await aiText.CreateFromProviderAsync(this.providerSettings.CreateProvider(this.Logger), this.SettingsManager, this.providerSettings.Model, this.lastUserPrompt, this.chatThread);
await aiText.CreateFromProviderAsync(this.providerSettings.CreateProvider(this.Logger), this.SettingsManager, this.DataSourceService, this.providerSettings.Model, this.lastUserPrompt, this.chatThread);
this.isProcessing = false;
this.StateHasChanged();