videosdk-plugins-openai 0.0.7__tar.gz → 0.0.9__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.
- {videosdk_plugins_openai-0.0.7 → videosdk_plugins_openai-0.0.9}/PKG-INFO +2 -2
- {videosdk_plugins_openai-0.0.7 → videosdk_plugins_openai-0.0.9}/pyproject.toml +1 -1
- {videosdk_plugins_openai-0.0.7 → videosdk_plugins_openai-0.0.9}/videosdk/plugins/openai/realtime_api.py +1 -20
- videosdk_plugins_openai-0.0.9/videosdk/plugins/openai/version.py +1 -0
- videosdk_plugins_openai-0.0.7/videosdk/plugins/openai/version.py +0 -1
- {videosdk_plugins_openai-0.0.7 → videosdk_plugins_openai-0.0.9}/.gitignore +0 -0
- {videosdk_plugins_openai-0.0.7 → videosdk_plugins_openai-0.0.9}/README.md +0 -0
- {videosdk_plugins_openai-0.0.7 → videosdk_plugins_openai-0.0.9}/videosdk/plugins/openai/__init__.py +0 -0
- {videosdk_plugins_openai-0.0.7 → videosdk_plugins_openai-0.0.9}/videosdk/plugins/openai/llm.py +0 -0
- {videosdk_plugins_openai-0.0.7 → videosdk_plugins_openai-0.0.9}/videosdk/plugins/openai/stt.py +0 -0
- {videosdk_plugins_openai-0.0.7 → videosdk_plugins_openai-0.0.9}/videosdk/plugins/openai/tts.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: videosdk-plugins-openai
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.9
|
|
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.
|
|
15
|
+
Requires-Dist: videosdk-agents>=0.0.15
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
|
|
18
18
|
VideoSDK OpenAI Plugin
|
|
@@ -131,9 +131,6 @@ class OpenAIRealtime(RealtimeBaseModel[OpenAIEventTypes]):
|
|
|
131
131
|
self.audio_track: Optional[CustomAudioStreamTrack] = None
|
|
132
132
|
self._formatted_tools: Optional[List[Dict[str, Any]]] = None
|
|
133
133
|
self.config: OpenAIRealtimeConfig = config or OpenAIRealtimeConfig()
|
|
134
|
-
# global_event_emitter.on("instructions_updated", self._handle_instructions_updated)
|
|
135
|
-
# global_event_emitter.on("tools_updated", self._handle_tools_updated)
|
|
136
|
-
|
|
137
134
|
self.input_sample_rate = 48000
|
|
138
135
|
self.target_sample_rate = 16000
|
|
139
136
|
|
|
@@ -207,7 +204,6 @@ class OpenAIRealtime(RealtimeBaseModel[OpenAIEventTypes]):
|
|
|
207
204
|
if not self._session:
|
|
208
205
|
raise RuntimeError("No active WebSocket session")
|
|
209
206
|
|
|
210
|
-
# Create response event
|
|
211
207
|
response_event = {
|
|
212
208
|
"type": "response.create",
|
|
213
209
|
"event_id": str(uuid.uuid4()),
|
|
@@ -219,18 +215,8 @@ class OpenAIRealtime(RealtimeBaseModel[OpenAIEventTypes]):
|
|
|
219
215
|
}
|
|
220
216
|
}
|
|
221
217
|
|
|
222
|
-
# Send the event through our message queue
|
|
223
218
|
await self.send_event(response_event)
|
|
224
|
-
|
|
225
|
-
# session_update = {
|
|
226
|
-
# "type": "session.update",
|
|
227
|
-
# "session": {
|
|
228
|
-
# "instructions": self._instructions
|
|
229
|
-
# }
|
|
230
|
-
# }
|
|
231
|
-
|
|
232
|
-
# await self.send_event(session_update)
|
|
233
|
-
|
|
219
|
+
|
|
234
220
|
async def _handle_websocket(self, session: OpenAISession) -> None:
|
|
235
221
|
"""Start WebSocket send/receive tasks"""
|
|
236
222
|
session.tasks.extend([
|
|
@@ -412,8 +398,6 @@ class OpenAIRealtime(RealtimeBaseModel[OpenAIEventTypes]):
|
|
|
412
398
|
|
|
413
399
|
async def _handle_input_audio_transcription_completed(self, data: dict) -> None:
|
|
414
400
|
"""Handle input audio transcription completion"""
|
|
415
|
-
# if "transcript" in data:
|
|
416
|
-
# self.emit("transcription_event", {"text": data["transcript"]})
|
|
417
401
|
|
|
418
402
|
async def _handle_response_done(self, data: dict) -> None:
|
|
419
403
|
"""Handle response completion"""
|
|
@@ -442,7 +426,6 @@ class OpenAIRealtime(RealtimeBaseModel[OpenAIEventTypes]):
|
|
|
442
426
|
except (asyncio.CancelledError, asyncio.TimeoutError):
|
|
443
427
|
pass
|
|
444
428
|
|
|
445
|
-
# Close WebSocket
|
|
446
429
|
if not session.ws.closed:
|
|
447
430
|
try:
|
|
448
431
|
await session.ws.close()
|
|
@@ -472,7 +455,6 @@ class OpenAIRealtime(RealtimeBaseModel[OpenAIEventTypes]):
|
|
|
472
455
|
if not self._session:
|
|
473
456
|
return
|
|
474
457
|
|
|
475
|
-
# Conditionally set turn detection and audio transcription based on modalities
|
|
476
458
|
turn_detection = None
|
|
477
459
|
input_audio_transcription = None
|
|
478
460
|
|
|
@@ -501,7 +483,6 @@ class OpenAIRealtime(RealtimeBaseModel[OpenAIEventTypes]):
|
|
|
501
483
|
}
|
|
502
484
|
}
|
|
503
485
|
|
|
504
|
-
# Only add audio-related configurations if audio modality is enabled
|
|
505
486
|
if "audio" in self.config.modalities:
|
|
506
487
|
session_update["session"]["voice"] = self.config.voice
|
|
507
488
|
session_update["session"]["input_audio_format"] = DEFAULT_INPUT_AUDIO_FORMAT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.9"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.0.7"
|
|
File without changes
|
|
File without changes
|
{videosdk_plugins_openai-0.0.7 → videosdk_plugins_openai-0.0.9}/videosdk/plugins/openai/__init__.py
RENAMED
|
File without changes
|
{videosdk_plugins_openai-0.0.7 → videosdk_plugins_openai-0.0.9}/videosdk/plugins/openai/llm.py
RENAMED
|
File without changes
|
{videosdk_plugins_openai-0.0.7 → videosdk_plugins_openai-0.0.9}/videosdk/plugins/openai/stt.py
RENAMED
|
File without changes
|
{videosdk_plugins_openai-0.0.7 → videosdk_plugins_openai-0.0.9}/videosdk/plugins/openai/tts.py
RENAMED
|
File without changes
|