langchain/libs/core/langchain_core/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 core: add RemoveMessage (#23636) 2024-06-28 14:40:02 -07:00
ai.py core[patch]: fix ToolCall "type" when streaming (#24218) 2024-07-13 08:59:03 -07:00
base.py core: Move json parsing in base chat model / output parser to bg thread (#24031) 2024-07-09 12:26:36 -07:00
chat.py core: docstrings messages (#23788) 2024-07-03 11:25:00 -04:00
function.py core: docstrings messages (#23788) 2024-07-03 11:25:00 -04:00
human.py core: docstrings messages (#23788) 2024-07-03 11:25:00 -04:00
modifier.py core: docstrings messages (#23788) 2024-07-03 11:25:00 -04:00
system.py core: docstrings messages (#23788) 2024-07-03 11:25:00 -04:00
tool.py core[patch]: fix ToolCall "type" when streaming (#24218) 2024-07-13 08:59:03 -07:00
utils.py core[patch]: allow message utils to work with lcel (#23743) 2024-07-15 08:58:05 -07:00