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

error:module 'langchain' has no attribute 'debug' #689

Open
pulkit21aug opened this issue Jan 12, 2025 · 2 comments
Open

error:module 'langchain' has no attribute 'debug' #689

pulkit21aug opened this issue Jan 12, 2025 · 2 comments

Comments

@pulkit21aug
Copy link

langchain code is giving error for unknow attribute debug change the code to use debug attribute. code needs to be changed to use verbose field

from langchain_core.messages import HumanMessage,SystemMessage
from langchain_google_genai import ChatGoogleGenerativeAI

from google_vertex.auth_login import get_gemini_api_key

model = ChatGoogleGenerativeAI(model="gemini-1.5-flash-002",google_api_key=get_gemini_api_key(),verbose=False,
                           convert_system_message_to_human=True)

message = [SystemMessage(content="Hello Bot"),HumanMessage(content="Jata mata di")]
try :
model.invoke(message)
except Exception as e:
print(f"error:{e}")

C:\python\python.exe D:\github\DataScience\gen-ai\langchain\hello_world_langchain.py
error:module 'langchain' has no attribute 'debug'

Process finished with exit code 0

@langcarl langcarl bot added the investigate label Jan 12, 2025
@pulkit21aug
Copy link
Author

pip show langchain
Name: langchain
Version: 0.3.14
Summary: Building applications with LLMs through composability
Home-page: https://github.com/langchain-ai/langchain
Author:
Author-email:
License: MIT
Location: C:\python\Lib\site-packages
Requires: aiohttp, langchain-core, langchain-text-splitters, langsmith, numpy, pydantic, PyYAML, requests, SQLAlchemy, tenacity
Required-by: composio_langchain, crewai, crewai-tools, embedchain, langchain-community, langchain-google-calendar-tools, langflow-base

@pulkit21aug
Copy link
Author

pip show langchain_google_genai
Name: langchain-google-genai
Version: 2.0.8
Summary: An integration package connecting Google's genai package and LangChain
Home-page: https://github.com/langchain-ai/langchain-google
Author:
Author-email:
License: MIT
Location: C:\python\Lib\site-packages
Requires: filetype, google-generativeai, langchain-core, pydantic
Required-by: langflow

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

No branches or pull requests

1 participant