Repository navigation
feat: handle message docs correctly - #975
Merged
Merged
Conversation
Contributor
|
The PR description has been updated. Please fill out the template for your PR to be reviewed. |
Signed-off-by: Jake LoRocco <[email protected]> Assisted-by: CLAUDE:OPUS
Signed-off-by: Jake LoRocco <[email protected]> Assisted-by: CLAUDE:OPUS
Signed-off-by: Jake LoRocco <[email protected]> Assisted-by: CLAUDE:OPUS
jakelorocco
force-pushed
the
jal/handle-message-docs
branch
2 times, most recently
from
April 30, 2026 16:34
9368e97 to
b544de2
Compare
Signed-off-by: Jake LoRocco <[email protected]> Assisted-by: CLAUDE:OPUS
jakelorocco
force-pushed
the
jal/handle-message-docs
branch
from
April 30, 2026 16:55
b544de2 to
23c3833
Compare
nrfulton
self-requested a review
April 30, 2026 17:11
nrfulton
requested changes
Apr 30, 2026
| conversation.extend( | ||
| [ | ||
| {"role": m.role, "content": m.content, "images": m.images} | ||
| {"role": m.role, "content": self.formatter.print(m), "images": m.images} |
Member
There was a problem hiding this comment.
at some point we should allow components to specify roles and then remove this special case handling. Create an issue for this and reference this commend in that issue. Then go ahead with this PR.
… _coerce_documents Signed-off-by: Jake LoRocco <[email protected]> Assisted-by: CLAUDE:OPUS
nrfulton
self-requested a review
April 30, 2026 20:52
jakelorocco
marked this pull request as ready for review
April 30, 2026 20:53
nrfulton
approved these changes
Apr 30, 2026
jakelorocco
enabled auto-merge
April 30, 2026 20:53
This was
linked to
issues
Apr 30, 2026
4 of 6 tasks
araujof
pushed a commit
to araujof/mellea
that referenced
this pull request
May 6, 2026
…ing#1010) role, images, and name were included in Message/ToolMessage.format_for_llm() args but are never consumed by any template — backends read them directly from the Message object. Their presence caused a false-positive warning from the unused-keys check added in generative-computing#975. Since name was the only thing ToolMessage.format_for_llm() added, the override is now redundant and has been removed. Assisted-by: Claude Code Signed-off-by: Alex Bozarth <[email protected]>
akihikokuroda
pushed a commit
to akihikokuroda/mellea
that referenced
this pull request
May 27, 2026
* feat: add document support for non-intrinsic code paths Signed-off-by: Jake LoRocco <[email protected]> Assisted-by: CLAUDE:OPUS * feat: add doc support to top-level chat functions Signed-off-by: Jake LoRocco <[email protected]> Assisted-by: CLAUDE:OPUS * feat: add handling for message documents in regular generation paths Signed-off-by: Jake LoRocco <[email protected]> Assisted-by: CLAUDE:OPUS * fix: add warning for key in args not in jinja template Signed-off-by: Jake LoRocco <[email protected]> Assisted-by: CLAUDE:OPUS * fix: pr comments: info -> warn; documents use jinja templates; rename _coerce_documents Signed-off-by: Jake LoRocco <[email protected]> Assisted-by: CLAUDE:OPUS --------- Signed-off-by: Jake LoRocco <[email protected]>
akihikokuroda
pushed a commit
to akihikokuroda/mellea
that referenced
this pull request
May 27, 2026
…ing#1010) role, images, and name were included in Message/ToolMessage.format_for_llm() args but are never consumed by any template — backends read them directly from the Message object. Their presence caused a false-positive warning from the unused-keys check added in generative-computing#975. Since name was the only thing ToolMessage.format_for_llm() added, the override is now redundant and has been removed. Assisted-by: Claude Code Signed-off-by: Alex Bozarth <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Misc PR
Type of PR
Description
Adds support for printing Messages with documents attached. Adds support for attaching documents to Messages and chat interfaces. Modifies document format_for_llm to print something more in line with how intrinsics print the document.
Will need to create new issues to clean up message serialization post this change.
Testing
Attribution