home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
4.14k stars 2.82k forks source link

Assist: Long Answers Cut Off #22125

Open annomatik opened 2 months ago

annomatik commented 2 months ago

Checklist

Describe the issue you are experiencing

Hi! In the Assist window, long answers are cut off, which makes it a bit hard to use. Of course, the window being small is not so helpful in that case either ( https://github.com/home-assistant/frontend/discussions/22124 ).

Would it be possible to make the output unlimited or at least cut it off at, I don't know, two pages or so of output? Thanks!

a8129580059db0ff7dfe8746857bec0d72e422e3

(also posted here: https://community.home-assistant.io/t/maximizing-the-assist-window/774531/2)

Describe the behavior you expected

I would like to have unlimited output in the assist window. Right now, it seems to be simply cut off after a certain number of characters (see screenshot).

Steps to reproduce the issue

  1. In Settings > Devices & Services, create a "Google Generative AI" integration
  2. In Settings > Voice assistant, create a new Assistant with the Google Generative AI integration from step 1 as Conversation agent
  3. In Google Chrome, or a similar web browser, open the assist window (top right browser side, second icon from the right, looks like a speech bubble with three dots in it).
  4. Ask something with a longer output, e.g. "what is needed for a good project mnanagement?"
  5. Notice, that the text after "Important Tools:" is missing (and that the window ist too small, but that's noted in https://github.com/home-assistant/frontend/discussions/22124 ) ...

image

What version of Home Assistant Core has the issue?

2024.9.2

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Google Chrome 129.0.6668.70

Which operating system are you using to run this browser?

Windows 10

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

sammccants commented 1 month ago

I had the same issue, and I just worked out that it's from a default setting which you can change. I am using OpenAI, but I believe the same should be true for Google's model based on this forum post. Bear in mind that (at least for how OpenAI charges for API usage), this will very likely increase costs.

Here are the steps I followed to increase the limit:

  1. Navigate to the integration by going to Settings > Devices & Services > the integration (for me, OpenAI Conversation)
  2. Next to the service, click Configure
  3. Uncheck "Recommended model settings"
  4. Change the value in "Maximum tokens to return in response". I updated mine from 150 to 500, so from ~112 to ~375 words
  5. Submit > Finish