naas-abi-cli 1.9.1__py3-none-any.whl → 1.10.0__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.
@@ -1,4 +1,9 @@
1
+ import naas_abi_cli.cli.new.agent as agent # noqa: F401
2
+ import naas_abi_cli.cli.new.integration as integration # noqa: F401
1
3
  import naas_abi_cli.cli.new.module as module # noqa: F401
4
+ import naas_abi_cli.cli.new.orchestration as orchestration # noqa: F401
5
+ import naas_abi_cli.cli.new.pipeline as pipeline # noqa: F401
2
6
  import naas_abi_cli.cli.new.project as project # noqa: F401
7
+ import naas_abi_cli.cli.new.workflow as workflow # noqa: F401
3
8
 
4
9
  from .new import new # noqa: F401
@@ -0,0 +1,42 @@
1
+ import os
2
+
3
+ import click
4
+
5
+ import naas_abi_cli
6
+ from naas_abi_cli.cli.utils.Copier import Copier
7
+
8
+ from .new import new
9
+ from .utils import to_pascal_case
10
+
11
+
12
+ @new.command("agent")
13
+ @click.argument("agent_name", required=True)
14
+ @click.argument("agent_path", required=False, default=".")
15
+ def _new_agent(agent_name: str, agent_path: str = "."):
16
+ new_agent(agent_name, agent_path)
17
+
18
+
19
+ def new_agent(
20
+ agent_name: str,
21
+ agent_path: str = ".",
22
+ extra_values: dict = {},
23
+ ):
24
+ agent_name = to_pascal_case(agent_name)
25
+
26
+ if agent_path == ".":
27
+ agent_path = os.getcwd()
28
+
29
+ if not os.path.exists(agent_path):
30
+ os.makedirs(agent_path, exist_ok=True)
31
+
32
+ copier = Copier(
33
+ templates_path=os.path.join(
34
+ os.path.dirname(naas_abi_cli.__file__), "cli/new/templates/agent"
35
+ ),
36
+ destination_path=agent_path,
37
+ )
38
+
39
+ if "module_name_snake" not in extra_values:
40
+ extra_values["module_name_snake"] = "your_module_name"
41
+
42
+ copier.copy(values={"agent_name_pascal": to_pascal_case(agent_name)} | extra_values)
@@ -0,0 +1,36 @@
1
+ import os
2
+
3
+ import click
4
+ import naas_abi_cli
5
+ from naas_abi_cli.cli.utils.Copier import Copier
6
+
7
+ from .new import new
8
+ from .utils import to_pascal_case
9
+
10
+
11
+ @new.command("integration")
12
+ @click.argument("integration_name", required=True)
13
+ @click.argument("integration_path", required=False, default=".")
14
+ def _new_integration(integration_name: str, integration_path: str = "."):
15
+ new_integration(integration_name, integration_path)
16
+
17
+
18
+ def new_integration(integration_name: str, integration_path: str = ".", extra_values: dict = {}):
19
+ integration_name = to_pascal_case(integration_name)
20
+
21
+ if integration_path == ".":
22
+ integration_path = os.getcwd()
23
+
24
+ if not os.path.exists(integration_path):
25
+ os.makedirs(integration_path, exist_ok=True)
26
+
27
+ copier = Copier(
28
+ templates_path=os.path.join(
29
+ os.path.dirname(naas_abi_cli.__file__), "cli/new/templates/integration"
30
+ ),
31
+ destination_path=integration_path,
32
+ )
33
+
34
+ copier.copy(
35
+ values={"integration_name_pascal": to_pascal_case(integration_name)} | extra_values
36
+ )
@@ -4,8 +4,13 @@ import click
4
4
  import naas_abi_cli
5
5
  from naas_abi_cli.cli.utils.Copier import Copier
6
6
 
7
+ from .agent import new_agent
8
+ from .integration import new_integration
7
9
  from .new import new
10
+ from .orchestration import new_orchestration
11
+ from .pipeline import new_pipeline
8
12
  from .utils import to_kebab_case, to_pascal_case, to_snake_case
13
+ from .workflow import new_workflow
9
14
 
