201 Commits

Author SHA1 Message Date
Allen Porter
d91528648f
Update ollama to allow selecting mutiple LLM APIs (#142445)
* Update ollama to allow selecting mutiple LLM APIs

* Update homeassistant/helpers/llm.py

* Avoid gather since these don't do I/O

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2025-04-13 15:37:46 -07:00
Michael Hansen
8db91623ec
Add language scores websocket command (#140480)
* Add language scores websocket command

* Don't store language scores in snapshot

* Add language/country args for preferred lang

* Bump intents to 2025.3.24 for dash lang code
2025-03-26 14:07:15 +01:00
Artur Pragacz
8904f174d2
Remove unused util module in conversation (#141293) 2025-03-24 17:27:27 +01:00
Michael Hansen
2883f0a1e8
Bump intents to 2025.3.23 (#141241) 2025-03-23 22:12:05 +01:00
Joost Lekkerkerker
dcc63a6f2e
Bump ruff to 0.10.0 (#140541)
* Bump ruff to 0.10.0

* Bump ruff to 0.10.0

* Bump ruff to 0.10.0

* Bump ruff to 0.10.0

* Update pyproject.toml

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

* Fix

---------

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2025-03-14 12:32:50 +00:00
Artur Pragacz
f0c5e00cc1
Fix conversation trigger with variables (#140066) 2025-03-08 22:23:24 -05:00
Paulus Schoutsen
d47481a30e
Track when an LLM expects to continue a conversation (#139810)
* Track when an LLM expects to continue a conversation

* Strip content

* Address comments
2025-03-06 22:52:29 -05:00
Paulus Schoutsen
aee891434f
Avoid duplicate chat log content (#139679) 2025-03-03 11:46:40 +01:00
Paulus Schoutsen
90fc6ffdbf
Add support for continue conversation in Assist Pipeline (#139480)
* Add support for continue conversation in Assist Pipeline

* Also forward to ESPHome

* Update snapshot

* And mobile app
2025-02-28 13:15:31 -06:00
Paulus Schoutsen
0b6f49fec2
Filter out certain intents from being matched in local fallback (#137763)
* Filter out certain intents from being matched in local fallback

* Only filter if LLM agent can control HA
2025-02-19 14:27:42 -06:00
Michael Hansen
30a6a6ad4b
Use language util to match intent language (#138560) 2025-02-14 20:51:53 -05:00
Paulus Schoutsen
29c6a2ec13
Add pipeline intent-progress events based on deltas (#138095)
Add intent progress Assist event
2025-02-09 18:09:52 -08:00
Paulus Schoutsen
fa3acde684
Make MockChatLog reusable for other integrations (#138112)
* Make MockChatLog reusable for other integrations

* Update tests/components/conversation/__init__.py
2025-02-09 20:19:28 -05:00
Paulus Schoutsen
cabb406270
Fix user input not added to chat log from contextvar (#138173) 2025-02-09 16:34:25 -08:00
Paulus Schoutsen
df307aeb6d
Stream OpenAI messages into the chat log (#137400) 2025-02-09 00:01:24 -05:00
Paulus Schoutsen
f64b494282
Conversation chat log cleanup and optimization (#137784) 2025-02-07 22:06:16 -08:00
Paulus Schoutsen
7883106e7c
Make sure we always have agent_id in ConversationInput (#137679)
* Make sure we always have agent_id in ConversationInput

* fix type
2025-02-07 18:25:21 -08:00
Paulus Schoutsen
649319f4ee
Introduce async_add_assistant_content to conversation chat log (#137273)
introduce async_add_assistant_content_without_tools to conversation chat log
2025-02-03 14:27:55 -06:00
Paulus Schoutsen
9679fc7878
Chat session rev2 (#137209)
* Chat Session rev 2

* Rename session to chat_log

* Simplify typing

* Typing

* Address comments

* Fix anthropic and ollama
2025-02-03 00:05:20 -05:00
Paulus Schoutsen
dd9bd8ef73
Make get_chat_session a callback context manager (#137146) 2025-02-01 23:37:24 -05:00
Paulus Schoutsen
2f6640707b
Extract conversation ID generation to helper (#137062)
* Extract conversation ID generation to helper

* Allow nested get_chat_log calls
2025-02-01 20:54:00 -05:00
epenet
7b1b229718
Standardize homeassistant imports in component tests (a-l) (#136806) 2025-01-29 10:00:45 +01:00
Michael Hansen
48dfa037bd
Bump intents to 2025.1.28 (#136782)
* Bump intents to 2025.1.28

* Fix snapshots
2025-01-28 22:25:35 -06:00
Michael Hansen
eb4a05e365
Bump hassil to 2.2.0 (#136787) 2025-01-28 18:58:53 -05:00
Paulus Schoutsen
5690516852
ChatSession: Split native content out of message class (#136668)
Split native content out of message class
2025-01-27 21:12:42 -08:00
Allen Porter
69938545df
Push more of the LLM conversation agent loop into ChatSession (#136602)
* Push more of the LLM conversation agent loop into ChatSession

* Revert unnecessary changes

* Revert changes to agent id filtering
2025-01-26 22:16:19 -05:00
Michael Hansen
414fa4125e
Don't translate state names in default agent responses (#136382)
Don't translate state names in responses
2025-01-23 16:03:48 -06:00
Paulus Schoutsen
85f10cf60a
Use LLM fallback when local matching matches intent but not targets (#136045)
LLM fallback to be used when local matching matches intent but finds no targets
2025-01-20 02:06:06 -05:00
Paulus Schoutsen
0c68854fdf
Migrate tests from OpenAI to conversation integration (#135963) 2025-01-19 20:32:59 +01:00
Paulus Schoutsen
754de6f998
Add shared history for conversation agents (#135903)
* Add shared history for conversation agents

* Remove unused code

* Add support for native history items

* Store all assistant responses as assistant in history

* Add history support to DefaultAgent.async_handle_intents

* Make local fallback work

* Add default agent history

* Add history cleanup

* Add tests

* ChatHistory -> ChatSession

* Address comments

* Update snapshots
2025-01-18 22:33:03 -05:00
Joost Lekkerkerker
8db63adc11
Bump ruff to 0.9.1 (#135197) 2025-01-14 11:46:12 +01:00
Paulus Schoutsen
7a484ee0ae
Add extra prompt to assist pipeline and conversation (#124743)
* Add extra prompt to assist pipeline and conversation

* extra_prompt -> extra_system_prompt

* Fix rebase

* Fix tests
2025-01-06 12:58:42 -05:00
Michael Hansen
a435fd12f0
Bump intents to 2025.1.1 (#134424) 2025-01-01 21:03:17 -05:00
Michael Hansen
8607ba884c
Bump intents to 2024.12.20 (#133676) 2024-12-20 14:23:12 -05:00
Michael Hansen
94260147d7
Fix pipeline conversation language (#132896) 2024-12-11 18:52:02 +01:00
Paulus Schoutsen
5062a7fec8
Add new api to fetch sentence triggers (#132764)
* Add new api to fetch sentence triggers

* With latest packages
2024-12-09 23:21:27 -05:00
Michael Hansen
887f1621e5
Bump intents to 2024.12.9 (#132726) 2024-12-09 17:08:58 +01:00
Michael Hansen
ab83ec61e0
Ensure entity names are not hassil templates (#132184) 2024-12-03 19:37:05 +01:00
epenet
7c9b8552cb
Reapply "bump hassil and intents" (#132138) (#132151)
This reverts commit 39b2cf6ed27d32f70c1b259ed406f6e9b654709c.
2024-12-03 15:21:41 +01:00
epenet
39b2cf6ed2
Revert "bump hassil and intents" (#132138)
* Revert "Fix bad hassil tests on CI (#132132)"

This reverts commit 101bb091baa3ed44a2b7d64a4efa34d7300ad658.

* Revert "Bump hassil and intents (#132092)"

This reverts commit e52182940b148dedaeae4391d1f6d77f87d65952.
2024-12-03 09:37:33 +01:00
Paulus Schoutsen
101bb091ba
Fix bad hassil tests on CI (#132132)
* Fix CI

* Fix whitespace

---------

Co-authored-by: Michael Hansen <mike@rhasspy.org>
2024-12-02 23:08:51 -06:00
Michael Hansen
e52182940b
Bump hassil and intents (#132092) 2024-12-02 14:09:35 -05:00
Paulus Schoutsen
6103cea3f5
Make the full conversation input available to sentence triggers (#131982)
Co-authored-by: Michael Hansen <mike@rhasspy.org>
2024-11-30 22:04:29 -06:00
Michael
1a9ab07742
Allow empty trigger sentence responses in conversations (#131849)
allow empty trigger sentence responses
2024-11-28 18:30:05 +01:00
Michael Hansen
3eb483c1b0
Bump intents to 2024.11.27 (#131727) 2024-11-27 17:42:59 +01:00
Michael Hansen
752df5a8cb
Filter entity names before intent matching (#131563) 2024-11-26 09:42:31 +01:00
Michael Hansen
f47840d83c
Cache intent recognition results (#131114) 2024-11-22 20:57:42 -05:00
Michael Hansen
60774575c6
Set HA time zone with freeze_time in agent test (#131058)
* Patch dt_util instead of using freeze_time

* Use freeze_time but set HA timezone
2024-11-20 19:29:36 +01:00
Michael Hansen
5fa9a945d9
Handle sentence triggers and local intents before pipeline agent (#129058)
* Handle sentence triggers and registered intents in Assist LLM API

* Remove from LLM

* Check sentence triggers and local intents first

* Fix type

* Fix type again

* Use pipeline language

* Fix cloud test

* Clean up and fix translation key

* Refactor async_recognize
2024-11-14 10:50:50 -06:00
Michael Hansen
51c6ee97b1
Upgrade to hassil 2.0 (#130544)
* Working on hassil 2.0

* Bump to hassil 2.0

* Update snapshots

* Remove debug logging
2024-11-13 16:50:08 -05:00