| |
- google.cloud.aiplatform_v1beta1.services.prediction_service.transports.rest.PredictionServiceRestTransport(google.cloud.aiplatform_v1beta1.services.prediction_service.transports.base.PredictionServiceTransport)
-
- PatchedPredictionServiceRestTransport
class PatchedPredictionServiceRestTransport(google.cloud.aiplatform_v1beta1.services.prediction_service.transports.rest.PredictionServiceRestTransport) |
|
PatchedPredictionServiceRestTransport(*, host: str = 'aiplatform.googleapis.com', credentials: Optional[google.auth.credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, quota_project_id: Optional[str] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object at 0x7fb9a3b31c90>, always_use_jwt_access: Optional[bool] = False, url_scheme: str = 'https', interceptor: Optional[google.cloud.aiplatform_v1beta1.services.prediction_service.transports.rest.PredictionServiceRestInterceptor] = None, api_audience: Optional[str] = None) -> None
PatchedPredictionServiceRestTransport is created to resolve an issue in the Vertex AI SDK.
This class should be removed as soon as the bug is resolved upstream. The issue is that the
Python requests library is not called with the parameter stream=True within the _StreamGenerateContents
__call__ method. The __call__ method has been copied over and was only adjusted at places marked
with PATCHED.
Bug is reported at https://github.com/googleapis/gapic-generator-python/issues/2076. |
|
- Method resolution order:
- PatchedPredictionServiceRestTransport
- google.cloud.aiplatform_v1beta1.services.prediction_service.transports.rest.PredictionServiceRestTransport
- google.cloud.aiplatform_v1beta1.services.prediction_service.transports.base.PredictionServiceTransport
- abc.ABC
- builtins.object
Data and other attributes defined here:
- __abstractmethods__ = frozenset()
Methods inherited from google.cloud.aiplatform_v1beta1.services.prediction_service.transports.rest.PredictionServiceRestTransport:
- __init__(self, *, host: str = 'aiplatform.googleapis.com', credentials: Optional[google.auth.credentials.Credentials] = None, credentials_file: Optional[str] = None, scopes: Optional[Sequence[str]] = None, client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, quota_project_id: Optional[str] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object at 0x7fb9a3b31c90>, always_use_jwt_access: Optional[bool] = False, url_scheme: str = 'https', interceptor: Optional[google.cloud.aiplatform_v1beta1.services.prediction_service.transports.rest.PredictionServiceRestInterceptor] = None, api_audience: Optional[str] = None) -> None
- Instantiate the transport.
Args:
host (Optional[str]):
The hostname to connect to (default: 'aiplatform.googleapis.com').
credentials (Optional[google.auth.credentials.Credentials]): The
authorization credentials to attach to requests. These
credentials identify the application to the service; if none
are specified, the client will attempt to ascertain the
credentials from the environment.
credentials_file (Optional[str]): A file with credentials that can
be loaded with :func:`google.auth.load_credentials_from_file`.
This argument is ignored if ``channel`` is provided.
scopes (Optional(Sequence[str])): A list of scopes. This argument is
ignored if ``channel`` is provided.
client_cert_source_for_mtls (Callable[[], Tuple[bytes, bytes]]): Client
certificate to configure mutual TLS HTTP channel. It is ignored
if ``channel`` is provided.
quota_project_id (Optional[str]): An optional project to use for billing
and quota.
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
The client info used to send a user-agent string along with
API requests. If ``None``, then default info will be used.
Generally, you only need to set this if you are developing
your own client library.
always_use_jwt_access (Optional[bool]): Whether self signed JWT should
be used for service account credentials.
url_scheme: the protocol scheme for the API endpoint. Normally
"https", but for testing or local servers,
"http" can be specified.
- close(self)
- Closes resources associated with the transport.
.. warning::
Only call this method if the transport is NOT shared
with other clients - this may cause errors in other clients!
Readonly properties inherited from google.cloud.aiplatform_v1beta1.services.prediction_service.transports.rest.PredictionServiceRestTransport:
- cancel_operation
- chat_completions
- count_tokens
- delete_operation
- direct_predict
- direct_raw_predict
- explain
- generate_content
- get_iam_policy
- get_location
- get_operation
- kind
- list_locations
- list_operations
- predict
- raw_predict
- server_streaming_predict
- set_iam_policy
- stream_direct_predict
- stream_direct_raw_predict
- stream_generate_content
- stream_raw_predict
- streaming_predict
- streaming_raw_predict
- test_iam_permissions
- wait_operation
Readonly properties inherited from google.cloud.aiplatform_v1beta1.services.prediction_service.transports.base.PredictionServiceTransport:
- host
Data descriptors inherited from google.cloud.aiplatform_v1beta1.services.prediction_service.transports.base.PredictionServiceTransport:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from google.cloud.aiplatform_v1beta1.services.prediction_service.transports.base.PredictionServiceTransport:
- AUTH_SCOPES = ('https://www.googleapis.com/auth/cloud-platform', 'https://www.googleapis.com/auth/cloud-platform.read-only')
- DEFAULT_HOST = 'aiplatform.googleapis.com'
- __annotations__ = {'DEFAULT_HOST': <class 'str'>}
| |