Skip to content

Commit

Permalink
feat: rename chatflow to composite brain
Browse files Browse the repository at this point in the history
  • Loading branch information
mamadoudicko committed Dec 6, 2023
1 parent 6a84da4 commit c9323b4
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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",
});
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/public/locales/en/brain.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion frontend/public/locales/es/brain.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion frontend/public/locales/fr/brain.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion frontend/public/locales/pt-br/brain.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion frontend/public/locales/ru/brain.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "Название",
Expand Down
2 changes: 1 addition & 1 deletion frontend/public/locales/zh-cn/brain.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "名称",
Expand Down

0 comments on commit c9323b4

Please sign in to comment.