From 40d55f40422fd3fe6759a61b97388467b4ba0ed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Ekin=20Y=C4=B1ld=C4=B1r=C4=B1m?= <101638632+beyildirim@users.noreply.github.com> Date: Mon, 15 Jul 2024 06:07:17 +0300 Subject: [PATCH 01/10] Digital Ocean Terraform Patches (#1866) Added necessary deployment steps. Modified not supported Ubuntu version with the latest LTS option. Co-authored-by: thealice --- cloud-deployments/digitalocean/terraform/DEPLOY.md | 10 ++++++---- cloud-deployments/digitalocean/terraform/main.tf | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cloud-deployments/digitalocean/terraform/DEPLOY.md b/cloud-deployments/digitalocean/terraform/DEPLOY.md index 1877abc2e..7baf5d401 100644 --- a/cloud-deployments/digitalocean/terraform/DEPLOY.md +++ b/cloud-deployments/digitalocean/terraform/DEPLOY.md @@ -12,16 +12,18 @@ The output of this Terraform configuration will be: - Follow the instructions in the [official Terraform documentation](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) for your operating system. ## How to deploy on DigitalOcean -Open your terminal and navigate to the `digitalocean/terraform` folder -1. Replace the token value in the provider "digitalocean" block in main.tf with your DigitalOcean API token. -2. Run the following commands to initialize Terraform, review the infrastructure changes, and apply them: +Open your terminal and navigate to the `docker` folder +1. Create a `.env` file by cloning the `.env.example`. +2. Navigate to `digitalocean/terraform` folder. +3. Replace the token value in the provider "digitalocean" block in main.tf with your DigitalOcean API token. +4. Run the following commands to initialize Terraform, review the infrastructure changes, and apply them: ``` terraform init terraform plan terraform apply ``` Confirm the changes by typing yes when prompted. -4. Once the deployment is complete, Terraform will output the public IP address of your droplet. You can access your application using this IP address. +5. Once the deployment is complete, Terraform will output the public IP address of your droplet. You can access your application using this IP address. ## How to deploy on DigitalOcean To delete the resources created by Terraform, run the following command in the terminal: diff --git a/cloud-deployments/digitalocean/terraform/main.tf b/cloud-deployments/digitalocean/terraform/main.tf index 331d254e3..7a76f57b2 100644 --- a/cloud-deployments/digitalocean/terraform/main.tf +++ b/cloud-deployments/digitalocean/terraform/main.tf @@ -16,7 +16,7 @@ provider "digitalocean" { resource "digitalocean_droplet" "anything_llm_instance" { - image = "ubuntu-22-10-x64" + image = "ubuntu-24-04-x64" name = "anything-llm-instance" region = "nyc3" size = "s-2vcpu-2gb" From f367d82ebd9efee49dd5eeab41b56027d3440e61 Mon Sep 17 00:00:00 2001 From: ux-builder Date: Tue, 16 Jul 2024 03:32:57 +0900 Subject: [PATCH 02/10] Add Korean translation + add more translation items (#1863) * Add Korean translation * Modal Password translation complement * Add a SettingsSidebar translation * DefaultChat translation complete * New Workspace translation complete --- frontend/src/components/DefaultChat/index.jsx | 91 ++-- .../src/components/Modals/NewWorkspace.jsx | 10 +- .../Modals/Password/MultiUserAuth.jsx | 21 +- .../src/components/SettingsSidebar/index.jsx | 11 +- frontend/src/components/Sidebar/index.jsx | 7 +- frontend/src/locales/en/common.js | 38 ++ frontend/src/locales/es/common.js | 38 ++ frontend/src/locales/fr/common.js | 38 ++ frontend/src/locales/ko/common.js | 483 ++++++++++++++++++ frontend/src/locales/resources.js | 4 + frontend/src/locales/ru/common.js | 41 ++ frontend/src/locales/zh/common.js | 36 ++ 12 files changed, 741 insertions(+), 77 deletions(-) create mode 100644 frontend/src/locales/ko/common.js diff --git a/frontend/src/components/DefaultChat/index.jsx b/frontend/src/components/DefaultChat/index.jsx index ae52a0d2b..4241ed71e 100644 --- a/frontend/src/components/DefaultChat/index.jsx +++ b/frontend/src/components/DefaultChat/index.jsx @@ -17,6 +17,7 @@ import UserIcon from "../UserIcon"; import { userFromStorage } from "@/utils/request"; import { AI_BACKGROUND_COLOR, USER_BACKGROUND_COLOR } from "@/utils/constants"; import useUser from "@/hooks/useUser"; +import { useTranslation, Trans } from "react-i18next"; export default function DefaultChatContainer() { const [mockMsgs, setMockMessages] = useState([]); @@ -28,6 +29,7 @@ export default function DefaultChatContainer() { hideModal: hideNewWsModal, } = useNewWorkspaceModal(); const popMsg = !window.localStorage.getItem("anythingllm_intro"); + const { t } = useTranslation(); useEffect(() => { const fetchData = async () => { @@ -38,7 +40,7 @@ export default function DefaultChatContainer() { }, []); const MESSAGES = [ - +
@@ -51,18 +53,14 @@ export default function DefaultChatContainer() { - Welcome to AnythingLLM, AnythingLLM is an open-source AI tool by - Mintplex Labs that turns anything into a trained chatbot you can - query and chat with. AnythingLLM is a BYOK (bring-your-own-keys) - software so there is no subscription, fee, or charges for this - software outside of the services you want to use with it. + {t("welcomeMessage.part1")}
, - +
@@ -75,17 +73,14 @@ export default function DefaultChatContainer() { - AnythingLLM is the easiest way to put powerful AI products like - OpenAi, GPT-4, LangChain, PineconeDB, ChromaDB, and other services - together in a neat package with no fuss to increase your - productivity by 100x. + {t("welcomeMessage.part2")}
, - +
@@ -98,20 +93,16 @@ export default function DefaultChatContainer() { - AnythingLLM can run totally locally on your machine with little - overhead you wont even notice it's there! No GPU needed. Cloud - and on-premises installation is available as well. -
- The AI tooling ecosystem gets more powerful everyday. - AnythingLLM makes it easy to use. + {t("welcomeMessage.part3")}
-

Create an issue on Github

+

{t("welcomeMessage.githubIssue")}

@@ -119,7 +110,7 @@ export default function DefaultChatContainer() {
, - +
@@ -135,14 +126,14 @@ export default function DefaultChatContainer() { - How do I get started?! + {t("welcomeMessage.user1")}
, - +
@@ -155,13 +146,7 @@ export default function DefaultChatContainer() { - It's simple. All collections are organized into buckets we call{" "} - "Workspaces". Workspaces are buckets of files, documents, - images, PDFs, and other files which will be transformed into - something LLM's can understand and use in conversation. -
-
- You can add and remove files at anytime. + {t("welcomeMessage.part4")}
{(!user || user?.role !== "default") && ( @@ -170,7 +155,7 @@ export default function DefaultChatContainer() { className="mt-5 w-fit transition-all duration-300 border border-slate-200 px-4 py-2 rounded-lg text-white text-sm items-center flex gap-x-2 hover:bg-slate-200 hover:text-slate-800 focus:ring-gray-800" > -

Create your first workspace

+

{t("welcomeMessage.createWorkspace")}

)}
@@ -179,7 +164,7 @@ export default function DefaultChatContainer() {
, - +
@@ -195,15 +180,14 @@ export default function DefaultChatContainer() { - Is this like an AI dropbox or something? What about chatting? It - is a chatbot isn't it? + {t("welcomeMessage.user2")}
, - +
@@ -216,32 +200,20 @@ export default function DefaultChatContainer() { - AnythingLLM is more than a smarter Dropbox. -
-
- AnythingLLM offers two ways of talking with your data: -
-
- Query: Your chats will return data or inferences found with - the documents in your workspace it has access to. Adding more - documents to the Workspace make it smarter! -
-
- Conversational: Your documents + your on-going chat history - both contribute to the LLM knowledge at the same time. Great for - appending real-time text-based info or corrections and - misunderstandings the LLM might have. -
-
- You can toggle between either mode{" "} - in the middle of chatting! + , + br:
, + }} + />
, - +
@@ -257,14 +229,14 @@ export default function DefaultChatContainer() { - Wow, this sounds amazing, let me try it out already! + {t("welcomeMessage.user3")}
, - +
@@ -277,24 +249,25 @@ export default function DefaultChatContainer() { - Have Fun! + {t("welcomeMessage.part6")}
diff --git a/frontend/src/components/Modals/NewWorkspace.jsx b/frontend/src/components/Modals/NewWorkspace.jsx index 01f370633..87edef9d7 100644 --- a/frontend/src/components/Modals/NewWorkspace.jsx +++ b/frontend/src/components/Modals/NewWorkspace.jsx @@ -2,11 +2,13 @@ import React, { useRef, useState } from "react"; import { X } from "@phosphor-icons/react"; import Workspace from "@/models/workspace"; import paths from "@/utils/paths"; +import { useTranslation } from "react-i18next"; const noop = () => false; export default function NewWorkspaceModal({ hideModal = noop }) { const formEl = useRef(null); const [error, setError] = useState(null); + const { t } = useTranslation(); const handleCreate = async (e) => { setError(null); e.preventDefault(); @@ -29,7 +31,9 @@ export default function NewWorkspaceModal({ hideModal = noop }) {
-

New Workspace

+

+ {t("new-workspace.title")} +

diff --git a/frontend/src/components/SettingsSidebar/index.jsx b/frontend/src/components/SettingsSidebar/index.jsx index 723867e2e..bde09e905 100644 --- a/frontend/src/components/SettingsSidebar/index.jsx +++ b/frontend/src/components/SettingsSidebar/index.jsx @@ -116,7 +116,7 @@ export default function SettingsSidebar() { to={paths.settings.privacy()} className="text-darker hover:text-white text-xs leading-[18px] mx-3" > - Privacy & Data + {t("settings.privacy")}
@@ -163,7 +163,7 @@ export default function SettingsSidebar() { to={paths.settings.privacy()} className="text-darker hover:text-white text-xs leading-[18px] mx-3" > - Privacy & Data + {t("settings.privacy")} @@ -179,6 +179,7 @@ export default function SettingsSidebar() { function SupportEmail() { const [supportEmail, setSupportEmail] = useState(paths.mailToMintplex()); + const { t } = useTranslation(); useEffect(() => { const fetchSupportEmail = async () => { @@ -197,7 +198,7 @@ function SupportEmail() { to={supportEmail} className="text-darker hover:text-white text-xs leading-[18px] mx-3 mt-1" > - Contact Support + {t("settings.contact")} ); } @@ -234,7 +235,7 @@ const SidebarOptions = ({ user = null, t }) => ( roles: ["admin"], }, { - btnText: "Voice & Speech", + btnText: t("settings.voice-speech"), href: paths.settings.audioPreference(), flex: true, roles: ["admin"], @@ -338,7 +339,7 @@ const SidebarOptions = ({ user = null, t }) => ( />