SAP-samples / btp-generative-ai-hub-use-cases

Samples on how to build industry solution leveraging generative AI capabilities on top of SAP BTP and integrated with SAP S/4HANA Cloud.
https://partneredge.sap.com/en/library/education/products/btp/build/e_ep_use-cases_ai-foundation.html
Apache License 2.0
39 stars 40 forks source link

ModuleNotFoundError: No module named 'langchain_google_genai' #12

Closed prabhatpathania closed 3 months ago

prabhatpathania commented 4 months ago

While running application which were working perfectly fine suddenly I am getting the error:

from langchain_google_genai import ChatGoogleGenerativeAI as ChatGoogleGenerativeAI_ ModuleNotFoundError: No module named 'langchain_google_genai'

It points to statement:

from gen_ai_hub.proxy.langchain.init_models import init_llm To reproduce, you can create a python file with just the above line of code.

YatseaLi commented 3 months ago

Hi @prabhatpathania,

It is due to some recent update on the SAP Generative AI SDK package.

Please update to the latest SAP Generative AI SDK with this command: pip install -U generative-ai-hub-sdk[langchain]

Kind Regards, Yatsea

YatseaLi commented 3 months ago

fixed with update to latest sdk generative-ai-hub-sdk[langchain]