ragit 0.7.1__tar.gz → 0.7.2__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.
- {ragit-0.7.1 → ragit-0.7.2}/PKG-INFO +5 -1
- {ragit-0.7.1 → ragit-0.7.2}/pyproject.toml +6 -0
- {ragit-0.7.1 → ragit-0.7.2}/ragit/providers/ollama.py +30 -25
- {ragit-0.7.1 → ragit-0.7.2}/ragit/version.py +1 -1
- {ragit-0.7.1 → ragit-0.7.2}/ragit.egg-info/PKG-INFO +5 -1
- {ragit-0.7.1 → ragit-0.7.2}/ragit.egg-info/requires.txt +5 -0
- {ragit-0.7.1 → ragit-0.7.2}/LICENSE +0 -0
- {ragit-0.7.1 → ragit-0.7.2}/README.md +0 -0
- {ragit-0.7.1 → ragit-0.7.2}/ragit/__init__.py +0 -0
- {ragit-0.7.1 → ragit-0.7.2}/ragit/assistant.py +0 -0
- {ragit-0.7.1 → ragit-0.7.2}/ragit/config.py +0 -0
- {ragit-0.7.1 → ragit-0.7.2}/ragit/core/__init__.py +0 -0
- {ragit-0.7.1 → ragit-0.7.2}/ragit/core/experiment/__init__.py +0 -0
- {ragit-0.7.1 → ragit-0.7.2}/ragit/core/experiment/experiment.py +0 -0
- {ragit-0.7.1 → ragit-0.7.2}/ragit/core/experiment/results.py +0 -0
- {ragit-0.7.1 → ragit-0.7.2}/ragit/loaders.py +0 -0
- {ragit-0.7.1 → ragit-0.7.2}/ragit/providers/__init__.py +0 -0
- {ragit-0.7.1 → ragit-0.7.2}/ragit/providers/base.py +0 -0
- {ragit-0.7.1 → ragit-0.7.2}/ragit/utils/__init__.py +0 -0
- {ragit-0.7.1 → ragit-0.7.2}/ragit.egg-info/SOURCES.txt +0 -0
- {ragit-0.7.1 → ragit-0.7.2}/ragit.egg-info/dependency_links.txt +0 -0
- {ragit-0.7.1 → ragit-0.7.2}/ragit.egg-info/top_level.txt +0 -0
- {ragit-0.7.1 → ragit-0.7.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ragit
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.2
|
|
4
4
|
Summary: Automatic RAG Pattern Optimization Engine
|
|
5
5
|
Author: RODMENA LIMITED
|
|
6
6
|
Maintainer-email: RODMENA LIMITED <info@rodmena.co.uk>
|
|
@@ -37,6 +37,10 @@ Provides-Extra: test
|
|
|
37
37
|
Requires-Dist: pytest; extra == "test"
|
|
38
38
|
Requires-Dist: pytest-cov; extra == "test"
|
|
39
39
|
Requires-Dist: pytest-mock; extra == "test"
|
|
40
|
+
Provides-Extra: docs
|
|
41
|
+
Requires-Dist: sphinx>=7.0; extra == "docs"
|
|
42
|
+
Requires-Dist: sphinx-rtd-theme>=2.0; extra == "docs"
|
|
43
|
+
Requires-Dist: sphinx-copybutton>=0.5; extra == "docs"
|
|
40
44
|
Dynamic: license-file
|
|
41
45
|
|
|
42
46
|
# ragit
|
|
@@ -164,15 +164,15 @@ class OllamaProvider(BaseLLMProvider, BaseEmbeddingProvider):
|
|
|
164
164
|
|
|
165
165
|
try:
|
|
166
166
|
response = requests.post(
|
|
167
|
-
f"{self.embedding_url}/api/
|
|
167
|
+
f"{self.embedding_url}/api/embeddings",
|
|
168
168
|
headers=self._get_headers(include_auth=False),
|
|
169
|
-
json={"model": model, "
|
|
169
|
+
json={"model": model, "prompt": text},
|
|
170
170
|
timeout=self.timeout,
|
|
171
171
|
)
|
|
172
172
|
response.raise_for_status()
|
|
173
173
|
data = response.json()
|
|
174
174
|
|
|
175
|
-
embedding = data.get("
|
|
175
|
+
embedding = data.get("embedding", [])
|
|
176
176
|
if not embedding:
|
|
177
177
|
raise ValueError("Empty embedding returned from Ollama")
|
|
178
178
|
|
|
@@ -189,33 +189,38 @@ class OllamaProvider(BaseLLMProvider, BaseEmbeddingProvider):
|
|
|
189
189
|
raise ConnectionError(f"Ollama embed failed: {e}") from e
|
|
190
190
|
|
|
191
191
|
def embed_batch(self, texts: list[str], model: str) -> list[EmbeddingResponse]:
|
|
192
|
-
"""Generate embeddings for multiple texts (uses embedding_url, no auth for local).
|
|
192
|
+
"""Generate embeddings for multiple texts (uses embedding_url, no auth for local).
|
|
193
|
+
|
|
194
|
+
Note: Ollama /api/embeddings only supports single prompts, so we loop.
|
|
195
|
+
"""
|
|
193
196
|
self._current_embed_model = model
|
|
194
197
|
self._current_dimensions = self.EMBEDDING_DIMENSIONS.get(model, 768)
|
|
195
198
|
|
|
199
|
+
results = []
|
|
196
200
|
try:
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
201
|
+
for text in texts:
|
|
202
|
+
response = requests.post(
|
|
203
|
+
f"{self.embedding_url}/api/embeddings",
|
|
204
|
+
headers=self._get_headers(include_auth=False),
|
|
205
|
+
json={"model": model, "prompt": text},
|
|
206
|
+
timeout=self.timeout,
|
|
207
|
+
)
|
|
208
|
+
response.raise_for_status()
|
|
209
|
+
data = response.json()
|
|
210
|
+
|
|
211
|
+
embedding = data.get("embedding", [])
|
|
212
|
+
if embedding:
|
|
213
|
+
self._current_dimensions = len(embedding)
|
|
214
|
+
|
|
215
|
+
results.append(
|
|
216
|
+
EmbeddingResponse(
|
|
217
|
+
embedding=tuple(embedding),
|
|
218
|
+
model=model,
|
|
219
|
+
provider=self.provider_name,
|
|
220
|
+
dimensions=len(embedding),
|
|
221
|
+
)
|
|
216
222
|
)
|
|
217
|
-
|
|
218
|
-
]
|
|
223
|
+
return results
|
|
219
224
|
except requests.RequestException as e:
|
|
220
225
|
raise ConnectionError(f"Ollama batch embed failed: {e}") from e
|
|
221
226
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ragit
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.2
|
|
4
4
|
Summary: Automatic RAG Pattern Optimization Engine
|
|
5
5
|
Author: RODMENA LIMITED
|
|
6
6
|
Maintainer-email: RODMENA LIMITED <info@rodmena.co.uk>
|
|
@@ -37,6 +37,10 @@ Provides-Extra: test
|
|
|
37
37
|
Requires-Dist: pytest; extra == "test"
|
|
38
38
|
Requires-Dist: pytest-cov; extra == "test"
|
|
39
39
|
Requires-Dist: pytest-mock; extra == "test"
|
|
40
|
+
Provides-Extra: docs
|
|
41
|
+
Requires-Dist: sphinx>=7.0; extra == "docs"
|
|
42
|
+
Requires-Dist: sphinx-rtd-theme>=2.0; extra == "docs"
|
|
43
|
+
Requires-Dist: sphinx-copybutton>=0.5; extra == "docs"
|
|
40
44
|
Dynamic: license-file
|
|
41
45
|
|
|
42
46
|
# ragit
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|