Add support for reasoning models to Bedrock generator#1642
Add support for reasoning models to Bedrock generator#1642TheTeaCat wants to merge 2 commits intoNVIDIA:mainfrom
Conversation
|
DCO Assistant Lite bot All contributors have signed the DCO ✍️ ✅ |
c17fd23 to
b69bb26
Compare
|
I have read the DCO Document and I hereby sign the DCO |
Signed-off-by: Rain O'Sullivan <joshua.r.osullivan@gmail.com>
…t content block Signed-off-by: Rain O'Sullivan <joshua.r.osullivan@gmail.com>
jmartin-tech
left a comment
There was a problem hiding this comment.
Awesome add, I added a comment suggesting this could also benefit from a guard clause when attempting to access the blocks.
Another question this raises, is there guaranteed to be only one block with text? If the text may be broken up into multiple block responses it may be appropriate to concatenate them since the generator does not support multiple concurrent responses.
No, I don't believe it is guaranteed there will be only one block with text - particularly when the The I'd like to get an incremental improvement on the current behaviour in with this PR - removing the assumption that the text response from the model is always in the first content block - before grappling with the possibility of multiple text content blocks. |
The list return format is for supporting a response for each At this time the responses would need to be concatenated in some way, simply joining with |
|
Hey @jmartin-tech, just bumping this. Thanks! |
The bedrock generator expects the first content block returned by the converse method to contain the text outputted by the model. When testing reasoning models, the first content block often contains reasoning.
This PR:
conversereturn values: one with only reasoning, and one with reasoning followed by text.