Python Langchain «Метод apply_and_parse устарел, вместо этого передайте анализатор вывода непосредственно в LLMChain».Python

Программы на Python
Anonymous
 Python Langchain «Метод apply_and_parse устарел, вместо этого передайте анализатор вывода непосредственно в LLMChain».

Сообщение Anonymous »

Я использую langchain для получения ответа на основе моих собственных данных, но он возвращает ошибку «Метод apply_and_parse устарел, вместо этого передайте анализатор вывода непосредственно в LLMChain». Как я могу это решить? Может ли кто-нибудь мне помочь?
def LoadVector():
global VectorStore
VectorStore = FAISS.load_local(Vector_Path, embeddings)

LoadVector()

memory = ConversationBufferMemory(
memory_key="chat_history", return_messages=True,)
#retriever = VectorStore.as_retriever()
retriever = VectorStore.as_retriever(search_type="mmr")

qa = ConversationalRetrievalChain.from_llm(OpenAI(temperature=0), retriever=retriever, memory=memory,chain_type="map_rerank")
query="what is power app give response in detail"
result = qa({"question": query})
print(result)`

output:

CustomChatBotGPTModel\env\Lib\site-packages\langchain\chains\llm.py:303: UserWarning: The apply_and_parse method is deprecated, instead pass an output parser directly to LLMChain.
warnings.warn(
{'question': 'what is power app give response in detail', 'chat_history': [HumanMessage(content='what is power app give response in detail', additional_kwargs={}, example=False), AIMessage(content=' Power
Apps is a low-code platform for building custom business applications. It enables users to create applications from data that can be used across mobile, tablet, and web platforms. It also provides a canvas for users to create applications with a drag-and-drop interface. Power Apps also provides a library of connectors to connect to other services such as Dynamics 365, Office 365, SharePoint, and more.', additional_kwargs={}, example=False)], 'answer': ' Power Apps is a low-code platform for building custom business applications. It enables users to create applications from data that can be used across mobile, tablet, and web platforms. It also provides a canvas for users to create applications with a drag-and-drop interface. Power Apps also provides a library of connectors to connect to other services such as Dynamics 365, Office 365, SharePoint, and more.'}


Подробнее здесь: https://stackoverflow.com/questions/768 ... ss-an-outp

Вернуться в «Python»