Has anyone had success in calling the new Google AI Studio (previously MakerSuite) Gemini API?
I would like to use the gemini-pro LLM model. At presently I can only seem to get the integration to use the PaLM Bison model.
Configuring the Google Generative AI Conversation Integration, I am unable to use the gemini model
models/gemini-pro
but can still use the bison model
models/chat-bison-001
The following is the error message:
Sorry, I had a problem talking to Google Generative AI: 404
models/gemini-pro is not found for API version v1beta2, or is not supported for generateMessage. Call ListModels to see the list of available models and their supported methods.
I’m the author of the Google Generative AI Conversation integration. It requires a few small changes to switch to Gemini Pro. I also plan on adding support for Gemini Pro Vision for the next core release.
@tronikos Can we pull your repo from git via HACS to get your fixes early?
Also I’m guessing @User87 wants function calling like the OpenAI conversation agent to control and send commands. That would be amazing to not have to pay for credits on OpenAI.
One question though - Gemini Pro is not directly available in my country yet. Would it be possible to use Vertex AI API with Gemini Pro as a model instead - described here: https://ai.google.dev/examples?hl=en&keywords=vertexai
I have the service working perfect in dev tools/services. i cant figure out how to store the response to something i can use? Any chance you could provide an example?
yea, also I can’t use the nest api as an image_filename: either. I don’t totally understand response_variable: or blueprints either. I think what you provided is a blueprint? This is what I came up with as I believe I am also going to have to store the thumbnail in a response_variable: ?
- id: 'c12'
alias: Doorbell Camera Snapshot Notification
trigger:
platform: device
device_id: feb17d26775a5xxxxxxxxxxxxxxxxx
domain: nest
type: camera_person
action:
- service_template: >-
{%- if is_state('input_boolean.home', 'off') or
not is_state('device_tracker.iphone', 'home') and
is_state('sensor.ipad_ssid', 'wirelessfun') -%}
notify.mobile_app_iphone
{% else %}
notify.ios
{% endif %}
data:
message: Person Detected at the Front Door.
data:
image: >-
/api/nest/event_media/{{ trigger.event.data.device_id }}/{{ trigger.event.data.nest_event_id }}/thumbnail
response_variable: thumbnail
- service: google_generative_ai_conversation.generate_content
data:
prompt: "Very briefly describe what you see in this image from my doorbell camera. Your message needs to be short enough to fit in a phone notification. Do not describe stationary objects or buildings."
image_filename: {{ thumbnail}}
response_variable: content
- service: tts.speak
target:
entity_id: tts.piper
data:
media_player_entity_id: media_player.google_mini
message: "{{ content.text }}"
cache: false
- variables:
content: "{{ content}}"
- stop: end
response_variable: content
mode: queued