这是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
8 changes: 4 additions & 4 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Welcome to the AnythingLLM development container configuration, designed to crea

## Getting Started

1. Using Github Codepaces. Just select to create a new workspace, and the devcontainer will be created for you.
1. Using GitHub Codespaces. Just select to create a new workspace, and the devcontainer will be created for you.

2. Using your Local VSCode (Release or Insiders). We suggest you first make a fork of the repo and then clone it to your local machine using VSCode tools. Then open the project folder in VSCode, which will prompt you to open the project in a devcontainer. Select yes, and the devcontainer will be created for you. If this does not happen, you can open the command palette and select "Remote-Containers: Reopen in Container".

Expand All @@ -36,16 +36,16 @@ Checklist:

- [ ] The usual message asking you to start the Server and Frontend in different windows are now "hidden" in the building process of the devcontainer. Don't forget to do as suggested.
- [ ] Open a JavaScript file, for example "server/index.js" and check if `eslint` is working. It will complain that `'err' is defined but never used.`. This means it is working.
- [ ] Open a React File, for example, "frontend/src/main.jsx," and check if `eslint` complains about `Fast refresh only works when a file has exports. Move your component(s) to a separate file.`. Again, it means `eslint` is working. Now check at the status bar if the `Prettier` has a double checkmark :heavy_check_mark: (double). It means Prettier is working. You will see a nice extension `Formatting:`:heavy_check_mark: that can be used to disable the `Format on Save` feature temporarily.
- [ ] Open a React File, for example, "frontend/src/main.jsx," and check if `eslint` complains about `Fast refresh only works when a file has exports. Move your component(s) to a separate file.`. Again, it means `eslint` is working. Now check at the status bar if the `Prettier` has a double checkmark :heavy_check_mark: (double). It means Prettier is working. You will see a nice extension `Formatting:`:heavy_check_mark: that can be used to disable the `Format on Save` feature temporarily.
- [ ] Check if, on the left pane, you have the NPM Scripts (this may be disabled; look at the "Explorer" tree-dots up-right). There will be scripts inside the `package.json` files. You will basically need to run the `dev:collector`, `dev:server` and the `dev:frontend` in this order. When the frontend finishes starting, a window browser will open **inside** the VSCode. Still, you can open it outside.

:warning: **Important for all developers** :warning:

- [ ] When you are using the `NODE_ENV=development` the server will not store the configurations you set for security reasons. Please set the proper config on file `.env.development`. The side-effect if you don't, everytime you restart the server, you will be sent to the "Onboarding" page again.

**Note when using Github Codespaces**
**Note when using GitHub Codespaces**

- [ ] When running the "Server" for the first time, it will automatically configure its port to be publicly accessible by default, as this is required for the front end to reach the server backend. To know more, read the content of the `.env` file on the frontend folder about this, and if any issues occur, make sure to manually set the port "Visibility" of the "Server" is set to "Public" if needed. Again, this is only needed for developing on Github Codespaces.
- [ ] When running the "Server" for the first time, it will automatically configure its port to be publicly accessible by default, as this is required for the front end to reach the server backend. To know more, read the content of the `.env` file on the frontend folder about this, and if any issues occur, make sure to manually set the port "Visibility" of the "Server" is set to "Public" if needed. Again, this is only needed for developing on GitHub Codespaces.


**For the Collector:**
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-and-push-image.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This Github action is for publishing of the primary image for AnythingLLM
# This GitHub action is for publishing of the primary image for AnythingLLM
# It will publish a linux/amd64 and linux/arm64 image at the same time
# This file should ONLY BY USED FOR `master` BRANCH.
# TODO: Github now has an ubuntu-24.04-arm64 runner, but we still need
# TODO: GitHub now has an ubuntu-24.04-arm64 runner, but we still need
# to use QEMU to build the arm64 image because Chromium is not available for Linux arm64
# so builds will still fail, or fail much more often. Its inconsistent and frustrating.
name: Publish AnythingLLM Primary Docker image (amd64/arm64)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-translations.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This Github action is for validation of all languages which translations are offered for
# This GitHub action is for validation of all languages which translations are offered for
# in the locales folder in `frontend/src`. All languages are compared to the EN translation
# schema since that is the fallback language setting. This workflow will run on all PRs that
# modify any files in the translation directory
Expand Down
2 changes: 1 addition & 1 deletion BARE_METAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ STORAGE_DIR="/your/absolute/path/to/server/storage"
5. Edit the `frontend/.env` file for the `VITE_BASE_API` to now be set to `/api`. This is documented in the .env for which one you should use.
```
# VITE_API_BASE='http://localhost:3001/api' # Use this URL when developing locally
# VITE_API_BASE="https://$CODESPACE_NAME-3001.$GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN/api" # for Github Codespaces
# VITE_API_BASE="https://$CODESPACE_NAME-3001.$GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN/api" # for GitHub Codespaces
VITE_API_BASE='/api' # Use this URL deploying on non-localhost address OR in docker.
```

