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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Gemini models via VertexAI? #1269

Open
tytung2020 opened this issue Jul 5, 2024 · 2 comments
Open

Support for Gemini models via VertexAI? #1269

tytung2020 opened this issue Jul 5, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@tytung2020
Copy link

System Info

import os
import pandas as pd
from pandasai import Agent
from pandasai.llm import GoogleVertexAI

馃悰 Describe the bug

any update on this issue? I saw an earlier issue and it was closed, but after I tested it still not able to use Google VertexAI with these parameters:

llm = GoogleVertexAI(
    project_id="some_location", location="us-central1", model="gemini-1.5-flash"
)

with this error:
ERROR:pandasai.helpers.logger:Pipeline failed on step 3: Unsupported model: The model 'gemini-1.5-flash' doesn't exist or is not supported yet.
Unfortunately, I was not able to answer your question, because of the following error:

Unsupported model: The model 'gemini-1.5-flash' doesn't exist or is not supported yet.

@dosubot dosubot bot added the bug Something isn't working label Jul 5, 2024
Copy link

dosubot bot commented Jul 5, 2024

The GoogleVertexAI class in pandas-ai currently supports the "gemini-pro" model. The model "gemini-1.5-flash" is not listed as a supported model, which is why you are encountering the "Unsupported model" error.

Here is the relevant part of the code that lists the supported generative models:

_supported_generative_models = [
    "gemini-pro",
]

To resolve this issue, you should use the "gemini-pro" model instead of "gemini-1.5-flash":

llm = GoogleVertexAI(
    project_id="some_location", location="us-central1", model="gemini-pro"
)

For more details, you can refer to the GoogleVertexAI class implementation [1].

To continue talking to Dosu, mention @dosu.

@tytung2020
Copy link
Author

ok gemini-pro works, but I need it to based on the latest gemini-1.5-flash or gemini-1.5-pro. gemini-pro is based on a Nov 2023 version which is not that accurate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant