mirror of
https://github.com/smkrv/ha-text-ai.git
synced 2026-07-22 07:03:58 +08:00
fix: Resolve hassfest validation errors in services.yaml
- Remove invalid response schema from ask_question service - Add required target configuration for all services - Ensure compliance with Home Assistant service schema requirements
This commit is contained in:
@@ -4,6 +4,10 @@ ask_question:
|
|||||||
Send a question to the AI model and receive a detailed response.
|
Send a question to the AI model and receive a detailed response.
|
||||||
The response will be stored in the conversation history and can be retrieved later.
|
The response will be stored in the conversation history and can be retrieved later.
|
||||||
This service now returns response data directly, eliminating the need to read from sensors.
|
This service now returns response data directly, eliminating the need to read from sensors.
|
||||||
|
target:
|
||||||
|
entity:
|
||||||
|
integration: ha_text_ai
|
||||||
|
domain: sensor
|
||||||
fields:
|
fields:
|
||||||
instance:
|
instance:
|
||||||
name: Instance
|
name: Instance
|
||||||
@@ -73,42 +77,15 @@ ask_question:
|
|||||||
max: 100000
|
max: 100000
|
||||||
step: 1
|
step: 1
|
||||||
mode: box
|
mode: box
|
||||||
response:
|
|
||||||
response_text:
|
|
||||||
description: "Full AI response text (unlimited length)"
|
|
||||||
example: "The answer to your question is..."
|
|
||||||
tokens_used:
|
|
||||||
description: "Total number of tokens consumed for this request"
|
|
||||||
example: 150
|
|
||||||
prompt_tokens:
|
|
||||||
description: "Number of tokens used for the input prompt"
|
|
||||||
example: 50
|
|
||||||
completion_tokens:
|
|
||||||
description: "Number of tokens used for the AI response"
|
|
||||||
example: 100
|
|
||||||
model_used:
|
|
||||||
description: "AI model that generated the response"
|
|
||||||
example: "gpt-4o-mini"
|
|
||||||
instance:
|
|
||||||
description: "Instance name that processed the request"
|
|
||||||
example: "my_assistant"
|
|
||||||
question:
|
|
||||||
description: "The original question that was asked"
|
|
||||||
example: "What is the weather like?"
|
|
||||||
timestamp:
|
|
||||||
description: "ISO timestamp when the response was generated"
|
|
||||||
example: "2025-01-09T16:57:00.000Z"
|
|
||||||
success:
|
|
||||||
description: "Whether the request was successful"
|
|
||||||
example: true
|
|
||||||
error:
|
|
||||||
description: "Error message if the request failed (only present when success is false)"
|
|
||||||
example: "API rate limit exceeded"
|
|
||||||
|
|
||||||
clear_history:
|
clear_history:
|
||||||
name: Clear History
|
name: Clear History
|
||||||
description: >-
|
description: >-
|
||||||
Delete all stored questions and responses from the conversation history
|
Delete all stored questions and responses from the conversation history
|
||||||
|
target:
|
||||||
|
entity:
|
||||||
|
integration: ha_text_ai
|
||||||
|
domain: sensor
|
||||||
fields:
|
fields:
|
||||||
instance:
|
instance:
|
||||||
name: Instance
|
name: Instance
|
||||||
@@ -122,6 +99,10 @@ clear_history:
|
|||||||
get_history:
|
get_history:
|
||||||
name: Get History
|
name: Get History
|
||||||
description: Retrieve conversation history with optional filtering and sorting
|
description: Retrieve conversation history with optional filtering and sorting
|
||||||
|
target:
|
||||||
|
entity:
|
||||||
|
integration: ha_text_ai
|
||||||
|
domain: sensor
|
||||||
fields:
|
fields:
|
||||||
instance:
|
instance:
|
||||||
name: Instance
|
name: Instance
|
||||||
@@ -182,6 +163,10 @@ get_history:
|
|||||||
set_system_prompt:
|
set_system_prompt:
|
||||||
name: Set System Prompt
|
name: Set System Prompt
|
||||||
description: Set default system behavior instructions for all future conversations
|
description: Set default system behavior instructions for all future conversations
|
||||||
|
target:
|
||||||
|
entity:
|
||||||
|
integration: ha_text_ai
|
||||||
|
domain: sensor
|
||||||
fields:
|
fields:
|
||||||
instance:
|
instance:
|
||||||
name: Instance
|
name: Instance
|
||||||
|
|||||||
Reference in New Issue
Block a user