Skip to content

Commit c0b7016

Browse files
Added the assistant option to select the default app provider (#278)
1 parent 7831519 commit c0b7016

File tree

5 files changed

+7
-2
lines changed

5 files changed

+7
-2
lines changed

app/MindWork AI Studio/Components/ConfigurationProviderSelection.razor.cs

+3
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ protected override async Task OnParametersSetAsync()
4949

5050
private IEnumerable<ConfigurationSelectData<string>> FilteredData()
5151
{
52+
if(this.Component is not Tools.Components.NONE and not Tools.Components.APP_SETTINGS)
53+
yield return new("Use app default", string.Empty);
54+
5255
var minimumLevel = this.SettingsManager.GetMinimumConfidenceLevel(this.Component);
5356
foreach (var providerId in this.Data)
5457
{

app/MindWork AI Studio/Components/Settings/SettingsPanelApp.razor

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@
1919
}
2020
}
2121

22-
<ConfigurationProviderSelection Data="@this.AvailableLLMProvidersFunc()" SelectedValue="@(() => this.SettingsManager.ConfigurationData.App.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.App.PreselectedProvider = selectedValue)" HelpText="@(() => "Would you like to set one provider as the default for the entire app? When you configure a different provider for an assistant, it will always take precedence.")"/>
22+
<ConfigurationProviderSelection Component="Components.APP_SETTINGS" Data="@this.AvailableLLMProvidersFunc()" SelectedValue="@(() => this.SettingsManager.ConfigurationData.App.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.App.PreselectedProvider = selectedValue)" HelpText="@(() => "Would you like to set one provider as the default for the entire app? When you configure a different provider for an assistant, it will always take precedence.")"/>
2323
<ConfigurationSelect OptionDescription="Preselect one of your profiles?" SelectedValue="@(() => this.SettingsManager.ConfigurationData.App.PreselectedProfile)" Data="@ConfigurationSelectDataFactory.GetProfilesData(this.SettingsManager.ConfigurationData.Profiles)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.App.PreselectedProfile = selectedValue)" OptionHelp="Would you like to set one of your profiles as the default for the entire app? When you configure a different profile for an assistant, it will always take precedence."/>
2424
</ExpansionPanel>

app/MindWork AI Studio/Components/Settings/SettingsPanelChat.razor

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<MudPaper Class="pa-3 mb-8 border-dashed border rounded-lg">
1111
<ConfigurationOption OptionDescription="Preselect chat options?" LabelOn="Chat options are preselected" LabelOff="No chat options are preselected" State="@(() => this.SettingsManager.ConfigurationData.Chat.PreselectOptions)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.Chat.PreselectOptions = updatedState)" OptionHelp="When enabled, you can preselect chat options. This is might be useful when you prefer a specific provider."/>
12-
<ConfigurationProviderSelection Data="@this.AvailableLLMProvidersFunc()" Disabled="@(() => !this.SettingsManager.ConfigurationData.Chat.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Chat.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Chat.PreselectedProvider = selectedValue)"/>
12+
<ConfigurationProviderSelection Component="Components.CHAT" Data="@this.AvailableLLMProvidersFunc()" Disabled="@(() => !this.SettingsManager.ConfigurationData.Chat.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Chat.PreselectedProvider)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Chat.PreselectedProvider = selectedValue)"/>
1313
<ConfigurationSelect OptionDescription="Preselect one of your profiles?" Disabled="@(() => !this.SettingsManager.ConfigurationData.Chat.PreselectOptions)" SelectedValue="@(() => this.SettingsManager.ConfigurationData.Chat.PreselectedProfile)" Data="@ConfigurationSelectDataFactory.GetProfilesData(this.SettingsManager.ConfigurationData.Profiles)" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.Chat.PreselectedProfile = selectedValue)" OptionHelp="Would you like to set one of your profiles as the default for chats?"/>
1414
</MudPaper>
1515
</ExpansionPanel>

app/MindWork AI Studio/Tools/Components.cs

+1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ public enum Components
2020
ERI_ASSISTANT,
2121

2222
CHAT,
23+
APP_SETTINGS,
2324
}

app/MindWork AI Studio/wwwroot/changelog/v0.9.28.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# v0.9.28, build 203 (2025-0x-xx xx:xx UTC)
22
- Added an information view to all data sources to the data source configuration page. The data source configuration is a preview feature behind the RAG feature flag.
33
- Added a ERI ((E)xternal (R)etrieval (I)nterface) client for communication with any ERI server.
4+
- Added the option to select the default app provider in the assistant settings under provider selection. Thank you, Peer (`peerschuett`), for reporting the issue.
45
- Added `donework` as financial supporter. Thank you, Dominic!
56
- Added content contributors to the supporter page. We thank Luc (`DevNullx64`) for his build script contribution as well as Kerstin (`KeSah001`) for creating the Wiki pages.
67
- Improved the resource handling when loading models.

0 commit comments

Comments
 (0)