Open xxh18819431660 opened 1 month ago
Modified the issue description to locate the problem and the code that needs to be modified more quickly.
/assign @jaelgu I think you are working on the updates. /unassign
@xxh18819431660 The tutorial has been updated recently. Please check again: https://milvus.io/docs/integrate_with_langchain.md
Is there an existing issue for this?
Environment
Current Behavior
When I refer to the docs of version 2.4.x and run the sample code of Question Answering over Documents with Milvus and LangChain, I find that the code runs with this error:
NameError: name 'PromptTemplate' is not defined
The specific error location is in run of the Ask your question code. The specific code israg_prompt = PromptTemplate.from_template(template)
. https://milvus.io/docs/integrate_with_langchain.md#Ask-your-questionExpected Behavior
I sincerely hope that the committers can change this code in https://milvus.io/docs/integrate_with_langchain.md#Prepare-data:
from langchain_core.prompts import ChatPromptTemplate
tofrom langchain_core.prompts import PromptTemplate
In this way, no error will be reported when the package method is called later.Steps To Reproduce
No response
Milvus Log
No response
Anything else?
No response