videosdk-plugins-openai 0.0.23__py3-none-any.whl → 0.0.25__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.
- videosdk/plugins/openai/realtime_api.py +16 -0
- videosdk/plugins/openai/stt.py +2 -2
- videosdk/plugins/openai/version.py +1 -1
- {videosdk_plugins_openai-0.0.23.dist-info → videosdk_plugins_openai-0.0.25.dist-info}/METADATA +2 -2
- videosdk_plugins_openai-0.0.25.dist-info/RECORD +9 -0
- videosdk_plugins_openai-0.0.23.dist-info/RECORD +0 -9
- {videosdk_plugins_openai-0.0.23.dist-info → videosdk_plugins_openai-0.0.25.dist-info}/WHEEL +0 -0
|
@@ -427,12 +427,28 @@ class OpenAIRealtime(RealtimeBaseModel[OpenAIEventTypes]):
|
|
|
427
427
|
transcript = data.get("transcript", "")
|
|
428
428
|
if transcript:
|
|
429
429
|
await realtime_metrics_collector.set_user_transcript(transcript)
|
|
430
|
+
try:
|
|
431
|
+
self.emit("realtime_model_transcription", {
|
|
432
|
+
"role": "user",
|
|
433
|
+
"text": transcript,
|
|
434
|
+
"is_final": True
|
|
435
|
+
})
|
|
436
|
+
except Exception:
|
|
437
|
+
pass
|
|
430
438
|
|
|
431
439
|
async def _handle_response_done(self, data: dict) -> None:
|
|
432
440
|
"""Handle response completion for agent transcript"""
|
|
433
441
|
if hasattr(self, '_current_audio_transcript') and self._current_audio_transcript:
|
|
434
442
|
await realtime_metrics_collector.set_agent_response(self._current_audio_transcript)
|
|
435
443
|
global_event_emitter.emit("text_response", {"text": self._current_audio_transcript, "type": "done"})
|
|
444
|
+
try:
|
|
445
|
+
self.emit("realtime_model_transcription", {
|
|
446
|
+
"role": "agent",
|
|
447
|
+
"text": self._current_audio_transcript,
|
|
448
|
+
"is_final": True
|
|
449
|
+
})
|
|
450
|
+
except Exception:
|
|
451
|
+
pass
|
|
436
452
|
self._current_audio_transcript = ""
|
|
437
453
|
await realtime_metrics_collector.set_agent_speech_end(timeout=1.0)
|
|
438
454
|
self._agent_speaking = False
|
videosdk/plugins/openai/stt.py
CHANGED
|
@@ -16,7 +16,7 @@ class OpenAISTT(BaseSTT):
|
|
|
16
16
|
def __init__(
|
|
17
17
|
self,
|
|
18
18
|
*,
|
|
19
|
-
api_key: str,
|
|
19
|
+
api_key: str | None = None,
|
|
20
20
|
model: str = "whisper-1",
|
|
21
21
|
base_url: str | None = None,
|
|
22
22
|
prompt: str | None = None,
|
|
@@ -41,7 +41,7 @@ class OpenAISTT(BaseSTT):
|
|
|
41
41
|
|
|
42
42
|
self.client = openai.AsyncClient(
|
|
43
43
|
max_retries=0,
|
|
44
|
-
api_key=api_key,
|
|
44
|
+
api_key=self.api_key,
|
|
45
45
|
base_url=base_url or None,
|
|
46
46
|
http_client=httpx.AsyncClient(
|
|
47
47
|
timeout=httpx.Timeout(connect=15.0, read=5.0, write=5.0, pool=5.0),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.0.
|
|
1
|
+
__version__ = "0.0.25"
|
{videosdk_plugins_openai-0.0.23.dist-info → videosdk_plugins_openai-0.0.25.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: videosdk-plugins-openai
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.25
|
|
4
4
|
Summary: VideoSDK Agent Framework plugin for OpenAI services
|
|
5
5
|
Author: videosdk
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -13,7 +13,7 @@ Classifier: Topic :: Multimedia :: Video
|
|
|
13
13
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
14
14
|
Requires-Python: >=3.11
|
|
15
15
|
Requires-Dist: openai[realtime]>=1.68.2
|
|
16
|
-
Requires-Dist: videosdk-agents>=0.0.
|
|
16
|
+
Requires-Dist: videosdk-agents>=0.0.25
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
|
|
19
19
|
# VideoSDK OpenAI Plugin
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
videosdk/plugins/openai/__init__.py,sha256=1jbc4HOYxkLeruM9RAqmZYSBdnr74gnPHmCNMKXEPrg,259
|
|
2
|
+
videosdk/plugins/openai/llm.py,sha256=igKq1LRrJfgrIbhVFik8aJp1Cux5069sAX-tusfCg6k,7148
|
|
3
|
+
videosdk/plugins/openai/realtime_api.py,sha256=s73iBlZE5bo1vDdnYOYw9VVE_0aliFJwUv4yEjxDBhE,24854
|
|
4
|
+
videosdk/plugins/openai/stt.py,sha256=dDznFK9-ymfgQZqicQs7_pJPOIUi8rHOaQeDB5BFPqg,9511
|
|
5
|
+
videosdk/plugins/openai/tts.py,sha256=m-15GslICL9dOa_H7YqIHP5ifif2OL-7DeTRQunQs9A,4814
|
|
6
|
+
videosdk/plugins/openai/version.py,sha256=arUVm2NUCXA3oCMCK_7Rz-NkbJqt3GeOiTM1HtGuYeI,22
|
|
7
|
+
videosdk_plugins_openai-0.0.25.dist-info/METADATA,sha256=x_IVFvPwuNXztS-CK0VAAEmfTmsVopcy2eZTm6h1JEs,827
|
|
8
|
+
videosdk_plugins_openai-0.0.25.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
9
|
+
videosdk_plugins_openai-0.0.25.dist-info/RECORD,,
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
videosdk/plugins/openai/__init__.py,sha256=1jbc4HOYxkLeruM9RAqmZYSBdnr74gnPHmCNMKXEPrg,259
|
|
2
|
-
videosdk/plugins/openai/llm.py,sha256=igKq1LRrJfgrIbhVFik8aJp1Cux5069sAX-tusfCg6k,7148
|
|
3
|
-
videosdk/plugins/openai/realtime_api.py,sha256=G-1Rn0QpKeVozvrbzh7KExVoYXKgTejBNtfyTBRBP1g,24313
|
|
4
|
-
videosdk/plugins/openai/stt.py,sha256=YZROX-BjTqtWiT6ouMZacLkMYbmao3emB-88ewN93jg,9492
|
|
5
|
-
videosdk/plugins/openai/tts.py,sha256=m-15GslICL9dOa_H7YqIHP5ifif2OL-7DeTRQunQs9A,4814
|
|
6
|
-
videosdk/plugins/openai/version.py,sha256=AZGfcffmm2o30wrhu9YNi-7Caw1Fg2eavlgdTcC0Ml0,22
|
|
7
|
-
videosdk_plugins_openai-0.0.23.dist-info/METADATA,sha256=v58yrMuzRPg7-CRE4ZDLcXP5dAbrH2GiWXWGKGkQh8M,827
|
|
8
|
-
videosdk_plugins_openai-0.0.23.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
9
|
-
videosdk_plugins_openai-0.0.23.dist-info/RECORD,,
|
|
File without changes
|