Skip to content

Commit 9fa0f95

Browse files
Localized the embedding configuration (#455)
1 parent f10d9a5 commit 9fa0f95

File tree

10 files changed

+772
-166
lines changed

10 files changed

+772
-166
lines changed

app/MindWork AI Studio/Assistants/BiasDay/BiasOfTheDayAssistant.razor.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,7 @@ public partial class BiasOfTheDayAssistant : AssistantBaseCore<SettingsDialogAss
1212

1313
protected override string Title => T("Bias of the Day");
1414

15-
protected override string Description =>
16-
T("""
17-
Learn about a different cognitive bias every day. You can also ask the LLM your questions. The idea behind
18-
"Bias of the Day" is based on work by Buster Benson, John Manoogian III, and Brian Rene Morrissette. Buster
19-
Benson grouped the biases, and the original texts come from Wikipedia. Brian Rene Morrissette condensed them
20-
into a shorter version. Finally, John Manoogian III created the original poster based on Benson's work and
21-
Morrissette's texts. Thorsten Sommer compared all texts for integration into AI Studio with the current Wikipedia
22-
versions, updated them, and added source references. The idea of learning about one bias each day based on John's
23-
poster comes from Drew Nelson.
24-
""");
15+
protected override string Description => T("""Learn about a different cognitive bias every day. You can also ask the LLM your questions. The idea behind "Bias of the Day" is based on work by Buster Benson, John Manoogian III, and Brian Rene Morrissette. Buster Benson grouped the biases, and the original texts come from Wikipedia. Brian Rene Morrissette condensed them into a shorter version. Finally, John Manoogian III created the original poster based on Benson's work and Morrissette's texts. Thorsten Sommer compared all texts for integration into AI Studio with the current Wikipedia versions, updated them, and added source references. The idea of learning about one bias each day based on John's poster comes from Drew Nelson.""");
2516

2617
protected override string SystemPrompt => $"""
2718
You are a friendly, helpful expert on cognitive bias. You studied psychology and

app/MindWork AI Studio/Assistants/I18N/allTexts.lua

Lines changed: 111 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,6 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BIASDAY::BIASOFTHEDAYASSISTANT::T23782841
265265
-- Blog post of Buster Benson:
266266
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BIASDAY::BIASOFTHEDAYASSISTANT::T2524573984"] = "Blog post of Buster Benson:"
267267

268-
-- Learn about a different cognitive bias every day. You can also ask the LLM your questions. The idea behind "Bias of the Day" is based on work by Buster Benson, John Manoogian III, and Brian Rene Morrissette. Buster Benson grouped the biases, and the original texts come from Wikipedia. Brian Rene Morrissette condensed them into a shorter version. Finally, John Manoogian III created the original poster based on Benson's work and Morrissette's texts. Thorsten Sommer compared all texts for integration into AI Studio with the current Wikipedia versions, updated them, and added source references. The idea of learning about one bias each day based on John's poster comes from Drew Nelson.
269-
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BIASDAY::BIASOFTHEDAYASSISTANT::T2698749816"] = "Learn about a different cognitive bias every day. You can also ask the LLM your questions. The idea behind \"Bias of the Day\" is based on work by Buster Benson, John Manoogian III, and Brian Rene Morrissette. Buster Benson grouped the biases, and the original texts come from Wikipedia. Brian Rene Morrissette condensed them into a shorter version. Finally, John Manoogian III created the original poster based on Benson's work and Morrissette's texts. Thorsten Sommer compared all texts for integration into AI Studio with the current Wikipedia versions, updated them, and added source references. The idea of learning about one bias each day based on John's poster comes from Drew Nelson."
270-
271268
-- Wikipedia list of cognitive biases
272269
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BIASDAY::BIASOFTHEDAYASSISTANT::T3097054642"] = "Wikipedia list of cognitive biases"
273270

@@ -277,6 +274,9 @@ UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BIASDAY::BIASOFTHEDAYASSISTANT::T34899469
277274
-- Custom target language
278275
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BIASDAY::BIASOFTHEDAYASSISTANT::T3848935911"] = "Custom target language"
279276

277+
-- Learn about a different cognitive bias every day. You can also ask the LLM your questions. The idea behind "Bias of the Day" is based on work by Buster Benson, John Manoogian III, and Brian Rene Morrissette. Buster Benson grouped the biases, and the original texts come from Wikipedia. Brian Rene Morrissette condensed them into a shorter version. Finally, John Manoogian III created the original poster based on Benson's work and Morrissette's texts. Thorsten Sommer compared all texts for integration into AI Studio with the current Wikipedia versions, updated them, and added source references. The idea of learning about one bias each day based on John's poster comes from Drew Nelson.
278+
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BIASDAY::BIASOFTHEDAYASSISTANT::T3882885376"] = "Learn about a different cognitive bias every day. You can also ask the LLM your questions. The idea behind \"Bias of the Day\" is based on work by Buster Benson, John Manoogian III, and Brian Rene Morrissette. Buster Benson grouped the biases, and the original texts come from Wikipedia. Brian Rene Morrissette condensed them into a shorter version. Finally, John Manoogian III created the original poster based on Benson's work and Morrissette's texts. Thorsten Sommer compared all texts for integration into AI Studio with the current Wikipedia versions, updated them, and added source references. The idea of learning about one bias each day based on John's poster comes from Drew Nelson."
279+
280280
-- Please provide a custom language.
281281
UI_TEXT_CONTENT["AISTUDIO::ASSISTANTS::BIASDAY::BIASOFTHEDAYASSISTANT::T656744944"] = "Please provide a custom language."
282282

@@ -1120,6 +1120,57 @@ UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELCHAT::T492357592"]
11201120
-- When enabled, the latest message is shown after loading a chat. When disabled, the first (oldest) message is shown.
11211121
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELCHAT::T582516016"] = "When enabled, the latest message is shown after loading a chat. When disabled, the first (oldest) message is shown."
11221122

1123+
-- Delete
1124+
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELEMBEDDINGS::T1469573738"] = "Delete"
1125+
1126+
-- Add Embedding
1127+
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELEMBEDDINGS::T1738753945"] = "Add Embedding"
1128+
1129+
-- Are you sure you want to delete the embedding provider '{0}'?
1130+
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELEMBEDDINGS::T1825371968"] = "Are you sure you want to delete the embedding provider '{0}'?"
1131+
1132+
-- Add Embedding Provider
1133+
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELEMBEDDINGS::T190634634"] = "Add Embedding Provider"
1134+
1135+
-- Model
1136+
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELEMBEDDINGS::T2189814010"] = "Model"
1137+
1138+
-- Embeddings are a way to represent words, sentences, entire documents, or even images and videos as digital fingerprints. Just like each person has a unique fingerprint, embedding models create unique digital patterns that capture the meaning and characteristics of the content they analyze. When two things are similar in meaning or content, their digital fingerprints will look very similar. For example, the fingerprints for 'happy' and 'joyful' would be more alike than those for 'happy' and 'sad'.
1139+
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELEMBEDDINGS::T2419962612"] = "Embeddings are a way to represent words, sentences, entire documents, or even images and videos as digital fingerprints. Just like each person has a unique fingerprint, embedding models create unique digital patterns that capture the meaning and characteristics of the content they analyze. When two things are similar in meaning or content, their digital fingerprints will look very similar. For example, the fingerprints for 'happy' and 'joyful' would be more alike than those for 'happy' and 'sad'."
1140+
1141+
-- Name
1142+
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELEMBEDDINGS::T266367750"] = "Name"
1143+
1144+
-- This helps AI Studio understand and compare things in a way that's similar to how humans do. When you're working on something, AI Studio can automatically identify related documents and data by comparing their digital fingerprints. For instance, if you're writing about customer service, AI Studio can instantly find other documents in your data that discuss similar topics or experiences, even if they use different words.
1145+
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELEMBEDDINGS::T3251217940"] = "This helps AI Studio understand and compare things in a way that's similar to how humans do. When you're working on something, AI Studio can automatically identify related documents and data by comparing their digital fingerprints. For instance, if you're writing about customer service, AI Studio can instantly find other documents in your data that discuss similar topics or experiences, even if they use different words."
1146+
1147+
-- Edit
1148+
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELEMBEDDINGS::T3267849393"] = "Edit"
1149+
1150+
-- Configured Embeddings
1151+
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELEMBEDDINGS::T3526613453"] = "Configured Embeddings"
1152+
1153+
-- Actions
1154+
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELEMBEDDINGS::T3865031940"] = "Actions"
1155+
1156+
-- No embeddings configured yet.
1157+
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELEMBEDDINGS::T4068015588"] = "No embeddings configured yet."
1158+
1159+
-- Edit Embedding Provider
1160+
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELEMBEDDINGS::T4264602229"] = "Edit Embedding Provider"
1161+
1162+
-- Delete Embedding Provider
1163+
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELEMBEDDINGS::T511304264"] = "Delete Embedding Provider"
1164+
1165+
-- Open Dashboard
1166+
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELEMBEDDINGS::T78223861"] = "Open Dashboard"
1167+
1168+
-- Provider
1169+
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELEMBEDDINGS::T900237532"] = "Provider"
1170+
1171+
-- Configure Embeddings
1172+
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELEMBEDDINGS::T970042679"] = "Configure Embeddings"
1173+
11231174
-- Edit Profile
11241175
UI_TEXT_CONTENT["AISTUDIO::COMPONENTS::SETTINGS::SETTINGSPANELPROFILES::T1143111468"] = "Edit Profile"
11251176

@@ -1447,6 +1498,60 @@ UI_TEXT_CONTENT["AISTUDIO::DIALOGS::CONFIRMDIALOG::T1642511898"] = "No"
14471498
-- Yes
14481499
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::CONFIRMDIALOG::T3013883440"] = "Yes"
14491500

1501+
-- Failed to store the API key in the operating system. The message was: {0}. Please try again.
1502+
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::EMBEDDINGPROVIDERDIALOG::T1122745046"] = "Failed to store the API key in the operating system. The message was: {0}. Please try again."
1503+
1504+
-- API Key
1505+
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::EMBEDDINGPROVIDERDIALOG::T1324664716"] = "API Key"
1506+
1507+
-- Create account
1508+
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::EMBEDDINGPROVIDERDIALOG::T1356621346"] = "Create account"
1509+
1510+
-- Please enter an embedding model name.
1511+
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::EMBEDDINGPROVIDERDIALOG::T1661085403"] = "Please enter an embedding model name."
1512+
1513+
-- Hostname
1514+
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::EMBEDDINGPROVIDERDIALOG::T1727440780"] = "Hostname"
1515+
1516+
-- Load
1517+
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::EMBEDDINGPROVIDERDIALOG::T1756340745"] = "Load"
1518+
1519+
-- Update
1520+
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::EMBEDDINGPROVIDERDIALOG::T1847791252"] = "Update"
1521+
1522+
-- Failed to load the API key from the operating system. The message was: {0}. You might ignore this message and provide the API key again.
1523+
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::EMBEDDINGPROVIDERDIALOG::T1870831108"] = "Failed to load the API key from the operating system. The message was: {0}. You might ignore this message and provide the API key again."
1524+
1525+
-- Model
1526+
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::EMBEDDINGPROVIDERDIALOG::T2189814010"] = "Model"
1527+
1528+
-- (Optional) API Key
1529+
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::EMBEDDINGPROVIDERDIALOG::T2331453405"] = "(Optional) API Key"
1530+
1531+
-- Currently, we cannot query the embedding models of self-hosted systems. Therefore, enter the model name manually.
1532+
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::EMBEDDINGPROVIDERDIALOG::T2615586687"] = "Currently, we cannot query the embedding models of self-hosted systems. Therefore, enter the model name manually."
1533+
1534+
-- Add
1535+
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::EMBEDDINGPROVIDERDIALOG::T2646845972"] = "Add"
1536+
1537+
-- No models loaded or available.
1538+
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::EMBEDDINGPROVIDERDIALOG::T2810182573"] = "No models loaded or available."
1539+
1540+
-- Instance Name
1541+
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::EMBEDDINGPROVIDERDIALOG::T2842060373"] = "Instance Name"
1542+
1543+
-- Model selection
1544+
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::EMBEDDINGPROVIDERDIALOG::T416738168"] = "Model selection"
1545+
1546+
-- Host
1547+
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::EMBEDDINGPROVIDERDIALOG::T808120719"] = "Host"
1548+
1549+
-- Provider
1550+
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::EMBEDDINGPROVIDERDIALOG::T900237532"] = "Provider"
1551+
1552+
-- Cancel
1553+
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::EMBEDDINGPROVIDERDIALOG::T900713019"] = "Cancel"
1554+
14501555
-- Tell the AI what you want it to do for you. What are your goals or are you trying to achieve? Like having the AI address you informally.
14511556
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::PROFILEDIALOG::T1458195391"] = "Tell the AI what you want it to do for you. What are your goals or are you trying to achieve? Like having the AI address you informally."
14521557

@@ -2962,6 +3067,9 @@ UI_TEXT_CONTENT["AISTUDIO::PROVIDER::LLMPROVIDERSEXTENSIONS::T2897045472"] = "No
29623067
-- Unknown
29633068
UI_TEXT_CONTENT["AISTUDIO::PROVIDER::LLMPROVIDERSEXTENSIONS::T3424652889"] = "Unknown"
29643069

3070+
-- no model selected
3071+
UI_TEXT_CONTENT["AISTUDIO::PROVIDER::MODEL::T2234274832"] = "no model selected"
3072+
29653073
-- Navigation never expands, but there are tooltips
29663074
UI_TEXT_CONTENT["AISTUDIO::SETTINGS::CONFIGURATIONSELECTDATAFACTORY::T1095779033"] = "Navigation never expands, but there are tooltips"
29673075

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

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,17 @@
44

55
@if (PreviewFeatures.PRE_RAG_2024.IsEnabled(this.SettingsManager))
66
{
7-
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.IntegrationInstructions" HeaderText="Configure Embeddings">
7+
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.IntegrationInstructions" HeaderText="@T("Configure Embeddings")">
88
<PreviewPrototype/>
99
<MudText Typo="Typo.h4" Class="mb-3">
10-
Configured Embeddings
10+
@T("Configured Embeddings")
1111
</MudText>
1212
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
13-
Embeddings are a way to represent words, sentences, entire documents, or even images and videos as digital
14-
fingerprints. Just like each person has a unique fingerprint, embedding models create unique digital patterns
15-
that capture the meaning and characteristics of the content they analyze. When two things are similar in meaning
16-
or content, their digital fingerprints will look very similar. For example, the fingerprints for 'happy' and
17-
'joyful' would be more alike than those for 'happy' and 'sad'.
13+
@T("Embeddings are a way to represent words, sentences, entire documents, or even images and videos as digital fingerprints. Just like each person has a unique fingerprint, embedding models create unique digital patterns that capture the meaning and characteristics of the content they analyze. When two things are similar in meaning or content, their digital fingerprints will look very similar. For example, the fingerprints for 'happy' and 'joyful' would be more alike than those for 'happy' and 'sad'.")
1814
</MudJustifiedText>
1915

2016
<MudJustifiedText Typo="Typo.body1" Class="mb-3">
21-
This helps AI Studio understand and compare things in a way that's similar to how humans do. When you're working on
22-
something, AI Studio can automatically identify related documents and data by comparing their digital fingerprints.
23-
For instance, if you're writing about customer service, AI Studio can instantly find other documents in your data that
24-
discuss similar topics or experiences, even if they use different words.
17+
@T("This helps AI Studio understand and compare things in a way that's similar to how humans do. When you're working on something, AI Studio can automatically identify related documents and data by comparing their digital fingerprints. For instance, if you're writing about customer service, AI Studio can instantly find other documents in your data that discuss similar topics or experiences, even if they use different words.")
2518
</MudJustifiedText>
2619
<MudTable Items="@this.SettingsManager.ConfigurationData.EmbeddingProviders" Hover="@true" Class="border-dashed border rounded-lg">
2720
<ColGroup>
@@ -33,10 +26,10 @@
3326
</ColGroup>
3427
<HeaderContent>
3528
<MudTh>#</MudTh>
36-
<MudTh>Name</MudTh>
37-
<MudTh>Provider</MudTh>
38-
<MudTh>Model</MudTh>
39-
<MudTh>Actions</MudTh>
29+
<MudTh>@T("Name")</MudTh>
30+
<MudTh>@T("Provider")</MudTh>
31+
<MudTh>@T("Model")</MudTh>
32+
<MudTh>@T("Actions")</MudTh>
4033
</HeaderContent>
4134
<RowTemplate>
4235
<MudTd>@context.Num</MudTd>
@@ -47,13 +40,13 @@
4740
<MudTd>
4841
<MudStack Row="true" Class="mb-2 mt-2" Wrap="Wrap.Wrap">
4942
<MudButton Variant="Variant.Filled" Color="Color.Info" StartIcon="@Icons.Material.Filled.OpenInBrowser" Href="@context.UsedLLMProvider.GetDashboardURL()" Target="_blank" Disabled="@(!context.UsedLLMProvider.HasDashboard())">
50-
Open Dashboard
43+
@T("Open Dashboard")
5144
</MudButton>
5245
<MudButton Variant="Variant.Filled" Color="Color.Info" StartIcon="@Icons.Material.Filled.Edit" OnClick="() => this.EditEmbeddingProvider(context)">
53-
Edit
46+
@T("Edit")
5447
</MudButton>
5548
<MudButton Variant="Variant.Filled" Color="Color.Error" StartIcon="@Icons.Material.Filled.Delete" OnClick="() => this.DeleteEmbeddingProvider(context)">
56-
Delete
49+
@T("Delete")
5750
</MudButton>
5851
</MudStack>
5952
</MudTd>
@@ -62,11 +55,13 @@
6255

6356
@if (this.SettingsManager.ConfigurationData.EmbeddingProviders.Count == 0)
6457
{
65-
<MudText Typo="Typo.h6" Class="mt-3">No embeddings configured yet.</MudText>
58+
<MudText Typo="Typo.h6" Class="mt-3">
59+
@T("No embeddings configured yet.")
60+
</MudText>
6661
}
6762

6863
<MudButton Variant="Variant.Filled" Color="@Color.Primary" StartIcon="@Icons.Material.Filled.AddRoad" Class="mt-3 mb-6" OnClick="@this.AddEmbeddingProvider">
69-
Add Embedding
64+
@T("Add Embedding")
7065
</MudButton>
7166
</ExpansionPanel>
7267
}

0 commit comments

Comments
 (0)