sapiopycommons 2025.7.23a659__py3-none-any.whl → 2025.7.31a664__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.

Files changed (34) hide show
  1. sapiopycommons/ai/tool_of_tools.py +809 -0
  2. sapiopycommons/callbacks/callback_util.py +5 -2
  3. sapiopycommons/webhook/webservice_handlers.py +1 -1
  4. {sapiopycommons-2025.7.23a659.dist-info → sapiopycommons-2025.7.31a664.dist-info}/METADATA +1 -1
  5. {sapiopycommons-2025.7.23a659.dist-info → sapiopycommons-2025.7.31a664.dist-info}/RECORD +7 -33
  6. sapiopycommons/ai/api/fielddefinitions/proto/fields_pb2.py +0 -43
  7. sapiopycommons/ai/api/fielddefinitions/proto/fields_pb2.pyi +0 -31
  8. sapiopycommons/ai/api/fielddefinitions/proto/fields_pb2_grpc.py +0 -24
  9. sapiopycommons/ai/api/fielddefinitions/proto/velox_field_def_pb2.py +0 -123
  10. sapiopycommons/ai/api/fielddefinitions/proto/velox_field_def_pb2.pyi +0 -598
  11. sapiopycommons/ai/api/fielddefinitions/proto/velox_field_def_pb2_grpc.py +0 -24
  12. sapiopycommons/ai/api/plan/proto/step_output_pb2.py +0 -45
  13. sapiopycommons/ai/api/plan/proto/step_output_pb2.pyi +0 -42
  14. sapiopycommons/ai/api/plan/proto/step_output_pb2_grpc.py +0 -24
  15. sapiopycommons/ai/api/plan/proto/step_pb2.py +0 -43
  16. sapiopycommons/ai/api/plan/proto/step_pb2.pyi +0 -43
  17. sapiopycommons/ai/api/plan/proto/step_pb2_grpc.py +0 -24
  18. sapiopycommons/ai/api/plan/script/proto/script_pb2.py +0 -55
  19. sapiopycommons/ai/api/plan/script/proto/script_pb2.pyi +0 -115
  20. sapiopycommons/ai/api/plan/script/proto/script_pb2_grpc.py +0 -153
  21. sapiopycommons/ai/api/plan/tool/proto/entry_pb2.py +0 -57
  22. sapiopycommons/ai/api/plan/tool/proto/entry_pb2.pyi +0 -96
  23. sapiopycommons/ai/api/plan/tool/proto/entry_pb2_grpc.py +0 -24
  24. sapiopycommons/ai/api/plan/tool/proto/tool_pb2.py +0 -71
  25. sapiopycommons/ai/api/plan/tool/proto/tool_pb2.pyi +0 -250
  26. sapiopycommons/ai/api/plan/tool/proto/tool_pb2_grpc.py +0 -154
  27. sapiopycommons/ai/api/session/proto/sapio_conn_info_pb2.py +0 -39
  28. sapiopycommons/ai/api/session/proto/sapio_conn_info_pb2.pyi +0 -32
  29. sapiopycommons/ai/api/session/proto/sapio_conn_info_pb2_grpc.py +0 -24
  30. sapiopycommons/ai/protobuf_utils.py +0 -508
  31. sapiopycommons/ai/test_client.py +0 -288
  32. sapiopycommons/ai/tool_service_base.py +0 -916
  33. {sapiopycommons-2025.7.23a659.dist-info → sapiopycommons-2025.7.31a664.dist-info}/WHEEL +0 -0
  34. {sapiopycommons-2025.7.23a659.dist-info → sapiopycommons-2025.7.31a664.dist-info}/licenses/LICENSE +0 -0
@@ -1,96 +0,0 @@
1
- from google.protobuf.internal import containers as _containers
2
- from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
3
- from google.protobuf import descriptor as _descriptor
4
- from google.protobuf import message as _message
5
- from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
6
-
7
- DESCRIPTOR: _descriptor.FileDescriptor
8
-
9
- class DataTypePbo(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
10
- __slots__ = ()
11
- BINARY: _ClassVar[DataTypePbo]
12
- JSON: _ClassVar[DataTypePbo]
13
- CSV: _ClassVar[DataTypePbo]
14
- TEXT: _ClassVar[DataTypePbo]
15
- IMAGE: _ClassVar[DataTypePbo]
16
- BINARY: DataTypePbo
17
- JSON: DataTypePbo
18
- CSV: DataTypePbo
19
- TEXT: DataTypePbo
20
- IMAGE: DataTypePbo
21
-
22
- class StepCsvHeaderRowPbo(_message.Message):
23
- __slots__ = ("cells",)
24
- CELLS_FIELD_NUMBER: _ClassVar[int]
25
- cells: _containers.RepeatedScalarFieldContainer[str]
26
- def __init__(self, cells: _Optional[_Iterable[str]] = ...) -> None: ...
27
-
28
- class StepCsvRowPbo(_message.Message):
29
- __slots__ = ("cells",)
30
- CELLS_FIELD_NUMBER: _ClassVar[int]
31
- cells: _containers.RepeatedScalarFieldContainer[str]
32
- def __init__(self, cells: _Optional[_Iterable[str]] = ...) -> None: ...
33
-
34
- class StepCsvContainerPbo(_message.Message):
35
- __slots__ = ("header", "items")
36
- HEADER_FIELD_NUMBER: _ClassVar[int]
37
- ITEMS_FIELD_NUMBER: _ClassVar[int]
38
- header: StepCsvHeaderRowPbo
39
- items: _containers.RepeatedCompositeFieldContainer[StepCsvRowPbo]
40
- def __init__(self, header: _Optional[_Union[StepCsvHeaderRowPbo, _Mapping]] = ..., items: _Optional[_Iterable[_Union[StepCsvRowPbo, _Mapping]]] = ...) -> None: ...
41
-
42
- class StepJsonContainerPbo(_message.Message):
43
- __slots__ = ("items",)
44
- ITEMS_FIELD_NUMBER: _ClassVar[int]
45
- items: _containers.RepeatedScalarFieldContainer[str]
46
- def __init__(self, items: _Optional[_Iterable[str]] = ...) -> None: ...
47
-
48
- class StepTextContainerPbo(_message.Message):
49
- __slots__ = ("items",)
50
- ITEMS_FIELD_NUMBER: _ClassVar[int]
51
- items: _containers.RepeatedScalarFieldContainer[str]
52
- def __init__(self, items: _Optional[_Iterable[str]] = ...) -> None: ...
53
-
54
- class StepBinaryContainerPbo(_message.Message):
55
- __slots__ = ("items",)
56
- ITEMS_FIELD_NUMBER: _ClassVar[int]
57
- items: _containers.RepeatedScalarFieldContainer[bytes]
58
- def __init__(self, items: _Optional[_Iterable[bytes]] = ...) -> None: ...
59
-
60
- class StepImageContainerPbo(_message.Message):
61
- __slots__ = ("image_format", "items")
62
- IMAGE_FORMAT_FIELD_NUMBER: _ClassVar[int]
63
- ITEMS_FIELD_NUMBER: _ClassVar[int]
64
- image_format: str
65
- items: _containers.RepeatedScalarFieldContainer[bytes]
66
- def __init__(self, image_format: _Optional[str] = ..., items: _Optional[_Iterable[bytes]] = ...) -> None: ...
67
-
68
- class StepItemContainerPbo(_message.Message):
69
- __slots__ = ("dataType", "binary_container", "csv_container", "json_container", "text_container", "image_container")
70
- DATATYPE_FIELD_NUMBER: _ClassVar[int]
71
- BINARY_CONTAINER_FIELD_NUMBER: _ClassVar[int]
72
- CSV_CONTAINER_FIELD_NUMBER: _ClassVar[int]
73
- JSON_CONTAINER_FIELD_NUMBER: _ClassVar[int]
74
- TEXT_CONTAINER_FIELD_NUMBER: _ClassVar[int]
75
- IMAGE_CONTAINER_FIELD_NUMBER: _ClassVar[int]
76
- dataType: DataTypePbo
77
- binary_container: StepBinaryContainerPbo
78
- csv_container: StepCsvContainerPbo
79
- json_container: StepJsonContainerPbo
80
- text_container: StepTextContainerPbo
81
- image_container: StepImageContainerPbo
82
- def __init__(self, dataType: _Optional[_Union[DataTypePbo, str]] = ..., binary_container: _Optional[_Union[StepBinaryContainerPbo, _Mapping]] = ..., csv_container: _Optional[_Union[StepCsvContainerPbo, _Mapping]] = ..., json_container: _Optional[_Union[StepJsonContainerPbo, _Mapping]] = ..., text_container: _Optional[_Union[StepTextContainerPbo, _Mapping]] = ..., image_container: _Optional[_Union[StepImageContainerPbo, _Mapping]] = ...) -> None: ...
83
-
84
- class StepInputBatchPbo(_message.Message):
85
- __slots__ = ("is_partial", "item_container")
86
- IS_PARTIAL_FIELD_NUMBER: _ClassVar[int]
87
- ITEM_CONTAINER_FIELD_NUMBER: _ClassVar[int]
88
- is_partial: bool
89
- item_container: StepItemContainerPbo
90
- def __init__(self, is_partial: bool = ..., item_container: _Optional[_Union[StepItemContainerPbo, _Mapping]] = ...) -> None: ...
91
-
92
- class StepOutputBatchPbo(_message.Message):
93
- __slots__ = ("item_container",)
94
- ITEM_CONTAINER_FIELD_NUMBER: _ClassVar[int]
95
- item_container: StepItemContainerPbo
96
- def __init__(self, item_container: _Optional[_Union[StepItemContainerPbo, _Mapping]] = ...) -> None: ...
@@ -1,24 +0,0 @@
1
- # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
- """Client and server classes corresponding to protobuf-defined services."""
3
- import grpc
4
- import warnings
5
-
6
-
7
- GRPC_GENERATED_VERSION = '1.70.0'
8
- GRPC_VERSION = grpc.__version__
9
- _version_not_supported = False
10
-
11
- try:
12
- from grpc._utilities import first_version_is_lower
13
- _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
14
- except ImportError:
15
- _version_not_supported = True
16
-
17
- if _version_not_supported:
18
- raise RuntimeError(
19
- f'The grpc package installed is at version {GRPC_VERSION},'
20
- + f' but the generated code in sapiopycommons/ai/api/plan/tool/proto/entry_pb2_grpc.py depends on'
21
- + f' grpcio>={GRPC_GENERATED_VERSION}.'
22
- + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
23
- + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
24
- )
@@ -1,71 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # Generated by the protocol buffer compiler. DO NOT EDIT!
3
- # NO CHECKED-IN PROTOBUF GENCODE
4
- # source: sapiopycommons/ai/api/plan/tool/proto/tool.proto
5
- # Protobuf Python Version: 5.29.0
6
- """Generated protocol buffer code."""
7
- from google.protobuf import descriptor as _descriptor
8
- from google.protobuf import descriptor_pool as _descriptor_pool
9
- from google.protobuf import runtime_version as _runtime_version
10
- from google.protobuf import symbol_database as _symbol_database
11
- from google.protobuf.internal import builder as _builder
12
- _runtime_version.ValidateProtobufRuntimeVersion(
13
- _runtime_version.Domain.PUBLIC,
14
- 5,
15
- 29,
16
- 0,
17
- '',
18
- 'sapiopycommons/ai/api/plan/tool/proto/tool.proto'
19
- )
20
- # @@protoc_insertion_point(imports)
21
-
22
- _sym_db = _symbol_database.Default()
23
-
24
-
25
- from sapiopycommons.ai.api.fielddefinitions.proto import fields_pb2 as sapiopycommons_dot_ai_dot_api_dot_fielddefinitions_dot_proto_dot_fields__pb2
26
- from sapiopycommons.ai.api.fielddefinitions.proto import velox_field_def_pb2 as sapiopycommons_dot_ai_dot_api_dot_fielddefinitions_dot_proto_dot_velox__field__def__pb2
27
- from sapiopycommons.ai.api.plan.tool.proto import entry_pb2 as sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_entry__pb2
28
- from sapiopycommons.ai.api.plan.proto import step_pb2 as sapiopycommons_dot_ai_dot_api_dot_plan_dot_proto_dot_step__pb2
29
- from sapiopycommons.ai.api.session.proto import sapio_conn_info_pb2 as sapiopycommons_dot_ai_dot_api_dot_session_dot_proto_dot_sapio__conn__info__pb2
30
-
31
- from sapiopycommons.ai.api.fielddefinitions.proto.fields_pb2 import *
32
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import *
33
- from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import *
34
- from sapiopycommons.ai.api.plan.proto.step_pb2 import *
35
- from sapiopycommons.ai.api.session.proto.sapio_conn_info_pb2 import *
36
-
37
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n0sapiopycommons/ai/api/plan/tool/proto/tool.proto\x1a\x39sapiopycommons/ai/api/fielddefinitions/proto/fields.proto\x1a\x42sapiopycommons/ai/api/fielddefinitions/proto/velox_field_def.proto\x1a\x31sapiopycommons/ai/api/plan/tool/proto/entry.proto\x1a+sapiopycommons/ai/api/plan/proto/step.proto\x1a\x39sapiopycommons/ai/api/session/proto/sapio_conn_info.proto\"R\n\x13\x45xampleContainerPbo\x12\x16\n\x0ctext_example\x18\x01 \x01(\tH\x00\x12\x18\n\x0e\x62inary_example\x18\x02 \x01(\x0cH\x00\x42\t\n\x07\x65xample\"\xe9\x01\n\x13ToolIoConfigBasePbo\x12\x14\n\x0c\x63ontent_type\x18\x01 \x01(\t\x12\x11\n\tio_number\x18\x02 \x01(\x05\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x1e\n\x16\x64\x65precated_old_example\x18\x05 \x01(\t\x12/\n\x11structure_example\x18\x06 \x01(\x0b\x32\x14.ExampleContainerPbo\x12-\n\x0ftesting_example\x18\x07 \x01(\x0b\x32\x14.ExampleContainerPbo\"\xd9\x02\n\x13ToolInputDetailsPbo\x12)\n\x0b\x62\x61se_config\x18\x01 \x01(\x0b\x32\x14.ToolIoConfigBasePbo\x12\x12\n\nvalidation\x18\x02 \x01(\t\x12\x1c\n\x0fmin_input_count\x18\x03 \x01(\x05H\x00\x88\x01\x01\x12\x1c\n\x0fmax_input_count\x18\x04 \x01(\x05H\x01\x88\x01\x01\x12\r\n\x05paged\x18\x05 \x01(\x08\x12\x1a\n\rmin_page_size\x18\x06 \x01(\x05H\x02\x88\x01\x01\x12\x1a\n\rmax_page_size\x18\x07 \x01(\x05H\x03\x88\x01\x01\x12\x1e\n\x11max_request_bytes\x18\x08 \x01(\x05H\x04\x88\x01\x01\x42\x12\n\x10_min_input_countB\x12\n\x10_max_input_countB\x10\n\x0e_min_page_sizeB\x10\n\x0e_max_page_sizeB\x14\n\x12_max_request_bytes\"A\n\x14ToolOutputDetailsPbo\x12)\n\x0b\x62\x61se_config\x18\x01 \x01(\x0b\x32\x14.ToolIoConfigBasePbo\"\xd5\x03\n\x15ProcessStepRequestPbo\x12+\n\nsapio_user\x18\x01 \x01(\x0b\x32\x17.SapioConnectionInfoPbo\x12\x11\n\ttool_name\x18\x02 \x01(\t\x12\x18\n\x10plan_instance_id\x18\x03 \x01(\x03\x12\x18\n\x10step_instance_id\x18\x04 \x01(\x03\x12\x15\n\rinvocation_id\x18\x05 \x01(\x03\x12%\n\rinput_configs\x18\x06 \x03(\x0b\x32\x0e.StepIoInfoPbo\x12&\n\x0eoutput_configs\x18\x07 \x03(\x0b\x32\x0e.StepIoInfoPbo\x12J\n\x13\x63onfig_field_values\x18\x08 \x03(\x0b\x32-.ProcessStepRequestPbo.ConfigFieldValuesEntry\x12\x0f\n\x07\x64ry_run\x18\t \x01(\x08\x12\x17\n\x0fverbose_logging\x18\n \x01(\x08\x12\"\n\x05input\x18\xff\x0f \x03(\x0b\x32\x12.StepInputBatchPbo\x1aH\n\x16\x43onfigFieldValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.FieldValuePbo:\x02\x38\x01\"\xbc\x01\n\x16ProcessStepResponsePbo\x12-\n\x06status\x18\x01 \x01(\x0e\x32\x1d.ProcessStepResponseStatusPbo\x12\x16\n\x0estatus_message\x18\x02 \x01(\t\x12\'\n\x0bnew_records\x18\xfd\x0f \x03(\x0b\x32\x11.FieldValueMapPbo\x12\x0c\n\x03log\x18\xfe\x0f \x03(\t\x12$\n\x06output\x18\xff\x0f \x03(\x0b\x32\x13.StepOutputBatchPbo\"I\n\x15ToolDetailsRequestPbo\x12\x30\n\x0fsapio_conn_info\x18\x01 \x01(\x0b\x32\x17.SapioConnectionInfoPbo\"\xd8\x01\n\x0eToolDetailsPbo\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x1d\n\x15output_data_type_name\x18\x04 \x01(\t\x12+\n\rinput_configs\x18\x05 \x03(\x0b\x32\x14.ToolInputDetailsPbo\x12-\n\x0eoutput_configs\x18\x06 \x03(\x0b\x32\x15.ToolOutputDetailsPbo\x12(\n\rconfig_fields\x18\x07 \x03(\x0b\x32\x11.VeloxFieldDefPbo\"_\n\x16ToolDetailsResponsePbo\x12\x1e\n\x16tool_framework_version\x18\x01 \x01(\x05\x12%\n\x0ctool_details\x18\x02 \x03(\x0b\x32\x0f.ToolDetailsPbo*E\n\x1cProcessStepResponseStatusPbo\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\x0b\n\x07\x46\x41ILURE\x10\x02\x32\x90\x01\n\x0bToolService\x12\x41\n\x0eGetToolDetails\x12\x16.ToolDetailsRequestPbo\x1a\x17.ToolDetailsResponsePbo\x12>\n\x0bProcessData\x12\x16.ProcessStepRequestPbo\x1a\x17.ProcessStepResponsePboB!\n\x1d\x63om.velox.api.plan.tool.protoP\x01P\x00P\x01P\x02P\x03P\x04\x62\x06proto3')
38
-
39
- _globals = globals()
40
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
41
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'sapiopycommons.ai.api.plan.tool.proto.tool_pb2', _globals)
42
- if not _descriptor._USE_C_DESCRIPTORS:
43
- _globals['DESCRIPTOR']._loaded_options = None
44
- _globals['DESCRIPTOR']._serialized_options = b'\n\035com.velox.api.plan.tool.protoP\001'
45
- _globals['_PROCESSSTEPREQUESTPBO_CONFIGFIELDVALUESENTRY']._loaded_options = None
46
- _globals['_PROCESSSTEPREQUESTPBO_CONFIGFIELDVALUESENTRY']._serialized_options = b'8\001'
47
- _globals['_PROCESSSTEPRESPONSESTATUSPBO']._serialized_start=2123
48
- _globals['_PROCESSSTEPRESPONSESTATUSPBO']._serialized_end=2192
49
- _globals['_EXAMPLECONTAINERPBO']._serialized_start=334
50
- _globals['_EXAMPLECONTAINERPBO']._serialized_end=416
51
- _globals['_TOOLIOCONFIGBASEPBO']._serialized_start=419
52
- _globals['_TOOLIOCONFIGBASEPBO']._serialized_end=652
53
- _globals['_TOOLINPUTDETAILSPBO']._serialized_start=655
54
- _globals['_TOOLINPUTDETAILSPBO']._serialized_end=1000
55
- _globals['_TOOLOUTPUTDETAILSPBO']._serialized_start=1002
56
- _globals['_TOOLOUTPUTDETAILSPBO']._serialized_end=1067
57
- _globals['_PROCESSSTEPREQUESTPBO']._serialized_start=1070
58
- _globals['_PROCESSSTEPREQUESTPBO']._serialized_end=1539
59
- _globals['_PROCESSSTEPREQUESTPBO_CONFIGFIELDVALUESENTRY']._serialized_start=1467
60
- _globals['_PROCESSSTEPREQUESTPBO_CONFIGFIELDVALUESENTRY']._serialized_end=1539
61
- _globals['_PROCESSSTEPRESPONSEPBO']._serialized_start=1542
62
- _globals['_PROCESSSTEPRESPONSEPBO']._serialized_end=1730
63
- _globals['_TOOLDETAILSREQUESTPBO']._serialized_start=1732
64
- _globals['_TOOLDETAILSREQUESTPBO']._serialized_end=1805
65
- _globals['_TOOLDETAILSPBO']._serialized_start=1808
66
- _globals['_TOOLDETAILSPBO']._serialized_end=2024
67
- _globals['_TOOLDETAILSRESPONSEPBO']._serialized_start=2026
68
- _globals['_TOOLDETAILSRESPONSEPBO']._serialized_end=2121
69
- _globals['_TOOLSERVICE']._serialized_start=2195
70
- _globals['_TOOLSERVICE']._serialized_end=2339
71
- # @@protoc_insertion_point(module_scope)
@@ -1,250 +0,0 @@
1
- from sapiopycommons.ai.api.fielddefinitions.proto import fields_pb2 as _fields_pb2
2
- from sapiopycommons.ai.api.fielddefinitions.proto import velox_field_def_pb2 as _velox_field_def_pb2
3
- from sapiopycommons.ai.api.plan.tool.proto import entry_pb2 as _entry_pb2
4
- from sapiopycommons.ai.api.plan.proto import step_pb2 as _step_pb2
5
- from sapiopycommons.ai.api.session.proto import sapio_conn_info_pb2 as _sapio_conn_info_pb2
6
- from google.protobuf.internal import containers as _containers
7
- from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
8
- from google.protobuf import descriptor as _descriptor
9
- from google.protobuf import message as _message
10
- from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
11
- from sapiopycommons.ai.api.fielddefinitions.proto.fields_pb2 import FieldValuePbo as FieldValuePbo
12
- from sapiopycommons.ai.api.fielddefinitions.proto.fields_pb2 import FieldValueMapPbo as FieldValueMapPbo
13
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import FieldValidatorPbo as FieldValidatorPbo
14
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import ColorRangePbo as ColorRangePbo
15
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import BooleanDependentFieldEntryPbo as BooleanDependentFieldEntryPbo
16
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import SelectionDependentFieldEntryPbo as SelectionDependentFieldEntryPbo
17
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import EnumDependentFieldEntryPbo as EnumDependentFieldEntryPbo
18
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import ProcessDetailEntryPbo as ProcessDetailEntryPbo
19
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import BooleanPropertiesPbo as BooleanPropertiesPbo
20
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import DatePropertiesPbo as DatePropertiesPbo
21
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import DoublePropertiesPbo as DoublePropertiesPbo
22
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import IntegerPropertiesPbo as IntegerPropertiesPbo
23
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import LongPropertiesPbo as LongPropertiesPbo
24
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import ShortPropertiesPbo as ShortPropertiesPbo
25
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import SelectionPropertiesPbo as SelectionPropertiesPbo
26
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import StringPropertiesPbo as StringPropertiesPbo
27
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import SideLinkPropertiesPbo as SideLinkPropertiesPbo
28
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import PickListPropertiesPbo as PickListPropertiesPbo
29
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import ParentLinkPropertiesPbo as ParentLinkPropertiesPbo
30
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import MultiParentPropertiesPbo as MultiParentPropertiesPbo
31
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import IdentifierPropertiesPbo as IdentifierPropertiesPbo
32
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import FileBlobPropertiesPbo as FileBlobPropertiesPbo
33
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import EnumPropertiesPbo as EnumPropertiesPbo
34
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import DateRangePropertiesPbo as DateRangePropertiesPbo
35
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import ChildLinkPropertiesPbo as ChildLinkPropertiesPbo
36
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import ActionStringPropertiesPbo as ActionStringPropertiesPbo
37
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import ActionPropertiesPbo as ActionPropertiesPbo
38
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import AccessionPropertiesPbo as AccessionPropertiesPbo
39
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import VeloxFieldDefPbo as VeloxFieldDefPbo
40
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import VeloxFieldDefListPbo as VeloxFieldDefListPbo
41
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import FieldTypePbo as FieldTypePbo
42
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import SortDirectionPbo as SortDirectionPbo
43
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import FontSizePbo as FontSizePbo
44
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import TextDecorationPbo as TextDecorationPbo
45
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import StringFormatPbo as StringFormatPbo
46
- from sapiopycommons.ai.api.fielddefinitions.proto.velox_field_def_pb2 import DoubleFormatPbo as DoubleFormatPbo
47
- from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepCsvHeaderRowPbo as StepCsvHeaderRowPbo
48
- from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepCsvRowPbo as StepCsvRowPbo
49
- from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepCsvContainerPbo as StepCsvContainerPbo
50
- from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepJsonContainerPbo as StepJsonContainerPbo
51
- from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepTextContainerPbo as StepTextContainerPbo
52
- from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepBinaryContainerPbo as StepBinaryContainerPbo
53
- from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepImageContainerPbo as StepImageContainerPbo
54
- from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepItemContainerPbo as StepItemContainerPbo
55
- from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepInputBatchPbo as StepInputBatchPbo
56
- from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import StepOutputBatchPbo as StepOutputBatchPbo
57
- from sapiopycommons.ai.api.plan.tool.proto.entry_pb2 import DataTypePbo as DataTypePbo
58
- from sapiopycommons.ai.api.plan.proto.step_pb2 import StepIoInfoPbo as StepIoInfoPbo
59
- from sapiopycommons.ai.api.plan.proto.step_pb2 import StepIoDetailsPbo as StepIoDetailsPbo
60
- from sapiopycommons.ai.api.plan.proto.step_pb2 import StepInputDetailsPbo as StepInputDetailsPbo
61
- from sapiopycommons.ai.api.plan.proto.step_pb2 import StepOutputDetailsPbo as StepOutputDetailsPbo
62
- from sapiopycommons.ai.api.session.proto.sapio_conn_info_pb2 import SapioConnectionInfoPbo as SapioConnectionInfoPbo
63
- from sapiopycommons.ai.api.session.proto.sapio_conn_info_pb2 import SapioUserSecretTypePbo as SapioUserSecretTypePbo
64
-
65
- DESCRIPTOR: _descriptor.FileDescriptor
66
- FIELD_TYPE_UNSPECIFIED: _velox_field_def_pb2.FieldTypePbo
67
- BOOLEAN: _velox_field_def_pb2.FieldTypePbo
68
- DOUBLE: _velox_field_def_pb2.FieldTypePbo
69
- ENUM: _velox_field_def_pb2.FieldTypePbo
70
- LONG: _velox_field_def_pb2.FieldTypePbo
71
- INTEGER: _velox_field_def_pb2.FieldTypePbo
72
- SHORT: _velox_field_def_pb2.FieldTypePbo
73
- STRING: _velox_field_def_pb2.FieldTypePbo
74
- DATE: _velox_field_def_pb2.FieldTypePbo
75
- ACTION: _velox_field_def_pb2.FieldTypePbo
76
- SELECTION: _velox_field_def_pb2.FieldTypePbo
77
- PARENTLINK: _velox_field_def_pb2.FieldTypePbo
78
- IDENTIFIER: _velox_field_def_pb2.FieldTypePbo
79
- PICKLIST: _velox_field_def_pb2.FieldTypePbo
80
- LINK: _velox_field_def_pb2.FieldTypePbo
81
- MULTIPARENTLINK: _velox_field_def_pb2.FieldTypePbo
82
- CHILDLINK: _velox_field_def_pb2.FieldTypePbo
83
- AUTO_ACCESSION: _velox_field_def_pb2.FieldTypePbo
84
- DATE_RANGE: _velox_field_def_pb2.FieldTypePbo
85
- SIDE_LINK: _velox_field_def_pb2.FieldTypePbo
86
- ACTION_STRING: _velox_field_def_pb2.FieldTypePbo
87
- FILE_BLOB: _velox_field_def_pb2.FieldTypePbo
88
- SORT_DIRECTION_UNSPECIFIED: _velox_field_def_pb2.SortDirectionPbo
89
- SORT_DIRECTION_ASCENDING: _velox_field_def_pb2.SortDirectionPbo
90
- SORT_DIRECTION_DESCENDING: _velox_field_def_pb2.SortDirectionPbo
91
- SORT_DIRECTION_NONE: _velox_field_def_pb2.SortDirectionPbo
92
- FONT_SIZE_UNSPECIFIED: _velox_field_def_pb2.FontSizePbo
93
- FONT_SIZE_SMALL: _velox_field_def_pb2.FontSizePbo
94
- FONT_SIZE_MEDIUM: _velox_field_def_pb2.FontSizePbo
95
- FONT_SIZE_LARGE: _velox_field_def_pb2.FontSizePbo
96
- TEXT_DECORATION_UNSPECIFIED: _velox_field_def_pb2.TextDecorationPbo
97
- TEXT_DECORATION_NONE: _velox_field_def_pb2.TextDecorationPbo
98
- TEXT_DECORATION_UNDERLINE: _velox_field_def_pb2.TextDecorationPbo
99
- TEXT_DECORATION_STRIKETHROUGH: _velox_field_def_pb2.TextDecorationPbo
100
- STRING_FORMAT_UNSPECIFIED: _velox_field_def_pb2.StringFormatPbo
101
- STRING_FORMAT_PHONE: _velox_field_def_pb2.StringFormatPbo
102
- STRING_FORMAT_EMAIL: _velox_field_def_pb2.StringFormatPbo
103
- DOUBLE_FORMAT_UNSPECIFIED: _velox_field_def_pb2.DoubleFormatPbo
104
- DOUBLE_FORMAT_CURRENCY: _velox_field_def_pb2.DoubleFormatPbo
105
- DOUBLE_FORMAT_PERCENTAGE: _velox_field_def_pb2.DoubleFormatPbo
106
- BINARY: _entry_pb2.DataTypePbo
107
- JSON: _entry_pb2.DataTypePbo
108
- CSV: _entry_pb2.DataTypePbo
109
- TEXT: _entry_pb2.DataTypePbo
110
- IMAGE: _entry_pb2.DataTypePbo
111
- SESSION_TOKEN: _sapio_conn_info_pb2.SapioUserSecretTypePbo
112
- PASSWORD: _sapio_conn_info_pb2.SapioUserSecretTypePbo
113
-
114
- class ProcessStepResponseStatusPbo(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
115
- __slots__ = ()
116
- UNKNOWN: _ClassVar[ProcessStepResponseStatusPbo]
117
- SUCCESS: _ClassVar[ProcessStepResponseStatusPbo]
118
- FAILURE: _ClassVar[ProcessStepResponseStatusPbo]
119
- UNKNOWN: ProcessStepResponseStatusPbo
120
- SUCCESS: ProcessStepResponseStatusPbo
121
- FAILURE: ProcessStepResponseStatusPbo
122
-
123
- class ExampleContainerPbo(_message.Message):
124
- __slots__ = ("text_example", "binary_example")
125
- TEXT_EXAMPLE_FIELD_NUMBER: _ClassVar[int]
126
- BINARY_EXAMPLE_FIELD_NUMBER: _ClassVar[int]
127
- text_example: str
128
- binary_example: bytes
129
- def __init__(self, text_example: _Optional[str] = ..., binary_example: _Optional[bytes] = ...) -> None: ...
130
-
131
- class ToolIoConfigBasePbo(_message.Message):
132
- __slots__ = ("content_type", "io_number", "display_name", "description", "deprecated_old_example", "structure_example", "testing_example")
133
- CONTENT_TYPE_FIELD_NUMBER: _ClassVar[int]
134
- IO_NUMBER_FIELD_NUMBER: _ClassVar[int]
135
- DISPLAY_NAME_FIELD_NUMBER: _ClassVar[int]
136
- DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
137
- DEPRECATED_OLD_EXAMPLE_FIELD_NUMBER: _ClassVar[int]
138
- STRUCTURE_EXAMPLE_FIELD_NUMBER: _ClassVar[int]
139
- TESTING_EXAMPLE_FIELD_NUMBER: _ClassVar[int]
140
- content_type: str
141
- io_number: int
142
- display_name: str
143
- description: str
144
- deprecated_old_example: str
145
- structure_example: ExampleContainerPbo
146
- testing_example: ExampleContainerPbo
147
- def __init__(self, content_type: _Optional[str] = ..., io_number: _Optional[int] = ..., display_name: _Optional[str] = ..., description: _Optional[str] = ..., deprecated_old_example: _Optional[str] = ..., structure_example: _Optional[_Union[ExampleContainerPbo, _Mapping]] = ..., testing_example: _Optional[_Union[ExampleContainerPbo, _Mapping]] = ...) -> None: ...
148
-
149
- class ToolInputDetailsPbo(_message.Message):
150
- __slots__ = ("base_config", "validation", "min_input_count", "max_input_count", "paged", "min_page_size", "max_page_size", "max_request_bytes")
151
- BASE_CONFIG_FIELD_NUMBER: _ClassVar[int]
152
- VALIDATION_FIELD_NUMBER: _ClassVar[int]
153
- MIN_INPUT_COUNT_FIELD_NUMBER: _ClassVar[int]
154
- MAX_INPUT_COUNT_FIELD_NUMBER: _ClassVar[int]
155
- PAGED_FIELD_NUMBER: _ClassVar[int]
156
- MIN_PAGE_SIZE_FIELD_NUMBER: _ClassVar[int]
157
- MAX_PAGE_SIZE_FIELD_NUMBER: _ClassVar[int]
158
- MAX_REQUEST_BYTES_FIELD_NUMBER: _ClassVar[int]
159
- base_config: ToolIoConfigBasePbo
160
- validation: str
161
- min_input_count: int
162
- max_input_count: int
163
- paged: bool
164
- min_page_size: int
165
- max_page_size: int
166
- max_request_bytes: int
167
- def __init__(self, base_config: _Optional[_Union[ToolIoConfigBasePbo, _Mapping]] = ..., validation: _Optional[str] = ..., min_input_count: _Optional[int] = ..., max_input_count: _Optional[int] = ..., paged: bool = ..., min_page_size: _Optional[int] = ..., max_page_size: _Optional[int] = ..., max_request_bytes: _Optional[int] = ...) -> None: ...
168
-
169
- class ToolOutputDetailsPbo(_message.Message):
170
- __slots__ = ("base_config",)
171
- BASE_CONFIG_FIELD_NUMBER: _ClassVar[int]
172
- base_config: ToolIoConfigBasePbo
173
- def __init__(self, base_config: _Optional[_Union[ToolIoConfigBasePbo, _Mapping]] = ...) -> None: ...
174
-
175
- class ProcessStepRequestPbo(_message.Message):
176
- __slots__ = ("sapio_user", "tool_name", "plan_instance_id", "step_instance_id", "invocation_id", "input_configs", "output_configs", "config_field_values", "dry_run", "verbose_logging", "input")
177
- class ConfigFieldValuesEntry(_message.Message):
178
- __slots__ = ("key", "value")
179
- KEY_FIELD_NUMBER: _ClassVar[int]
180
- VALUE_FIELD_NUMBER: _ClassVar[int]
181
- key: str
182
- value: _fields_pb2.FieldValuePbo
183
- def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[_fields_pb2.FieldValuePbo, _Mapping]] = ...) -> None: ...
184
- SAPIO_USER_FIELD_NUMBER: _ClassVar[int]
185
- TOOL_NAME_FIELD_NUMBER: _ClassVar[int]
186
- PLAN_INSTANCE_ID_FIELD_NUMBER: _ClassVar[int]
187
- STEP_INSTANCE_ID_FIELD_NUMBER: _ClassVar[int]
188
- INVOCATION_ID_FIELD_NUMBER: _ClassVar[int]
189
- INPUT_CONFIGS_FIELD_NUMBER: _ClassVar[int]
190
- OUTPUT_CONFIGS_FIELD_NUMBER: _ClassVar[int]
191
- CONFIG_FIELD_VALUES_FIELD_NUMBER: _ClassVar[int]
192
- DRY_RUN_FIELD_NUMBER: _ClassVar[int]
193
- VERBOSE_LOGGING_FIELD_NUMBER: _ClassVar[int]
194
- INPUT_FIELD_NUMBER: _ClassVar[int]
195
- sapio_user: _sapio_conn_info_pb2.SapioConnectionInfoPbo
196
- tool_name: str
197
- plan_instance_id: int
198
- step_instance_id: int
199
- invocation_id: int
200
- input_configs: _containers.RepeatedCompositeFieldContainer[_step_pb2.StepIoInfoPbo]
201
- output_configs: _containers.RepeatedCompositeFieldContainer[_step_pb2.StepIoInfoPbo]
202
- config_field_values: _containers.MessageMap[str, _fields_pb2.FieldValuePbo]
203
- dry_run: bool
204
- verbose_logging: bool
205
- input: _containers.RepeatedCompositeFieldContainer[_entry_pb2.StepInputBatchPbo]
206
- def __init__(self, sapio_user: _Optional[_Union[_sapio_conn_info_pb2.SapioConnectionInfoPbo, _Mapping]] = ..., tool_name: _Optional[str] = ..., plan_instance_id: _Optional[int] = ..., step_instance_id: _Optional[int] = ..., invocation_id: _Optional[int] = ..., input_configs: _Optional[_Iterable[_Union[_step_pb2.StepIoInfoPbo, _Mapping]]] = ..., output_configs: _Optional[_Iterable[_Union[_step_pb2.StepIoInfoPbo, _Mapping]]] = ..., config_field_values: _Optional[_Mapping[str, _fields_pb2.FieldValuePbo]] = ..., dry_run: bool = ..., verbose_logging: bool = ..., input: _Optional[_Iterable[_Union[_entry_pb2.StepInputBatchPbo, _Mapping]]] = ...) -> None: ...
207
-
208
- class ProcessStepResponsePbo(_message.Message):
209
- __slots__ = ("status", "status_message", "new_records", "log", "output")
210
- STATUS_FIELD_NUMBER: _ClassVar[int]
211
- STATUS_MESSAGE_FIELD_NUMBER: _ClassVar[int]
212
- NEW_RECORDS_FIELD_NUMBER: _ClassVar[int]
213
- LOG_FIELD_NUMBER: _ClassVar[int]
214
- OUTPUT_FIELD_NUMBER: _ClassVar[int]
215
- status: ProcessStepResponseStatusPbo
216
- status_message: str
217
- new_records: _containers.RepeatedCompositeFieldContainer[_fields_pb2.FieldValueMapPbo]
218
- log: _containers.RepeatedScalarFieldContainer[str]
219
- output: _containers.RepeatedCompositeFieldContainer[_entry_pb2.StepOutputBatchPbo]
220
- def __init__(self, status: _Optional[_Union[ProcessStepResponseStatusPbo, str]] = ..., status_message: _Optional[str] = ..., new_records: _Optional[_Iterable[_Union[_fields_pb2.FieldValueMapPbo, _Mapping]]] = ..., log: _Optional[_Iterable[str]] = ..., output: _Optional[_Iterable[_Union[_entry_pb2.StepOutputBatchPbo, _Mapping]]] = ...) -> None: ...
221
-
222
- class ToolDetailsRequestPbo(_message.Message):
223
- __slots__ = ("sapio_conn_info",)
224
- SAPIO_CONN_INFO_FIELD_NUMBER: _ClassVar[int]
225
- sapio_conn_info: _sapio_conn_info_pb2.SapioConnectionInfoPbo
226
- def __init__(self, sapio_conn_info: _Optional[_Union[_sapio_conn_info_pb2.SapioConnectionInfoPbo, _Mapping]] = ...) -> None: ...
227
-
228
- class ToolDetailsPbo(_message.Message):
229
- __slots__ = ("name", "description", "output_data_type_name", "input_configs", "output_configs", "config_fields")
230
- NAME_FIELD_NUMBER: _ClassVar[int]
231
- DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
232
- OUTPUT_DATA_TYPE_NAME_FIELD_NUMBER: _ClassVar[int]
233
- INPUT_CONFIGS_FIELD_NUMBER: _ClassVar[int]
234
- OUTPUT_CONFIGS_FIELD_NUMBER: _ClassVar[int]
235
- CONFIG_FIELDS_FIELD_NUMBER: _ClassVar[int]
236
- name: str
237
- description: str
238
- output_data_type_name: str
239
- input_configs: _containers.RepeatedCompositeFieldContainer[ToolInputDetailsPbo]
240
- output_configs: _containers.RepeatedCompositeFieldContainer[ToolOutputDetailsPbo]
241
- config_fields: _containers.RepeatedCompositeFieldContainer[_velox_field_def_pb2.VeloxFieldDefPbo]
242
- def __init__(self, name: _Optional[str] = ..., description: _Optional[str] = ..., output_data_type_name: _Optional[str] = ..., input_configs: _Optional[_Iterable[_Union[ToolInputDetailsPbo, _Mapping]]] = ..., output_configs: _Optional[_Iterable[_Union[ToolOutputDetailsPbo, _Mapping]]] = ..., config_fields: _Optional[_Iterable[_Union[_velox_field_def_pb2.VeloxFieldDefPbo, _Mapping]]] = ...) -> None: ...
243
-
244
- class ToolDetailsResponsePbo(_message.Message):
245
- __slots__ = ("tool_framework_version", "tool_details")
246
- TOOL_FRAMEWORK_VERSION_FIELD_NUMBER: _ClassVar[int]
247
- TOOL_DETAILS_FIELD_NUMBER: _ClassVar[int]
248
- tool_framework_version: int
249
- tool_details: _containers.RepeatedCompositeFieldContainer[ToolDetailsPbo]
250
- def __init__(self, tool_framework_version: _Optional[int] = ..., tool_details: _Optional[_Iterable[_Union[ToolDetailsPbo, _Mapping]]] = ...) -> None: ...
@@ -1,154 +0,0 @@
1
- # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
- """Client and server classes corresponding to protobuf-defined services."""
3
- import grpc
4
- import warnings
5
-
6
- from sapiopycommons.ai.api.plan.tool.proto import tool_pb2 as sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2
7
-
8
- GRPC_GENERATED_VERSION = '1.70.0'
9
- GRPC_VERSION = grpc.__version__
10
- _version_not_supported = False
11
-
12
- try:
13
- from grpc._utilities import first_version_is_lower
14
- _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
15
- except ImportError:
16
- _version_not_supported = True
17
-
18
- if _version_not_supported:
19
- raise RuntimeError(
20
- f'The grpc package installed is at version {GRPC_VERSION},'
21
- + f' but the generated code in sapiopycommons/ai/api/plan/tool/proto/tool_pb2_grpc.py depends on'
22
- + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
- + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
- + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
25
- )
26
-
27
-
28
- class ToolServiceStub(object):
29
- """
30
- This is the generic service interface that all tools must implement. We will use hostname routing to route the request to the correct tool.
31
- The other option is for us to use gRPC metadata to route the request to the correct tool. We don't want to expose a bunch of ports and that's
32
- a pain to manage. So we will use hostname routing for now.
33
- """
34
-
35
- def __init__(self, channel):
36
- """Constructor.
37
-
38
- Args:
39
- channel: A grpc.Channel.
40
- """
41
- self.GetToolDetails = channel.unary_unary(
42
- '/ToolService/GetToolDetails',
43
- request_serializer=sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ToolDetailsRequestPbo.SerializeToString,
44
- response_deserializer=sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ToolDetailsResponsePbo.FromString,
45
- _registered_method=True)
46
- self.ProcessData = channel.unary_unary(
47
- '/ToolService/ProcessData',
48
- request_serializer=sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ProcessStepRequestPbo.SerializeToString,
49
- response_deserializer=sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ProcessStepResponsePbo.FromString,
50
- _registered_method=True)
51
-
52
-
53
- class ToolServiceServicer(object):
54
- """
55
- This is the generic service interface that all tools must implement. We will use hostname routing to route the request to the correct tool.
56
- The other option is for us to use gRPC metadata to route the request to the correct tool. We don't want to expose a bunch of ports and that's
57
- a pain to manage. So we will use hostname routing for now.
58
- """
59
-
60
- def GetToolDetails(self, request, context):
61
- """This allows for a tool to self-describe itself, which allows for the UI to be automatically populated with this information
62
- """
63
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
64
- context.set_details('Method not implemented!')
65
- raise NotImplementedError('Method not implemented!')
66
-
67
- def ProcessData(self, request, context):
68
- """This is the main entry point for a tool to be called
69
- """
70
- context.set_code(grpc.StatusCode.UNIMPLEMENTED)
71
- context.set_details('Method not implemented!')
72
- raise NotImplementedError('Method not implemented!')
73
-
74
-
75
- def add_ToolServiceServicer_to_server(servicer, server):
76
- rpc_method_handlers = {
77
- 'GetToolDetails': grpc.unary_unary_rpc_method_handler(
78
- servicer.GetToolDetails,
79
- request_deserializer=sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ToolDetailsRequestPbo.FromString,
80
- response_serializer=sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ToolDetailsResponsePbo.SerializeToString,
81
- ),
82
- 'ProcessData': grpc.unary_unary_rpc_method_handler(
83
- servicer.ProcessData,
84
- request_deserializer=sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ProcessStepRequestPbo.FromString,
85
- response_serializer=sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ProcessStepResponsePbo.SerializeToString,
86
- ),
87
- }
88
- generic_handler = grpc.method_handlers_generic_handler(
89
- 'ToolService', rpc_method_handlers)
90
- server.add_generic_rpc_handlers((generic_handler,))
91
- server.add_registered_method_handlers('ToolService', rpc_method_handlers)
92
-
93
-
94
- # This class is part of an EXPERIMENTAL API.
95
- class ToolService(object):
96
- """
97
- This is the generic service interface that all tools must implement. We will use hostname routing to route the request to the correct tool.
98
- The other option is for us to use gRPC metadata to route the request to the correct tool. We don't want to expose a bunch of ports and that's
99
- a pain to manage. So we will use hostname routing for now.
100
- """
101
-
102
- @staticmethod
103
- def GetToolDetails(request,
104
- target,
105
- options=(),
106
- channel_credentials=None,
107
- call_credentials=None,
108
- insecure=False,
109
- compression=None,
110
- wait_for_ready=None,
111
- timeout=None,
112
- metadata=None):
113
- return grpc.experimental.unary_unary(
114
- request,
115
- target,
116
- '/ToolService/GetToolDetails',
117
- sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ToolDetailsRequestPbo.SerializeToString,
118
- sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ToolDetailsResponsePbo.FromString,
119
- options,
120
- channel_credentials,
121
- insecure,
122
- call_credentials,
123
- compression,
124
- wait_for_ready,
125
- timeout,
126
- metadata,
127
- _registered_method=True)
128
-
129
- @staticmethod
130
- def ProcessData(request,
131
- target,
132
- options=(),
133
- channel_credentials=None,
134
- call_credentials=None,
135
- insecure=False,
136
- compression=None,
137
- wait_for_ready=None,
138
- timeout=None,
139
- metadata=None):
140
- return grpc.experimental.unary_unary(
141
- request,
142
- target,
143
- '/ToolService/ProcessData',
144
- sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ProcessStepRequestPbo.SerializeToString,
145
- sapiopycommons_dot_ai_dot_api_dot_plan_dot_tool_dot_proto_dot_tool__pb2.ProcessStepResponsePbo.FromString,
146
- options,
147
- channel_credentials,
148
- insecure,
149
- call_credentials,
150
- compression,
151
- wait_for_ready,
152
- timeout,
153
- metadata,
154
- _registered_method=True)
@@ -1,39 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # Generated by the protocol buffer compiler. DO NOT EDIT!
3
- # NO CHECKED-IN PROTOBUF GENCODE
4
- # source: sapiopycommons/ai/api/session/proto/sapio_conn_info.proto
5
- # Protobuf Python Version: 5.29.0
6
- """Generated protocol buffer code."""
7
- from google.protobuf import descriptor as _descriptor
8
- from google.protobuf import descriptor_pool as _descriptor_pool
9
- from google.protobuf import runtime_version as _runtime_version
10
- from google.protobuf import symbol_database as _symbol_database
11
- from google.protobuf.internal import builder as _builder
12
- _runtime_version.ValidateProtobufRuntimeVersion(
13
- _runtime_version.Domain.PUBLIC,
14
- 5,
15
- 29,
16
- 0,
17
- '',
18
- 'sapiopycommons/ai/api/session/proto/sapio_conn_info.proto'
19
- )
20
- # @@protoc_insertion_point(imports)
21
-
22
- _sym_db = _symbol_database.Default()
23
-
24
-
25
-
26
-
27
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n9sapiopycommons/ai/api/session/proto/sapio_conn_info.proto\"\xb6\x01\n\x16SapioConnectionInfoPbo\x12\x16\n\x0ewebservice_url\x18\x01 \x01(\t\x12\x10\n\x08rmi_host\x18\x02 \x03(\t\x12\x10\n\x08rmi_port\x18\x03 \x01(\x05\x12\x10\n\x08\x61pp_guid\x18\x04 \x01(\t\x12\x10\n\x08username\x18\x05 \x01(\t\x12,\n\x0bsecret_type\x18\x06 \x01(\x0e\x32\x17.SapioUserSecretTypePbo\x12\x0e\n\x06secret\x18\x07 \x01(\t*9\n\x16SapioUserSecretTypePbo\x12\x11\n\rSESSION_TOKEN\x10\x00\x12\x0c\n\x08PASSWORD\x10\x01\x42\x1f\n\x1b\x63om.velox.api.session.protoP\x01\x62\x06proto3')
28
-
29
- _globals = globals()
30
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'sapiopycommons.ai.api.session.proto.sapio_conn_info_pb2', _globals)
32
- if not _descriptor._USE_C_DESCRIPTORS:
33
- _globals['DESCRIPTOR']._loaded_options = None
34
- _globals['DESCRIPTOR']._serialized_options = b'\n\033com.velox.api.session.protoP\001'
35
- _globals['_SAPIOUSERSECRETTYPEPBO']._serialized_start=246
36
- _globals['_SAPIOUSERSECRETTYPEPBO']._serialized_end=303
37
- _globals['_SAPIOCONNECTIONINFOPBO']._serialized_start=62
38
- _globals['_SAPIOCONNECTIONINFOPBO']._serialized_end=244
39
- # @@protoc_insertion_point(module_scope)