mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-25 08:03:39 +00:00
Use invoke
instead of __call__
(#16369)
The following warning information will be displayed when i use `llm(PROMPT)`: ```python /Users/169/llama.cpp/venv/lib/python3.11/site-packages/langchain_core/_api/deprecation.py:117: LangChainDeprecationWarning: The function `__call__` was deprecated in LangChain 0.1.7 and will be removed in 0.2.0. Use invoke instead. warn_deprecated( ``` So I changed to standard usage.
This commit is contained in:
parent
89372fca22
commit
c6bd7778b0
@ -316,7 +316,7 @@
|
||||
"prompt = \"\"\"\n",
|
||||
"Question: A rap battle between Stephen Colbert and John Oliver\n",
|
||||
"\"\"\"\n",
|
||||
"llm(prompt)"
|
||||
"llm.invoke(prompt)"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -618,7 +618,7 @@
|
||||
],
|
||||
"source": [
|
||||
"%%capture captured --no-stdout\n",
|
||||
"result = llm(\"Describe a person in JSON format:\")"
|
||||
"result = llm.invoke(\"Describe a person in JSON format:\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -674,7 +674,7 @@
|
||||
],
|
||||
"source": [
|
||||
"%%capture captured --no-stdout\n",
|
||||
"result = llm(\"List of top-3 my favourite books:\")"
|
||||
"result = llm.invoke(\"List of top-3 my favourite books:\")"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user