mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-08 06:23:20 +00:00
docs(docs): added content=
keyword when creating SystemMessage
and HumanMessage
(#32734)
Description: Added the content= keyword when creating SystemMessage and HumanMessage in the messages list, making it consistent with the API reference.
This commit is contained in:
@@ -159,7 +159,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 3,
|
"execution_count": null,
|
||||||
"id": "1b2481f0",
|
"id": "1b2481f0",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@@ -178,8 +178,8 @@
|
|||||||
"from langchain_core.messages import HumanMessage, SystemMessage\n",
|
"from langchain_core.messages import HumanMessage, SystemMessage\n",
|
||||||
"\n",
|
"\n",
|
||||||
"messages = [\n",
|
"messages = [\n",
|
||||||
" SystemMessage(\"Translate the following from English into Italian\"),\n",
|
" SystemMessage(content=\"Translate the following from English into Italian\"),\n",
|
||||||
" HumanMessage(\"hi!\"),\n",
|
" HumanMessage(content=\"hi!\"),\n",
|
||||||
"]\n",
|
"]\n",
|
||||||
"\n",
|
"\n",
|
||||||
"model.invoke(messages)"
|
"model.invoke(messages)"
|
||||||
|
Reference in New Issue
Block a user