rapida-python 0.1.8__py3-none-any.whl → 0.1.9__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.
@@ -0,0 +1,192 @@
1
+ from typing import Union
2
+ from rapida.clients.protos.assistant_knowledge_pb2 import (
3
+ GetAllAssistantKnowledgeRequest,
4
+ GetAllAssistantKnowledgeResponse,
5
+ GetAssistantKnowledgeRequest,
6
+ GetAssistantKnowledgeResponse,
7
+ )
8
+
9
+ from rapida.clients.protos.common_pb2 import (
10
+ GetAllAssistantConversationRequest,
11
+ GetAllAssistantConversationResponse,
12
+ )
13
+ from rapida.clients.protos.assistant_webhook_pb2 import (
14
+ GetAllAssistantWebhookLogRequest,
15
+ GetAllAssistantWebhookLogResponse,
16
+ GetAllAssistantWebhookRequest,
17
+ GetAllAssistantWebhookResponse,
18
+ GetAssistantWebhookLogRequest,
19
+ GetAssistantWebhookLogResponse,
20
+ GetAssistantWebhookRequest,
21
+ GetAssistantWebhookResponse,
22
+ )
23
+ from rapida.clients.protos.assistant_tool_pb2 import (
24
+ GetAllAssistantToolRequest,
25
+ GetAllAssistantToolResponse,
26
+ GetAssistantToolRequest,
27
+ GetAssistantToolResponse,
28
+ )
29
+ from rapida.clients.protos.assistant_api_pb2 import (
30
+ GetAllAssistantRequest,
31
+ GetAllAssistantResponse,
32
+ GetAssistantConversationRequest,
33
+ GetAssistantConversationResponse,
34
+ )
35
+ from rapida.clients.protos.talk_api_pb2 import GetAssistantRequest, GetAssistantResponse
36
+ from rapida.connections import ConnectionConfig, UserAuthInfo, ClientAuthInfo
37
+
38
+
39
+ def get_assistant(
40
+ client_cfg: ConnectionConfig,
41
+ request: GetAssistantRequest,
42
+ auth: Union[UserAuthInfo, ClientAuthInfo, None],
43
+ ) -> GetAssistantResponse:
44
+ if auth is None:
45
+ auth = client_cfg.auth
46
+ return client_cfg.assistant_client.GetAssistant(
47
+ request,
48
+ metadata=auth,
49
+ )
50
+
51
+
52
+ def get_all_assistant(
53
+ client_cfg: ConnectionConfig,
54
+ request: GetAllAssistantRequest,
55
+ auth: Union[UserAuthInfo, ClientAuthInfo, None],
56
+ ) -> GetAllAssistantResponse:
57
+ if auth is None:
58
+ auth = client_cfg.auth
59
+ return client_cfg.assistant_client.GetAllAssistant(
60
+ request,
61
+ metadata=auth,
62
+ )
63
+
64
+
65
+ def get_assistant_conversation(
66
+ client_cfg: ConnectionConfig,
67
+ request: GetAssistantConversationRequest,
68
+ auth: Union[UserAuthInfo, ClientAuthInfo, None],
69
+ ) -> GetAssistantConversationResponse:
70
+ if auth is None:
71
+ auth = client_cfg.auth
72
+ return client_cfg.assistant_client.GetAssistantConversation(
73
+ request,
74
+ metadata=auth,
75
+ )
76
+
77
+
78
+ def get_all_assistant_conversation(
79
+ client_cfg: ConnectionConfig,
80
+ request: GetAllAssistantConversationRequest,
81
+ auth: Union[UserAuthInfo, ClientAuthInfo, None],
82
+ ) -> GetAllAssistantConversationResponse:
83
+ if auth is None:
84
+ auth = client_cfg.auth
85
+ return client_cfg.assistant_client.GetAllAssistantConversation(
86
+ request,
87
+ metadata=auth,
88
+ )
89
+
90
+
91
+ def get_assistant_webhook(
92
+ client_cfg: ConnectionConfig,
93
+ request: GetAssistantWebhookRequest,
94
+ auth: Union[UserAuthInfo, ClientAuthInfo, None],
95
+ ) -> GetAssistantWebhookResponse:
96
+ if auth is None:
97
+ auth = client_cfg.auth
98
+ return client_cfg.assistant_client.GetAssistantWebhook(
99
+ request,
100
+ metadata=auth,
101
+ )
102
+
103
+
104
+ def get_all_assistant_webhook(
105
+ client_cfg: ConnectionConfig,
106
+ request: GetAllAssistantWebhookRequest,
107
+ auth: Union[UserAuthInfo, ClientAuthInfo, None],
108
+ ) -> GetAllAssistantWebhookResponse:
109
+ if auth is None:
110
+ auth = client_cfg.auth
111
+ return client_cfg.assistant_client.GetAllAssistantWebhook(
112
+ request,
113
+ metadata=auth,
114
+ )
115
+
116
+
117
+ def get_assistant_knowledge(
118
+ client_cfg: ConnectionConfig,
119
+ request: GetAssistantKnowledgeRequest,
120
+ auth: Union[UserAuthInfo, ClientAuthInfo, None],
121
+ ) -> GetAssistantKnowledgeResponse:
122
+ if auth is None:
123
+ auth = client_cfg.auth
124
+ return client_cfg.assistant_client.GetAssistantKnowledge(
125
+ request,
126
+ metadata=auth,
127
+ )
128
+
129
+
130
+ def get_all_assistant_knowledge(
131
+ client_cfg: ConnectionConfig,
132
+ request: GetAllAssistantKnowledgeRequest,
133
+ auth: Union[UserAuthInfo, ClientAuthInfo, None],
134
+ ) -> GetAllAssistantKnowledgeResponse:
135
+ if auth is None:
136
+ auth = client_cfg.auth
137
+ return client_cfg.assistant_client.GetAllAssistantKnowledge(
138
+ request,
139
+ metadata=auth,
140
+ )
141
+
142
+
143
+ def get_assistant_tool(
144
+ client_cfg: ConnectionConfig,
145
+ request: GetAssistantToolRequest,
146
+ auth: Union[UserAuthInfo, ClientAuthInfo, None],
147
+ ) -> GetAssistantToolResponse:
148
+ if auth is None:
149
+ auth = client_cfg.auth
150
+ return client_cfg.assistant_client.GetAssistantTool(
151
+ request,
152
+ metadata=auth,
153
+ )
154
+
155
+
156
+ def get_all_assistant_tool(
157
+ client_cfg: ConnectionConfig,
158
+ request: GetAllAssistantToolRequest,
159
+ auth: Union[UserAuthInfo, ClientAuthInfo, None],
160
+ ) -> GetAllAssistantToolResponse:
161
+ if auth is None:
162
+ auth = client_cfg.auth
163
+ return client_cfg.assistant_client.GetAllAssistantTool(
164
+ request,
165
+ metadata=auth,
166
+ )
167
+
168
+
169
+ def get_assistant_webhook_log(
170
+ client_cfg: ConnectionConfig,
171
+ request: GetAssistantWebhookLogRequest,
172
+ auth: Union[UserAuthInfo, ClientAuthInfo, None],
173
+ ) -> GetAssistantWebhookLogResponse:
174
+ if auth is None:
175
+ auth = client_cfg.auth
176
+ return client_cfg.assistant_client.GetAssistantTool(
177
+ request,
178
+ metadata=auth,
179
+ )
180
+
181
+
182
+ def get_all_assistant_webhook_log(
183
+ client_cfg: ConnectionConfig,
184
+ request: GetAllAssistantWebhookLogRequest,
185
+ auth: Union[UserAuthInfo, ClientAuthInfo, None],
186
+ ) -> GetAllAssistantWebhookLogResponse:
187
+ if auth is None:
188
+ auth = client_cfg.auth
189
+ return client_cfg.assistant_client.GetAllAssistantTool(
190
+ request,
191
+ metadata=auth,
192
+ )
rapida/clients/call.py CHANGED
@@ -1,26 +1,34 @@
1
+ from typing import Union
1
2
  from rapida.clients.protos.talk_api_pb2 import (
2
3
  CreateBulkPhoneCallRequest,
3
4
  CreateBulkPhoneCallResponse,
4
5
  CreatePhoneCallRequest,
5
6
  CreatePhoneCallResponse,
6
7
  )
7
- from rapida.connections import ConnectionConfig
8
+ from rapida.connections import ConnectionConfig, UserAuthInfo, ClientAuthInfo
8
9
 
9
10
 
10
11
  def create_phone_call(
11
- client_cfg: ConnectionConfig, request: CreatePhoneCallRequest
12
+ client_cfg: ConnectionConfig,
13
+ request: CreatePhoneCallRequest,
14
+ auth: Union[UserAuthInfo, ClientAuthInfo, None],
12
15
  ) -> CreatePhoneCallResponse:
16
+ if auth is None:
17
+ auth = client_cfg.auth
13
18
  return client_cfg.conversation_client.CreatePhoneCall(
14
19
  request,
15
- metadata=client_cfg.auth,
20
+ metadata=auth,
16
21
  )
17
22
 
18
23
 
19
24
  def create_bulk_phone_call(
20
- client_cfg: ConnectionConfig, request: CreateBulkPhoneCallRequest
25
+ client_cfg: ConnectionConfig,
26
+ request: CreateBulkPhoneCallRequest,
27
+ auth: Union[UserAuthInfo, ClientAuthInfo, None],
21
28
  ) -> CreateBulkPhoneCallResponse:
22
-
29
+ if auth is None:
30
+ auth = client_cfg.auth
23
31
  return client_cfg.conversation_client.CreateBulkPhoneCall(
24
32
  request,
25
- metadata=client_cfg.auth,
33
+ metadata=auth,
26
34
  )
