Skip to content

Commit

Permalink
added fix for replaying messagesS
Browse files Browse the repository at this point in the history
  • Loading branch information
ramikalai committed Nov 27, 2024
1 parent 7915ec6 commit 51d3eb8
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -497,10 +497,6 @@ def create(

message_content = message.content
tool_call_id = message.tool_call_id
if not tool_call_id and message_content is None:
# not a function call while the message content is None
fut.set_result(False)
return fut
event: api_proto.ClientEvent.ConversationItemCreate | None = None
if tool_call_id:
if message.role == "tool":
Expand Down Expand Up @@ -547,12 +543,13 @@ def create(
else:
if message_content is None:
logger.warning(
"message content is None, skipping: %s",
"message content is None, setting to empty content for continuity: %s",
message,
extra=self._sess.logging_extra(),
)
fut.set_result(False)
return fut
message_content = []
# fut.set_result(False)
# return fut
if not isinstance(message_content, list):
message_content = [message_content]

Expand Down

0 comments on commit 51d3eb8

Please sign in to comment.