ibm-watsonx-orchestrate 1.4.2__py3-none-any.whl → 1.5.0b1__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.
Files changed (40) hide show
  1. ibm_watsonx_orchestrate/__init__.py +1 -1
  2. ibm_watsonx_orchestrate/agent_builder/agents/types.py +10 -1
  3. ibm_watsonx_orchestrate/agent_builder/knowledge_bases/types.py +14 -0
  4. ibm_watsonx_orchestrate/agent_builder/model_policies/__init__.py +1 -0
  5. ibm_watsonx_orchestrate/{client → agent_builder}/model_policies/types.py +7 -8
  6. ibm_watsonx_orchestrate/agent_builder/models/__init__.py +1 -0
  7. ibm_watsonx_orchestrate/{client → agent_builder}/models/types.py +57 -9
  8. ibm_watsonx_orchestrate/agent_builder/tools/python_tool.py +46 -3
  9. ibm_watsonx_orchestrate/agent_builder/tools/types.py +47 -1
  10. ibm_watsonx_orchestrate/cli/commands/agents/agents_command.py +17 -0
  11. ibm_watsonx_orchestrate/cli/commands/agents/agents_controller.py +86 -39
  12. ibm_watsonx_orchestrate/cli/commands/models/model_provider_mapper.py +191 -0
  13. ibm_watsonx_orchestrate/cli/commands/models/models_command.py +140 -258
  14. ibm_watsonx_orchestrate/cli/commands/models/models_controller.py +437 -0
  15. ibm_watsonx_orchestrate/cli/commands/server/server_command.py +2 -1
  16. ibm_watsonx_orchestrate/cli/commands/tools/tools_controller.py +1 -1
  17. ibm_watsonx_orchestrate/client/connections/__init__.py +2 -1
  18. ibm_watsonx_orchestrate/client/connections/utils.py +30 -0
  19. ibm_watsonx_orchestrate/client/model_policies/model_policies_client.py +23 -4
  20. ibm_watsonx_orchestrate/client/models/models_client.py +23 -3
  21. ibm_watsonx_orchestrate/client/toolkit/toolkit_client.py +13 -8
  22. ibm_watsonx_orchestrate/client/tools/tool_client.py +2 -1
  23. ibm_watsonx_orchestrate/docker/compose-lite.yml +2 -0
  24. ibm_watsonx_orchestrate/docker/default.env +10 -11
  25. ibm_watsonx_orchestrate/experimental/flow_builder/data_map.py +19 -0
  26. ibm_watsonx_orchestrate/experimental/flow_builder/flows/__init__.py +4 -3
  27. ibm_watsonx_orchestrate/experimental/flow_builder/flows/constants.py +3 -1
  28. ibm_watsonx_orchestrate/experimental/flow_builder/flows/decorators.py +3 -2
  29. ibm_watsonx_orchestrate/experimental/flow_builder/flows/flow.py +245 -223
  30. ibm_watsonx_orchestrate/experimental/flow_builder/node.py +34 -15
  31. ibm_watsonx_orchestrate/experimental/flow_builder/resources/flow_status.openapi.yml +7 -39
  32. ibm_watsonx_orchestrate/experimental/flow_builder/types.py +285 -12
  33. ibm_watsonx_orchestrate/experimental/flow_builder/utils.py +3 -1
  34. {ibm_watsonx_orchestrate-1.4.2.dist-info → ibm_watsonx_orchestrate-1.5.0b1.dist-info}/METADATA +1 -1
  35. {ibm_watsonx_orchestrate-1.4.2.dist-info → ibm_watsonx_orchestrate-1.5.0b1.dist-info}/RECORD +38 -35
  36. ibm_watsonx_orchestrate/cli/commands/models/env_file_model_provider_mapper.py +0 -180
  37. ibm_watsonx_orchestrate/experimental/flow_builder/flows/data_map.py +0 -91
  38. {ibm_watsonx_orchestrate-1.4.2.dist-info → ibm_watsonx_orchestrate-1.5.0b1.dist-info}/WHEEL +0 -0
  39. {ibm_watsonx_orchestrate-1.4.2.dist-info → ibm_watsonx_orchestrate-1.5.0b1.dist-info}/entry_points.txt +0 -0
  40. {ibm_watsonx_orchestrate-1.4.2.dist-info → ibm_watsonx_orchestrate-1.5.0b1.dist-info}/licenses/LICENSE +0 -0
