docs(redis): Quick Start snippet in src/google/adk/integrations/redis/README.md passes invalid Agent(instructions=...) kwarg

未關閉
#8,247 1 則留言 0 個 reaction 已指派 1 人 在 GitHub 檢視

維護者通常 3 天內回覆

@sanketpatil06 已經在處理了。

開始於 2026年11月19日。

  • #8249 來自 @prassu017 —— 未關閉

評估

這個 Issue 還沒有評估資料。

描述

models

Describe the Bug:
In src/google/adk/integrations/redis/README.md (lines 45–48, under ## Quick Start), the runnable Quick Start snippet constructs Agent with instructions= (plural) instead of instruction= (singular). Because LlmAgent sets extra="forbid", running the Quick Start snippet immediately fails with a Pydantic ValidationError on both google-adk==2.14.1 and main (9eb6d9d9).

Steps to Reproduce:

  1. Run the adk-verify-snippets script (or copy-paste the ## Quick Start block from src/google/adk/integrations/redis/README.md lines 31–56):
    uv run --python 3.12 --with "google-adk==2.14.1" --with "redis" \
      python .agents/skills/adk-verify-snippets/scripts/verify_md.py \
      src/google/adk/integrations/redis/README.md
    
  2. Observe Phase 1 load failure on Snippet 1 (Quick Start).

Expected Behavior:
The Quick Start snippet uses instruction="You are a helpful AI assistant." and loads cleanly (Agent + Runner instantiate without error).

Observed Behavior:

File "snippet_1_quick_start.py", line 14, in <module>
  agent = Agent(
pydantic_core._pydantic_core.ValidationError: 1 validation error for LlmAgent
instructions
  Extra inputs are not permitted [type=extra_forbidden, input_value='You are a helpful AI assistant.', input_type=str]
    For further information visit https://errors.pydantic.dev/2.14/v/extra_forbidden

Changing line 47 from instructions= to instruction= allows the entire Quick Start snippet (RedisSessionServiceConfig, RedisSessionService, Agent, Runner) to load cleanly.

Environment Details:

  • ADK Library Version: google-adk 2.14.1 (also reproduced against main 9eb6d9d9), redis 8.1.0
  • Desktop OS: macOS (Darwin arm64)
  • Python Version: 3.12.13

Model Information:

  • Are you using LiteLLM: N/A (fails offline during Agent(...) construction)
  • Which model is being used: N/A

Note: Audited with .agents/skills/adk-verify-snippets and drafted with AI assistance; all commands and outputs were run locally offline.

主要語言
Python
星號
22.3k
分支
4.4k
平均合併
1 天 2 小時
30 天內合併 PR
6

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

google/adk-python 的其他 Issue

查看 google/adk-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。