-
-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Add recommended model checkbox to Google Generative AI #117893
Conversation
Hey there @tronikos, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
homeassistant/components/google_generative_ai_conversation/const.py
Outdated
Show resolved
Hide resolved
homeassistant/components/google_generative_ai_conversation/const.py
Outdated
Show resolved
Hide resolved
homeassistant/components/google_generative_ai_conversation/const.py
Outdated
Show resolved
Hide resolved
homeassistant/components/google_generative_ai_conversation/conversation.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
"prompt": "Prompt Template", | ||
"extra_prompt": "Extra prompt template", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it more clear that this will be appended to the default recommended prompt that includes areas and devices?
@@ -23,14 +24,15 @@ | |||
{%- endfor %} | |||
""" | |||
|
|||
CONF_RECOMMENDED = "recommended" | |||
RECOMMENDED_LABEL = "Recommended (Gemini 1.5 Flash)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused
else: | ||
raw_prompt = self.entry.options.get(CONF_PROMPT, DEFAULT_PROMPT) | ||
|
||
model_name = self.entry.options.get(CONF_CHAT_MODEL, RECOMMENDED_CHAT_MODEL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you simplified the code, you can now inline again these 5 variables.
Breaking change
Proposed change
Add a new "Recommended Settings" option to Google Generative AI. When enabled, it hides all technical options. It allows us to tweak the recommended model/prompt and being sure that all users get it.
When you disable the checkbox and hit submit, the form will reload but with the technical options. They will default to the recommended values. As you can see in the example, it will render the final prompt of the recommended settings (default prompt + user customized prompt)
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: