diff --git a/backend/modules/brain/repository/composite_brains_connections.py b/backend/modules/brain/repository/composite_brains_connections.py index edb42ffa365f..70b035b012ed 100644 --- a/backend/modules/brain/repository/composite_brains_connections.py +++ b/backend/modules/brain/repository/composite_brains_connections.py @@ -21,8 +21,8 @@ def connect_brain( self.db.table("composite_brain_connections") .insert( { - "composite_brain_id": str(composite_brain_id), - "connected_brain_id": str(connected_brain_id), + "composite_brain_id": composite_brain_id, + "connected_brain_id": connected_brain_id, } ) .execute() diff --git a/frontend/lib/components/AddBrainModal/components/AddBrainSteps/components/BrainKnowledgeStep/hooks/useBrainKnowledgeStep.ts b/frontend/lib/components/AddBrainModal/components/AddBrainSteps/components/BrainKnowledgeStep/hooks/useBrainKnowledgeStep.ts index f2ceee365d96..be2418cdec0a 100644 --- a/frontend/lib/components/AddBrainModal/components/AddBrainSteps/components/BrainKnowledgeStep/hooks/useBrainKnowledgeStep.ts +++ b/frontend/lib/components/AddBrainModal/components/AddBrainSteps/components/BrainKnowledgeStep/hooks/useBrainKnowledgeStep.ts @@ -9,12 +9,12 @@ export const useBrainKnowledgeStep = () => { const url = watch("brain_definition.url"); const compositeBrainConnections = watch("connected_brains_ids") ?? []; const isApiBrain = brainType === "api"; - const isChatflowBrain = brainType === "composite"; + const isCompositeBrain = brainType === "composite"; const isApiBrainDefinitionsFilled = url !== ""; const isSubmitButtonDisabled = - (isChatflowBrain && compositeBrainConnections.length === 0) || + (isCompositeBrain && compositeBrainConnections.length === 0) || (isApiBrain && !isApiBrainDefinitionsFilled); return { diff --git a/frontend/lib/components/AddBrainModal/components/AddBrainSteps/components/BrainTypeSelectionStep/hooks/useKnowledgeSourceLabel.ts b/frontend/lib/components/AddBrainModal/components/AddBrainSteps/components/BrainTypeSelectionStep/hooks/useKnowledgeSourceLabel.ts index 6e3a6691d7d8..6ece3dcf55e6 100644 --- a/frontend/lib/components/AddBrainModal/components/AddBrainSteps/components/BrainTypeSelectionStep/hooks/useKnowledgeSourceLabel.ts +++ b/frontend/lib/components/AddBrainModal/components/AddBrainSteps/components/BrainTypeSelectionStep/hooks/useKnowledgeSourceLabel.ts @@ -6,7 +6,7 @@ import { BrainType } from "@/lib/types/brainConfig"; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types export const useKnowledgeSourceLabel = () => { const { t } = useTranslation(["translation", "brain", "config"]); - const isAgentBrainActivated = useFeatureIsOn("agent-brain"); + const isCompositeBrainActivated = useFeatureIsOn("agent-brain"); const knowledgeSourceOptions: { label: string; @@ -22,9 +22,9 @@ export const useKnowledgeSourceLabel = () => { }, ]; - if (isAgentBrainActivated) { + if (isCompositeBrainActivated) { knowledgeSourceOptions.push({ - label: t("knowledge_source_chatflow", { ns: "brain" }), + label: t("knowledge_source_composite_brain", { ns: "brain" }), value: "composite", }); } diff --git a/frontend/public/locales/en/brain.json b/frontend/public/locales/en/brain.json index fa433f0a33a6..1055a8c3d87b 100644 --- a/frontend/public/locales/en/brain.json +++ b/frontend/public/locales/en/brain.json @@ -51,7 +51,7 @@ "knowledge_source_doc": "Documents", "knowledge_source_api": "App (Through API)", "knowledge_source_label": "Knowledge source", - "knowledge_source_chatflow":"Agent", + "knowledge_source_composite_brain":"Agent", "api_brain": { "name": "Name", "description": "Description", diff --git a/frontend/public/locales/es/brain.json b/frontend/public/locales/es/brain.json index b8c7f322890f..e916685f6113 100644 --- a/frontend/public/locales/es/brain.json +++ b/frontend/public/locales/es/brain.json @@ -50,7 +50,7 @@ "myBrains": "Mis cerebros", "knowledge_source_doc": "Documentos", "knowledge_source_api": "API", - "knowledge_source_chatflow": "Agente", + "knowledge_source_composite_brain": "Agente", "knowledge_source_label": "Fuente de conocimiento", "api_brain":{ "name": "Nombre", diff --git a/frontend/public/locales/fr/brain.json b/frontend/public/locales/fr/brain.json index 44b0d8319af7..5c8c10bccb79 100644 --- a/frontend/public/locales/fr/brain.json +++ b/frontend/public/locales/fr/brain.json @@ -50,7 +50,7 @@ "myBrains": "Mes cerveaux", "knowledge_source_doc": "Documents", "knowledge_source_api": "API", - "knowledge_source_chatflow": "Agent", + "knowledge_source_composite_brain": "Agent", "knowledge_source_label": "Source de connaissance", "api_brain": { "name": "Nom", diff --git a/frontend/public/locales/pt-br/brain.json b/frontend/public/locales/pt-br/brain.json index 8b74afbc1e9d..23e67aa7106b 100644 --- a/frontend/public/locales/pt-br/brain.json +++ b/frontend/public/locales/pt-br/brain.json @@ -50,7 +50,7 @@ "myBrains": "Meus cérebros", "knowledge_source_doc": "Documentos", "knowledge_source_api": "API", - "knowledge_source_chatflow": "Agente", + "knowledge_source_composite_brain": "Agente", "knowledge_source_label": "Fonte de conhecimento", "api_brain":{ "name": "Name", diff --git a/frontend/public/locales/ru/brain.json b/frontend/public/locales/ru/brain.json index 28078f0d1261..12ab75dff257 100644 --- a/frontend/public/locales/ru/brain.json +++ b/frontend/public/locales/ru/brain.json @@ -50,7 +50,7 @@ "myBrains": "Мои мозги", "knowledge_source_doc": "Документы", "knowledge_source_api": "API", - "knowledge_source_chatflow": "Агент", + "knowledge_source_composite_brain": "Агент", "knowledge_source_label": "Источник знаний", "api_brain":{ "name": "Название", diff --git a/frontend/public/locales/zh-cn/brain.json b/frontend/public/locales/zh-cn/brain.json index d6105dcf0482..441765ffa71a 100644 --- a/frontend/public/locales/zh-cn/brain.json +++ b/frontend/public/locales/zh-cn/brain.json @@ -50,7 +50,7 @@ "myBrains": "我的大脑", "knowledge_source_doc": "文档", "knowledge_source_api": "API", - "knowledge_source_chatflow": "代理", + "knowledge_source_composite_brain": "代理", "knowledge_source_label": "知识来源", "api_brain":{ "name": "名称",