10
15
 
11
16
  @new.command("module")
@@ -44,6 +49,36 @@ def new_module(module_name: str, module_path: str = ".", quiet: bool = False):
44
49
  }
45
50
  )
46
51
 
52
+ new_agent(
53
+ module_name,
54
+ os.path.join(module_path, "agents"),
55
+ extra_values={"module_name_snake": to_snake_case(module_name)},
56
+ )
57
+
58
+ new_integration(
59
+ module_name,
60
+ os.path.join(module_path, "integrations"),
61
+ extra_values={"module_name_snake": to_snake_case(module_name)},
62
+ )
63
+
64
+ new_pipeline(
65
+ module_name,
66
+ os.path.join(module_path, "pipelines"),
67
+ extra_values={"module_name_snake": to_snake_case(module_name)},
68
+ )
69
+
70
+ new_workflow(
71
+ module_name,
72
+ os.path.join(module_path, "workflows"),
73
+ extra_values={"module_name_snake": to_snake_case(module_name)},
74
+ )
75
+
76
+ new_orchestration(
77
+ module_name,
78
+ os.path.join(module_path, "orchestrations"),
79
+ extra_values={"module_name_snake": to_snake_case(module_name)},
80
+ )
81
+
47
82
  if not quiet:
48
83
  print(f"\nModule '{module_name}' has been created at:\n {module_path}\n")
49
84
  print("To enable this module, add the following to your config.yaml:\n")
