hyperforge-nucliadb-agentic 1.0.0.post64__tar.gz → 1.0.0.post78__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.
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/PKG-INFO +1 -1
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/pyproject.toml +1 -1
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/agent.py +1 -1
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/predict.py +12 -7
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/search/ask.py +7 -4
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/README.md +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/__init__.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/__init__.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/audit.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/exceptions.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/lifespan.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/model.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/predict_models.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/search/__init__.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/search/graph_strategy.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/search/highlight.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/search/hydrator.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/search/metrics.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/search/parsers/__init__.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/search/parsers/ask.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/search/parsers/fetcher.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/search/parsers/find.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/search/prompt.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/search/rank_fusion.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/search/rerankers.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/search/retrieval.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/search/rpc.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/settings.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/utils/ids.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/utils/proto.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/utils/responses.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/ask/utils/text_blocks.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/config.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/internal_driver.py +0 -0
- {hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/src/hyperforge_nucliadb_agentic/py.typed +0 -0
{hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/pyproject.toml
RENAMED
|
@@ -4,7 +4,7 @@ build-backend = "uv_build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "hyperforge_nucliadb_agentic"
|
|
7
|
-
version = "1.0.0.
|
|
7
|
+
version = "1.0.0.post78"
|
|
8
8
|
license = "Apache-2.0"
|
|
9
9
|
description = "NucliaDB Hyperforge agent"
|
|
10
10
|
authors = [{ name = "Nuclia", email = "nucliadb@nuclia.com" }]
|
|
@@ -1056,7 +1056,7 @@ class NucliaDBAgent(ContextAgent, Agent[NucliaDBAgentConfig]):
|
|
|
1056
1056
|
)
|
|
1057
1057
|
)
|
|
1058
1058
|
|
|
1059
|
-
paragraphs = await paragraphs_result.
|
|
1059
|
+
paragraphs = await paragraphs_result.to_sync_response()
|
|
1060
1060
|
answer = None
|
|
1061
1061
|
input_tokens = (
|
|
1062
1062
|
paragraphs.consumption.normalized_tokens.input
|
|
@@ -296,13 +296,18 @@ class PredictEngine:
|
|
|
296
296
|
headers = self.get_predict_headers(kbid)
|
|
297
297
|
headers["Accept"] = "application/x-ndjson"
|
|
298
298
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
299
|
+
try:
|
|
300
|
+
resp = await self.make_stream_request(
|
|
301
|
+
"POST",
|
|
302
|
+
url=self.get_predict_url(CHAT, kbid),
|
|
303
|
+
json=item.model_dump(),
|
|
304
|
+
headers={**headers, **(extra_headers or {})},
|
|
305
|
+
timeout=httpx.Timeout(30.0, read=None),
|
|
306
|
+
)
|
|
307
|
+
except httpx.TimeoutException as exc:
|
|
308
|
+
raise ProxiedPredictAPIError(
|
|
309
|
+
status=504, detail="Timeout while connecting to predict"
|
|
310
|
+
) from exc
|
|
306
311
|
await self.check_response(kbid, resp, expected_status=200)
|
|
307
312
|
ident = resp.headers.get(NUCLIA_LEARNING_ID_HEADER) or "unknown"
|
|
308
313
|
model = resp.headers.get(NUCLIA_LEARNING_MODEL_HEADER) or "unknown"
|
|
@@ -378,7 +378,7 @@ class AskResult:
|
|
|
378
378
|
metrics=self.metrics.dump(),
|
|
379
379
|
)
|
|
380
380
|
|
|
381
|
-
async def
|
|
381
|
+
async def to_sync_response(self) -> SyncAskResponse:
|
|
382
382
|
# Run the stream to completion to ensure all data is available in memory
|
|
383
383
|
# First, run the stream in memory to get all the data in memory
|
|
384
384
|
async for _ in self._stream():
|
|
@@ -458,7 +458,7 @@ class AskResult:
|
|
|
458
458
|
return response
|
|
459
459
|
|
|
460
460
|
async def json(self) -> str:
|
|
461
|
-
response = await self.
|
|
461
|
+
response = await self.to_sync_response()
|
|
462
462
|
return response.model_dump_json(exclude_none=True, by_alias=True)
|
|
463
463
|
|
|
464
464
|
async def get_relations_results(self) -> Relations:
|
|
@@ -551,7 +551,7 @@ class NotEnoughContextAskResult(AskResult):
|
|
|
551
551
|
)
|
|
552
552
|
)
|
|
553
553
|
|
|
554
|
-
async def
|
|
554
|
+
async def to_sync_response(self) -> SyncAskResponse:
|
|
555
555
|
prequeries = (
|
|
556
556
|
{
|
|
557
557
|
prequery.id or f"prequery_{index}": prequery_result
|
|
@@ -567,7 +567,10 @@ class NotEnoughContextAskResult(AskResult):
|
|
|
567
567
|
retrieval_results=self.main_results,
|
|
568
568
|
prequeries=prequeries,
|
|
569
569
|
status=AnswerStatusCode.NO_RETRIEVAL_DATA.prettify(),
|
|
570
|
-
)
|
|
570
|
+
)
|
|
571
|
+
|
|
572
|
+
async def json(self) -> str:
|
|
573
|
+
return (await self.to_sync_response()).model_dump_json()
|
|
571
574
|
|
|
572
575
|
|
|
573
576
|
async def rephrase_query(
|
{hyperforge_nucliadb_agentic-1.0.0.post64 → hyperforge_nucliadb_agentic-1.0.0.post78}/README.md
RENAMED
|
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
|
|
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
|