ragxo 0.1.10__py3-none-any.whl → 0.1.11__py3-none-any.whl
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.
ragxo/client.py
CHANGED
@@ -11,6 +11,7 @@ import tempfile
|
|
11
11
|
from botocore.exceptions import ClientError
|
12
12
|
import openai
|
13
13
|
from openai import ChatCompletion
|
14
|
+
from ragxo.utils import with_loading
|
14
15
|
|
15
16
|
logger = logging.getLogger(__name__)
|
16
17
|
|
@@ -140,6 +141,7 @@ class Ragxo:
|
|
140
141
|
self.presence_penalty = presence_penalty
|
141
142
|
return self
|
142
143
|
|
144
|
+
@with_loading("Indexing documents")
|
143
145
|
def index(self, data: list[Document]) -> Self:
|
144
146
|
"""
|
145
147
|
Index documents into the vector database.
|
@@ -210,6 +212,7 @@ class Ragxo:
|
|
210
212
|
output_fields=output_fields
|
211
213
|
)
|
212
214
|
|
215
|
+
@with_loading("Exporting Ragxo instance")
|
213
216
|
def export(self, destination: str, s3_bucket: str = None) -> Self:
|
214
217
|
"""
|
215
218
|
Export the Ragx instance to either local filesystem or S3.
|
ragxo/utils.py
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
import functools
|
2
|
+
from alive_progress import alive_bar
|
3
|
+
|
4
|
+
|
5
|
+
def with_loading(title: str):
|
6
|
+
"""
|
7
|
+
Decorator to add loading animation to methods.
|
8
|
+
|
9
|
+
Args:
|
10
|
+
title (str): Title to display during loading
|
11
|
+
"""
|
12
|
+
|
13
|
+
def decorator(func):
|
14
|
+
@functools.wraps(func)
|
15
|
+
def wrapper(self, *args, **kwargs):
|
16
|
+
with alive_bar(title=title, bar=None, stats=False) as bar:
|
17
|
+
result = func(self, *args, **kwargs)
|
18
|
+
bar()
|
19
|
+
return result
|
20
|
+
return wrapper
|
21
|
+
return decorator
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ragxo
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.11
|
4
4
|
Summary: A RAG (Retrieval-Augmented Generation) toolkit with Milvus integration
|
5
5
|
Home-page: https://github.com/yourusername/ragx
|
6
6
|
License: MIT
|
@@ -17,6 +17,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.13
|
18
18
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
19
19
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
20
|
+
Requires-Dist: alive-progress (>=3.1.1,<4.0.0)
|
20
21
|
Requires-Dist: boto3 (>=1.36.14,<2.0.0)
|
21
22
|
Requires-Dist: dill (>=0.3.9,<0.4.0)
|
22
23
|
Requires-Dist: milvus (>=2.3.9,<3.0.0)
|
@@ -30,7 +31,7 @@ Description-Content-Type: text/markdown
|
|
30
31
|
|
31
32
|
# RagXO
|
32
33
|
|
33
|
-
Export, version and reuse your RAG pipeline everywhere 🚀
|
34
|
+
Export, version and reuse your E2E RAG pipeline everywhere 🚀
|
34
35
|
|
35
36
|
[](https://badge.fury.io/py/ragxo)
|
36
37
|
[](https://opensource.org/licenses/MIT)
|
@@ -57,6 +58,10 @@ pip install ragxo
|
|
57
58
|
|
58
59
|
### Build a RAG pipeline
|
59
60
|
|
61
|
+
```bash
|
62
|
+
export OPENAI_API_KEY=<openai_key>
|
63
|
+
```
|
64
|
+
|
60
65
|
```python
|
61
66
|
from ragxo import Ragxo, Document
|
62
67
|
|
@@ -232,3 +237,4 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
|
|
232
237
|
## Contributing 🤝
|
233
238
|
|
234
239
|
Contributions are welcome! Please feel free to submit a Pull Request.
|
240
|
+
|
@@ -0,0 +1,6 @@
|
|
1
|
+
ragxo/__init__.py,sha256=0VVe-z4XkkGQLQIG0hF0Hyf87_RgX0E4T9TRwwTkbmE,68
|
2
|
+
ragxo/client.py,sha256=6VE9h9XoEaS01irBp70brrWev8tNagtYnHOoyvjBVmo,12914
|
3
|
+
ragxo/utils.py,sha256=yy5_ejmxU75mRhfE_XGtKOvKtHo8AoV1QFQlwMDEiFw,537
|
4
|
+
ragxo-0.1.11.dist-info/METADATA,sha256=t3vwZl6LHtRgnrGqI8jMRrWGUy2c9tQlkxG45UDjjf4,6472
|
5
|
+
ragxo-0.1.11.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
6
|
+
ragxo-0.1.11.dist-info/RECORD,,
|
ragxo-0.1.10.dist-info/RECORD
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
ragxo/__init__.py,sha256=0VVe-z4XkkGQLQIG0hF0Hyf87_RgX0E4T9TRwwTkbmE,68
|
2
|
-
ragxo/client.py,sha256=rmV01TZ3F8McLavVOokjLSUv78fdCA80oDRVWSw-38M,12791
|
3
|
-
ragxo-0.1.10.dist-info/METADATA,sha256=uk-eth9MdnPkG2WeZU7WGr7cVa6HuPtTZFjTkFVSJ_A,6371
|
4
|
-
ragxo-0.1.10.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
5
|
-
ragxo-0.1.10.dist-info/RECORD,,
|
File without changes
|