Skip to content

'LlmRequest' object has no attribute 'content' #1534

Open
@ayferkrd

Description

@ayferkrd

** Please make sure you read the contribution guide and file the issues in the right place. **
Contribution guide.

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Install '...'
  2. Run '....'
  3. Open '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Image Image and error: Image

Desktop (please complete the following information):

  • OS: [e.g. iOS]--gcp cloud shell don't know os
  • Python version(python -V): 3.12
  • ADK version(pip show google-adk): 1.4.1

Additional context
Add any other context about the problem here.

When I added guardrails to LLmAgent creation,
I got this error:

".local/lib/python3.12/site-packages/google/adk/flows/llm_flows/_nl_planning.py", line 80, in run_async
or not llm_response.content
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/pydantic/main.py", line 989, in getattr
raise AttributeError(f'{type(self).name!r} object has no attribute {item!r}')
AttributeError: 'LlmRequest' object has no attribute 'content'. Did you mean: 'contents'?"

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