Commit Graph

300 Commits

Author SHA1 Message Date
Michael Hansen
ea202eff66 Bump intents to 2025.6.10 (#146491) 2025-06-10 18:16:18 -05:00
Michael Hansen
d76ed6a3c2 Bump intents to 2025.5.28 (#145816) 2025-05-28 21:14:13 +03:00
Paulus Schoutsen
37fe25cfdc Add support_streaming to ConversationEntity (#144998)
* Add support_streaming to ConversationEntity

* pipeline tests
2025-05-19 13:43:06 -04:00
Michael Hansen
1ce44800ab Bump intents to 2025.5.7 (#144404) 2025-05-07 09:05:08 -05:00
Michael Hansen
6c0e46f050 Bump intents to 2025.4.30 (#143969)
Co-authored-by: Robert Resch <robert@resch.dev>
2025-04-30 18:01:17 +02:00
K
b6e9643586 Continue conversation with full-width question mark support (#143078) 2025-04-19 11:51:56 +02:00
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
John Karabudak
85d2e3d006 Fix LLM to speed up prefill (#141156)
* fix: two minor LLM changes to speed up prefill

- moved the current date/time to the end of the prompt
- started sorting all entities by last_changed

* addressed PR comments

* fixed tests

* reduced scope of try/catch in LLM prompt

* addressed more PR comments

* fixed Anthropic test

* addressed another PR comment

* fixed remainder of tests
2025-03-30 13:30:40 -07:00
Michael Hansen
a150f9d5ad Bump intents and always prefer more literal text (#141663) 2025-03-28 13:03:42 -04: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
Allen Porter
f14b76c54b Add Gemini/OpenAI token stats to the conversation trace (#141118)
* Add gemini token status to the conversation trace

* Add OpenAI Token Stats

* Revert input_tokens_details since its not in the openai version yet

* Fix ruff lint errors
2025-03-23 12:03:06 -04:00
Denis Shulyaka
056616f9c5 Stronger type annotations for conversation content (#140725)
stronger type annotations for conversation content
2025-03-16 10:59:25 -04:00
Paulus Schoutsen
49a62d5294 Standardize conversation.async_process method (#140125) 2025-03-10 14:15:10 -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
Michael Hansen
cfe102f274 Bump intents to 2025.3.5 (#139851)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2025-03-05 18:20:48 +01: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
Michael Hansen
f3fb7cd8e8 Bump intents to 2025.2.26 (#139387) 2025-02-26 20:14:03 +00:00
Erik Montnemery
354855ff5f Remove some dead code from the conversation integration (#138878) 2025-02-19 21:51:45 +01: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
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
Marc Mueller
6e84280e3c Small typing improvements (#137994) 2025-02-09 04:37:49 +01: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
Michael Hansen
a1c675b5ee Bump hassil and intents (#137440) 2025-02-05 18:02:01 +01:00
Paulus Schoutsen
417a595b73 Only clean up chat log if it was stored (#137399) 2025-02-05 08:25:05 -05: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
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
epenet
d5568ff955 Standardize homeassistant imports in full-CI components (#136731)
Standardize homeassistant imports in components
2025-01-28 13:11:19 -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
epenet
b11b36b523 Add more util aliases to import conventions (#136153) 2025-01-21 15:58:23 +01:00
Marc Mueller
29b7d5c2e4 Improve conversation typing (#136084) 2025-01-20 15:32:18 +01: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
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
53ca31c112 Bump hassil to 2.1.0 (#134359) 2024-12-31 15:52:15 -05:00
Michael Hansen
8607ba884c Bump intents to 2024.12.20 (#133676) 2024-12-20 14:23:12 -05:00