ojin-client 0.1.7.dev8__tar.gz → 0.1.7.dev9__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.1.7.dev8
3
+ Version: 0.1.7.dev9
4
4
  Summary: Ojin platform services
5
5
  Author: Journee
6
6
  License: Apache-2.0
@@ -87,7 +87,7 @@ class OjinPersonaClient(IOjinPersonaClient):
87
87
  self._receive_task: Optional[asyncio.Task] = None
88
88
  self._inference_server_ready: bool = False
89
89
  self._cancelled: bool = False
90
- self.active_interaction_id: str | None = None
90
+ self._active_interaction_id: str | None = None
91
91
  self._split_audio_task: Optional[asyncio.Task] = None
92
92
  self._audio_queue: asyncio.Queue[OjinPersonaInteractionInputMessage] = asyncio.Queue()
93
93
 
@@ -135,7 +135,7 @@ class OjinPersonaClient(IOjinPersonaClient):
135
135
  pass
136
136
 
137
137
  self._running = False
138
- self.active_interaction_id = None
138
+ self._active_interaction_id = None
139
139
 
140
140
  if self._ws:
141
141
  try:
@@ -200,8 +200,9 @@ class OjinPersonaClient(IOjinPersonaClient):
200
200
  )
201
201
  logger.debug("Received InteractionResponse for id %s", interaction_response.interaction_id)
202
202
 
203
- if interaction_response.interaction_id == self._cancelled_interaction_id:
204
- logger.warning("Message From old interaction")
203
+ # TODO: Possibly want to delete
204
+ if interaction_response.interaction_id != self._active_interaction_id:
205
+ logger.warning("Message From other interaction")
205
206
  return
206
207
  await self._message_queue.put(interaction_response)
207
208
  return
@@ -305,7 +306,7 @@ class OjinPersonaClient(IOjinPersonaClient):
305
306
 
306
307
  if isinstance(message, StartInteractionMessage):
307
308
  interaction_id = str(uuid.uuid4())
308
- self.active_interaction_id = interaction_id
309
+ self._active_interaction_id = interaction_id
309
310
  logger.info("Generate UUID %s", interaction_id)
310
311
  interaction_response = StartInteractionResponseMessage(
311
312
  interaction_id=interaction_id
@@ -318,7 +319,7 @@ class OjinPersonaClient(IOjinPersonaClient):
318
319
  if isinstance(message, OjinPersonaInteractionInputMessage):
319
320
  logger.info("InteractionMessage")
320
321
  logger.info(f"Message sent {message.interaction_id}")
321
- if message.interaction_id != self.active_interaction_id:
322
+ if message.interaction_id != self._active_interaction_id:
322
323
  return
323
324
 
324
325
  if not message.audio_int16_bytes:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ojin-client
3
- Version: 0.1.7.dev8
3
+ Version: 0.1.7.dev9
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.1.7dev8"
3
+ version = "0.1.7dev9"
4
4
  description = "Ojin platform services"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"