Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

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

Closed

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

Activity

  1. hkt74 commented on Mar 4, 2025

    @hkt74

    Hi @Captainnik53 , thanks for raising this issue, this should be fixed now, could you retry?

  2. Captainnik53 commented on Mar 5, 2025

    @Captainnik53
    Author

    Yes, it is fixed. Thanks for the quick fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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