这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 29 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
# 🤖 AnythingLLM: A full-stack personalized AI assistant

[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/tim.svg?style=social&label=Follow%20%40Timothy%20Carambat)](https://twitter.com/tcarambat) [![](https://dcbadge.vercel.app/api/server/6UyHPeGZAC?compact=true&style=flat)](https://discord.gg/6UyHPeGZAC)

A full-stack application and tool suite that enables you to turn any document, resource, or piece of content into a piece of data that any LLM can use as reference during chatting. This application runs with very minimal overhead as by default the LLM and vectorDB are hosted remotely, but can be swapped for local instances. Currently this project supports [Pinecone](https://pinecone.io), [ChromaDB](https://trychroma.com) & more for vector storage and [OpenAI](https://openai.com) for LLM/chatting.
<p align="center">
<b>🤖 AnythingLLM: A full-stack personalized AI assistant</b>. <br />
A hyper-efficient and open-source document chatbot solution for all.
</p>

<p align="center">
<a href="https://twitter.com/tcarambat" target="_blank">
<img src="https://img.shields.io/twitter/url/https/twitter.com/tim.svg?style=social&label=Follow%20%40Timothy%20Carambat" alt="Twitter">
</a> |
<a href="https://discord.gg/6UyHPeGZAC" target="_blank">
<img src="https://dcbadge.vercel.app/api/server/6UyHPeGZAC?compact=true&style=flat" alt="Discord">
</a> |
<a href="https://github.com/Mintplex-Labs/anything-llm/blob/master/LICENSE" target="_blank">
<img src="https://img.shields.io/static/v1?label=license&message=MIT&color=white" alt="License">
</a> |
<a href="https://docs.mintplex.xyz/anythingllm-by-mintplex-labs/" target="_blank">
Docs
</a>
</p>

A full-stack application that enables you to turn any document, resource, or piece of content into context that any LLM can use as references during chatting. This application allows you to pick and choose which LLM or Vector Database you want to use. Currently this project supports [Pinecone](https://pinecone.io), [ChromaDB](https://trychroma.com) & more for vector storage and [OpenAI](https://openai.com) for LLM/chatting.


![Chatting](/images/screenshots/chat.png)
Expand All @@ -14,20 +30,21 @@ A full-stack application and tool suite that enables you to turn any document, r


### Product Overview
AnythingLLM aims to be a full-stack application where you can use commercial off-the-shelf LLMs with Long-term-memory solutions or use popular open source LLM and vectorDB solutions.
AnythingLLM aims to be a full-stack application where you can use commercial off-the-shelf LLMs or popular open source LLMs and vectorDB solutions.

Anything LLM is a full-stack product that you can run locally as well as host remotely and be able to chat intelligently with any documents you provide it.

AnythingLLM divides your documents into objects called `workspaces`. A Workspace functions a lot like a thread, but with the addition of containerization of your documents. Workspaces can share documents, but they do not talk to each other so you can keep your context for each workspace clean.

Some cool features of AnythingLLM
- Atomically manage documents to be used in long-term-memory from a simple UI
- Multi-user instance support and oversight
- Atomically manage documents in your vector database from a simple UI
- Two chat modes `conversation` and `query`. Conversation retains previous questions and amendments. Query is simple QA against your documents
- Each chat response contains a citation that is linked to the original content
- Simple technology stack for fast iteration
- Fully capable of being hosted remotely
- "Bring your own LLM" model and vector solution. _still in progress_
- Extremely efficient cost-saving measures for managing very large documents. you'll never pay to embed a massive document or transcript more than once. 90% more cost effective than other LTM chatbots
- 100% Cloud deployment ready.
- "Bring your own LLM" model. _still in progress - openai support only currently_
- Extremely efficient cost-saving measures for managing very large documents. You'll never pay to embed a massive document or transcript more than once. 90% more cost effective than other document chatbot solutions.

### Technical Overview
This monorepo consists of three main sections:
Expand All @@ -37,8 +54,8 @@ This monorepo consists of three main sections:

### Requirements
- `yarn` and `node` on your machine
- `python` 3.8+ for running scripts in `collector/`.
- access to an LLM like `GPT-3.5`, `GPT-4`*.
- `python` 3.9+ for running scripts in `collector/`.
- access to an LLM like `GPT-3.5`, `GPT-4`.
- a [Pinecone.io](https://pinecone.io) free account*.
*you can use drop in replacements for these. This is just the easiest to get up and running fast. We support multiple vector database providers.

Expand Down
3 changes: 1 addition & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "anything-llm-frontend",
"private": false,
"version": "0.0.1-beta",
"type": "module",
"license": "MIT",
"scripts": {
Expand Down Expand Up @@ -44,4 +43,4 @@
"tailwindcss": "^3.3.1",
"vite": "^4.3.0"
}
}
}
35 changes: 34 additions & 1 deletion frontend/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,50 @@
import React, { lazy, Suspense } from "react";
import { Routes, Route } from "react-router-dom";
import { ContextWrapper } from "./AuthContext";
import PrivateRoute, { AdminRoute } from "./components/PrivateRoute";

const Main = lazy(() => import("./pages/Main"));
const InvitePage = lazy(() => import("./pages/Invite"));
const WorkspaceChat = lazy(() => import("./pages/WorkspaceChat"));
const AdminUsers = lazy(() => import("./pages/Admin/Users"));
const AdminInvites = lazy(() => import("./pages/Admin/Invitations"));
const AdminWorkspaces = lazy(() => import("./pages/Admin/Workspaces"));
const AdminChats = lazy(() => import("./pages/Admin/Chats"));
const AdminSystem = lazy(() => import("./pages/Admin/System"));

export default function App() {
return (
<Suspense fallback={<div />}>
<ContextWrapper>
<Routes>
<Route path="/" element={<Main />} />
<Route path="/workspace/:slug" element={<WorkspaceChat />} />
<Route
path="/workspace/:slug"
element={<PrivateRoute Component={WorkspaceChat} />}
/>
<Route path="/accept-invite/:code" element={<InvitePage />} />

{/* Admin Routes */}
<Route
path="/admin/system-preferences"
element={<AdminRoute Component={AdminSystem} />}
/>
<Route
path="/admin/invites"
element={<AdminRoute Component={AdminInvites} />}
/>
<Route
path="/admin/users"
element={<AdminRoute Component={AdminUsers} />}
/>
<Route
path="/admin/workspaces"
element={<AdminRoute Component={AdminWorkspaces} />}
/>
<Route
path="/admin/workspace-chats"
element={<AdminRoute Component={AdminChats} />}
/>
</Routes>
</ContextWrapper>
</Suspense>
Expand Down
13 changes: 7 additions & 6 deletions frontend/src/AuthContext.jsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
import React, { useState, createContext } from "react";
import { AUTH_TOKEN, AUTH_USER } from "./utils/constants";

export const AuthContext = createContext(null);
export function ContextWrapper(props) {
const localUser = localStorage.getItem("anythingllm_user");
const localAuthToken = localStorage.getItem("anythingllm_authToken");
const localUser = localStorage.getItem(AUTH_USER);
const localAuthToken = localStorage.getItem(AUTH_TOKEN);
const [store, setStore] = useState({
user: localUser ? JSON.parse(localUser) : null,
authToken: localAuthToken ? localAuthToken : null,
});

const [actions] = useState({
updateUser: (user, authToken = "") => {
localStorage.setItem("anythingllm_user", JSON.stringify(user));
localStorage.setItem("anythingllm_authToken", authToken);
localStorage.setItem(AUTH_USER, JSON.stringify(user));
localStorage.setItem(AUTH_TOKEN, authToken);
setStore({ user, authToken });
},
unsetUser: () => {
localStorage.removeItem("anythingllm_user");
localStorage.removeItem("anythingllm_authToken");
localStorage.removeItem(AUTH_USER);
localStorage.removeItem(AUTH_TOKEN);
setStore({ user: null, authToken: null });
},
});
Expand Down
Loading