Raise a ValueError when a tool's inputs_from_state key is missing from the Agent's state_schema

Aperta
#13,920 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
1/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Read haystack/components/agents/agent.py and the unit tests for _warn_on_inputs_from_state_missing_from_schema; check the State docs page and the release note format for upgrade notes. Replace the warning behavior with the specified error and rename the helper, then update tests, docs, and the upgrade release note. The issue says this work will be handled internally and is not open to external contributions.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

handled internally

Follow up to #13891

Since #13891, the Agent emits a FutureWarning at the start of each run when a tool's inputs_from_state reads a key that is not declared in the Agent's state_schema. State only holds keys from the schema, so such a key is never injected and the tool runs on its default or fails.

The warning says this will raise a ValueError starting with Haystack 3.7.

To do
  • Replace the FutureWarning in _warn_on_inputs_from_state_missing_from_schema (haystack/components/agents/agent.py) with a ValueError and rename the helper accordingly
  • Update the unit tests to expect the error
  • Update the State docs page, which says the Agent emits a FutureWarning
  • Add an upgrade release note

👋 Hello there! This issue will be handled internally and isn't open for external contributions. If you'd like to contribute, please take a look at issues labeled contributions welcome or good first issue. We'd really appreciate it!

Lingua principale
Python
Stelle
27.1k
Fork
3.5k
Merge medio
1g 8h
PR unite (30g)
239

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di deepset-ai/haystack

Tutte le issue di deepset-ai/haystack

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.