ibm-watsonx-orchestrate 1.6.3.dev0__py3-none-any.whl → 1.6.3.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.
- ibm_watsonx_orchestrate/__init__.py +1 -1
- ibm_watsonx_orchestrate/flow_builder/types.py +0 -1
- ibm_watsonx_orchestrate/flow_builder/utils.py +0 -1
- {ibm_watsonx_orchestrate-1.6.3.dev0.dist-info → ibm_watsonx_orchestrate-1.6.3.dev1.dist-info}/METADATA +1 -2
- {ibm_watsonx_orchestrate-1.6.3.dev0.dist-info → ibm_watsonx_orchestrate-1.6.3.dev1.dist-info}/RECORD +8 -9
- ibm_watsonx_orchestrate/agent_builder/utils/pydantic_utils.py +0 -149
- {ibm_watsonx_orchestrate-1.6.3.dev0.dist-info → ibm_watsonx_orchestrate-1.6.3.dev1.dist-info}/WHEEL +0 -0
- {ibm_watsonx_orchestrate-1.6.3.dev0.dist-info → ibm_watsonx_orchestrate-1.6.3.dev1.dist-info}/entry_points.txt +0 -0
- {ibm_watsonx_orchestrate-1.6.3.dev0.dist-info → ibm_watsonx_orchestrate-1.6.3.dev1.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ibm-watsonx-orchestrate
|
3
|
-
Version: 1.6.3.
|
3
|
+
Version: 1.6.3.dev1
|
4
4
|
Summary: IBM watsonx.orchestrate SDK
|
5
5
|
Author-email: IBM <support@ibm.com>
|
6
6
|
License: MIT License
|
@@ -17,7 +17,6 @@ Requires-Dist: jsonschema<5.0.0,>=4.23.0
|
|
17
17
|
Requires-Dist: langchain-community<=0.3.25,>=0.3.12
|
18
18
|
Requires-Dist: langchain-core<=0.3.63
|
19
19
|
Requires-Dist: langsmith<=0.3.45
|
20
|
-
Requires-Dist: munch>=4.0.0
|
21
20
|
Requires-Dist: numpy>=1.26.0
|
22
21
|
Requires-Dist: packaging>=24.2
|
23
22
|
Requires-Dist: pydantic<3.0.0,>=2.10.3
|
{ibm_watsonx_orchestrate-1.6.3.dev0.dist-info → ibm_watsonx_orchestrate-1.6.3.dev1.dist-info}/RECORD
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
ibm_watsonx_orchestrate/__init__.py,sha256=
|
1
|
+
ibm_watsonx_orchestrate/__init__.py,sha256=2piz3u4Jo_Yw2Q2xd5lVhpkvMU7tG0oxDJqdzmHEaNc,430
|
2
2
|
ibm_watsonx_orchestrate/agent_builder/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
ibm_watsonx_orchestrate/agent_builder/agents/__init__.py,sha256=lmZwaiWXD4Ea19nrMwZXaqCxFMG29xNS8vUoZtK3yI4,392
|
4
4
|
ibm_watsonx_orchestrate/agent_builder/agents/agent.py,sha256=I8ZpOKOGXAmhUIwusDmLqCUawSg74-WZFJ5IijruxAQ,932
|
@@ -27,7 +27,6 @@ ibm_watsonx_orchestrate/agent_builder/tools/openapi_tool.py,sha256=Q2-TcUUjBAZWl
|
|
27
27
|
ibm_watsonx_orchestrate/agent_builder/tools/python_tool.py,sha256=qVyAe7hKLZ1V4cvqDUCpYs6JBKl9MHSr0yrri-nSceA,10600
|
28
28
|
ibm_watsonx_orchestrate/agent_builder/tools/types.py,sha256=TXxWCSddXqRL2GbjkxT4vYJcRMjWS7g22wMMrBz-Wj8,7934
|
29
29
|
ibm_watsonx_orchestrate/agent_builder/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
30
|
-
ibm_watsonx_orchestrate/agent_builder/utils/pydantic_utils.py,sha256=QEanM6FpkmntvS02whdhWx1d4v6zT_1l9ipEbfTgHs8,7623
|
31
30
|
ibm_watsonx_orchestrate/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
32
31
|
ibm_watsonx_orchestrate/cli/config.py,sha256=BE2ze0o9vLoyrk7q9mcRek2rDL2cTsVtsSGWw4W0y6M,8212
|
33
32
|
ibm_watsonx_orchestrate/cli/init_helper.py,sha256=Lb0bj6b8EaeBxkfGyrBBvc581ORg_S5-tHcXWQ-mBmE,1466
|
@@ -103,8 +102,8 @@ ibm_watsonx_orchestrate/docker/tempus/common-config.yaml,sha256=Zo3F36F5DV4VO_vU
|
|
103
102
|
ibm_watsonx_orchestrate/flow_builder/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
104
103
|
ibm_watsonx_orchestrate/flow_builder/data_map.py,sha256=1brmWWFERDsNG2XGais-5-r58LKUUwBtqwdaLQIFRhE,503
|
105
104
|
ibm_watsonx_orchestrate/flow_builder/node.py,sha256=tp_ssBOSDDi8q-ET2bP7xRPwNOLmLUgQ7v9zZZqn9SU,4090
|
106
|
-
ibm_watsonx_orchestrate/flow_builder/types.py,sha256=
|
107
|
-
ibm_watsonx_orchestrate/flow_builder/utils.py,sha256=
|
105
|
+
ibm_watsonx_orchestrate/flow_builder/types.py,sha256=Mc2na6jIkt1lTZBgAhEon6nF4cyIDcm8DcmT5sdSSIA,27665
|
106
|
+
ibm_watsonx_orchestrate/flow_builder/utils.py,sha256=ufIhoQiEIkHNK1VKQ9dc0jSJgIBKCwwUUUp2UvmFJlI,8181
|
108
107
|
ibm_watsonx_orchestrate/flow_builder/flows/__init__.py,sha256=UTwpiAlT9Wytn1kK-kgUaY6UYjLKsiaQK0ZdSbKLtM0,897
|
109
108
|
ibm_watsonx_orchestrate/flow_builder/flows/constants.py,sha256=XXYtL5Y1OTjj3jKo2zoJiwb7FCUNu_M43fgU8w591TY,322
|
110
109
|
ibm_watsonx_orchestrate/flow_builder/flows/decorators.py,sha256=k9-r9ly5ih5oHBqjEgrc2vfeVC4LOMKg3YVLacBDubM,2702
|
@@ -118,8 +117,8 @@ ibm_watsonx_orchestrate/utils/utils.py,sha256=U7z_2iASoFiZ2zM0a_2Mc2Y-P5oOT7hOwu
|
|
118
117
|
ibm_watsonx_orchestrate/utils/logging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
119
118
|
ibm_watsonx_orchestrate/utils/logging/logger.py,sha256=FzeGnidXAjC7yHrvIaj4KZPeaBBSCniZFlwgr5yV3oA,1037
|
120
119
|
ibm_watsonx_orchestrate/utils/logging/logging.yaml,sha256=9_TKfuFr1barnOKP0fZT5D6MhddiwsXVTFjtRbcOO5w,314
|
121
|
-
ibm_watsonx_orchestrate-1.6.3.
|
122
|
-
ibm_watsonx_orchestrate-1.6.3.
|
123
|
-
ibm_watsonx_orchestrate-1.6.3.
|
124
|
-
ibm_watsonx_orchestrate-1.6.3.
|
125
|
-
ibm_watsonx_orchestrate-1.6.3.
|
120
|
+
ibm_watsonx_orchestrate-1.6.3.dev1.dist-info/METADATA,sha256=vPU4-80B6yCeSJP5t_9jU1MTUuSjJi-Unk1_Rh0HmGs,1487
|
121
|
+
ibm_watsonx_orchestrate-1.6.3.dev1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
122
|
+
ibm_watsonx_orchestrate-1.6.3.dev1.dist-info/entry_points.txt,sha256=SfIT02-Jen5e99OcLhzbcM9Bdyf8SGVOCtnSplgZdQI,69
|
123
|
+
ibm_watsonx_orchestrate-1.6.3.dev1.dist-info/licenses/LICENSE,sha256=Shgxx7hTdCOkiVRmfGgp_1ISISrwQD7m2f0y8Hsapl4,1083
|
124
|
+
ibm_watsonx_orchestrate-1.6.3.dev1.dist-info/RECORD,,
|
@@ -1,149 +0,0 @@
|
|
1
|
-
import json
|
2
|
-
from pathlib import Path
|
3
|
-
from typing import Any, Dict, Type, Literal
|
4
|
-
|
5
|
-
import jsonschema
|
6
|
-
from pydantic import BaseModel
|
7
|
-
from pydantic.json_schema import DEFAULT_REF_TEMPLATE, GenerateJsonSchema, JsonSchemaMode
|
8
|
-
from pydantic.main import IncEx
|
9
|
-
from typing_extensions import Self
|
10
|
-
|
11
|
-
from ibm_watsonx_orchestrate.agent_builder.tools import ToolRequestBody, ToolResponseBody, JsonSchemaObject
|
12
|
-
|
13
|
-
|
14
|
-
def generate_schema_only_base_model(schema: ToolRequestBody | ToolResponseBody | JsonSchemaObject) -> Type[BaseModel]:
|
15
|
-
class SchemaOnlyBaseModel(BaseModel):
|
16
|
-
__primitive__: Any
|
17
|
-
model_config = {
|
18
|
-
'extra': 'allow'
|
19
|
-
}
|
20
|
-
"""
|
21
|
-
The purpose of a SchemaOnlyBaseModel is to pass along the json schema represented by schema
|
22
|
-
to a langchain tool's arg_schema
|
23
|
-
:arg schema The json schema to emulate
|
24
|
-
:returns a fake BaseModel that only returns a json schema
|
25
|
-
"""
|
26
|
-
|
27
|
-
def __init__(self, /, *args, **kwargs: Any) -> None:
|
28
|
-
if schema.type == 'object':
|
29
|
-
super().__init__(**kwargs)
|
30
|
-
for name, value in kwargs.items():
|
31
|
-
setattr(self, name, value)
|
32
|
-
else:
|
33
|
-
kwargs={}
|
34
|
-
kwargs['__primitive__'] = args[0]
|
35
|
-
super().__init__(**kwargs)
|
36
|
-
setattr(self, '__primitive__', args[0])
|
37
|
-
|
38
|
-
@classmethod
|
39
|
-
def model_json_schema(cls, by_alias: bool = True, ref_template: str = DEFAULT_REF_TEMPLATE,
|
40
|
-
schema_generator: type[GenerateJsonSchema] = GenerateJsonSchema,
|
41
|
-
mode: JsonSchemaMode = 'validation') -> dict[str, Any]:
|
42
|
-
return schema.model_dump(exclude_unset=True, exclude_none=True)
|
43
|
-
|
44
|
-
@classmethod
|
45
|
-
def schema(cls, by_alias: bool = True, ref_template: str = DEFAULT_REF_TEMPLATE) -> Dict[str, Any]:
|
46
|
-
return schema.model_dump(exclude_unset=True, exclude_none=True)
|
47
|
-
|
48
|
-
@classmethod
|
49
|
-
def schema_json(cls, *, by_alias: bool = True, ref_template: str = DEFAULT_REF_TEMPLATE,
|
50
|
-
**dumps_kwargs: Any) -> str:
|
51
|
-
return schema.model_dump_json(exclude_unset=True, exclude_none=True)
|
52
|
-
|
53
|
-
@classmethod
|
54
|
-
def model_validate_json(cls, json_data: str | bytes | bytearray, *, strict: bool | None = None,
|
55
|
-
context: Any | None = None) -> Self:
|
56
|
-
obj = json.loads(json_data)
|
57
|
-
jsonschema.validate(obj, schema=schema.model_dump(exclude_unset=True))
|
58
|
-
if schema.type == 'object':
|
59
|
-
return SchemaOnlyBaseModel(**obj)
|
60
|
-
else:
|
61
|
-
return SchemaOnlyBaseModel(obj)
|
62
|
-
|
63
|
-
@classmethod
|
64
|
-
def model_validate(cls, obj: Any, *, strict: bool | None = None, from_attributes: bool | None = None,
|
65
|
-
context: Any | None = None) -> Self:
|
66
|
-
jsonschema.validate(obj, schema=schema.model_dump(exclude_unset=True))
|
67
|
-
if schema.type == 'object':
|
68
|
-
return SchemaOnlyBaseModel(**obj)
|
69
|
-
else:
|
70
|
-
return SchemaOnlyBaseModel(obj)
|
71
|
-
|
72
|
-
@classmethod
|
73
|
-
def model_validate_strings(cls, obj: Any, *, strict: bool | None = None, context: Any | None = None) -> Self:
|
74
|
-
raise NotImplementedError('unimplemented for SchemaOnlyBaseModel')
|
75
|
-
|
76
|
-
@classmethod
|
77
|
-
def validate(cls, value: Any) -> Self:
|
78
|
-
jsonschema.validate(value, schema=schema.model_dump(exclude_unset=True))
|
79
|
-
return SchemaOnlyBaseModel(**value)
|
80
|
-
|
81
|
-
@classmethod
|
82
|
-
def model_construct(cls, _fields_set: set[str] | None = None, **values: Any) -> Self:
|
83
|
-
raise NotImplementedError('unimplemented for SchemaOnlyBaseModel')
|
84
|
-
|
85
|
-
@classmethod
|
86
|
-
def model_parametrized_name(cls, params: tuple[type[Any], ...]) -> str:
|
87
|
-
raise NotImplementedError('unimplemented for SchemaOnlyBaseModel')
|
88
|
-
|
89
|
-
@classmethod
|
90
|
-
def model_rebuild(cls, *, force: bool = False, raise_errors: bool = True, _parent_namespace_depth: int = 2,
|
91
|
-
_types_namespace: Any = None) -> bool | None:
|
92
|
-
raise NotImplementedError('unimplemented for SchemaOnlyBaseModel')
|
93
|
-
|
94
|
-
@classmethod
|
95
|
-
def parse_obj(cls, obj: Any) -> Self:
|
96
|
-
raise NotImplementedError('unimplemented for SchemaOnlyBaseModel')
|
97
|
-
|
98
|
-
@classmethod
|
99
|
-
def parse_raw(cls, b: str | bytes, *, content_type: str | None = None, encoding: str = 'utf8',
|
100
|
-
proto: Any | None = None, allow_pickle: bool = False) -> Self:
|
101
|
-
raise NotImplementedError('unimplemented for SchemaOnlyBaseModel')
|
102
|
-
|
103
|
-
@classmethod
|
104
|
-
def parse_file(cls, path: str | Path, *, content_type: str | None = None, encoding: str = 'utf8',
|
105
|
-
proto: Any | None = None, allow_pickle: bool = False) -> Self:
|
106
|
-
raise NotImplementedError('unimplemented for SchemaOnlyBaseModel')
|
107
|
-
|
108
|
-
@classmethod
|
109
|
-
def from_orm(cls, obj: Any) -> Self:
|
110
|
-
raise NotImplementedError('unimplemented for SchemaOnlyBaseModel')
|
111
|
-
|
112
|
-
@classmethod
|
113
|
-
def construct(cls, _fields_set: set[str] | None = None, **values: Any) -> Self:
|
114
|
-
raise NotImplementedError('unimplemented for SchemaOnlyBaseModel')
|
115
|
-
|
116
|
-
@classmethod
|
117
|
-
def update_forward_refs(cls, **localns: Any) -> None:
|
118
|
-
raise NotImplementedError('unimplemented for SchemaOnlyBaseModel')
|
119
|
-
|
120
|
-
def model_dump(self, *, mode: Literal['json', 'python'] | str = 'python', include: IncEx | None = None,
|
121
|
-
exclude: IncEx | None = None, context: Any | None = None, by_alias: bool = False,
|
122
|
-
exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False,
|
123
|
-
round_trip: bool = False, warnings: bool | Literal['none', 'warn', 'error'] = True,
|
124
|
-
serialize_as_any: bool = False) -> dict[str, Any]:
|
125
|
-
primitive = getattr(self, '__primitive__', None)
|
126
|
-
if primitive is not None:
|
127
|
-
return primitive
|
128
|
-
else:
|
129
|
-
return super().model_dump(mode=mode, include=include, exclude=exclude, context=context, by_alias=by_alias,
|
130
|
-
exclude_unset=exclude_unset, exclude_defaults=exclude_defaults,
|
131
|
-
exclude_none=exclude_none, round_trip=round_trip, warnings=warnings,
|
132
|
-
serialize_as_any=serialize_as_any)
|
133
|
-
|
134
|
-
def model_dump_json(self, *, indent: int | None = None, include: IncEx | None = None,
|
135
|
-
exclude: IncEx | None = None, context: Any | None = None, by_alias: bool = False,
|
136
|
-
exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False,
|
137
|
-
round_trip: bool = False, warnings: bool | Literal['none', 'warn', 'error'] = True,
|
138
|
-
serialize_as_any: bool = False) -> str:
|
139
|
-
primitive = getattr(self, '__primitive__')
|
140
|
-
if primitive is not None:
|
141
|
-
return json.dumps(primitive)
|
142
|
-
else:
|
143
|
-
return super().model_dump_json(indent=indent, include=include, exclude=exclude, context=context,
|
144
|
-
by_alias=by_alias, exclude_unset=exclude_unset,
|
145
|
-
exclude_defaults=exclude_defaults, exclude_none=exclude_none,
|
146
|
-
round_trip=round_trip, warnings=warnings, serialize_as_any=serialize_as_any)
|
147
|
-
|
148
|
-
return SchemaOnlyBaseModel
|
149
|
-
|
{ibm_watsonx_orchestrate-1.6.3.dev0.dist-info → ibm_watsonx_orchestrate-1.6.3.dev1.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|