feat: Add Ollama and Llamafile to dynamic model fetching

Expanded the list of providers for which models are fetched dynamically to include Ollama and Llamafile, removing the need for manual model addition in the user interface for these providers. This simplifies the user experience and ensures users always have access to the latest models without manual intervention.
This commit is contained in:
n4ze3m 2024-11-10 15:38:03 +05:30
parent a7f461da0b
commit 2409ebc75d
14 changed files with 18 additions and 16 deletions

View File

@ -42,7 +42,7 @@
"delete": "Slet",
"edit": "Rediger",
"newModel": "Tilføj Modeller til Udbyder",
"noNewModel": "For LMStudio henter vi dynamisk. Ingen manuel tilføjelse nødvendig.",
"noNewModel": "For LMStudio, Ollama, Llamafile, henter vi dynamisk. Ingen manuel tilføjelse nødvendig.",
"searchModel": "Søg Model",
"selectAll": "Vælg Alle",
"save": "Gem",

View File

@ -42,7 +42,7 @@
"delete": "Löschen",
"edit": "Bearbeiten",
"newModel": "Modelle zum Anbieter hinzufügen",
"noNewModel": "Für LMStudio holen wir die Daten dynamisch. Keine manuelle Hinzufügung erforderlich.",
"noNewModel": "Für LMStudio, Ollama, Llamafile, holen wir die Daten dynamisch. Keine manuelle Hinzufügung erforderlich.",
"searchModel": "Modell suchen",
"selectAll": "Alle auswählen",
"save": "Speichern",

View File

@ -42,7 +42,7 @@
"delete": "Delete",
"edit": "Edit",
"newModel": "Add Models to Provider",
"noNewModel": "For LMStudio, we fetch dynamically. No manual addition needed.",
"noNewModel": "For LMStudio, Ollama, Llamafile, we fetch dynamically. No manual addition needed.",
"searchModel": "Search Model",
"selectAll": "Select All",
"save": "Save",

View File

@ -42,7 +42,7 @@
"delete": "Eliminar",
"edit": "Editar",
"newModel": "Añadir Modelos al Proveedor",
"noNewModel": "Para LMStudio, obtenemos dinámicamente. No se necesita adición manual.",
"noNewModel": "Para LMStudio, Ollama, Llamafile, obtenemos dinámicamente. No se necesita adición manual.",
"searchModel": "Buscar Modelo",
"selectAll": "Seleccionar Todo",
"save": "Guardar",

View File

@ -42,7 +42,7 @@
"delete": "حذف",
"edit": "ویرایش",
"newModel": "افزودن مدل‌ها به ارائه‌دهنده",
"noNewModel": "برای LMStudio، ما به صورت پویا دریافت می‌کنیم. نیازی به افزودن دستی نیست.",
"noNewModel": "برای LMStudio, Ollama, Llamafile, ما به صورت پویا دریافت می‌کنیم. نیازی به افزودن دستی نیست.",
"searchModel": "جستجوی مدل",
"selectAll": "انتخاب همه",
"save": "ذخیره",

View File

@ -42,7 +42,7 @@
"delete": "Supprimer",
"edit": "Modifier",
"newModel": "Ajouter des modèles au fournisseur",
"noNewModel": "Pour LMStudio, nous récupérons dynamiquement. Pas besoin d'ajout manuel.",
"noNewModel": "Pour LMStudio, Ollama, Llamafile, nous récupérons dynamiquement. Pas besoin d'ajout manuel.",
"searchModel": "Rechercher un modèle",
"selectAll": "Tout sélectionner",
"save": "Enregistrer",

View File

@ -42,7 +42,7 @@
"delete": "Elimina",
"edit": "Modifica",
"newModel": "Aggiungi Modelli al Provider",
"noNewModel": "Per LMStudio, recuperiamo dinamicamente. Non è necessaria l'aggiunta manuale.",
"noNewModel": "Per LMStudio, Ollama, Llamafile, recuperiamo dinamicamente. Non è necessaria l'aggiunta manuale.",
"searchModel": "Cerca Modello",
"selectAll": "Seleziona Tutto",
"save": "Salva",

View File