@@ -0,0 +1,36 @@
1
+ import os
2
+
3
+ import click
4
+ import naas_abi_cli
5
+ from naas_abi_cli.cli.utils.Copier import Copier
6
+
7
+ from .new import new
8
+ from .utils import to_pascal_case
9
+
10
+
11
+ @new.command("orchestration")
12
+ @click.argument("orchestration_name", required=True)
13
+ @click.argument("orchestration_path", required=False, default=".")
14
+ def _new_orchestration(orchestration_name: str, orchestration_path: str = "."):
15
+ new_orchestration(orchestration_name, orchestration_path)
16
+
17
+
18
+ def new_orchestration(orchestration_name: str, orchestration_path: str = ".", extra_values: dict = {}):
19
+ orchestration_name = to_pascal_case(orchestration_name)
20
+
21
+ if orchestration_path == ".":
22
+ orchestration_path = os.getcwd()
23
+
24
+ if not os.path.exists(orchestration_path):
25
+ os.makedirs(orchestration_path, exist_ok=True)
26
+
27
+ copier = Copier(
28
+ templates_path=os.path.join(
29
+ os.path.dirname(naas_abi_cli.__file__), "cli/new/templates/orchestration"
30
+ ),
31
+ destination_path=orchestration_path,
32
+ )
33
+
34
+ copier.copy(
35
+ values={"orchestration_name_pascal": to_pascal_case(orchestration_name)} | extra_values
36
+ )
@@ -0,0 +1,36 @@
1
+ import os
2
+
3
+ import click
4
+ import naas_abi_cli
5
+ from naas_abi_cli.cli.utils.Copier import Copier
6
+
7
+ from .new import new
8
+ from .utils import to_pascal_case
9
+
10
+
11
+ @new.command("pipeline")
12
+ @click.argument("pipeline_name", required=True)
13
+ @click.argument("pipeline_path", required=False, default=".")
14
+ def _new_pipeline(pipeline_name: str, pipeline_path: str = "."):
15
+ new_pipeline(pipeline_name, pipeline_path)
16
+
17
+
18
+ def new_pipeline(pipeline_name: str, pipeline_path: str = ".", extra_values: dict = {}):
19
+ pipeline_name = to_pascal_case(pipeline_name)
20
+
21
+ if pipeline_path == ".":
22
+ pipeline_path = os.getcwd()
23
+
24
+ if not os.path.exists(pipeline_path):
25
+ os.makedirs(pipeline_path, exist_ok=True)
26
+
27
+ copier = Copier(
28
+ templates_path=os.path.join(
29
+ os.path.dirname(naas_abi_cli.__file__), "cli/new/templates/pipeline"
30
+ ),
31
+ destination_path=pipeline_path,
32
+ )
33
+
34
+ copier.copy(
35
+ values={"pipeline_name_pascal": to_pascal_case(pipeline_name)} | extra_values
36
+ )
@@ -0,0 +1,47 @@
1
+ from typing import Optional
2
+
3
+ from naas_abi_core.services.agent.Agent import (
4
+ Agent,
5
+ AgentConfiguration,
6
+ AgentSharedState,
7
+ )
8
+
9
+ NAME = "{{agent_name_pascal}}Agent"
10
+ DESCRIPTION = "An helpful agent that can help you with your tasks."
11
+ SYSTEM_PROMPT = """
12
+ You are {{agent_name_pascal}}Agent.
13
+ """
14
+
15
+ class {{agent_name_pascal}}Agent(Agent):
16
+
17
+ @staticmethod
18
+ def New(cls, agent_shared_state: Optional[AgentSharedState] = None, agent_configuration: Optional[AgentConfiguration] = None) -> "{{agent_name_pascal}}Agent":
19
+ #from {{module_name_snake}} import ABIModule
20
+
21
+ # Set model
22
+ from naas_abi_marketplace.ai.chatgpt.models.gpt_5 import model as chatgpt_model
23
+
24
+ model = chatgpt_model.model
25
+
26
+ # Use provided configuration or create default one
27
+ if agent_configuration is None:
28
+ agent_configuration = AgentConfiguration(system_prompt=SYSTEM_PROMPT)
29
+
30
+ # Use provided shared state or create new one
31
+ if agent_shared_state is None:
32
+ agent_shared_state = AgentSharedState()
33
+
34
+ tools: list = []
35
+
36
+ agents: list = []
37
+
38
+ return cls(
39
+ name=NAME,
40
+ description=DESCRIPTION,
41
+ chat_model=model,
42
+ tools=tools,
43
+ agents=agents,
44
+ memory=None,
45
+ state=agent_shared_state,
46
+ configuration=agent_configuration,
47
+ )
@@ -0,0 +1,30 @@
1
+ import hashlib
2
+ import re
3
+ from dataclasses import dataclass
4
+ from datetime import date, datetime, timedelta
5
+ from typing import Dict, List, Optional
6
+
7
+ import requests
8
+ from naas_abi_core import logger
9
+ from naas_abi_core.integration import Integration, IntegrationConfiguration
10
+ from naas_abi_core.integration.integration import IntegrationConnectionError
11
+ from naas_abi_core.services.cache.CacheFactory import CacheFactory
12
+ from naas_abi_core.services.cache.CachePort import DataType
13
+ from naas_abi_core.services.cache.CacheService import CacheService
14
+
15
+
16
+ @dataclass
17
+ class {{integration_name_pascal}}IntegrationConfiguration(IntegrationConfiguration):
18
+ """Configuration for the {{integration_name_pascal}} integration."""
19
+ pass
20
+
21
+
22
+ class {{integration_name_pascal}}Integration(Integration):
23
+ """{{integration_name_pascal}} integration."""
24
+
25
+ __configuration: {{integration_name_pascal}}IntegrationConfiguration
26
+
27
+ def __init__(self, configuration: {{integration_name_pascal}}IntegrationConfiguration):
28
+ super().__init__(configuration)
29
+ self.__configuration = configuration
30
+
@@ -0,0 +1,16 @@
1
+ import dagster as dg
2
+ from naas_abi_core.orchestrations.DagsterOrchestration import DagsterOrchestration
3
+
4
+
5
+ class {{orchestration_name_pascal}}Orchestration(DagsterOrchestration):
6
+
7
+ @classmethod
8
+ def New(cls) -> "{{orchestration_name_pascal}}Orchestration":
9
+ return cls(
10
+ definitions=dg.Definitions(
11
+ assets=[],
12
+ schedules=[],
13
+ jobs=[],
14
+ sensors=[],
15
+ )
16
+ )
@@ -0,0 +1,69 @@
1
+ import uuid
2
+ from dataclasses import dataclass
3
+ from enum import Enum
4
+ from typing import Annotated, Optional
5
+
6
+ from langchain_core.tools import BaseTool, StructuredTool
7
+ from naas_abi_core import logger
8
+ from naas_abi_core.pipeline import (Pipeline, PipelineConfiguration,
9
+ PipelineParameters)
10
+ from naas_abi_core.utils.Expose import APIRouter
11
+ from pydantic import Field
12
+ from rdflib import DCTERMS, OWL, RDF, RDFS, Graph, Literal, Namespace, URIRef
13
+
14
+
15
+ @dataclass
16
+ class {{pipeline_name_pascal}}PipelineConfiguration(PipelineConfiguration):
17
+ """Configuration for {{pipeline_name_pascal}}Pipeline."""
18
+
19
+ pass
20
+
21
+
22
+ class {{pipeline_name_pascal}}PipelineParameters(PipelineParameters):
23
+ # example_parameter: Annotated[
24
+ # str,
25
+ # Field(
26
+ # description="Description of the example parameter",
27
+ # example="Example value",
28
+ # ),
29
+ # ]
30
+ pass
31
+
32
+
33
+ class {{pipeline_name_pascal}}Pipeline(Pipeline[{{pipeline_name_pascal}}PipelineParameters]):
34
+ """Pipeline for adding a named individual."""
35
+
36
+ __configuration: {{pipeline_name_pascal}}PipelineConfiguration
37
+
38
+ def __init__(self, configuration: {{pipeline_name_pascal}}PipelineConfiguration):
39
+ super().__init__(configuration)
40
+ self.__configuration = configuration
41
+
42
+ def run(self, parameters: {{pipeline_name_pascal}}PipelineParameters) -> Graph:
43
+ # Implement the pipeline logic here.
44
+ pass
45
+
46
+ def as_tools(self) -> list[BaseTool]:
47
+ return [
48
+ StructuredTool(
49
+ name="{{pipeline_name_pascal}}",
50
+ description="Description of what the pipeline does",
51
+ func=lambda **kwargs: self.run(
52
+ {{pipeline_name_pascal}}PipelineParameters(**kwargs)
53
+ ),
54
+ args_schema={{pipeline_name_pascal}}PipelineParameters,
55
+ )
56
+ ]
57
+
58
+ def as_api(
59
+ self,
60
+ router: APIRouter,
61
+ route_name: str = "",
62
+ name: str = "",
63
+ description: str = "",
64
+ description_stream: str = "",
65
+ tags: list[str | Enum] | None = None,
66
+ ) -> None:
67
+ if tags is None:
68
+ tags = []
69
+ return None
@@ -0,0 +1,73 @@
1
+ from dataclasses import dataclass
2
+ from enum import Enum
3
+ from typing import Annotated, Optional
4
+
5
+ from langchain_core.tools import BaseTool, StructuredTool
6
+ from naas_abi_core.services.triple_store.TripleStorePorts import ITripleStoreService
7
+ from naas_abi_core.utils.Expose import APIRouter
8
+ from naas_abi_core.workflow import Workflow, WorkflowConfiguration
9
+ from naas_abi_core.workflow.workflow import WorkflowParameters
10
+ from pydantic import Field
11
+
12
+ @dataclass
13
+ class {{workflow_name_pascal}}WorkflowConfiguration(WorkflowConfiguration):
14
+ """Configuration for {{workflow_name_pascal}} workflow."""
15
+
16
+
17
+ pass
18
+
19
+ class {{workflow_name_pascal}}WorkflowParameters(WorkflowParameters):
20
+ """Parameters for {{workflow_name_pascal}} workflow."""
21
+
22
+ pass
23
+
24
+ # example_parameter: Annotated[
25
+ # str,
26
+ # Field(
27
+ # ...,
28
+ # description="Description of the example parameter",
29
+ # example="Example value",
30
+ # ),
31
+ # ]
32
+
33
+
34
+ class {{workflow_name_pascal}}Workflow(Workflow[{{workflow_name_pascal}}WorkflowParameters]):
35
+ """Workflow for {{workflow_name_pascal}}."""
36
+
37
+ __configuration: {{workflow_name_pascal}}WorkflowConfiguration
38
+
39
+ def __init__(self, configuration: {{workflow_name_pascal}}WorkflowConfiguration):
40
+ super().__init__(configuration)
41
+ self.__configuration = configuration
42
+
43
+ def run(
44
+ self, parameters: {{workflow_name_pascal}}WorkflowParameters
45
+ ) -> dict | list[dict]:
46
+ # Implement the workflow logic here
47
+ pass
48
+
49
+
50
+ def as_tools(self) -> list[BaseTool]:
51
+ return [
52
+ StructuredTool(
53
+ name="{{workflow_name_pascal}}",
54
+ description="Description of what the workflow does",
55
+ func=lambda **kwargs: self.run(
56
+ {{workflow_name_pascal}}WorkflowParameters(**kwargs)
57
+ ),
58
+ args_schema={{workflow_name_pascal}}WorkflowParameters,
59
+ )
60
+ ]
61
+
62
+ def as_api(
63
+ self,
64
+ router: APIRouter,
65
+ route_name: str = "",
66
+ name: str = "",
67
+ description: str = "",
68
+ description_stream: str = "",
69
+ tags: list[str | Enum] | None = None,
70
+ ) -> None:
71
+ if tags is None:
72
+ tags = []
73
+ return None
@@ -0,0 +1,36 @@
1
+ import os
2
+
3
+ import click
4
+ import naas_abi_cli
5
+ from naas_abi_cli.cli.utils.Copier import Copier
6
+
7
+ from .new import new
8
+ from .utils import to_pascal_case
9
+
10
+
11
+ @new.command("workflow")
12
+ @click.argument("workflow_name", required=True)
13
+ @click.argument("workflow_path", required=False, default=".")
14
+ def _new_workflow(workflow_name: str, workflow_path: str = "."):
15
+ new_workflow(workflow_name, workflow_path)
16
+
17
+
18
+ def new_workflow(workflow_name: str, workflow_path: str = ".", extra_values: dict = {}):
19
+ workflow_name = to_pascal_case(workflow_name)
20
+
21
+ if workflow_path == ".":
22
+ workflow_path = os.getcwd()
23
+
24
+ if not os.path.exists(workflow_path):
25
+ os.makedirs(workflow_path, exist_ok=True)
26
+
27
+ copier = Copier(
28
+ templates_path=os.path.join(
29
+ os.path.dirname(naas_abi_cli.__file__), "cli/new/templates/workflow"
30
+ ),
31
+ destination_path=workflow_path,
32
+ )
33
+
34
+ copier.copy(
35
+ values={"workflow_name_pascal": to_pascal_case(workflow_name)} | extra_values
36
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: naas-abi-cli
3
- Version: 1.9.1
3
+ Version: 1.10.0
4
4
  Summary: Abi cli allowing you to build your AI system.
5
5
  Project-URL: Homepage, https://github.com/jupyter-naas/abi
6
6
  Project-URL: Repository, https://github.com/jupyter-naas/abi/tree/main/libs/naas-abi-cli
@@ -8,26 +8,37 @@ naas_abi_cli/cli/init.py,sha256=Pcy2-hy-FvpXf3UOKMP6agWyFrCl9z-KP5ktEWltPy0,220
8
8
  naas_abi_cli/cli/module.py,sha256=TBl-SpeGUcy1Rrp40Irbt34yQS00xJcNje-OijNE4Hk,717
9
9
  naas_abi_cli/cli/run.py,sha256=OLrAs0mtnI0jvyW5Bb_Jd3Sp-bWDMdulCcsPixEq-6s,308
10
10
  naas_abi_cli/cli/secret.py,sha256=u_yUZgVEcns-CM-qsIIZUHX8j8T6aioJYluqSQhnXFE,2491
11
- naas_abi_cli/cli/new/__init__.py,sha256=i-lOPJh8DL729CFhZyuXZibsaswsqPj5e7u_N68xXeM,156
12
- naas_abi_cli/cli/new/module.py,sha256=X4n9VId4wm5HcMNb5iO9dOuXxFYxlIqSEh2tYlCefbA,1642
11
+ naas_abi_cli/cli/new/__init__.py,sha256=rIiEZfom8rsTv_HlGItFhZXuHdKumqhVccUoBEIeZ9A,481
12
+ naas_abi_cli/cli/new/agent.py,sha256=ROFel3IjGxmtYTWrYQSwITtfDBh5raCWRMWaORZWupM,1053
13
+ naas_abi_cli/cli/new/integration.py,sha256=FN-iK9Y_GfrSWME3s7TmnmioU7RXypJE5IQBP2G4C6I,1071
14
+ naas_abi_cli/cli/new/module.py,sha256=JT36nzSULDPc60H2MpkK6X_V0zc82DBi38W8t02nH8w,2679
13
15
  naas_abi_cli/cli/new/new.py,sha256=sfNmeoNZLGhjKRKSHuwEl1vtuxWR_SII0qOo9BVoEwY,55
16
+ naas_abi_cli/cli/new/orchestration.py,sha256=VZcJHQZnmohaFTG-eTSMuPZfhGa570cP3lTWP-54Y_4,1115
17
+ naas_abi_cli/cli/new/pipeline.py,sha256=pFu4J4qtZa-6MulLLYSHThAY8HDGsrvfAFlj8f4kODY,1005
14
18
  naas_abi_cli/cli/new/project.py,sha256=YSxBgJdMVYqWHGwXs9gxRMKA5Q6uRPPaJ_G5UJ4q5_4,2232
15
19
  naas_abi_cli/cli/new/utils.py,sha256=E8ICN4Z8gYYS-Z4nOLld8sY8lHWs6yXFm5lePq9ICFs,336
20
+ naas_abi_cli/cli/new/workflow.py,sha256=vy1_1dhMyeGW3WX7nXRbRkWZSKDIjsq-hkJ1UG9DvAU,1005
21
+ naas_abi_cli/cli/new/templates/agent/{{agent_name_pascal}}Agent.py,sha256=T3N_l3yLxK4_oC8Qyc3YcR0bPGIwC3r7mnh-0CIUYJ0,1396
22
+ naas_abi_cli/cli/new/templates/integration/{{integration_name_pascal}}Integration.py,sha256=zPJ_8aO9stz0k-V6hRW33pQ1OhpvhefRaF_SMt645e8,1088
16
23
  naas_abi_cli/cli/new/templates/module/__init__.py,sha256=OzGgLvjdv0eF_l34j55VBAUYHPUz3jk-TBVP0wKrpY0,1588
17
24
  naas_abi_cli/cli/new/templates/module/agents/README.md,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
- naas_abi_cli/cli/new/templates/module/agents/{{module_name_pascal}}Agent.py,sha256=Swgms8NI2DFAelf484mu0vNqfmT5NB9DKBtq6Ny-D1s,1323
25
+ naas_abi_cli/cli/new/templates/module/integrations/README.md,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
+ naas_abi_cli/cli/new/templates/module/ontologies/README.md,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
27
  naas_abi_cli/cli/new/templates/module/orchestrations/README.md,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
28
  naas_abi_cli/cli/new/templates/module/pipelines/README.md,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
29
  naas_abi_cli/cli/new/templates/module/workflows/README.md,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
+ naas_abi_cli/cli/new/templates/orchestration/{{orchestration_name_pascal}}Orchestration.py,sha256=BsWHRhQRQFRhjZoueK_dB4yn7ioF9YtycqglJvRnmq0,455
31
+ naas_abi_cli/cli/new/templates/pipeline/{{pipeline_name_pascal}}Pipeline.py,sha256=lytxiBZKmdhnPz0FUOKUg0vtezOtS6__elUGoeAyLfY,2194
22
32
  naas_abi_cli/cli/new/templates/project/.gitignore,sha256=UGpJjKfZf8Gv1AD8aCgx0EDGsY_7j4viVinCdxDZMhQ,18
23
33
  naas_abi_cli/cli/new/templates/project/Dockerfile,sha256=1qKIDdqwc_JYJE9ROHFqsq3RPyYpkfqjZHKACCMR4JE,147
24
34
  naas_abi_cli/cli/new/templates/project/README.md,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
35
  naas_abi_cli/cli/new/templates/project/pyproject.toml,sha256=9MHoNOtG2DkS4LE1GZwBFF6Frw4gsl-hb5Mojba0AUM,540
26
36
  naas_abi_cli/cli/new/templates/project/.github/workflows/release.yaml,sha256=7uV4SE20zvAfJKr1caKLbHIC3eyBmS-LOwjkKe6plhI,596
37
+ naas_abi_cli/cli/new/templates/workflow/{{workflow_name_pascal}}Workflow.py,sha256=xj6kIblmYqVmHWiX4IlPDwl3YcGTRGOkLvFJDh0vUMk,2267
27
38
  naas_abi_cli/cli/utils/Copier.py,sha256=NAKnMOqOTtnw_o5fYII8R1QHXZ7oGay362Nd762HGrI,3276
28
39
  naas_abi_cli/cli/new/templates/project/config.prod.yaml,sha256=Y57Qzz_yt8tfHbtDqGCSQxOkwnLgF4eoGOWOq66xSA8,1877
29
40
  naas_abi_cli/cli/new/templates/project/config.yaml,sha256=iQAAO6N3xO7iszG33vbSAljO11Pcf4KOvW3N-avJrsQ,1610
30
- naas_abi_cli-1.9.1.dist-info/METADATA,sha256=KV0WfQ3rwwt1qXKLsLuZSM9awk9G2LgzL5Hw7PignrU,7371
31
- naas_abi_cli-1.9.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
32
- naas_abi_cli-1.9.1.dist-info/entry_points.txt,sha256=ufNXhYVU3uo5dcZ8e1kdEJv1oh2Vons7LHJPg35cP4w,46
33
- naas_abi_cli-1.9.1.dist-info/RECORD,,
41
+ naas_abi_cli-1.10.0.dist-info/METADATA,sha256=XgioUa2HqeYK_9IbuRnvt3DrAHLHmha4QmZjLV6Jb08,7372
42
+ naas_abi_cli-1.10.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
43
+ naas_abi_cli-1.10.0.dist-info/entry_points.txt,sha256=ufNXhYVU3uo5dcZ8e1kdEJv1oh2Vons7LHJPg35cP4w,46
44
+ naas_abi_cli-1.10.0.dist-info/RECORD,,
@@ -1,52 +0,0 @@
1
- from typing import Optional
2
-
3
- from naas_abi_core.services.agent.Agent import (
4
- Agent,
5
- AgentConfiguration,
6
- AgentSharedState,
7
- )
8
-
9
- NAME = "{{module_name_pascal}}Agent"
10
- DESCRIPTION = "An helpful agent that can help you with your tasks."
11
- SYSTEM_PROMPT = """
12
- You are {{module_name_pascal}}Agent.
13
- """
14
-
15
-
16
- def create_agent(
17
- agent_shared_state: Optional[AgentSharedState] = None,
18
- agent_configuration: Optional[AgentConfiguration] = None,
19
- ) -> Optional[Agent]:
20
- #from {{module_name_snake}} import ABIModule
21
-
22
- # Set model
23
- from naas_abi_marketplace.ai.chatgpt.models.gpt_5 import model as chatgpt_model
24
-
25
- model = chatgpt_model.model
26
-
27
- # Use provided configuration or create default one
28
- if agent_configuration is None:
29
- agent_configuration = AgentConfiguration(system_prompt=SYSTEM_PROMPT)
30
-
31
- # Use provided shared state or create new one
32
- if agent_shared_state is None:
33
- agent_shared_state = AgentSharedState()
34
-
35
- tools: list = []
36
-
37
- agents: list = []
38
-
39
- return {{module_name_pascal}}Agent(
40
- name=NAME,
41
- description=DESCRIPTION,
42
- chat_model=model,
43
- tools=tools,
44
- agents=agents,
45
- memory=None,
46
- state=agent_shared_state,
47
- configuration=agent_configuration,
48
- )
49
-
50
-
51
- class {{module_name_pascal}}Agent(Agent):
52
- pass