naas-abi 1.0.5__py3-none-any.whl → 1.0.6.dev1__py3-none-any.whl
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.
- naas_abi/__init__.py +12 -11
- naas_abi/agents/AbiAgent.py +13 -13
- naas_abi/models/default.py +2 -3
- {naas_abi-1.0.5.dist-info → naas_abi-1.0.6.dev1.dist-info}/METADATA +1 -1
- {naas_abi-1.0.5.dist-info → naas_abi-1.0.6.dev1.dist-info}/RECORD +7 -8
- naas_abi/models/gpt_4_1.py +0 -26
- {naas_abi-1.0.5.dist-info → naas_abi-1.0.6.dev1.dist-info}/WHEEL +0 -0
- {naas_abi-1.0.5.dist-info → naas_abi-1.0.6.dev1.dist-info}/top_level.txt +0 -0
naas_abi/__init__.py
CHANGED
|
@@ -15,20 +15,21 @@ class ABIModule(BaseModule):
|
|
|
15
15
|
modules=[
|
|
16
16
|
"naas_abi_marketplace.ai.chatgpt",
|
|
17
17
|
"naas_abi_marketplace.ai.claude#soft",
|
|
18
|
-
"naas_abi_core.modules.templatablesparqlquery",
|
|
18
|
+
# "naas_abi_core.modules.templatablesparqlquery",
|
|
19
19
|
],
|
|
20
20
|
services=[Secret, TripleStoreService, ObjectStorageService],
|
|
21
21
|
)
|
|
22
22
|
|
|
23
23
|
class Configuration(ModuleConfiguration):
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
pass
|
|
25
|
+
# openai_api_key: str | None = None
|
|
26
|
+
# anthropic_api_key: str | None = None
|
|
26
27
|
|
|
27
|
-
def on_initialized(self):
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
# def on_initialized(self):
|
|
29
|
+
# if (
|
|
30
|
+
# self.configuration.anthropic_api_key is not None
|
|
31
|
+
# and "naas_abi_marketplace.ai.claude" not in self.engine.modules
|
|
32
|
+
# ):
|
|
33
|
+
# raise ValueError(
|
|
34
|
+
# "anthropic_api_key is provided but naas_abi_marketplace.ai.claude is not available"
|
|
35
|
+
# )
|
naas_abi/agents/AbiAgent.py
CHANGED
|
@@ -149,19 +149,19 @@ You can browse the data and run queries there."""
|
|
|
149
149
|
|
|
150
150
|
tools.append(open_knowledge_graph_explorer)
|
|
151
151
|
|
|
152
|
-
templatable_sparql_query_module = ABIModule.get_instance().engine.modules[
|
|
153
|
-
|
|
154
|
-
]
|
|
155
|
-
|
|
156
|
-
agent_recommendation_tools = [
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
]
|
|
164
|
-
tools.extend(templatable_sparql_query_module.get_tools(agent_recommendation_tools))
|
|
152
|
+
# templatable_sparql_query_module = ABIModule.get_instance().engine.modules[
|
|
153
|
+
# "naas_abi_core.modules.templatablesparqlquery"
|
|
154
|
+
# ]
|
|
155
|
+
|
|
156
|
+
# agent_recommendation_tools = [
|
|
157
|
+
# "find_business_proposal_agents",
|
|
158
|
+
# "find_coding_agents",
|
|
159
|
+
# "find_math_agents",
|
|
160
|
+
# "find_best_value_agents",
|
|
161
|
+
# "find_fastest_agents",
|
|
162
|
+
# "find_cheapest_agents",
|
|
163
|
+
# ]
|
|
164
|
+
# tools.extend(templatable_sparql_query_module.get_tools(agent_recommendation_tools))
|
|
165
165
|
|
|
166
166
|
shared_state = agent_shared_state or AgentSharedState(
|
|
167
167
|
thread_id="0", supervisor_agent=NAME
|
naas_abi/models/default.py
CHANGED
|
@@ -5,13 +5,13 @@ from naas_abi_core.models.Model import ChatModel
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
def get_model() -> ChatModel:
|
|
8
|
+
from naas_abi_marketplace.ai.chatgpt import ABIModule as ChatGPTABIModule
|
|
8
9
|
ai_mode: Literal["cloud", "local", "airgap"] = (
|
|
9
10
|
ABIModule.get_instance().configuration.global_config.ai_mode
|
|
10
11
|
)
|
|
11
12
|
if (
|
|
12
13
|
ai_mode == "airgap"
|
|
13
|
-
or not
|
|
14
|
-
and not ABIModule.get_instance().configuration.openrouter_api_key
|
|
14
|
+
or not ChatGPTABIModule.get_instance().configuration.openai_api_key
|
|
15
15
|
):
|
|
16
16
|
from naas_abi.models.airgap_qwen import model as airgap_model
|
|
17
17
|
|
|
@@ -22,4 +22,3 @@ def get_model() -> ChatModel:
|
|
|
22
22
|
)
|
|
23
23
|
|
|
24
24
|
return cloud_model
|
|
25
|
-
return cloud_model
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
naas_abi/__init__.py,sha256=
|
|
1
|
+
naas_abi/__init__.py,sha256=Zqi9WxG8fsjWNxGHt_LZi7tVx8kEBUug6RqLOst0Gzs,1209
|
|
2
2
|
naas_abi/cli.py,sha256=bfCcxGoQ_iSMhQDDX0-dRCyhc53Nawsy3WAruCNCL7M,27549
|
|
3
3
|
naas_abi/mappings.py,sha256=qu17k8cPwPNKRIqchDMnxViDx0Kn0MTy2XT8XYUIW34,4872
|
|
4
4
|
naas_abi/triggers.py,sha256=ljkgZP2zsTlmkK02ivTPW-yV02pn2TdyRk5CP4kUtvo,4658
|
|
5
|
-
naas_abi/agents/AbiAgent.py,sha256=
|
|
5
|
+
naas_abi/agents/AbiAgent.py,sha256=mjOCpMncEuDm-y7ZcFg_IEaSSTYJLkt6ICkljD2DK30,18095
|
|
6
6
|
naas_abi/agents/AbiAgent_test.py,sha256=AKggG5RS3zDWnql1DFE7cF7riAHeOdKTZp44WN65Arg,5906
|
|
7
7
|
naas_abi/agents/EntitytoSPARQLAgent.py,sha256=KNBQUIANT1nuQ62zBySm1izGSEl6SCsfwm9l_SGCDGs,57105
|
|
8
8
|
naas_abi/agents/EntitytoSPARQLAgent_test.py,sha256=kx0gkbJoQZqt2_f_RINajwQU5EnHR1PsQx53rh7wJvA,2267
|
|
@@ -18,8 +18,7 @@ naas_abi/apps/terminal_agent/main.py,sha256=7MN88mivIV7gP1lELnqNxP_huwTbavhnTjkN
|
|
|
18
18
|
naas_abi/apps/terminal_agent/terminal_style.py,sha256=YOpfvBlKU52wNyGEKbZPiRQVKxug-hI92H8ScV5L8Ew,5254
|
|
19
19
|
naas_abi/models/airgap_gemma.py,sha256=I9pWN_DSgy4h6rT7OiYWDVijyTMoEgONm4xfZYWvp6I,8469
|
|
20
20
|
naas_abi/models/airgap_qwen.py,sha256=EQZ-0tAKZCTCqnovLiGCx4ss0yh2Jjk0xh7wCwDomG8,682
|
|
21
|
-
naas_abi/models/default.py,sha256=
|
|
22
|
-
naas_abi/models/gpt_4_1.py,sha256=0luDssCvt8BoK_iVDRI7wkZ5GYn1d--G3GtnN6jiPIg,838
|
|
21
|
+
naas_abi/models/default.py,sha256=XZ4--FmFjvO99fQdV0I7niJtHNgSFZuCKPb95pyhLns,721
|
|
23
22
|
naas_abi/pipelines/AIAgentOntologyGenerationPipeline.py,sha256=QWrooZ_xJy0uX92Tzw7fBOs_uME2nLhsjeWi0EGTUBA,24640
|
|
24
23
|
naas_abi/pipelines/AIAgentOntologyGenerationPipeline_test.py,sha256=lDsuZKfQlCtLNKQ09nkSHemsvjSNdeZAhaDw-cPYbjo,4130
|
|
25
24
|
naas_abi/pipelines/AddIndividualPipeline.py,sha256=EKrJX4ODXBMSFUl0R2UsaSmLaj0cUJ3AdIhhtU0Fhso,8445
|
|
@@ -56,7 +55,7 @@ naas_abi/workflows/GetSubjectGraphWorkflow.py,sha256=EkgrFQPyaUVeC8sd7oVcxT9LUka
|
|
|
56
55
|
naas_abi/workflows/GetSubjectGraphWorkflow_test.py,sha256=fzzFYUwojM39x5Ld-59jHMDbGy4Lcq6uO8_BAvZV0ug,1886
|
|
57
56
|
naas_abi/workflows/SearchIndividualWorkflow.py,sha256=6vWwywKNBlaosopPxiw0OpQnrn99wuiji0uA7jwKOn4,6572
|
|
58
57
|
naas_abi/workflows/SearchIndividualWorkflow_test.py,sha256=KBhd58TATMSWWdThYPg7veAySR4hts5LuoygQqQIiaU,2749
|
|
59
|
-
naas_abi-1.0.
|
|
60
|
-
naas_abi-1.0.
|
|
61
|
-
naas_abi-1.0.
|
|
62
|
-
naas_abi-1.0.
|
|
58
|
+
naas_abi-1.0.6.dev1.dist-info/METADATA,sha256=8_Ls-7aVRRj6xpAKh7HphjWiXaZO2rHEKqUYroDx0yk,394
|
|
59
|
+
naas_abi-1.0.6.dev1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
60
|
+
naas_abi-1.0.6.dev1.dist-info/top_level.txt,sha256=Dhf3mhATB9-JuvBR8Y55OabvI-PCeQUqb5ae3EMmbeA,9
|
|
61
|
+
naas_abi-1.0.6.dev1.dist-info/RECORD,,
|
naas_abi/models/gpt_4_1.py
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
from langchain_openai import ChatOpenAI
|
|
2
|
-
from naas_abi import ABIModule
|
|
3
|
-
from naas_abi_core.models.Model import ChatModel
|
|
4
|
-
from pydantic import SecretStr
|
|
5
|
-
|
|
6
|
-
ID = "gpt-4.1"
|
|
7
|
-
NAME = "gpt-4.1"
|
|
8
|
-
DESCRIPTION = "GPT-4.1 excels at instruction following and tool calling, with broad knowledge across domains. It features a 1M token context window, and low latency without a reasoning step."
|
|
9
|
-
IMAGE = "https://naasai-public.s3.eu-west-3.amazonaws.com/abi-demo/ontology_ABI.png"
|
|
10
|
-
CONTEXT_WINDOW = 1047576
|
|
11
|
-
OWNER = "openai"
|
|
12
|
-
|
|
13
|
-
model: ChatModel = ChatModel(
|
|
14
|
-
model_id=ID,
|
|
15
|
-
provider=OWNER,
|
|
16
|
-
name=NAME,
|
|
17
|
-
description=DESCRIPTION,
|
|
18
|
-
image=IMAGE,
|
|
19
|
-
owner=OWNER,
|
|
20
|
-
model=ChatOpenAI(
|
|
21
|
-
model=ID,
|
|
22
|
-
temperature=0,
|
|
23
|
-
api_key=SecretStr(ABIModule.get_instance().configuration.openai_api_key),
|
|
24
|
-
),
|
|
25
|
-
context_window=CONTEXT_WINDOW,
|
|
26
|
-
)
|
|
File without changes
|
|
File without changes
|