Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Please run down the following list and make sure you've tried the usual "quick fixes":
If you are still having issues, please be sure to include as much information as possible:
Environment details
OS type and version: macOS Sonoma 14.5
Python version: 3.9.13
pip version: 24.0
google-cloud-aiplatform version: 1.62.0
Steps to reproduce
Sending different prompts using generate_content_async seems to have started to throw InvalidArgument exception from today, which didn't happen before.
Traceback (most recent call last):
File "/lib/python3.9/site-packages/google/api_core/grpc_helpers_async.py", line 85, in __await__
response = yield from self._call.__await__()
File "/lib/python3.9/site-packages/grpc/aio/_call.py", line 318, in __await__
raise _create_rpc_error(
grpc.aio._call.AioRpcError: <AioRpcError of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "Request contains an invalid argument."
debug_error_string = "UNKNOWN:Error received from peer ipv6:%5B2607:f8b0:400c:c01::5f%5D:443 {created_time:"2024-08-16T13:08:12.970802-03:00", grpc_status:3, grpc_message:"Request contains an invalid argument."}"
>
The above exception was the direct cause of the following exception:
File "/lib/python3.9/site-packages/vertexai/generative_models/_generative_models.py", line 603, in generate_content_async
return await self._generate_content_async(
File "/lib/python3.9/site-packages/vertexai/generative_models/_generative_models.py", line 682, in _generate_content_async
gapic_response = await self._prediction_async_client.generate_content(
File "/lib/python3.9/site-packages/google/cloud/aiplatform_v1beta1/services/prediction_service/async_client.py", line 1826, in generate_content
response = await rpc(
File "/lib/python3.9/site-packages/google/api_core/grpc_helpers_async.py", line 88, in __await__
raise exceptions.from_grpc_error(rpc_error) from rpc_error
google.api_core.exceptions.InvalidArgument: 400 Request contains an invalid argument.
Making sure to follow these steps will guarantee the quickest resolution possible.
P.S. This is service error and usually this means that the SDK has nothing to do with it. Maybe your prompt or user_input are invalid and service rejects them.
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Please run down the following list and make sure you've tried the usual "quick fixes":
If you are still having issues, please be sure to include as much information as possible:
Environment details
3.9.13
24.0
google-cloud-aiplatform
version:1.62.0
Steps to reproduce
Code example
Stack trace
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!