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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: Google Gemini 1.5 flash model support #13573

Closed
1 task done
dinonovak opened this issue May 18, 2024 · 3 comments · Fixed by #13791
Closed
1 task done

[Question]: Google Gemini 1.5 flash model support #13573

dinonovak opened this issue May 18, 2024 · 3 comments · Fixed by #13791
Labels
question Further information is requested

Comments

@dinonovak
Copy link

Question Validation

  • I have searched both the documentation and discord for an answer.

Question

Hi,

I am trying to use gemini flash with following model definition
llm = Gemini(
model="models/gemini-1.5-flash-latest",
api_key="SOME-KEY",
is_chat_model=True,
is_function_calling_model=False,
temperatue=0.1
)

but on llm.complete() I am getting:
Error 400 Add an image to use models/gemini-pro-vision, or switch your model to a text model.

@dinonovak dinonovak added the question Further information is requested label May 18, 2024
Copy link

dosubot bot commented May 18, 2024

To address the error you're encountering with the Gemini 1.5 flash model, it's important to ensure you're using the model correctly for text-based tasks, as it seems you're not intending to use it with images. Here's what you need to do:

  1. Correct Model Name: Double-check that the model name "models/gemini-1.5-flash-latest" is correctly specified. This model can handle text inputs without requiring images.

  2. Text-Only Requests: If your use case is text-only, make sure not to include any image parameters in your request. The model should work without needing to add images.

  3. Including Images: If you decide to include images in the future, you'll need to provide valid ImageDocument objects in the image_documents parameter. Ensure each ImageDocument has a valid image path.

  4. API Key and Authentication: Verify that your API key and any other authentication methods are correctly set up. This is crucial for accessing the model without errors.

By following these steps, you should be able to use the Gemini 1.5 flash model for your text or multi-modal tasks without encountering the error. Ensure your environment is correctly configured, especially if you're integrating with Google's API or any other external services.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

@carlisia
Copy link

carlisia commented May 20, 2024

I am having the same issue, and have tried with different generative models.

@edoardolobl
Copy link

Unfortunately, I am encountering the same problem. I've tried everything and couldn't find a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants