6
6
from google .protobuf .message import Message
7
7
from grpc ._channel import _MultiThreadedRendezvous
8
8
9
- import riva_api .proto .riva_nlp_pb2 as rnlp
10
- import riva_api .proto .riva_nlp_pb2_grpc as rnlp_srv
11
- from riva_api import Auth
9
+ import riva . client .proto .riva_nlp_pb2 as rnlp
10
+ import riva . client .proto .riva_nlp_pb2_grpc as rnlp_srv
11
+ from riva . client import Auth
12
12
13
13
14
14
def extract_all_text_classes_and_confidences (
@@ -103,7 +103,7 @@ def __init__(self, auth: Auth) -> None:
103
103
Initializes an instance of the class.
104
104
105
105
Args:
106
- auth (:obj:`Auth`): an instance of :class:`riva_api .auth.Auth` which is used for
106
+ auth (:obj:`Auth`): an instance of :class:`riva.client .auth.Auth` which is used for
107
107
authentication metadata generation.
108
108
"""
109
109
self .auth = auth
@@ -125,7 +125,7 @@ def classify_text(
125
125
future (:obj:`bool`, defaults to :obj:`False`): whether to return an async result instead of usual
126
126
response. You can get a response by calling ``result()`` method of the future object.
127
127
Returns:
128
- :obj:`Union[riva_api .proto.riva_nlp_pb2.TextClassResponse, grpc._channel._MultiThreadedRendezvous]`: a
128
+ :obj:`Union[riva.client .proto.riva_nlp_pb2.TextClassResponse, grpc._channel._MultiThreadedRendezvous]`: a
129
129
response with :param:`input_strings` classification results. You may find :class:`TextClassResponse`
130
130
fields description `here
131
131
<https://docs.nvidia.com/deeplearning/riva/user-guide/docs/reference/protos/protos.html#riva-proto-riva-nlp-proto>`_.
@@ -158,7 +158,7 @@ def classify_tokens(
158
158
future (:obj:`bool`, defaults to :obj:`False`): whether to return an async result instead of usual
159
159
response. You can get a response by calling ``result()`` method of the future object.
160
160
Returns:
161
- :obj:`Union[riva_api .proto.riva_nlp_pb2.TokenClassResponse, grpc._channel._MultiThreadedRendezvous]`: a
161
+ :obj:`Union[riva.client .proto.riva_nlp_pb2.TokenClassResponse, grpc._channel._MultiThreadedRendezvous]`: a
162
162
response with results. You may find :class:`TokenClassResponse` fields description `here
163
163
<https://docs.nvidia.com/deeplearning/riva/user-guide/docs/reference/protos/protos.html#riva-proto-riva-nlp-proto>`_.
164
164
If :param:`future` is :obj:`True`, then a future object is returned. You may retrieve a response from a
@@ -189,7 +189,7 @@ def transform_text(
189
189
future (:obj:`bool`, defaults to :obj:`False`): whether to return an async result instead of usual
190
190
response. You can get a response by calling ``result()`` method of the future object.
191
191
Returns:
192
- :obj:`Union[riva_api .proto.riva_nlp_pb2.TextTransformResponse, grpc._channel._MultiThreadedRendezvous]`: a
192
+ :obj:`Union[riva.client .proto.riva_nlp_pb2.TextTransformResponse, grpc._channel._MultiThreadedRendezvous]`: a
193
193
model response. You may find :class:`TextTransformResponse` fields description `here
194
194
<https://docs.nvidia.com/deeplearning/riva/user-guide/docs/reference/protos/protos.html#riva-proto-riva-nlp-proto>`_.
195
195
If :param:`future` is :obj:`True`, then a future object is returned. You may retrieve a response from a
@@ -211,7 +211,7 @@ def analyze_entities(
211
211
future (:obj:`bool`, defaults to :obj:`False`): whether to return an async result instead of usual
212
212
response. You can get a response by calling ``result()`` method of the future object.
213
213
Returns:
214
- :obj:`Union[riva_api .proto.riva_nlp_pb2.TokenClassResponse, grpc._channel._MultiThreadedRendezvous]`: a
214
+ :obj:`Union[riva.client .proto.riva_nlp_pb2.TokenClassResponse, grpc._channel._MultiThreadedRendezvous]`: a
215
215
model response. You may find :class:`TokenClassResponse` fields description `here
216
216
<https://docs.nvidia.com/deeplearning/riva/user-guide/docs/reference/protos/protos.html#riva-proto-riva-nlp-proto>`_.
217
217
If :param:`future` is :obj:`True`, then a future object is returned. You may retrieve a response from a
@@ -233,15 +233,15 @@ def analyze_intent(
233
233
234
234
Args:
235
235
input_string (:obj:`str`): a string which will be classified.
236
- options (:obj:`riva_api .proto.riva_nlp_pb2.AnalyzeIntentOptions`, `optional`,
237
- defaults to :obj:`riva_api .proto.riva_nlp_pb2.AnalyzeIntentOptions()`):
236
+ options (:obj:`riva.client .proto.riva_nlp_pb2.AnalyzeIntentOptions`, `optional`,
237
+ defaults to :obj:`riva.client .proto.riva_nlp_pb2.AnalyzeIntentOptions()`):
238
238
an intent options. You may find fields description `here
239
239
<https://docs.nvidia.com/deeplearning/riva/user-guide/docs/reference/protos/protos.html#riva-proto-riva-nlp-proto>`_.
240
240
Defaults to an instance of :obj:`AnalyzeIntentOptions` created without parameters.
241
241
future (:obj:`bool`, defaults to :obj:`False`): whether to return an async result instead of usual
242
242
response. You can get a response by calling ``result()`` method of the future object.
243
243
Returns:
244
- :obj:`Union[riva_api .proto.riva_nlp_pb2.AnalyzeIntentResponse, grpc._channel._MultiThreadedRendezvous]`: a
244
+ :obj:`Union[riva.client .proto.riva_nlp_pb2.AnalyzeIntentResponse, grpc._channel._MultiThreadedRendezvous]`: a
245
245
response with results. You may find fields description `here
246
246
<https://docs.nvidia.com/deeplearning/riva/user-guide/docs/reference/protos/protos.html#riva-proto-riva-nlp-proto>`_.
247
247
If :param:`future` is :obj:`True`, then a future object is returned. You may retrieve a response from a
@@ -272,7 +272,7 @@ def punctuate_text(
272
272
future (:obj:`bool`, defaults to :obj:`False`): whether to return an async result instead of usual
273
273
response. You can get a response by calling ``result()`` method of the future object.
274
274
Returns:
275
- :obj:`Union[riva_api .proto.riva_nlp_pb2.TextTransformResponse, grpc._channel._MultiThreadedRendezvous]`: a
275
+ :obj:`Union[riva.client .proto.riva_nlp_pb2.TextTransformResponse, grpc._channel._MultiThreadedRendezvous]`: a
276
276
response with results. You may find fields description `here
277
277
<https://docs.nvidia.com/deeplearning/riva/user-guide/docs/reference/protos/protos.html#riva-proto-riva-nlp-proto>`_.
278
278
If :param:`future` is :obj:`True`, then a future object is returned. You may retrieve a response from a
@@ -296,7 +296,7 @@ def natural_query(
296
296
future (:obj:`bool`, defaults to :obj:`False`): whether to return an async result instead of usual
297
297
response. You can get a response by calling ``result()`` method of the future object.
298
298
Returns:
299
- :obj:`Union[riva_api .proto.riva_nlp_pb2.NaturalQueryResult, grpc._channel._MultiThreadedRendezvous]`: a
299
+ :obj:`Union[riva.client .proto.riva_nlp_pb2.NaturalQueryResult, grpc._channel._MultiThreadedRendezvous]`: a
300
300
response with a result. You may find fields description `here
301
301
<https://docs.nvidia.com/deeplearning/riva/user-guide/docs/reference/protos/protos.html#riva-proto-riva-nlp-proto>`_.
302
302
If :param:`future` is :obj:`True`, then a future object is returned. You may retrieve a response from a
0 commit comments