mirror of
https://github.com/smkrv/ha-text-ai.git
synced 2026-07-25 08:34:01 +08:00
Update ha_text_ai_request.yaml
This commit is contained in:
@@ -1,12 +1,13 @@
|
|||||||
blueprint:
|
blueprint:
|
||||||
name: Text AI Request
|
name: Text AI Request
|
||||||
description: Send a prompt to Text AI service and store the response in a Text Helper
|
description: Send text prompts to AI service and store responses in a Text Helper
|
||||||
domain: automation
|
domain: automation
|
||||||
source_url: https://github.com/smkrv/ha-text-ai/blob/main/blueprints/automation/ha_text_ai_request.yaml
|
source_url: https://github.com/smkrv/ha-text-ai/blob/main/blueprints/automation/ha_text_ai_request.yaml
|
||||||
input:
|
input:
|
||||||
|
# Trigger Configuration
|
||||||
trigger_type:
|
trigger_type:
|
||||||
name: Trigger Type
|
name: Trigger Type
|
||||||
description: Select the type of trigger for automation
|
description: Select the type of trigger for this automation
|
||||||
default: state
|
default: state
|
||||||
selector:
|
selector:
|
||||||
select:
|
select:
|
||||||
@@ -15,71 +16,85 @@ blueprint:
|
|||||||
- numeric_state
|
- numeric_state
|
||||||
- time
|
- time
|
||||||
- template
|
- template
|
||||||
|
|
||||||
trigger_entity:
|
trigger_entity:
|
||||||
name: Trigger Entity
|
name: Trigger Entity
|
||||||
description: Entity that will trigger this automation
|
description: Entity that will trigger this automation when its state changes
|
||||||
selector:
|
selector:
|
||||||
entity: {}
|
entity: {}
|
||||||
|
|
||||||
|
# State Trigger Options
|
||||||
state_from:
|
state_from:
|
||||||
name: From State
|
name: From State
|
||||||
description: Optional 'from state' condition (for state trigger)
|
description: Previous state value to trigger the automation (optional, for state trigger)
|
||||||
default: ""
|
default: ""
|
||||||
selector:
|
selector:
|
||||||
text:
|
text:
|
||||||
|
|
||||||
state_to:
|
state_to:
|
||||||
name: To State
|
name: To State
|
||||||
description: Optional 'to state' condition (for state trigger)
|
description: New state value to trigger the automation (optional, for state trigger)
|
||||||
default: ""
|
default: ""
|
||||||
selector:
|
selector:
|
||||||
text:
|
text:
|
||||||
|
|
||||||
|
# Numeric State Options
|
||||||
numeric_above:
|
numeric_above:
|
||||||
name: Above Value
|
name: Above Value
|
||||||
description: Trigger when numeric value is above (for numeric state)
|
description: Trigger when the numeric value exceeds this threshold
|
||||||
selector:
|
selector:
|
||||||
number:
|
number:
|
||||||
mode: box
|
mode: box
|
||||||
step: 0.1
|
step: 0.1
|
||||||
|
|
||||||
numeric_below:
|
numeric_below:
|
||||||
name: Below Value
|
name: Below Value
|
||||||
description: Trigger when numeric value is below (for numeric state)
|
description: Trigger when the numeric value falls below this threshold
|
||||||
selector:
|
selector:
|
||||||
number:
|
number:
|
||||||
mode: box
|
mode: box
|
||||||
step: 0.1
|
step: 0.1
|
||||||
|
|
||||||
|
# Time Trigger Options
|
||||||
time_at:
|
time_at:
|
||||||
name: Time
|
name: Time
|
||||||
description: Time for the trigger (for time trigger)
|
description: Specific time to trigger the automation (for time trigger)
|
||||||
selector:
|
selector:
|
||||||
time: {}
|
time: {}
|
||||||
|
|
||||||
|
# Template Trigger Options
|
||||||
template_value:
|
template_value:
|
||||||
name: Template
|
name: Template
|
||||||
description: Template condition (for template trigger)
|
description: Template condition that evaluates to true/false (for template trigger)
|
||||||
selector:
|
selector:
|
||||||
template: {}
|
template: {}
|
||||||
|
|
||||||
|
# AI Configuration
|
||||||
prompt_template:
|
prompt_template:
|
||||||
name: Prompt Template
|
name: Prompt Template
|
||||||
description: Template for the prompt. You can use template syntax, e.g., {{ states('sensor.temperature') }}
|
description: >
|
||||||
|
Template for the AI prompt. Supports Home Assistant template syntax.
|
||||||
|
Example: {{ states('sensor.temperature') }} degrees - what should I wear?
|
||||||
selector:
|
selector:
|
||||||
text:
|
text:
|
||||||
multiline: true
|
multiline: true
|
||||||
|
|
||||||
response_id:
|
response_id:
|
||||||
name: Response ID
|
name: Response ID
|
||||||
description: Unique identifier for the Text Helper that will store the response
|
description: Unique identifier for the Text Helper entity that will store the AI response
|
||||||
selector:
|
selector:
|
||||||
text:
|
text:
|
||||||
model:
|
|
||||||
name: AI Model
|
model_name:
|
||||||
description: The AI model to use for generation
|
name: AI Model Name
|
||||||
default: gpt-3.5-turbo
|
description: The name of the AI model to use (e.g., gpt-4, gpt-3.5-turbo, claude-2)
|
||||||
selector:
|
selector:
|
||||||
select:
|
text:
|
||||||
options:
|
|
||||||
- gpt-4
|
# Advanced AI Parameters
|
||||||
- gpt-3.5-turbo
|
|
||||||
- gpt-3.5-turbo-16k
|
|
||||||
temperature:
|
temperature:
|
||||||
name: Temperature
|
name: Temperature
|
||||||
description: Controls randomness in the response (0-2)
|
description: Controls randomness in the response (0 = deterministic, 2 = maximum creativity)
|
||||||
default: 0.7
|
default: 0.7
|
||||||
selector:
|
selector:
|
||||||
number:
|
number:
|
||||||
@@ -87,18 +102,20 @@ blueprint:
|
|||||||
max: 2.0
|
max: 2.0
|
||||||
step: 0.1
|
step: 0.1
|
||||||
mode: slider
|
mode: slider
|
||||||
|
|
||||||
max_tokens:
|
max_tokens:
|
||||||
name: Max Tokens
|
name: Maximum Tokens
|
||||||
description: Maximum length of the response
|
description: Maximum length of the generated response in tokens
|
||||||
default: 150
|
default: 150
|
||||||
selector:
|
selector:
|
||||||
number:
|
number:
|
||||||
min: 1
|
min: 1
|
||||||
max: 4096
|
max: 4096
|
||||||
step: 1
|
step: 1
|
||||||
|
|
||||||
top_p:
|
top_p:
|
||||||
name: Top P
|
name: Top P
|
||||||
description: Controls diversity via nucleus sampling
|
description: Controls diversity via nucleus sampling (lower = more focused)
|
||||||
default: 1.0
|
default: 1.0
|
||||||
selector:
|
selector:
|
||||||
number:
|
number:
|
||||||
@@ -106,9 +123,10 @@ blueprint:
|
|||||||
max: 1.0
|
max: 1.0
|
||||||
step: 0.1
|
step: 0.1
|
||||||
mode: slider
|
mode: slider
|
||||||
|
|
||||||
frequency_penalty:
|
frequency_penalty:
|
||||||
name: Frequency Penalty
|
name: Frequency Penalty
|
||||||
description: Reduces repetition of token sequences
|
description: Reduces repetition of token sequences (-2.0 to 2.0)
|
||||||
default: 0.0
|
default: 0.0
|
||||||
selector:
|
selector:
|
||||||
number:
|
number:
|
||||||
@@ -116,9 +134,10 @@ blueprint:
|
|||||||
max: 2.0
|
max: 2.0
|
||||||
step: 0.1
|
step: 0.1
|
||||||
mode: slider
|
mode: slider
|
||||||
|
|
||||||
presence_penalty:
|
presence_penalty:
|
||||||
name: Presence Penalty
|
name: Presence Penalty
|
||||||
description: Reduces repetition of topics
|
description: Reduces repetition of topics (-2.0 to 2.0)
|
||||||
default: 0.0
|
default: 0.0
|
||||||
selector:
|
selector:
|
||||||
number:
|
number:
|
||||||
@@ -164,7 +183,7 @@ trigger:
|
|||||||
variables:
|
variables:
|
||||||
prompt_template: !input prompt_template
|
prompt_template: !input prompt_template
|
||||||
response_id: !input response_id
|
response_id: !input response_id
|
||||||
model: !input model
|
model_name: !input model_name
|
||||||
temperature: !input temperature
|
temperature: !input temperature
|
||||||
max_tokens: !input max_tokens
|
max_tokens: !input max_tokens
|
||||||
top_p: !input top_p
|
top_p: !input top_p
|
||||||
@@ -176,7 +195,7 @@ action:
|
|||||||
data:
|
data:
|
||||||
prompt: "{{ prompt_template }}"
|
prompt: "{{ prompt_template }}"
|
||||||
response_id: "{{ response_id }}"
|
response_id: "{{ response_id }}"
|
||||||
model: "{{ model }}"
|
model: "{{ model_name }}"
|
||||||
temperature: "{{ temperature }}"
|
temperature: "{{ temperature }}"
|
||||||
max_tokens: "{{ max_tokens }}"
|
max_tokens: "{{ max_tokens }}"
|
||||||
top_p: "{{ top_p }}"
|
top_p: "{{ top_p }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user