"use client"; import { useId } from "react"; import { useTranslation } from "react-i18next"; import Link from "next/link"; import type { useEmbeddingModels } from "@/hooks/useEmbeddingModels"; export default function EmbeddingModelSelector({ catalog, disabled = false, }: { catalog: ReturnType; disabled?: boolean; }) { const { t } = useTranslation(); const id = useId(); const key = (selection: { profile_id: string; model_id: string }) => JSON.stringify([selection.profile_id, selection.model_id]); return (

{t( "This knowledge base keeps using the selected model when the global default changes.", )}

{catalog.error && (

{catalog.error}

)} {!catalog.loading && !catalog.error && catalog.options.length === 0 && ( {t("Configure an embedding model in Settings first.")} )}
); }