GoogleCloudPlatform / generative-ai

Sample code and notebooks for Generative AI on Google Cloud, with Gemini on Vertex AI
https://cloud.google.com/vertex-ai/docs/generative-ai/learn/overview
Apache License 2.0
6.49k stars 1.72k forks source link

Getting `TypeError` when using LangChain 0.0.316 in `search/retrieval-augmented-generation/examples/question_answering.ipynb` #231

Closed matthiasa4 closed 9 months ago

matthiasa4 commented 9 months ago

When trying the example in search/retrieval-augmented-generation/examples/question_answering.ipynb I am getting: TypeError: TextGenerationModel.predict() got an unexpected keyword argument 'candidate_count'.

After changing to version 0.0.310 as per this issue the notebook seems to run as expected. But it misses GoogleVertexAIMultiTurnSearchRetriever.

holtskinner commented 9 months ago

I was able to reproduce this when using google-cloud-aiplatform==1.34.0 with langchain==0.0.316

However, it doesn't occur when using google-cloud-aiplatform==1.35.0

PR #232 should fix this

matthiasa4 commented 9 months ago

Thanks @holtskinner !