Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local llm doesnt create Conversation Agent #215

Open
MaybeFunfact opened this issue Sep 5, 2024 · 3 comments
Open

Local llm doesnt create Conversation Agent #215

MaybeFunfact opened this issue Sep 5, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@MaybeFunfact
Copy link

MaybeFunfact commented Sep 5, 2024

Server OS:
Homeasisstant OS on a Proxmox vm

Ai renderer OS:
Windows 10

Approach
After entering all connection credentials, the OpenAI API, OpenAI API admin key, as well as the model name and the host ip of the windows pc, i tried every combination that could affect the plugin(Assist, local-llm, no control, etc.).
Ive set the apikey and the api admin key in the Text gen web ui using the "--api-key" and the "--admin-key" phrases in the CMD_flags.txt

Expected Behavior
After setting up the connection between Text generation web ui and Local llm it should create an conversation Agent for Assist, but the only available Agent is Home Assistant

Logs
This is what the Homeassistant.log looks like:

`2024-09-05 18:25:22.217 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration dwd_weather which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-09-05 18:25:22.218 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-09-05 18:25:22.219 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration llama_conversation which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-09-05 18:25:25.614 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/pipeline.py", line 1063, in prepare_text_to_speech
options_supported = await tts.async_support_options(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/tts/init.py", line 177, in async_support_options
raise HomeAssistantError(f"Provider {engine} not found")
homeassistant.exceptions.HomeAssistantError: Provider tts.piper not found

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/init.py", line 131, in async_pipeline_from_audio_stream
await pipeline_input.validate()
File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/pipeline.py", line 1502, in validate
await asyncio.gather(prepare_tasks)
File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/pipeline.py", line 1070, in prepare_text_to_speech
raise TextToSpeechError(
homeassistant.components.assist_pipeline.error.TextToSpeechError: Pipeline error code=tts-not-supported, message=Text-to-speech engine 'tts.piper' not found
2024-09-05 18:25:37.001 WARNING (MainThread) [homeassistant.components.homeassistant.triggers.numeric_state] Error initializing 'Growbox-temp' trigger: In 'numeric_state' condition: unknown entity sensor.tasmota_am2301_temperature
2024-09-05 18:30:24.387 ERROR (MainThread) [homeassistant.helpers.entity_platform] llama_conversation raises exception ConfigEntryNotReady in forwarded platform conversation; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
2024-09-05 18:33:25.210 ERROR (MainThread) [homeassistant.components.ipp.coordinator] Error fetching ipp data: Invalid response from API: Error occurred while communicating with IPP server.
2024-09-05 18:33:46.930 ERROR (MainThread) [homeassistant.helpers.entity_platform] llama_conversation raises exception ConfigEntryNotReady in forwarded platform conversation; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
2024-09-05 18:35:57.321 DEBUG (MainThread) [custom_components.llama_conversation.conversation] Connection error was: ClientResponseError(RequestInfo(url=URL('http://192.168.178.68:5000/v1/internal/model/info'), method='GET', headers=<CIMultiDictProxy('Host': '192.168.178.68:5000', 'User-Agent': 'HomeAssistant/2024.9.0 aiohttp/3.10.5 Python/3.12', 'Authorization': 'Bearer ', 'Accept': '
/*', 'Accept-Encoding': 'gzip, deflate, br')>, real_url=URL('http://192.168.178.68:5000/v1/internal/model/info')), (), status=401, message='Unauthorized', headers=<CIMultiDictProxy('Date': 'Thu, 05 Sep 2024 16:35:55 GMT', 'Server': 'uvicorn', 'Content-Length': '25', 'Content-Type': 'application/json')>)
2024-09-05 18:35:57.321 ERROR (MainThread) [homeassistant.helpers.entity_platform] llama_conversation raises exception ConfigEntryNotReady in forwarded platform conversation; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
2024-09-05 18:39:40.930 ERROR (MainThread) [homeassistant.components.ipp.coordinator] Error fetching ipp data: Invalid response from API: Timeout occurred while connecting to IPP server.
`
And this is what homeassistant.log.1 looks like:

