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

Unify reasoning and reasoningContent fields #313

Merged
merged 1 commit into from
Apr 3, 2025

Conversation

SplittyDev
Copy link
Contributor

This simplifies the API and hides an unnecessary implementation detail.

What

This PR unifies the reasoning and reasoning_content fields into a single public reasoning getter.

The internal reasoning and reasoningContent fields are preserved for en- and decoding purposes, to preserve ABI-compatibility and ensure that re-encoding is lossless.

Why

As discussed in #311 (comment).
There is no reason to publicly expose both, as only one or neither of these fields will be set at a time.

Affected Areas

ChatResult, ChatStreamResult

This simplifies the API and hides an unnecessary implementation detail.
Copy link

sonarqubecloud bot commented Apr 3, 2025

Copy link
Collaborator

@nezhyborets nezhyborets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

@nezhyborets nezhyborets merged commit 2d2c06f into MacPaw:main Apr 3, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants