This commit is contained in:
parent
2d537a7648
commit
1d23f3270f
|
|
@ -40,7 +40,7 @@ export const ChatSettingsForm: FC<ChatSettingsFormProps> = ({
|
||||||
return (
|
return (
|
||||||
<div className="space-y-3">
|
<div className="space-y-3">
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<Label>Model</Label>
|
<Label>{t("chat.modelLabel")}</Label>
|
||||||
|
|
||||||
<ModelSelect
|
<ModelSelect
|
||||||
selectedModelId={chatSettings.model}
|
selectedModelId={chatSettings.model}
|
||||||
|
|
@ -51,11 +51,11 @@ export const ChatSettingsForm: FC<ChatSettingsFormProps> = ({
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<Label>Prompt</Label>
|
<Label>{t("chat.promptLabel")}</Label>
|
||||||
|
|
||||||
<TextareaAutosize
|
<TextareaAutosize
|
||||||
className="bg-background border-input border-2"
|
className="bg-background border-input border-2"
|
||||||
placeholder="You are a helpful AI assistant."
|
placeholder={t("chat.promptPlaceholder")}
|
||||||
onValueChange={prompt => {
|
onValueChange={prompt => {
|
||||||
onChangeChatSettings({ ...chatSettings, prompt })
|
onChangeChatSettings({ ...chatSettings, prompt })
|
||||||
}}
|
}}
|
||||||
|
|
@ -119,7 +119,7 @@ const AdvancedContent: FC<AdvancedContentProps> = ({
|
||||||
<div className="mt-5">
|
<div className="mt-5">
|
||||||
<div className="space-y-3">
|
<div className="space-y-3">
|
||||||
<Label className="flex items-center space-x-1">
|
<Label className="flex items-center space-x-1">
|
||||||
<div>Temperature:</div>
|
<div>{t("chat.temperatureLabel")}:</div>
|
||||||
|
|
||||||
<div>{chatSettings.temperature}</div>
|
<div>{chatSettings.temperature}</div>
|
||||||
</Label>
|
</Label>
|
||||||
|
|
@ -140,7 +140,7 @@ const AdvancedContent: FC<AdvancedContentProps> = ({
|
||||||
|
|
||||||
<div className="mt-6 space-y-3">
|
<div className="mt-6 space-y-3">
|
||||||
<Label className="flex items-center space-x-1">
|
<Label className="flex items-center space-x-1">
|
||||||
<div>Context Length:</div>
|
<div>{t("chat.contextLengthLabel")}:</div>
|
||||||
|
|
||||||
<div>{chatSettings.contextLength}</div>
|
<div>{chatSettings.contextLength}</div>
|
||||||
</Label>
|
</Label>
|
||||||
|
|
@ -175,14 +175,14 @@ const AdvancedContent: FC<AdvancedContentProps> = ({
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Label>Chats Include Profile Context</Label>
|
<Label>{t("chat.includeProfileContextLabel")}</Label>
|
||||||
|
|
||||||
{showTooltip && (
|
{showTooltip && (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
delayDuration={0}
|
delayDuration={0}
|
||||||
display={
|
display={
|
||||||
<div className="w-[400px] p-3">
|
<div className="w-[400px] p-3">
|
||||||
{profile?.profile_context || "No profile context."}
|
{profile?.profile_context || t("chat.noProfileContext")}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
trigger={
|
trigger={
|
||||||
|
|
@ -203,7 +203,7 @@ const AdvancedContent: FC<AdvancedContentProps> = ({
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Label>Chats Include Workspace Instructions</Label>
|
<Label>{t("chat.includeWorkspaceInstructionsLabel")}</Label>
|
||||||
|
|
||||||
{showTooltip && (
|
{showTooltip && (
|
||||||
<WithTooltip
|
<WithTooltip
|
||||||
|
|
@ -222,7 +222,7 @@ const AdvancedContent: FC<AdvancedContentProps> = ({
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mt-5">
|
<div className="mt-5">
|
||||||
<Label>Embeddings Provider</Label>
|
<Label>{t("chat.embeddingsProviderLabel")}</Label>
|
||||||
|
|
||||||
<Select
|
<Select
|
||||||
value={chatSettings.embeddingsProvider}
|
value={chatSettings.embeddingsProvider}
|
||||||
|
|
@ -239,11 +239,11 @@ const AdvancedContent: FC<AdvancedContentProps> = ({
|
||||||
|
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="openai">
|
<SelectItem value="openai">
|
||||||
{profile?.use_azure_openai ? "Azure OpenAI" : "OpenAI"}
|
{profile?.use_azure_openai ? t("chat.azureOpenAI") : t("chat.openAI")}
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
|
|
||||||
{window.location.hostname === "localhost" && (
|
{window.location.hostname === "localhost" && (
|
||||||
<SelectItem value="local">Local</SelectItem>
|
<SelectItem value="local">{t("chat.local")}</SelectItem>
|
||||||
)}
|
)}
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,19 @@
|
||||||
"defaultChatTitle": "Chat",
|
"defaultChatTitle": "Chat",
|
||||||
"quickSettingsLabel": "Quick Settings",
|
"quickSettingsLabel": "Quick Settings",
|
||||||
"loadingAssistant": "Loading assistant...",
|
"loadingAssistant": "Loading assistant...",
|
||||||
"noItemsFound": "No items found."
|
"noItemsFound": "No items found.",
|
||||||
|
"modelLabel": "Model",
|
||||||
|
"promptLabel": "Prompt",
|
||||||
|
"temperatureLabel": "Temperature",
|
||||||
|
"contextLengthLabel": "Context Length",
|
||||||
|
"includeProfileContextLabel": "Chats Include Profile Context",
|
||||||
|
"noProfileContext": "No profile context.",
|
||||||
|
"includeWorkspaceInstructionsLabel": "Chats Include Workspace Instructions",
|
||||||
|
"noWorkspaceInstructions": "No workspace instructions.",
|
||||||
|
"embeddingsProviderLabel": "Embeddings Provider",
|
||||||
|
"azureOpenAI": "Azure OpenAI",
|
||||||
|
"openAI": "OpenAI",
|
||||||
|
"local": "Local"
|
||||||
},
|
},
|
||||||
|
|
||||||
"profile": {
|
"profile": {
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,19 @@
|
||||||
"defaultChatTitle": "会話",
|
"defaultChatTitle": "会話",
|
||||||
"quickSettingsLabel": "クイック設定",
|
"quickSettingsLabel": "クイック設定",
|
||||||
"loadingAssistant": "アシスタントを読み込み中...",
|
"loadingAssistant": "アシスタントを読み込み中...",
|
||||||
"noItemsFound": "アイテムが見つかりません"
|
"noItemsFound": "アイテムが見つかりません",
|
||||||
|
"modelLabel": "モデル",
|
||||||
|
"promptLabel": "プロンプト",
|
||||||
|
"temperatureLabel": "温度",
|
||||||
|
"contextLengthLabel": "コンテキスト長",
|
||||||
|
"includeProfileContextLabel": "チャットにプロフィールコンテキストを含める",
|
||||||
|
"noProfileContext": "プロフィールコンテキストはありません。",
|
||||||
|
"includeWorkspaceInstructionsLabel": "チャットにワークスペース指示を含める",
|
||||||
|
"noWorkspaceInstructions": "ワークスペース指示はありません。",
|
||||||
|
"embeddingsProviderLabel": "埋め込み提供者",
|
||||||
|
"azureOpenAI": "Azure OpenAI",
|
||||||
|
"openAI": "OpenAI",
|
||||||
|
"local": "ローカル"
|
||||||
},
|
},
|
||||||
|
|
||||||
"profile": {
|
"profile": {
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,19 @@
|
||||||
"defaultChatTitle": "对话",
|
"defaultChatTitle": "对话",
|
||||||
"quickSettingsLabel": "快速设置",
|
"quickSettingsLabel": "快速设置",
|
||||||
"loadingAssistant": "正在加载助手...",
|
"loadingAssistant": "正在加载助手...",
|
||||||
"noItemsFound": "未找到任何项目"
|
"noItemsFound": "未找到任何项目",
|
||||||
|
"modelLabel": "模型",
|
||||||
|
"promptLabel": "提示词",
|
||||||
|
"temperatureLabel": "温度",
|
||||||
|
"contextLengthLabel": "上下文长度",
|
||||||
|
"includeProfileContextLabel": "聊天包含个人资料上下文",
|
||||||
|
"noProfileContext": "没有个人资料上下文。",
|
||||||
|
"includeWorkspaceInstructionsLabel": "聊天包含工作区指令",
|
||||||
|
"noWorkspaceInstructions": "没有工作区指令。",
|
||||||
|
"embeddingsProviderLabel": "嵌入提供者",
|
||||||
|
"azureOpenAI": "Azure OpenAI",
|
||||||
|
"openAI": "OpenAI",
|
||||||
|
"local": "本地"
|
||||||
},
|
},
|
||||||
|
|
||||||
"profile": {
|
"profile": {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue