langchain/libs/core/tests/unit_tests/messages
JP-Ellis f77659463a
core[patch]: allow message utils to work with lcel (#23743)
The functions `convert_to_messages` has had an expansion of the
arguments it can take:

1. Previously, it only could take a `Sequence` in order to iterate over
it. This has been broadened slightly to an `Iterable` (which should have
no other impact).
2. Support for `PromptValue` and `BaseChatPromptTemplate` has been
added. These are generated when combining messages using the overloaded
`+` operator.

Functions which rely on `convert_to_messages` (namely `filter_messages`,
`merge_message_runs` and `trim_messages`) have had the type of their
arguments similarly expanded.

Resolves #23706.

<!--
If no one reviews your PR within a few days, please @-mention one of
baskaryan, efriis, eyurtsev, ccurme, vbarda, hwchase17.
-->

---------

Signed-off-by: JP-Ellis <josh@jpellis.me>
Co-authored-by: Bagatur <baskaryan@gmail.com>
2024-07-15 08:58:05 -07:00
..
__init__.py BUG: more core fixes (#13665) 2023-11-21 15:15:48 -08:00
test_ai.py core[patch]: fix ToolCall "type" when streaming (#24218) 2024-07-13 08:59:03 -07:00
test_imports.py core: add RemoveMessage (#23636) 2024-06-28 14:40:02 -07:00
test_utils.py core[patch]: allow message utils to work with lcel (#23743) 2024-07-15 08:58:05 -07:00