mirror of
https://github.com/smkrv/ha-text-ai.git
synced 2026-07-27 09:34:01 +08:00
Hotfix
This commit is contained in:
@@ -131,11 +131,6 @@ get_history:
|
|||||||
mode: dropdown
|
mode: dropdown
|
||||||
|
|
||||||
set_system_prompt:
|
set_system_prompt:
|
||||||
name: Set System Prompt
|
|
||||||
description: >-
|
|
||||||
Configure the AI's behavior by setting a system prompt.
|
|
||||||
This affects how the AI interprets and responds to all future questions.
|
|
||||||
The prompt will persist until changed or cleared.
|
|
||||||
fields:
|
fields:
|
||||||
prompt:
|
prompt:
|
||||||
name: System Prompt
|
name: System Prompt
|
||||||
@@ -157,14 +152,3 @@ set_system_prompt:
|
|||||||
text:
|
text:
|
||||||
multiline: true
|
multiline: true
|
||||||
type: text
|
type: text
|
||||||
max_length: 1000
|
|
||||||
|
|
||||||
clear_prompt:
|
|
||||||
name: Clear Existing Prompt
|
|
||||||
description: >-
|
|
||||||
Set to true to remove the current system prompt before applying the new one.
|
|
||||||
This ensures no conflicting instructions remain.
|
|
||||||
required: false
|
|
||||||
default: false
|
|
||||||
selector:
|
|
||||||
boolean: {}
|
|
||||||
|
|||||||
@@ -1,36 +1,82 @@
|
|||||||
{
|
{
|
||||||
"config": {
|
"config": {
|
||||||
"option": {
|
"step": {
|
||||||
"api_key": {
|
"user": {
|
||||||
"name": "API Key",
|
"title": "Set up HA Text AI",
|
||||||
"description": "Your OpenAI API key"
|
"description": "Configure your OpenAI integration",
|
||||||
},
|
"data": {
|
||||||
"model": {
|
"api_key": {
|
||||||
"name": "Model",
|
"name": "API Key",
|
||||||
"description": "AI model to use for responses"
|
"description": "Your OpenAI API key"
|
||||||
},
|
},
|
||||||
"temperature": {
|
"model": {
|
||||||
"name": "Temperature",
|
"name": "Model",
|
||||||
"description": "Temperature for response generation (0-2)"
|
"description": "AI model to use for responses"
|
||||||
},
|
},
|
||||||
"max_tokens": {
|
"temperature": {
|
||||||
"name": "Max Tokens",
|
"name": "Temperature",
|
||||||
"description": "Maximum tokens in response (1-4096)"
|
"description": "Temperature for response generation (0-2)"
|
||||||
},
|
},
|
||||||
"api_endpoint": {
|
"max_tokens": {
|
||||||
"name": "API Endpoint",
|
"name": "Max Tokens",
|
||||||
"description": "API endpoint URL"
|
"description": "Maximum tokens in response (1-4096)"
|
||||||
},
|
},
|
||||||
"request_interval": {
|
"api_endpoint": {
|
||||||
"name": "Request Interval",
|
"name": "API Endpoint",
|
||||||
"description": "Minimum time between API requests (seconds)"
|
"description": "API endpoint URL"
|
||||||
|
},
|
||||||
|
"request_interval": {
|
||||||
|
"name": "Request Interval",
|
||||||
|
"description": "Minimum time between API requests (seconds)"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"temperature": "Temperature",
|
"step": {
|
||||||
"max_tokens": "Max Tokens",
|
"init": {
|
||||||
"request_interval": "Request Interval"
|
"title": "HA Text AI Options",
|
||||||
|
"data": {
|
||||||
|
"temperature": {
|
||||||
|
"name": "Temperature",
|
||||||
|
"description": "Response temperature (0-2)"
|
||||||
|
},
|
||||||
|
"max_tokens": {
|
||||||
|
"name": "Max Tokens",
|
||||||
|
"description": "Maximum response length"
|
||||||
|
},
|
||||||
|
"request_interval": {
|
||||||
|
"name": "Request Interval",
|
||||||
|
"description": "Time between requests"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"services": {
|
||||||
|
"ask_question": {
|
||||||
|
"name": "Ask Question",
|
||||||
|
"description": "Send a question to the AI model",
|
||||||
|
"fields": {
|
||||||
|
"question": {
|
||||||
|
"name": "Question",
|
||||||
|
"description": "Your question for the AI"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"clear_history": {
|
||||||
|
"name": "Clear History",
|
||||||
|
"description": "Clear conversation history"
|
||||||
|
},
|
||||||
|
"get_history": {
|
||||||
|
"name": "Get History",
|
||||||
|
"description": "Retrieve conversation history"
|
||||||
|
},
|
||||||
|
"set_system_prompt": {
|
||||||
|
"name": "Set System Prompt",
|
||||||
|
"description": "Set system behavior instructions"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"invalid_api_key": "Invalid API key",
|
"invalid_api_key": "Invalid API key",
|
||||||
@@ -51,11 +97,5 @@
|
|||||||
"disconnected": "Disconnected",
|
"disconnected": "Disconnected",
|
||||||
"rate_limited": "Rate limited",
|
"rate_limited": "Rate limited",
|
||||||
"initializing": "Initializing"
|
"initializing": "Initializing"
|
||||||
},
|
|
||||||
"services": {
|
|
||||||
"ask_question": "Ask Question",
|
|
||||||
"clear_history": "Clear History",
|
|
||||||
"get_history": "Get History",
|
|
||||||
"set_system_prompt": "Set System Prompt"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,61 +1,101 @@
|
|||||||
{
|
{
|
||||||
"config": {
|
"config": {
|
||||||
"option": {
|
"step": {
|
||||||
"api_key": {
|
"user": {
|
||||||
"name": "API ключ",
|
"title": "Настройка HA Text AI",
|
||||||
"description": "Ваш API ключ OpenAI"
|
"description": "Настройка интеграции с OpenAI",
|
||||||
},
|
"data": {
|
||||||
"model": {
|
"api_key": {
|
||||||
"name": "Модель",
|
"name": "API Ключ",
|
||||||
"description": "Модель AI для генерации ответов"
|
"description": "Ваш ключ API OpenAI"
|
||||||
},
|
},
|
||||||
"temperature": {
|
"model": {
|
||||||
"name": "Температура",
|
"name": "Модель",
|
||||||
"description": "Температура для генерации ответов (0-2)"
|
"description": "Модель ИИ для генерации ответов"
|
||||||
},
|
},
|
||||||
"max_tokens": {
|
"temperature": {
|
||||||
"name": "Максимальное количество токенов",
|
"name": "Температура",
|
||||||
"description": "Максимальное количество токенов в ответе (1-4096)"
|
"description": "Температура генерации ответов (0-2)"
|
||||||
},
|
},
|
||||||
"api_endpoint": {
|
"max_tokens": {
|
||||||
"name": "Конечная точка API",
|
"name": "Макс. токенов",
|
||||||
"description": "URL конечной точки API"
|
"description": "Максимальное количество токенов в ответе (1-4096)"
|
||||||
},
|
},
|
||||||
"request_interval": {
|
"api_endpoint": {
|
||||||
"name": "Интервал запросов",
|
"name": "API Endpoint",
|
||||||
"description": "Минимальное время между запросами к API в секундах"
|
"description": "URL конечной точки API"
|
||||||
|
},
|
||||||
|
"request_interval": {
|
||||||
|
"name": "Интервал запросов",
|
||||||
|
"description": "Минимальное время между запросами к API (секунды)"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"temperature": "Температура",
|
"step": {
|
||||||
"max_tokens": "Максимальное количество токенов",
|
"init": {
|
||||||
"request_interval": "Интервал запросов"
|
"title": "Настройки HA Text AI",
|
||||||
|
"data": {
|
||||||
|
"temperature": {
|
||||||
|
"name": "Температура",
|
||||||
|
"description": "Температура ответов (0-2)"
|
||||||
|
},
|
||||||
|
"max_tokens": {
|
||||||
|
"name": "Макс. токенов",
|
||||||
|
"description": "Максимальная длина ответа"
|
||||||
|
},
|
||||||
|
"request_interval": {
|
||||||
|
"name": "Интервал запросов",
|
||||||
|
"description": "Время между запросами"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"services": {
|
||||||
|
"ask_question": {
|
||||||
|
"name": "Задать вопрос",
|
||||||
|
"description": "Отправить вопрос модели ИИ",
|
||||||
|
"fields": {
|
||||||
|
"question": {
|
||||||
|
"name": "Вопрос",
|
||||||
|
"description": "Ваш вопрос для ИИ"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"clear_history": {
|
||||||
|
"name": "Очистить историю",
|
||||||
|
"description": "Очистить историю разговора"
|
||||||
|
},
|
||||||
|
"get_history": {
|
||||||
|
"name": "Получить историю",
|
||||||
|
"description": "Получить историю разговора"
|
||||||
|
},
|
||||||
|
"set_system_prompt": {
|
||||||
|
"name": "Установить системный промпт",
|
||||||
|
"description": "Установить инструкции поведения системы"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"invalid_api_key": "Неверный API ключ",
|
"invalid_api_key": "Недействительный API ключ",
|
||||||
"cannot_connect": "Не удается подключиться к API",
|
"cannot_connect": "Не удается подключиться к API",
|
||||||
"unknown_error": "Неизвестная ошибка",
|
"unknown_error": "Неизвестная ошибка",
|
||||||
"invalid_model": "Неверная модель",
|
"invalid_model": "Недопустимая модель",
|
||||||
"rate_limit_exceeded": "Превышен лимит запросов",
|
"rate_limit_exceeded": "Превышен лимит запросов",
|
||||||
"context_length_exceeded": "Превышена длина контекста",
|
"context_length_exceeded": "Превышена длина контекста",
|
||||||
"api_error": "Ошибка API",
|
"api_error": "Ошибка API",
|
||||||
"timeout_error": "Время ожидания истекло",
|
"timeout_error": "Ошибка тайм-аута",
|
||||||
"queue_full": "Очередь полна",
|
"queue_full": "Очередь заполнена",
|
||||||
"invalid_prompt": "Неверный запрос"
|
"invalid_prompt": "Недопустимый промпт"
|
||||||
},
|
},
|
||||||
"state": {
|
"state": {
|
||||||
"ready": "Готово",
|
"ready": "Готов",
|
||||||
"processing": "Обработка",
|
"processing": "Обработка",
|
||||||
"error": "Ошибка",
|
"error": "Ошибка",
|
||||||
"disconnected": "Отключено",
|
"disconnected": "Отключено",
|
||||||
"rate_limited": "Ограниченный по скорости",
|
"rate_limited": "Превышен лимит",
|
||||||
"initializing": "Инициализация"
|
"initializing": "Инициализация"
|
||||||
},
|
|
||||||
"services": {
|
|
||||||
"ask_question": "Задать вопрос",
|
|
||||||
"clear_history": "Очистить историю",
|
|
||||||
"get_history": "Получить историю",
|
|
||||||
"set_system_prompt": "Установить системный запрос"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user