Files
ha-text-ai/custom_components/ha_text_ai/services.yaml
T
2024-11-18 01:36:58 +03:00

85 lines
2.0 KiB
YAML

# Service to ask a question
ask_question:
name: Ask Question
description: Send a question to the AI and get a response
fields:
question:
name: Question
description: The question or prompt to send to the AI
required: true
example: "What is the weather like today?"
selector:
text:
multiline: true
model:
name: Model
description: Override the default model for this question (optional)
required: false
example: "gpt-4"
default: "gpt-3.5-turbo"
selector:
select:
options:
- "gpt-3.5-turbo"
- "gpt-4"
- "gpt-4-32k"
temperature:
name: Temperature
description: Control randomness in the response (0.0-1.0, lower is more focused)
required: false
default: 0.7
selector:
number:
min: 0.0
max: 1.0
step: 0.1
max_tokens:
name: Max Tokens
description: Maximum length of the response
required: false
default: 1000
selector:
number:
min: 1
max: 4000
step: 1
# Service to clear response history
clear_history:
name: Clear History
description: Clear the stored question and response history
fields: {}
# Service to get response history
get_history:
name: Get History
description: Get the history of questions and responses
fields:
limit:
name: Limit
description: Maximum number of history items to return
required: false
default: 10
selector:
number:
min: 1
max: 100
step: 1
# Service to set system prompt
set_system_prompt:
name: Set System Prompt
description: Set a system prompt that will be used for all future questions
fields:
prompt:
name: System Prompt
description: The system prompt to set
required: true
example: "You are a helpful assistant specializing in home automation"
selector:
text:
multiline: true