Azure-Samples / chat-with-your-data-solution-accelerator

A Solution Accelerator for the RAG pattern running in Azure, using Azure AI Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences. This includes most common requirements and best practices.
https://azure.microsoft.com/products/search
MIT License
855 stars 439 forks source link

Fix deprecations in `lang_chain_agent.py` #998

Open cecheta opened 6 months ago

cecheta commented 6 months ago

Motivation

There are a number of deprecations that appear in lang_chain_agent.py that will be removed in LangChain 0.3.0. We should attempt to fix these now, rather than waiting for version 0.3.0.

WARNING:py.warnings:/home/vscode/.cache/pypoetry/virtualenvs/chat-with-your-data-solution-accelerator-PQGzWDPx-py3.11/lib/python3.11/site-packages/langchain_core/_api/deprecation.py:119: LangChainDeprecationWarning: The class `LLMChain` was deprecated in LangChain 0.1.17 and will be removed in 0.3.0. Use RunnableSequence, e.g., `prompt | llm` instead.
  warn_deprecated(

WARNING:py.warnings:/home/vscode/.cache/pypoetry/virtualenvs/chat-with-your-data-solution-accelerator-PQGzWDPx-py3.11/lib/python3.11/site-packages/langchain_core/_api/deprecation.py:119: LangChainDeprecationWarning: The class `ZeroShotAgent` was deprecated in LangChain 0.1.0 and will be removed in 0.3.0. Use create_react_agent instead.
  warn_deprecated(

WARNING:py.warnings:/home/vscode/.cache/pypoetry/virtualenvs/chat-with-your-data-solution-accelerator-PQGzWDPx-py3.11/lib/python3.11/site-packages/langchain_core/_api/deprecation.py:119: LangChainDeprecationWarning: The method `Chain.run` was deprecated in langchain 0.1.0 and will be removed in 0.3.0. Use invoke instead.
  warn_deprecated(

Requirements

A list of requirements to consider this feature delivered

Tasks

To be filled in by the engineer picking up the issue

github-actions[bot] commented 1 day ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days.