8000 Error INVALID_ARGUMENT: Please ensure that function call turn comes immediately after a user turn or after a function response turn · Issue #1581 · google/adk-python · GitHub
[go: up one dir, main page]

Skip to content
Error INVALID_ARGUMENT: Please ensure that function call turn comes immediately after a user turn or after a function response turn #1581
Open
@momo-tuannguyen12

Description

@momo-tuannguyen12

Describe the bug
INVALID_ARGUMENT. {'error': {'code': 400, 'message': 'Please ensure that function call turn comes immediately after a user turn or after a function response turn.', 'status': 'INVALID_ARGUMENT'}}

User turn: [{message: "Help me", role: "user"]
Model turn: [{message: "How I can help you today", role: "user"] // why agent response but role is "user"

When I got above error, I see the role is "user" instead of "model"

The error occurs RANDOMLY

Desktop (please complete the following information):

  • Python version(python -V): 3.10
  • ADK version(pip show google-adk): 1.2.1

Additional context
I use remote mysql database session

Metadata

Metadata

Assignees

No one assigned

    Labels

    bot_triagedcoreIssues related to the core interface and implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0