Skip to content

Commit

Permalink
fix: increase api timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
ej52 committed Nov 4, 2023
1 parent eeb85e6 commit 8dc8658
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion custom_components/ollama_conversation/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import aiohttp
import async_timeout

from .const TIMEOUT


class OllamaApiClientError(Exception):
"""Exception to indicate a general API error."""
Expand Down Expand Up @@ -70,7 +72,7 @@ async def _api_wrapper(
) -> any:
"""Get information from the API."""
try:
async with async_timeout.timeout(10):
async with async_timeout.timeout(60):
response = await self._session.request(
method=method,
url=url,
Expand Down
3 changes: 2 additions & 1 deletion custom_components/ollama_conversation/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@

NAME = "Ollama Conversation"
DOMAIN = "ollama_conversation"
VERSION = "0.1.0"
VERSION = "0.1.7"
ATTRIBUTION = "Data provided by http://jsonplaceholder.typicode.com/"
TIMEOUT = 60

CONF_BASE_URL = "base_url"
CONF_CHAT_MODEL = "chat_model"
Expand Down
2 changes: 1 addition & 1 deletion custom_components/ollama_conversation/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"integration_type": "service",
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/ej52/hass-ollama-conversatio/issues",
"version": "0.1.5"
"version": "0.1.7"
}

0 comments on commit 8dc8658

Please sign in to comment.