Skip to content

Commit

Permalink
Merge pull request #9 from jhakulin/jhakulin/fix-function-response
Browse files Browse the repository at this point in the history
Jhakulin/fix function response
  • Loading branch information
jhakulin authored Nov 9, 2024
2 parents 188d613 + 7356ab4 commit 57b53b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/realtime_ai/aio/realtime_ai_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/realtime_ai/realtime_ai_client.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 57b53b4

Please sign in to comment.