hyperforge-nucliadb 1.0.0.post58__tar.gz → 1.0.0.post62__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-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/PKG-INFO +2 -2
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/pyproject.toml +5 -2
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/advanced_ask_agent.py +2 -2
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/ask/ask.py +4 -4
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/ask/rerank.py +1 -2
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/ask_utils.py +1 -2
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/basic_ask_agent.py +5 -5
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/sync/agent.py +1 -1
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/sync/config_driver.py +1 -2
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/sync/driver.py +2 -3
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb.egg-info/PKG-INFO +2 -2
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/tests/test_nucliadb.py +10 -9
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/tests/test_sync.py +4 -1
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/README.md +0 -0
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/setup.cfg +0 -0
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/__init__.py +0 -0
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/advanced_ask_config.py +0 -0
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/ask/__init__.py +0 -0
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/ask/analysis.py +1 -1
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/ask/config.py +0 -0
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/ask/hydrate.py +1 -1
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/ask/kb_analysis.py +0 -0
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/ask/knowledge_scan.py +0 -0
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/ask/models.py +0 -0
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/ask/multi.py +1 -1
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/ask/nucliadb.py +0 -0
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/ask/prompt_analysis.py +0 -0
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/ask/query_analysis.py +1 -1
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/ask/utils.py +0 -0
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/basic_ask_config.py +0 -0
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/driver.py +1 -1
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/driver_config.py +0 -0
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/py.typed +0 -0
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/sync/__init__.py +0 -0
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb/sync/config.py +0 -0
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb.egg-info/SOURCES.txt +0 -0
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb.egg-info/dependency_links.txt +0 -0
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb.egg-info/requires.txt +0 -0
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/src/hyperforge_nucliadb.egg-info/top_level.txt +0 -0
- {hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/tests/test_ask_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hyperforge_nucliadb
|
|
3
|
-
Version: 1.0.0.
|
|
3
|
+
Version: 1.0.0.post62
|
|
4
4
|
Summary: NucliaDB Hyperforge agent
|
|
5
5
|
Author-email: Nuclia <nucliadb@nuclia.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
14
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
15
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
16
|
-
Requires-Python: <4,>=3.
|
|
16
|
+
Requires-Python: <4,>=3.12
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
Requires-Dist: hyperforge
|
|
19
19
|
Requires-Dist: lingua-language-detector
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "hyperforge_nucliadb"
|
|
7
|
-
version = "1.0.0.
|
|
7
|
+
version = "1.0.0.post62"
|
|
8
8
|
license = "Apache-2.0"
|
|
9
9
|
description = "NucliaDB Hyperforge agent"
|
|
10
10
|
authors = [{ name = "Nuclia", email = "nucliadb@nuclia.com" }]
|
|
@@ -17,7 +17,7 @@ classifiers = [
|
|
|
17
17
|
"Programming Language :: Python :: 3 :: Only",
|
|
18
18
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
19
19
|
]
|
|
20
|
-
requires-python = ">=3.
|
|
20
|
+
requires-python = ">=3.12, <4"
|
|
21
21
|
dependencies = ["hyperforge", "lingua-language-detector", "nucliadb_sdk"]
|
|
22
22
|
|
|
23
23
|
[dependency-groups]
|
|
@@ -43,3 +43,6 @@ asyncio_mode = "auto"
|
|
|
43
43
|
|
|
44
44
|
# Exclude specific files from being packaged
|
|
45
45
|
source-exclude = ["tests/**", "*.pyc"]
|
|
46
|
+
|
|
47
|
+
[tool.ruff]
|
|
48
|
+
extend = "../../ruff.toml"
|
|
@@ -2,6 +2,7 @@ import asyncio
|
|
|
2
2
|
from time import time
|
|
3
3
|
from typing import Any, Dict, List, Optional, cast
|
|
4
4
|
|
|
5
|
+
from hyperforge import logger
|
|
5
6
|
from hyperforge.agent import Agent
|
|
6
7
|
from hyperforge.configure import agent
|
|
7
8
|
from hyperforge.context.agent import ContextAgent
|
|
@@ -10,7 +11,6 @@ from hyperforge.memory import Chunk, Context, QuestionMemory, Source
|
|
|
10
11
|
from nucliadb_models import filters as ndb_filters
|
|
11
12
|
from nucliadb_models.search import AskRequest
|
|
12
13
|
|
|
13
|
-
from hyperforge import logger
|
|
14
14
|
from hyperforge_nucliadb.advanced_ask_config import (
|
|
15
15
|
AdvancedAskAgentConfig,
|
|
16
16
|
)
|
|
@@ -85,7 +85,7 @@ class AdvancedAskAgent(ContextAgent, Agent[AdvancedAskAgentConfig]):
|
|
|
85
85
|
nucliadb_driver = get_ndb_driver(manager, source)
|
|
86
86
|
|
|
87
87
|
context = Context(
|
|
88
|
-
agent_id=self.config.id,
|
|
88
|
+
agent_id=self.config.id, # ty: ignore[invalid-argument-type]
|
|
89
89
|
original_question_uuid=memory.original_question_uuid,
|
|
90
90
|
actual_question_uuid=question_uuid,
|
|
91
91
|
question=question,
|
|
@@ -2,6 +2,7 @@ import asyncio
|
|
|
2
2
|
from time import time
|
|
3
3
|
from typing import Any, ClassVar, Dict, List, Optional, cast
|
|
4
4
|
|
|
5
|
+
from hyperforge import logger
|
|
5
6
|
from hyperforge.agent import Agent
|
|
6
7
|
from hyperforge.configure import agent
|
|
7
8
|
from hyperforge.context.agent import ContextAgent, trace_agent
|
|
@@ -9,7 +10,6 @@ from hyperforge.definition import FunctionDefinition
|
|
|
9
10
|
from hyperforge.manager import Manager
|
|
10
11
|
from hyperforge.memory.memory import Context, QuestionMemory, Source
|
|
11
12
|
|
|
12
|
-
from hyperforge import logger
|
|
13
13
|
from hyperforge_nucliadb.ask.analysis import question_analysis
|
|
14
14
|
from hyperforge_nucliadb.ask.config import AskAgentConfig
|
|
15
15
|
from hyperforge_nucliadb.ask.hydrate import hydrate
|
|
@@ -96,7 +96,7 @@ class AskAgent(ContextAgent, Agent[AskAgentConfig]):
|
|
|
96
96
|
config=self.config,
|
|
97
97
|
question=question,
|
|
98
98
|
step_title=self.step_title("Choose parameters"),
|
|
99
|
-
)
|
|
99
|
+
)
|
|
100
100
|
result.append(analysis)
|
|
101
101
|
return result
|
|
102
102
|
|
|
@@ -242,7 +242,7 @@ class AskAgent(ContextAgent, Agent[AskAgentConfig]):
|
|
|
242
242
|
raise Exception("No NDB available")
|
|
243
243
|
|
|
244
244
|
context = Context(
|
|
245
|
-
agent_id=self.config.id,
|
|
245
|
+
agent_id=self.config.id, # ty: ignore[invalid-argument-type]
|
|
246
246
|
original_question_uuid=memory.original_question_uuid,
|
|
247
247
|
actual_question_uuid=question_uuid,
|
|
248
248
|
question=question,
|
|
@@ -284,7 +284,7 @@ class AskAgent(ContextAgent, Agent[AskAgentConfig]):
|
|
|
284
284
|
# for now I'm only adding it if we have no fallback agent configured
|
|
285
285
|
if self.config.fallback is None:
|
|
286
286
|
context = Context(
|
|
287
|
-
agent_id=self.config.id,
|
|
287
|
+
agent_id=self.config.id, # ty: ignore[invalid-argument-type]
|
|
288
288
|
original_question_uuid=memory.original_question_uuid,
|
|
289
289
|
actual_question_uuid=missing_uuid,
|
|
290
290
|
question=missing,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
from hyperforge import logger
|
|
1
2
|
from hyperforge.manager import Manager
|
|
2
3
|
from hyperforge.models import Context
|
|
3
4
|
from nuclia.lib.nua_responses import RerankModel
|
|
4
5
|
|
|
5
|
-
from hyperforge import logger
|
|
6
|
-
|
|
7
6
|
|
|
8
7
|
async def rerank(context: Context, manager: Manager, top_k: int) -> None:
|
|
9
8
|
"""
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
from typing import Literal, Optional
|
|
2
2
|
|
|
3
|
+
from hyperforge import logger
|
|
3
4
|
from nucliadb_models import filters as ndb_filters
|
|
4
5
|
from nucliadb_models.labels import LABEL_QUERY_ALIASES as LABEL_ALIASES
|
|
5
6
|
from nucliadb_models.search import SyncAskResponse
|
|
6
7
|
|
|
7
|
-
from hyperforge import logger
|
|
8
|
-
|
|
9
8
|
|
|
10
9
|
def get_chunk_text(ask_response: SyncAskResponse, chunk_id: str) -> str:
|
|
11
10
|
ids = chunk_id.split("/")
|
|
@@ -4,6 +4,7 @@ import json
|
|
|
4
4
|
from time import time
|
|
5
5
|
from typing import Any, ClassVar, Dict, List, Literal, Optional, cast
|
|
6
6
|
|
|
7
|
+
from hyperforge import PROMPT_ENVIRONMENT, logger
|
|
7
8
|
from hyperforge.agent import Agent
|
|
8
9
|
from hyperforge.configure import agent
|
|
9
10
|
from hyperforge.context.agent import ContextAgent
|
|
@@ -36,7 +37,6 @@ from nucliadb_models.search import (
|
|
|
36
37
|
SyncAskResponse,
|
|
37
38
|
)
|
|
38
39
|
|
|
39
|
-
from hyperforge import PROMPT_ENVIRONMENT, logger
|
|
40
40
|
from hyperforge_nucliadb.ask.multi import choose_source
|
|
41
41
|
from hyperforge_nucliadb.ask_utils import (
|
|
42
42
|
combine_catalog_filter_expressions,
|
|
@@ -584,7 +584,7 @@ class BasicAskAgent(ContextAgent, Agent[BasicAskAgentConfig]):
|
|
|
584
584
|
|
|
585
585
|
if len(images_urls) > 0:
|
|
586
586
|
context = Context(
|
|
587
|
-
agent_id=self.config.id,
|
|
587
|
+
agent_id=self.config.id, # ty: ignore[invalid-argument-type]
|
|
588
588
|
original_question_uuid=memory.original_question_uuid,
|
|
589
589
|
actual_question_uuid=None,
|
|
590
590
|
question="Search images by title. Title: "
|
|
@@ -626,8 +626,8 @@ class BasicAskAgent(ContextAgent, Agent[BasicAskAgentConfig]):
|
|
|
626
626
|
for resource_id in resource_ids:
|
|
627
627
|
resource = await nucliadb_driver.get_resource_by_id(
|
|
628
628
|
query_params={
|
|
629
|
-
"show": ["basic", "extracted"],
|
|
630
|
-
"extracted": ["metadata", "file"],
|
|
629
|
+
"show": ["basic", "extracted"],
|
|
630
|
+
"extracted": ["metadata", "file"],
|
|
631
631
|
},
|
|
632
632
|
rid=resource_id,
|
|
633
633
|
)
|
|
@@ -637,7 +637,7 @@ class BasicAskAgent(ContextAgent, Agent[BasicAskAgentConfig]):
|
|
|
637
637
|
images_urls = await self.get_all_images(resource=resource)
|
|
638
638
|
if len(images_urls) > 0:
|
|
639
639
|
context = Context(
|
|
640
|
-
agent_id=self.config.id,
|
|
640
|
+
agent_id=self.config.id, # ty: ignore[invalid-argument-type]
|
|
641
641
|
original_question_uuid=memory.original_question_uuid,
|
|
642
642
|
actual_question_uuid=None,
|
|
643
643
|
question="All images by title. Title: " + title,
|
|
@@ -41,7 +41,7 @@ from hyperforge_nucliadb.sync.driver import SyncDriver
|
|
|
41
41
|
description="Provide answer questions from synched resources. This agent is responsible for handling the authentication flow and resource validation for synched resources, and then providing the valid resources to the Basic Ask Agent to answer questions.",
|
|
42
42
|
config_schema=SyncAskAgentConfig,
|
|
43
43
|
)
|
|
44
|
-
class SyncAskAgent(BasicAskAgent):
|
|
44
|
+
class SyncAskAgent(BasicAskAgent):
|
|
45
45
|
sources: Dict[str, SyncDriver]
|
|
46
46
|
settings: OAuthSettings = OAuthSettings()
|
|
47
47
|
|
|
@@ -8,12 +8,11 @@ from hyperforge_nucliadb.driver_config import (
|
|
|
8
8
|
NucliaDBConnection,
|
|
9
9
|
)
|
|
10
10
|
|
|
11
|
-
|
|
12
11
|
SYNC_HTTP_TIMEOUT = Timeout(connect=5.0, read=30.0, write=10.0, pool=5.0)
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
class SyncConnection(NucliaDBConnection):
|
|
16
|
-
connection_ids: list[str]
|
|
15
|
+
connection_ids: list[str]
|
|
17
16
|
|
|
18
17
|
@property
|
|
19
18
|
def kb_url(self) -> str:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import datetime
|
|
2
1
|
import asyncio
|
|
2
|
+
import datetime
|
|
3
3
|
import random
|
|
4
4
|
import time
|
|
5
5
|
from typing import Any, Dict, List, cast
|
|
@@ -35,7 +35,6 @@ from hyperforge_nucliadb.sync.config_driver import (
|
|
|
35
35
|
SyncDriverConfig,
|
|
36
36
|
)
|
|
37
37
|
|
|
38
|
-
|
|
39
38
|
SYNC_VALIDATE_ATTEMPTS = 2
|
|
40
39
|
SYNC_VALIDATE_RETRY_BASE_SECONDS = 0.5
|
|
41
40
|
SYNC_VALIDATE_RETRY_JITTER_SECONDS = 0.25
|
|
@@ -83,7 +82,7 @@ class ExternalConnectionOutput(BaseModel):
|
|
|
83
82
|
)
|
|
84
83
|
class SyncDriver(NucliaDBDriver):
|
|
85
84
|
async_driver: AsyncClient
|
|
86
|
-
config: SyncConnection
|
|
85
|
+
config: SyncConnection
|
|
87
86
|
information: Dict[str, ExternalConnectionOutput]
|
|
88
87
|
sync_configs: Dict[str, list[str]]
|
|
89
88
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hyperforge_nucliadb
|
|
3
|
-
Version: 1.0.0.
|
|
3
|
+
Version: 1.0.0.post62
|
|
4
4
|
Summary: NucliaDB Hyperforge agent
|
|
5
5
|
Author-email: Nuclia <nucliadb@nuclia.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
14
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
15
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
16
|
-
Requires-Python: <4,>=3.
|
|
16
|
+
Requires-Python: <4,>=3.12
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
Requires-Dist: hyperforge
|
|
19
19
|
Requires-Dist: lingua-language-detector
|
{hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/tests/test_nucliadb.py
RENAMED
|
@@ -8,12 +8,6 @@ from hyperforge.interaction import AragAnswer
|
|
|
8
8
|
from hyperforge.minimal_fixtures import cassette_nua_key
|
|
9
9
|
from hyperforge.models import Context
|
|
10
10
|
from hyperforge.utils.http import PrivateUrlError
|
|
11
|
-
from hyperforge_nucliadb.advanced_ask_agent import build_ask_request
|
|
12
|
-
from hyperforge_nucliadb.advanced_ask_config import AdvancedAskAgentConfig
|
|
13
|
-
from hyperforge_nucliadb.ask.hydrate import hydrate_images
|
|
14
|
-
from hyperforge_nucliadb.driver_config import (
|
|
15
|
-
NucliaDBConnection,
|
|
16
|
-
)
|
|
17
11
|
from nucliadb_models import filters as ndb_filters
|
|
18
12
|
from nucliadb_models.hydration import (
|
|
19
13
|
Hydrated,
|
|
@@ -25,6 +19,13 @@ from nucliadb_models.hydration import (
|
|
|
25
19
|
)
|
|
26
20
|
from nucliadb_models.search import AskRequest, Image
|
|
27
21
|
|
|
22
|
+
from hyperforge_nucliadb.advanced_ask_agent import build_ask_request
|
|
23
|
+
from hyperforge_nucliadb.advanced_ask_config import AdvancedAskAgentConfig
|
|
24
|
+
from hyperforge_nucliadb.ask.hydrate import hydrate_images
|
|
25
|
+
from hyperforge_nucliadb.driver_config import (
|
|
26
|
+
NucliaDBConnection,
|
|
27
|
+
)
|
|
28
|
+
|
|
28
29
|
NUA_KEY = os.environ.get(
|
|
29
30
|
"NUA_KEY",
|
|
30
31
|
) or cassette_nua_key("https://europe-1.nuclia.cloud/")
|
|
@@ -249,7 +250,7 @@ async def test_nucliadb_agent():
|
|
|
249
250
|
|
|
250
251
|
|
|
251
252
|
@pytest.mark.asyncio
|
|
252
|
-
@pytest.mark.vcr(ignore_localhost=True)
|
|
253
|
+
@pytest.mark.vcr(ignore_localhost=True, ignore_hosts=["europe-1.dp.progress.cloud"])
|
|
253
254
|
async def test_nucliadb_agent_simple():
|
|
254
255
|
answers = []
|
|
255
256
|
|
|
@@ -275,7 +276,7 @@ async def test_nucliadb_agent_simple():
|
|
|
275
276
|
|
|
276
277
|
|
|
277
278
|
@pytest.mark.asyncio
|
|
278
|
-
@pytest.mark.vcr(ignore_localhost=True)
|
|
279
|
+
@pytest.mark.vcr(ignore_localhost=True, ignore_hosts=["europe-1.dp.progress.cloud"])
|
|
279
280
|
async def test_nucliadb_agent_simple_disable_ai_parameter_search():
|
|
280
281
|
question_memory = await arag_main(
|
|
281
282
|
agent_id="default",
|
|
@@ -293,7 +294,7 @@ async def test_nucliadb_agent_simple_disable_ai_parameter_search():
|
|
|
293
294
|
|
|
294
295
|
|
|
295
296
|
@pytest.mark.asyncio
|
|
296
|
-
@pytest.mark.vcr(ignore_localhost=True)
|
|
297
|
+
@pytest.mark.vcr(ignore_localhost=True, ignore_hosts=["europe-1.dp.progress.cloud"])
|
|
297
298
|
async def test_nucliadb_agent_basic_ask():
|
|
298
299
|
config = deepcopy(CONFIG_SIMPLE)
|
|
299
300
|
|
|
@@ -22,7 +22,10 @@ KB_E103CAF3_F8CB_4161_A57C_AAD1192D0666 = os.environ.get(
|
|
|
22
22
|
"KB_E103CAF3_F8CB_4161_A57C_AAD1192D0666"
|
|
23
23
|
) or cassette_nua_key("https://europe-1.nuclia.cloud/")
|
|
24
24
|
|
|
25
|
-
pytestmark = [
|
|
25
|
+
pytestmark = [
|
|
26
|
+
pytest.mark.vcr(ignore_localhost=True, ignore_hosts=["europe-1.dp.progress.cloud"]),
|
|
27
|
+
pytest.mark.asyncio,
|
|
28
|
+
]
|
|
26
29
|
|
|
27
30
|
CONFIG = {
|
|
28
31
|
"drivers": [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -3,6 +3,7 @@ from copy import deepcopy
|
|
|
3
3
|
from time import time
|
|
4
4
|
from typing import Any, Dict, List
|
|
5
5
|
|
|
6
|
+
from hyperforge import PROMPT_ENVIRONMENT
|
|
6
7
|
from hyperforge.manager import Manager
|
|
7
8
|
from hyperforge.memory.memory import QuestionMemory, Source
|
|
8
9
|
from nuclia_models.predict.run_agents import RunTextAgentsRequest
|
|
@@ -10,7 +11,6 @@ from nuclia_models.worker.triggers import Relation
|
|
|
10
11
|
from nucliadb_models import RelationNodeType
|
|
11
12
|
from nucliadb_models.search import Filter, KnowledgeGraphEntity
|
|
12
13
|
|
|
13
|
-
from hyperforge import PROMPT_ENVIRONMENT
|
|
14
14
|
from hyperforge_nucliadb.ask.config import AskAgentConfig
|
|
15
15
|
from hyperforge_nucliadb.ask.kb_analysis import get_knowledge_base_analysis
|
|
16
16
|
from hyperforge_nucliadb.ask.models import Analysis
|
|
File without changes
|
|
@@ -3,6 +3,7 @@ from dataclasses import dataclass, field
|
|
|
3
3
|
from enum import Enum
|
|
4
4
|
from typing import Dict, List, Tuple
|
|
5
5
|
|
|
6
|
+
from hyperforge import logger
|
|
6
7
|
from hyperforge.models import Chunk, Context, FieldTypes
|
|
7
8
|
from nuclia.lib.nua_responses import Image
|
|
8
9
|
from nucliadb_models import PagePositions
|
|
@@ -24,7 +25,6 @@ from nucliadb_models.hydration import (
|
|
|
24
25
|
from nucliadb_models.resource import FileFieldExtractedData, LinkFieldExtractedData
|
|
25
26
|
from nucliadb_models.search import KnowledgeboxFindResults
|
|
26
27
|
|
|
27
|
-
from hyperforge import logger
|
|
28
28
|
from hyperforge_nucliadb.ask.models import NDBChunk, SearchResults
|
|
29
29
|
from hyperforge_nucliadb.driver import NucliaDBDriver
|
|
30
30
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -2,11 +2,11 @@ import asyncio
|
|
|
2
2
|
from time import time
|
|
3
3
|
from typing import List, cast
|
|
4
4
|
|
|
5
|
+
from hyperforge import PROMPT_ENVIRONMENT
|
|
5
6
|
from hyperforge.manager import Manager
|
|
6
7
|
from hyperforge.memory.memory import QuestionMemory
|
|
7
8
|
from hyperforge.models import Source
|
|
8
9
|
|
|
9
|
-
from hyperforge import PROMPT_ENVIRONMENT
|
|
10
10
|
from hyperforge_nucliadb.driver import NucliaDBDriver
|
|
11
11
|
from hyperforge_nucliadb.sync.driver import SyncDriver
|
|
12
12
|
|
|
File without changes
|
|
File without changes
|
|
@@ -2,9 +2,9 @@ import re
|
|
|
2
2
|
from dataclasses import dataclass
|
|
3
3
|
from typing import Optional
|
|
4
4
|
|
|
5
|
+
from hyperforge import logger
|
|
5
6
|
from lingua import LanguageDetectorBuilder
|
|
6
7
|
|
|
7
|
-
from hyperforge import logger
|
|
8
8
|
from hyperforge_nucliadb.ask.config import AskAgentConfig
|
|
9
9
|
from hyperforge_nucliadb.ask.kb_analysis import KnowledgeBoxInfo
|
|
10
10
|
|
|
File without changes
|
|
File without changes
|
|
@@ -4,6 +4,7 @@ from functools import reduce
|
|
|
4
4
|
from typing import Dict, List, Optional, Union
|
|
5
5
|
|
|
6
6
|
import httpx
|
|
7
|
+
from hyperforge import logger
|
|
7
8
|
from hyperforge.configure import driver
|
|
8
9
|
from hyperforge.driver import Driver
|
|
9
10
|
from hyperforge.models import Facets
|
|
@@ -37,7 +38,6 @@ from nucliadb_models.search import (
|
|
|
37
38
|
)
|
|
38
39
|
from nucliadb_sdk.v2 import NucliaDBAsync
|
|
39
40
|
|
|
40
|
-
from hyperforge import logger
|
|
41
41
|
from hyperforge_nucliadb.driver_config import (
|
|
42
42
|
ManagerConnection,
|
|
43
43
|
NucliaDBConfig,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hyperforge_nucliadb-1.0.0.post58 → hyperforge_nucliadb-1.0.0.post62}/tests/test_ask_utils.py
RENAMED
|
File without changes
|