-
Notifications
You must be signed in to change notification settings - Fork 319
fix(go): exclude reasoning part when return value from Text() function #3165
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
base: main
Are you sure you want to change the base?
Conversation
e47064d
to
3a23dc3
Compare
Good catch! But should we be including Data() parts in Text()? |
@huangjeff5 The For backward compatibility, You can find the relevant code here:
These implementations should use the Data part instead of the Text part when the output mode is JSON. If we remove the Data part from |
We call |
@apascal07 Thank you for your insight. I've added a comment about you mentioned. Can you review it? |
I’ve noticed that the
Text()
function is meant to operate onTextPart
orDataPart
only. If a developer wants to retrieve the reasoning part as text, they should useReasoning()
instead.However,
Text()
currently returns a merged value that includes the reasoning part, which does not match the intended behavior.Checklist (if applicable):