rapida-python 0.0.5__py3-none-any.whl → 0.0.7__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.
- bin/__init__.py +3 -0
- rapida/artifacts/protos/common_pb2.py +111 -0
- rapida/artifacts/protos/common_pb2_grpc.py +4 -0
- rapida/artifacts/protos/invoker_api_pb2.py +72 -0
- rapida/artifacts/protos/invoker_api_pb2_grpc.py +133 -0
- rapida/artifacts/protos/talk_api_pb2.py +85 -0
- rapida/artifacts/protos/talk_api_pb2_grpc.py +144 -0
- rapida/client/grpc_bridge.py +1 -1
- rapida/client/rapida_bridge.py +6 -5
- rapida/client/response_wrapper.py +63 -6
- rapida/exceptions/exceptions.py +1 -1
- rapida/rapida_client.py +11 -17
- rapida/tests/test_rapida_client.py +128 -0
- rapida/tests/test_rapida_client_options.py +67 -0
- rapida/tests/test_values.py +49 -0
- rapida/values.py +299 -0
- rapida/version.py +1 -1
- {rapida_python-0.0.5.dist-info → rapida_python-0.0.7.dist-info}/METADATA +6 -4
- rapida_python-0.0.7.dist-info/RECORD +28 -0
- {rapida_python-0.0.5.dist-info → rapida_python-0.0.7.dist-info}/WHEEL +1 -1
- {rapida_python-0.0.5.dist-info → rapida_python-0.0.7.dist-info}/top_level.txt +1 -0
- rapida/api_resources/__init__.py +0 -0
- rapida/api_resources/deployments.py +0 -549
- rapida/artifacts/protos/endpoint_service/__init__.py +0 -0
- rapida/artifacts/protos/endpoint_service/invoker_api_pb2.py +0 -76
- rapida/artifacts/protos/endpoint_service/invoker_api_pb2.pyi +0 -169
- rapida/artifacts/protos/endpoint_service/invoker_api_pb2_grpc.py +0 -171
- rapida/client.py +0 -29
- rapida/exceptions.py +0 -62
- rapida/http_client.py +0 -31
- rapida/options.py +0 -18
- rapida/tests/test_deployments.py +0 -2
- rapida/util.py +0 -53
- rapida_python-0.0.5.dist-info/RECORD +0 -29
bin/__init__.py
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: common.proto
|
|
4
|
+
# Protobuf Python Version: 4.25.0
|
|
5
|
+
"""Generated protocol buffer code."""
|
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
|
7
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
8
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
9
|
+
from google.protobuf.internal import builder as _builder
|
|
10
|
+
# @@protoc_insertion_point(imports)
|
|
11
|
+
|
|
12
|
+
_sym_db = _symbol_database.Default()
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
16
|
+
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x63ommon.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/protobuf/struct.proto\"5\n\x08\x43riteria\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\r\n\x05logic\x18\x03 \x01(\t\"J\n\x05\x45rror\x12\x15\n\terrorCode\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x14\n\x0c\x65rrorMessage\x18\x02 \x01(\t\x12\x14\n\x0chumanMessage\x18\x03 \x01(\t\"*\n\x08Paginate\x12\x0c\n\x04page\x18\x01 \x01(\r\x12\x10\n\x08pageSize\x18\x02 \x01(\r\"3\n\tPaginated\x12\x13\n\x0b\x63urrentPage\x18\x01 \x01(\r\x12\x11\n\ttotalItem\x18\x02 \x01(\r\")\n\x08Ordering\x12\x0e\n\x06\x63olumn\x18\x01 \x01(\t\x12\r\n\x05order\x18\x02 \x01(\t\"\x82\x01\n\x04User\x12\x0e\n\x02id\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\r\n\x05\x65mail\x18\x03 \x01(\t\x12\x0c\n\x04role\x18\x04 \x01(\t\x12/\n\x0b\x63reatedDate\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06status\x18\x05 \x01(\t\"\x98\x01\n\x0c\x42\x61seResponse\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12%\n\x04\x64\x61ta\x18\x03 \x03(\x0b\x32\x17.BaseResponse.DataEntry\x12\x15\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x06.Error\x1a+\n\tDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"6\n\x08Metadata\x12\x0e\n\x02id\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x0b\n\x03key\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t\"y\n\x08Variable\x12\x0e\n\x02id\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x14\n\x0c\x64\x65\x66\x61ultValue\x18\x04 \x01(\t\x12\n\n\x02in\x18\x05 \x01(\t\x12\x10\n\x08required\x18\x06 \x01(\x08\x12\r\n\x05label\x18\x07 \x01(\t\"\\\n\x16ProviderModelParameter\x12\x0e\n\x02id\x18\x01 \x01(\x04\x42\x02\x30\x01\x12#\n\x17providerModelVariableId\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05value\x18\x03 \x01(\t\"\xa9\x01\n\x08Provider\x12\x0e\n\x02id\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x11\n\thumanName\x18\x04 \x01(\t\x12\r\n\x05image\x18\x05 \x01(\t\x12\x0f\n\x07website\x18\x06 \x01(\t\x12\x0e\n\x06status\x18\x07 \x01(\t\x12\'\n\x14\x63onnectConfiguration\x18\t \x03(\x0b\x32\t.Variable\"\xc5\x01\n\x15ProviderModelVariable\x12\x0e\n\x02id\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1b\n\x0fproviderModelId\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x0b\n\x03key\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12\x14\n\x0c\x64\x65\x66\x61ultValue\x18\x06 \x01(\t\x12\x0c\n\x04type\x18\x07 \x01(\t\x12\r\n\x05place\x18\x08 \x01(\t\x12\x1c\n\tmetadatas\x18\t \x03(\x0b\x32\t.Metadata\"!\n\rModelEndpoint\x12\x10\n\x08\x65ndpoint\x18\x01 \x01(\t\"\xa8\x02\n\rProviderModel\x12\x0e\n\x02id\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x11\n\thumanName\x18\x04 \x01(\t\x12\x10\n\x08\x63\x61tegory\x18\x05 \x01(\t\x12\x0e\n\x06status\x18\x06 \x01(\t\x12\r\n\x05owner\x18\x07 \x01(\t\x12\x1b\n\x08provider\x18\x08 \x01(\x0b\x32\t.Provider\x12*\n\nparameters\x18\t \x03(\x0b\x32\x16.ProviderModelVariable\x12\x1c\n\tmetadatas\x18\n \x03(\x0b\x32\t.Metadata\x12\x16\n\nproviderId\x18\x0b \x01(\x04\x42\x02\x30\x01\x12!\n\tendpoints\x18\x0c \x03(\x0b\x32\x0e.ModelEndpoint\"\"\n\x03Tag\x12\x0e\n\x02id\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x0b\n\x03tag\x18\x02 \x03(\t\"r\n\x0cOrganization\x12\x0e\n\x02id\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x10\n\x08industry\x18\x04 \x01(\t\x12\x0f\n\x07\x63ontact\x18\x05 \x01(\t\x12\x0c\n\x04size\x18\x06 \x01(\t\":\n\x06Metric\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\"{\n\x07\x43ontent\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x63ontentType\x18\x02 \x01(\t\x12\x15\n\rcontentFormat\x18\x03 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x04 \x01(\x0c\x12%\n\x04meta\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\"3\n\x07Message\x12\x0c\n\x04role\x18\x01 \x01(\t\x12\x1a\n\x08\x63ontents\x18\x02 \x03(\x0b\x32\x08.Content\"\xe5\x04\n\tKnowledge\x12\x0e\n\x02id\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x12\n\nvisibility\x18\x04 \x01(\t\x12\x10\n\x08language\x18\x05 \x01(\t\x12$\n\x18\x65mbeddingProviderModelId\x18\x06 \x01(\x04\x42\x02\x30\x01\x12.\n\x16\x65mbeddingProviderModel\x18\x07 \x01(\x0b\x32\x0e.ProviderModel\x12\x0e\n\x06status\x18\x0c \x01(\t\x12\x15\n\tcreatedBy\x18\r \x01(\x04\x42\x02\x30\x01\x12\x1a\n\x0b\x63reatedUser\x18\x0e \x01(\x0b\x32\x05.User\x12\x15\n\tupdatedBy\x18\x0f \x01(\x04\x42\x02\x30\x01\x12\x1a\n\x0bupdatedUser\x18\x10 \x01(\x0b\x32\x05.User\x12/\n\x0b\x63reatedDate\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdatedDate\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x0eorganizationId\x18\x13 \x01(\x04\x42\x02\x30\x01\x12\x15\n\tprojectId\x18\x14 \x01(\x04\x42\x02\x30\x01\x12#\n\x0corganization\x18\x15 \x01(\x0b\x32\r.Organization\x12\x1a\n\x0cknowledgeTag\x18\x16 \x01(\x0b\x32\x04.Tag\x12\x15\n\rdocumentCount\x18\x17 \x01(\r\x12\x12\n\ntokenCount\x18\x18 \x01(\r\x12\x11\n\twordCount\x18\x19 \x01(\r\x12\x1f\n\x13\x65mbeddingProviderId\x18\x1a \x01(\x04\x42\x02\x30\x01\x42\x37Z5github.com/lexatic/web-backend/protos/lexatic-backendb\x06proto3')
|
|
20
|
+
|
|
21
|
+
_globals = globals()
|
|
22
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
23
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'common_pb2', _globals)
|
|
24
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
25
|
+
_globals['DESCRIPTOR']._options = None
|
|
26
|
+
_globals['DESCRIPTOR']._serialized_options = b'Z5github.com/lexatic/web-backend/protos/lexatic-backend'
|
|
27
|
+
_globals['_ERROR'].fields_by_name['errorCode']._options = None
|
|
28
|
+
_globals['_ERROR'].fields_by_name['errorCode']._serialized_options = b'0\001'
|
|
29
|
+
_globals['_USER'].fields_by_name['id']._options = None
|
|
30
|
+
_globals['_USER'].fields_by_name['id']._serialized_options = b'0\001'
|
|
31
|
+
_globals['_BASERESPONSE_DATAENTRY']._options = None
|
|
32
|
+
_globals['_BASERESPONSE_DATAENTRY']._serialized_options = b'8\001'
|
|
33
|
+
_globals['_METADATA'].fields_by_name['id']._options = None
|
|
34
|
+
_globals['_METADATA'].fields_by_name['id']._serialized_options = b'0\001'
|
|
35
|
+
_globals['_VARIABLE'].fields_by_name['id']._options = None
|
|
36
|
+
_globals['_VARIABLE'].fields_by_name['id']._serialized_options = b'0\001'
|
|
37
|
+
_globals['_PROVIDERMODELPARAMETER'].fields_by_name['id']._options = None
|
|
38
|
+
_globals['_PROVIDERMODELPARAMETER'].fields_by_name['id']._serialized_options = b'0\001'
|
|
39
|
+
_globals['_PROVIDERMODELPARAMETER'].fields_by_name['providerModelVariableId']._options = None
|
|
40
|
+
_globals['_PROVIDERMODELPARAMETER'].fields_by_name['providerModelVariableId']._serialized_options = b'0\001'
|
|
41
|
+
_globals['_PROVIDER'].fields_by_name['id']._options = None
|
|
42
|
+
_globals['_PROVIDER'].fields_by_name['id']._serialized_options = b'0\001'
|
|
43
|
+
_globals['_PROVIDERMODELVARIABLE'].fields_by_name['id']._options = None
|
|
44
|
+
_globals['_PROVIDERMODELVARIABLE'].fields_by_name['id']._serialized_options = b'0\001'
|
|
45
|
+
_globals['_PROVIDERMODELVARIABLE'].fields_by_name['providerModelId']._options = None
|
|
46
|
+
_globals['_PROVIDERMODELVARIABLE'].fields_by_name['providerModelId']._serialized_options = b'0\001'
|
|
47
|
+
_globals['_PROVIDERMODEL'].fields_by_name['id']._options = None
|
|
48
|
+
_globals['_PROVIDERMODEL'].fields_by_name['id']._serialized_options = b'0\001'
|
|
49
|
+
_globals['_PROVIDERMODEL'].fields_by_name['providerId']._options = None
|
|
50
|
+
_globals['_PROVIDERMODEL'].fields_by_name['providerId']._serialized_options = b'0\001'
|
|
51
|
+
_globals['_TAG'].fields_by_name['id']._options = None
|
|
52
|
+
_globals['_TAG'].fields_by_name['id']._serialized_options = b'0\001'
|
|
53
|
+
_globals['_ORGANIZATION'].fields_by_name['id']._options = None
|
|
54
|
+
_globals['_ORGANIZATION'].fields_by_name['id']._serialized_options = b'0\001'
|
|
55
|
+
_globals['_KNOWLEDGE'].fields_by_name['id']._options = None
|
|
56
|
+
_globals['_KNOWLEDGE'].fields_by_name['id']._serialized_options = b'0\001'
|
|
57
|
+
_globals['_KNOWLEDGE'].fields_by_name['embeddingProviderModelId']._options = None
|
|
58
|
+
_globals['_KNOWLEDGE'].fields_by_name['embeddingProviderModelId']._serialized_options = b'0\001'
|
|
59
|
+
_globals['_KNOWLEDGE'].fields_by_name['createdBy']._options = None
|
|
60
|
+
_globals['_KNOWLEDGE'].fields_by_name['createdBy']._serialized_options = b'0\001'
|
|
61
|
+
_globals['_KNOWLEDGE'].fields_by_name['updatedBy']._options = None
|
|
62
|
+
_globals['_KNOWLEDGE'].fields_by_name['updatedBy']._serialized_options = b'0\001'
|
|
63
|
+
_globals['_KNOWLEDGE'].fields_by_name['organizationId']._options = None
|
|
64
|
+
_globals['_KNOWLEDGE'].fields_by_name['organizationId']._serialized_options = b'0\001'
|
|
65
|
+
_globals['_KNOWLEDGE'].fields_by_name['projectId']._options = None
|
|
66
|
+
_globals['_KNOWLEDGE'].fields_by_name['projectId']._serialized_options = b'0\001'
|
|
67
|
+
_globals['_KNOWLEDGE'].fields_by_name['embeddingProviderId']._options = None
|
|
68
|
+
_globals['_KNOWLEDGE'].fields_by_name['embeddingProviderId']._serialized_options = b'0\001'
|
|
69
|
+
_globals['_CRITERIA']._serialized_start=79
|
|
70
|
+
_globals['_CRITERIA']._serialized_end=132
|
|
71
|
+
_globals['_ERROR']._serialized_start=134
|
|
72
|
+
_globals['_ERROR']._serialized_end=208
|
|
73
|
+
_globals['_PAGINATE']._serialized_start=210
|
|
74
|
+
_globals['_PAGINATE']._serialized_end=252
|
|
75
|
+
_globals['_PAGINATED']._serialized_start=254
|
|
76
|
+
_globals['_PAGINATED']._serialized_end=305
|
|
77
|
+
_globals['_ORDERING']._serialized_start=307
|
|
78
|
+
_globals['_ORDERING']._serialized_end=348
|
|
79
|
+
_globals['_USER']._serialized_start=351
|
|
80
|
+
_globals['_USER']._serialized_end=481
|
|
81
|
+
_globals['_BASERESPONSE']._serialized_start=484
|
|
82
|
+
_globals['_BASERESPONSE']._serialized_end=636
|
|
83
|
+
_globals['_BASERESPONSE_DATAENTRY']._serialized_start=593
|
|
84
|
+
_globals['_BASERESPONSE_DATAENTRY']._serialized_end=636
|
|
85
|
+
_globals['_METADATA']._serialized_start=638
|
|
86
|
+
_globals['_METADATA']._serialized_end=692
|
|
87
|
+
_globals['_VARIABLE']._serialized_start=694
|
|
88
|
+
_globals['_VARIABLE']._serialized_end=815
|
|
89
|
+
_globals['_PROVIDERMODELPARAMETER']._serialized_start=817
|
|
90
|
+
_globals['_PROVIDERMODELPARAMETER']._serialized_end=909
|
|
91
|
+
_globals['_PROVIDER']._serialized_start=912
|
|
92
|
+
_globals['_PROVIDER']._serialized_end=1081
|
|
93
|
+
_globals['_PROVIDERMODELVARIABLE']._serialized_start=1084
|
|
94
|
+
_globals['_PROVIDERMODELVARIABLE']._serialized_end=1281
|
|
95
|
+
_globals['_MODELENDPOINT']._serialized_start=1283
|
|
96
|
+
_globals['_MODELENDPOINT']._serialized_end=1316
|
|
97
|
+
_globals['_PROVIDERMODEL']._serialized_start=1319
|
|
98
|
+
_globals['_PROVIDERMODEL']._serialized_end=1615
|
|
99
|
+
_globals['_TAG']._serialized_start=1617
|
|
100
|
+
_globals['_TAG']._serialized_end=1651
|
|
101
|
+
_globals['_ORGANIZATION']._serialized_start=1653
|
|
102
|
+
_globals['_ORGANIZATION']._serialized_end=1767
|
|
103
|
+
_globals['_METRIC']._serialized_start=1769
|
|
104
|
+
_globals['_METRIC']._serialized_end=1827
|
|
105
|
+
_globals['_CONTENT']._serialized_start=1829
|
|
106
|
+
_globals['_CONTENT']._serialized_end=1952
|
|
107
|
+
_globals['_MESSAGE']._serialized_start=1954
|
|
108
|
+
_globals['_MESSAGE']._serialized_end=2005
|
|
109
|
+
_globals['_KNOWLEDGE']._serialized_start=2008
|
|
110
|
+
_globals['_KNOWLEDGE']._serialized_end=2621
|
|
111
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: invoker-api.proto
|
|
4
|
+
# Protobuf Python Version: 4.25.0
|
|
5
|
+
"""Generated protocol buffer code."""
|
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
|
7
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
8
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
9
|
+
from google.protobuf.internal import builder as _builder
|
|
10
|
+
# @@protoc_insertion_point(imports)
|
|
11
|
+
|
|
12
|
+
_sym_db = _symbol_database.Default()
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
|
16
|
+
from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2
|
|
17
|
+
import rapida.artifacts.protos.common_pb2 as common__pb2
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11invoker-api.proto\x12\x0c\x65ndpoint_api\x1a\x1cgoogle/protobuf/struct.proto\x1a\x19google/protobuf/any.proto\x1a\x0c\x63ommon.proto\"Q\n\x0cInvokerError\x12\x15\n\terrorCode\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x14\n\x0c\x65rrorMessage\x18\x02 \x01(\t\x12\x14\n\x0chumanMessage\x18\x03 \x01(\t\"=\n\x12\x45ndpointDefinition\x12\x16\n\nendpointId\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x0f\n\x07version\x18\x02 \x01(\t\"\xfc\x03\n\rInvokeRequest\x12\x32\n\x08\x65ndpoint\x18\x01 \x01(\x0b\x32 .endpoint_api.EndpointDefinition\x12\x37\n\x06\x61rgsV1\x18\x02 \x03(\x0b\x32\'.endpoint_api.InvokeRequest.ArgsV1Entry\x12;\n\x08metadata\x18\x03 \x03(\x0b\x32).endpoint_api.InvokeRequest.MetadataEntry\x12\x39\n\x07options\x18\x04 \x03(\x0b\x32(.endpoint_api.InvokeRequest.OptionsEntry\x12\x33\n\x04\x61rgs\x18\x05 \x03(\x0b\x32%.endpoint_api.InvokeRequest.ArgsEntry\x1a-\n\x0b\x41rgsV1Entry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a.\n\x0cOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x41\n\tArgsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any:\x02\x38\x01\"\xaa\x01\n\x0e\x43\x61llerResponse\x12\x11\n\trequestId\x18\x01 \x01(\x04\x12\x10\n\x08response\x18\x02 \x01(\t\x12\x11\n\ttimeTaken\x18\x03 \x01(\x04\x12\x1b\n\tresponses\x18\x04 \x03(\x0b\x32\x08.Content\x12)\n\x05\x65rror\x18\x05 \x01(\x0b\x32\x1a.endpoint_api.InvokerError\x12\x18\n\x07metrics\x18\x06 \x03(\x0b\x32\x07.Metric\"\x86\x01\n\x0eInvokeResponse\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12*\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x1c.endpoint_api.CallerResponse\x12)\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x1a.endpoint_api.InvokerError\"Q\n\rUpdateRequest\x12\x15\n\trequestId\x18\x01 \x01(\x04\x42\x02\x30\x01\x12)\n\x08metadata\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"Z\n\x0eUpdateResponse\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12)\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x1a.endpoint_api.InvokerError\"%\n\x0cProbeRequest\x12\x15\n\trequestId\x18\x01 \x01(\x04\x42\x02\x30\x01\"\x80\x01\n\rProbeResponse\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12%\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12)\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x1a.endpoint_api.InvokerError2\xd8\x01\n\nDeployment\x12\x43\n\x06Invoke\x12\x1b.endpoint_api.InvokeRequest\x1a\x1c.endpoint_api.InvokeResponse\x12\x43\n\x06Update\x12\x1b.endpoint_api.UpdateRequest\x1a\x1c.endpoint_api.UpdateResponse\x12@\n\x05Probe\x12\x1a.endpoint_api.ProbeRequest\x1a\x1b.endpoint_api.ProbeResponseB7Z5github.com/lexatic/web-backend/protos/lexatic-backendb\x06proto3')
|
|
21
|
+
|
|
22
|
+
_globals = globals()
|
|
23
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
24
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'invoker_api_pb2', _globals)
|
|
25
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
26
|
+
_globals['DESCRIPTOR']._options = None
|
|
27
|
+
_globals['DESCRIPTOR']._serialized_options = b'Z5github.com/lexatic/web-backend/protos/lexatic-backend'
|
|
28
|
+
_globals['_INVOKERERROR'].fields_by_name['errorCode']._options = None
|
|
29
|
+
_globals['_INVOKERERROR'].fields_by_name['errorCode']._serialized_options = b'0\001'
|
|
30
|
+
_globals['_ENDPOINTDEFINITION'].fields_by_name['endpointId']._options = None
|
|
31
|
+
_globals['_ENDPOINTDEFINITION'].fields_by_name['endpointId']._serialized_options = b'0\001'
|
|
32
|
+
_globals['_INVOKEREQUEST_ARGSV1ENTRY']._options = None
|
|
33
|
+
_globals['_INVOKEREQUEST_ARGSV1ENTRY']._serialized_options = b'8\001'
|
|
34
|
+
_globals['_INVOKEREQUEST_METADATAENTRY']._options = None
|
|
35
|
+
_globals['_INVOKEREQUEST_METADATAENTRY']._serialized_options = b'8\001'
|
|
36
|
+
_globals['_INVOKEREQUEST_OPTIONSENTRY']._options = None
|
|
37
|
+
_globals['_INVOKEREQUEST_OPTIONSENTRY']._serialized_options = b'8\001'
|
|
38
|
+
_globals['_INVOKEREQUEST_ARGSENTRY']._options = None
|
|
39
|
+
_globals['_INVOKEREQUEST_ARGSENTRY']._serialized_options = b'8\001'
|
|
40
|
+
_globals['_UPDATEREQUEST'].fields_by_name['requestId']._options = None
|
|
41
|
+
_globals['_UPDATEREQUEST'].fields_by_name['requestId']._serialized_options = b'0\001'
|
|
42
|
+
_globals['_PROBEREQUEST'].fields_by_name['requestId']._options = None
|
|
43
|
+
_globals['_PROBEREQUEST'].fields_by_name['requestId']._serialized_options = b'0\001'
|
|
44
|
+
_globals['_INVOKERERROR']._serialized_start=106
|
|
45
|
+
_globals['_INVOKERERROR']._serialized_end=187
|
|
46
|
+
_globals['_ENDPOINTDEFINITION']._serialized_start=189
|
|
47
|
+
_globals['_ENDPOINTDEFINITION']._serialized_end=250
|
|
48
|
+
_globals['_INVOKEREQUEST']._serialized_start=253
|
|
49
|
+
_globals['_INVOKEREQUEST']._serialized_end=761
|
|
50
|
+
_globals['_INVOKEREQUEST_ARGSV1ENTRY']._serialized_start=552
|
|
51
|
+
_globals['_INVOKEREQUEST_ARGSV1ENTRY']._serialized_end=597
|
|
52
|
+
_globals['_INVOKEREQUEST_METADATAENTRY']._serialized_start=599
|
|
53
|
+
_globals['_INVOKEREQUEST_METADATAENTRY']._serialized_end=646
|
|
54
|
+
_globals['_INVOKEREQUEST_OPTIONSENTRY']._serialized_start=648
|
|
55
|
+
_globals['_INVOKEREQUEST_OPTIONSENTRY']._serialized_end=694
|
|
56
|
+
_globals['_INVOKEREQUEST_ARGSENTRY']._serialized_start=696
|
|
57
|
+
_globals['_INVOKEREQUEST_ARGSENTRY']._serialized_end=761
|
|
58
|
+
_globals['_CALLERRESPONSE']._serialized_start=764
|
|
59
|
+
_globals['_CALLERRESPONSE']._serialized_end=934
|
|
60
|
+
_globals['_INVOKERESPONSE']._serialized_start=937
|
|
61
|
+
_globals['_INVOKERESPONSE']._serialized_end=1071
|
|
62
|
+
_globals['_UPDATEREQUEST']._serialized_start=1073
|
|
63
|
+
_globals['_UPDATEREQUEST']._serialized_end=1154
|
|
64
|
+
_globals['_UPDATERESPONSE']._serialized_start=1156
|
|
65
|
+
_globals['_UPDATERESPONSE']._serialized_end=1246
|
|
66
|
+
_globals['_PROBEREQUEST']._serialized_start=1248
|
|
67
|
+
_globals['_PROBEREQUEST']._serialized_end=1285
|
|
68
|
+
_globals['_PROBERESPONSE']._serialized_start=1288
|
|
69
|
+
_globals['_PROBERESPONSE']._serialized_end=1416
|
|
70
|
+
_globals['_DEPLOYMENT']._serialized_start=1419
|
|
71
|
+
_globals['_DEPLOYMENT']._serialized_end=1635
|
|
72
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,133 @@
|
|
|
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
|
+
|
|
5
|
+
import rapida.artifacts.protos.common_pb2 as common__pb2
|
|
6
|
+
import rapida.artifacts.protos.invoker_api_pb2 as invoker__api__pb2
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DeploymentStub(object):
|
|
10
|
+
"""Missing associated documentation comment in .proto file."""
|
|
11
|
+
|
|
12
|
+
def __init__(self, channel):
|
|
13
|
+
"""Constructor.
|
|
14
|
+
|
|
15
|
+
Args:
|
|
16
|
+
channel: A grpc.Channel.
|
|
17
|
+
"""
|
|
18
|
+
self.Invoke = channel.unary_unary(
|
|
19
|
+
'/endpoint_api.Deployment/Invoke',
|
|
20
|
+
request_serializer=invoker__api__pb2.InvokeRequest.SerializeToString,
|
|
21
|
+
response_deserializer=invoker__api__pb2.InvokeResponse.FromString,
|
|
22
|
+
)
|
|
23
|
+
self.Update = channel.unary_unary(
|
|
24
|
+
'/endpoint_api.Deployment/Update',
|
|
25
|
+
request_serializer=invoker__api__pb2.UpdateRequest.SerializeToString,
|
|
26
|
+
response_deserializer=invoker__api__pb2.UpdateResponse.FromString,
|
|
27
|
+
)
|
|
28
|
+
self.Probe = channel.unary_unary(
|
|
29
|
+
'/endpoint_api.Deployment/Probe',
|
|
30
|
+
request_serializer=invoker__api__pb2.ProbeRequest.SerializeToString,
|
|
31
|
+
response_deserializer=invoker__api__pb2.ProbeResponse.FromString,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class DeploymentServicer(object):
|
|
36
|
+
"""Missing associated documentation comment in .proto file."""
|
|
37
|
+
|
|
38
|
+
def Invoke(self, request, context):
|
|
39
|
+
"""Missing associated documentation comment in .proto file."""
|
|
40
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
41
|
+
context.set_details('Method not implemented!')
|
|
42
|
+
raise NotImplementedError('Method not implemented!')
|
|
43
|
+
|
|
44
|
+
def Update(self, request, context):
|
|
45
|
+
"""Missing associated documentation comment in .proto file."""
|
|
46
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
47
|
+
context.set_details('Method not implemented!')
|
|
48
|
+
raise NotImplementedError('Method not implemented!')
|
|
49
|
+
|
|
50
|
+
def Probe(self, request, context):
|
|
51
|
+
"""Missing associated documentation comment in .proto file."""
|
|
52
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
53
|
+
context.set_details('Method not implemented!')
|
|
54
|
+
raise NotImplementedError('Method not implemented!')
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def add_DeploymentServicer_to_server(servicer, server):
|
|
58
|
+
rpc_method_handlers = {
|
|
59
|
+
'Invoke': grpc.unary_unary_rpc_method_handler(
|
|
60
|
+
servicer.Invoke,
|
|
61
|
+
request_deserializer=invoker__api__pb2.InvokeRequest.FromString,
|
|
62
|
+
response_serializer=invoker__api__pb2.InvokeResponse.SerializeToString,
|
|
63
|
+
),
|
|
64
|
+
'Update': grpc.unary_unary_rpc_method_handler(
|
|
65
|
+
servicer.Update,
|
|
66
|
+
request_deserializer=invoker__api__pb2.UpdateRequest.FromString,
|
|
67
|
+
response_serializer=invoker__api__pb2.UpdateResponse.SerializeToString,
|
|
68
|
+
),
|
|
69
|
+
'Probe': grpc.unary_unary_rpc_method_handler(
|
|
70
|
+
servicer.Probe,
|
|
71
|
+
request_deserializer=invoker__api__pb2.ProbeRequest.FromString,
|
|
72
|
+
response_serializer=invoker__api__pb2.ProbeResponse.SerializeToString,
|
|
73
|
+
),
|
|
74
|
+
}
|
|
75
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
76
|
+
'endpoint_api.Deployment', rpc_method_handlers)
|
|
77
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
# This class is part of an EXPERIMENTAL API.
|
|
81
|
+
class Deployment(object):
|
|
82
|
+
"""Missing associated documentation comment in .proto file."""
|
|
83
|
+
|
|
84
|
+
@staticmethod
|
|
85
|
+
def Invoke(request,
|
|
86
|
+
target,
|
|
87
|
+
options=(),
|
|
88
|
+
channel_credentials=None,
|
|
89
|
+
call_credentials=None,
|
|
90
|
+
insecure=False,
|
|
91
|
+
compression=None,
|
|
92
|
+
wait_for_ready=None,
|
|
93
|
+
timeout=None,
|
|
94
|
+
metadata=None):
|
|
95
|
+
return grpc.experimental.unary_unary(request, target, '/endpoint_api.Deployment/Invoke',
|
|
96
|
+
invoker__api__pb2.InvokeRequest.SerializeToString,
|
|
97
|
+
invoker__api__pb2.InvokeResponse.FromString,
|
|
98
|
+
options, channel_credentials,
|
|
99
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
100
|
+
|
|
101
|
+
@staticmethod
|
|
102
|
+
def Update(request,
|
|
103
|
+
target,
|
|
104
|
+
options=(),
|
|
105
|
+
channel_credentials=None,
|
|
106
|
+
call_credentials=None,
|
|
107
|
+
insecure=False,
|
|
108
|
+
compression=None,
|
|
109
|
+
wait_for_ready=None,
|
|
110
|
+
timeout=None,
|
|
111
|
+
metadata=None):
|
|
112
|
+
return grpc.experimental.unary_unary(request, target, '/endpoint_api.Deployment/Update',
|
|
113
|
+
invoker__api__pb2.UpdateRequest.SerializeToString,
|
|
114
|
+
invoker__api__pb2.UpdateResponse.FromString,
|
|
115
|
+
options, channel_credentials,
|
|
116
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
117
|
+
|
|
118
|
+
@staticmethod
|
|
119
|
+
def Probe(request,
|
|
120
|
+
target,
|
|
121
|
+
options=(),
|
|
122
|
+
channel_credentials=None,
|
|
123
|
+
call_credentials=None,
|
|
124
|
+
insecure=False,
|
|
125
|
+
compression=None,
|
|
126
|
+
wait_for_ready=None,
|
|
127
|
+
timeout=None,
|
|
128
|
+
metadata=None):
|
|
129
|
+
return grpc.experimental.unary_unary(request, target, '/endpoint_api.Deployment/Probe',
|
|
130
|
+
invoker__api__pb2.ProbeRequest.SerializeToString,
|
|
131
|
+
invoker__api__pb2.ProbeResponse.FromString,
|
|
132
|
+
options, channel_credentials,
|
|
133
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: talk-api.proto
|
|
4
|
+
# Protobuf Python Version: 4.25.0
|
|
5
|
+
"""Generated protocol buffer code."""
|
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
|
7
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
8
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
9
|
+
from google.protobuf.internal import builder as _builder
|
|
10
|
+
# @@protoc_insertion_point(imports)
|
|
11
|
+
|
|
12
|
+
_sym_db = _symbol_database.Default()
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
16
|
+
import rapida.artifacts.protos.common_pb2 as common__pb2
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0etalk-api.proto\x12\x08talk_api\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x0c\x63ommon.proto\"\xdf\x03\n\x1d\x41ssistantConversactionMessage\x12\x0e\n\x02id\x18\x01 \x01(\x04\x42\x02\x30\x01\x12$\n\x18\x61ssistantConversactionId\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x13\n\x0brequestRole\x18\x04 \x01(\t\x12\x19\n\x07request\x18\x05 \x01(\x0b\x32\x08.Message\x12\x14\n\x0cresponseRole\x18\x06 \x01(\t\x12\x1a\n\x08response\x18\x07 \x01(\x0b\x32\x08.Message\x12\x17\n\x0f\x65xternalAuditId\x18\x08 \x01(\x04\x12\x0e\n\x06source\x18\t \x01(\t\x12\x18\n\x07metrics\x18\n \x03(\x0b\x32\x07.Metric\x12\x0e\n\x06status\x18\x0b \x01(\t\x12\x11\n\tcreatedBy\x18\x0c \x01(\x04\x12\x11\n\tupdatedBy\x18\r \x01(\x04\x12\x1a\n\x12suggestedQuestions\x18\x0e \x03(\t\x12/\n\x06stages\x18\x0f \x03(\x0b\x32\x1f.talk_api.AssistantMessageStage\x12/\n\x0b\x63reatedDate\x18\x1a \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdatedDate\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x9f\x01\n\x1d\x43reateAssistantMessageRequest\x12\x17\n\x0b\x61ssistantId\x18\x01 \x01(\x04\x42\x02\x30\x01\x12$\n\x18\x61ssistantProviderModelId\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x19\n\x07message\x18\x03 \x01(\x0b\x32\x08.Message\x12$\n\x18\x61ssistantConversactionId\x18\x04 \x01(\x04\x42\x02\x30\x01\"\xd1\x01\n\x15\x41ssistantMessageStage\x12!\n\x05stage\x18\x01 \x01(\x0e\x32\x12.talk_api.RAGStage\x12K\n\x0e\x61\x64\x64itionalData\x18\x02 \x03(\x0b\x32\x33.talk_api.AssistantMessageStage.AdditionalDataEntry\x12\x11\n\ttimetaken\x18\x03 \x01(\x04\x1a\x35\n\x13\x41\x64\x64itionalDataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8d\x01\n\x1e\x43reateAssistantMessageResponse\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12\x35\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\'.talk_api.AssistantConversactionMessage\x12\x15\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x06.Error\"\xc1\x03\n\x16\x41ssistantConversaction\x12\x0e\n\x02id\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x12\n\x06userId\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x17\n\x0b\x61ssistantId\x18\x03 \x01(\x04\x42\x02\x30\x01\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\x15\n\tprojectId\x18\x05 \x01(\x04\x42\x02\x30\x01\x12\x1a\n\x0eorganizationId\x18\x06 \x01(\x04\x42\x02\x30\x01\x12\x0e\n\x06source\x18\x07 \x01(\t\x12\x15\n\tcreatedBy\x18\x08 \x01(\x04\x42\x02\x30\x01\x12\x15\n\tupdatedBy\x18\t \x01(\x04\x42\x02\x30\x01\x12\x13\n\x04user\x18\n \x01(\x0b\x32\x05.User\x12$\n\x18\x61ssistantProviderModelId\x18\x0c \x01(\x04\x42\x02\x30\x01\x12N\n\x1d\x61ssistantConversactionMessage\x18\r \x03(\x0b\x32\'.talk_api.AssistantConversactionMessage\x12/\n\x0b\x63reatedDate\x18\x1a \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdatedDate\x18\x1b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"y\n#GetAllAssistantConversactionRequest\x12\x17\n\x0b\x61ssistantId\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1b\n\x08paginate\x18\x02 \x01(\x0b\x32\t.Paginate\x12\x1c\n\tcriterias\x18\x03 \x03(\x0b\x32\t.Criteria\"\xab\x01\n$GetAllAssistantConversactionResponse\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12.\n\x04\x64\x61ta\x18\x03 \x03(\x0b\x32 .talk_api.AssistantConversaction\x12\x15\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x06.Error\x12\x1d\n\tpaginated\x18\x05 \x01(\x0b\x32\n.Paginated\"\xb7\x01\n!GetAllConversactionMessageRequest\x12\x17\n\x0b\x61ssistantId\x18\x01 \x01(\x04\x42\x02\x30\x01\x12$\n\x18\x61ssistantConversactionId\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x1b\n\x08paginate\x18\x03 \x01(\x0b\x32\t.Paginate\x12\x1c\n\tcriterias\x18\x04 \x03(\x0b\x32\t.Criteria\x12\x18\n\x05order\x18\x05 \x01(\x0b\x32\t.Ordering\"\xb0\x01\n\"GetAllConversactionMessageResponse\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x05\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12\x35\n\x04\x64\x61ta\x18\x03 \x03(\x0b\x32\'.talk_api.AssistantConversactionMessage\x12\x15\n\x05\x65rror\x18\x04 \x01(\x0b\x32\x06.Error\x12\x1d\n\tpaginated\x18\x05 \x01(\x0b\x32\n.Paginated*\xaf\x01\n\x08RAGStage\x12\x13\n\x0fUNDEFINED_STAGE\x10\x00\x12\x15\n\x11QUERY_FORMULATION\x10\x01\x12\x19\n\x15INFORMATION_RETRIEVAL\x10\x02\x12\x16\n\x12\x44OCUMENT_RETRIEVAL\x10\x03\x12\x18\n\x14\x43ONTEXT_AUGMENTATION\x10\x04\x12\x13\n\x0fTEXT_GENERATION\x10\x05\x12\x15\n\x11OUTPUT_EVALUATION\x10\x06\x32\xf4\x02\n\x0bTalkService\x12m\n\x16\x43reateAssistantMessage\x12\'.talk_api.CreateAssistantMessageRequest\x1a(.talk_api.CreateAssistantMessageResponse0\x01\x12}\n\x1cGetAllAssistantConversaction\x12-.talk_api.GetAllAssistantConversactionRequest\x1a..talk_api.GetAllAssistantConversactionResponse\x12w\n\x1aGetAllConversactionMessage\x12+.talk_api.GetAllConversactionMessageRequest\x1a,.talk_api.GetAllConversactionMessageResponseB7Z5github.com/lexatic/web-backend/protos/lexatic-backendb\x06proto3')
|
|
20
|
+
|
|
21
|
+
_globals = globals()
|
|
22
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
23
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'talk_api_pb2', _globals)
|
|
24
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
25
|
+
_globals['DESCRIPTOR']._options = None
|
|
26
|
+
_globals['DESCRIPTOR']._serialized_options = b'Z5github.com/lexatic/web-backend/protos/lexatic-backend'
|
|
27
|
+
_globals['_ASSISTANTCONVERSACTIONMESSAGE'].fields_by_name['id']._options = None
|
|
28
|
+
_globals['_ASSISTANTCONVERSACTIONMESSAGE'].fields_by_name['id']._serialized_options = b'0\001'
|
|
29
|
+
_globals['_ASSISTANTCONVERSACTIONMESSAGE'].fields_by_name['assistantConversactionId']._options = None
|
|
30
|
+
_globals['_ASSISTANTCONVERSACTIONMESSAGE'].fields_by_name['assistantConversactionId']._serialized_options = b'0\001'
|
|
31
|
+
_globals['_CREATEASSISTANTMESSAGEREQUEST'].fields_by_name['assistantId']._options = None
|
|
32
|
+
_globals['_CREATEASSISTANTMESSAGEREQUEST'].fields_by_name['assistantId']._serialized_options = b'0\001'
|
|
33
|
+
_globals['_CREATEASSISTANTMESSAGEREQUEST'].fields_by_name['assistantProviderModelId']._options = None
|
|
34
|
+
_globals['_CREATEASSISTANTMESSAGEREQUEST'].fields_by_name['assistantProviderModelId']._serialized_options = b'0\001'
|
|
35
|
+
_globals['_CREATEASSISTANTMESSAGEREQUEST'].fields_by_name['assistantConversactionId']._options = None
|
|
36
|
+
_globals['_CREATEASSISTANTMESSAGEREQUEST'].fields_by_name['assistantConversactionId']._serialized_options = b'0\001'
|
|
37
|
+
_globals['_ASSISTANTMESSAGESTAGE_ADDITIONALDATAENTRY']._options = None
|
|
38
|
+
_globals['_ASSISTANTMESSAGESTAGE_ADDITIONALDATAENTRY']._serialized_options = b'8\001'
|
|
39
|
+
_globals['_ASSISTANTCONVERSACTION'].fields_by_name['id']._options = None
|
|
40
|
+
_globals['_ASSISTANTCONVERSACTION'].fields_by_name['id']._serialized_options = b'0\001'
|
|
41
|
+
_globals['_ASSISTANTCONVERSACTION'].fields_by_name['userId']._options = None
|
|
42
|
+
_globals['_ASSISTANTCONVERSACTION'].fields_by_name['userId']._serialized_options = b'0\001'
|
|
43
|
+
_globals['_ASSISTANTCONVERSACTION'].fields_by_name['assistantId']._options = None
|
|
44
|
+
_globals['_ASSISTANTCONVERSACTION'].fields_by_name['assistantId']._serialized_options = b'0\001'
|
|
45
|
+
_globals['_ASSISTANTCONVERSACTION'].fields_by_name['projectId']._options = None
|
|
46
|
+
_globals['_ASSISTANTCONVERSACTION'].fields_by_name['projectId']._serialized_options = b'0\001'
|
|
47
|
+
_globals['_ASSISTANTCONVERSACTION'].fields_by_name['organizationId']._options = None
|
|
48
|
+
_globals['_ASSISTANTCONVERSACTION'].fields_by_name['organizationId']._serialized_options = b'0\001'
|
|
49
|
+
_globals['_ASSISTANTCONVERSACTION'].fields_by_name['createdBy']._options = None
|
|
50
|
+
_globals['_ASSISTANTCONVERSACTION'].fields_by_name['createdBy']._serialized_options = b'0\001'
|
|
51
|
+
_globals['_ASSISTANTCONVERSACTION'].fields_by_name['updatedBy']._options = None
|
|
52
|
+
_globals['_ASSISTANTCONVERSACTION'].fields_by_name['updatedBy']._serialized_options = b'0\001'
|
|
53
|
+
_globals['_ASSISTANTCONVERSACTION'].fields_by_name['assistantProviderModelId']._options = None
|
|
54
|
+
_globals['_ASSISTANTCONVERSACTION'].fields_by_name['assistantProviderModelId']._serialized_options = b'0\001'
|
|
55
|
+
_globals['_GETALLASSISTANTCONVERSACTIONREQUEST'].fields_by_name['assistantId']._options = None
|
|
56
|
+
_globals['_GETALLASSISTANTCONVERSACTIONREQUEST'].fields_by_name['assistantId']._serialized_options = b'0\001'
|
|
57
|
+
_globals['_GETALLCONVERSACTIONMESSAGEREQUEST'].fields_by_name['assistantId']._options = None
|
|
58
|
+
_globals['_GETALLCONVERSACTIONMESSAGEREQUEST'].fields_by_name['assistantId']._serialized_options = b'0\001'
|
|
59
|
+
_globals['_GETALLCONVERSACTIONMESSAGEREQUEST'].fields_by_name['assistantConversactionId']._options = None
|
|
60
|
+
_globals['_GETALLCONVERSACTIONMESSAGEREQUEST'].fields_by_name['assistantConversactionId']._serialized_options = b'0\001'
|
|
61
|
+
_globals['_RAGSTAGE']._serialized_start=2190
|
|
62
|
+
_globals['_RAGSTAGE']._serialized_end=2365
|
|
63
|
+
_globals['_ASSISTANTCONVERSACTIONMESSAGE']._serialized_start=76
|
|
64
|
+
_globals['_ASSISTANTCONVERSACTIONMESSAGE']._serialized_end=555
|
|
65
|
+
_globals['_CREATEASSISTANTMESSAGEREQUEST']._serialized_start=558
|
|
66
|
+
_globals['_CREATEASSISTANTMESSAGEREQUEST']._serialized_end=717
|
|
67
|
+
_globals['_ASSISTANTMESSAGESTAGE']._serialized_start=720
|
|
68
|
+
_globals['_ASSISTANTMESSAGESTAGE']._serialized_end=929
|
|
69
|
+
_globals['_ASSISTANTMESSAGESTAGE_ADDITIONALDATAENTRY']._serialized_start=876
|
|
70
|
+
_globals['_ASSISTANTMESSAGESTAGE_ADDITIONALDATAENTRY']._serialized_end=929
|
|
71
|
+
_globals['_CREATEASSISTANTMESSAGERESPONSE']._serialized_start=932
|
|
72
|
+
_globals['_CREATEASSISTANTMESSAGERESPONSE']._serialized_end=1073
|
|
73
|
+
_globals['_ASSISTANTCONVERSACTION']._serialized_start=1076
|
|
74
|
+
_globals['_ASSISTANTCONVERSACTION']._serialized_end=1525
|
|
75
|
+
_globals['_GETALLASSISTANTCONVERSACTIONREQUEST']._serialized_start=1527
|
|
76
|
+
_globals['_GETALLASSISTANTCONVERSACTIONREQUEST']._serialized_end=1648
|
|
77
|
+
_globals['_GETALLASSISTANTCONVERSACTIONRESPONSE']._serialized_start=1651
|
|
78
|
+
_globals['_GETALLASSISTANTCONVERSACTIONRESPONSE']._serialized_end=1822
|
|
79
|
+
_globals['_GETALLCONVERSACTIONMESSAGEREQUEST']._serialized_start=1825
|
|
80
|
+
_globals['_GETALLCONVERSACTIONMESSAGEREQUEST']._serialized_end=2008
|
|
81
|
+
_globals['_GETALLCONVERSACTIONMESSAGERESPONSE']._serialized_start=2011
|
|
82
|
+
_globals['_GETALLCONVERSACTIONMESSAGERESPONSE']._serialized_end=2187
|
|
83
|
+
_globals['_TALKSERVICE']._serialized_start=2368
|
|
84
|
+
_globals['_TALKSERVICE']._serialized_end=2740
|
|
85
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,144 @@
|
|
|
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
|
+
|
|
5
|
+
import rapida.artifacts.protos.talk_api_pb2 as talk__api__pb2
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class TalkServiceStub(object):
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
def __init__(self, channel):
|
|
16
|
+
"""Constructor.
|
|
17
|
+
|
|
18
|
+
Args:
|
|
19
|
+
channel: A grpc.Channel.
|
|
20
|
+
"""
|
|
21
|
+
self.CreateAssistantMessage = channel.unary_stream(
|
|
22
|
+
'/talk_api.TalkService/CreateAssistantMessage',
|
|
23
|
+
request_serializer=talk__api__pb2.CreateAssistantMessageRequest.SerializeToString,
|
|
24
|
+
response_deserializer=talk__api__pb2.CreateAssistantMessageResponse.FromString,
|
|
25
|
+
)
|
|
26
|
+
self.GetAllAssistantConversaction = channel.unary_unary(
|
|
27
|
+
'/talk_api.TalkService/GetAllAssistantConversaction',
|
|
28
|
+
request_serializer=talk__api__pb2.GetAllAssistantConversactionRequest.SerializeToString,
|
|
29
|
+
response_deserializer=talk__api__pb2.GetAllAssistantConversactionResponse.FromString,
|
|
30
|
+
)
|
|
31
|
+
self.GetAllConversactionMessage = channel.unary_unary(
|
|
32
|
+
'/talk_api.TalkService/GetAllConversactionMessage',
|
|
33
|
+
request_serializer=talk__api__pb2.GetAllConversactionMessageRequest.SerializeToString,
|
|
34
|
+
response_deserializer=talk__api__pb2.GetAllConversactionMessageResponse.FromString,
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class TalkServiceServicer(object):
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
def CreateAssistantMessage(self, request, context):
|
|
46
|
+
"""Missing associated documentation comment in .proto file."""
|
|
47
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
48
|
+
context.set_details('Method not implemented!')
|
|
49
|
+
raise NotImplementedError('Method not implemented!')
|
|
50
|
+
|
|
51
|
+
def GetAllAssistantConversaction(self, request, context):
|
|
52
|
+
"""Missing associated documentation comment in .proto file."""
|
|
53
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
54
|
+
context.set_details('Method not implemented!')
|
|
55
|
+
raise NotImplementedError('Method not implemented!')
|
|
56
|
+
|
|
57
|
+
def GetAllConversactionMessage(self, request, context):
|
|
58
|
+
"""Missing associated documentation comment in .proto file."""
|
|
59
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
60
|
+
context.set_details('Method not implemented!')
|
|
61
|
+
raise NotImplementedError('Method not implemented!')
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def add_TalkServiceServicer_to_server(servicer, server):
|
|
65
|
+
rpc_method_handlers = {
|
|
66
|
+
'CreateAssistantMessage': grpc.unary_stream_rpc_method_handler(
|
|
67
|
+
servicer.CreateAssistantMessage,
|
|
68
|
+
request_deserializer=talk__api__pb2.CreateAssistantMessageRequest.FromString,
|
|
69
|
+
response_serializer=talk__api__pb2.CreateAssistantMessageResponse.SerializeToString,
|
|
70
|
+
),
|
|
71
|
+
'GetAllAssistantConversaction': grpc.unary_unary_rpc_method_handler(
|
|
72
|
+
servicer.GetAllAssistantConversaction,
|
|
73
|
+
request_deserializer=talk__api__pb2.GetAllAssistantConversactionRequest.FromString,
|
|
74
|
+
response_serializer=talk__api__pb2.GetAllAssistantConversactionResponse.SerializeToString,
|
|
75
|
+
),
|
|
76
|
+
'GetAllConversactionMessage': grpc.unary_unary_rpc_method_handler(
|
|
77
|
+
servicer.GetAllConversactionMessage,
|
|
78
|
+
request_deserializer=talk__api__pb2.GetAllConversactionMessageRequest.FromString,
|
|
79
|
+
response_serializer=talk__api__pb2.GetAllConversactionMessageResponse.SerializeToString,
|
|
80
|
+
),
|
|
81
|
+
}
|
|
82
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
83
|
+
'talk_api.TalkService', rpc_method_handlers)
|
|
84
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
# This class is part of an EXPERIMENTAL API.
|
|
88
|
+
class TalkService(object):
|
|
89
|
+
"""
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
"""
|
|
94
|
+
|
|
95
|
+
@staticmethod
|
|
96
|
+
def CreateAssistantMessage(request,
|
|
97
|
+
target,
|
|
98
|
+
options=(),
|
|
99
|
+
channel_credentials=None,
|
|
100
|
+
call_credentials=None,
|
|
101
|
+
insecure=False,
|
|
102
|
+
compression=None,
|
|
103
|
+
wait_for_ready=None,
|
|
104
|
+
timeout=None,
|
|
105
|
+
metadata=None):
|
|
106
|
+
return grpc.experimental.unary_stream(request, target, '/talk_api.TalkService/CreateAssistantMessage',
|
|
107
|
+
talk__api__pb2.CreateAssistantMessageRequest.SerializeToString,
|
|
108
|
+
talk__api__pb2.CreateAssistantMessageResponse.FromString,
|
|
109
|
+
options, channel_credentials,
|
|
110
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
111
|
+
|
|
112
|
+
@staticmethod
|
|
113
|
+
def GetAllAssistantConversaction(request,
|
|
114
|
+
target,
|
|
115
|
+
options=(),
|
|
116
|
+
channel_credentials=None,
|
|
117
|
+
call_credentials=None,
|
|
118
|
+
insecure=False,
|
|
119
|
+
compression=None,
|
|
120
|
+
wait_for_ready=None,
|
|
121
|
+
timeout=None,
|
|
122
|
+
metadata=None):
|
|
123
|
+
return grpc.experimental.unary_unary(request, target, '/talk_api.TalkService/GetAllAssistantConversaction',
|
|
124
|
+
talk__api__pb2.GetAllAssistantConversactionRequest.SerializeToString,
|
|
125
|
+
talk__api__pb2.GetAllAssistantConversactionResponse.FromString,
|
|
126
|
+
options, channel_credentials,
|
|
127
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
128
|
+
|
|
129
|
+
@staticmethod
|
|
130
|
+
def GetAllConversactionMessage(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(request, target, '/talk_api.TalkService/GetAllConversactionMessage',
|
|
141
|
+
talk__api__pb2.GetAllConversactionMessageRequest.SerializeToString,
|
|
142
|
+
talk__api__pb2.GetAllConversactionMessageResponse.FromString,
|
|
143
|
+
options, channel_credentials,
|
|
144
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
rapida/client/grpc_bridge.py
CHANGED
|
@@ -15,8 +15,8 @@ from typing import Any, Dict
|
|
|
15
15
|
|
|
16
16
|
import grpc
|
|
17
17
|
from google.protobuf.json_format import MessageToDict
|
|
18
|
-
from google.protobuf.message import Message
|
|
19
18
|
from grpc import aio as grpc_aio
|
|
19
|
+
from google.protobuf.message import Message
|
|
20
20
|
from grpc.aio import Metadata
|
|
21
21
|
from grpc.aio._channel import UnaryUnaryMultiCallable
|
|
22
22
|
|
rapida/client/rapida_bridge.py
CHANGED
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
author: prashant.srivastav
|
|
3
3
|
"""
|
|
4
4
|
import logging
|
|
5
|
-
from typing import Dict, Optional
|
|
5
|
+
from typing import Dict, Optional, Mapping
|
|
6
6
|
from google.protobuf.json_format import ParseDict
|
|
7
|
-
from
|
|
7
|
+
from google.protobuf.any_pb2 import Any
|
|
8
|
+
|
|
8
9
|
|
|
9
|
-
from rapida.
|
|
10
|
+
from rapida.client.response_wrapper import InvokeResponseWrapper
|
|
11
|
+
from rapida.artifacts.protos import (
|
|
10
12
|
invoker_api_pb2,
|
|
11
13
|
invoker_api_pb2_grpc,
|
|
12
14
|
)
|
|
@@ -44,7 +46,7 @@ class RapidaBridge(GRPCBridge):
|
|
|
44
46
|
self,
|
|
45
47
|
endpoint_id: int,
|
|
46
48
|
version: str,
|
|
47
|
-
body_params:
|
|
49
|
+
body_params: Mapping[str, Any],
|
|
48
50
|
metadata: Optional[Dict[str, str]],
|
|
49
51
|
override_options: Optional[Dict[str, str]],
|
|
50
52
|
) -> InvokeResponseWrapper:
|
|
@@ -72,7 +74,6 @@ class RapidaBridge(GRPCBridge):
|
|
|
72
74
|
options=override_options,
|
|
73
75
|
),
|
|
74
76
|
preserving_proto_field_name=True,
|
|
75
|
-
# including_default_value_fields=True,
|
|
76
77
|
)
|
|
77
78
|
|
|
78
79
|
return InvokeResponseWrapper(
|