google-gemini / generative-ai-python

The official Python library for the Google Gemini API

Home Page:https://pypi.org/project/google-generativeai/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

System Instructions for Gemini 1.0?

annamalaiarunachalam opened this issue · comments

          > @Bikatr7, [System Instructions](https://ai.google.dev/docs/system_instructions) is introduced in `Gemini 1.5 pro` only as I am unable to see this feature while using `Gemini 1.0` pro model on AI studio. We will keep you posted if this feature gets introduced to Gemini 1.0. Meanwhile, You can keep using for Gemini 1.5 pro. If this issue is resolved for you, you can go ahead and close this issue. Thank you

Hello, I tried with 1.5-pro, I get a different error.
ValueError Traceback (most recent call last).....................................................
...............................
GoogleGenerativeAIError: Error embedding content: content must not be empty
if I use 1.0 I get the above error raised by the original thread. If I change to 1.5, get this error. But I didnt get any error when I used OpenAI's chat model. Why is Google's API's so annoying. You guys keen to gain more adoption, but the experience sucks. Just the other day, Google Architect, almost forced me to move away from openAi models, how can I do that? how to trust these unreliable google models.
even the embedding model is not good. Please reply to the error msg reported above.

Originally posted by @annamalaiarunachalam in #278 (comment)

Hello, I tried with 1.5-pro, I get a different error.
ValueError Traceback (most recent call last).....................................................
...............................
GoogleGenerativeAIError: Error embedding content: content must not be empty
if I use 1.0 I get the above error raised by the original thread. If I change to 1.5, get this error. But I didnt get any error when I used OpenAI's chat model. Why is Google's API's so annoying. You guys keen to gain more adoption, but the experience sucks. Just the other day, Google Architect, almost forced me to move away from openAi models, how can I do that? how to trust these unreliable google models.
even the embedding model is not good. Please reply to the error msg reported above.

@annamalaiarunachalam,

System Instructions are introduced in Gemini 1.5 pro and will not work with Gemini 1.0 pro model. I tried running my attached gist with system instructions and it works without any issues. Please try running the gist and share with us the colab gist or code to reproduce the error you are facing on our end. Thank you!

@annamalaiarunachalam, The error might be an intermittent issue. Requesting you to close this issue, it it's resolved for you. Thank you!

The new gemini-1.5-flash model is cheaper and faster than gemini-1.5-pro, flash supports system instructions. Use flash.