Expand Down
2 changes: 1 addition & 1 deletion collector/extensions/resync/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async function resyncGithub({ chunkSource }, response) {
sourceFilePath: source.searchParams.get('path'),
});

if (!success) throw new Error(`Failed to sync Github file content. ${reason}`);
if (!success) throw new Error(`Failed to sync GitHub file content. ${reason}`);
response.status(200).json({ success, content });
} catch (e) {
console.error(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class GitHubRepoLoader {
// Not a github url at all.
if (url.hostname !== "github.com") {
console.log(
`[Github Loader]: Invalid Github URL provided! Hostname must be 'github.com'. Got ${url.hostname}`
`[GitHub Loader]: Invalid GitHub URL provided! Hostname must be 'github.com'. Got ${url.hostname}`
);
return false;
}
Expand All @@ -45,7 +45,7 @@ class GitHubRepoLoader {
const [author, project, ..._rest] = url.pathname.slice(1).split("/");
if (!author || !project) {
console.log(
`[Github Loader]: Invalid Github URL provided! URL must be in the format of 'github.com/{author}/{project}'. Got ${url.pathname}`
`[GitHub Loader]: Invalid GitHub URL provided! URL must be in the format of 'github.com/{author}/{project}'. Got ${url.pathname}`
);
return false;
}
Expand All @@ -55,7 +55,7 @@ class GitHubRepoLoader {
return true;
} catch (e) {
console.log(
`[Github Loader]: Invalid Github URL provided! Error: ${e.message}`
`[GitHub Loader]: Invalid GitHub URL provided! Error: ${e.message}`
);
return false;
}
Expand All @@ -68,10 +68,10 @@ class GitHubRepoLoader {
if (!!this.branch && this.branches.includes(this.branch)) return;

console.log(
"[Github Loader]: Branch not set! Auto-assigning to a default branch."
"[GitHub Loader]: Branch not set! Auto-assigning to a default branch."
);
this.branch = this.branches.includes("main") ? "main" : "master";
console.log(`[Github Loader]: Branch auto-assigned to ${this.branch}.`);
console.log(`[GitHub Loader]: Branch auto-assigned to ${this.branch}.`);
return;
}

Expand All @@ -90,7 +90,7 @@ class GitHubRepoLoader {
})
.catch((e) => {
console.error(
"Invalid Github Access Token provided! Access token will not be used",
"Invalid GitHub Access Token provided! Access token will not be used",
e.message
);
return false;
Expand Down Expand Up @@ -118,14 +118,14 @@ class GitHubRepoLoader {
* @throws {Error} If the RepoLoader is not in a ready state.
*/
async recursiveLoader() {
if (!this.ready) throw new Error("[Github Loader]: not in ready state!");
if (!this.ready) throw new Error("[GitHub Loader]: not in ready state!");
const {
GithubRepoLoader: LCGithubLoader,
} = require("@langchain/community/document_loaders/web/github");

if (this.accessToken)
console.log(
`[Github Loader]: Access token set! Recursive loading enabled!`
`[GitHub Loader]: Access token set! Recursive loading enabled!`
);

const loader = new LCGithubLoader(this.repo, {
Expand Down
16 changes: 8 additions & 8 deletions collector/utils/extensions/RepoLoader/GithubRepo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const { writeToServerDocuments } = require("../../../files");
const { tokenizeString } = require("../../../tokenizer");

/**
* Load in a Github Repo recursively or just the top level if no PAT is provided
* Load in a GitHub Repo recursively or just the top level if no PAT is provided
* @param {object} args - forwarded request body params
* @param {import("../../../middleware/setDataSigner").ResponseWithSigner} response - Express response object with encryptionWorker
* @returns
Expand All @@ -19,11 +19,11 @@ async function loadGithubRepo(args, response) {
if (!repo.ready)
return {
success: false,
reason: "Could not prepare Github repo for loading! Check URL",
reason: "Could not prepare GitHub repo for loading! Check URL",
};

console.log(
`-- Working Github ${repo.author}/${repo.project}:${repo.branch} --`
`-- Working GitHub ${repo.author}/${repo.project}:${repo.branch} --`
);
const docs = await repo.recursiveLoader();
if (!docs.length) {
Expand All @@ -33,7 +33,7 @@ async function loadGithubRepo(args, response) {
};
}

console.log(`[Github Loader]: Found ${docs.length} source files. Saving...`);
console.log(`[GitHub Loader]: Found ${docs.length} source files. Saving...`);
const outFolder = slugify(
`${repo.author}-${repo.project}-${repo.branch}-${v4().slice(0, 4)}`
).toLowerCase();
Expand Down Expand Up @@ -69,7 +69,7 @@ async function loadGithubRepo(args, response) {
token_count_estimate: tokenizeString(doc.pageContent),
};
console.log(
`[Github Loader]: Saving ${doc.metadata.source} to ${outFolder}`
`[GitHub Loader]: Saving ${doc.metadata.source} to ${outFolder}`
);
writeToServerDocuments(
data,
Expand All @@ -92,7 +92,7 @@ async function loadGithubRepo(args, response) {
}

/**
* Gets the page content from a specific source file in a give Github Repo, not all items in a repo.
* Gets the page content from a specific source file in a give GitHub Repo, not all items in a repo.
* @returns
*/
async function fetchGithubFile({
Expand All @@ -112,11 +112,11 @@ async function fetchGithubFile({
return {
success: false,
content: null,
reason: "Could not prepare Github repo for loading! Check URL or PAT.",
reason: "Could not prepare GitHub repo for loading! Check URL or PAT.",
};

console.log(
`-- Working Github ${repo.author}/${repo.project}:${repo.branch} file:${sourceFilePath} --`
`-- Working GitHub ${repo.author}/${repo.project}:${repo.branch} file:${sourceFilePath} --`
);
const fileContent = await repo.fetchSingleFile(sourceFilePath);
if (!fileContent) {
Expand Down
2 changes: 1 addition & 1 deletion collector/utils/extensions/RepoLoader/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Dynamically load the correct repository loader from a specific platform
* by default will return Github.
* by default will return GitHub.
* @param {('github'|'gitlab')} platform
* @returns {import("./GithubRepo/RepoLoader")|import("./GitlabRepo/RepoLoader")} the repo loader class for provider
*/
Expand Down
2 changes: 1 addition & 1 deletion frontend/.env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
VITE_API_BASE='http://localhost:3001/api' # Use this URL when developing locally
# VITE_API_BASE="https://$CODESPACE_NAME-3001.$GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN/api" # for Github Codespaces
# VITE_API_BASE="https://$CODESPACE_NAME-3001.$GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN/api" # for GitHub Codespaces
# VITE_API_BASE='/api' # Use this URL deploying on non-localhost address OR in docker.
4 changes: 2 additions & 2 deletions frontend/src/components/DataConnectorOption/media/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Github from "./github.svg";
import GitHub from "./github.svg";
import Gitlab from "./gitlab.svg";
import YouTube from "./youtube.svg";
import Link from "./link.svg";
import Confluence from "./confluence.jpeg";

const ConnectorImages = {
github: Github,
github: GitHub,
gitlab: Gitlab,
youtube: YouTube,
websiteDepth: Link,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/DefaultChat/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,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 light:border-black/50 light:text-theme-text-primary text-sm items-center flex gap-x-2 hover:bg-slate-200 hover:text-slate-800 focus:ring-gray-800"
>
<GithubLogo className="h-4 w-4" />
<p>{t("welcomeMessage.starOnGithub")}</p>
<p>{t("welcomeMessage.starOnGitHub")}</p>
</a>
<a
href={paths.mailToMintplex()}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Footer/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ export default function Footer() {
target="_blank"
rel="noreferrer"
className="transition-all duration-300 p-2 rounded-full bg-theme-sidebar-footer-icon hover:bg-theme-sidebar-footer-icon-hover"
aria-label="Find us on Github"
aria-label="Find us on GitHub"
data-tooltip-id="footer-item"
data-tooltip-content="View source code on Github"
data-tooltip-content="View source code on GitHub"
>
<GithubLogo
weight="fill"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default function GithubOptions() {
<div className="flex flex-col pr-10">
<div className="flex flex-col gap-y-1 mb-4">
<label className="text-white font-bold text-sm flex gap-x-2 items-center">
<p className="font-bold text-white">Github Access Token</p>{" "}
<p className="font-bold text-white">GitHub Access Token</p>{" "}
<p className="text-xs font-light flex items-center">
<span className="text-theme-text-secondary">
optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const DATA_CONNECTORS = {
name: "GitHub Repo",
image: ConnectorImages.github,
description:
"Import an entire public or private Github repository in a single click.",
"Import an entire public or private GitHub repository in a single click.",
options: <GithubOptions />,
},
gitlab: {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/locales/de/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const TRANSLATIONS = {
"AnythingLLM ist der einfachste Weg, leistungsstarke KI-Produkte wie OpenAI, GPT-4, LangChain, PineconeDB, ChromaDB und andere Dienste in einem übersichtlichen Paket ohne Aufwand zusammenzufassen, um Ihre Produktivität um das 100-fache zu steigern.",
part3:
"AnythingLLM kann vollständig lokal auf Ihrem Computer mit geringem Overhead laufen - Sie werden nicht einmal bemerken, dass es da ist! Keine GPU erforderlich. Cloud- und On-Premises-Installation ist ebenfalls verfügbar.\nDas KI-Tool-Ökosystem wird jeden Tag leistungsfähiger. AnythingLLM macht es einfach, es zu nutzen.",
githubIssue: "Erstellen Sie ein Problem auf Github",
githubIssue: "Erstellen Sie ein Problem auf GitHub",
user1: "Wie fange ich an?!",
part4:
'Es ist einfach. Alle Sammlungen sind in Behältern organisiert, die wir "Arbeitsbereiche" nennen. Arbeitsbereiche sind Behälter für Dateien, Dokumente, Bilder, PDFs und andere Dateien, die in etwas umgewandelt werden, das LLMs verstehen und in Gesprächen verwenden können.\n\nSie können jederzeit Dateien hinzufügen und entfernen.',
Expand All @@ -131,7 +131,7 @@ const TRANSLATIONS = {
"AnythingLLM ist mehr als eine intelligentere Dropbox.\n\nAnythingLLM bietet zwei Möglichkeiten, mit Ihren Daten zu sprechen:\n\n<i>Abfrage:</i> Ihre Chats geben Daten oder Schlussfolgerungen zurück, die in den Dokumenten Ihres Arbeitsbereichs gefunden wurden, auf die es Zugriff hat. Je mehr Dokumente Sie dem Arbeitsbereich hinzufügen, desto intelligenter wird er! \n\n<i>Konversation:</i> Ihre Dokumente + Ihr laufender Chat-Verlauf tragen gleichzeitig zum LLM-Wissen bei. Großartig für das Anhängen von Echtzeit-Textinformationen oder Korrekturen und Missverständnissen, die das LLM haben könnte. \n\nSie können zwischen beiden Modi wechseln \n<i>mitten im Chatten!</i>",
user3: "Wow, das klingt erstaunlich, lass es mich gleich ausprobieren!",
part6: "Viel Spaß!",
starOnGithub: "Stern auf GitHub",
starOnGitHub: "Stern auf GitHub",
contact: "Kontaktieren Sie Mintplex Labs",
},
"new-workspace": {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/locales/en/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const TRANSLATIONS = {
"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.",
part3:
"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.\nThe AI tooling ecosystem gets more powerful everyday. AnythingLLM makes it easy to use.",
githubIssue: "Create an issue on Github",
githubIssue: "Create an issue on GitHub",
user1: "How do I get started?!",
part4:
"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.\n\nYou can add and remove files at anytime.",
Expand All @@ -145,7 +145,7 @@ const TRANSLATIONS = {
"AnythingLLM is more than a smarter Dropbox.\n\nAnythingLLM offers two ways of talking with your data:\n\n<i>Query:</i> 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! \n\n<i>Conversational:</i> 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. \n\nYou can toggle between either mode \n<i>in the middle of chatting!</i>",
user3: "Wow, this sounds amazing, let me try it out already!",
part6: "Have Fun!",
starOnGithub: "Star on GitHub",
starOnGitHub: "Star on GitHub",
contact: "Contact Mintplex Labs",
},

Expand Down
Loading