langchain-ai / langchain-google

MIT License
74 stars 78 forks source link

Google MedLM-Medium is missed out. #282

Closed smannathan closed 3 weeks ago

smannathan commented 3 weeks ago

https://github.com/langchain-ai/langchain-google/blob/26342d181798e4e21cb3137cec5071d425540365/libs/vertexai/langchain_google_vertexai/_utils.py#L139

I tried invoke medlm-medium and it is using the wrong vertexai.generative_models. It refers to GenerativeModel instead of TextGenerationModel and failling

Here is the fix,

if "medlm-large" in value.lower():
         return GoogleModelFamily.PALM
elif "medlm" in value.lower():
          return GoogleModelFamily.PALM
smannathan commented 3 weeks ago

Pull request for this issue - https://github.com/langchain-ai/langchain-google/pull/283