#Google Generative AI 400 bad request error

1 messages · Page 1 of 1 (latest)

wraith nebula
#

Started getting this error today when using the assis pipline

2024-10-09 08:43:52.350 ERROR (MainThread) [homeassistant.components.google_generative_ai_conversation] Error sending message: <class 'google.api_core.exceptions.InvalidArgument'> 400 Unable to submit request because it has a topK value of 64 but the supported range is from 1 (inclusive) to 41 (exclusive). Update the value and try again.

running 2024.10

Tried deleting and re adding the integration and that did not help. Pointers on how I can fix this?

zealous tendon
#

sounds like you need to go into advanced options on the agent and set topk to 41?

wraith nebula
#

What could cause recommended settings to stop working? I see the docs on how to change this so I will try it out

#

curious what caused this, not that I understand anything related to AI just a dumb user 😂

#

I updated it in the ui and it still says 41 is max. Is a home assistant restart required?

#

nvm, i had to change it to 40 not 64

#

its working now

zealous tendon
#

Yeah guessing google changed the requirement on their side

#

Saw something like this happen before using that agent

wraith nebula
#

So would that mean we would/should change defaults setup by Home Assistant?

primal orbit
#

exclusive means up to, but not including. So 40 is max accepted value.