hyperforge-nucliadb 1.0.0.post85__tar.gz → 1.0.0.post87__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.post85 → hyperforge_nucliadb-1.0.0.post87}/PKG-INFO +1 -1
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/pyproject.toml +1 -1
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/advanced_ask_agent.py +1 -1
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/advanced_ask_config.py +3 -3
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/ask/config.py +3 -3
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/basic_ask_agent.py +3 -3
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/basic_ask_config.py +3 -3
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb.egg-info/PKG-INFO +1 -1
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/README.md +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/setup.cfg +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/__init__.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/ask/__init__.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/ask/analysis.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/ask/ask.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/ask/hydrate.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/ask/kb_analysis.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/ask/knowledge_scan.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/ask/models.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/ask/multi.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/ask/nucliadb.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/ask/prompt_analysis.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/ask/query_analysis.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/ask/rerank.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/ask/utils.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/ask_utils.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/driver.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/driver_config.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/py.typed +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/sync/__init__.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/sync/agent.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/sync/config.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/sync/config_driver.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb/sync/driver.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb.egg-info/SOURCES.txt +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb.egg-info/dependency_links.txt +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb.egg-info/requires.txt +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/src/hyperforge_nucliadb.egg-info/top_level.txt +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/tests/test_ask_utils.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/tests/test_driver.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/tests/test_nucliadb.py +0 -0
- {hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/tests/test_sync.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.post87"
|
|
8
8
|
license = "Apache-2.0"
|
|
9
9
|
description = "NucliaDB Hyperforge agent"
|
|
10
10
|
authors = [{ name = "Nuclia", email = "nucliadb@nuclia.com" }]
|
|
@@ -190,7 +190,7 @@ def build_ask_request(
|
|
|
190
190
|
filter_expression = parse_filter_expression(agent, driver)
|
|
191
191
|
ask_request = AskRequest(
|
|
192
192
|
query=question,
|
|
193
|
-
generative_model=agent.generative_model,
|
|
193
|
+
generative_model=agent.generative_model.model_id,
|
|
194
194
|
citations=True,
|
|
195
195
|
filters=driver.filters,
|
|
196
196
|
)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from typing import Any, List, Literal, Optional, Union
|
|
2
2
|
|
|
3
3
|
from hyperforge.context.config import ContextAgentConfig
|
|
4
|
+
from hyperforge.llm_config import LLMConfig, LLMField, llm_defaults
|
|
4
5
|
from hyperforge.utils import WidgetType
|
|
5
6
|
from nucliadb_models.filters import FilterExpression
|
|
6
7
|
from nucliadb_models.search import (
|
|
@@ -30,11 +31,10 @@ class AdvancedAskAgentConfig(ContextAgentConfig):
|
|
|
30
31
|
"show_in_node": True,
|
|
31
32
|
},
|
|
32
33
|
)
|
|
33
|
-
generative_model:
|
|
34
|
-
default=
|
|
34
|
+
generative_model: LLMField = Field(
|
|
35
|
+
default=LLMConfig(model_id=llm_defaults.default),
|
|
35
36
|
title="Generative model",
|
|
36
37
|
description="Model used to generate answers",
|
|
37
|
-
json_schema_extra={"widget": WidgetType.MODEL_SELECT},
|
|
38
38
|
)
|
|
39
39
|
features: Optional[list[ChatOptions]] = Field(
|
|
40
40
|
default=None,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from typing import List, Literal, Optional
|
|
2
2
|
|
|
3
3
|
from hyperforge.context.config import ContextAgentConfig
|
|
4
|
+
from hyperforge.llm_config import LLMConfig, LLMField, llm_defaults
|
|
4
5
|
from hyperforge.utils import WidgetType
|
|
5
6
|
from nucliadb_models.search import KnowledgeGraphEntity
|
|
6
7
|
from pydantic import Field
|
|
@@ -40,11 +41,10 @@ class AskAgentConfig(ContextAgentConfig):
|
|
|
40
41
|
"show_in_node": True,
|
|
41
42
|
},
|
|
42
43
|
)
|
|
43
|
-
configuration_model:
|
|
44
|
-
default=
|
|
44
|
+
configuration_model: LLMField = Field(
|
|
45
|
+
default=LLMConfig(model_id=llm_defaults.fast),
|
|
45
46
|
title="Generative model",
|
|
46
47
|
description="Model used to generate the configuration",
|
|
47
|
-
json_schema_extra={"widget": WidgetType.MODEL_SELECT},
|
|
48
48
|
)
|
|
49
49
|
fast_answer: bool = True
|
|
50
50
|
# Setting this to True so that this PR will not break the current behavior
|
|
@@ -709,7 +709,7 @@ class BasicAskAgent(ContextAgent, Agent[BasicAskAgentConfig]):
|
|
|
709
709
|
# Use full resource strategy by requesting title and summary fields
|
|
710
710
|
ask_request = AskRequest(
|
|
711
711
|
query=question,
|
|
712
|
-
generative_model=self.config.generative_model,
|
|
712
|
+
generative_model=self.config.generative_model.model_id,
|
|
713
713
|
# TODO: Consider what to do when multiple resources match
|
|
714
714
|
filter_expression=filter_expression,
|
|
715
715
|
rag_strategies=[
|
|
@@ -1132,7 +1132,7 @@ class BasicAskAgent(ContextAgent, Agent[BasicAskAgentConfig]):
|
|
|
1132
1132
|
query=question,
|
|
1133
1133
|
show=[ResourceProperties.BASIC, ResourceProperties.ORIGIN],
|
|
1134
1134
|
citations=CitationsType.LLM_FOOTNOTES,
|
|
1135
|
-
generative_model=self.config.generative_model,
|
|
1135
|
+
generative_model=self.config.generative_model.model_id,
|
|
1136
1136
|
filter_expression=filter_expression,
|
|
1137
1137
|
rag_strategies=rag_strategies,
|
|
1138
1138
|
)
|
|
@@ -1244,7 +1244,7 @@ class BasicAskAgent(ContextAgent, Agent[BasicAskAgentConfig]):
|
|
|
1244
1244
|
ask_request = AskRequest(
|
|
1245
1245
|
query=question,
|
|
1246
1246
|
citations=True,
|
|
1247
|
-
generative_model=self.config.generative_model,
|
|
1247
|
+
generative_model=self.config.generative_model.model_id,
|
|
1248
1248
|
filters=nucliadb_driver.config.filters,
|
|
1249
1249
|
)
|
|
1250
1250
|
paragraphs = await nucliadb_driver.ask(
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from typing import List, Literal, Optional, Tuple
|
|
2
2
|
|
|
3
3
|
from hyperforge.context.agent import ContextAgentConfig
|
|
4
|
+
from hyperforge.llm_config import LLMConfig, LLMField, llm_defaults
|
|
4
5
|
from hyperforge.utils import WidgetType
|
|
5
6
|
from pydantic import Field
|
|
6
7
|
from pydantic.config import ConfigDict
|
|
@@ -15,11 +16,10 @@ class BasicAskAgentConfig(ContextAgentConfig):
|
|
|
15
16
|
"show_in_node": True,
|
|
16
17
|
},
|
|
17
18
|
)
|
|
18
|
-
generative_model:
|
|
19
|
-
default=
|
|
19
|
+
generative_model: LLMField = Field(
|
|
20
|
+
default=LLMConfig(model_id=llm_defaults.default),
|
|
20
21
|
title="Generative model",
|
|
21
22
|
description="Model used to generate answers",
|
|
22
|
-
json_schema_extra={"widget": WidgetType.MODEL_SELECT},
|
|
23
23
|
)
|
|
24
24
|
published_functions: Optional[Tuple[str, ...]] = Field(
|
|
25
25
|
default=(
|
|
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
|
{hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/tests/test_ask_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
{hyperforge_nucliadb-1.0.0.post85 → hyperforge_nucliadb-1.0.0.post87}/tests/test_nucliadb.py
RENAMED
|
File without changes
|
|
File without changes
|