Skip to content

Commit

Permalink
Merge pull request #285 from n4ze3m/next
Browse files Browse the repository at this point in the history
v1.4.1
  • Loading branch information
n4ze3m authored Jan 5, 2025
2 parents e931f7c + 9674b84 commit d980b8d
Show file tree
Hide file tree
Showing 43 changed files with 588 additions and 121 deletions.
11 changes: 10 additions & 1 deletion src/assets/locale/ar/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,14 @@
"label": "عدد المستندات المسترجعة",
"placeholder": "أدخل عدد المستندات المسترجعة",
"required": "الرجاء إدخال عدد المستندات المسترجعة"
},
"splittingSeparator": {
"label": "الفاصل",
"placeholder": "أدخل الفاصل (مثال: \\n\\n)",
"required": "الرجاء إدخال الفاصل"
},
"splittingStrategy": {
"label": "مقسم النص"
}
},
"prompt": {
Expand All @@ -355,4 +363,5 @@
},
"chromeAiSettings": {
"title": "إعدادات Chrome AI"
}}
}
}
8 changes: 8 additions & 0 deletions src/assets/locale/da/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,14 @@
"label": "Antal Hentede Dokumenter",
"placeholder": "Indtast Number of Retrieved Documents",
"required": "Venligst indtast the number of retrieved documents"
},
"splittingSeparator": {
"label": "Separator",
"placeholder": "Indtast Separator (f.eks. \\n\\n)",
"required": "Indtast venligst en separator"
},
"splittingStrategy": {
"label": "Tekst Splitter"
}
},
"prompt": {
Expand Down
8 changes: 8 additions & 0 deletions src/assets/locale/de/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,14 @@
"label": "Anzahl der abgerufenen Dokumente",
"placeholder": "Anzahl der abgerufenen Dokumente eingeben",
"required": "Bitte geben Sie die Anzahl der abgerufenen Dokumente ein"
},
"splittingSeparator": {
"label": "Separator",
"placeholder": "Separator eingeben (z.B. \\n\\n)",
"required": "Bitte geben Sie einen Separator ein"
},
"splittingStrategy": {
"label": "Text-Splitter"
}
},
"prompt": {
Expand Down
15 changes: 15 additions & 0 deletions src/assets/locale/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,21 @@
"useMMap": {
"label": "useMmap"
},
"tfsZ": {
"label": "TFS-Z",
"placeholder": "e.g. 1.0, 1.1"
},
"numKeep": {
"label": "Num Keep",
"placeholder": "e.g. 256, 512"
},
"numThread": {
"label": "Num Thread",
"placeholder": "e.g. 8, 16"
},
"useMlock": {
"label": "useMlock"
},
"minP": {
"label": "Min P",
"placeholder": "e.g. 0.05"
Expand Down
10 changes: 9 additions & 1 deletion src/assets/locale/en/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
}
},
"braveApi": {
"label": "Brave API Key",
"label": "Brave API Key",
"placeholder": "Enter your Brave API key"
},
"googleDomain": {
Expand Down Expand Up @@ -337,6 +337,14 @@
"label": "Number of Retrieved Documents",
"placeholder": "Enter Number of Retrieved Documents",
"required": "Please enter the number of retrieved documents"
},
"splittingSeparator": {
"label": "Separator",
"placeholder": "Enter Separator (e.g., \\n\\n)",
"required": "Please enter a separator"
},
"splittingStrategy": {
"label": "Text Splitter"
}
},
"prompt": {
Expand Down
8 changes: 8 additions & 0 deletions src/assets/locale/es/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,14 @@
"label": "Número de Documentos Recuperados",
"placeholder": "Ingrese el Número de Documentos Recuperados",
"required": "Por favor, ingrese el número de documentos recuperados"
},
"splittingSeparator": {
"label": "Separador",
"placeholder": "Ingrese el separador (ej., \\n\\n)",
"required": "Por favor, ingrese un separador"
},
"splittingStrategy": {
"label": "Divisor de Texto"
}
},
"prompt": {
Expand Down
8 changes: 8 additions & 0 deletions src/assets/locale/fa/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,14 @@
"label": "تعداد اسناد بازیابی شده",
"placeholder": "تعداد اسناد بازیابی شده را وارد کنید",
"required": "لطفاً تعداد اسناد بازیابی شده را وارد کنید"
},
"splittingSeparator": {
"label": "جداکننده",
"placeholder": "جداکننده را وارد کنید (مثلاً \\n\\n)",
"required": "لطفاً یک جداکننده وارد کنید"
},
"splittingStrategy": {
"label": "تقسیم‌کننده متن"
}
},
"prompt": {
Expand Down
8 changes: 8 additions & 0 deletions src/assets/locale/fr/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,14 @@
"label": "Nombre de documents récupérés",
"placeholder": "Entrez le nombre de documents récupérés",
"required": "Veuillez saisir le nombre de documents récupérés"
},
"splittingSeparator": {
"label": "Séparateur",
"placeholder": "Entrez le séparateur (par exemple, \\n\\n)",
"required": "Veuillez saisir un séparateur"
},
"splittingStrategy": {
"label": "Diviseur de texte"
}
},
"prompt": {
Expand Down
8 changes: 8 additions & 0 deletions src/assets/locale/it/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,14 @@
"label": "Numero di Documenti Recuperati",
"placeholder": "Inserisci il Numero di Documenti Recuperati",
"required": "Inserisci il numero di documenti recuperati"
},
"splittingSeparator": {
"label": "Separatore",
"placeholder": "Inserisci il Separatore (es. \\n\\n)",
"required": "Inserisci un separatore"
},
"splittingStrategy": {
"label": "Divisore di Testo"
}
},
"prompt": {
Expand Down
8 changes: 8 additions & 0 deletions src/assets/locale/ja-JP/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,14 @@
"label": "取得ドキュメント数",
"placeholder": "取得ドキュメント数を入力",
"required": "取得ドキュメント数を入力してください"
},
"splittingSeparator": {
"label": "セパレーター",
"placeholder": "セパレーターを入力(例:\\n\\n)",
"required": "セパレーターを入力してください"
},
"splittingStrategy": {
"label": "テキスト分割方式"
}
},
"prompt": {
Expand Down
8 changes: 8 additions & 0 deletions src/assets/locale/ko/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,14 @@
"label": "검색 문서 수",
"placeholder": "검색 문서 수 입력",
"required": "검색 문서 수를 입력해주세요"
},
"splittingSeparator": {
"label": "구분자",
"placeholder": "구분자 입력 (예: \\n\\n)",
"required": "구분자를 입력해주세요"
},
"splittingStrategy": {
"label": "텍스트 분할기"
}
},
"prompt": {
Expand Down
8 changes: 8 additions & 0 deletions src/assets/locale/ml/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,14 @@
"label": "വീണ്ടെടുത്ത രേഖകളുടെ എണ്ണം",
"placeholder": "വീണ്ടെടുത്ത രേഖകളുടെ എണ്ണം നൽകുക",
"required": "ദയവായി വീണ്ടെടുത്ത രേഖകളുടെ എണ്ണം നൽകുക"
},
"splittingSeparator": {
"label": "വിഭജന ചിഹ്നം",
"placeholder": "വിഭജന ചിഹ്നം നൽകുക (ഉദാ: \\n\\n)",
"required": "ദയവായി ഒരു വിഭജന ചിഹ്നം നൽകുക"
},
"splittingStrategy": {
"label": "ടെക്സ്റ്റ് സ്പ്ലിറ്റർ"
}
},
"prompt": {
Expand Down
8 changes: 8 additions & 0 deletions src/assets/locale/no/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,14 @@
"label": "Antall hentede dokumenter",
"placeholder": "Skriv inn antall hentede dokumenter",
"required": "Vennligst skriv inn antall hentede dokumenter"
},
"splittingSeparator": {
"label": "Separator",
"placeholder": "Skriv inn separator (f.eks. \\n\\n)",
"required": "Vennligst skriv inn en separator"
},
"splittingStrategy": {
"label": "Tekstdeler"
}
},
"prompt": {
Expand Down
8 changes: 8 additions & 0 deletions src/assets/locale/pt-BR/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,14 @@
"label": "Número de Documentos Recuperados",
"placeholder": "Digite o Número de Documentos Recuperados",
"required": "Por favor, insira o número de documentos recuperados"
},
"splittingSeparator": {
"label": "Separador",
"placeholder": "Digite o Separador (ex: \\n\\n)",
"required": "Por favor, insira um separador"
},
"splittingStrategy": {
"label": "Divisor de Texto"
}
},
"prompt": {
Expand Down
8 changes: 8 additions & 0 deletions src/assets/locale/ru/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,14 @@
"label": "Количество извлеченных документов",
"placeholder": "Введите количество извлеченных документов",
"required": "Пожалуйста, введите количество извлеченных документов"
},
"splittingSeparator": {
"label": "Разделитель",
"placeholder": "Введите разделитель (например, \\n\\n)",
"required": "Пожалуйста, введите разделитель"
},
"splittingStrategy": {
"label": "Разделитель текста"
}
},
"prompt": {
Expand Down
8 changes: 8 additions & 0 deletions src/assets/locale/sv/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,14 @@
"label": "Antal hämtade dokument",
"placeholder": "Ange antal hämtade dokument",
"required": "Vänligen ange antal hämtade dokument"
},
"splittingSeparator": {
"label": "Separator",
"placeholder": "Ange separator (t.ex. \\n\\n)",
"required": "Vänligen ange en separator"
},
"splittingStrategy": {
"label": "Textdelare"
}
},
"prompt": {
Expand Down
8 changes: 8 additions & 0 deletions src/assets/locale/uk/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,14 @@
"label": "Кількість отриманих документів",
"placeholder": "Ввести кількість отриманих документів",
"required": "Будь ласка, введіть кількість документів"
},
"splittingSeparator": {
"label": "Роздільник",
"placeholder": "Введіть роздільник (напр., \\n\\n)",
"required": "Будь ласка, введіть роздільник"
},
"splittingStrategy": {
"label": "Розділювач тексту"
}
},
"prompt": {
Expand Down
8 changes: 8 additions & 0 deletions src/assets/locale/zh/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,14 @@
"label": "检索文档数量",
"placeholder": "输入检索文档数量",
"required": "请输入检索文档数量"
},
"splittingSeparator": {
"label": "分隔符",
"placeholder": "输入分隔符(例如:\\n\\n)",
"required": "请输入分隔符"
},
"splittingStrategy": {
"label": "文本分割器"
}
},
"prompt": {
Expand Down
3 changes: 3 additions & 0 deletions src/components/Common/ProviderIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { TogtherMonoIcon } from "../Icons/Togther"
import { OpenRouterIcon } from "../Icons/OpenRouter"
import { LLamaFile } from "../Icons/Llamafile"
import { GeminiIcon } from "../Icons/GeminiIcon"
import { MistarlIcon } from "../Icons/Mistral"

export const ProviderIcons = ({
provider,
Expand Down Expand Up @@ -37,6 +38,8 @@ export const ProviderIcons = ({
return <LLamaFile className={className} />
case "gemini":
return <GeminiIcon className={className} />
case "mistral":
return <MistarlIcon className={className} />
default:
return <OllamaIcon className={className} />
}
Expand Down
42 changes: 39 additions & 3 deletions src/components/Common/Settings/CurrentChatModelSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ import {
Modal,
Skeleton,
Switch,
Button
} from "antd"
import React, { useState, useCallback } from "react"
import React, { useCallback } from "react"
import { useTranslation } from "react-i18next"
import { SaveButton } from "../SaveButton"

Expand Down Expand Up @@ -79,7 +78,11 @@ export const CurrentChatModelSettings = ({
useMMap: cUserSettings.useMMap ?? data.useMMap,
minP: cUserSettings.minP ?? data.minP,
repeatLastN: cUserSettings.repeatLastN ?? data.repeatLastN,
repeatPenalty: cUserSettings.repeatPenalty ?? data.repeatPenalty
repeatPenalty: cUserSettings.repeatPenalty ?? data.repeatPenalty,
useMlock: cUserSettings.useMlock ?? data.useMlock,
tfsZ: cUserSettings.tfsZ ?? data.tfsZ,
numKeep: cUserSettings.numKeep ?? data.numKeep,
numThread: cUserSettings.numThread ?? data.numThread
})
return data
},
Expand Down Expand Up @@ -230,11 +233,44 @@ export const CurrentChatModelSettings = ({
)}
/>
</Form.Item>
<Form.Item
name="tfsZ"
label={t("modelSettings.form.tfsZ.label")}>
<InputNumber
style={{ width: "100%" }}
placeholder={t("modelSettings.form.tfsZ.placeholder")}
/>
</Form.Item>
<Form.Item
name="numKeep"
label={t("modelSettings.form.numKeep.label")}>
<InputNumber
style={{ width: "100%" }}
placeholder={t(
"modelSettings.form.numKeep.placeholder"
)}
/>
</Form.Item>
<Form.Item
name="numThread"
label={t("modelSettings.form.numThread.label")}>
<InputNumber
style={{ width: "100%" }}
placeholder={t(
"modelSettings.form.numThread.placeholder"
)}
/>
</Form.Item>
<Form.Item
name="useMMap"
label={t("modelSettings.form.useMMap.label")}>
<Switch />
</Form.Item>
<Form.Item
name="useMlock"
label={t("modelSettings.form.useMlock.label")}>
<Switch />
</Form.Item>
</React.Fragment>
)
}
Expand Down
Loading

0 comments on commit d980b8d

Please sign in to comment.