-
Notifications
You must be signed in to change notification settings - Fork 16.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: resolve issue #29513 - cannot retrieve reasoning_content while s… #29540
base: master
Are you sure you want to change the base?
Conversation
…tent while streaming Extract reasoning_content in the _convert_delta_to_message_chunk function
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do this on the Deepseek integration, similar to how it's done for invoke?
langchain/libs/partners/deepseek/langchain_deepseek/chat_models.py
Lines 210 to 218 in e8b9128
rtn = super()._create_chat_result(response, generation_info) | |
if not isinstance(response, openai.BaseModel): | |
return rtn | |
if hasattr(response.choices[0].message, "reasoning_content"): # type: ignore | |
rtn.generations[0].message.additional_kwargs["reasoning_content"] = ( | |
response.choices[0].message.reasoning_content # type: ignore | |
) |
anything new? |
Yes, you are right, but it seems that there isn't a suitable way to do it at the moment. |
Hi @baskaryan , could you please take a look at this PR? |
Extract reasoning_content in the _convert_delta_to_message_chunk function
PR title: "langchain_openai: add reasoning_content to stream response when using deepseek-reasoner"
PR message: