feat: Display model name in knowledge settings

Shorten the displayed embedding model names in the knowledge settings by removing the "embedding" suffix. This improves readability and makes the table more concise.
This commit is contained in:
n4ze3m 2024-10-13 19:10:42 +05:30
parent d64c84fc83
commit 0ea69afd5c

View File

@ -7,6 +7,7 @@ import { Skeleton, Table, Tag, Tooltip, message } from "antd"
import { Trash2 } from "lucide-react" import { Trash2 } from "lucide-react"
import { KnowledgeIcon } from "./KnowledgeIcon" import { KnowledgeIcon } from "./KnowledgeIcon"
import { useMessageOption } from "@/hooks/useMessageOption" import { useMessageOption } from "@/hooks/useMessageOption"
import { removeModelSuffix } from "@/db/models"
export const KnowledgeSettings = () => { export const KnowledgeSettings = () => {
const { t } = useTranslation(["knowledge", "common"]) const { t } = useTranslation(["knowledge", "common"])
@ -78,7 +79,8 @@ export const KnowledgeSettings = () => {
{ {
title: t("columns.embeddings"), title: t("columns.embeddings"),
dataIndex: "embedding_model", dataIndex: "embedding_model",
key: "embedding_model" key: "embedding_model",
render: (text) => removeModelSuffix(text)
}, },
{ {
title: t("columns.createdAt"), title: t("columns.createdAt"),