ragxo 0.1.10__tar.gz → 0.1.11__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ragxo
3
- Version: 0.1.10
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
  [![PyPI version](https://badge.fury.io/py/ragxo.svg)](https://badge.fury.io/py/ragxo)
36
37
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](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
+
@@ -1,6 +1,6 @@
1
1
  # RagXO
2
2
 
3
- Export, version and reuse your RAG pipeline everywhere 🚀
3
+ Export, version and reuse your E2E RAG pipeline everywhere 🚀
4
4
 
5
5
  [![PyPI version](https://badge.fury.io/py/ragxo.svg)](https://badge.fury.io/py/ragxo)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
@@ -27,6 +27,10 @@ pip install ragxo
27
27
 
28
28
  ### Build a RAG pipeline
29
29
 
30
+ ```bash
31
+ export OPENAI_API_KEY=<openai_key>
32
+ ```
33
+
30
34
  ```python
31
35
  from ragxo import Ragxo, Document
32
36
 
@@ -201,4 +205,4 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
201
205
 
202
206
  ## Contributing 🤝
203
207
 
204
- Contributions are welcome! Please feel free to submit a Pull Request.
208
+ Contributions are welcome! Please feel free to submit a Pull Request.
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "ragxo"
3
- version = "0.1.10"
3
+ version = "0.1.11"
4
4
  description = "A RAG (Retrieval-Augmented Generation) toolkit with Milvus integration"
5
5
  authors = ["Mohamed Sadek <mohamedfawzydes@gmail.com>"]
6
6
  readme = "README.md"
@@ -28,6 +28,7 @@ openai = "^1.61.1"
28
28
  boto3 = "^1.36.14"
29
29
  pytest-mock = "^3.14.0"
30
30
  mocker = "^1.1.1"
31
+ alive-progress = "^3.1.1"
31
32
 
32
33
  [tool.poetry.group.dev.dependencies]
33
34
  pytest = "^8.3.4"
@@ -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.
@@ -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
File without changes