Skip to content

Commit 3651233

Browse files
mdrxyCopilot
andauthored
migration guide additions & fix refs build (#1190)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 3eeb46a commit 3651233

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

reference/python/mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ plugins:
228228
# Preload modules before collecting documentation to enable cross-references
229229
- langchain
230230
- langchain_core
231+
- langgraph
231232
- langsmith
232233

233234
# Generate objects.inv file for this site to enable cross-referencing from other sites

src/oss/python/migrate/langchain-v1.mdx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -936,9 +936,9 @@ Existing functionality outside the focus of standard interfaces and agents has b
936936

937937
Methods, functions, and other objects that were already deprecated and slated for removal in 1.0 have been deleted. Check the [deprecation notices](https://python.langchain.com/docs/versions/migrating_chains) from previous versions for replacement APIs.
938938

939-
### `.text()` is now a property
939+
### Text property
940940

941-
Use of the `.text()` method on message objects should drop the parentheses:
941+
Use of the `.text()` method on message objects should drop the parentheses, as it is now a property:
942942

943943
```python
944944
# Property access
@@ -948,4 +948,16 @@ text = response.text
948948
text = response.text()
949949
```
950950

951-
Existing usage patterns (i.e., `.text()`) will continue to function but now emit a warning.
951+
Existing usage patterns (i.e., `.text()`) will continue to function but now emit a warning. The method form will be removed in v2.
952+
953+
### `example` parameter removed from `AIMessage`
954+
955+
The `example` parameter has been removed from @[`AIMessage`] objects. We recommend migrating to use `additional_kwargs` for passing extra metadata as needed.
956+
957+
## Minor changes
958+
959+
- `AIMessageChunk` objects now include a `chunk_position` attribute with position `'last'` to indicate the final chunk in a stream. This allows for clearer handling of streamed messages. If the chunk is not the final one, `chunk_position` will be `None`.
960+
- `LanguageModelOutputVar` is now typed to @[`AIMessage`] instead of @[`BaseMessage`].
961+
- The logic for merging message chunks (`AIMessageChunk.add`) has been updated with more sophisticated selection handling for the final id for the merged chunk. It prioritizes provider-assigned IDs over LangChain-generated IDs.
962+
- We now open files with `utf-8` encoding by default.
963+
- Standard tests now use multimodal content blocks.

0 commit comments

Comments
 (0)