Skip to content

Unable to submit request because it has an empty text parameter. Add a value to the parameter and try again. #697

Closed
@Captainnik53

Description

@Captainnik53

Description of the bug:

chat_session.send_message() with empty parts fails with an error:

google.api_core.exceptions.InvalidArgument: 400 Unable to submit request because it has an empty text parameter. Add a value to the parameter and try again. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/gemini

This fails, which was working earlier
chat_session.send_message({'role': 'user', 'parts': ''});

where chat_session = ChatSession(model=model, history=history)

Actual vs expected behavior:

No response

Any other information you'd like to share?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions