diff --git a/examples/llm/agents/common.py b/examples/llm/agents/common.py index 528291b857..40af0d5de6 100644 --- a/examples/llm/agents/common.py +++ b/examples/llm/agents/common.py @@ -18,7 +18,7 @@ from langchain.agents import initialize_agent from langchain.agents import load_tools from langchain.agents.agent import AgentExecutor -from langchain.llms.openai import OpenAI +from langchain_openai import OpenAI from morpheus.config import Config from morpheus.pipeline.linear_pipeline import LinearPipeline diff --git a/tests/morpheus_llm/llm/nodes/test_langchain_agent_node.py b/tests/morpheus_llm/llm/nodes/test_langchain_agent_node.py index 0779b11604..ad4e131ace 100644 --- a/tests/morpheus_llm/llm/nodes/test_langchain_agent_node.py +++ b/tests/morpheus_llm/llm/nodes/test_langchain_agent_node.py @@ -32,8 +32,8 @@ from langchain.agents import initialize_agent from langchain.callbacks.manager import AsyncCallbackManagerForToolRun from langchain.callbacks.manager import CallbackManagerForToolRun - from langchain_community.chat_models.openai import ChatOpenAI from langchain_core.tools import BaseTool + from langchain_openai import ChatOpenAI except ImportError: pass diff --git a/tests/morpheus_llm/llm/test_agents_simple_pipe.py b/tests/morpheus_llm/llm/test_agents_simple_pipe.py index 5d33dacb03..123ea696f8 100644 --- a/tests/morpheus_llm/llm/test_agents_simple_pipe.py +++ b/tests/morpheus_llm/llm/test_agents_simple_pipe.py @@ -42,8 +42,8 @@ from langchain.agents.tools import Tool from langchain.schema import Generation from langchain.schema import LLMResult - from langchain_community.llms import OpenAI # pylint: disable=no-name-in-module from langchain_community.utilities import serpapi + from langchain_openai import OpenAI # pylint: disable=no-name-in-module except ImportError: pass