import React, { useEffect, useState } from "react"; import { GithubLogo, GitMerge, EnvelopeSimple, Plus, } from "@phosphor-icons/react"; import NewWorkspaceModal, { useNewWorkspaceModal, } from "../Modals/NewWorkspace"; import paths from "@/utils/paths"; import { isMobile } from "react-device-detect"; import { SidebarMobileHeader } from "../Sidebar"; import ChatBubble from "../ChatBubble"; import System from "@/models/system"; import UserIcon from "../UserIcon"; import { userFromStorage } from "@/utils/request"; import { AI_BACKGROUND_COLOR, USER_BACKGROUND_COLOR } from "@/utils/constants"; import useUser from "@/hooks/useUser"; export default function DefaultChatContainer() { const [mockMsgs, setMockMessages] = useState([]); const { user } = useUser(); const [fetchedMessages, setFetchedMessages] = useState([]); const { showing: showingNewWsModal, showModal: showNewWsModal, hideModal: hideNewWsModal, } = useNewWorkspaceModal(); const popMsg = !window.localStorage.getItem("anythingllm_intro"); useEffect(() => { const fetchData = async () => { const fetchedMessages = await System.getWelcomeMessages(); setFetchedMessages(fetchedMessages); }; fetchData(); }, []); const MESSAGES = [
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.
,
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.
,
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.

Create an issue on Github

,
How do I get started?!
,
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.
{(!user || user?.role !== "default") && ( )}
,
Is this like an AI dropbox or something? What about chatting? It is a chatbot isn't it?
,
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!
,
Wow, this sounds amazing, let me try it out already!
,
, ]; useEffect(() => { function processMsgs() { if (!!window.localStorage.getItem("anythingllm_intro")) { setMockMessages([...MESSAGES]); return false; } else { setMockMessages([MESSAGES[0]]); } var timer = 500; var messages = []; MESSAGES.map((child) => { setTimeout(() => { setMockMessages([...messages, child]); messages.push(child); }, timer); timer += 2_500; }); window.localStorage.setItem("anythingllm_intro", 1); } processMsgs(); }, []); return (
{isMobile && } {fetchedMessages.length === 0 ? mockMsgs.map((content, i) => { return {content}; }) : fetchedMessages.map((fetchedMessage, i) => { return ( ); })} {showingNewWsModal && }
); }