-
Notifications
You must be signed in to change notification settings - Fork 19.2k
feat: standard content, IDs, translators, & normalization #32569
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
Conversation
This reverts commit 0ddab9f.
The latest updates on your projects. Learn more about Vercel for GitHub. |
# Subsequent passes: attempt to unpack non-standard blocks | ||
blocks = _convert_v0_multimodal_input_to_v1(blocks) | ||
# blocks = _convert_to_v1_from_anthropic_input(blocks) | ||
# ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
am confused why we need this subsequent step. isn't the multimodal conversion already happening in the above loop? or are those somehow funneling into non standard blocks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we will fix this
a5cb24f
to
4e0fd33
Compare
…rd compatibility with text access methods (#32672)
CodSpeed WallTime Performance ReportMerging #32569 will degrade performances by 27.21%Comparing
|
Benchmark | BASE |
HEAD |
Change | |
---|---|---|---|---|
❌ | test_import_time[HumanMessage] |
208.3 ms | 286.1 ms | -27.21% |
CodSpeed Instrumentation Performance ReportMerging #32569 will not alter performanceComparing Summary
|
Warning
.text()
method..text
property on messages is now the recommended usage..text()
will be removed in v2.Tool Calls
ToolCall
andInvalidToolCall
moved tocontent.py
index
onToolCall
andToolCallChunk
nowNotRequired
instead ofOptional
Standard Content
Message & Block IDs
provider provided > langchain auto-generated > None
ensure_id(id)
now in base.pytest_messages.py
Translators
TODO
Normalization
Key Changes:
image_url
blocks pass through unchanged (broad compatibility) unlessconvert_all
is set in_normalize_messages()
(default False)input_audio
andfile
blocks convert to v1 standard equivalents_strip_ids_from_messages
#32622Partner Updates
output_version
affects how messages are serialized into.content
._normalize_messages()
will now upgrade v0 content to v1, so, all partners now receive v1 format input regardless ofoutput_version
.Migration:
output_version
still controls serialization format of responses (unchanged)TODO
#32694 output version at invoke