Skip to content

Message object does not have index in response of google gemini pro models #728

@narengogi

Description

@narengogi

What Happened?

Message objects do not have the index key in response of google gemini pro models, this is causing type checks to fail

What Should Have Happened?

response should contain message index

Relevant Code Snippet

example response:

    {
        "candidates": [
            {
                "content": {
                    "parts": [
                        {
                            "text": "Not"
                        }
                    ],
                    "role": "model"
                }
            }
        ],
        "usageMetadata": {
            "promptTokenCount": 16,
            "totalTokenCount": 16
        },
        "modelVersion": "gemini-1.5-pro-002"
    }

Your Twitter/LinkedIn

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions