What happened?
Context
We get this error:NoneType' object has no attribute 'next_thought' when we work with observations/trajectories that continue to exceed the context window limit
-
in the forward pass, we run _call_with_potential_trajectory_truncation() (code)
-
this has a hardcoded limit of 3 retries.
-
once that is hit, we return None (code) which causes attribute error over NoneType (code)
Question
- What is the expected behavior? Doesn't a while loop until success make more sense?
- On our end, we can monkey patch the truncation logic or even add our own logic for long trajectories but I think this is a bug
Steps to reproduce
explained above
DSPy version
3.0.3