Paulus Schoutsen
ba48a86156
OpenAI to not speak out whole errors ( #126409 )
...
* OpenAI to not speak out whole errors
* Update snapshot
2024-09-22 21:26:33 -04:00
Richard Kroegel
f760c13e8f
Fix blocking calls for OpenAI conversation ( #125010 )
2024-09-02 09:23:38 -10:00
Erik Montnemery
1a2d013c97
Update icons.json to new service schema part 3 ( #124770 )
2024-08-28 13:48:01 +02:00
Paulus Schoutsen
933fba84a9
Reload conversation entries on update ( #123279 )
2024-08-07 11:18:48 +02:00
Paulus Schoutsen
adf8515698
OpenAI make supported features reflect the config entry options ( #123047 )
2024-08-02 12:08:44 +02:00
Allen Porter
8d0e998e54
Improve conversation agent tracing to help with eval and data collection ( #122542 )
2024-07-31 14:38:44 +02:00
Denis Shulyaka
78a98afb8d
Remove obsolete string from openai_conversation strings.json ( #122623 )
2024-07-26 03:48:26 +02:00
Denis Shulyaka
ee30510b23
Remove deprecated DALL-E image formats ( #122388 )
2024-07-22 21:57:48 +02:00
Allen Porter
c98c80ce69
Change OpenAI default recommended model to gpt-4o-mini ( #122333 )
2024-07-21 13:37:18 -07:00
HarvsG
3a0b3a4589
Log tools sent to OpenAI ( #122024 )
2024-07-16 15:16:50 +02:00
Franck Nijhof
a9bf12f102
Rename Services to Actions in translation strings ( #121777 )
2024-07-15 21:19:25 +02:00
Paulus Schoutsen
976cb434c9
Add CONTROL supported feature to OpenAI conversation entities ( #121064 )
...
Add CONTROL supported feature to OpenAI
2024-07-03 09:19:46 -05:00
Paulus Schoutsen
c6cfe073ea
Bump openai to 1.35.1 ( #120926 )
...
Bump openai to 1.35.7
2024-07-01 17:52:30 +02:00
Denis Shulyaka
2386ed3830
Add script llm tool ( #118936 )
...
* Add script llm tool
* Add tests
* More tests
* more test
* more test
* Add area and floor resolving
* coverage
* coverage
* fix ColorTempSelector
* fix mypy
* fix mypy
* add script reload test
* Cache script tool parameters
* Make custom_serializer a part of api
---------
Co-authored-by: Michael Hansen <mike@rhasspy.org>
2024-06-25 10:43:26 -05:00
Paulus Schoutsen
5c2db162c4
Remove "no API" prompt ( #120280 )
2024-06-24 08:57:59 +02:00
Paulus Schoutsen
0ea9581cfc
OpenAI to respect custom conversation IDs ( #119307 )
2024-06-11 07:49:14 +02:00
Paulus Schoutsen
299c0de968
Update OpenAI prompt on each interaction ( #118747 )
2024-06-03 22:27:05 +02:00
Paulus Schoutsen
f3b20d30ae
Add base prompt for LLMs ( #118592 )
2024-06-01 00:21:37 -04:00
Denis Shulyaka
46da43d09d
Add OpenAI Conversation system prompt user_name
and llm_context
variables ( #118512 )
...
* OpenAI Conversation: Add variables to the system prompt
* User name and llm_context
* test for user name
* test for user id
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-31 15:28:23 -04:00
Paulus Schoutsen
80e9ff672a
Fix openAI tool calls ( #118577 )
2024-05-31 19:28:52 +02:00
Josef Zweck
d956db691a
Migrate openai_conversation to entry.runtime_data
( #118535 )
...
* switch to entry.runtime_data
* check for missing config entry
* Update homeassistant/components/openai_conversation/__init__.py
---------
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2024-05-31 11:16:39 -04:00
Paulus Schoutsen
6dd01dbff7
Rename llm.ToolContext to llm.LLMContext ( #118566 )
2024-05-31 11:11:24 -04:00
Josef Zweck
eae04bf2e9
Add typing for OpenAI client and fallout ( #118514 )
...
* typing for client and consequences
* Update homeassistant/components/openai_conversation/conversation.py
---------
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2024-05-30 22:13:18 -04:00
Paulus Schoutsen
615a1eda51
LLM Assist API to ignore intents if not needed for exposed entities or calling device ( #118283 )
...
* LLM Assist API to ignore timer intents if device doesn't support it
* Refactor to use API instances
* Extract ToolContext class
* Limit exposed intents based on exposed entities
2024-05-28 21:29:18 -04:00
Paulus Schoutsen
1602c8063c
Standardize LLM instructions prompt ( #118195 )
...
* Standardize instructions prompt
* Add time/date to default instructions
2024-05-26 20:24:26 -04:00
Paulus Schoutsen
233c3bb2be
Add render prompt method when no API selected ( #118136 )
2024-05-26 13:35:15 +02:00
Allen Porter
89e2c57da6
Add conversation agent debug tracing ( #118124 )
...
* Add debug tracing for conversation agents
* Minor cleanup
2024-05-25 14:16:51 -04:00
Paulus Schoutsen
81f3387d06
Flip prompts to put user prompt on top ( #118085 )
2024-05-25 00:33:24 -04:00
Paulus Schoutsen
676fe5a9a2
Add recommended model options to OpenAI ( #118083 )
...
* Add recommended options to OpenAI
* Use string join
2024-05-25 00:01:48 -04:00
Paulus Schoutsen
a257f63119
Add device info to OpenAI ( #118077 )
2024-05-24 23:55:01 -04:00
Paulus Schoutsen
7554ca9460
Allow llm API to render dynamic template prompt ( #118055 )
...
* Allow llm API to render dynamic template prompt
* Make rendering api prompt async so it can become a RAG
* Fix test
2024-05-24 16:04:48 -04:00
Paulus Schoutsen
3b2cdb63f1
Update OpenAI defaults ( #118059 )
...
* Update OpenAI defaults
* Update max temperature
2024-05-24 15:37:44 -04:00
Denis Shulyaka
2f0215b034
LLM Tools support for OpenAI integration ( #117645 )
...
* initial commit
* Add tests
* Move tests to the correct file
* Fix exception type
* Undo change to default prompt
* Add intent dependency
* Move format_tool out of the class
* Fix tests
* coverage
* Adjust to new API
* Update strings
* Update tests
* Remove unrelated change
* Test referencing non-existing API
* Add test to verify no exception on tool conversion for Assist tools
* Bump voluptuous-openapi==0.0.4
* Add device_id to tool input
* Fix tests
---------
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-21 22:45:04 -04:00
Sid
2cc916db6d
Replace pylint broad-except with Ruff BLE001 ( #116250 )
2024-05-07 14:00:27 +02:00
Allen Porter
9b4099950c
Cleanup OpenAI and Ollama conversation entities ( #116714 )
2024-05-03 10:59:08 -04:00
Allen Porter
897794f53b
Clean up small changes from OpenAI conversation entity change ( #116395 )
...
Small cleanups in OpenAI conversation
2024-05-02 19:38:12 -05:00
Paulus Schoutsen
2df6f1849f
Add OpenAI conversation entity ( #114942 )
...
* Add OpenAI conversation entity
* Add migration
2024-04-09 11:10:03 -04:00
Marc Mueller
988c71ecc5
Add empty line after module docstring [n-q] ( #112702 )
2024-03-08 15:04:07 +01:00
Joost Lekkerkerker
ea6913d436
Add icon translations to OpenAI Conversation ( #111992 )
2024-03-02 00:57:25 +01:00
Erik Montnemery
e0c1feb22c
Migrate integrations n-r to generic flowhandler ( #111864 )
2024-02-29 20:09:01 +01:00
Denis Shulyaka
1242456ff1
Bump openai end switch from dall-e-2 to dall-e-3 ( #104998 )
...
* Bump openai
* Fix tests
* Apply suggestions from code review
* Undo conftest changes
* Raise repasir issue
* Explicitly use async mock for chat.completions.create
It is not always detected correctly as async because it uses a decorator
* removed duplicated message
* ruff
* Compatibility with old pydantic versions
* Compatibility with old pydantic versions
* More tests
* Apply suggestions from code review
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Apply suggestions from code review
---------
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-12-11 09:47:26 -05:00
Joseph
df025b5993
Enumerate openai.Models to validate config ( #99438 )
2023-11-24 13:14:44 +01:00
J. Nick Koston
cc31d77205
Use ulid_now instead of ulid_at_timestamp if no timestamp is passed ( #104226 )
...
* Use ulid_now instead of ulid_at_timestamp if no timestamp is passed
ulid_now is slightly faster than ulid_at_timestamp
* tweak usage
2023-11-19 22:27:24 -05:00
Paulus Schoutsen
aad281db18
Add service to OpenAI to Generate an image ( #97018 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-07-26 10:14:18 +02:00
Franck Nijhof
f2bd122fde
Clean up conversation agent attribution ( #96883 )
...
* Clean up conversation agent attribution
* Clean up google_generative_ai_conversation as well
2023-07-19 09:03:53 +02:00
Erik Montnemery
eabbe8969d
Adjust typing of AbstractConversationAgent.supported_languages ( #91648 )
...
* Adjust typing of AbstractConversationAgent.supported_languages
* Update test
2023-04-19 10:53:49 -04:00
Erik Montnemery
dc3c47986b
Add property supported_languages
to AbstractConversationAgent
( #91588 )
...
* Add property supported_languages to AbstractConversationAgent
* Fix test
* Use MATCH_ALL for openai supported languages
2023-04-18 15:11:04 -05:00
Paulus Schoutsen
325733158d
Allow multiple instances for OpenAI ( #90609 )
...
* Allow multiple instances for OpenAI
* Add test
2023-04-12 08:29:13 -04:00
Paulus Schoutsen
0b72cc9f5e
OpenAI to rely on built-in areas
variable ( #90481 )
2023-03-30 15:21:45 +02:00
Paulus Schoutsen
885be98f8f
OpenAI to use GPT3.5 ( #90423 )
...
* OpenAI to use GPT3.5
* Add snapshot
2023-03-29 05:37:43 +02:00