Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade the new dspy version but some module is not callable #30112

Open
5 tasks done
wenwenshenqihailuo opened this issue Mar 5, 2025 · 0 comments
Open
5 tasks done

Comments

@wenwenshenqihailuo
Copy link

Checked other resources

  • I added a very descriptive title to this issue.
  • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant