sapiopycommons 2025.7.21a626__py3-none-any.whl → 2025.7.21a630__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 +7 -6
- {sapiopycommons-2025.7.21a626.dist-info → sapiopycommons-2025.7.21a630.dist-info}/METADATA +1 -1
- {sapiopycommons-2025.7.21a626.dist-info → sapiopycommons-2025.7.21a630.dist-info}/RECORD +5 -5
- {sapiopycommons-2025.7.21a626.dist-info → sapiopycommons-2025.7.21a630.dist-info}/WHEEL +0 -0
- {sapiopycommons-2025.7.21a626.dist-info → sapiopycommons-2025.7.21a630.dist-info}/licenses/LICENSE +0 -0
|
@@ -242,7 +242,6 @@ class ToolServiceBase(ToolServiceServicer, ABC):
|
|
|
242
242
|
:param info: The SapioConnectionInfo proto object.
|
|
243
243
|
:param timeout_seconds: The request timeout for calls made from this user object.
|
|
244
244
|
"""
|
|
245
|
-
# TODO: Have a customizable request timeout? Would need to be added to the request object.
|
|
246
245
|
user = SapioUser(info.webservice_url, True, timeout_seconds, guid=info.app_guid)
|
|
247
246
|
match info.secret_type:
|
|
248
247
|
case SapioUserSecretTypePbo.SESSION_TOKEN:
|
|
@@ -312,7 +311,9 @@ class ToolServiceBase(ToolServiceServicer, ABC):
|
|
|
312
311
|
# Setup the tool with details from the request.
|
|
313
312
|
tool.setup(user, request, context)
|
|
314
313
|
# Validate that the provided inputs match the tool's expected inputs.
|
|
315
|
-
|
|
314
|
+
msg: str = tool.validate_input()
|
|
315
|
+
# If there is no error message, then the inputs are valid.
|
|
316
|
+
success: bool = not bool(msg)
|
|
316
317
|
# If this is a dry run, then provide the fixed dry run output.
|
|
317
318
|
# Otherwise, if the inputs were successfully validated, then the tool is executed normally.
|
|
318
319
|
results: list[SapioToolResult] = []
|
|
@@ -665,11 +666,11 @@ class ToolBase(ABC):
|
|
|
665
666
|
)
|
|
666
667
|
|
|
667
668
|
@abstractmethod
|
|
668
|
-
def validate_input(self) ->
|
|
669
|
+
def validate_input(self) -> str | None:
|
|
669
670
|
"""
|
|
670
|
-
Validate the request given to this tool. If the request is validly formatted, this method should return
|
|
671
|
-
|
|
672
|
-
|
|
671
|
+
Validate the request given to this tool. If the request is validly formatted, this method should return None.
|
|
672
|
+
If the request is not valid, this method should return an error message indicating what is wrong with the
|
|
673
|
+
request.
|
|
673
674
|
|
|
674
675
|
This method should not perform any actual processing of the request. It should only validate the inputs and
|
|
675
676
|
configurations provided in the request.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: sapiopycommons
|
|
3
|
-
Version: 2025.7.
|
|
3
|
+
Version: 2025.7.21a630
|
|
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>
|
|
@@ -2,7 +2,7 @@ sapiopycommons/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
2
2
|
sapiopycommons/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
sapiopycommons/ai/protobuf_utils.py,sha256=8VYGhAdD731Ojy5PTy61PlTcvfEdydkIdX-4rOFPtxM,24911
|
|
4
4
|
sapiopycommons/ai/test_client.py,sha256=PCc5s_-Uo8_CVsB1rpwvHtvXfHKa2iuZnC7VK-9cAoE,10457
|
|
5
|
-
sapiopycommons/ai/tool_service_base.py,sha256=
|
|
5
|
+
sapiopycommons/ai/tool_service_base.py,sha256=ezNXOEPN3-4_FFiDDJ80hBLj3ZhC_xsQKPZZHAhp4uQ,41802
|
|
6
6
|
sapiopycommons/ai/api/fielddefinitions/proto/fields_pb2.py,sha256=YcZjb_YM-XeLErM8hEC_S7vGMVGvcXAMGs2b-u5zvOE,2377
|
|
7
7
|
sapiopycommons/ai/api/fielddefinitions/proto/fields_pb2.pyi,sha256=FwtXmNAf7iYGEFm4kbqb04v77jNHbZg18ZmEDhle_bU,1444
|
|
8
8
|
sapiopycommons/ai/api/fielddefinitions/proto/fields_pb2_grpc.py,sha256=wPImJPdCUZNVEVoUWzsba9kGIXjEKPdUkawP5SnVyiU,932
|
|
@@ -90,7 +90,7 @@ sapiopycommons/webhook/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
|
|
|
90
90
|
sapiopycommons/webhook/webhook_context.py,sha256=D793uLsb1691SalaPnBUk3rOSxn_hYLhdvkaIxjNXss,1909
|
|
91
91
|
sapiopycommons/webhook/webhook_handlers.py,sha256=7o_wXOruhT9auNh8OfhJAh4WhhiPKij67FMBSpGPICc,39939
|
|
92
92
|
sapiopycommons/webhook/webservice_handlers.py,sha256=tyaYGG1-v_JJrJHZ6cy5mGCxX9z1foLw7pM4MDJlFxs,14297
|
|
93
|
-
sapiopycommons-2025.7.
|
|
94
|
-
sapiopycommons-2025.7.
|
|
95
|
-
sapiopycommons-2025.7.
|
|
96
|
-
sapiopycommons-2025.7.
|
|
93
|
+
sapiopycommons-2025.7.21a630.dist-info/METADATA,sha256=UXQiQOApr9tU_aSyBOZ1U6dpWeB3jNwvl7WjBWFp2VE,3143
|
|
94
|
+
sapiopycommons-2025.7.21a630.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
95
|
+
sapiopycommons-2025.7.21a630.dist-info/licenses/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
|
|
96
|
+
sapiopycommons-2025.7.21a630.dist-info/RECORD,,
|
|
File without changes
|
{sapiopycommons-2025.7.21a626.dist-info → sapiopycommons-2025.7.21a630.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|