Skip to content

Commit

Permalink
Update Render.com image for AnythignLLM to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycarambat committed Jan 18, 2024
2 parents 080ed9d + 0df8669 commit addb3d0
Show file tree
Hide file tree
Showing 110 changed files with 4,363 additions and 518 deletions.
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/01_bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: 🐛 Bug Report
description: File a bug report for AnythingLLM
title: "[BUG]: "
labels: [possible bug]
body:
- type: markdown
attributes:
value: |
Use this template to file a bug report for AnythingLLM. Please be as descriptive as possible to allow everyone to replicate and solve your issue.

Want help contributing a PR? Use our repo chatbot by OnboardAI! https://learnthisrepo.com/anythingllm

- type: dropdown
id: runtime
attributes:
label: How are you running AnythingLLM?
description: AnythingLLM can be run in many environments, pick the one that best represents where you encounter the bug.
options:
- Docker (local)
- Docker (remote machine)
- Local development
- AnythingLLM desktop app
- Not listed
default: 0
validations:
required: true

- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
validations:
required: true

- type: textarea
id: reproduction
attributes:
label: Are there known steps to reproduce?
description: |
Let us know how to reproduce the bug and we may be able to fix it more
quickly. This is not required, but it is helpful.
validations:
required: false
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/02_feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: ✨ New Feature suggestion
description: Suggest a new feature for AnythingLLM!
title: "[FEAT]: "
labels: [enhancement, feature request]
body:
- type: markdown
attributes:
value: |
Share a new idea for a feature or improvement. Be sure to search existing
issues first to avoid duplicates.
Want help contributing a PR? Use our repo chatbot by OnboardAI! https://learnthisrepo.com/anythingllm
- type: textarea
id: description
attributes:
label: What would you like to see?
description: |
Describe the feature and why it would be useful to your use-case as well as others.
validations:
required: true
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/03_documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 📚 Documentation improvement
title: "[DOCS]: "
description: Report an issue or problem with the documentation.
labels: [documentation]

body:
- type: textarea
id: description
attributes:
label: Description
description: Describe the issue with the documentation that is giving you trouble or causing confusion.
validations:
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: 🧑‍🤝‍🧑 Community Discord
url: https://discord.gg/6UyHPeGZAC
about: Interact with the Mintplex Labs community here by asking for help, discussing and more!
42 changes: 29 additions & 13 deletions .github/workflows/build-and-push-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ on:
push:
branches: ['master'] # master branch only. Do not modify.
paths-ignore:
- '*.md'
- '**.md'
- 'cloud-deployments/*'
- 'images/*'
- '.vscode/*'
- 'images/**/*'
- '.vscode/**/*'
- '**/.env.example'
- '.github/ISSUE_TEMPLATE/**/*'

jobs:
push_multi_platform_to_registries:
Expand All @@ -31,10 +32,18 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v4