@@ -1,3 +1,4 @@
1
+ from typing import Literal
1
2
  from ibm_watsonx_orchestrate.client.base_api_client import BaseAPIClient, ClientAPIException
2
3
  from typing_extensions import List
3
4
 
@@ -32,7 +33,7 @@ class ToolClient(BaseAPIClient):
32
33
  formatted_tool_names = [f"names={x}" for x in tool_names]
33
34
  return self._get(f"/tools?{'&'.join(formatted_tool_names)}")
34
35
 
35
- def get_draft_by_id(self, tool_id: str) -> List[dict]:
36
+ def get_draft_by_id(self, tool_id: str) -> dict | Literal[""]:
36
37
  if tool_id is None:
37
38
  return ""
38
39
  else:
@@ -323,6 +323,7 @@ services:
323
323
  AI_GATEWAY_BASE_URL: ${AI_GATEWAY_BASE_URL}
324
324
  AI_GATEWAY_ENABLED : ${AI_GATEWAY_ENABLED}
325
325
 
326
+
326
327
  wxo-server-worker:
327
328
  image: ${WORKER_REGISTRY:-us.icr.io/watson-orchestrate-private}/wxo-server-conversation_controller:${WORKER_TAG:-latest}
328
329
  platform: linux/amd64
@@ -450,6 +451,7 @@ services:
450
451
  STORAGE_S3_REGION: us-east-1
451
452
  AWS_ACCESS_KEY_ID: ${MINIO_ROOT_USER:-minioadmin}
452
453
  AWS_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD:-watsonxorchestrate}
454
+ TEMPUS_HOST_NAME: http://wxo-tempus-runtime:9044
453
455
  extra_hosts:
454
456
  - "host.docker.internal:host-gateway"
455
457
 
@@ -53,38 +53,37 @@ EVENT_BROKER_TTL="-1"
53
53
  # See get_default_registry_env_vars_by_dev_edition_source() in src/ibm_watsonx_orchestrate/cli/commands/server/server_command.py for more details.
54
54
  REGISTRY_URL=
55
55
 
56
- SERVER_TAG=22-05-2025
56
+ SERVER_TAG=05-06-2025
57
57
  SERVER_REGISTRY=
58
58
 
59
- WORKER_TAG=22-05-2025
59
+ WORKER_TAG=03-06-2025
60
60
  WORKER_REGISTRY=
61
61
 
62
- AI_GATEWAY_TAG=20-05-2025
62
+ AI_GATEWAY_TAG=03-06-2025
63
63
  AI_GATEWAY_REGISTRY=
64
64
 
65
65
  DB_REGISTRY=
66
66
  # If you build multiarch set all three of these to the same, we have a pr against main
67
67
  # to not have this separation, but we can merge it later
68
- DBTAG=21-05-2025
69
- AMDDBTAG=21-05-2025
70
- ARM64DBTAG=21-05-2025
68
+ DBTAG=07-06-2025
69
+ AMDDBTAG=07-06-2025
70
+ ARM64DBTAG=07-06-2025
71
71
 
72
72
  UI_REGISTRY=
73
- UITAG=23-05-2025
73
+ UITAG=03-06-2025
74
74
 
75
75
  CM_REGISTRY=
76
76
  CM_TAG=13-05-2025
77
77
 
78
- TRM_TAG=23-05-2025
78
+ TRM_TAG=11-06-2025-1-5-0
79
79
  TRM_REGISTRY=
