anyllm 0.0.26__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. anyllm-0.0.26/MANIFEST.in +1 -0
  2. anyllm-0.0.26/PKG-INFO +129 -0
  3. anyllm-0.0.26/README.md +110 -0
  4. anyllm-0.0.26/anyllm.egg-info/PKG-INFO +129 -0
  5. anyllm-0.0.26/anyllm.egg-info/SOURCES.txt +72 -0
  6. anyllm-0.0.26/anyllm.egg-info/dependency_links.txt +1 -0
  7. anyllm-0.0.26/anyllm.egg-info/entry_points.txt +2 -0
  8. anyllm-0.0.26/anyllm.egg-info/requires.txt +17 -0
  9. anyllm-0.0.26/anyllm.egg-info/top_level.txt +2 -0
  10. anyllm-0.0.26/pautobot/__init__.py +0 -0
  11. anyllm-0.0.26/pautobot/app.py +85 -0
  12. anyllm-0.0.26/pautobot/app_info.py +5 -0
  13. anyllm-0.0.26/pautobot/config.py +9 -0
  14. anyllm-0.0.26/pautobot/database.py +12 -0
  15. anyllm-0.0.26/pautobot/db_models.py +40 -0
  16. anyllm-0.0.26/pautobot/engine/__init__.py +1 -0
  17. anyllm-0.0.26/pautobot/engine/bot_context.py +192 -0
  18. anyllm-0.0.26/pautobot/engine/bot_enums.py +16 -0
  19. anyllm-0.0.26/pautobot/engine/chatbot_factory.py +33 -0
  20. anyllm-0.0.26/pautobot/engine/context_manager.py +83 -0
  21. anyllm-0.0.26/pautobot/engine/engine.py +235 -0
  22. anyllm-0.0.26/pautobot/engine/ingest.py +208 -0
  23. anyllm-0.0.26/pautobot/engine/llm_factory.py +26 -0
  24. anyllm-0.0.26/pautobot/engine/qa_factory.py +37 -0
  25. anyllm-0.0.26/pautobot/frontend-dist/404.html +1 -0
  26. anyllm-0.0.26/pautobot/frontend-dist/_next/static/BM-gMUHSRp5K5zNkPwFux/_buildManifest.js +1 -0
  27. anyllm-0.0.26/pautobot/frontend-dist/_next/static/BM-gMUHSRp5K5zNkPwFux/_ssgManifest.js +1 -0
  28. anyllm-0.0.26/pautobot/frontend-dist/_next/static/chunks/framework-2c79e2a64abdb08b.js +33 -0
  29. anyllm-0.0.26/pautobot/frontend-dist/_next/static/chunks/main-7c8966651ff4862e.js +1 -0
  30. anyllm-0.0.26/pautobot/frontend-dist/_next/static/chunks/pages/_app-aa96ce9bb1e646b0.js +1 -0
  31. anyllm-0.0.26/pautobot/frontend-dist/_next/static/chunks/pages/_error-54de1933a164a1ff.js +1 -0
  32. anyllm-0.0.26/pautobot/frontend-dist/_next/static/chunks/pages/index-18cfbd35405c386b.js +1 -0
  33. anyllm-0.0.26/pautobot/frontend-dist/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js +1 -0
  34. anyllm-0.0.26/pautobot/frontend-dist/_next/static/chunks/webpack-8fa1640cc84ba8fe.js +1 -0
  35. anyllm-0.0.26/pautobot/frontend-dist/_next/static/css/7dd6dda6b2248062.css +3 -0
  36. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/037c6ceced78c87a-s.woff2 +0 -0
  37. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/03a2ebda46411260-s.woff2 +0 -0
  38. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/2cffe11a47028c14-s.woff2 +0 -0
  39. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/4ab03c045edad786-s.p.woff2 +0 -0
  40. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/4cf1eda6528c4545-s.p.woff2 +0 -0
  41. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/51fbb2aa5ef2b5cf-s.woff2 +0 -0
  42. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/560bcc4e09749527-s.woff2 +0 -0
  43. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/6cb9e821df97febd-s.p.woff2 +0 -0
  44. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/723f3c07bb1fbaab-s.woff2 +0 -0
  45. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/7da2a3ff16027414-s.p.woff2 +0 -0
  46. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/84c22514fc6f1667-s.woff2 +0 -0
  47. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/8bbb723f6276338f-s.woff2 +0 -0
  48. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/996798fe8aee0dc3-s.p.woff2 +0 -0
  49. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/9b206b5a69aba6d3-s.woff2 +0 -0
  50. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/9d76af61a4574a5c-s.woff2 +0 -0
  51. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/a8c682a8f4ee9d69-s.woff2 +0 -0
  52. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/c5fea7478aa47814-s.p.woff2 +0 -0
  53. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/d77e36fa1e563bf0-s.p.woff2 +0 -0
  54. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/efe191cf7953ff64-s.p.woff2 +0 -0
  55. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/f1144ac8e703eb32-s.woff2 +0 -0
  56. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/f1520da2fce335b3-s.p.woff2 +0 -0
  57. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/f5ea4559b0835633-s.p.woff2 +0 -0
  58. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/f6441c9c7c6cedc3-s.p.woff2 +0 -0
  59. anyllm-0.0.26/pautobot/frontend-dist/_next/static/media/fc3bb0c43ad3be3b-s.p.woff2 +0 -0
  60. anyllm-0.0.26/pautobot/frontend-dist/favicon.ico +0 -0
  61. anyllm-0.0.26/pautobot/frontend-dist/index.html +1 -0
  62. anyllm-0.0.26/pautobot/frontend-dist/loading.svg +18 -0
  63. anyllm-0.0.26/pautobot/frontend-dist/pautobot.png +0 -0
  64. anyllm-0.0.26/pautobot/globals.py +17 -0
  65. anyllm-0.0.26/pautobot/models.py +6 -0
  66. anyllm-0.0.26/pautobot/routers/__init__.py +0 -0
  67. anyllm-0.0.26/pautobot/routers/bot.py +51 -0
  68. anyllm-0.0.26/pautobot/routers/contexts.py +88 -0
  69. anyllm-0.0.26/pautobot/routers/documents.py +90 -0
  70. anyllm-0.0.26/pautobot/utils.py +110 -0
  71. anyllm-0.0.26/pyproject.toml +19 -0
  72. anyllm-0.0.26/setup.cfg +4 -0
  73. anyllm-0.0.26/setup.py +94 -0
  74. anyllm-0.0.26/tests/__init__.py +0 -0