- name: Parse repository name to lowercase
- name: Check if DockerHub build needed
shell: bash
run: echo "repo=${GITHUB_REPOSITORY,,}" >> $GITHUB_OUTPUT
id: lowercase_repo
run: |
# Check if the secret for USERNAME is set (don't even check for the password)
if [[ -z "${{ secrets.DOCKER_USERNAME }}" ]]; then
echo "DockerHub build not needed"
echo "enabled=false" >> $GITHUB_OUTPUT
else
echo "DockerHub build needed"
echo "enabled=true" >> $GITHUB_OUTPUT
fi
id: dockerhub

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -44,6 +53,8 @@ jobs:

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
# Only login to the Docker Hub if the repo is mintplex/anythingllm, to allow for forks to build on GHCR
if: steps.dockerhub.outputs.enabled == 'true'
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand All @@ -60,18 +71,23 @@ jobs:
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: |
mintplexlabs/anythingllm
${{ steps.dockerhub.outputs.enabled == 'true' && 'mintplexlabs/anythingllm' || '' }}
ghcr.io/${{ github.repository }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
- name: Build and push multi-platform Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: |
${{ steps.meta.outputs.tags }}
${{ github.ref_name == 'master' && 'mintplexlabs/anythingllm:latest' || '' }}
${{ github.ref_name == 'master' && format('ghcr.io/{0}:{1}', steps.lowercase_repo.outputs.repo, 'latest') || '' }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
10 changes: 6 additions & 4 deletions .github/workflows/build-and-push-render-deployment-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ on:
push:
branches: ['render']
paths-ignore:
- 'render.yaml'
- '*.md'
- '**.md'
- 'cloud-deployments/*'
- 'images/*'
- '.vscode/*'
- 'images/**/*'
- '.vscode/**/*'
- '**/.env.example'
- '.github/ISSUE_TEMPLATE/**/*'
- 'render.yaml'

jobs:
push_to_registries:
Expand Down
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
"cSpell.words": [
"Dockerized",
"Langchain",
"Milvus",
"Ollama",
"openai",
"Qdrant",
"Weaviate"
"vectordbs",
"Weaviate",
"Zilliz"
],
"eslint.experimental.useFlatConfig": true
}
32 changes: 24 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<a name="readme-top"></a>

<p align="center">
<a href="https://useanything.com"><img src="https://github.com/Mintplex-Labs/anything-llm/blob/master/images/wordmark.png?raw=true" alt="AnythingLLM logo"></a>
</p>
Expand Down Expand Up @@ -38,13 +39,14 @@ A full-stack application that enables you to turn any document, resource, or pie

</details>


### Product Overview

AnythingLLM is a full-stack application where you can use commercial off-the-shelf LLMs or popular open source LLMs and vectorDB solutions to build a private ChatGPT with no compromises 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

- **Multi-user instance support and permissioning**
- Multiple document type support (PDF, TXT, DOCX, etc)
- Manage documents in your vector database from a simple UI
Expand All @@ -57,7 +59,9 @@ Some cool features of AnythingLLM
- Full Developer API for custom integrations!

### Supported LLMs, Embedders, and Vector Databases

**Supported LLMs:**

- [Any open-source llama.cpp compatible model](/server/storage/models/README.md#text-generation-llm-selection)
- [OpenAI](https://openai.com)
- [Azure OpenAI](https://azure.microsoft.com/en-us/products/ai-services/openai-service)
Expand All @@ -66,51 +70,57 @@ Some cool features of AnythingLLM
- [Ollama (chat models)](https://ollama.ai/)
- [LM Studio (all models)](https://lmstudio.ai)
- [LocalAi (all models)](https://localai.io/)
- [Together AI (chat models)](https://www.together.ai/)
- [Mistral](https://mistral.ai/)

**Supported Embedding models:**

- [AnythingLLM Native Embedder](/server/storage/models/README.md) (default)
- [OpenAI](https://openai.com)
- [Azure OpenAI](https://azure.microsoft.com/en-us/products/ai-services/openai-service)
- [LM Studio (all)](https://lmstudio.ai)
- [LocalAi (all)](https://localai.io/)

**Supported Vector Databases:**

- [LanceDB](https://github.com/lancedb/lancedb) (default)
- [Pinecone](https://pinecone.io)
- [Chroma](https://trychroma.com)
- [Weaviate](https://weaviate.io)
- [QDrant](https://qdrant.tech)

- [Milvus](https://milvus.io)
- [Zilliz](https://zilliz.com)

### Technical Overview

This monorepo consists of three main sections:

- `frontend`: A viteJS + React frontend that you can run to easily create and manage all your content the LLM can use.
- `server`: A NodeJS express server to handle all the interactions and do all the vectorDB management and LLM interactions.
- `docker`: Docker instructions and build process + information for building from source.
- `collector`: NodeJS express server that process and parses documents from the UI.

## 🛳 Self Hosting

Mintplex Labs & the community maintain a number of deployment methods, scripts, and templates that you can use to run AnythingLLM locally. Refer to the table below to read how to deploy on your preferred environment or to automatically deploy.
| Docker | AWS | GCP | Digital Ocean | Render.com |
| Docker | AWS | GCP | Digital Ocean | Render.com |
|----------------------------------------|----:|-----|---------------|------------|
| [![Deploy on Docker][docker-btn]][docker-deploy] | [![Deploy on AWS][aws-btn]][aws-deploy] | [![Deploy on GCP][gcp-btn]][gcp-deploy] | [![Deploy on DigitalOcean][do-btn]][aws-deploy] | [![Deploy on Render.com][render-btn]][render-deploy] |

| [![Deploy on Docker][docker-btn]][docker-deploy] | [![Deploy on AWS][aws-btn]][aws-deploy] | [![Deploy on GCP][gcp-btn]][gcp-deploy] | [![Deploy on DigitalOcean][do-btn]][aws-deploy] | [![Deploy on Render.com][render-btn]][render-deploy] |

## How to setup for development

- `yarn setup` To fill in the required `.env` files you'll need in each of the application sections (from root of repo).
- Go fill those out before proceeding. Ensure `server/.env.development` is filled or else things won't work right.
- `yarn dev:server` To boot the server locally (from root of repo).
- `yarn dev:frontend` To boot the frontend locally (from root of repo).
- `yarn dev:collector` To then run the document collector (from root of repo).




[Learn about documents](./server/storage/documents/DOCUMENTS.md)

[Learn about vector caching](./server/storage/vector-cache/VECTOR_CACHE.md)

## Contributing

- create issue
- create PR with branch name format of `<issue number>-<short name>`
- yee haw let's merge
Expand All @@ -119,20 +129,25 @@ Mintplex Labs & the community maintain a number of deployment methods, scripts,
<summary><kbd>Telemetry for AnythingLLM</kbd></summary>

## Telemetry

AnythingLLM by Mintplex Labs Inc contains a telemetry feature that collects anonymous usage information.

### Why?

We use this information to help us understand how AnythingLLM is used, to help us prioritize work on new features and bug fixes, and to help us improve AnythingLLM's performance and stability.

### Opting out

Set `DISABLE_TELEMETRY` in your server or docker .env settings to "true" to opt out of telemetry.

```
DISABLE_TELEMETRY="true"
```

### What do you explicitly track?

We will only track usage details that help us make product and roadmap decisions, specifically:

- Version of your installation
- When a document is added or removed. No information _about_ the document. Just that the event occurred. This gives us an idea of use.
- Type of vector database in use. Let's us know which vector database provider is the most used to prioritize changes when updates arrive for that provider.
Expand Down Expand Up @@ -160,6 +175,7 @@ Copyright © 2023 [Mintplex Labs][profile-link]. <br />
This project is [MIT](./LICENSE) licensed.

<!-- LINK GROUP -->

[back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-222628?style=flat-square
[profile-link]: https://github.com/mintplex-labs
[vector-admin]: https://github.com/mintplex-labs/vector-admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,14 @@ server {
listen 80;
server_name [insert FQDN here];
location / {
# Prevent timeouts on long-running requests.
proxy_connect_timeout 605;
proxy_send_timeout 605;
proxy_read_timeout 605;
send_timeout 605;
keepalive_timeout 605;
proxy_pass http://0.0.0.0:3001;
}
}
}
3. Enter ':wq' to save the changes to the anything config file

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@
"\n",
"#!/bin/bash\n",
"# check output of userdata script with sudo tail -f /var/log/cloud-init-output.log\n",
"sudo yum install docker -y\n",
"sudo yum install docker iptables -y\n",
"sudo iptables -A OUTPUT -m owner ! --uid-owner root -d 169.254.169.254 -j DROP\n",
"sudo systemctl enable docker\n",
"sudo systemctl start docker\n",
"mkdir -p /home/ec2-user/anythingllm\n",
Expand Down
16 changes: 12 additions & 4 deletions collector/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,21 @@ app.post("/process", async function (request, response) {
const targetFilename = path
.normalize(filename)
.replace(/^(\.\.(\/|\\|$))+/, "");
const { success, reason } = await processSingleFile(targetFilename);
response.status(200).json({ filename: targetFilename, success, reason });
const {
success,
reason,
documents = [],
} = await processSingleFile(targetFilename);
response
.status(200)
.json({ filename: targetFilename, success, reason, documents });
} catch (e) {
console.error(e);
response.status(200).json({
filename: filename,
success: false,
reason: "A processing error occurred.",
documents: [],
});
}
return;
Expand All @@ -45,14 +52,15 @@ app.post("/process", async function (request, response) {
app.post("/process-link", async function (request, response) {
const { link } = reqBody(request);
try {
const { success, reason } = await processLink(link);
response.status(200).json({ url: link, success, reason });
const { success, reason, documents = [] } = await processLink(link);
response.status(200).json({ url: link, success, reason, documents });
} catch (e) {
console.error(e);
response.status(200).json({
url: link,
success: false,
reason: "A processing error occurred.",
documents: [],
});
}
return;
Expand Down
Loading

0 comments on commit addb3d0

Please sign in to comment.