Top AI Repos โ open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
๐ค State-of-the-art, production ready LLM apps made mega-easy, so you don't have to build them from scratch ๐คฏ Create a bot, now ๐ซต
| Date | Stars |
|---|---|
| 2026-07-31 | 349 |
| 2026-08-06 | 349 |
Today
โ stars today
This week
โ stars this week
This month
โ stars this month
Momentum
0.0
growth rate 0.00%/day
# ๐ค Megabots
[](https://github.com/momegas/qnabot/actions/workflows/python-package.yml)
[](#supported-python-versions)
[](https://github.com/psf/black)
[](https://github.com/momegas/megabots/blob/main/LICENCE)

๐ค Megabots provides State-of-the-art, production ready LLM apps made mega-easy, so you don't have to build them from scratch ๐คฏ Create a bot, now ๐ซต
- ๐ Join us on Discord: https://discord.gg/zkqDWk5S7P
- โ๏ธ Work is managed in this project: https://github.com/users/momegas/projects/5/views/2
- ๐ค Documentation bot: https://huggingface.co/spaces/momegas/megabots
**The Megabots library can be used to create bots that:**
- โ๏ธ are production ready, in minutes
- ๐๏ธ can answer questions over documents
- ๐พ can connect to vector databases
- ๐๏ธ automatically expose the bot as a rebust API using FastAPI (early release)
- ๐ automatically expose the bot as a UI using Gradio
๐ค Megabots is backed by some of the most famous tools for productionalising AI. It uses [LangChain](https://docs.langchain.com/docs/) for managing LLM chains, [langchain-serve](https://github.com/jina-ai/langchain-serve) to create a production ready API, [Gradio](https://gradio.app/) to create a UI. At the moment it uses [OpenAI](https://openai.com/) to generate answers, but we plan to support other LLMs in the future.
## Getting started
Note: This is a work in progress. The API might change.
```bash
pip install megabots
```
```python
from megabots import bot
import os
os.environ["OPENAI_API_KEY"] = "my key"
# Create a bot ๐ with one line of code. Automatically loads your data from ./index or index.pkl.
# Keep in mind that you need to have one or another.
qnabot = bot("qna-over-docs")
# Ask a question
answer = qnabot.ask("How do I use this bot?")
# Save the index to save costs (GPT is used to create the index)
qnabot.save_index("index.pkl")
# Load the index from a previous run
qnabot = bot("qna-over-docs", index="./index.pkl")
# Or create the index from a directory of documents
qnabot = bot("qna-over-docs", index="./index")
# Change the model
qnabot = bot("qna-over-docs", model="text-davinci-003")
```
## Changing the bot's prompt
You can change the bots promnpt to customize it to your needs. In the `qna-over-docs` type of bot you will need to pass 2 variables for the `context` (knwoledge searched from the index) and the `question` (the human question).
```python
from megabots import bot
prompt = """
Use the following pieces of context to answer the question at the end.
If you don't know the answer, just say that you don't know, don't try to make up an answer.
Answer in the style of Tony Stark.
{context}
Question: {question}
Helpful humorous answer:"""
qnabot = bot("qna-over-docs", index="./index.pkl", prompt=prompt)
qnabot.ask("what was the first roster of the avengers?")
```
## Working with memory
You can easily add memory to your `bot` using the `memory` parameter. It accepts a string with the type of the memory to be used. This defaults to some sane dafaults.
Should you need more configuration, you can use the `memory` function and pass the type of memory and the configuration you need.
```python
from megabots import bot
qnabot = bot("qna-over-docs", index="./index.pkl", memory="conversation-buffer")
print(qnabot.ask("who is iron man?"))
print(qnabot.ask("was he in the first roster?"))
# Bot should understand who "he" refers to.
```
Or using the `memory`factory function
```python
from megabots import bot, memory
mem("conversation-buffer-window", k=5)
qnabot = bot("qna-over-docs", index="./index.pkl", memory=mem)
print(qnabot.ask("Excerpt of 13,277 characters
Read on GitHubWould you bet a product on this? Bounded 0โ100 and slow moving.
matched fp:f7d68f086ef02133, topic:nlp, topic:natural-language-processing
matched fp:f7d68f086ef02133, topic:faiss
matched fp:f7d68f086ef02133, topic:llama
matched fp:f7d68f086ef02133, topic:question-answering