Skip to content

Can't handle repeated Value field (from protobuf/struct.proto) #488

@MarkDaoust

Description

@MarkDaoust

We're launching an instance of this prediction service:

google/ai/generativelanguage/v1main/prediction_service.proto;l=77

The PredictRequest has in instances field that is a repeated protobufs.struct.Value.

Screenshot 2024-09-17 at 9 03 34 AM

No matter what you pass as instances here, the result is "Value must be iterable".

Debugging found that if you pass a list/sequence it gets converted to a struct_pb2.ListValue but the field is a repeated struct._pb2.Value so that fails.

Steps to reproduce

https://colab.sandbox.google.com/drive/1grGEJgXiZyvrJCZKvsFmuLyEeXc65vai?resourcekey=0-lTxTMUz7WTDYmV-CS9UHOQ#scrollTo=f4HxrpopJQ-C

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions