ragxo 0.1.9__py3-none-any.whl → 0.1.10__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ragxo
3
- Version: 0.1.9
3
+ Version: 0.1.10
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
@@ -60,17 +60,19 @@ pip install ragxo
60
60
  ```python
61
61
  from ragxo import Ragxo, Document
62
62
 
63
- def preprocess_text_lower(text: str) -> str:
64
- return text.lower()
63
+
64
+
65
+ ragxo_client = Ragxo(dimension=1536)
65
66
 
66
67
  def preprocess_text_remove_special_chars(text: str) -> str:
67
68
  return re.sub(r'[^a-zA-Z0-9\s]', '', text)
68
69
 
70
+ def preprocess_text_lower(text: str) -> str:
71
+ return text.lower()
72
+
69
73
  def get_embeddings(text: str) -> list[float]:
70
74
  return openai.embeddings.create(input=text, model="text-embedding-ada-002").data[0].embedding
71
75
 
72
- ragxo_client = Ragxo(dimension=768)
73
-
74
76
  ragxo_client.add_preprocess(preprocess_text_lower)
75
77
  ragxo_client.add_preprocess(preprocess_text_remove_special_chars)
76
78
  ragxo_client.add_embedding_fn(get_embeddings)
@@ -94,6 +96,9 @@ ragxo_client.index([
94
96
 
95
97
  ragxo_client.export("my_rag_v1.0.0")
96
98
 
99
+ # or export to s3
100
+ ragxo_client.export("my_rag_v1.0.0", s3_bucket="my_bucket")
101
+
97
102
  ```
98
103
 
99
104
 
@@ -107,6 +112,7 @@ vector_search_results = loaded_ragxo_client.query("What is the capital of France
107
112
  llm_response = loaded_ragxo_client.generate_llm_response(
108
113
  "What is the capital of France?")
109
114
 
115
+ print(llm_response.choices[0].message.content)
110
116
  ```
111
117
 
112
118
 
@@ -0,0 +1,5 @@
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,,
@@ -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.9.dist-info/METADATA,sha256=br3CDegqsUhhaw-GFC7U0-J7H6fN3qHbvQpFZf8rlfU,6241
4
- ragxo-0.1.9.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
5
- ragxo-0.1.9.dist-info/RECORD,,
File without changes