-
Notifications
You must be signed in to change notification settings - Fork 20k
chore(core): improve typing of messages utils functions #34225
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: master
Are you sure you want to change the base?
Conversation
|
|
||
| # test explicitly excluding all tool calls | ||
| actual = filter_messages(messages, exclude_tool_calls={"1", "2"}) | ||
| actual = filter_messages(messages, exclude_tool_calls=["1", "2"]) |
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.
It found some incorrect typing 😃
CodSpeed Performance ReportMerging #34225 will not alter performanceComparing
|
d06f642 to
8740ee2
Compare
|
|
||
| def test_trim_messages_bad_token_counter() -> None: | ||
| trimmer = trim_messages(max_tokens=10, token_counter={}) | ||
| trimmer = trim_messages(max_tokens=10, token_counter={}) # type: ignore[call-overload] |
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.
There is now typing for _runnable_support annotated method args.
8740ee2 to
c35c6b7
Compare
c35c6b7 to
cb51436
Compare
With this we get the correct types for
_runnable_supportannotated functions.