hyperforge-nucliadb 1.0.0.post29__tar.gz → 1.0.0.post34__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.post29 → hyperforge_nucliadb-1.0.0.post34}/PKG-INFO +1 -1
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/pyproject.toml +1 -1
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/ask/kb_analysis.py +0 -6
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/ask/multi.py +1 -1
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/driver.py +7 -7
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/sync/agent.py +1 -1
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/sync/driver.py +2 -2
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb.egg-info/PKG-INFO +1 -1
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/tests/test_sync.py +1 -1
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/README.md +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/setup.cfg +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/__init__.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/advanced_ask_agent.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/advanced_ask_config.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/ask/__init__.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/ask/analysis.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/ask/ask.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/ask/config.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/ask/hydrate.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/ask/knowledge_scan.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/ask/models.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/ask/nucliadb.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/ask/prompt_analysis.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/ask/query_analysis.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/ask/rerank.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/ask/utils.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/ask_utils.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/basic_ask_agent.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/basic_ask_config.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/driver_config.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/sync/__init__.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/sync/config.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb/sync/config_driver.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb.egg-info/SOURCES.txt +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb.egg-info/dependency_links.txt +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb.egg-info/requires.txt +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/src/hyperforge_nucliadb.egg-info/top_level.txt +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/tests/test_ask_utils.py +0 -0
- {hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/tests/test_nucliadb.py +0 -0
|
@@ -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.post34"
|
|
8
8
|
license = "Apache-2.0"
|
|
9
9
|
description = "NucliaDB Hyperforge agent"
|
|
10
10
|
authors = [{ name = "Nuclia", email = "nucliadb@nuclia.com" }]
|
|
@@ -9,7 +9,6 @@ from nuclia.lib.nua_responses import SemanticConfig
|
|
|
9
9
|
class KnowledgeBoxInfo:
|
|
10
10
|
content_types: Dict[str, int]
|
|
11
11
|
languages: Dict[str, int]
|
|
12
|
-
facets: Dict[str, int]
|
|
13
12
|
paragraph_facets: Dict[str, int]
|
|
14
13
|
entity_model: str
|
|
15
14
|
generative_model: str
|
|
@@ -22,8 +21,6 @@ def get_knowledge_base_analysis(source: Source):
|
|
|
22
21
|
content_types = {}
|
|
23
22
|
languages: Dict[str, int] = {}
|
|
24
23
|
|
|
25
|
-
facets: Dict[str, int] = {}
|
|
26
|
-
|
|
27
24
|
for key, count in source.facets_native.facets.items():
|
|
28
25
|
if key.startswith("/n/i"):
|
|
29
26
|
content_type = key.replace("/n/i/", "")
|
|
@@ -32,14 +29,11 @@ def get_knowledge_base_analysis(source: Source):
|
|
|
32
29
|
elif key.startswith("/s/p/"):
|
|
33
30
|
language = key.replace("/s/p/", "")
|
|
34
31
|
languages[language] = count
|
|
35
|
-
else:
|
|
36
|
-
facets[key] = count
|
|
37
32
|
|
|
38
33
|
return KnowledgeBoxInfo(
|
|
39
34
|
paragraph_facets=source.paragraph_facets,
|
|
40
35
|
content_types=content_types,
|
|
41
36
|
languages=languages,
|
|
42
|
-
facets=facets,
|
|
43
37
|
semantic_models=source.learning_configuration.semantic_models,
|
|
44
38
|
entity_model=source.learning_configuration.ner_model,
|
|
45
39
|
generative_model=source.learning_configuration.generative_model,
|
|
@@ -122,7 +122,7 @@ async def choose_source(
|
|
|
122
122
|
async def load_source_information(source: str, manager: Manager) -> Source:
|
|
123
123
|
driver = manager.drivers.get(source)
|
|
124
124
|
if not isinstance(driver, NucliaDBDriver) and not isinstance(driver, SyncDriver):
|
|
125
|
-
raise ValueError("Source is not a
|
|
125
|
+
raise ValueError("Source is not a KnowledgeBox source")
|
|
126
126
|
(
|
|
127
127
|
description,
|
|
128
128
|
labels,
|
|
@@ -81,8 +81,8 @@ async def manager_connect(conn: NucliaDBConnection):
|
|
|
81
81
|
|
|
82
82
|
@driver(
|
|
83
83
|
id="nucliadb",
|
|
84
|
-
title="
|
|
85
|
-
description="
|
|
84
|
+
title="KnowledgeBox Source",
|
|
85
|
+
description="Source for interacting with the KnowledgeBox API.",
|
|
86
86
|
config_schema=NucliaDBConfig,
|
|
87
87
|
)
|
|
88
88
|
class NucliaDBDriver(Driver):
|
|
@@ -264,13 +264,13 @@ class NucliaDBDriver(Driver):
|
|
|
264
264
|
|
|
265
265
|
# Run requests in parallel as otherwise the facets endpoint can take too long on large knowledge boxes.
|
|
266
266
|
tasks = []
|
|
267
|
-
for prefix
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
267
|
+
for prefix in [
|
|
268
|
+
"/n/i", # content types
|
|
269
|
+
"/s/p", # primary language
|
|
270
|
+
# "/l", # classification labels
|
|
271
271
|
]:
|
|
272
272
|
request = CatalogFacetsRequest(
|
|
273
|
-
prefixes=[CatalogFacetsPrefix(prefix=prefix
|
|
273
|
+
prefixes=[CatalogFacetsPrefix(prefix=prefix)]
|
|
274
274
|
)
|
|
275
275
|
tasks.append(
|
|
276
276
|
self.driver.catalog_facets(kbid=self.config.kbid, content=request)
|
|
@@ -157,7 +157,7 @@ class SyncAskAgent(BasicAskAgent): # type: ignore
|
|
|
157
157
|
or len(driver.sync_configs[sync_config_id]) == 0
|
|
158
158
|
):
|
|
159
159
|
raise Exception(
|
|
160
|
-
f"Connection ID {sync_config_id} not found in
|
|
160
|
+
f"Connection ID {sync_config_id} not found in source sync configs"
|
|
161
161
|
)
|
|
162
162
|
inner_connection_id = driver.sync_configs[sync_config_id][0]
|
|
163
163
|
creds_providers[sync_config_id] = driver.information[
|
|
@@ -52,8 +52,8 @@ class ExternalConnectionOutput(BaseModel):
|
|
|
52
52
|
|
|
53
53
|
@driver(
|
|
54
54
|
id="sync",
|
|
55
|
-
title="Sync
|
|
56
|
-
description="
|
|
55
|
+
title="Sync Source",
|
|
56
|
+
description="Source for interacting with the Sync API.",
|
|
57
57
|
config_schema=SyncDriverConfig,
|
|
58
58
|
)
|
|
59
59
|
class SyncDriver(NucliaDBDriver):
|
|
@@ -36,7 +36,7 @@ CONFIG = {
|
|
|
36
36
|
"kbid": "e103caf3-f8cb-4161-a57c-aad1192d0666",
|
|
37
37
|
"key": KB_E103CAF3_F8CB_4161_A57C_AAD1192D0666,
|
|
38
38
|
"filters": [],
|
|
39
|
-
"description": "Nuclia Sync
|
|
39
|
+
"description": "Nuclia Sync source for testing",
|
|
40
40
|
"connection_ids": ["019cade7-c177-77c5-99c2-c8771f85cf91"],
|
|
41
41
|
},
|
|
42
42
|
},
|
|
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
|
{hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/tests/test_ask_utils.py
RENAMED
|
File without changes
|
{hyperforge_nucliadb-1.0.0.post29 → hyperforge_nucliadb-1.0.0.post34}/tests/test_nucliadb.py
RENAMED
|
File without changes
|