Update version to 0.1.39 and align chat requests with OpenClaw session behavior
This commit is contained in:
@@ -78,7 +78,7 @@ _CARD_PATH = Path(__file__).parent / "www" / _CARD_FILENAME
|
||||
# URL at which the card JS is served (registered via register_static_path)
|
||||
_CARD_STATIC_URL = f"/openclaw/{_CARD_FILENAME}"
|
||||
# Versioned URL used for Lovelace resource registration to avoid stale browser cache
|
||||
_CARD_URL = f"{_CARD_STATIC_URL}?v=0.1.37"
|
||||
_CARD_URL = f"{_CARD_STATIC_URL}?v=0.1.39"
|
||||
|
||||
OpenClawConfigEntry = ConfigEntry
|
||||
|
||||
@@ -386,6 +386,7 @@ def _async_register_services(hass: HomeAssistant) -> None:
|
||||
system_prompt = apply_context_policy(raw_context, max_chars, strategy)
|
||||
|
||||
_append_chat_history(hass, session_id, "user", message)
|
||||
|
||||
response = await client.async_send_message(
|
||||
message=message,
|
||||
session_id=session_id,
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -193,6 +193,7 @@ class OpenClawApiClient:
|
||||
}
|
||||
if session_id:
|
||||
payload["session_id"] = session_id
|
||||
payload["user"] = session_id
|
||||
if model:
|
||||
payload["model"] = model
|
||||
|
||||
@@ -200,6 +201,7 @@ class OpenClawApiClient:
|
||||
headers = self._headers()
|
||||
if session_id:
|
||||
headers["X-Session-Id"] = session_id
|
||||
headers["x-openclaw-session-key"] = session_id
|
||||
|
||||
session = await self._get_session()
|
||||
url = f"{self._base_url}{API_CHAT_COMPLETIONS}"
|
||||
@@ -253,12 +255,14 @@ class OpenClawApiClient:
|
||||
}
|
||||
if session_id:
|
||||
payload["session_id"] = session_id
|
||||
payload["user"] = session_id
|
||||
if model:
|
||||
payload["model"] = model
|
||||
|
||||
headers = self._headers()
|
||||
if session_id:
|
||||
headers["X-Session-Id"] = session_id
|
||||
headers["x-openclaw-session-key"] = session_id
|
||||
|
||||
session = await self._get_session()
|
||||
url = f"{self._base_url}{API_CHAT_COMPLETIONS}"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"iot_class": "local_polling",
|
||||
"issue_tracker": "https://github.com/techartdev/OpenClawHomeAssistant/issues",
|
||||
"requirements": [],
|
||||
"version": "0.1.37",
|
||||
"version": "0.1.39",
|
||||
"dependencies": ["conversation"],
|
||||
"after_dependencies": ["hassio", "lovelace"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user