@@ -0,0 +1,66 @@
1
+ from typing import Union
2
+ from rapida.clients.protos.endpoint_api_pb2 import (
3
+ GetAllEndpointLogRequest,
4
+ GetAllEndpointLogResponse,
5
+ GetAllEndpointRequest,
6
+ GetAllEndpointResponse,
7
+ GetEndpointLogRequest,
8
+ GetEndpointLogResponse,
9
+ GetEndpointRequest,
10
+ GetEndpointResponse,
11
+ )
12
+ from rapida.connections import ConnectionConfig, UserAuthInfo, ClientAuthInfo
13
+
14
+
15
+ def get_endpoint(
16
+ client_cfg: ConnectionConfig,
17
+ request: GetEndpointRequest,
18
+ auth: Union[UserAuthInfo, ClientAuthInfo, None],
19
+ ) -> GetEndpointResponse:
20
+ if auth is None:
21
+ auth = client_cfg.auth
22
+
23
+ return client_cfg.endpoint_client.GetEndpoint(
24
+ request,
25
+ metadata=auth,
26
+ )
27
+
28
+
29
+ def get_all_endpoint(
30
+ client_cfg: ConnectionConfig,
31
+ request: GetAllEndpointRequest,
32
+ auth: Union[UserAuthInfo, ClientAuthInfo, None],
33
+ ) -> GetAllEndpointResponse:
34
+ if auth is None:
35
+ auth = client_cfg.auth
36
+ return client_cfg.endpoint_client.GetAllEndpoint(
37
+ request,
38
+ metadata=auth,
39
+ )
40
+
41
+
42
+ def get_endpoint_log(
43
+ client_cfg: ConnectionConfig,
44
+ request: GetEndpointLogRequest,
45
+ auth: Union[UserAuthInfo, ClientAuthInfo, None],
46
+ ) -> GetEndpointLogResponse:
47
+ if auth is None:
48
+ auth = client_cfg.auth
49
+
50
+ return client_cfg.endpoint_client.GetEndpointLog(
51
+ request,
52
+ metadata=auth,
53
+ )
54
+
55
+
56
+ def get_all_endpoint_log(
57
+ client_cfg: ConnectionConfig,
58
+ request: GetAllEndpointLogRequest,
59
+ auth: Union[UserAuthInfo, ClientAuthInfo, None],
60
+ ) -> GetAllEndpointLogResponse:
61
+ if auth is None:
62
+ auth = client_cfg.auth
63
+ return client_cfg.endpoint_client.GetAllEndpointLog(
64
+ request,
65
+ metadata=auth,
66
+ )
@@ -0,0 +1,20 @@
1
+ from typing import Union
2
+ from rapida.clients.protos.invoker_api_pb2 import (
3
+ InvokeRequest,
4
+ InvokeResponse,
5
+ )
6
+ from rapida.connections import ConnectionConfig, UserAuthInfo, ClientAuthInfo
7
+
8
+
9
+ def invoke(
10
+ client_cfg: ConnectionConfig,
11
+ request: InvokeRequest,
12
+ auth: Union[UserAuthInfo, ClientAuthInfo, None],
13
+ ) -> InvokeResponse:
14
+ if auth is None:
15
+ auth = client_cfg.auth
16
+
17
+ return client_cfg.deployment_client.Invoke(
18
+ request,
19
+ metadata=auth,
20
+ )
File without changes
File without changes
@@ -142,7 +142,7 @@ class ConnectionConfig:
142
142
 
143
143
  @property
144
144
  def deployment_client(self):
145
- return DeploymentStub(self._create_channel(self._endpoint["web"]))
145
+ return DeploymentStub(self._create_channel(self._endpoint["endpoint"]))
146
146
 
147
147
  @property
