[RESOLVED] L2_colab_prompting_and_parameters.ipynb ---- Responses_4 = multimodal_model.generate_content(contents_video, stream=True)

There was an issue to execute responses_4 = multimodal_model.generate_content(contents_video, stream=True). The issue caused the following errors to print the stream results.

How to resolve it?


MultiThreadedRendezvous Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/google/api_core/grpc_helpers.py in error_remapped_callable(*args, **kwargs)
169 prefetch_first = getattr(callable
, “prefetch_first_result”, True)
→ 170 return _StreamingResponseIterator(
171 result, prefetch_first_result=prefetch_first

7 frames
_MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
status = StatusCode.INTERNAL
details = “Internal error encountered.”
debug_error_string = “UNKNOWN:Error received from peer ipv4:142.250.141.95:443 {created_time:“2024-09-01T17:54:28.618529384+00:00”, grpc_status:13, grpc_message:“Internal error encountered.”}”

The above exception was the direct cause of the following exception:

InternalServerError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/google/api_core/grpc_helpers.py in error_remapped_callable(*args, **kwargs)
172 )
173 except grpc.RpcError as exc:
→ 174 raise exceptions.from_grpc_error(exc) from exc
175
176 return error_remapped_callable

InternalServerError: 500 Internal error encountered.

The error was a kind of misleading. The solution is to enable Vertex AI API.

2 Likes

Hi @Newidealist,

I’m glad you resolved this.

I agree, the error is misleading, which is why in the How to Set Up your Google Cloud Account, Step 5 has been marked as “mandatory”.

Best,
Mubsi

1 Like