ojin-client 0.4.5.dev0__tar.gz → 0.4.5.dev1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ojin-client
3
- Version: 0.4.5.dev0
3
+ Version: 0.4.5.dev1
4
4
  Summary: Ojin platform services
5
5
  Author: Journee
6
6
  License: Apache-2.0
@@ -408,7 +408,7 @@ class OjinPersonaClient(IOjinPersonaClient):
408
408
  await self._ws.send(end_interaction_message.model_dump_json())
409
409
 
410
410
 
411
- async def receive_message(self) -> BaseModel | None:
411
+ def receive_message(self) -> BaseModel | None:
412
412
  """Receive the next message from the OJIN Persona service.
413
413
 
414
414
  Returns:
@@ -420,14 +420,17 @@ class OjinPersonaClient(IOjinPersonaClient):
420
420
  """
421
421
  if self._cancelled:
422
422
  return None
423
-
424
423
  try:
425
- return await asyncio.wait_for(
426
- self._available_response_messages_queue.get(),
427
- timeout=1.0
428
- )
429
- except asyncio.TimeoutError:
424
+ return self._available_response_messages_queue.get_nowait()
425
+ except asyncio.QueueEmpty:
430
426
  return None
427
+ # try:
428
+ # return await asyncio.wait_for(
429
+ # self._available_response_messages_queue.get(),
430
+ # timeout=1.0
431
+ # )
432
+ # except asyncio.TimeoutError:
433
+ # return None
431
434
 
432
435
  def is_connected(self) -> bool:
433
436
  """Check if the client is connected to the WebSocket."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ojin-client
3
- Version: 0.4.5.dev0
3
+ Version: 0.4.5.dev1
4
4
  Summary: Ojin platform services
5
5
  Author: Journee
6
6
  License: Apache-2.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ojin-client"
3
- version = "0.4.5.dev"
3
+ version = "0.4.5.dev1"
4
4
  description = "Ojin platform services"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"