148
148
  def marketplace_client(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rapida-python
3
- Version: 0.1.8
3
+ Version: 0.1.9
4
4
  Summary: RapidaAI SDK to integrate rapida.ai APIs
5
5
  Author-email: RapidaAI <code@rapida.ai>
6
6
  License-Expression: MIT
@@ -1,7 +1,12 @@
1
1
  rapida/__init__.py,sha256=v2EIAYRMSgOpoZhOQsDdugfNfY7WMOKqagYajsPJE-Y,29180
2
2
  rapida/version.py,sha256=viGOWqdZKnddhX3OaC8ukCMltj9eQG53LVDTj-Pha3o,1269
3
3
  rapida/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- rapida/clients/call.py,sha256=n0yOkv0w5SSjimjpQ5L7N9kgXnGkSQgYVpLEHQhYIDU,713
4
+ rapida/clients/assistant.py,sha256=5tvD0snasZ2s25EvA_Avnfj5OnzpYKuIFviwtrANWg4,5496
5
+ rapida/clients/call.py,sha256=6H02Itmu4SWM_hw3jdLtFBRkGb3-IpLwxoxJXcezaGI,965
6
+ rapida/clients/endpoint.py,sha256=XejL-3qiPAwDtYPu87UWcb1mrS4USbZOk3KZePsmdBw,1692
7
+ rapida/clients/invoke.py,sha256=j2z_FPB3xo7k8Nk1rO0MYD5mpkAMAhETWRCkM4THh2s,493
8
+ rapida/clients/knowledge.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ rapida/clients/vault.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
10
  rapida/clients/protos/assistant_analysis_pb2.py,sha256=JgPAQIR09OnnnDo4FawosOpVIhQ9nQn65fTGDGCuSIY,9862
6
11
  rapida/clients/protos/assistant_analysis_pb2.pyi,sha256=Mw1I2iuM4vHhnZa-qEhhp4RBmuTytZvvZR3-TGrt1LQ,8070
7
12
  rapida/clients/protos/assistant_analysis_pb2_grpc.py,sha256=y3iidcsQd04zHdGeqzI8A1PCypx_nhiu59WszCfgdQM,899
@@ -63,14 +68,14 @@ rapida/clients/protos/web_api_pb2.py,sha256=mqHFIcjGKHJTKuHCN3wToKgfnboMI5UMwNZs
63
68
  rapida/clients/protos/web_api_pb2.pyi,sha256=7xsUqEC9PKoDWlLqH_1Br7Br0jo5gEeyhukBBrx58sk,26114
64
69
  rapida/clients/protos/web_api_pb2_grpc.py,sha256=Sj29L6OMKgtb9ZUBH0q9PEAce7CHOKRZLvGog_NXNr8,47433
65
70
  rapida/configs/__init__.py,sha256=sqr0vCM4bqkwAWPdYQnhx--OpmROPZXHF4pp8pU5KB4,1546
66
- rapida/connections/__init__.py,sha256=74Ik4L1Cu_7BrtQ2Grr7CdLq3mCtkGK2EcJWKH3eNHY,7588
71
+ rapida/connections/__init__.py,sha256=9O3g4vvWBfqgzCA4pwWVGNK-zgDeJXnZKbHC7HQic78,7593
67
72
  rapida/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
68
73
  rapida/utils/rapida_environment.py,sha256=S0wpHjNAokg3PbGXt5QkzATmX0_jPCjCC8zC_G33qaQ,1780
69
74
  rapida/utils/rapida_header.py,sha256=LdqZsRHfXpcT4YCC8Ag_eoNYa6WQx6PVfRyfH12Ey3A,2091
70
75
  rapida/utils/rapida_region.py,sha256=ZO6_VGTlawtM2G_XOPVQldupOlMRRS__A97KGu8TQkE,1788
71
76
  rapida/utils/rapida_source.py,sha256=ZHfYUSgtzv3Jpj-4PCjdZXyhbWPWbY-JZMCM1jYk5Fw,2828
72
77
  rapida/utils/rapida_value.py,sha256=4TFIbPmMqcR0RB-381rWTqrxgBLY5doTsPXihOA1-Dc,6091
73
- rapida_python-0.1.8.dist-info/METADATA,sha256=LKlALBQ2e8ZTaeeCQEC3DfNqknkK-anEXGAFq0sXrb4,2486
74
- rapida_python-0.1.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
75
- rapida_python-0.1.8.dist-info/top_level.txt,sha256=1OJt64VrZ3n2N8GBqlUSoQ3qvPv30QBYD--xOZv3R2g,7
76
- rapida_python-0.1.8.dist-info/RECORD,,
78
+ rapida_python-0.1.9.dist-info/METADATA,sha256=V4HbHZPeHZGksD68jGQoh5o1qJum6223lBeBnuF3nFs,2486
79
+ rapida_python-0.1.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
80
+ rapida_python-0.1.9.dist-info/top_level.txt,sha256=1OJt64VrZ3n2N8GBqlUSoQ3qvPv30QBYD--xOZv3R2g,7
81
+ rapida_python-0.1.9.dist-info/RECORD,,