@@ -0,0 +1 @@
1
+ recursive-include pautobot/frontend-dist *
anyllm-0.0.26/PKG-INFO ADDED
@@ -0,0 +1,129 @@
1
+ Metadata-Version: 2.1
2
+ Name: anyllm
3
+ Version: 0.0.26
4
+ Summary: Private AutoGPT Robot - Your private task assistant with GPT!
5
+ Home-page: https://github.com/vietanhdev/pautobot
6
+ Author: Viet-Anh Nguyen
7
+ Author-email: vietanh.dev@gmail.com
8
+ License: Apache License 2.0
9
+ Keywords: Personal Assistant,Automation,GPT,LLM,PrivateGPT
10
+ Classifier: Natural Language :: English
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Description-Content-Type: text/markdown
19
+
20
+ <p align="center">
21
+ <img alt="PAutoBot" style="width: 128px; max-width: 100%; height: auto;" src="https://raw.githubusercontent.com/nrl-ai/pautobot/main/docs/pautobot.png"/>
22
+ <h1 align="center">🔥 PⒶutoBot 🔥</h1>
23
+ <p align="center" style="font-size:18px"><b>Private AutoGPT Robot</b> - Your private task assistant with GPT!</p>
24
+ </p>
25
+
26
+ - 🔥 **Chat** to your offline **LLMs on CPU Only**. **100% private**, no data leaves your execution environment at any point.
27
+ - 🔥 **Ask questions** to your documents without an internet connection. Engine developed based on [PrivateGPT](https://github.com/imartinez/privateGPT).
28
+ - 🔥 **Automate tasks** easily with **PAutoBot plugins**. Easy for everyone.
29
+ - 🔥 **Easy coding structure** with **Next.js** and **Python**. Easy to understand and modify.
30
+ - 🔥 **Built with** [LangChain](https://github.com/hwchase17/langchain), [GPT4All](https://github.com/nomic-ai/gpt4all), [Chroma](https://www.trychroma.com/), [SentenceTransformers](https://www.sbert.net/), [PrivateGPT](https://github.com/imartinez/privateGPT).
31
+
32
+ ![PAutoBot](https://raw.githubusercontent.com/nrl-ai/pautobot/main/docs/screenshot.png)
33
+
34
+ **The supported extensions are:**
35
+
36
+ - `.csv`: CSV,
37
+ - `.docx`: Word Document,
38
+ - `.doc`: Word Document,
39
+ - `.enex`: EverNote,
40
+ - `.eml`: Email,
41
+ - `.epub`: EPub,
42
+ - `.html`: HTML File,
43
+ - `.md`: Markdown,
44
+ - `.msg`: Outlook Message,
45
+ - `.odt`: Open Document Text,
46
+ - `.pdf`: Portable Document Format (PDF),
47
+ - `.pptx` : PowerPoint Document,
48
+ - `.ppt` : PowerPoint Document,
49
+ - `.txt`: Text file (UTF-8),
50
+
51
+ ## I. Installation and Usage
52
+
53
+ ### 1. Installation
54
+
55
+ - Python 3.8 or higher.
56
+ - Install **PAutoBot**:
57
+
58
+ ```shell
59
+ pip install pautobot
60
+ ```
61
+
62
+ ### 2. Usage
63
+
64
+ - Run the app:
65
+
66
+ ```shell
67
+ python -m pautobot.app
68
+ ```
69
+
70
+ or just:
71
+
72
+ ```shell
73
+ pautobot
74
+ ```
75
+
76
+ - Go to <http://localhost:5678/> to see the user interface. You can choose one of the two modes:
77
+ - **Chat Only**
78
+ - **Documents Q&A**
79
+ - Upload some documents to the app (see the supported extensions above). You can try [docs/python3.11.3_lite.zip](docs/python3.11.3_lite.zip) for a quick start. This zip file contains 45 files from the [Python 3.11.3 documentation](https://docs.python.org/3/download.html).
80
+ - Force ingesting documents with **Ingest Data** button.
81
+
82
+ You can also run PAutoBot publicly to your network or change the port with parameters. Example:
83
+
84
+ ```shell
85
+ pautobot --host 0.0.0.0 --port 8080
86
+ ```
87
+
88
+ ## II. Development
89
+
90
+ ### 1. Clone the source code
91
+
92
+ ```shell
93
+ git clone https://github.com/nrl-ai/pautobot
94
+ cd pautobot
95
+ ```
96
+
97
+ ### 2. Run your backend
98
+
99
+ - Python 3.8 or higher.
100
+ - To install Pautobot from source, from `pautobot` source code directory, run:
101
+
102
+ ```shell
103
+ pip install -e .
104
+ ```
105
+
106
+ - Run the app:
107
+
108
+ ```shell
109
+ python -m pautobot.app
110
+ ```
111
+
112
+ - Go to <http://localhost:5678/> to see the user interface.
113
+
114
+ ### 2. Run your frontend
115
+
116
+ - Install the dependencies:
117
+
118
+ ```shell
119
+ cd frontend
120
+ npm install
121
+ ```
122
+
123
+ - Run the app:
124
+
125
+ ```shell
126
+ npm run dev
127
+ ```
128
+
129
+ - Go to <http://localhost:3000/> to see the user interface. Use this address to develop the frontend.
@@ -0,0 +1,110 @@
1
+ <p align="center">
2
+ <img alt="PAutoBot" style="width: 128px; max-width: 100%; height: auto;" src="./docs/pautobot.png"/>
3
+ <h1 align="center">🔥 PⒶutoBot 🔥</h1>
4
+ <p align="center" style="font-size:18px"><b>Private AutoGPT Robot</b> - Your private task assistant with GPT!</p>
5
+ </p>
6
+
7
+ - 🔥 **Chat** to your offline **LLMs on CPU Only**. **100% private**, no data leaves your execution environment at any point.
8
+ - 🔥 **Ask questions** to your documents without an internet connection. Engine developed based on [PrivateGPT](https://github.com/imartinez/privateGPT).
9
+ - 🔥 **Automate tasks** easily with **PAutoBot plugins**. Easy for everyone.
10
+ - 🔥 **Easy coding structure** with **Next.js** and **Python**. Easy to understand and modify.
11
+ - 🔥 **Built with** [LangChain](https://github.com/hwchase17/langchain), [GPT4All](https://github.com/nomic-ai/gpt4all), [Chroma](https://www.trychroma.com/), [SentenceTransformers](https://www.sbert.net/), [PrivateGPT](https://github.com/imartinez/privateGPT).
12
+
13
+ ![PAutoBot](./docs/screenshot.png)
14
+
15
+ **The supported extensions are:**
16
+
17
+ - `.csv`: CSV,
18
+ - `.docx`: Word Document,
19
+ - `.doc`: Word Document,
20
+ - `.enex`: EverNote,
21
+ - `.eml`: Email,
22
+ - `.epub`: EPub,
23
+ - `.html`: HTML File,
24
+ - `.md`: Markdown,
25
+ - `.msg`: Outlook Message,
26
+ - `.odt`: Open Document Text,
27
+ - `.pdf`: Portable Document Format (PDF),
28
+ - `.pptx` : PowerPoint Document,
29
+ - `.ppt` : PowerPoint Document,
30
+ - `.txt`: Text file (UTF-8),
31
+
32
+ ## I. Installation and Usage
33
+
34
+ ### 1. Installation
35
+
36
+ - Python 3.8 or higher.
37
+ - Install **PAutoBot**:
38
+
39
+ ```shell
40
+ pip install pautobot
41
+ ```
42
+
43
+ ### 2. Usage
44
+
45
+ - Run the app:
46
+
47
+ ```shell
48
+ python -m pautobot.app
49
+ ```
50
+
51
+ or just:
52
+
53
+ ```shell
54
+ pautobot
55
+ ```
56
+
57
+ - Go to <http://localhost:5678/> to see the user interface. You can choose one of the two modes:
58
+ - **Chat Only**
59
+ - **Documents Q&A**
60
+ - Upload some documents to the app (see the supported extensions above). You can try [docs/python3.11.3_lite.zip](docs/python3.11.3_lite.zip) for a quick start. This zip file contains 45 files from the [Python 3.11.3 documentation](https://docs.python.org/3/download.html).
61
+ - Force ingesting documents with **Ingest Data** button.
62
+
63
+ You can also run PAutoBot publicly to your network or change the port with parameters. Example:
64
+
65
+ ```shell
66
+ pautobot --host 0.0.0.0 --port 8080
67
+ ```
68
+
69
+ ## II. Development
70
+
71
+ ### 1. Clone the source code
72
+
73
+ ```shell
74
+ git clone https://github.com/nrl-ai/pautobot
75
+ cd pautobot
76
+ ```
77
+
78
+ ### 2. Run your backend
79
+
80
+ - Python 3.8 or higher.
81
+ - To install Pautobot from source, from `pautobot` source code directory, run:
82
+
83
+ ```shell
84
+ pip install -e .
85
+ ```
86
+
87
+ - Run the app:
88
+
89
+ ```shell
90
+ python -m pautobot.app
91
+ ```
92
+
93
+ - Go to <http://localhost:5678/> to see the user interface.
94
+
95
+ ### 2. Run your frontend
96
+
97
+ - Install the dependencies:
98
+
99
+ ```shell
100
+ cd frontend
101
+ npm install
102
+ ```
103
+
104
+ - Run the app:
105
+
106
+ ```shell
107
+ npm run dev
108
+ ```
109
+
110
+ - Go to <http://localhost:3000/> to see the user interface. Use this address to develop the frontend.
@@ -0,0 +1,129 @@
1
+ Metadata-Version: 2.1
2
+ Name: anyllm
3
+ Version: 0.0.26
4
+ Summary: Private AutoGPT Robot - Your private task assistant with GPT!
5
+ Home-page: https://github.com/vietanhdev/pautobot
6
+ Author: Viet-Anh Nguyen
7
+ Author-email: vietanh.dev@gmail.com
8
+ License: Apache License 2.0
9
+ Keywords: Personal Assistant,Automation,GPT,LLM,PrivateGPT
10
+ Classifier: Natural Language :: English
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Description-Content-Type: text/markdown
19
+
20
+ <p align="center">
21
+ <img alt="PAutoBot" style="width: 128px; max-width: 100%; height: auto;" src="https://raw.githubusercontent.com/nrl-ai/pautobot/main/docs/pautobot.png"/>
22
+ <h1 align="center">🔥 PⒶutoBot 🔥</h1>
23
+ <p align="center" style="font-size:18px"><b>Private AutoGPT Robot</b> - Your private task assistant with GPT!</p>
24
+ </p>
25
+
26
+ - 🔥 **Chat** to your offline **LLMs on CPU Only**. **100% private**, no data leaves your execution environment at any point.
27
+ - 🔥 **Ask questions** to your documents without an internet connection. Engine developed based on [PrivateGPT](https://github.com/imartinez/privateGPT).
28
+ - 🔥 **Automate tasks** easily with **PAutoBot plugins**. Easy for everyone.
29
+ - 🔥 **Easy coding structure** with **Next.js** and **Python**. Easy to understand and modify.
30
+ - 🔥 **Built with** [LangChain](https://github.com/hwchase17/langchain), [GPT4All](https://github.com/nomic-ai/gpt4all), [Chroma](https://www.trychroma.com/), [SentenceTransformers](https://www.sbert.net/), [PrivateGPT](https://github.com/imartinez/privateGPT).
31
+
32
+ ![PAutoBot](https://raw.githubusercontent.com/nrl-ai/pautobot/main/docs/screenshot.png)
33
+
34
+ **The supported extensions are:**
35
+
36
+ - `.csv`: CSV,
37
+ - `.docx`: Word Document,
38
+ - `.doc`: Word Document,
39
+ - `.enex`: EverNote,
40
+ - `.eml`: Email,
41
+ - `.epub`: EPub,
42
+ - `.html`: HTML File,
43
+ - `.md`: Markdown,
44
+ - `.msg`: Outlook Message,
45
+ - `.odt`: Open Document Text,
46
+ - `.pdf`: Portable Document Format (PDF),
47
+ - `.pptx` : PowerPoint Document,
48
+ - `.ppt` : PowerPoint Document,
49
+ - `.txt`: Text file (UTF-8),
50
+
51
+ ## I. Installation and Usage
52
+
53
+ ### 1. Installation
54
+
55
+ - Python 3.8 or higher.
56
+ - Install **PAutoBot**:
57
+
58
+ ```shell
59
+ pip install pautobot
60
+ ```
61
+
62
+ ### 2. Usage
63
+
64
+ - Run the app:
65
+
66
+ ```shell
67
+ python -m pautobot.app
68
+ ```
69
+
70
+ or just:
71
+
72
+ ```shell
73
+ pautobot
74
+ ```
75
+
76
+ - Go to <http://localhost:5678/> to see the user interface. You can choose one of the two modes:
77
+ - **Chat Only**
78
+ - **Documents Q&A**
79
+ - Upload some documents to the app (see the supported extensions above). You can try [docs/python3.11.3_lite.zip](docs/python3.11.3_lite.zip) for a quick start. This zip file contains 45 files from the [Python 3.11.3 documentation](https://docs.python.org/3/download.html).
80
+ - Force ingesting documents with **Ingest Data** button.
81
+
82
+ You can also run PAutoBot publicly to your network or change the port with parameters. Example:
83
+
84
+ ```shell
85
+ pautobot --host 0.0.0.0 --port 8080
86
+ ```
87
+
88
+ ## II. Development
89
+
90
+ ### 1. Clone the source code
91
+
92
+ ```shell
93
+ git clone https://github.com/nrl-ai/pautobot
94
+ cd pautobot
95
+ ```
96
+
97
+ ### 2. Run your backend
98
+
99
+ - Python 3.8 or higher.
100
+ - To install Pautobot from source, from `pautobot` source code directory, run:
101
+
102
+ ```shell
103
+ pip install -e .
104
+ ```
105
+
106
+ - Run the app:
107
+
108
+ ```shell
109
+ python -m pautobot.app
110
+ ```
111
+
112
+ - Go to <http://localhost:5678/> to see the user interface.
113
+
114
+ ### 2. Run your frontend
115
+
116
+ - Install the dependencies:
117
+
118
+ ```shell
119
+ cd frontend
120
+ npm install
121
+ ```
122
+
123
+ - Run the app:
124
+
125
+ ```shell
126
+ npm run dev
127
+ ```
128
+
129
+ - Go to <http://localhost:3000/> to see the user interface. Use this address to develop the frontend.
@@ -0,0 +1,72 @@
1
+ MANIFEST.in
2
+ README.md
3
+ pyproject.toml
4
+ setup.py
5
+ anyllm.egg-info/PKG-INFO
6
+ anyllm.egg-info/SOURCES.txt
7
+ anyllm.egg-info/dependency_links.txt
8
+ anyllm.egg-info/entry_points.txt
9
+ anyllm.egg-info/requires.txt
10
+ anyllm.egg-info/top_level.txt
11
+ pautobot/__init__.py
12
+ pautobot/app.py
13
+ pautobot/app_info.py
14
+ pautobot/config.py
15
+ pautobot/database.py
16
+ pautobot/db_models.py
17
+ pautobot/globals.py
18
+ pautobot/models.py
19
+ pautobot/utils.py
20
+ pautobot/engine/__init__.py
21
+ pautobot/engine/bot_context.py
22
+ pautobot/engine/bot_enums.py
23
+ pautobot/engine/chatbot_factory.py
24
+ pautobot/engine/context_manager.py
25
+ pautobot/engine/engine.py
26
+ pautobot/engine/ingest.py
27
+ pautobot/engine/llm_factory.py
28
+ pautobot/engine/qa_factory.py
29
+ pautobot/frontend-dist/404.html
30
+ pautobot/frontend-dist/favicon.ico
31
+ pautobot/frontend-dist/index.html
32
+ pautobot/frontend-dist/loading.svg
33
+ pautobot/frontend-dist/pautobot.png
34
+ pautobot/frontend-dist/_next/static/BM-gMUHSRp5K5zNkPwFux/_buildManifest.js
35
+ pautobot/frontend-dist/_next/static/BM-gMUHSRp5K5zNkPwFux/_ssgManifest.js
36
+ pautobot/frontend-dist/_next/static/chunks/framework-2c79e2a64abdb08b.js
37
+ pautobot/frontend-dist/_next/static/chunks/main-7c8966651ff4862e.js
38
+ pautobot/frontend-dist/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js
39
+ pautobot/frontend-dist/_next/static/chunks/webpack-8fa1640cc84ba8fe.js
40
+ pautobot/frontend-dist/_next/static/chunks/pages/_app-aa96ce9bb1e646b0.js
41
+ pautobot/frontend-dist/_next/static/chunks/pages/_error-54de1933a164a1ff.js
42
+ pautobot/frontend-dist/_next/static/chunks/pages/index-18cfbd35405c386b.js
43
+ pautobot/frontend-dist/_next/static/css/7dd6dda6b2248062.css
44
+ pautobot/frontend-dist/_next/static/media/037c6ceced78c87a-s.woff2
45
+ pautobot/frontend-dist/_next/static/media/03a2ebda46411260-s.woff2
46
+ pautobot/frontend-dist/_next/static/media/2cffe11a47028c14-s.woff2
47
+ pautobot/frontend-dist/_next/static/media/4ab03c045edad786-s.p.woff2
48
+ pautobot/frontend-dist/_next/static/media/4cf1eda6528c4545-s.p.woff2
49
+ pautobot/frontend-dist/_next/static/media/51fbb2aa5ef2b5cf-s.woff2
50
+ pautobot/frontend-dist/_next/static/media/560bcc4e09749527-s.woff2
51
+ pautobot/frontend-dist/_next/static/media/6cb9e821df97febd-s.p.woff2
52
+ pautobot/frontend-dist/_next/static/media/723f3c07bb1fbaab-s.woff2
53
+ pautobot/frontend-dist/_next/static/media/7da2a3ff16027414-s.p.woff2
54
+ pautobot/frontend-dist/_next/static/media/84c22514fc6f1667-s.woff2
55
+ pautobot/frontend-dist/_next/static/media/8bbb723f6276338f-s.woff2
56
+ pautobot/frontend-dist/_next/static/media/996798fe8aee0dc3-s.p.woff2
57
+ pautobot/frontend-dist/_next/static/media/9b206b5a69aba6d3-s.woff2
58
+ pautobot/frontend-dist/_next/static/media/9d76af61a4574a5c-s.woff2
59
+ pautobot/frontend-dist/_next/static/media/a8c682a8f4ee9d69-s.woff2
60
+ pautobot/frontend-dist/_next/static/media/c5fea7478aa47814-s.p.woff2
61
+ pautobot/frontend-dist/_next/static/media/d77e36fa1e563bf0-s.p.woff2
62
+ pautobot/frontend-dist/_next/static/media/efe191cf7953ff64-s.p.woff2
63
+ pautobot/frontend-dist/_next/static/media/f1144ac8e703eb32-s.woff2
64
+ pautobot/frontend-dist/_next/static/media/f1520da2fce335b3-s.p.woff2
65
+ pautobot/frontend-dist/_next/static/media/f5ea4559b0835633-s.p.woff2
66
+ pautobot/frontend-dist/_next/static/media/f6441c9c7c6cedc3-s.p.woff2
67
+ pautobot/frontend-dist/_next/static/media/fc3bb0c43ad3be3b-s.p.woff2
68
+ pautobot/routers/__init__.py
69
+ pautobot/routers/bot.py
70
+ pautobot/routers/contexts.py
71
+ pautobot/routers/documents.py
72
+ tests/__init__.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ anyllm = pautobot.app:main
@@ -0,0 +1,17 @@
1
+ langchain>=0.0.194
2
+ gpt4all>=0.3.0
3
+ chromadb>=0.3.23
4
+ urllib3>=2.0.2
5
+ pdfminer.six>=20221105
6
+ unstructured>=0.6.6
7
+ extract-msg>=0.41.1
8
+ tabulate>=0.9.0
9
+ pandoc>=2.3
10
+ pypandoc>=1.11
11
+ tqdm>=4.65.0
12
+ python-multipart>=0.0.6
13
+ fastapi==0.96.0
14
+ SQLAlchemy==2.0.15
15
+ alembic==1.11.1
16
+ sentence_transformers==2.2.2
17
+ requests
@@ -0,0 +1,2 @@
1
+ pautobot
2
+ tests
File without changes
@@ -0,0 +1,85 @@
1
+ import os
2
+
3
+ os.environ["TOKENIZERS_PARALLELISM"] = "false"
4
+
5
+ import argparse
6
+ import logging
7
+
8
+ import uvicorn
9
+ from fastapi import FastAPI
10
+ from fastapi.middleware.cors import CORSMiddleware
11
+ from fastapi.staticfiles import StaticFiles
12
+
13
+ from pautobot import db_models as models
14
+ from pautobot import globals
15
+ from pautobot.app_info import __appname__, __description__, __version__
16
+ from pautobot.config import DATA_ROOT
17
+ from pautobot.database import engine
18
+ from pautobot.routers import bot, contexts, documents
19
+ from pautobot.utils import extract_frontend_dist
20
+
21
+
22
+ def main():
23
+ parser = argparse.ArgumentParser(
24
+ description=__description__,
25
+ )
26
+ parser.add_argument(
27
+ "--host",
28
+ type=str,
29
+ default="127.0.0.1",
30
+ help="Host to run the server on",
31
+ )
32
+ parser.add_argument(
33
+ "--port",
34
+ type=int,
35
+ default=5678,
36
+ help="Port to run the server on",
37
+ )
38
+ parser.add_argument(
39
+ "--version",
40
+ action="store_true",
41
+ help="Print version and exit",
42
+ )
43
+ args = parser.parse_args()
44
+
45
+ if args.version:
46
+ print(f"{__appname__} v{__version__}")
47
+ return
48
+
49
+ logging.info(f"Starting {__appname__}...")
50
+ logging.info(f"Version: {__version__}")
51
+
52
+ logging.info("Extracting frontend distribution...")
53
+ static_folder = os.path.abspath(os.path.join(DATA_ROOT, "frontend-dist"))
54
+ extract_frontend_dist(static_folder)
55
+
56
+ logging.info("Creating database tables...")
57
+ models.Base.metadata.create_all(bind=engine)
58
+
59
+ logging.info("Starting FastAPI server...")
60
+ globals.init()
61
+
62
+ app = FastAPI(
63
+ title=__appname__,
64
+ description=__description__,
65
+ )
66
+ app.add_middleware(
67
+ CORSMiddleware,
68
+ allow_origins=["*"],
69
+ allow_methods=["*"],
70
+ allow_headers=["*"],
71
+ expose_headers=["*"],
72
+ )
73
+
74
+ app.include_router(bot.router)
75
+ app.include_router(contexts.router)
76
+ app.include_router(documents.router)
77
+ app.mount(
78
+ "/", StaticFiles(directory=static_folder, html=True), name="static"
79
+ )
80
+
81
+ uvicorn.run(app, host=args.host, port=args.port, reload=False, workers=1)
82
+
83
+
84
+ if __name__ == "__main__":
85
+ main()
@@ -0,0 +1,5 @@
1
+ __appname__ = "PautoBot"
2
+ __description__ = (
3
+ "Private AutoGPT Robot - Your private task assistant with GPT!"
4
+ )
5
+ __version__ = "0.0.26"
@@ -0,0 +1,9 @@
1
+ import os
2
+ import pathlib
3
+
4
+ DATA_ROOT = os.path.abspath(
5
+ os.path.join(os.path.expanduser("~"), "pautobot-data")
6
+ )
7
+ pathlib.Path(DATA_ROOT).mkdir(parents=True, exist_ok=True)
8
+
9
+ DATABASE_PATH = os.path.abspath(os.path.join(DATA_ROOT, "pautobot.db"))
@@ -0,0 +1,12 @@
1
+ from sqlalchemy import create_engine
2
+ from sqlalchemy.ext.declarative import declarative_base
3
+ from sqlalchemy.orm import sessionmaker
4
+
5
+ from pautobot.config import DATABASE_PATH
6
+
7
+ DATABASE_URL = "sqlite:///{}".format(DATABASE_PATH)
8
+ engine = create_engine(DATABASE_URL, connect_args={"check_same_thread": False})
9
+ SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
10
+ session = SessionLocal()
11
+
12
+ Base = declarative_base()
@@ -0,0 +1,40 @@
1
+ import datetime
2
+
3
+ from sqlalchemy import Column, DateTime, ForeignKey, Integer, String
4
+ from sqlalchemy.orm import relationship
5
+
6
+ from pautobot.database import Base, engine
7
+
8
+
9
+ class BotContext(Base):
10
+ __tablename__ = "contexts"
11
+
12
+ id = Column(Integer, primary_key=True, index=True)
13
+ name = Column(String, index=True)
14
+ created_at = Column(DateTime, default=datetime.datetime.utcnow)
15
+ documents = relationship("Document", back_populates="bot_context")
16
+ chat_chunks = relationship("ChatChunk", back_populates="bot_context")
17
+
18
+
19
+ class Document(Base):
20
+ __tablename__ = "documents"
21
+
22
+ id = Column(Integer, primary_key=True, index=True)
23
+ name = Column(String)
24
+ storage_name = Column(String)
25
+ created_at = Column(DateTime, default=datetime.datetime.utcnow)
26
+ bot_context_id = Column(Integer, ForeignKey("contexts.id"))
27
+ bot_context = relationship("BotContext", back_populates="documents")
28
+
29
+
30
+ class ChatChunk(Base):
31
+ __tablename__ = "chat_chunks"
32
+
33
+ id = Column(Integer, primary_key=True, index=True)
34
+ created_at = Column(DateTime, default=datetime.datetime.utcnow)
35
+ text = Column(String)
36
+ bot_context_id = Column(Integer, ForeignKey("contexts.id"))
37
+ bot_context = relationship("BotContext", back_populates="chat_chunks")
38
+
39
+
40
+ Base.metadata.create_all(engine)
@@ -0,0 +1 @@
1
+ from pautobot.engine.engine import *