sapiopycommons 2025.8.18a710__py3-none-any.whl → 2025.8.18a712__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.
Potentially problematic release.
This version of sapiopycommons might be problematic. Click here for more details.
- sapiopycommons/ai/tool_service_base.py +11 -12
- {sapiopycommons-2025.8.18a710.dist-info → sapiopycommons-2025.8.18a712.dist-info}/METADATA +1 -1
- {sapiopycommons-2025.8.18a710.dist-info → sapiopycommons-2025.8.18a712.dist-info}/RECORD +5 -5
- {sapiopycommons-2025.8.18a710.dist-info → sapiopycommons-2025.8.18a712.dist-info}/WHEEL +0 -0
- {sapiopycommons-2025.8.18a710.dist-info → sapiopycommons-2025.8.18a712.dist-info}/licenses/LICENSE +0 -0
|
@@ -889,18 +889,17 @@ class ToolBase(ABC):
|
|
|
889
889
|
config_fields: dict[str, Any] = {}
|
|
890
890
|
raw_configs: Mapping[str, FieldValuePbo] = self.request.config_field_values
|
|
891
891
|
for field_name, field_def in self.get_config_defs().items():
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
config_fields[field_name] = ProtobufUtils.field_def_pbo_to_default_value(field_def)
|
|
892
|
+
field_value: FieldValue = None
|
|
893
|
+
# If the field is present in the request, convert the protobuf value to a Python value.
|
|
894
|
+
if field_name in raw_configs:
|
|
895
|
+
field_value = ProtobufUtils.field_pbo_to_value(raw_configs[field_name])
|
|
896
|
+
# If the field isn't present or is None, use the default value from the field definition.
|
|
897
|
+
if field_value is None:
|
|
898
|
+
field_value = ProtobufUtils.field_def_pbo_to_default_value(field_def)
|
|
899
|
+
# If the field is a multi-select selection list, split the value by commas and strip whitespace.
|
|
900
|
+
if field_def.data_field_type == FieldTypePbo.SELECTION and field_def.selection_properties.multi_select:
|
|
901
|
+
field_value: list[str] = [x.strip() for x in field_value.split(',') if x.strip()]
|
|
902
|
+
config_fields[field_name] = field_value
|
|
904
903
|
return config_fields
|
|
905
904
|
|
|
906
905
|
@staticmethod
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: sapiopycommons
|
|
3
|
-
Version: 2025.8.
|
|
3
|
+
Version: 2025.8.18a712
|
|
4
4
|
Summary: Official Sapio Python API Utilities Package
|
|
5
5
|
Project-URL: Homepage, https://github.com/sapiosciences
|
|
6
6
|
Author-email: Jonathan Steck <jsteck@sapiosciences.com>, Yechen Qiao <yqiao@sapiosciences.com>
|
|
@@ -4,7 +4,7 @@ sapiopycommons/ai/converter_service_base.py,sha256=w4_PXjlk7_F5AUMlPUhKJ9gZlxY9R
|
|
|
4
4
|
sapiopycommons/ai/protobuf_utils.py,sha256=QdYcelIvOIKBV5u_KR_Fh06kZ0eJDIb5ZVnfqV01FeE,24601
|
|
5
5
|
sapiopycommons/ai/server.py,sha256=dcqW7wzAF5ZUHomWILh-WzPw68O3Unm9NFTruWBNUIc,4215
|
|
6
6
|
sapiopycommons/ai/test_client.py,sha256=gWmY4rT0F9hzXv0hQ_iQqDBfTRKWh_QKwWeGyU-E9ks,14582
|
|
7
|
-
sapiopycommons/ai/tool_service_base.py,sha256=
|
|
7
|
+
sapiopycommons/ai/tool_service_base.py,sha256=Y_tRanSYzZC2RGPRMj8unQzyUuoSZTpiOgfp7ugKTts,43998
|
|
8
8
|
sapiopycommons/ai/api/fielddefinitions/proto/fields_pb2.py,sha256=YcZjb_YM-XeLErM8hEC_S7vGMVGvcXAMGs2b-u5zvOE,2377
|
|
9
9
|
sapiopycommons/ai/api/fielddefinitions/proto/fields_pb2.pyi,sha256=FwtXmNAf7iYGEFm4kbqb04v77jNHbZg18ZmEDhle_bU,1444
|
|
10
10
|
sapiopycommons/ai/api/fielddefinitions/proto/fields_pb2_grpc.py,sha256=wPImJPdCUZNVEVoUWzsba9kGIXjEKPdUkawP5SnVyiU,932
|
|
@@ -98,7 +98,7 @@ sapiopycommons/webhook/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
|
|
|
98
98
|
sapiopycommons/webhook/webhook_context.py,sha256=D793uLsb1691SalaPnBUk3rOSxn_hYLhdvkaIxjNXss,1909
|
|
99
99
|
sapiopycommons/webhook/webhook_handlers.py,sha256=7o_wXOruhT9auNh8OfhJAh4WhhiPKij67FMBSpGPICc,39939
|
|
100
100
|
sapiopycommons/webhook/webservice_handlers.py,sha256=cvW6Mk_110BzYqkbk63Kg7jWrltBCDALOlkJRu8h4VQ,14300
|
|
101
|
-
sapiopycommons-2025.8.
|
|
102
|
-
sapiopycommons-2025.8.
|
|
103
|
-
sapiopycommons-2025.8.
|
|
104
|
-
sapiopycommons-2025.8.
|
|
101
|
+
sapiopycommons-2025.8.18a712.dist-info/METADATA,sha256=SCrwqboa30vLzoWx-62ujgnWhW79KAlaPZZ_w8n64Tw,3143
|
|
102
|
+
sapiopycommons-2025.8.18a712.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
103
|
+
sapiopycommons-2025.8.18a712.dist-info/licenses/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
|
|
104
|
+
sapiopycommons-2025.8.18a712.dist-info/RECORD,,
|
|
File without changes
|
{sapiopycommons-2025.8.18a710.dist-info → sapiopycommons-2025.8.18a712.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|