Skip to content

Commit b4e570b

Browse files
committed
Simple reasoning_content parsing in BaseLM.
1 parent f9ceebf commit b4e570b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dspy/clients/base_lm.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ def _process_lm_response(self, response, prompt, messages, **kwargs):
5959
output["logprobs"] = c.logprobs if hasattr(c, "logprobs") else c["logprobs"]
6060
if hasattr(c, "message") and getattr(c.message, "tool_calls", None):
6161
output["tool_calls"] = c.message.tool_calls
62+
if hasattr(c, "reasoning_content"):
63+
output["reasoning_content"] = c.reasoning_content
6264
outputs.append(output)
6365

6466
if all(len(output) == 1 for output in outputs):

0 commit comments

Comments
 (0)