Skip to content
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

Add "reasoning" attribute to AIMessage #7600

Open
1 task done
afirstenberg opened this issue Jan 25, 2025 · 3 comments
Open
1 task done

Add "reasoning" attribute to AIMessage #7600

afirstenberg opened this issue Jan 25, 2025 · 3 comments
Labels
auto:improvement Medium size change to existing code to handle new use-cases

Comments

@afirstenberg
Copy link
Contributor

Privileged issue

  • I am a LangChain maintainer, or was asked directly by a LangChain maintainer to create an issue here.

Issue Content

Proposal is to add an attribute to AIMessage:

  reasoning?: MessageContent;

See discussion on Slack (https://langchaincommunity.slack.com/archives/C07EHF3HC87/p1737150066310499) and discussion in #7434 and #7564

cc: @jacoblee93

@dosubot dosubot bot added the auto:improvement Medium size change to existing code to handle new use-cases label Jan 25, 2025
@jacoblee93
Copy link
Collaborator

We are going to put reasoning_content in additional_kwargs for now but will upgrade the schema in the future:

#7604

@afirstenberg
Copy link
Contributor Author

@jacoblee93 - What is the format of reasoning_content? Whatever the model returns or should we be defining a specific type?

@jacoblee93
Copy link
Collaborator

For now whatever the model defines (Deepseek makes it a string)

Would imagine in the future it'll be content blocks or string but would prefer to wait for the dust to settle a bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:improvement Medium size change to existing code to handle new use-cases
Projects
None yet
Development

No branches or pull requests

2 participants