mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-23 15:19:33 +00:00
docs[patch]: update trim messages wording (#30174)
This commit is contained in:
parent
1c993b921c
commit
6c05d4b153
@ -30,7 +30,8 @@
|
|||||||
"1. The resulting chat history should be **valid**. Usually this means that the following properties should be satisfied:\n",
|
"1. The resulting chat history should be **valid**. Usually this means that the following properties should be satisfied:\n",
|
||||||
" - The chat history **starts** with either (1) a `HumanMessage` or (2) a [SystemMessage](/docs/concepts/messages/#systemmessage) followed by a `HumanMessage`.\n",
|
" - The chat history **starts** with either (1) a `HumanMessage` or (2) a [SystemMessage](/docs/concepts/messages/#systemmessage) followed by a `HumanMessage`.\n",
|
||||||
" - The chat history **ends** with either a `HumanMessage` or a `ToolMessage`.\n",
|
" - The chat history **ends** with either a `HumanMessage` or a `ToolMessage`.\n",
|
||||||
" - A `ToolMessage` can only appear after an `AIMessage` that involved a tool call. \n",
|
" - A `ToolMessage` can only appear after an `AIMessage` that involved a tool call.\n",
|
||||||
|
"\n",
|
||||||
" This can be achieved by setting `start_on=\"human\"` and `ends_on=(\"human\", \"tool\")`.\n",
|
" This can be achieved by setting `start_on=\"human\"` and `ends_on=(\"human\", \"tool\")`.\n",
|
||||||
"3. It includes recent messages and drops old messages in the chat history.\n",
|
"3. It includes recent messages and drops old messages in the chat history.\n",
|
||||||
" This can be achieved by setting `strategy=\"last\"`.\n",
|
" This can be achieved by setting `strategy=\"last\"`.\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user