2024-09-05 18:23:38.828 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration dwd_weather which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-09-05 18:23:38.829 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-09-05 18:23:42.218 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/__init__.py", line 131, in async_pipeline_from_audio_stream await pipeline_input.validate() File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/pipeline.py", line 1502, in validate await asyncio.gather(*prepare_tasks) File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/pipeline.py", line 662, in prepare_wake_word_detection raise WakeWordDetectionError( homeassistant.components.assist_pipeline.error.WakeWordDetectionError: Pipeline error code=wake-provider-missing, message=No wake-word-detection provider for: wake_word.openwakeword 2024-09-05 18:23:53.712 WARNING (MainThread) [homeassistant.components.homeassistant.triggers.numeric_state] Error initializing 'Growbox-temp' trigger: In 'numeric_state' condition: unknown entity sensor.tasmota_am2301_temperature 2024-09-05 18:24:00.845 ERROR (MainThread) [custom_components.hacs] 'NoneType' object has no attribute 'async_get_releases' Traceback (most recent call last): File "/config/custom_components/hacs/websocket/repository.py", line 350, in hacs_repository_releases releases = await repository.async_get_releases() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'async_get_releases' 2024-09-05 18:24:16.122 ERROR (MainThread) [custom_components.hacs] 'NoneType' object has no attribute 'async_get_releases' Traceback (most recent call last): File "/config/custom_components/hacs/websocket/repository.py", line 350, in hacs_repository_releases releases = await repository.async_get_releases() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'async_get_releases' 2024-09-05 18:25:09.464 WARNING (SyncWorker_10) [homeassistant.loader] We found a custom integration dwd_weather which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-09-05 18:25:09.466 WARNING (SyncWorker_10) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-09-05 18:25:09.466 WARNING (SyncWorker_10) [homeassistant.loader] We found a custom integration llama_conversation which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-09-05 18:25:14.665 WARNING (MainThread) [homeassistant.core] Task <Task pending name='admin service homeassistant.restart' coro=<async_setup.<locals>.async_handle_core_service() running at /usr/src/homeassistant/homeassistant/components/homeassistant/__init__.py:213> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[set.remove(), Task.task_wakeup()]> was still running after final writes shutdown stage; Integrations should cancel non-critical tasks when receiving the stop event to prevent delaying shutdown

im sorry for my unprofessional approach, im quite a noob and this is my first issue i wrote
thanks a lot for your help
LG Sebastian

@MaybeFunfact MaybeFunfact added the bug Something isn't working label Sep 5, 2024
@Teagan42
Copy link
Contributor

The stack trace in your error log does not have this component in the call stack.

If you read your stack trace carefully, I took the time to format it so you could read it easier:

2024-09-05 18:25:22.217 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration dwd_weather which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-09-05 18:25:22.218 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-09-05 18:25:22.219 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration llama_conversation which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-09-05 18:25:25.614 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
    File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/pipeline.py", line 1063, in prepare_text_to_speech
