[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

It’s possibly just worthwhile adding that the only real reason the course was designed that way originally was that there weren’t as many multimodal models available;

Now that for instance Gemini 1.5 Flash is multimodal, you may not need to jump through as many hoops

The code would need modifying of course; see my L2 notebook.ipynb (2.3 MB) or L4 notebook.ipynb (7.6 MB) for illustrations of how

Hi @MarkieMark,

Please don’t infer statements like these.

I saw your other reply as well regarding AI studio, that and this course are not related.

Despite it being the same modal family, this course was designed for Google Cloud.

Hi Mohammed,

Thanks for writing; I understand of course that part of the reason for the course design was induction into that side of the ecosystem; I think it’s perfectly fair to say however that there would have been a combination of reasons :slightly_smiling_face:

After all, we notice that the notebooks are optional; that optionality seemed to have indicated the billing was a major reason for that (thus attendant factors would have been relevant in course design decisions)

I may not have worded my shorthand original message perfectly, I think I meant to say simply that progress is all moving very fast now so that people who have no particular desire to jump through those particular hoops just so as to learn that particular (more or less larger scale / commercial) use case, may be pleasantly surprised to see how it now seems it is not strictly necessary / it seems perfectly possible to complete the course without billing; even after just a few months.

TLDR; s/the only real reason/one obvious reason given the state of progress/ :slightly_smiling_face:

Saying that, I need to check whether I’m reaching some kind of context limit in L5 with the very large video, strange empty responses :roll_eyes::innocent::sunglasses:

Best regards

Mark