-
Notifications
You must be signed in to change notification settings - Fork 25
Description
If you use a model that supports reasoning, the response you'll get back contains both a reasoning_content
part and content
part. The former contains the full reasoning response while the latter contains the final response, which I think is what you normally are wanting.
Right now if I'm using a reasoning model and I call the generateText
method, this returns a GenerativeAiResult
object and then calls the toText
method of that.
This method will return the first message part that contains text and when we first parse the API response, we set the reasoning_content
piece as the first message part and so this is what gets returned. Same thing happens if you initially use generateTexts
.
As far as I can see, there isn't a way, other than parsing the response myself, to force it to use the content
piece instead of reasoning_content
. I see in #52 we added a way to distinguish between content and thought, seems like it may be useful to use that within these generate methods to determine which message part we return. Curious for thoughts on that though or if there's a better way to achieve this.