You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched the LangChain documentation with the integrated search.
I used the GitHub search to find a similar question and didn't find it.
I am sure that this is a bug in LangChain rather than my code.
The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
Example Code
from dotenv import load_dotenv, find_dotenv
from langchain_openai import ChatOpenAI
from langchain.prompts import PromptTemplate
from langchain_core.output_parsers import StrOutputParser
from dspy.predict.langchain import LangChainModule, LangChainPredict
import os
import dspy
load_dotenv(find_dotenv())
api_key = os.getenv("OPENAI_API_KEY")
model = ChatOpenAI(model="gpt-4o-2024-11-20", temperature=0,top_p=1)
Error Message and Stack Trace (if applicable)
Cell In[1], line 5
3 from langchain.prompts import PromptTemplate
4 from langchain_core.output_parsers import StrOutputParser
----> 5 from dspy.predict.langchain import LangChainModule, LangChainPredict
6 import os
ModuleNotFoundError: No module named 'dspy.predict.langchain'
Description
I upgrade the newest dspy version but the ”dspy.predict.langchain“ is not callable
this is my version
openai 1.65.3
Jinja2 3.1.5
dspy 2.6.10
dspy-ai 2.6.10
langchain 0.3.20
langchain-community 0.3.19
langchain-core 0.3.41
langchain-google-genai 2.0.11
langchain-google-vertexai 2.0.14
langchain-openai 0.3.7
langchain-text-splitters 0.3.6
System Info
no
The text was updated successfully, but these errors were encountered:
Checked other resources
Example Code
from dotenv import load_dotenv, find_dotenv
from langchain_openai import ChatOpenAI
from langchain.prompts import PromptTemplate
from langchain_core.output_parsers import StrOutputParser
from dspy.predict.langchain import LangChainModule, LangChainPredict
import os
import dspy
load_dotenv(find_dotenv())
api_key = os.getenv("OPENAI_API_KEY")
model = ChatOpenAI(model="gpt-4o-2024-11-20", temperature=0,top_p=1)
Error Message and Stack Trace (if applicable)
Cell In[1], line 5
3 from langchain.prompts import PromptTemplate
4 from langchain_core.output_parsers import StrOutputParser
----> 5 from dspy.predict.langchain import LangChainModule, LangChainPredict
6 import os
ModuleNotFoundError: No module named 'dspy.predict.langchain'
Description
I upgrade the newest dspy version but the ”dspy.predict.langchain“ is not callable
this is my version
openai 1.65.3
Jinja2 3.1.5
dspy 2.6.10
dspy-ai 2.6.10
langchain 0.3.20
langchain-community 0.3.19
langchain-core 0.3.41
langchain-google-genai 2.0.11
langchain-google-vertexai 2.0.14
langchain-openai 0.3.7
langchain-text-splitters 0.3.6
System Info
no
The text was updated successfully, but these errors were encountered: