[错误] `dspy.LM(stream=True)` 在拒绝 LiteLLM 的实时流之前对其进行缓存
作者: amitxy创建于 2026年9月6日更新于 2026年9月11日
标签bug
dspy.LM(..., stream=True)acceptsstreamthrough**kwargs;BaseLMstores those kwargs inself.kwargs(base_lm.py:171-206).LM.forward()mergesself.kwargsinto the request, wraps the completion function withrequest_cachewhencache=True, and invokes it (lm.py:232-257).- With no
dspy.streamify()side channel,litellm_completion()returns the directlitellm.completion(..., **request)result (lm.py:454-458, …
内容来源: stanfordnlp/dspy