epenet
fb1b0058ee
Fix consider-using-tuple pylint warnings in component tests ( #119464 )
...
* Fix consider-using-tuple pylint warnings in component tests
* Apply su
Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com >
---------
Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com >
2024-06-12 15:50:27 +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
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
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
epenet
166c588cac
Add LogCaptureFixture type hints in tests ( #118372 )
2024-05-29 14:10:00 +02: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
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
676fe5a9a2
Add recommended model options to OpenAI ( #118083 )
...
* Add recommended options to OpenAI
* Use string join
2024-05-25 00:01:48 -04:00
Denis Shulyaka
da74ac06d7
Add user name and location to the LLM assist prompt ( #118071 )
...
Add user name and location to the llm assist prompt
2024-05-24 22:23:05 -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
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
Paulus Schoutsen
2df6f1849f
Add OpenAI conversation entity ( #114942 )
...
* Add OpenAI conversation entity
* Add migration
2024-04-09 11:10:03 -04:00
Joost Lekkerkerker
5d500cb74b
Use is in enum comparison in config flow tests K-O ( #114672 )
2024-04-02 11:21:42 -10:00
Paulus Schoutsen
d2e4f5f36e
Add conversation entity ( #114518 )
...
* Default agent as entity
* Migrate constant to point at new value
* Fix tests
* Fix more tests
* Move assist pipeline back to cloud after dependenceis
2024-04-01 21:34:25 -04:00
Paulus Schoutsen
f01235ef74
Re-organize conversation integration ( #114502 )
...
* Re-organize conversation integration
* Clean up 2 more imports
* Re-export models
* Fix imports
* Uno mas
* Rename agents to models
* Fix cast test that i broke?
* Just blocking till I'm done
* Wrong place
2024-03-31 00:05:25 -04:00
Joost Lekkerkerker
6bb4e7d62c
Bump ruff to 0.3.4 ( #112690 )
...
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com >
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com >
Co-authored-by: J. Nick Koston <nick@koston.org >
2024-03-26 00:02:16 +01:00
Marc Mueller
1722e23df8
Add empty line after module docstring [tests l-p] ( #112710 )
2024-03-08 14:55:15 +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
Erik Montnemery
9d3be60b05
Adjust openai_conversation tests which create devices ( #98203 )
2023-08-10 18:24:19 +02: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
Paulus Schoutsen
d6cd5648b9
Change conversation default agent behavior ( #95225 )
...
* Change conversation default agent behavior
* Fix tests
2023-06-26 22:10:17 -04: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
885be98f8f
OpenAI to use GPT3.5 ( #90423 )
...
* OpenAI to use GPT3.5
* Add snapshot
2023-03-29 05:37:43 +02:00
epenet
c724e7c29f
Adjust registry access in openai_conversation ( #88882 )
2023-02-28 21:59:44 -05:00
Franck Nijhof
ed79265843
Enable Ruff PT006 ( #88165 )
...
* Enable Ruff PT006
* Adjust existing cases
* Fix tests
* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet
88444b2e0c
Add type hints to integration tests (part 16) ( #88008 )
2023-02-15 10:50:02 +01:00
Brandon Rothweiler
7cf5fd5952
Fix typo in OpenAI prompt ( #88137 )
2023-02-14 20:33:58 -05:00
Paulus Schoutsen
fa5c60c9ee
Handle device reg fields not being valid data in openai conversion ( #88047 )
...
Handle device reg fields not being valid data
2023-02-14 11:45:27 +01:00
Paulus Schoutsen
400c88a1cc
OpenAI: Ignore devices without a name ( #87558 )
...
Ignore devices without a name
2023-02-06 23:57:08 -05:00
Franck Nijhof
f9d7d65f3a
Use template selector for prompt template in OpenAI ( #87205 )
...
* Use template selector for prompt template in OpenAI
* Fix tests
* Do not parse template result
2023-02-02 15:20:10 -05:00
Ben Dews
21d1c647c5
Add configuration options to OpenAI integration ( #86768 )
...
* Added multiple features to OpenAI integration
* Fixed failed test
* Removed features and improved tests
* initiated component before starting options flow
2023-01-30 08:24:11 -05:00
Paulus Schoutsen
9cd48b4999
OpenAI: Fix device without model ( #86754 )
2023-01-26 23:25:02 +01:00
Paulus Schoutsen
ff91fb7d74
Make openai conversation prompt template more readable + test case ( #86676 )
2023-01-26 11:04:15 +01:00
Paulus Schoutsen
28a3b4a32c
Add error handling for OpenAI ( #86671 )
...
* Add error handling for OpenAI
* Simplify area filtering
* better prompt
2023-01-25 22:17:19 -05:00
Paulus Schoutsen
7d641e4d3e
Add OpenAI integration ( #86621 )
...
* Add OpenAI integration
* Remove empty manifest fields
* More prompt tweaks
* Update manifest
* Update homeassistant/components/openai_conversation/config_flow.py
Co-authored-by: Franck Nijhof <git@frenck.dev >
* Address comments
* Add full integration tests
* Cripple the integration
* Test single instance
Co-authored-by: Franck Nijhof <git@frenck.dev >
2023-01-25 11:30:13 -05:00