options_supported = await tts.async_support_options(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/src/homeassistant/homeassistant/components/tts/init.py", line 177, in async_support_options
raise HomeAssistantError(f"Provider {engine} not found")
    homeassistant.exceptions.HomeAssistantError: Provider tts.piper not found

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
    File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/init.py", line 131, in async_pipeline_from_audio_stream
await pipeline_input.validate()
    File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/pipeline.py", line 1502, in validate
await asyncio.gather(prepare_tasks)
    File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/pipeline.py", line 1070, in prepare_text_to_speech
raise TextToSpeechError(
homeassistant.components.assist_pipeline.error.TextToSpeechError: Pipeline error code=tts-not-supported, message=Text-to-speech engine 'tts.piper' not found

2024-09-05 18:25:37.001 WARNING (MainThread) [homeassistant.components.homeassistant.triggers.numeric_state] Error initializing 'Growbox-temp' trigger: In 'numeric_state' condition: unknown entity sensor.tasmota_am2301_temperature
2024-09-05 18:30:24.387 ERROR (MainThread) [homeassistant.helpers.entity_platform] llama_conversation raises exception ConfigEntryNotReady in forwarded platform conversation; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
2024-09-05 18:33:25.210 ERROR (MainThread) [homeassistant.components.ipp.coordinator] Error fetching ipp data: Invalid response from API: Error occurred while communicating with IPP server.
2024-09-05 18:33:46.930 ERROR (MainThread) [homeassistant.helpers.entity_platform] llama_conversation raises exception ConfigEntryNotReady in forwarded platform conversation; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
2024-09-05 18:35:57.321 DEBUG (MainThread) [custom_components.llama_conversation.conversation] Connection error was: ClientResponseError(RequestInfo(url=URL('http://192.168.178.68:5000/v1/internal/model/info'), method='GET', headers=<CIMultiDictProxy('Host': '192.168.178.68:5000', 'User-Agent': 'HomeAssistant/2024.9.0 aiohttp/3.10.5 Python/3.12', 'Authorization': 'Bearer ', 'Accept': '/*', 'Accept-Encoding': 'gzip, deflate, br')>, real_url=URL('http://192.168.178.68:5000/v1/internal/model/info')), (), status=401, message='Unauthorized', headers=<CIMultiDictProxy('Date': 'Thu, 05 Sep 2024 16:35:55 GMT', 'Server': 'uvicorn', 'Content-Length': '25', 'Content-Type': 'application/json')>)
2024-09-05 18:35:57.321 ERROR (MainThread) [homeassistant.helpers.entity_platform] llama_conversation raises exception ConfigEntryNotReady in forwarded platform conversation; Instead raise ConfigEntryNotReady before calling async_forward_entry_setups
2024-09-05 18:39:40.930 ERROR (MainThread) [homeassistant.components.ipp.coordinator] Error fetching ipp data: Invalid response from API: Timeout occurred while connecting to IPP server.
2024-09-05 18:23:38.828 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration dwd_weather which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-09-05 18:23:38.829 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-09-05 18:23:42.218 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None) Traceback (most recent call last): 
    File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/__init__.py", line 131, in async_pipeline_from_audio_stream await pipeline_input.validate()
    File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/pipeline.py", line 1502, in validate await asyncio.gather(*prepare_tasks)
    File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/pipeline.py", line 662, in prepare_wake_word_detection raise WakeWordDetectionError( homeassistant.components.assist_pipeline.error.WakeWordDetectionError: Pipeline error code=wake-provider-missing, message=No wake-word-detection provider for: wake_word.openwakeword

2024-09-05 18:23:53.712 WARNING (MainThread) [homeassistant.components.homeassistant.triggers.numeric_state] Error initializing 'Growbox-temp' trigger: In 'numeric_state' condition: unknown entity sensor.tasmota_am2301_temperature
2024-09-05 18:24:00.845 ERROR (MainThread) [custom_components.hacs] 'NoneType' object has no attribute 'async_get_releases' Traceback (most recent call last):
    File "/config/custom_components/hacs/websocket/repository.py", line 350, in hacs_repository_releases releases = await repository.async_get_releases() 
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'async_get_releases'

2024-09-05 18:24:16.122 ERROR (MainThread) [custom_components.hacs] 'NoneType' object has no attribute 'async_get_releases' Traceback (most recent call last): 
    File "/config/custom_components/hacs/websocket/repository.py", line 350, in hacs_repository_releases releases = await repository.async_get_releases()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'async_get_releases'

2024-09-05 18:25:09.464 WARNING (SyncWorker_10) [homeassistant.loader] We found a custom integration dwd_weather which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2024-09-05 18:25:09.466 WARNING (SyncWorker_10) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2024-09-05 18:25:09.466 WARNING (SyncWorker_10) [homeassistant.loader] We found a custom integration llama_conversation which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2024-09-05 18:25:14.665 WARNING (MainThread) [homeassistant.core] Task <Task pending name='admin service homeassistant.restart' coro=<async_setup.<locals>.async_handle_core_service() running at /usr/src/homeassistant/homeassistant/components/homeassistant/__init__.py:213> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[set.remove(), Task.task_wakeup()]> was still running after final writes shutdown stage; Integrations should cancel non-critical tasks when receiving the stop event to prevent delaying shutdown

The first two errors states: homeassistant.exceptions.HomeAssistantError: Provider tts.piper not found
This means you do not have a Piper text to speech integration set up (or it is set up incorrectly)

I also see you have an automation called Growbox-temp that uses a numeric_state trigger against sensor.tasmota_am2301_temperature but this sensor doesn't exist.

Then I see an error: No wake-word-detection provider for: wake_word.openwakeword - which tells me you do not have a VAD/Wake Word provider set up.

None of these errors have to do with this integration.

@Teagan42
Copy link
Contributor

I recommend you close this issue, @acon96

@acon96
Copy link
Owner

acon96 commented Dec 15, 2024

Sorry for the late response. Can you confirm you have an API Key in the integration setup? The error message is showing no Bearer token being sent to the server.

2024-09-05 18:35:57.321 DEBUG (MainThread) [custom_components.llama_conversation.conversation] Connection error was: ClientResponseError(RequestInfo(url=URL('http://192.168.178.68:5000/v1/internal/model/info'), method='GET', headers=<CIMultiDictProxy('Host': '192.168.178.68:5000', 'User-Agent': 'HomeAssistant/2024.9.0 aiohttp/3.10.5 Python/3.12', 'Authorization': 'Bearer ', 'Accept': '/*', 'Accept-Encoding': 'gzip, deflate, br')>, real_url=URL('http://192.168.178.68:5000/v1/internal/model/info')), (), status=401, message='Unauthorized', headers=<CIMultiDictProxy('Date': 'Thu, 05 Sep 2024 16:35:55 GMT', 'Server': 'uvicorn', 'Content-Length': '25', 'Content-Type': 'application/json')>)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants