docs(readme): Enhance attribute descriptions with detailed English comments

- Add comprehensive explanations for HA Text AI sensor attributes
- Improve readability of README.md documentation
- Provide context and usage details for each sensor attribute
- Translate comments to English with technical clarity

Changes include:
* Detailed descriptions for Model and Provider Information
* Expanded System Status attribute explanations
* Clarified Performance Metrics comments
* Added context for Conversation and Token Usage
* Improved Last Interaction Details descriptions
* Enhanced System Health attribute documentation
This commit is contained in:
SMKRV
2024-11-26 15:01:40 +03:00
parent 0fdc3c93d3
commit d618feffff
+51 -21
View File
@@ -242,52 +242,82 @@ automation:
#### Model and Provider Information #### Model and Provider Information
```yaml ```yaml
# Model details # Name of the AI model currently in use (e.g., latest version of GPT)
{{ state_attr('sensor.ha_text_ai_gpt', 'Model') }} # gpt-4o {{ state_attr('sensor.ha_text_ai_gpt', 'Model') }} # gpt-4o
{{ state_attr('sensor.ha_text_ai_gpt', 'Api provider') }} # openai
# Service provider for the AI model (determines API endpoint and authentication)
{{ state_attr('sensor.ha_text_ai_gpt', 'Api provider') }} # openai
# Previous or alternative model configuration
{{ state_attr('sensor.ha_text_ai_gpt', 'Last model') }} # gpt-4o {{ state_attr('sensor.ha_text_ai_gpt', 'Last model') }} # gpt-4o
``` ```
#### System Status #### System Status
```yaml ```yaml
# Operational status # Current operational readiness of the AI service API
{{ state_attr('sensor.ha_text_ai_gpt', 'Api status') }} # ready {{ state_attr('sensor.ha_text_ai_gpt', 'Api status') }} # ready
{{ state_attr('sensor.ha_text_ai_gpt', 'Is processing') }} # false
{{ state_attr('sensor.ha_text_ai_gpt', 'Is rate limited') }} # false # Indicates if a request is currently being processed
{{ state_attr('sensor.ha_text_ai_gpt', 'Is processing') }} # false
# Shows if the API has hit its request rate limit
{{ state_attr('sensor.ha_text_ai_gpt', 'Is rate limited') }} # false
# Status of the specific API endpoint being used
{{ state_attr('sensor.ha_text_ai_gpt', 'Endpoint status') }} # ready {{ state_attr('sensor.ha_text_ai_gpt', 'Endpoint status') }} # ready
``` ```
#### Performance Metrics #### Performance Metrics
```yaml ```yaml
# Request and performance statistics # Total number of successfully completed API requests
{{ state_attr('sensor.ha_text_ai_gpt', 'Successful requests') }} # 0 {{ state_attr('sensor.ha_text_ai_gpt', 'Successful requests') }} # 0
{{ state_attr('sensor.ha_text_ai_gpt', 'Failed requests') }} # 0
{{ state_attr('sensor.ha_text_ai_gpt', 'Average latency') }} # 0 # Number of API requests that encountered errors
{{ state_attr('sensor.ha_text_ai_gpt', 'Failed requests') }} # 0
# Mean time taken to receive a response from the AI service
{{ state_attr('sensor.ha_text_ai_gpt', 'Average latency') }} # 0
# Maximum time taken for a single request-response cycle
{{ state_attr('sensor.ha_text_ai_gpt', 'Max latency') }} # 0 {{ state_attr('sensor.ha_text_ai_gpt', 'Max latency') }} # 0
``` ```
#### Conversation and Token Usage #### Conversation and Token Usage
```yaml ```yaml
# Conversation and token details # Number of previous interactions stored in conversation context
{{ state_attr('sensor.ha_text_ai_gpt', 'History size') }} # 0 {{ state_attr('sensor.ha_text_ai_gpt', 'History size') }} # 0
{{ state_attr('sensor.ha_text_ai_gpt', 'Total tokens') }} # 0
{{ state_attr('sensor.ha_text_ai_gpt', 'Prompt tokens') }} # 0 # Total number of tokens used across all interactions
{{ state_attr('sensor.ha_text_ai_gpt', 'Total tokens') }} # 0
# Tokens used in the input prompts
{{ state_attr('sensor.ha_text_ai_gpt', 'Prompt tokens') }} # 0
# Tokens used in the AI's generated responses
{{ state_attr('sensor.ha_text_ai_gpt', 'Completion tokens') }} # 0 {{ state_attr('sensor.ha_text_ai_gpt', 'Completion tokens') }} # 0
``` ```
#### Last Interaction Details #### Last Interaction Details
```yaml ```yaml
# Last interaction information # Most recent complete response generated by the AI service
{{ state_attr('sensor.ha_text_ai_gpt', 'Response') }} # Last AI response {{ state_attr('sensor.ha_text_ai_gpt', 'Response') }} # Last AI response
{{ state_attr('sensor.ha_text_ai_gpt', 'Question') }} # Last asked question
# The most recently processed user query or prompt
{{ state_attr('sensor.ha_text_ai_gpt', 'Question') }} # Last asked question
# Precise moment when the last interaction occurred (useful for tracking and logging)
{{ state_attr('sensor.ha_text_ai_gpt', 'Last timestamp') }} # Timestamp {{ state_attr('sensor.ha_text_ai_gpt', 'Last timestamp') }} # Timestamp
``` ```
#### System Health #### System Health
```yaml ```yaml
# System health and maintenance # Cumulative count of all errors encountered during AI service interactions
{{ state_attr('sensor.ha_text_ai_gpt', 'Total errors') }} # 0 {{ state_attr('sensor.ha_text_ai_gpt', 'Total errors') }} # 0
{{ state_attr('sensor.ha_text_ai_gpt', 'Is maintenance') }} # false
# Indicates if the AI service is currently undergoing scheduled or emergency maintenance
{{ state_attr('sensor.ha_text_ai_gpt', 'Is maintenance') }} # false
# Total continuous operational time of the AI service (in hours or days)
{{ state_attr('sensor.ha_text_ai_gpt', 'Uptime') }} # 547,58 {{ state_attr('sensor.ha_text_ai_gpt', 'Uptime') }} # 547,58
``` ```