diff --git a/src/realtime_ai/aio/realtime_ai_client.py b/src/realtime_ai/aio/realtime_ai_client.py index 70b8273..050449c 100644 --- a/src/realtime_ai/aio/realtime_ai_client.py +++ b/src/realtime_ai/aio/realtime_ai_client.py @@ -148,7 +148,7 @@ async def generate_response_from_function_call(self, call_id: str, function_outp "event_id": self.service_manager._generate_event_id(), "type": "conversation.item.create", "item": { - "id": str(uuid.uuid4()), # Generate a unique item ID + "id": str(uuid.uuid4()).replace('-', ''), "type": "function_call_output", "call_id": call_id, "output": function_output, diff --git a/src/realtime_ai/realtime_ai_client.py b/src/realtime_ai/realtime_ai_client.py index dd988de..6895736 100644 --- a/src/realtime_ai/realtime_ai_client.py +++ b/src/realtime_ai/realtime_ai_client.py @@ -1,6 +1,6 @@ import threading, logging import concurrent.futures -import queue, time +import queue, time, uuid from realtime_ai.models.realtime_ai_options import RealtimeAIOptions from realtime_ai.models.audio_stream_options import AudioStreamOptions @@ -134,7 +134,7 @@ def generate_response_from_function_call(self, call_id: str, function_output: st "event_id": self.service_manager._generate_event_id(), "type": "conversation.item.create", "item": { - "id": "1234", # Unique item ID + "id": str(uuid.uuid4()).replace('-', ''), "type": "function_call_output", "call_id": call_id, "output": function_output,