ojin-client 0.1.7.dev1__tar.gz → 0.1.7.dev3__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.dev1 → ojin_client-0.1.7.dev3}/PKG-INFO +1 -1
- {ojin_client-0.1.7.dev1 → ojin_client-0.1.7.dev3}/ojin/ojin_persona_client.py +8 -5
- {ojin_client-0.1.7.dev1 → ojin_client-0.1.7.dev3}/ojin/ojin_persona_messages.py +1 -1
- {ojin_client-0.1.7.dev1 → ojin_client-0.1.7.dev3}/ojin_client.egg-info/PKG-INFO +1 -1
- {ojin_client-0.1.7.dev1 → ojin_client-0.1.7.dev3}/pyproject.toml +1 -1
- {ojin_client-0.1.7.dev1 → ojin_client-0.1.7.dev3}/README.md +0 -0
- {ojin_client-0.1.7.dev1 → ojin_client-0.1.7.dev3}/ojin/__init__.py +0 -0
- {ojin_client-0.1.7.dev1 → ojin_client-0.1.7.dev3}/ojin/cacert.pem +0 -0
- {ojin_client-0.1.7.dev1 → ojin_client-0.1.7.dev3}/ojin/entities/interaction_messages.py +0 -0
- {ojin_client-0.1.7.dev1 → ojin_client-0.1.7.dev3}/ojin/entities/session_messages.py +0 -0
- {ojin_client-0.1.7.dev1 → ojin_client-0.1.7.dev3}/ojin_client.egg-info/SOURCES.txt +0 -0
- {ojin_client-0.1.7.dev1 → ojin_client-0.1.7.dev3}/ojin_client.egg-info/dependency_links.txt +0 -0
- {ojin_client-0.1.7.dev1 → ojin_client-0.1.7.dev3}/ojin_client.egg-info/requires.txt +0 -0
- {ojin_client-0.1.7.dev1 → ojin_client-0.1.7.dev3}/ojin_client.egg-info/top_level.txt +0 -0
- {ojin_client-0.1.7.dev1 → ojin_client-0.1.7.dev3}/setup.cfg +0 -0
|
@@ -86,7 +86,7 @@ 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 = False
|
|
90
90
|
|
|
91
91
|
async def connect(self) -> None:
|
|
92
92
|
"""Establish WebSocket connection and authenticate with the service."""
|
|
@@ -261,16 +261,20 @@ class OjinPersonaClient(IOjinPersonaClient):
|
|
|
261
261
|
cancel_input = CancelInteractionMessage(
|
|
262
262
|
payload=message.to_proxy_message()
|
|
263
263
|
)
|
|
264
|
-
|
|
264
|
+
|
|
265
|
+
await self._ws.send(cancel_input.model_dump_json())
|
|
266
|
+
|
|
267
|
+
logger.info(f"Message sent {message.interaction_id}")
|
|
268
|
+
|
|
265
269
|
while not self._message_queue.empty():
|
|
266
270
|
try:
|
|
267
271
|
self._message_queue.get_nowait()
|
|
268
272
|
except asyncio.QueueEmpty:
|
|
269
273
|
break
|
|
270
274
|
|
|
271
|
-
await self._ws.send(cancel_input.model_dump_json())
|
|
272
275
|
|
|
273
276
|
self._cancelled = False
|
|
277
|
+
|
|
274
278
|
return
|
|
275
279
|
|
|
276
280
|
if isinstance(message, StartInteractionMessage):
|
|
@@ -286,6 +290,7 @@ class OjinPersonaClient(IOjinPersonaClient):
|
|
|
286
290
|
|
|
287
291
|
if isinstance(message, OjinPersonaInteractionInputMessage):
|
|
288
292
|
logger.info("InteractionMessage")
|
|
293
|
+
logger.info(f"Message sent {message.interaction_id}")
|
|
289
294
|
if not message.audio_int16_bytes:
|
|
290
295
|
raise ValueError("Audio cannot be empty")
|
|
291
296
|
|
|
@@ -319,8 +324,6 @@ class OjinPersonaClient(IOjinPersonaClient):
|
|
|
319
324
|
await self.close()
|
|
320
325
|
error = ErrorResponseMessage(
|
|
321
326
|
payload=ErrorResponse(
|
|
322
|
-
interaction_id="",
|
|
323
|
-
details={},
|
|
324
327
|
code="UNKNOWN",
|
|
325
328
|
message="The message is Unknown",
|
|
326
329
|
timestamp=int(time.monotonic() * 1000),
|
|
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
|