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.41k stars 1.68k forks source link

[Bug]: `gemini_inference` function definition in `small_to_big_rag.ipynb` notebook does not take chat argument #621

Closed rossdanlm closed 2 months ago

rossdanlm commented 3 months ago

File Name

generative-ai/gemini/use-cases/retrieval-augmented-generation/small_to_big_rag/small_to_big_rag.ipynb

What happened?

The function definition should include chat argument since it's called with two arguments throughout rest of notebook (or chat argument needs to be deleted from callsites, not sure what right answer is)

Screenshot 2024-04-25 at 11 57 53

Relevant log output

{
    "name": "TypeError",
    "message": "gemini_inference() takes 1 positional argument but 2 were given",
    "stack": "---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[9], line 1
----> 1 gemini_inference(chat, \"hello world!\")

TypeError: gemini_inference() takes 1 positional argument but 2 were given"
}

Code of Conduct

rossdanlm commented 3 months ago

Heads up, running into another issue, not sure if it's related: https://github.com/GoogleCloudPlatform/generative-ai/issues/622