Spaces:
Runtime error
Runtime error
Stavros Theocharis
commited on
Commit
β’
86c7913
1
Parent(s):
362b2b7
Minor additions and fixes
Browse files* Added gitattributes file
* Added types in .gitignore
* Fixed typos in example notebook
* Added parts in README
* Added missing packages in setup
- .gitattributes +2 -0
- .gitignore +34 -3
- README.md +12 -1
- example.ipynb +2 -2
- setup.py +11 -0
.gitattributes
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
# Ignore Jupyter notebooks from Git stats
|
2 |
+
*.ipynb linguist-documentation
|
.gitignore
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
|
2 |
__pycache__
|
3 |
.pytest_cache
|
4 |
**.egg-info
|
@@ -6,6 +6,37 @@ dist
|
|
6 |
build
|
7 |
**.pickle
|
8 |
**.pkl
|
9 |
-
.env
|
10 |
volumes
|
11 |
-
docker-compose.yml
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# General
|
2 |
__pycache__
|
3 |
.pytest_cache
|
4 |
**.egg-info
|
|
|
6 |
build
|
7 |
**.pickle
|
8 |
**.pkl
|
|
|
9 |
volumes
|
10 |
+
docker-compose.yml
|
11 |
+
|
12 |
+
# Environments
|
13 |
+
.venv
|
14 |
+
.env
|
15 |
+
|
16 |
+
# Distribution / packaging
|
17 |
+
.Python
|
18 |
+
build/
|
19 |
+
develop-eggs/
|
20 |
+
dist/
|
21 |
+
downloads/
|
22 |
+
eggs/
|
23 |
+
.eggs/
|
24 |
+
lib/
|
25 |
+
lib64/
|
26 |
+
parts/
|
27 |
+
sdist/
|
28 |
+
var/
|
29 |
+
wheels/
|
30 |
+
pip-wheel-metadata/
|
31 |
+
share/python-wheels/
|
32 |
+
*.egg-info/
|
33 |
+
.installed.cfg
|
34 |
+
*.egg
|
35 |
+
MANIFEST
|
36 |
+
|
37 |
+
# Installer logs
|
38 |
+
pip-log.txt
|
39 |
+
pip-delete-this-directory.txt
|
40 |
+
|
41 |
+
# Jupyter Notebook checkpoints
|
42 |
+
.ipynb_checkpoints
|
README.md
CHANGED
@@ -1,9 +1,13 @@
|
|
1 |
# π€ Megabots
|
2 |
|
3 |
[![Tests](https://github.com/momegas/qnabot/actions/workflows/python-package.yml/badge.svg)](https://github.com/momegas/qnabot/actions/workflows/python-package.yml)
|
|
|
|
|
|
|
4 |
![](https://dcbadge.vercel.app/api/server/zkqDWk5S7P?style=flat&n&compact=true)
|
5 |
<a href="https://www.producthunt.com/posts/megabots-2?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-megabots-2" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=390033&theme=light" alt="Megabots - π€ Production ready full-stack LLM apps made mega-easy | Product Hunt" style="width: 150px; height: 34px;" width="250" height="54" /></a>
|
6 |
|
|
|
7 |
π€ 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 π«΅
|
8 |
|
9 |
- π Join us on Discord: https://discord.gg/zkqDWk5S7P
|
@@ -41,7 +45,8 @@ import os
|
|
41 |
|
42 |
os.environ["OPENAI_API_KEY"] = "my key"
|
43 |
|
44 |
-
# Create a bot π with one line of code. Automatically loads your data from ./index or index.pkl.
|
|
|
45 |
qnabot = bot("qna-over-docs")
|
46 |
|
47 |
# Ask a question
|
@@ -134,3 +139,9 @@ sequenceDiagram
|
|
134 |
API -->> User: Return response
|
135 |
|
136 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# π€ Megabots
|
2 |
|
3 |
[![Tests](https://github.com/momegas/qnabot/actions/workflows/python-package.yml/badge.svg)](https://github.com/momegas/qnabot/actions/workflows/python-package.yml)
|
4 |
+
[![Python Version](https://img.shields.io/badge/python-%203.10%20-blue.svg)](#supported-python-versions)
|
5 |
+
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
|
6 |
+
[![License](https://img.shields.io/badge/License-MIT-informational.svg)](https://github.com/momegas/megabots/blob/main/LICENCE)
|
7 |
![](https://dcbadge.vercel.app/api/server/zkqDWk5S7P?style=flat&n&compact=true)
|
8 |
<a href="https://www.producthunt.com/posts/megabots-2?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-megabots-2" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=390033&theme=light" alt="Megabots - π€ Production ready full-stack LLM apps made mega-easy | Product Hunt" style="width: 150px; height: 34px;" width="250" height="54" /></a>
|
9 |
|
10 |
+
|
11 |
π€ 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 π«΅
|
12 |
|
13 |
- π Join us on Discord: https://discord.gg/zkqDWk5S7P
|
|
|
45 |
|
46 |
os.environ["OPENAI_API_KEY"] = "my key"
|
47 |
|
48 |
+
# Create a bot π with one line of code. Automatically loads your data from ./index or index.pkl.
|
49 |
+
# Keep in mind that you need to have one or another.
|
50 |
qnabot = bot("qna-over-docs")
|
51 |
|
52 |
# Ask a question
|
|
|
139 |
API -->> User: Return response
|
140 |
|
141 |
```
|
142 |
+
## How to contribute?
|
143 |
+
|
144 |
+
We welcome any suggestions, problem reports, and contributions!
|
145 |
+
For any changes you would like to make to this project, we invite you to submit an [issue](https://github.com/momegas/megabots/issues).
|
146 |
+
|
147 |
+
For more information, see [`CONTRIBUTING`](https://github.com/momegas/megabots/blob/main/CONTRIBUTING.md) instructions.
|
example.ipynb
CHANGED
@@ -29,7 +29,7 @@
|
|
29 |
"\n",
|
30 |
"The `bot` object is the main object of the library. It is used to create a bot and to interact with it.\n",
|
31 |
"\n",
|
32 |
-
"The `index` argument specifies the index to use for the bot. It can either be a saved index file (e.g., `index.pkl`) or a directory of documents (e.g., `./index`). In the case of the directory the index will be automatically created. If no index is specified `bot` will look for `index.pkl` or `./index
|
33 |
]
|
34 |
},
|
35 |
{
|
@@ -68,7 +68,7 @@
|
|
68 |
"source": [
|
69 |
"### Changing the bot's prompt\n",
|
70 |
"\n",
|
71 |
-
"You can change the
|
72 |
]
|
73 |
},
|
74 |
{
|
|
|
29 |
"\n",
|
30 |
"The `bot` object is the main object of the library. It is used to create a bot and to interact with it.\n",
|
31 |
"\n",
|
32 |
+
"The `index` argument specifies the index to use for the bot. It can either be a saved index file (e.g., `index.pkl`) or a directory of documents (e.g., `./index`). In the case of the directory the index will be automatically created. If no index is specified the `bot` will look for `index.pkl` or `./index`."
|
33 |
]
|
34 |
},
|
35 |
{
|
|
|
68 |
"source": [
|
69 |
"### Changing the bot's prompt\n",
|
70 |
"\n",
|
71 |
+
"You can change the bot's prompt to customize it to your needs."
|
72 |
]
|
73 |
},
|
74 |
{
|
setup.py
CHANGED
@@ -13,6 +13,9 @@ setup(
|
|
13 |
"fastapi",
|
14 |
"faiss-cpu",
|
15 |
"pdfminer.six",
|
|
|
|
|
|
|
16 |
],
|
17 |
author="Megaklis Vasilakis",
|
18 |
author_email="megaklis.vasilakis@gmail.com",
|
@@ -20,6 +23,14 @@ setup(
|
|
20 |
long_description=open("README.md").read(),
|
21 |
long_description_content_type="text/markdown",
|
22 |
url="https://github.com/momegas/megabots",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
license="MIT",
|
24 |
classifiers=[
|
25 |
# Choose appropriate classifiers from
|
|
|
13 |
"fastapi",
|
14 |
"faiss-cpu",
|
15 |
"pdfminer.six",
|
16 |
+
"gradio",
|
17 |
+
"python-dotenv",
|
18 |
+
"openai",
|
19 |
],
|
20 |
author="Megaklis Vasilakis",
|
21 |
author_email="megaklis.vasilakis@gmail.com",
|
|
|
23 |
long_description=open("README.md").read(),
|
24 |
long_description_content_type="text/markdown",
|
25 |
url="https://github.com/momegas/megabots",
|
26 |
+
keywords = [
|
27 |
+
"bot"
|
28 |
+
"qna-bot"
|
29 |
+
"information-retrieval",
|
30 |
+
"chatbot",
|
31 |
+
"question-answering",
|
32 |
+
"prompt-engineering"
|
33 |
+
]
|
34 |
license="MIT",
|
35 |
classifiers=[
|
36 |
# Choose appropriate classifiers from
|