Spaces:
Running
Running
sunheycho
commited on
Commit
·
4429488
1
Parent(s):
51940dd
Fix: Correct LangChain ChatOpenAI import path
Browse files- Change from langchain_community.chat_models to langchain_openai
- This fixes the import error causing 'Product comparison module not available' in Hugging Face Spaces
- Resolves HTTP 500 error in /api/product/compare/start endpoint
- product_comparison.py +1 -1
product_comparison.py
CHANGED
@@ -37,7 +37,7 @@ try:
|
|
37 |
from langchain.agents import AgentExecutor
|
38 |
from langchain.memory import ConversationBufferMemory
|
39 |
from langchain.tools.render import format_tool_to_openai_function
|
40 |
-
from
|
41 |
from langchain_experimental.tools.python.tool import PythonAstREPLTool
|
42 |
LANGCHAIN_AVAILABLE = True
|
43 |
except ImportError:
|
|
|
37 |
from langchain.agents import AgentExecutor
|
38 |
from langchain.memory import ConversationBufferMemory
|
39 |
from langchain.tools.render import format_tool_to_openai_function
|
40 |
+
from langchain_openai import ChatOpenAI
|
41 |
from langchain_experimental.tools.python.tool import PythonAstREPLTool
|
42 |
LANGCHAIN_AVAILABLE = True
|
43 |
except ImportError:
|