80
80
 
81
- TR_TAG=23-05-2025
81
+ TR_TAG=11-06-2025-1-5-0
82
82
  TR_REGISTRY=
83
83
 
84
- BUILDER_TAG=21-05-2025
84
+ BUILDER_TAG=03-06-2025
85
85
  BUILDER_REGISTRY=
86
86
 
87
-
88
87
  FLOW_RUNTIME_TAG=13-05-2025
89
88
  FLOW_RUMTIME_REGISTRY=
90
89
 
@@ -0,0 +1,19 @@
1
+ from typing import Any, Optional, Self
2
+ from pydantic import BaseModel, Field, SerializeAsAny
3
+
4
+ from .types import (
5
+ Assignment
6
+ )
7
+
8
+
9
+ class DataMap(BaseModel):
10
+ maps: Optional[list[Assignment]] = Field(default_factory=list)
11
+
12
+ def to_json(self) -> dict[str, Any]:
13
+ model_spec = {}
14
+ if self.maps and len(self.maps) > 0:
15
+ model_spec["maps"] = [assignment.model_dump() for assignment in self.maps]
16
+
17
+ def add(self, line: Assignment) -> Self:
18
+ self.maps.append(line)
19
+
@@ -1,9 +1,9 @@
1
1
  from .constants import START, END, RESERVED
2
2
  from ..types import FlowContext, TaskData, TaskEventType
3
- from ..node import UserNode, AgentNode, StartNode, EndNode
3
+ from ..node import UserNode, AgentNode, StartNode, EndNode, PromptNode
4
4
  from .flow import Flow, CompiledFlow, FlowRun, FlowEvent, FlowEventType, FlowFactory, MatchPolicy, WaitPolicy, ForeachPolicy, Branch, Foreach, Loop
5
5
  from .decorators import user, flow_spec, flow
6
- from .data_map import Assignment, DataMapSpec
6
+ from ..data_map import Assignment, DataMap
7
7
 
8
8
 
9
9
  __all__ = [
@@ -19,8 +19,9 @@ __all__ = [
19
19
  "AgentNode",
20
20
  "StartNode",
21
21
  "EndNode",
22
+ "PromptNode",
22
23
  "Assignment",
23
- "DataMapSpec",
24
+ "DataMap",
24
25
 
25
26
  "Flow",
26
27
  "CompiledFlow",
@@ -7,11 +7,13 @@ START = sys.intern("__start__")
7
7
  END = sys.intern("__end__")
8
8
 
9
9
  ANY_USER = sys.intern("__any_user__")
10
+ CURRENT_USER = sys.intern("__current_user__")
10
11
  FLOW_CONTEXT = sys.intern("FlowContext")
11
12
 
12
13
  RESERVED = {
13
14
  START,
14
15
  END,
15
16
  FLOW_CONTEXT,
16
- ANY_USER
17
+ ANY_USER,
18
+ CURRENT_USER
17
19
  }
@@ -27,8 +27,8 @@ class FlowWrapper:
27
27
  raise ValueError("Return value must be of type Flow")
28
28
  return result
29
29
 
30
- def user(*args, name: str|None=None, description: str|None=None, owners: Sequence[str] = ()):
31
- """Decorator to mark a function as a task specification."""
30
+ def user(*args, name: str|None=None, description: str|None=None, owners: Sequence[str]|None = None, message: str | None = None):
31
+ """Decorator to mark a function as a user node specification."""
32
32
 
33
33
  def decorator(func: Callable):
34
34
  node_spec = extract_node_spec(func, name, description)
@@ -39,6 +39,7 @@ def user(*args, name: str|None=None, description: str|None=None, owners: Sequenc
39
39
  input_schema = node_spec.input_schema,
40
40
  output_schema = node_spec.output_schema,
41
41
  output_schema_object = node_spec.output_schema_object,
42
+ text=message,
42
43
  owners=owners)
43
44
 
44
45
  @wraps(func)