@ -42,7 +42,7 @@
"delete": "削除",
"edit": "編集",
"newModel": "プロバイダーにモデルを追加",
"noNewModel": "LMStudioの場合、動的に取得します。手動での追加は不要です。",
"noNewModel": "LMStudio, Ollama, Llamafile,の場合、動的に取得します。手動での追加は不要です。",
"searchModel": "モデルを検索",
"selectAll": "すべて選択",
"save": "保存",

View File

@ -42,7 +42,7 @@
"delete": "삭제",
"edit": "편집",
"newModel": "공급자에 모델 추가",
"noNewModel": "LMStudio의 경우 동적으로 가져옵니다. 수동 추가는 필요하지 않습니다.",
"noNewModel": "LMStudio, Ollama, Llamafile,의 경우 동적으로 가져옵니다. 수동 추가는 필요하지 않습니다.",
"searchModel": "모델 검색",
"selectAll": "모두 선택",
"save": "저장",

View File

@ -42,7 +42,7 @@
"delete": "ഇല്ലാതാക്കുക",
"edit": "തിരുത്തുക",
"newModel": "ദാതാവിലേക്ക് മോഡലുകൾ ചേർക്കുക",
"noNewModel": "LMStudio-യ്ക്കായി, ഞങ്ങൾ ഡൈനാമിക്കായി ലഭ്യമാക്കുന്നു. മാനുവലായി ചേർക്കേണ്ടതില്ല.",
"noNewModel": "LMStudio, Ollama, Llamafile-യ്ക്കായി, ഞങ്ങൾ ഡൈനാമിക്കായി ലഭ്യമാക്കുന്നു. മാനുവലായി ചേർക്കേണ്ടതില്ല.",
"searchModel": "മോഡൽ തിരയുക",
"selectAll": "എല്ലാം തിരഞ്ഞെടുക്കുക",
"save": "സംരക്ഷിക്കുക",

View File

@ -42,7 +42,7 @@
"delete": "Slett",
"edit": "Rediger",
"newModel": "Legg til modeller for leverandør",
"noNewModel": "For LMStudio henter vi dynamisk. Ingen manuell tillegging nødvendig.",
"noNewModel": "For LMStudio, Ollama, Llamafile, henter vi dynamisk. Ingen manuell tillegging nødvendig.",
"searchModel": "Søk etter modell",
"selectAll": "Velg alle",
"save": "Lagre",

View File

@ -42,7 +42,7 @@
"delete": "Удалить",
"edit": "Редактировать",
"newModel": "Добавить модели к провайдеру",
"noNewModel": "Для LMStudio мы загружаем динамически. Ручное добавление не требуется.",
"noNewModel": "Для LMStudio, Ollama, Llamafile, мы загружаем динамически. Ручное добавление не требуется.",
"searchModel": "Поиск модели",
"selectAll": "Выбрать все",
"save": "Сохранить",

View File

@ -42,7 +42,7 @@
"delete": "删除",
"edit": "编辑",
"newModel": "向提供商添加模型",
"noNewModel": "对于 LMStudio,我们动态获取。无需手动添加。",
"noNewModel": "对于 LMStudio, Ollama, Llamafile,我们动态获取。无需手动添加。",
"searchModel": "搜索模型",
"selectAll": "全选",
"save": "保存",

View File

@ -23,6 +23,7 @@ import {
} from "lucide-react"
import { OpenAIFetchModel } from "./openai-fetch-model"
import { OAI_API_PROVIDERS } from "@/utils/oai-api-providers"
const noPopupProvider = ["lmstudio", "llamafile", "ollama2"]
export const OpenAIApp = () => {
const { t } = useTranslation("openai")
@ -47,7 +48,6 @@ export const OpenAIApp = () => {
})
setOpen(false)
message.success(t("addSuccess"))
const noPopupProvider = ["lmstudio", "llamafile", "ollama2"]
if (!noPopupProvider.includes(provider)) {
setOpenaiId(data)
setOpenModelModal(true)
@ -158,7 +158,7 @@ export const OpenAIApp = () => {
<Tooltip
title={
record.provider !== "lmstudio"
!noPopupProvider.includes(record.provider)
? t("newModel")
: t("noNewModel")
}>
@ -168,7 +168,9 @@ export const OpenAIApp = () => {
setOpenModelModal(true)
setOpenaiId(record.id)
}}
disabled={!record.id || record.provider === "lmstudio"}>
disabled={
!record.id || noPopupProvider.includes(record.provider)
}>
<DownloadIcon className="size-4" />
</button>
</Tooltip>