videosdk-plugins-openai 0.0.6__py3-none-any.whl → 0.0.7__py3-none-any.whl

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.

Potentially problematic release.


This version of videosdk-plugins-openai might be problematic. Click here for more details.

@@ -21,6 +21,7 @@ from videosdk.agents import (
21
21
  CustomAudioStreamTrack,
22
22
  ToolChoice,
23
23
  RealtimeBaseModel,
24
+ global_event_emitter,
24
25
  Agent
25
26
  )
26
27
 
@@ -334,8 +335,6 @@ class OpenAIRealtime(RealtimeBaseModel[OpenAIEventTypes]):
334
335
  async def _handle_response_created(self, data: dict) -> None:
335
336
  """Handle initial response creation"""
336
337
  response_id = data.get("response", {}).get("id")
337
-
338
- self.emit("response_created", {"response_id": response_id})
339
338
 
340
339
  async def _handle_output_item_added(self, data: dict) -> None:
341
340
  """Handle new output item addition"""
@@ -405,6 +404,8 @@ class OpenAIRealtime(RealtimeBaseModel[OpenAIEventTypes]):
405
404
  "event_id": str(uuid.uuid4())
406
405
  }
407
406
  await self.send_event(cancel_event)
407
+ if self.audio_track:
408
+ self.audio_track.interrupt()
408
409
 
409
410
  async def _handle_transcript_delta(self, data: dict) -> None:
410
411
  """Handle transcript chunk"""
@@ -585,6 +586,6 @@ class OpenAIRealtime(RealtimeBaseModel[OpenAIEventTypes]):
585
586
  try:
586
587
  text_content = data.get("text", "")
587
588
  if text_content:
588
- self.emit("text_response", {"text": text_content, "type": "done"})
589
+ global_event_emitter.emit("text_response", {"text": text_content, "type": "done"})
589
590
  except Exception as e:
590
591
  print(f"[ERROR] Error handling text done: {e}")
@@ -1 +1 @@
1
- __version__ = "0.0.6"
1
+ __version__ = "0.0.7"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: videosdk-plugins-openai
3
- Version: 0.0.6
3
+ Version: 0.0.7
4
4
  Summary: VideoSDK Agent Framework plugin for OpenAI services
5
5
  Author: videosdk
6
6
  Keywords: ai,audio,openai,video,videosdk
@@ -12,7 +12,7 @@ Classifier: Topic :: Multimedia :: Video
12
12
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
13
13
  Requires-Python: >=3.11
14
14
  Requires-Dist: openai[realtime]>=1.68.2
15
- Requires-Dist: videosdk-agents>=0.0.9
15
+ Requires-Dist: videosdk-agents>=0.0.10
16
16
  Description-Content-Type: text/markdown
17
17
 
18
18
  VideoSDK OpenAI Plugin
@@ -0,0 +1,9 @@
1
+ videosdk/plugins/openai/__init__.py,sha256=1jbc4HOYxkLeruM9RAqmZYSBdnr74gnPHmCNMKXEPrg,259
2
+ videosdk/plugins/openai/llm.py,sha256=wvWfQ8OA1AcdMMDEf4y93-2vSnSdulYjGpd9IVWFdxc,6145
3
+ videosdk/plugins/openai/realtime_api.py,sha256=jLIfNwje7JgxwyncHPVYNkPLGBGJIPANU5W-gKpyaYg,23837
4
+ videosdk/plugins/openai/stt.py,sha256=YZROX-BjTqtWiT6ouMZacLkMYbmao3emB-88ewN93jg,9492
5
+ videosdk/plugins/openai/tts.py,sha256=LDsYXuHBoN-8g1iYt7JV_vRWOJZvhUN8QZQj_q264rU,3635
6
+ videosdk/plugins/openai/version.py,sha256=D0UVD6fSKhTEm2bcEShuydq4MtAQfmIq3CLzUVZH53I,21
7
+ videosdk_plugins_openai-0.0.7.dist-info/METADATA,sha256=O9GLed6Ir6-7R48i44h0d5epr_RKykIg2F5juyRnNME,775
8
+ videosdk_plugins_openai-0.0.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
9
+ videosdk_plugins_openai-0.0.7.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- videosdk/plugins/openai/__init__.py,sha256=1jbc4HOYxkLeruM9RAqmZYSBdnr74gnPHmCNMKXEPrg,259
2
- videosdk/plugins/openai/llm.py,sha256=wvWfQ8OA1AcdMMDEf4y93-2vSnSdulYjGpd9IVWFdxc,6145
3
- videosdk/plugins/openai/realtime_api.py,sha256=3qPTTGrw8P3TnHva2898mAlSjUEbbifSxKZq3blltd4,23802
4
- videosdk/plugins/openai/stt.py,sha256=YZROX-BjTqtWiT6ouMZacLkMYbmao3emB-88ewN93jg,9492
5
- videosdk/plugins/openai/tts.py,sha256=LDsYXuHBoN-8g1iYt7JV_vRWOJZvhUN8QZQj_q264rU,3635
6
- videosdk/plugins/openai/version.py,sha256=CzcXzRPJNqTNVzWp48bKd5k9CaHSjpVkLYKkiQcGpAY,21
7
- videosdk_plugins_openai-0.0.6.dist-info/METADATA,sha256=pAfpKWgYGGIDevroF_Y0V3_ztEY0BPc0If0uy7E1syQ,774
8
- videosdk_plugins_openai-0.0.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
9
- videosdk_plugins_openai-0.0.6.dist-info/RECORD,,