Skip to content

Return usage metadata in Vertex #1747

@antrix

Description

@antrix

Is your feature request related to a problem? Please describe.

Unlike the VertexAIGeminiChatGenerator, the VertexAIGeminiGenerator class does not return any usage metadata (prompt tokens, etc) in the response. It throws away all of the metadata produced by the underlying Google SDK library and returns just the text.

Describe the solution you'd like
Update VertexAIGeminiGenerator to return usage meta data.

Describe alternatives you've considered
A custom generator that extends the VertexAIGeminiGenerator and overrides run(), and _get_response() works but would like it if the base class supported this out of the box.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions