langchain/libs/core/langchain_core
Jacob Lee c01467b1f4
core[patch]: RFC: Allow concatenation of messages with multi part content (#22002)
Anthropic's streaming treats tool calls as different content parts
(streamed back with a different index) from normal content in the
`content`.

This means that we need to update our chunk-merging logic to handle
chunks with multi-part content. The alternative is coerceing Anthropic's
responses into a string, but we generally like to preserve model
provider responses faithfully when we can. This will also likely be
useful for multimodal outputs in the future.

This current PR does unfortunately make `index` a magic field within
content parts, but Anthropic and OpenAI both use it at the moment to
determine order anyway. To avoid cases where we have content arrays with
holes and to simplify the logic, I've also restricted merging to chunks
in order.

TODO: tests

CC @baskaryan @ccurme @efriis
2024-06-03 09:46:40 -07:00
..
_api core: use qualname in beta message (#20361) 2024-04-23 11:20:13 -07:00
beta core: Updated docstring for Context class (#19079) 2024-03-18 21:15:14 -07:00
callbacks [Core] Update Tracing Interops (#22318) 2024-05-30 10:34:49 -07:00
document_loaders core[minor]: Add aload to document loader (#19936) 2024-04-03 10:46:47 -04:00
documents core[minor]: move document compressor base (#17910) 2024-02-26 17:20:50 -08:00
embeddings core[minor]: moved fake llms and embeddings to core (#19226) 2024-03-18 10:01:26 -07:00
example_selectors core[patch]: Fix typo in VectorStoreExampleSelector doc-string (#21574) 2024-05-14 13:31:37 +00:00
indexing core[patch[: docstring update (#21036) 2024-04-29 15:35:34 -04:00
language_models core, standard tests, partner packages: add test for model params (#21677) 2024-05-17 13:51:26 -04:00
load fix: core: Include in json output also fields set outside the constructor (#21342) 2024-05-06 14:37:36 -07:00
messages core[patch]: RFC: Allow concatenation of messages with multi part content (#22002) 2024-06-03 09:46:40 -07:00
output_parsers infra: rm unused # noqa violations (#22049) 2024-05-22 15:21:08 -07:00
outputs infra: rm unused # noqa violations (#22049) 2024-05-22 15:21:08 -07:00
prompts infra: rm unused # noqa violations (#22049) 2024-05-22 15:21:08 -07:00
pydantic_v1 Separate out langchain_core package (#13577) 2023-11-20 13:09:30 -08:00
runnables core: In RunnableSequence pass kwargs to the first step (#22393) 2024-06-03 14:18:10 +00:00
tracers core[patch]: fix runnable history and add docs (#22283) 2024-05-30 11:26:41 -07:00
utils infra: rm unused # noqa violations (#22049) 2024-05-22 15:21:08 -07:00
__init__.py core[patch], community[patch]: mark runnable context, lc load as beta (#15603) 2024-01-05 17:54:26 -05:00
agents.py docs: modules descriptions (#17844) 2024-02-21 15:58:21 -08:00
caches.py community[minor]: Add async methods to CassandraCache and CassandraSemanticCache (#20654) 2024-04-30 10:27:44 -04:00
chat_history.py core[patch],community[patch]: Move file chat history back to community (#20834) 2024-04-24 12:47:25 -04:00
chat_loaders.py core[minor], community[patch], langchain[patch]: move BaseChatLoader to core (#19607) 2024-04-26 21:45:51 +00:00
chat_sessions.py docs: modules descriptions (#17844) 2024-02-21 15:58:21 -08:00
env.py core[patch]: update langchain-core runtime library name (#14884) 2023-12-20 14:35:48 -08:00
exceptions.py docs: modules descriptions (#17844) 2024-02-21 15:58:21 -08:00
globals.py core[patch]: Move globals to a module instead of a package (non breaking change) (#19159) 2024-03-19 12:29:12 -04:00
memory.py docs: modules descriptions (#17844) 2024-02-21 15:58:21 -08:00
prompt_values.py core[patch[: docstring update (#21036) 2024-04-29 15:35:34 -04:00
py.typed core[minor], langchain[patch], experimental[patch]: Added missing py.typed to langchain_core (#14143) 2023-12-01 19:15:23 -08:00
retrievers.py core: In BaseRetriever make get_relevant_docs delegate to invoke (#22434) 2024-06-03 07:34:53 -07:00
stores.py core[minor],langchain[patch],community[patch]: Move storage interfaces to core (#20750) 2024-04-30 13:14:26 -04:00
structured_query.py core[patch[: docstring update (#21036) 2024-04-29 15:35:34 -04:00
sys_info.py docs: modules descriptions (#17844) 2024-02-21 15:58:21 -08:00
tools.py [Core] Update Tracing Interops (#22318) 2024-05-30 10:34:49 -07:00
vectorstores.py core[minor]: Add async methods to MaxMarginalRelevanceExampleSelector (#19639) 2024-03-27 16:03:18 -04:00