FabienDanieau commited on
Commit
9d9a711
·
1 Parent(s): 95f1745

fix fail of camera log when there is no camera

Browse files
src/reachy_mini_conversation_demo/openai_realtime.py CHANGED
@@ -169,7 +169,7 @@ class OpenaiRealtimeHandler(AsyncStreamHandler):
169
  )
170
  )
171
 
172
- if tool_name == "camera":
173
  b64_im = json.dumps(tool_result["b64_im"])
174
  await self.connection.conversation.item.create(
175
  item={
 
169
  )
170
  )
171
 
172
+ if tool_name == "camera" and "b64_im" in tool_result:
173
  b64_im = json.dumps(tool_result["b64_im"])
174
  await self.connection.conversation.item.create(
175
  item={