Compare commits

..
Author SHA1 Message Date
SMKRV 3d064f5b9d Release v2.0.3-beta 2024-11-29 00:15:27 +03:00
SMKRV ae8f8bda03 Release v2.0.2-beta 2024-11-29 00:01:27 +03:00
SMKRV 2dbae19c41 Release v2.0.2-beta 2024-11-28 23:59:02 +03:00
6 changed files with 10 additions and 4 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
assignees: ''
---
+1 -1
View File
@@ -3,7 +3,7 @@ name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
assignees: ''
---
+1
View File
@@ -37,3 +37,4 @@ wheels/
Thumbs.db
*.psd
*.zip
*.txt
+1 -1
View File
@@ -21,7 +21,7 @@ We welcome contributions to the HA Text AI project! This document will help you
git remote add upstream https://github.com/smkrv/ha-text-ai.git
```
### 2. Creating a Development Branch
### 2. Creating a Development Branch
```bash
# Update the main branch
@@ -106,6 +106,11 @@ class APIClient:
return await self._create_openai_completion(
model, messages, temperature, max_tokens
)
except (KeyError, IndexError) as e:
if "'choices'" in str(e) or "'message'" in str(e):
raise HomeAssistantError("Failed to get a response from the AI model. Please check your internet connection and try again later.")
else:
raise
except Exception as e:
_LOGGER.error("API request failed: %s", str(e))
raise HomeAssistantError(f"API request failed: {str(e)}")
+1 -1
View File
@@ -23,6 +23,6 @@
"single_config_entry": false,
"ssdp": [],
"usb": [],
"version": "2.0.2-alpha",
"version": "2.0.3-beta",
"zeroconf": []
}