We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c27eff3 commit 77331deCopy full SHA for 77331de
dspy/clients/lm.py
@@ -269,6 +269,9 @@ def _get_stream_completion_fn(
269
stream = cast(MemoryObjectSendStream, stream)
270
caller_predict_id = id(caller_predict) if caller_predict else None
271
272
+ if dspy.settings.track_usage:
273
+ request["stream_options"] = {"include_usage": True}
274
+
275
async def stream_completion(request: Dict[str, Any], cache_kwargs: Dict[str, Any]):
276
response = await litellm.acompletion(
277
cache=cache_kwargs,
0 commit comments