Skip to content

Calling .text on function call result in an exception #670

Closed
@ex0ns

Description

@ex0ns

Description of the bug:

The function_call type is not handled at all in this function (and raises an exception, which might be expected but is a bit counter intuitive):
https://github.com/google-gemini/generative-ai-python/blob/v0.8.4/google/generativeai/types/generation_types.py#L512-L536

Further more this line (that deals with the missing case), has a type and should be WhichOneOf instead of whichOneOf.
https://github.com/google-gemini/generative-ai-python/blob/v0.8.4/google/generativeai/types/generation_types.py#L535-L536

Is there a reason for .text to raise an exception when the result only contains a function call

Actual vs expected behavior:

No response

Any other information you'd like to share?

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions