feat: api definition in brain creation modal (#1613)

# Description

https://github.com/StanGirard/quivr/issues/1569

## Checklist before requesting a review

Please delete options that are not relevant.

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented hard-to-understand areas
- [ ] I have ideally added tests that prove my fix is effective or that
my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged

## Screenshots (if appropriate):

---------

Co-authored-by: mamadoudicko <mamadoudicko100@gmail.com>
This commit is contained in:
Zineb El Bachiri 2023-11-14 10:56:22 +01:00 committed by GitHub
parent 46af5b7a1b
commit 12903c4bb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 709 additions and 465 deletions

View File

@ -1,5 +1,5 @@
import { BrainRoleType } from "@/lib/components/BrainUsers/types";
import { BrainStatus } from "@/lib/types/brainConfig";
import { BrainStatus, BrainType } from "@/lib/types/brainConfig";
export type SubscriptionUpdatableProperties = {
role: BrainRoleType | null;
@ -14,6 +14,7 @@ export type CreateBrainInput = {
max_tokens?: number;
openai_api_key?: string;
prompt_id?: string | null;
brain_type?: BrainType;
};
export type UpdateBrainInput = Partial<CreateBrainInput>;

View File

@ -1,21 +1,9 @@
/* eslint-disable max-lines */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
import { FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next";
import { MdAdd } from "react-icons/md";
import { defaultBrainConfig } from "@/lib/config/defaultBrainConfig";
import { BrainConfig } from "@/lib/types/brainConfig";
import { PublicPrompts } from "@/app/brains-management/[brainId]/components/BrainManagementTabs/components/SettingsTab/components/PublicPrompts";
import Button from "@/lib/components/ui/Button";
import Field from "@/lib/components/ui/Field";
import { Modal } from "@/lib/components/ui/Modal";
import { defineMaxTokens } from "@/lib/helpers/defineMaxTokens";
import { cn } from "@/lib/utils";
import { PublicAccessConfirmationModal } from "./components/PublicAccessConfirmationModal";
import { useAddBrainModal } from "./hooks/useAddBrainModal";
import { Divider } from "../ui/Divider";
import { Radio } from "../ui/Radio";
import { TextArea } from "../ui/TextArea";
import { AddBrainConfig } from "./components/AddBrainConfig/AddBrainConfig";
type AddBrainModalProps = {
triggerClassName?: string;
@ -24,176 +12,13 @@ type AddBrainModalProps = {
export const AddBrainModal = ({
triggerClassName,
}: AddBrainModalProps): JSX.Element => {
const { t } = useTranslation(["translation", "brain", "config"]);
const {
handleSubmit,
isShareModalOpen,
setIsShareModalOpen,
register,
temperature,
maxTokens,
model,
isPending,
pickPublicPrompt,
accessibleModels,
brainStatusOptions,
status,
isPublicAccessConfirmationModalOpened,
onCancelPublicAccess,
onConfirmPublicAccess,
} = useAddBrainModal();
const methods = useForm<BrainConfig>({
defaultValues: defaultBrainConfig,
});
return (
<>
<Modal
Trigger={
<Button
onClick={() => void 0}
variant={"tertiary"}
className={cn("border-0", triggerClassName)}
data-testid="add-brain-button"
>
{t("newBrain", { ns: "brain" })}
<MdAdd className="text-xl" />
</Button>
}
title={t("newBrainTitle", { ns: "brain" })}
desc={t("newBrainSubtitle", { ns: "brain" })}
isOpen={isShareModalOpen}
setOpen={setIsShareModalOpen}
CloseTrigger={<div />}
>
<form
onSubmit={(e) => {
e.preventDefault();
void handleSubmit();
}}
className="my-10 flex flex-col items-center gap-2"
>
<Field
label={t("brainName", { ns: "brain" })}
autoFocus
placeholder={t("brainNamePlaceholder", { ns: "brain" })}
autoComplete="off"
className="flex-1"
required
data-testid="brain-name"
{...register("name")}
/>
<TextArea
label={t("brainDescription", { ns: "brain" })}
placeholder={t("brainDescriptionPlaceholder", { ns: "brain" })}
autoComplete="off"
className="flex-1 m-3"
{...register("description")}
/>
<fieldset className="w-full flex flex-col">
<Radio
items={brainStatusOptions}
label={t("brain_status_label", { ns: "brain" })}
value={status}
className="flex-1 justify-between w-[50%]"
{...register("status")}
/>
</fieldset>
<Field
label={t("openAiKeyLabel", { ns: "config" })}
placeholder={t("openAiKeyPlaceholder", { ns: "config" })}
autoComplete="off"
className="flex-1"
{...register("openAiKey")}
/>
<fieldset className="w-full flex flex-col">
<label className="flex-1 text-sm" htmlFor="model">
{t("modelLabel", { ns: "config" })}
</label>
<select
id="model"
{...register("model")}
className="px-5 py-2 dark:bg-gray-700 bg-gray-200 rounded-md"
>
{accessibleModels.map((availableModel) => (
<option value={availableModel} key={availableModel}>
{availableModel}
</option>
))}
</select>
</fieldset>
<fieldset className="w-full flex mt-4">
<label className="flex-1" htmlFor="temp">
{t("temperature", { ns: "config" })}: {temperature}
</label>
<input
id="temp"
type="range"
min="0"
max="1"
step="0.01"
value={temperature}
{...register("temperature")}
/>
</fieldset>
<fieldset className="w-full flex mt-4">
<label className="flex-1" htmlFor="tokens">
{t("maxTokens", { ns: "config" })}: {maxTokens}
</label>
<input
type="range"
min="10"
max={defineMaxTokens(model)}
value={maxTokens}
{...register("maxTokens")}
/>
</fieldset>
<Divider text={t("customPromptSection", { ns: "config" })} />
<PublicPrompts onSelect={pickPublicPrompt} />
<Field
label={t("promptName", { ns: "config" })}
placeholder={t("promptNamePlaceholder", { ns: "config" })}
autoComplete="off"
className="flex-1"
{...register("prompt.title")}
/>
<TextArea
label={t("promptContent", { ns: "config" })}
placeholder={t("promptContentPlaceholder", { ns: "config" })}
autoComplete="off"
className="flex-1"
{...register("prompt.content")}
/>
<div className="flex flex-row justify-start w-full mt-4">
<label className="flex items-center">
<span className="mr-2 text-gray-700">
{t("setDefaultBrain", { ns: "brain" })}
</span>
<input
type="checkbox"
{...register("setDefault")}
className="form-checkbox h-5 w-5 text-indigo-600 rounded focus:ring-2 focus:ring-indigo-400"
/>
</label>
</div>
<Button
isLoading={isPending}
className="mt-12 self-end"
type="submit"
data-testid="create-brain-submit-button"
>
{t("createButton")}
<MdAdd className="text-xl" />
</Button>
</form>
</Modal>
<PublicAccessConfirmationModal
opened={isPublicAccessConfirmationModalOpened}
onClose={onCancelPublicAccess}
onCancel={onCancelPublicAccess}
onConfirm={onConfirmPublicAccess}
/>
</>
<FormProvider {...methods}>
<AddBrainConfig triggerClassName={triggerClassName} />
</FormProvider>
);
};

View File

@ -0,0 +1,217 @@
/* eslint-disable max-lines */
import { useFeatureIsOn } from "@growthbook/growthbook-react";
import { useTranslation } from "react-i18next";
import { MdAdd } from "react-icons/md";
import { PublicPrompts } from "@/app/brains-management/[brainId]/components/BrainManagementTabs/components/SettingsTab/components/PublicPrompts";
import Button from "@/lib/components/ui/Button";
import Field from "@/lib/components/ui/Field";
import { Modal } from "@/lib/components/ui/Modal";
import { defineMaxTokens } from "@/lib/helpers/defineMaxTokens";
import { cn } from "@/lib/utils";
import { PublicAccessConfirmationModal } from "./components/PublicAccessConfirmationModal";
import { useAddBrainConfig } from "./hooks/useAddBrainConfig";
import { useAddBrainConfigLabels } from "./hooks/useAddBrainConfigLabels";
import { Divider } from "../../../ui/Divider";
import { Radio } from "../../../ui/Radio";
import { TextArea } from "../../../ui/TextArea";
type AddBrainConfigProps = {
triggerClassName?: string;
};
export const AddBrainConfig = ({
triggerClassName,
}: AddBrainConfigProps): JSX.Element => {
const { t } = useTranslation(["translation", "brain", "config"]);
const brainApiIsOn = useFeatureIsOn("brain-api");
const {
isShareModalOpen,
setIsShareModalOpen,
temperature,
maxTokens,
model,
isPending,
pickPublicPrompt,
accessibleModels,
status,
isPublicAccessConfirmationModalOpened,
onCancelPublicAccess,
onConfirmPublicAccess,
brainType,
register,
handleSubmit,
} = useAddBrainConfig();
const { brainStatusOptions, knowledgeSourceOptions } =
useAddBrainConfigLabels();
return (
<>
<Modal
Trigger={
<Button
onClick={() => void 0}
variant={"tertiary"}
className={cn("border-0", triggerClassName)}
data-testid="add-brain-button"
>
{t("newBrain", { ns: "brain" })}
<MdAdd className="text-xl" />
</Button>
}
title={t("newBrainTitle", { ns: "brain" })}
desc={t("newBrainSubtitle", { ns: "brain" })}
isOpen={isShareModalOpen}
setOpen={setIsShareModalOpen}
CloseTrigger={<div />}
>
<form
onSubmit={(e) => {
e.preventDefault();
void handleSubmit();
}}
className="my-10 flex flex-col items-center gap-2"
>
<Field
label={t("brainName", { ns: "brain" })}
autoFocus
placeholder={t("brainNamePlaceholder", { ns: "brain" })}
autoComplete="off"
className="flex-1"
required
data-testid="brain-name"
{...register("name")}
/>
<TextArea
label={t("brainDescription", { ns: "brain" })}
placeholder={t("brainDescriptionPlaceholder", { ns: "brain" })}
autoComplete="off"
className="flex-1 m-3"
{...register("description")}
/>
<fieldset className="w-full flex flex-col">
<Radio
items={brainStatusOptions}
label={t("brain_status_label", { ns: "brain" })}
value={status}
className="flex-1 justify-between w-[50%]"
{...register("status")}
/>
</fieldset>
{brainApiIsOn && (
<fieldset className="w-full flex flex-col">
<Radio
items={knowledgeSourceOptions}
label={t("knowledge_source_label", { ns: "brain" })}
value={brainType}
className="flex-1 justify-between w-[50%]"
{...register("brainType")}
/>
</fieldset>
)}
<Field
label={t("openAiKeyLabel", { ns: "config" })}
placeholder={t("openAiKeyPlaceholder", { ns: "config" })}
autoComplete="off"
className="flex-1"
{...register("openAiKey")}
/>
<fieldset className="w-full flex flex-col">
<label className="flex-1 text-sm" htmlFor="model">
{t("modelLabel", { ns: "config" })}
</label>
<select
id="model"
{...register("model")}
className="px-5 py-2 dark:bg-gray-700 bg-gray-200 rounded-md"
>
{accessibleModels.map((availableModel) => (
<option value={availableModel} key={availableModel}>
{availableModel}
</option>
))}
</select>
</fieldset>
<fieldset className="w-full flex mt-4">
<label className="flex-1" htmlFor="temp">
{t("temperature", { ns: "config" })}: {temperature}
</label>
<input
id="temp"
type="range"
min="0"
max="1"
step="0.01"
value={temperature}
{...register("temperature")}
/>
</fieldset>
<fieldset className="w-full flex mt-4">
<label className="flex-1" htmlFor="tokens">
{t("maxTokens", { ns: "config" })}: {maxTokens}
</label>
<input
type="range"
min="10"
max={defineMaxTokens(model)}
value={maxTokens}
{...register("maxTokens")}
/>
</fieldset>
<Divider text={t("customPromptSection", { ns: "config" })} />
<PublicPrompts onSelect={pickPublicPrompt} />
<Field
label={t("promptName", { ns: "config" })}
placeholder={t("promptNamePlaceholder", { ns: "config" })}
autoComplete="off"
className="flex-1"
{...register("prompt.title")}
/>
<TextArea
label={t("promptContent", { ns: "config" })}
placeholder={t("promptContentPlaceholder", { ns: "config" })}
autoComplete="off"
className="flex-1"
{...register("prompt.content")}
/>
<div className="flex flex-row justify-start w-full mt-4">
<label className="flex items-center">
<span className="mr-2 text-gray-700">
{t("setDefaultBrain", { ns: "brain" })}
</span>
<input
type="checkbox"
{...register("setDefault")}
className="form-checkbox h-5 w-5 text-indigo-600 rounded focus:ring-2 focus:ring-indigo-400"
/>
</label>
</div>
<Button
isLoading={isPending}
className="mt-12 self-end"
type="submit"
data-testid="create-brain-submit-button"
>
{t("createButton")}
<MdAdd className="text-xl" />
</Button>
</form>
</Modal>
<PublicAccessConfirmationModal
opened={isPublicAccessConfirmationModalOpened}
onClose={onCancelPublicAccess}
onCancel={onCancelPublicAccess}
onConfirm={onConfirmPublicAccess}
/>
</>
);
};

View File

@ -0,0 +1,53 @@
import { Content, Root } from "@radix-ui/react-tabs";
import { BrainType } from "@/lib/types/brainConfig";
import { useApiDefinitionTabs } from "./hooks/useApiDefinitionTabs";
import { HeadersDefinition } from "./tabs/HeadersDefinition";
import { ParamsDefinition } from "./tabs/ParamsDefinition";
import { SearchParamsDefinition } from "./tabs/SearchParamsDefinition";
export const ApiRequestDefinition = (brainType: {
brainType: BrainType;
}): JSX.Element => {
const { selectedTab, setSelectedTab } = useApiDefinitionTabs();
console.log(brainType);
setSelectedTab("searchParams");
return (
<Root
className="flex flex-col w-full h-full overflow-scroll bg-white dark:bg-black p-4 md:p-10 max-w-5xl"
value={selectedTab}
>
<div className="flex gap-2 p-4">
<select
className="block w-32 px-3 py-2 bg-white border border-gray-300 rounded-md shadow-sm focus:outline-none focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
defaultValue="GET"
// {...register("api.method")}
>
<option value="GET">GET</option>
<option value="POST">POST</option>
<option value="PUT">PUT</option>
<option value="DELETE">DELETE</option>
</select>
<input
className="flex-1 px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
placeholder="https://api.example.com/resource"
// {...register("api.url", { required: true })}
/>
</div>
<div className="flex-1 md:pt-0 pb-0">
<Content value="people">
<SearchParamsDefinition />
</Content>
<Content value="settings">
<HeadersDefinition />
</Content>
<Content value="knowledge">
<ParamsDefinition />
</Content>
</div>
</Root>
);
};

View File

@ -0,0 +1,13 @@
import { useState } from "react";
import { ApiTab } from "../types";
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export const useApiDefinitionTabs = () => {
const [selectedTab, setSelectedTab] = useState<ApiTab>("searchParams");
return {
selectedTab,
setSelectedTab,
};
};

View File

@ -0,0 +1 @@
export * from "./ApiRequestDefinition";

View File

@ -0,0 +1,3 @@
export const HeadersDefinition = (): JSX.Element => {
return <></>;
};

View File

@ -0,0 +1,3 @@
export const ParamsDefinition = (): JSX.Element => {
return <></>;
};

View File

@ -0,0 +1,3 @@
export const SearchParamsDefinition = (): JSX.Element => {
return <></>;
};

View File

@ -0,0 +1,3 @@
export const apiTabs = ["searchParams", "headers", "params"] as const;
export type ApiTab = (typeof apiTabs)[number];

View File

@ -1,7 +1,7 @@
import { useTranslation } from "react-i18next";
import Button from "../../ui/Button";
import { Modal } from "../../ui/Modal";
import Button from "../../../../ui/Button";
import { Modal } from "../../../../ui/Modal";
type PublicAccessConfirmationModalProps = {
opened: boolean;

View File

@ -1,7 +1,8 @@
/* eslint-disable */
/* eslint-disable max-lines */
import { useQuery, useQueryClient } from "@tanstack/react-query";
import axios from "axios";
import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { useFormContext } from "react-hook-form";
import { useTranslation } from "react-i18next";
import { PUBLIC_BRAINS_KEY } from "@/lib/api/brain/config";
@ -14,12 +15,11 @@ import { useBrainContext } from "@/lib/context/BrainProvider/hooks/useBrainConte
import { defineMaxTokens } from "@/lib/helpers/defineMaxTokens";
import { getAccessibleModels } from "@/lib/helpers/getAccessibleModels";
import { useToast } from "@/lib/hooks";
import { BrainStatus } from "@/lib/types/brainConfig";
import { useQuery, useQueryClient } from "@tanstack/react-query";
import { BrainConfig } from "@/lib/types/brainConfig";
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export const useAddBrainModal = () => {
const { t } = useTranslation(["translation", "brain", "config"]);
export const useAddBrainConfig = () => {
const { t } = useTranslation(["brain", "config"]);
const [isPending, setIsPending] = useState(false);
const { publish } = useToast();
const { createBrain, setCurrentBrainId } = useBrainContext();
@ -33,20 +33,6 @@ export const useAddBrainModal = () => {
const { getUser } = useUserApi();
const queryClient = useQueryClient();
const brainStatusOptions: {
label: string;
value: BrainStatus;
}[] = [
{
label: t("private_brain_label", { ns: "brain" }),
value: "private",
},
{
label: t("public_brain_label", { ns: "brain" }),
value: "public",
},
];
const { data: userData } = useQuery({
queryKey: [USER_DATA_KEY],
queryFn: getUser,
@ -70,15 +56,14 @@ export const useAddBrainModal = () => {
watch,
setValue,
formState: { dirtyFields },
} = useForm({
defaultValues,
});
} = useFormContext<BrainConfig>();
const openAiKey = watch("openAiKey");
const model = watch("model");
const temperature = watch("temperature");
const maxTokens = watch("maxTokens");
const status = watch("status");
const brainType = watch("brainType");
const accessibleModels = getAccessibleModels({
openAiKey,
@ -86,10 +71,10 @@ export const useAddBrainModal = () => {
});
useEffect(() => {
if (status === "public" && dirtyFields.status) {
if (status === "public" && dirtyFields.status === true) {
setIsPublicAccessConfirmationModalOpened(true);
}
}, [status]);
}, [dirtyFields.status, status]);
useEffect(() => {
setValue("maxTokens", Math.min(maxTokens, defineMaxTokens(model)));
@ -131,6 +116,7 @@ export const useAddBrainModal = () => {
temperature,
prompt_id,
status,
brain_type: brainType,
});
if (createdBrainId === undefined) {
@ -211,17 +197,17 @@ export const useAddBrainModal = () => {
isShareModalOpen,
setIsShareModalOpen,
handleSubmit,
register,
model,
temperature,
maxTokens,
isPending,
accessibleModels,
pickPublicPrompt,
brainStatusOptions,
status,
isPublicAccessConfirmationModalOpened,
onConfirmPublicAccess,
onCancelPublicAccess,
brainType,
register,
};
};

View File

@ -0,0 +1,40 @@
import { useTranslation } from "react-i18next";
import { BrainStatus, BrainType } from "@/lib/types/brainConfig";
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export const useAddBrainConfigLabels = () => {
const { t } = useTranslation(["translation", "brain", "config"]);
const brainStatusOptions: {
label: string;
value: BrainStatus;
}[] = [
{
label: t("private_brain_label", { ns: "brain" }),
value: "private",
},
{
label: t("public_brain_label", { ns: "brain" }),
value: "public",
},
];
const knowledgeSourceOptions: {
label: string;
value: BrainType;
}[] = [
{
label: t("knowledge_source_doc", { ns: "brain" }),
value: "doc",
},
{
label: t("knowledge_source_api", { ns: "brain" }),
value: "api",
},
];
return {
brainStatusOptions,
knowledgeSourceOptions,
};
};

View File

@ -0,0 +1 @@
export * from "./AddBrainConfig";

View File

@ -0,0 +1 @@
export * from "./AddBrainConfig";

View File

@ -1,3 +0,0 @@
.foo {
white-space: 'pre-wrap';
}

View File

@ -6,6 +6,7 @@ import config_en from "../../../public/locales/en/config.json";
import contact_en from "../../../public/locales/en/contact.json";
import delete_brain_en from "../../../public/locales/en/deleteOrUnsubscribeFromBrain.json";
import explore_en from "../../../public/locales/en/explore.json";
import external_api_definition_en from "../../../public/locales/en/external_api_definition.json";
import home_en from "../../../public/locales/en/home.json";
import invitation_en from "../../../public/locales/en/invitation.json";
import knowlegde_en from "../../../public/locales/en/knowledge.json";
@ -22,6 +23,7 @@ import config_es from "../../../public/locales/es/config.json";
import contact_es from "../../../public/locales/es/contact.json";
import delete_brain_es from "../../../public/locales/es/deleteOrUnsubscribeFromBrain.json";
import explore_es from "../../../public/locales/es/explore.json";
import external_api_definition_es from "../../../public/locales/es/external_api_definition.json";
import home_es from "../../../public/locales/es/home.json";
import invitation_es from "../../../public/locales/es/invitation.json";
import knowlegde_es from "../../../public/locales/es/knowledge.json";
@ -38,6 +40,7 @@ import config_fr from "../../../public/locales/fr/config.json";
import contact_fr from "../../../public/locales/fr/contact.json";
import delete_brain_fr from "../../../public/locales/fr/deleteOrUnsubscribeFromBrain.json";
import explore_fr from "../../../public/locales/fr/explore.json";
import external_api_definition_fr from "../../../public/locales/fr/external_api_definition.json";
import home_fr from "../../../public/locales/fr/home.json";
import invitation_fr from "../../../public/locales/fr/invitation.json";
import knowlegde_fr from "../../../public/locales/fr/knowledge.json";
@ -54,6 +57,7 @@ import config_ptbr from "../../../public/locales/pt-br/config.json";
import contact_ptbr from "../../../public/locales/pt-br/contact.json";
import delete_brain_ptbr from "../../../public/locales/pt-br/deleteOrUnsubscribeFromBrain.json";
import explore_ptbr from "../../../public/locales/pt-br/explore.json";
import external_api_definition_ptbr from "../../../public/locales/pt-br/external_api_definition.json";
import home_ptbr from "../../../public/locales/pt-br/home.json";
import invitation_ptbr from "../../../public/locales/pt-br/invitation.json";
import knowlegde_ptbr from "../../../public/locales/pt-br/knowledge.json";
@ -70,6 +74,7 @@ import config_ru from "../../../public/locales/ru/config.json";
import contact_ru from "../../../public/locales/ru/contact.json";
import delete_brain_ru from "../../../public/locales/ru/deleteOrUnsubscribeFromBrain.json";
import explore_ru from "../../../public/locales/ru/explore.json";
import external_api_definition_ru from "../../../public/locales/ru/external_api_definition.json";
import home_ru from "../../../public/locales/ru/home.json";
import invitation_ru from "../../../public/locales/ru/invitation.json";
import knowlegde_ru from "../../../public/locales/ru/knowledge.json";
@ -86,6 +91,7 @@ import config_zh_cn from "../../../public/locales/zh-cn/config.json";
import contact_zh_cn from "../../../public/locales/zh-cn/contact.json";
import delete_brain_zh_cn from "../../../public/locales/zh-cn/deleteOrUnsubscribeFromBrain.json";
import explore_zh_cn from "../../../public/locales/zh-cn/explore.json";
import external_api_definition_zh_cn from "../../../public/locales/zh-cn/external_api_definition.json";
import home_zh_cn from "../../../public/locales/zh-cn/home.json";
import invitation_zh_cn from "../../../public/locales/zh-cn/invitation.json";
import knowlegde_zh_cn from "../../../public/locales/zh-cn/knowledge.json";
@ -113,6 +119,7 @@ export type Translations = {
upload: typeof import("../../../public/locales/en/upload.json");
user: typeof import("../../../public/locales/en/user.json");
knowledge: typeof import("../../../public/locales/en/knowledge.json");
external_api_definition: typeof import("../../../public/locales/en/external_api_definition.json");
};
enum SupportedLanguages {
@ -142,6 +149,7 @@ export const resources: Record<SupportedLanguages, Translations> = {
user: user_en,
delete_or_unsubscribe_from_brain: delete_brain_en,
knowledge: knowlegde_en,
external_api_definition: external_api_definition_en,
},
es: {
brain: brain_es,
@ -159,6 +167,7 @@ export const resources: Record<SupportedLanguages, Translations> = {
user: user_es,
delete_or_unsubscribe_from_brain: delete_brain_es,
knowledge: knowlegde_es,
external_api_definition: external_api_definition_es,
},
fr: {
brain: brain_fr,
@ -176,6 +185,7 @@ export const resources: Record<SupportedLanguages, Translations> = {
user: user_fr,
delete_or_unsubscribe_from_brain: delete_brain_fr,
knowledge: knowlegde_fr,
external_api_definition: external_api_definition_fr,
},
ptbr: {
brain: brain_ptbr,
@ -193,6 +203,7 @@ export const resources: Record<SupportedLanguages, Translations> = {
user: user_ptbr,
delete_or_unsubscribe_from_brain: delete_brain_ptbr,
knowledge: knowlegde_ptbr,
external_api_definition: external_api_definition_ptbr,
},
ru: {
brain: brain_ru,
@ -210,6 +221,7 @@ export const resources: Record<SupportedLanguages, Translations> = {
user: user_ru,
delete_or_unsubscribe_from_brain: delete_brain_ru,
knowledge: knowlegde_ru,
external_api_definition: external_api_definition_ru,
},
zh_cn: {
brain: brain_zh_cn,
@ -227,5 +239,6 @@ export const resources: Record<SupportedLanguages, Translations> = {
user: user_zh_cn,
delete_or_unsubscribe_from_brain: delete_brain_zh_cn,
knowledge: knowlegde_zh_cn,
external_api_definition: external_api_definition_zh_cn,
},
} as const;

View File

@ -19,4 +19,5 @@ export const defaultBrainConfig: BrainConfig = {
name: "",
description: "",
setDefault: false,
brainType: "doc",
};

View File

@ -2,6 +2,10 @@ export const brainStatuses = ["private", "public"] as const;
export type BrainStatus = (typeof brainStatuses)[number];
export const brainTypes = ["doc", "api"] as const;
export type BrainType = (typeof brainTypes)[number];
export type BrainConfig = {
model: Model;
temperature: number;
@ -14,6 +18,7 @@ export type BrainConfig = {
supabaseKey?: string;
prompt_id?: string;
status: BrainStatus;
brainType: BrainType;
prompt: {
title: string;
content: string;

View File

@ -1,50 +1,53 @@
{
"searchBrain": "Search for a brain",
"selectBrain": "Select a brain please",
"brainCreated": "Brain created successfully",
"newBrain": "Add New Brain",
"newBrainTitle": "Add New Brain",
"newBrainSubtitle": "Create a new space for your data",
"brainName": "Brain name",
"brainNamePlaceholder": "E.g. History notes",
"brainDescription": "Description",
"brainDescriptionPlaceholder": "My new brain is about...",
"shareBrain": "Share brain {{name}}",
"shareBrainUsers": "Users with access",
"shareBrainLink": "Click to copy link to share your brain",
"copiedToClipboard": "Copied to clipboard",
"inviteUsers": "Add new users",
"usersInvited": "Users successfully invited",
"errorSendingInvitation": "An error occurred while sending invitations",
"brainUndefined": "Brain is undefined",
"noBrainUsers": "No brainUsers",
"errorFetchingBrainUsers": "An error occurred while fetching brain users",
"usersWithAccess": "Users with access",
"userRoleUpdated": "Updated {{email}} to {{newRole}}",
"userRoleUpdateFailed": "Failed updating {{email}} to {{newRole}} ",
"userRemoved": "Removed {{email}} from brain",
"userRemoveFailed": "Failed to remove {{email}} from brain",
"defaultBrain": "Default Brain",
"setDefaultBrain": "Set as default brain",
"errorCreatingBrain": "Error occurred while creating a brain",
"private_brain_label": "Private",
"public_brain_label": "Public",
"brain_status_label":"Access",
"set_brain_status_to_public_modal_title": "Are you sure you want to set this as <span class='text-primary'>Public</span>?<br/><br/>",
"set_brain_status_to_public_modal_description": "Every Quivr user will be able to:<br/>- Subscribe to your brain in the 'brains library'.<br/>- Use this brain and check the prompt and model configurations.<br/><br/>They won't have access to your uploaded files and people section.",
"confirm_set_brain_status_to_public": "Yes, set as public",
"cancel_set_brain_status_to_public": "No, keep it private",
"brain_library_button_label":"Brains library",
"brain_management_button_label":"Brains management",
"public_brains_search_bar_placeholder":"Search public brains",
"public_brain_subscribe_button_label":"Subscribe",
"public_brain_subscription_success_message":"You have successfully subscribed to the brain",
"public_brain_last_update_label":"Last update",
"public_brain_already_subscribed_button_label":"Subscribed",
"set_brain_status_to_private_modal_title":"Are you sure you want to set this as <span class='text-primary'>Private</span>?<br/><br/>",
"set_brain_status_to_private_modal_description":"Every Quivr users won't be able to use this brain anymore and they won't see it in the brain library.",
"confirm_set_brain_status_to_private":"Yes, set as private",
"cancel_set_brain_status_to_private":"No, keep it public",
"empty_brain_description":"No description",
"myBrains":"My Brains"
}
"searchBrain": "Search for a brain",
"selectBrain": "Select a brain please",
"brainCreated": "Brain created successfully",
"newBrain": "Add New Brain",
"newBrainTitle": "Add New Brain",
"newBrainSubtitle": "Create a new space for your data",
"brainName": "Brain name",
"brainNamePlaceholder": "E.g. History notes",
"brainDescription": "Description",
"brainDescriptionPlaceholder": "My new brain is about...",
"shareBrain": "Share brain {{name}}",
"shareBrainUsers": "Users with access",
"shareBrainLink": "Click to copy link to share your brain",
"copiedToClipboard": "Copied to clipboard",
"inviteUsers": "Add new users",
"usersInvited": "Users successfully invited",
"errorSendingInvitation": "An error occurred while sending invitations",
"brainUndefined": "Brain is undefined",
"noBrainUsers": "No brainUsers",
"errorFetchingBrainUsers": "An error occurred while fetching brain users",
"usersWithAccess": "Users with access",
"userRoleUpdated": "Updated {{email}} to {{newRole}}",
"userRoleUpdateFailed": "Failed updating {{email}} to {{newRole}} ",
"userRemoved": "Removed {{email}} from brain",
"userRemoveFailed": "Failed to remove {{email}} from brain",
"defaultBrain": "Default Brain",
"setDefaultBrain": "Set as default brain",
"errorCreatingBrain": "Error occurred while creating a brain",
"private_brain_label": "Private",
"public_brain_label": "Public",
"brain_status_label": "Access",
"set_brain_status_to_public_modal_title": "Are you sure you want to set this as <span class='text-primary'>Public</span>?<br/><br/>",
"set_brain_status_to_public_modal_description": "Every Quivr user will be able to:<br/>- Subscribe to your brain in the 'brains library'.<br/>- Use this brain and check the prompt and model configurations.<br/><br/>They won't have access to your uploaded files and people section.",
"confirm_set_brain_status_to_public": "Yes, set as public",
"cancel_set_brain_status_to_public": "No, keep it private",
"brain_library_button_label": "Brains library",
"brain_management_button_label": "Brains management",
"public_brains_search_bar_placeholder": "Search public brains",
"public_brain_subscribe_button_label": "Subscribe",
"public_brain_subscription_success_message": "You have successfully subscribed to the brain",
"public_brain_last_update_label": "Last update",
"public_brain_already_subscribed_button_label": "Subscribed",
"set_brain_status_to_private_modal_title": "Are you sure you want to set this as <span class='text-primary'>Private</span>?<br/><br/>",
"set_brain_status_to_private_modal_description": "Every Quivr users won't be able to use this brain anymore and they won't see it in the brain library.",
"confirm_set_brain_status_to_private": "Yes, set as private",
"cancel_set_brain_status_to_private": "No, keep it public",
"empty_brain_description": "No description",
"myBrains": "My Brains",
"knowledge_source_doc": "Documents",
"knowledge_source_api": "API",
"knowledge_source_label": "Knowledge source"
}

View File

@ -0,0 +1,10 @@
{
"method_label": "Method",
"url_placeholder": "URL",
"searchParams": "Search Params",
"headers": "Headers",
"params": "Params",
"key": "Key",
"type": "Type (string or number)",
"description": "Description"
}

View File

@ -1,50 +1,53 @@
{
"brainCreated": "Cerebro creado correctamente",
"brainDescription": "Descripción",
"brainDescriptionPlaceholder": "Mi nuevo cerebro es acerca de...",
"brainName": "Nombre del cerebro",
"brainNamePlaceholder": "Ejemplo: Anotaciones de historia",
"brainUndefined": "Cerebro no definido",
"copiedToClipboard": "Copiado al portapeles",
"defaultBrain": "Cerebro por defecto",
"errorCreatingBrain": "Error al crear cerebro",
"errorFetchingBrainUsers": "Error al obtener usuarios del cerebro",
"errorSendingInvitation": "Un error ocurrió al enviar invitaciones",
"inviteUsers": "Agrega nuevos usuarios",
"newBrain": "Agregar nuevo cerebro",
"newBrainSubtitle": "Crea un nuevo espacio para tus datos",
"newBrainTitle": "Agregar nuevo cerebro",
"noBrainUsers": "Sin usuarios del cerebro",
"searchBrain": "Buscar un cerebro",
"selectBrain": "Por favor, selecciona un cerebro",
"setDefaultBrain": "Asignar cerebro por defecto",
"shareBrain": "Compartir cerebro {{name}}",
"shareBrainLink": "Click para copiar y compartir tu cerebro",
"shareBrainUsers": "Usuarios con acceso",
"userRemoved": "Eliminado {{email}} del cerebro",
"userRemoveFailed": "Error al eliminar {{email}} del cerebro",
"userRoleUpdated": "Actualizado {{email}} a {{newRole}}",
"userRoleUpdateFailed": "Error actualizado {{email}} a {{newRole}} ",
"usersInvited": "Usuarios invitados correctamente",
"usersWithAccess": "Usuarios con acceso",
"private_brain_label": "Privado",
"public_brain_label": "Público",
"brain_status_label": "Estado",
"set_brain_status_to_public_modal_title": "¿Estás seguro de querer establecer esto como <span class='text-primary'>Público</span>?<br/><br/>",
"set_brain_status_to_public_modal_description": "Cada usuario de Quivr podrá:<br/>- Suscribirse a tu cerebro en la 'biblioteca de cerebros'.<br/>- Usar este cerebro y comprobar las configuraciones de las indicaciones y el modelo.<br/><br/>No tendrán acceso a tus archivos cargados ni a la sección de personas.",
"confirm_set_brain_status_to_public": "Sí, establecer como público",
"cancel_set_brain_status_to_public": "No, mantenerlo privado",
"brain_library_button_label": "Biblioteca de cerebros",
"public_brains_search_bar_placeholder": "Buscar cerebros públicos",
"public_brain_subscribe_button_label": "Suscribirse",
"public_brain_subscription_success_message": "Te has suscrito con éxito al cerebro",
"public_brain_last_update_label": "Última actualización",
"public_brain_already_subscribed_button_label": "Ya suscrito",
"set_brain_status_to_private_modal_title": "¿Estás seguro de que quieres establecer esto como <span class='text-primary'>Privado</span>?<br/><br/>",
"set_brain_status_to_private_modal_description": "Los usuarios de Quivr ya no podrán utilizar este cerebro y no lo verán en la biblioteca de cerebros.",
"confirm_set_brain_status_to_private": "Sí, establecer como privado",
"cancel_set_brain_status_to_private": "No, mantenerlo público",
"brain_management_button_label": "Gestionar cerebro",
"empty_brain_description":"Sin descripción",
"myBrains": "Mis cerebros"
}
"brainCreated": "Cerebro creado correctamente",
"brainDescription": "Descripción",
"brainDescriptionPlaceholder": "Mi nuevo cerebro es acerca de...",
"brainName": "Nombre del cerebro",
"brainNamePlaceholder": "Ejemplo: Anotaciones de historia",
"brainUndefined": "Cerebro no definido",
"copiedToClipboard": "Copiado al portapeles",
"defaultBrain": "Cerebro por defecto",
"errorCreatingBrain": "Error al crear cerebro",
"errorFetchingBrainUsers": "Error al obtener usuarios del cerebro",
"errorSendingInvitation": "Un error ocurrió al enviar invitaciones",
"inviteUsers": "Agrega nuevos usuarios",
"newBrain": "Agregar nuevo cerebro",
"newBrainSubtitle": "Crea un nuevo espacio para tus datos",
"newBrainTitle": "Agregar nuevo cerebro",
"noBrainUsers": "Sin usuarios del cerebro",
"searchBrain": "Buscar un cerebro",
"selectBrain": "Por favor, selecciona un cerebro",
"setDefaultBrain": "Asignar cerebro por defecto",
"shareBrain": "Compartir cerebro {{name}}",
"shareBrainLink": "Click para copiar y compartir tu cerebro",
"shareBrainUsers": "Usuarios con acceso",
"userRemoved": "Eliminado {{email}} del cerebro",
"userRemoveFailed": "Error al eliminar {{email}} del cerebro",
"userRoleUpdated": "Actualizado {{email}} a {{newRole}}",
"userRoleUpdateFailed": "Error actualizado {{email}} a {{newRole}} ",
"usersInvited": "Usuarios invitados correctamente",
"usersWithAccess": "Usuarios con acceso",
"private_brain_label": "Privado",
"public_brain_label": "Público",
"brain_status_label": "Estado",
"set_brain_status_to_public_modal_title": "¿Estás seguro de querer establecer esto como <span class='text-primary'>Público</span>?<br/><br/>",
"set_brain_status_to_public_modal_description": "Cada usuario de Quivr podrá:<br/>- Suscribirse a tu cerebro en la 'biblioteca de cerebros'.<br/>- Usar este cerebro y comprobar las configuraciones de las indicaciones y el modelo.<br/><br/>No tendrán acceso a tus archivos cargados ni a la sección de personas.",
"confirm_set_brain_status_to_public": "Sí, establecer como público",
"cancel_set_brain_status_to_public": "No, mantenerlo privado",
"brain_library_button_label": "Biblioteca de cerebros",
"public_brains_search_bar_placeholder": "Buscar cerebros públicos",
"public_brain_subscribe_button_label": "Suscribirse",
"public_brain_subscription_success_message": "Te has suscrito con éxito al cerebro",
"public_brain_last_update_label": "Última actualización",
"public_brain_already_subscribed_button_label": "Ya suscrito",
"set_brain_status_to_private_modal_title": "¿Estás seguro de que quieres establecer esto como <span class='text-primary'>Privado</span>?<br/><br/>",
"set_brain_status_to_private_modal_description": "Los usuarios de Quivr ya no podrán utilizar este cerebro y no lo verán en la biblioteca de cerebros.",
"confirm_set_brain_status_to_private": "Sí, establecer como privado",
"cancel_set_brain_status_to_private": "No, mantenerlo público",
"brain_management_button_label": "Gestionar cerebro",
"empty_brain_description": "Sin descripción",
"myBrains": "Mis cerebros",
"knowledge_source_doc": "Documentos",
"knowledge_source_api": "API",
"knowledge_source_label": "Fuente de conocimiento"
}

View File

@ -0,0 +1,10 @@
{
"method_label": "Method",
"url_placeholder": "URL",
"searchParams": "Search Params",
"headers": "Headers",
"params": "Params",
"key": "Key",
"type": "Type (string or number)",
"description": "Description"
}

View File

@ -1,50 +1,53 @@
{
"brainCreated": "Cerveau créé avec succès",
"brainDescription": "Description",
"brainDescriptionPlaceholder": "Mon nouveau cerveau concerne...",
"brainName": "Nom du cerveau",
"brainNamePlaceholder": "Ex. Notes d'histoire",
"brainUndefined": "Cerveau non défini",
"copiedToClipboard": "Copié dans le presse-papier",
"defaultBrain": "Cerveau par défaut",
"errorCreatingBrain": "Une erreur s'est produite lors de la création d'un cerveau",
"errorFetchingBrainUsers": "Une erreur s'est produite lors de la récupération des utilisateurs du cerveau",
"errorSendingInvitation": "Une erreur s'est produite lors de l'envoi des invitations",
"inviteUsers": "Ajouter de nouveaux utilisateurs",
"newBrain": "Ajouter un nouveau cerveau",
"newBrainSubtitle": "Créez un nouvel espace pour vos données",
"newBrainTitle": "Ajouter un nouveau cerveau",
"noBrainUsers": "Pas de brainUsers",
"searchBrain": "Rechercher un cerveau",
"selectBrain": "Sélectionnez un cerveau, s'il vous plaît",
"setDefaultBrain": "Définir comme cerveau par défaut",
"shareBrain": "Partager le cerveau {{name}}",
"shareBrainLink": "Cliquez pour copier le lien pour partager votre cerveau",
"shareBrainUsers": "Utilisateurs ayant accès",
"userRemoved": "Retiré {{email}} du cerveau",
"userRemoveFailed": "Échec du retrait de {{email}} du cerveau",
"userRoleUpdated": "Mis à jour {{email}} en {{newRole}}",
"userRoleUpdateFailed": "Échec de la mise à jour de {{email}} en {{newRole}}",
"usersInvited": "Utilisateurs invités avec succès",
"usersWithAccess": "Utilisateurs ayant accès",
"private_brain_label": "Privé",
"public_brain_label": "Public",
"brain_status_label": "Statut",
"set_brain_status_to_public_modal_title": "Êtes-vous sûr de vouloir définir ceci comme <span class='text-primary'>Public</span>?<br/><br/>",
"set_brain_status_to_public_modal_description": "Chaque utilisateur de Quivr pourra :<br/>- S'abonner à votre cerveau dans la 'bibliothèque des cerveaux'.<br/>- Utiliser ce cerveau et vérifier les configurations de prompts et de modèles.<br/><br/>Ils n'auront pas accès à vos fichiers téléchargés et à la section des personnes.",
"confirm_set_brain_status_to_public": "Oui, définir comme public",
"cancel_set_brain_status_to_public": "Non, le garder privé",
"brain_library_button_label": "Bibliothèque des cerveaux",
"public_brains_search_bar_placeholder": "Rechercher des cerveaux publics",
"public_brain_subscribe_button_label": "S'abonner",
"public_brain_subscription_success_message": "Vous vous êtes abonné avec succès au cerveau",
"public_brain_last_update_label": "Dernière mise à jour",
"public_brain_already_subscribed_button_label": "Abonné",
"set_brain_status_to_private_modal_title": "Êtes-vous sûr de vouloir définir ceci comme <span class='text-primary'>Privé</span>?<br/><br/>",
"set_brain_status_to_private_modal_description": "Les utilisateurs de Quivr ne pourront plus utiliser ce cerveau et ne le verront plus dans la bibliothèque des cerveaux.",
"confirm_set_brain_status_to_private": "Oui, définir comme privé",
"cancel_set_brain_status_to_private": "Non, le laisser public",
"brain_management_button_label": "Gestion des cerveaux",
"empty_brain_description":"Pas de description",
"myBrains": "Mes cerveaux"
}
"brainCreated": "Cerveau créé avec succès",
"brainDescription": "Description",
"brainDescriptionPlaceholder": "Mon nouveau cerveau concerne...",
"brainName": "Nom du cerveau",
"brainNamePlaceholder": "Ex. Notes d'histoire",
"brainUndefined": "Cerveau non défini",
"copiedToClipboard": "Copié dans le presse-papier",
"defaultBrain": "Cerveau par défaut",
"errorCreatingBrain": "Une erreur s'est produite lors de la création d'un cerveau",
"errorFetchingBrainUsers": "Une erreur s'est produite lors de la récupération des utilisateurs du cerveau",
"errorSendingInvitation": "Une erreur s'est produite lors de l'envoi des invitations",
"inviteUsers": "Ajouter de nouveaux utilisateurs",
"newBrain": "Ajouter un nouveau cerveau",
"newBrainSubtitle": "Créez un nouvel espace pour vos données",
"newBrainTitle": "Ajouter un nouveau cerveau",
"noBrainUsers": "Pas de brainUsers",
"searchBrain": "Rechercher un cerveau",
"selectBrain": "Sélectionnez un cerveau, s'il vous plaît",
"setDefaultBrain": "Définir comme cerveau par défaut",
"shareBrain": "Partager le cerveau {{name}}",
"shareBrainLink": "Cliquez pour copier le lien pour partager votre cerveau",
"shareBrainUsers": "Utilisateurs ayant accès",
"userRemoved": "Retiré {{email}} du cerveau",
"userRemoveFailed": "Échec du retrait de {{email}} du cerveau",
"userRoleUpdated": "Mis à jour {{email}} en {{newRole}}",
"userRoleUpdateFailed": "Échec de la mise à jour de {{email}} en {{newRole}}",
"usersInvited": "Utilisateurs invités avec succès",
"usersWithAccess": "Utilisateurs ayant accès",
"private_brain_label": "Privé",
"public_brain_label": "Public",
"brain_status_label": "Statut",
"set_brain_status_to_public_modal_title": "Êtes-vous sûr de vouloir définir ceci comme <span class='text-primary'>Public</span>?<br/><br/>",
"set_brain_status_to_public_modal_description": "Chaque utilisateur de Quivr pourra :<br/>- S'abonner à votre cerveau dans la 'bibliothèque des cerveaux'.<br/>- Utiliser ce cerveau et vérifier les configurations de prompts et de modèles.<br/><br/>Ils n'auront pas accès à vos fichiers téléchargés et à la section des personnes.",
"confirm_set_brain_status_to_public": "Oui, définir comme public",
"cancel_set_brain_status_to_public": "Non, le garder privé",
"brain_library_button_label": "Bibliothèque des cerveaux",
"public_brains_search_bar_placeholder": "Rechercher des cerveaux publics",
"public_brain_subscribe_button_label": "S'abonner",
"public_brain_subscription_success_message": "Vous vous êtes abonné avec succès au cerveau",
"public_brain_last_update_label": "Dernière mise à jour",
"public_brain_already_subscribed_button_label": "Abonné",
"set_brain_status_to_private_modal_title": "Êtes-vous sûr de vouloir définir ceci comme <span class='text-primary'>Privé</span>?<br/><br/>",
"set_brain_status_to_private_modal_description": "Les utilisateurs de Quivr ne pourront plus utiliser ce cerveau et ne le verront plus dans la bibliothèque des cerveaux.",
"confirm_set_brain_status_to_private": "Oui, définir comme privé",
"cancel_set_brain_status_to_private": "Non, le laisser public",
"brain_management_button_label": "Gestion des cerveaux",
"empty_brain_description": "Pas de description",
"myBrains": "Mes cerveaux",
"knowledge_source_doc": "Documents",
"knowledge_source_api": "API",
"knowledge_source_label": "Source de connaissance"
}

View File

@ -0,0 +1,10 @@
{
"method_label": "Method",
"url_placeholder": "URL",
"searchParams": "Search Params",
"headers": "Headers",
"params": "Params",
"key": "Key",
"type": "Type (string or number)",
"description": "Description"
}

View File

@ -1,50 +1,53 @@
{
"searchBrain": "Pesquisar cérebros",
"selectBrain": "Selecione um cérebro, por favor",
"brainCreated": "Cérebro criado com sucesso!",
"newBrain": "Adicione um novo cérebro",
"newBrainTitle": "Como você vai chamar esse cérebro?",
"newBrainSubtitle": "Subtítulo do cérebro",
"brainName": "Nome do cérebro",
"brainNamePlaceholder": "Ex: Albert Einstein",
"brainDescription": "Descrição",
"brainDescriptionPlaceholder": "Meu novo cérebro é sobre:",
"shareBrain": "Compartilhar cérebro {{name}}",
"shareBrainUsers": "Usuários com acesso",
"shareBrainLink": "Clique para copiar o link de compartilhamento",
"copiedToClipboard": "Copiado para a área de transferência",
"inviteUsers": "Adicionar novos usuários",
"usersInvited": "Usuários convidados com sucesso",
"errorSendingInvitation": "Um erro ocorreu ao enviar o(s) convite(s)",
"brainUndefined": "Cérebro não está definido",
"noBrainUsers": "Sem cérebros",
"errorFetchingBrainUsers": "Um erro ocorreu ao buscar os cérebros",
"usersWithAccess": "Usuários com acesso",
"userRoleUpdated": "Atualização de {{email}} para {{newRole}} concluída",
"userRoleUpdateFailed": "Atualização de {{email}} para {{newRole}} falhou",
"userRemoved": "O e-mail {{email}} foi removido do cérebro",
"userRemoveFailed": "Remoção do e-mail {{email}} do cérebro falhou",
"defaultBrain": "Cérebro padrão",
"setDefaultBrain": "Defina como o cérebro padrão",
"errorCreatingBrain": "Um erro aconteceu ao criar o cérebro",
"private_brain_label": "Privado",
"public_brain_label": "Público",
"brain_status_label": "Status",
"set_brain_status_to_public_modal_title": "Tem certeza de que deseja definir isso como <span class='text-primary'>Público</span>?<br/><br/>",
"set_brain_status_to_public_modal_description": "Cada usuário do Quivr poderá:<br/>- Se inscrever em seu cérebro na 'biblioteca de cérebros'.<br/>- Usar este cérebro e verificar as configurações de prompts e modelos.<br/><br/>Eles não terão acesso aos seus arquivos enviados e à seção de pessoas.",
"confirm_set_brain_status_to_public": "Sim, definir como público",
"cancel_set_brain_status_to_public": "Não, mantê-lo privado",
"brain_library_button_label": "Biblioteca de cérebros",
"public_brains_search_bar_placeholder": "Pesquisar cérebros públicos",
"public_brain_subscribe_button_label": "Inscrever-se",
"public_brain_subscription_success_message": "Você se inscreveu com sucesso no cérebro",
"public_brain_last_update_label": "Última atualização",
"public_brain_already_subscribed_button_label": "Inscrito",
"set_brain_status_to_private_modal_title": "Tem a certeza de que deseja definir isto como <span class='text-primary'>Privado</span>?<br/><br/>",
"set_brain_status_to_private_modal_description": "Os utilizadores do Quivr não poderão mais utilizar este cérebro e não o verão na biblioteca de cérebros.",
"confirm_set_brain_status_to_private": "Sim, definir como privado",
"cancel_set_brain_status_to_private": "Não, mantê-lo público",
"brain_management_button_label": "Gerenciamento de cérebros",
"empty_brain_description":"Sem descrição",
"myBrains": "Meus cérebros"
}
"searchBrain": "Pesquisar cérebros",
"selectBrain": "Selecione um cérebro, por favor",
"brainCreated": "Cérebro criado com sucesso!",
"newBrain": "Adicione um novo cérebro",
"newBrainTitle": "Como você vai chamar esse cérebro?",
"newBrainSubtitle": "Subtítulo do cérebro",
"brainName": "Nome do cérebro",
"brainNamePlaceholder": "Ex: Albert Einstein",
"brainDescription": "Descrição",
"brainDescriptionPlaceholder": "Meu novo cérebro é sobre:",
"shareBrain": "Compartilhar cérebro {{name}}",
"shareBrainUsers": "Usuários com acesso",
"shareBrainLink": "Clique para copiar o link de compartilhamento",
"copiedToClipboard": "Copiado para a área de transferência",
"inviteUsers": "Adicionar novos usuários",
"usersInvited": "Usuários convidados com sucesso",
"errorSendingInvitation": "Um erro ocorreu ao enviar o(s) convite(s)",
"brainUndefined": "Cérebro não está definido",
"noBrainUsers": "Sem cérebros",
"errorFetchingBrainUsers": "Um erro ocorreu ao buscar os cérebros",
"usersWithAccess": "Usuários com acesso",
"userRoleUpdated": "Atualização de {{email}} para {{newRole}} concluída",
"userRoleUpdateFailed": "Atualização de {{email}} para {{newRole}} falhou",
"userRemoved": "O e-mail {{email}} foi removido do cérebro",
"userRemoveFailed": "Remoção do e-mail {{email}} do cérebro falhou",
"defaultBrain": "Cérebro padrão",
"setDefaultBrain": "Defina como o cérebro padrão",
"errorCreatingBrain": "Um erro aconteceu ao criar o cérebro",
"private_brain_label": "Privado",
"public_brain_label": "Público",
"brain_status_label": "Status",
"set_brain_status_to_public_modal_title": "Tem certeza de que deseja definir isso como <span class='text-primary'>Público</span>?<br/><br/>",
"set_brain_status_to_public_modal_description": "Cada usuário do Quivr poderá:<br/>- Se inscrever em seu cérebro na 'biblioteca de cérebros'.<br/>- Usar este cérebro e verificar as configurações de prompts e modelos.<br/><br/>Eles não terão acesso aos seus arquivos enviados e à seção de pessoas.",
"confirm_set_brain_status_to_public": "Sim, definir como público",
"cancel_set_brain_status_to_public": "Não, mantê-lo privado",
"brain_library_button_label": "Biblioteca de cérebros",
"public_brains_search_bar_placeholder": "Pesquisar cérebros públicos",
"public_brain_subscribe_button_label": "Inscrever-se",
"public_brain_subscription_success_message": "Você se inscreveu com sucesso no cérebro",
"public_brain_last_update_label": "Última atualização",
"public_brain_already_subscribed_button_label": "Inscrito",
"set_brain_status_to_private_modal_title": "Tem a certeza de que deseja definir isto como <span class='text-primary'>Privado</span>?<br/><br/>",
"set_brain_status_to_private_modal_description": "Os utilizadores do Quivr não poderão mais utilizar este cérebro e não o verão na biblioteca de cérebros.",
"confirm_set_brain_status_to_private": "Sim, definir como privado",
"cancel_set_brain_status_to_private": "Não, mantê-lo público",
"brain_management_button_label": "Gerenciamento de cérebros",
"empty_brain_description": "Sem descrição",
"myBrains": "Meus cérebros",
"knowledge_source_doc": "Documentos",
"knowledge_source_api": "API",
"knowledge_source_label": "Fonte de conhecimento"
}

View File

@ -0,0 +1,10 @@
{
"method_label": "Method",
"url_placeholder": "URL",
"searchParams": "Search Params",
"headers": "Headers",
"params": "Params",
"key": "Key",
"type": "Type (string or number)",
"description": "Description"
}

View File

@ -1,50 +1,53 @@
{
"searchBrain": "Поиск мозга",
"selectBrain": "Выберите мозг, пожалуйста",
"brainCreated": "Мозг успешно создан",
"newBrain": "Добавить новый мозг",
"newBrainTitle": "Добавить новый мозг",
"newBrainSubtitle": "Создайте новое пространство для ваших данных",
"brainName": "Название мозга",
"brainNamePlaceholder": "Например, Заметки по истории",
"brainDescription": "Описание",
"brainDescriptionPlaceholder": "Мой новый мозг - это...",
"shareBrain": "Поделиться мозгом {{name}}",
"shareBrainUsers": "Пользователи с доступом",
"shareBrainLink": "Нажмите, чтобы скопировать ссылку для совместного использования мозга",
"copiedToClipboard": "Скопировано в буфер обмена",
"inviteUsers": "Добавить новых пользователей",
"usersInvited": "Пользователи успешно приглашены",
"errorSendingInvitation": "Ошибка при отправке приглашений",
"brainUndefined": "Мозг не определен",
"noBrainUsers": "Нет пользователей мозга",
"errorFetchingBrainUsers": "Ошибка при получении пользователей мозга",
"usersWithAccess": "Пользователи с доступом",
"userRoleUpdated": "{{email}} обновлен до {{newRole}}",
"userRoleUpdateFailed": "Не удалось обновить {{email}} до {{newRole}}",
"userRemoved": "{{email}} удален из мозга",
"userRemoveFailed": "Не удалось удалить {{email}} из мозга",
"defaultBrain": "Мозг по умолчанию",
"setDefaultBrain": "Установить как мозг по умолчанию",
"errorCreatingBrain": "Произошла ошибка при создании мозга",
"private_brain_label": "Приватный",
"public_brain_label": "Публичный",
"brain_status_label": "Статус",
"set_brain_status_to_public_modal_title": "Вы уверены, что хотите установить это как <span class='text-primary'>Публичный</span>?<br/><br/>",
"set_brain_status_to_public_modal_description": "Каждый пользователь Quivr сможет:<br/>- Подписаться на ваш мозг в 'библиотеке мозгов'.<br/>- Использовать этот мозг и проверить настройки подсказок и модели.<br/><br/>У них не будет доступа к вашим загруженным файлам и разделу 'люди'.",
"confirm_set_brain_status_to_public": "Да, установить как публичный",
"cancel_set_brain_status_to_public": "Нет, оставить приватным",
"brain_library_button_label": "Библиотека мозгов",
"public_brains_search_bar_placeholder": "Поиск общественных мозгов",
"public_brain_subscribe_button_label": "Подписаться",
"public_brain_subscription_success_message": "Вы успешно подписались на мозг",
"public_brain_last_update_label": "Последнее обновление",
"public_brain_already_subscribed_button_label": "Вы уже подписаны",
"set_brain_status_to_private_modal_title": "Вы уверены, что хотите установить это как <span class='text-primary'>Частное</span>?<br/><br/>",
"set_brain_status_to_private_modal_description": "Пользователи Quivr больше не смогут использовать этот мозг, и они не увидят его в библиотеке мозгов.",
"confirm_set_brain_status_to_private": "Да, установить как частное",
"cancel_set_brain_status_to_private": "Нет, оставить общедоступным",
"brain_management_button_label": "Управление мозгом",
"empty_brain_description": "Нет описания",
"myBrains": "Мои мозги"
}
"searchBrain": "Поиск мозга",
"selectBrain": "Выберите мозг, пожалуйста",
"brainCreated": "Мозг успешно создан",
"newBrain": "Добавить новый мозг",
"newBrainTitle": "Добавить новый мозг",
"newBrainSubtitle": "Создайте новое пространство для ваших данных",
"brainName": "Название мозга",
"brainNamePlaceholder": "Например, Заметки по истории",
"brainDescription": "Описание",
"brainDescriptionPlaceholder": "Мой новый мозг - это...",
"shareBrain": "Поделиться мозгом {{name}}",
"shareBrainUsers": "Пользователи с доступом",
"shareBrainLink": "Нажмите, чтобы скопировать ссылку для совместного использования мозга",
"copiedToClipboard": "Скопировано в буфер обмена",
"inviteUsers": "Добавить новых пользователей",
"usersInvited": "Пользователи успешно приглашены",
"errorSendingInvitation": "Ошибка при отправке приглашений",
"brainUndefined": "Мозг не определен",
"noBrainUsers": "Нет пользователей мозга",
"errorFetchingBrainUsers": "Ошибка при получении пользователей мозга",
"usersWithAccess": "Пользователи с доступом",
"userRoleUpdated": "{{email}} обновлен до {{newRole}}",
"userRoleUpdateFailed": "Не удалось обновить {{email}} до {{newRole}}",
"userRemoved": "{{email}} удален из мозга",
"userRemoveFailed": "Не удалось удалить {{email}} из мозга",
"defaultBrain": "Мозг по умолчанию",
"setDefaultBrain": "Установить как мозг по умолчанию",
"errorCreatingBrain": "Произошла ошибка при создании мозга",
"private_brain_label": "Приватный",
"public_brain_label": "Публичный",
"brain_status_label": "Статус",
"set_brain_status_to_public_modal_title": "Вы уверены, что хотите установить это как <span class='text-primary'>Публичный</span>?<br/><br/>",
"set_brain_status_to_public_modal_description": "Каждый пользователь Quivr сможет:<br/>- Подписаться на ваш мозг в 'библиотеке мозгов'.<br/>- Использовать этот мозг и проверить настройки подсказок и модели.<br/><br/>У них не будет доступа к вашим загруженным файлам и разделу 'люди'.",
"confirm_set_brain_status_to_public": "Да, установить как публичный",
"cancel_set_brain_status_to_public": "Нет, оставить приватным",
"brain_library_button_label": "Библиотека мозгов",
"public_brains_search_bar_placeholder": "Поиск общественных мозгов",
"public_brain_subscribe_button_label": "Подписаться",
"public_brain_subscription_success_message": "Вы успешно подписались на мозг",
"public_brain_last_update_label": "Последнее обновление",
"public_brain_already_subscribed_button_label": "Вы уже подписаны",
"set_brain_status_to_private_modal_title": "Вы уверены, что хотите установить это как <span class='text-primary'>Частное</span>?<br/><br/>",
"set_brain_status_to_private_modal_description": "Пользователи Quivr больше не смогут использовать этот мозг, и они не увидят его в библиотеке мозгов.",
"confirm_set_brain_status_to_private": "Да, установить как частное",
"cancel_set_brain_status_to_private": "Нет, оставить общедоступным",
"brain_management_button_label": "Управление мозгом",
"empty_brain_description": "Нет описания",
"myBrains": "Мои мозги",
"knowledge_source_doc": "Документы",
"knowledge_source_api": "API",
"knowledge_source_label": "Источник знаний"
}

View File

@ -0,0 +1,10 @@
{
"method_label": "Method",
"url_placeholder": "URL",
"searchParams": "Search Params",
"headers": "Headers",
"params": "Params",
"key": "Key",
"type": "Type (string or number)",
"description": "Description"
}

View File

@ -46,5 +46,8 @@
"cancel_set_brain_status_to_private": "不,保持公开",
"brain_management_button_label": "管理",
"empty_brain_description": "无描述",
"myBrains": "我的大脑"
}
"myBrains": "我的大脑",
"knowledge_source_doc": "文档",
"knowledge_source_api": "API",
"knowledge_source_label": "知识来源"
}

View File

@ -0,0 +1,10 @@
{
"method_label": "Method",
"url_placeholder": "URL",
"searchParams": "Search Params",
"headers": "Headers",
"params": "Params",
"key": "Key",
"type": "Type (string or number)",
"description": "Description"
}