home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.9k stars 30.12k forks source link

Google Generative AI : 400 * GenerateContentRequest.tools[0].function_declarations[12].name: Invalid function name #122265

Closed nishanthjeesoft closed 2 months ago

nishanthjeesoft commented 2 months ago

The problem

Am getting this Error in latest version of Core: If Assist is disabled then working properly. And if enabled then getting below Error.

Response Message: Sorry, I had a problem talking to Google Generative AI: 400 * GenerateContentRequest.tools[0].functiondeclarations[12].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.

Log: 2024-07-20 23:40:17.869 ERROR (MainThread) [homeassistant.components.google_generative_ai_conversation] Error sending message: <class 'google.api_core.exceptions.InvalidArgument'> 400 * GenerateContentRequest.tools[0].functiondeclarations[12].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.

2024-07-20 23:41:27.588 ERROR (MainThread) [homeassistant.components.google_generative_ai_conversation] Error sending message: <class 'google.api_core.exceptions.InvalidArgument'> 400 * GenerateContentRequest.tools[0].functiondeclarations[12].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.

2024-07-20 23:43:18.277 ERROR (MainThread) [homeassistant.components.google_generative_ai_conversation] Error sending message: <class 'google.api_core.exceptions.InvalidArgument'> 400 * GenerateContentRequest.tools[0].functiondeclarations[12].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.

2024-07-20 23:50:42.214 DEBUG (MainThread) [homeassistant.components.google_generative_ai_conversation] Input: 'hi' with history: [] 2024-07-20 23:50:44.076 ERROR (MainThread) [homeassistant.components.google_generative_ai_conversation] Error sending message: <class 'google.api_core.exceptions.InvalidArgument'> 400 * GenerateContentRequest.tools[0].functiondeclarations[12].name: Invalid function name. Must start with a letter or an underscore. Must be alphameric (a-z, A-Z, 0-9), underscores (), dots (.) or dashes (-), with a maximum length of 64.

What version of Home Assistant Core has the issue?

2024.7.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Google Generative AI

Link to integration documentation on our website

https://www.home-assistant.io/integrations/google_generative_ai_conversation

Diagnostics information

home-assistant_google_generative_ai_conversation_2024-07-20T18-20-48.327Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 2 months ago

Hey there @tronikos, mind taking a look at this issue as it has been labeled with an integration (google_generative_ai_conversation) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `google_generative_ai_conversation` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign google_generative_ai_conversation` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


google_generative_ai_conversation documentation google_generative_ai_conversation source (message by IssueLinks)

tronikos commented 2 months ago

Duplicate of https://github.com/home-assistant/core/issues/120673

tronikos commented 2 months ago

Until it's fixed you have to unexpose scripts with such name