ojin-client 0.1.7.dev2__tar.gz → 0.1.7.dev4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ojin_client-0.1.7.dev2 → ojin_client-0.1.7.dev4}/PKG-INFO +1 -1
- {ojin_client-0.1.7.dev2 → ojin_client-0.1.7.dev4}/ojin/ojin_persona_client.py +7 -1
- {ojin_client-0.1.7.dev2 → ojin_client-0.1.7.dev4}/ojin_client.egg-info/PKG-INFO +1 -1
- {ojin_client-0.1.7.dev2 → ojin_client-0.1.7.dev4}/pyproject.toml +1 -1
- {ojin_client-0.1.7.dev2 → ojin_client-0.1.7.dev4}/README.md +0 -0
- {ojin_client-0.1.7.dev2 → ojin_client-0.1.7.dev4}/ojin/__init__.py +0 -0
- {ojin_client-0.1.7.dev2 → ojin_client-0.1.7.dev4}/ojin/cacert.pem +0 -0
- {ojin_client-0.1.7.dev2 → ojin_client-0.1.7.dev4}/ojin/entities/interaction_messages.py +0 -0
- {ojin_client-0.1.7.dev2 → ojin_client-0.1.7.dev4}/ojin/entities/session_messages.py +0 -0
- {ojin_client-0.1.7.dev2 → ojin_client-0.1.7.dev4}/ojin/ojin_persona_messages.py +0 -0
- {ojin_client-0.1.7.dev2 → ojin_client-0.1.7.dev4}/ojin_client.egg-info/SOURCES.txt +0 -0
- {ojin_client-0.1.7.dev2 → ojin_client-0.1.7.dev4}/ojin_client.egg-info/dependency_links.txt +0 -0
- {ojin_client-0.1.7.dev2 → ojin_client-0.1.7.dev4}/ojin_client.egg-info/requires.txt +0 -0
- {ojin_client-0.1.7.dev2 → ojin_client-0.1.7.dev4}/ojin_client.egg-info/top_level.txt +0 -0
- {ojin_client-0.1.7.dev2 → ojin_client-0.1.7.dev4}/setup.cfg +0 -0
|
@@ -86,7 +86,8 @@ class OjinPersonaClient(IOjinPersonaClient):
|
|
|
86
86
|
self._running = False
|
|
87
87
|
self._receive_task: Optional[asyncio.Task] = None
|
|
88
88
|
self._inference_server_ready: bool = False
|
|
89
|
-
self._cancelled =
|
|
89
|
+
self._cancelled: bool = False
|
|
90
|
+
self._cancelled_interaction_id: str | None = None
|
|
90
91
|
|
|
91
92
|
async def connect(self) -> None:
|
|
92
93
|
"""Establish WebSocket connection and authenticate with the service."""
|
|
@@ -187,6 +188,10 @@ class OjinPersonaClient(IOjinPersonaClient):
|
|
|
187
188
|
is_final_response=interaction_server_response.payload.is_final_response,
|
|
188
189
|
)
|
|
189
190
|
logger.debug("Received InteractionResponse for id %s", interaction_response.interaction_id)
|
|
191
|
+
|
|
192
|
+
if interaction_response.interaction_id == self._cancelled_interaction_id:
|
|
193
|
+
logger.warning("Message From old interaction")
|
|
194
|
+
return
|
|
190
195
|
await self._message_queue.put(interaction_response)
|
|
191
196
|
return
|
|
192
197
|
except Exception as e:
|
|
@@ -274,6 +279,7 @@ class OjinPersonaClient(IOjinPersonaClient):
|
|
|
274
279
|
|
|
275
280
|
|
|
276
281
|
self._cancelled = False
|
|
282
|
+
self._cancelled_interaction_id = message.interaction_id
|
|
277
283
|
|
|
278
284
|
return
|
|
279
285
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|