base on LLMs custom-chatbots console ⚡
<p>
<img alt="GitHub Contributors" src="https://img.shields.io/github/contributors/openchatai/openchat" />
<img alt="GitHub Last Commit" src="https://img.shields.io/github/last-commit/openchatai/openchat" />
<img alt="" src="https://img.shields.io/github/repo-size/openchatai/openchat" />
<img alt="GitHub Issues" src="https://img.shields.io/github/issues/openchatai/openchat" />
<img alt="GitHub Pull Requests" src="https://img.shields.io/github/issues-pr/openchatai/openchat" />
<img alt="Github License" src="https://img.shields.io/badge/License-MIT-yellow.svg" />
<img alt="Discord" src="https://img.shields.io/discord/1110910277110743103?label=Discord&logo=discord&logoColor=white&style=plastic&color=d7b023)](https://discord.gg/Q8hHfdav" />
</p>
![](https://gcdnb.pbrd.co/images/gjX4atjx9uKT.png?o=1)
------
# 🔥 OpenChat
----
OpenChat is an everyday user chatbot console that simplifies the utilization of large language models. With the advancements in AI, the installation and usage of these models have become overwhelming. OpenChat aims to address this challenge by providing a two-step setup process to create a comprehensive chatbot console. It serves as a central hub for managing multiple customized chatbots.
> Currently, OpenChat supports GPT models, and we are actively working on incorporating various open-source drivers that can be activated with a single click.
## Try it out:
**You can try it out on [openchat.so](http://openchat.so/)**
https://github.com/openchatai/OpenChat/assets/32633162/112a72a7-4314-474b-b7b5-91228558370c
Chinese Video Tutorial:https://www.bilibili.com/video/BV1YX4y1H7oN
## 🏁 Current Features
- Create unlimited local chatbots based on GPT-3 (and GPT-4 if available).
- Customize your chatbots by providing PDF files, websites, and soon, integrations with platforms like Notion, Confluence, and Office 365.
- Each chatbot has unlimited memory capacity, enabling seamless interaction with large files such as a 400-page PDF.
- Embed chatbots as widgets on your website or internal company tools.
- Use your entire codebase as a data source for your chatbots (pair programming mode).
- And much more!
## 🛣️ Roadmap:
- [x] Create unlimited chatbots
- [x] Share chatbots via URL
- [x] Integrate chatbots on any website using JS (as a widget on the bottom right corner)
- [x] Support GPT-3 models
- [x] Support vector database to provide chatbots with larger memory
- [x] Accept websites as a data source
- [x] Accept PDF files as a data source
- [x] Support multiple data sources per chatbot
- [x] Support ingesting an entire codebase using GitHub API and use it as a data source with pair programming mode
- [x] Support pre-defined messages with a single click
- [X] Support offline vector DB
- [X] Re write the backend in Python Django
- [ ] **In progress: re-write the frontend in Next.js & TS**
- [ ] Support Slack integration (allow users to connect chatbots with their Slack workspaces)
- [ ] Support Intercom integration (enable users to sync chat conversations with Intercom)
- [ ] Support offline open-source models (e.g., Alpaca, LLM drivers)
- [ ] Support Vertex AI and Palm as LLMs
- [ ] Support Confluence, Notion, Office 365, and Google Workspace
- [ ] Refactor the codebase to be API ready
- [ ] Create a new UI designer for website-embedded chatbots
- [ ] Support custom input fields for chatbots
- [ ] Support offline usage: this is a major feature, OpenChat will operate fully offline with no internet connection at this stage (offline LLMs, offline Vector DBs)
We love hearing from you! Got any cool ideas or requests? We're all ears! So, if you have something in mind, give us a shout!
## 🚀 Getting Started
- Make sure you have docker installed.
- To begin, clone this Git repository:
```bash
git clone
[email protected]:openchatai/OpenChat.git
```
---
### Setting Up Your Environment
**Note**: Starting July, Qdrant is our Preferred Open-Source Vector Store 🚀 No initial Pinecone registration required. To begin, delve into the comprehensive guide: [**Using Qdrant**](#using-qdrant), provided in the following section.
#### Before you begin, make sure to update the `common.env` file with the necessary keys:
```sh
OPENAI_API_KEY=# Retrieve from your [openai.com](https://www.openai.com) account
PINECONE_API_KEY=# Obtain from the "API Keys" tab in [pinecone](https://www.pinecone.io)
PINECONE_ENVIRONMENT=# Obtain after creating your index in [pinecone](https://www.pinecone.io)
VECTOR_STORE_INDEX_NAME=# Obtain after creating your index in [pinecone](https://www.pinecone.io)
STORE=pinecone
```
#### Using Azure OpenAI
- `USE_AZURE_OPENAI=true`: Whether to use the Azure OpenAI API.
- `AZURE_OPENAI_API_KEY`: Your Azure OpenAI API key.
- `AZURE_OPENAI_API_INSTANCE_NAME`: The name of your Azure OpenAI API instance.
- `AZURE_OPENAI_API_COMPLETIONS_DEPLOYMENT_NAME`: The name of the Azure OpenAI API deployment for completions.
- `AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME`: The name of the Azure OpenAI API deployment for embeddings.
#### Using Qdrant
If you want to switch from Pinecone to Qdrant, you can set the following environment variables:
- `OPENAI_API_KEY`= Your open ai key
- `QDRANT_URL`: The URL of the Qdrant server.
- `STORE`: The store to use to store embeddings. Can be `qdrant` or `pinecone`.
#### Optional [To modify the chat behaviour]
`CHAIN_TYPE` = The type of chain to use: `conversation_retrieval` | `retrieval_qa`
- `retrieval_qa` -> [Learn more](https://python.langchain.com/docs/use_cases/question_answering/how_to/vector_db_qa)
- `conversation_retrieval` -> [Learn more](https://python.langchain.com/docs/use_cases/question_answering/how_to/chat_vector_db)
#### Using Prebuilt Images
If you're experiencing slow internet speeds or if Docker builds are taking a long time, consider using the prebuilt images for your respective architecture. Simply comment out the unnecessary image line in the `docker-compose.yml` file and uncomment the appropriate prebuilt image line.
Example:
```yaml
# Mac environment
image: codebanesr/openchat_llm_server:edge_amd64
# Or, for Linux environment
image: codebanesr/openchat_llm_server:edge
```
> Note: for pincone db, make sure that the dimension is equal to 1536
- Navigate to the repository folder and run the following command (for MacOS or Linux):
```
make install
```
**or in case you are using Windows**
```
make.bat
```
Sure, here's the modified text with the additional line you requested:
# Getting Started with the Openchat Django App
Start your adventure of contributing to and using OpenChat, now remade using the Python programming language. You can begin by following the instructions in the guide available here: [OpenChat Python Guide](docs/django_release.md).
**Kindly be aware that the transition to the Python backend includes a significant alteration related to the Qdrant vector store, constituting a breaking change.**
Once the installation is complete, you can access the OpenChat console at: http://localhost:8000
## 🚀 Unleash the Power of Native LLM
Discover the latest addition: llama2 support. [Dive into this Guide to Harness LLAMA2 by Meta](docs/aug_26/readme.md) 📖🔮
***
### Full documentation [available here](https://docs.openchat.so/introduction)
## 🚀 Upgrade guide:
We do our best to not introduce breaking changes, so far, you only need to git pull and run `make install` whenever there is a new update.
## ❤️ Thanks:
- To [@mayooear](https://github.com/mayooear) for his work and tutorial on chatting with PDF files, we utilized a lot of his code in the LLM server.
## License
This project is licensed under the MIT License.
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/eltociear"><img src="https://avatars.githubusercontent.com/u/22633385?v=4?s=100" width="100px;" alt="Ikko Eltociear Ashimine"/><br /><sub><b>Ikko Eltociear Ashimine</b></sub></a><br /><a href="#ideas-eltociear" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/openchatai/OpenChat/commits?author=eltociear" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jsindy"><img src="https://avatars.githubusercontent.com/u/4966007?v=4?s=100" width="100px;" alt="Joshua Sindy"/><br /><sub><b>Joshua Sindy</b></sub></a><br /><a href="https://github.com/openchatai/OpenChat/issues?q=author%3Ajsindy" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/erjanmx"><img src="https://avatars.githubusercontent.com/u/4899432?v=4?s=100" width="100px;" alt="Erjan Kalybek"/><br /><sub><b>Erjan Kalybek</b></sub></a><br /><a href="https://github.com/openchatai/OpenChat/commits?author=erjanmx" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://woahai.com/"><img src="https://avatars.githubusercontent.com/u/115117306?v=4?s=100" width="100px;" alt="WoahAI"/><br /><sub><b>WoahAI</b></sub></a><br /><a href="https://github.com/openchatai/OpenChat/issues?q=author%3AWoahai321" title="Bug reports">🐛</a> <a href="https://github.com/openchatai/OpenChat/commits?author=Woahai321" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://space.bilibili.com/1900783"><img src="https://avatars.githubusercontent.com/u/36354458?v=4?s=100" width="100px;" alt="Tommy in Tongji"/><br /><sub><b>Tommy in Tongji</b></sub></a><br /><a href="https://github.com/openchatai/OpenChat/commits?author=TommyZihao" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://resume.applesauce.co.in"><img src="https://avatars.githubusercontent.com/u/17947802?v=4?s=100" width="100px;" alt="codebane"/><br /><sub><b>codebane</b></sub></a><br /><a href="https://github.com/openchatai/OpenChat/commits?author=codebanesr" title="Code">💻</a> <a href="https://github.com/openchatai/OpenChat/commits?author=codebanesr" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://gloobus.it"><img src="https://avatars.githubusercontent.com/u/27447535?v=4?s=100" width="100px;" alt="lvalics"/><br /><sub><b>lvalics</b></sub></a><br /><a href="https://github.com/openchatai/OpenChat/commits?author=lvalics" title="Code">💻</a> <a href="https://github.com/openchatai/OpenChat/commits?author=lvalics" title="Documentation">📖</a></td>
</tr>
</tbody>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
", Assign "at most 3 tags" to the expected json: {"id":"8008","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"