Skip to content

Commit

Permalink
fix: 🐛 create thread without messages plz
Browse files Browse the repository at this point in the history
  • Loading branch information
benshuk committed Jan 20, 2025
1 parent 182ebbd commit 187c5b1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ai21/clients/common/beta/assistant/threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ def create(
def _create_body(self, messages: List[Message] | NotGiven, **kwargs) -> Optional[dict]:
body = remove_not_given({"messages": messages, **kwargs})

if "messages" in body:
body["messages"] = [modify_message_content(message) for message in body["messages"]]
body["messages"] = [modify_message_content(message) for message in body.get("messages", [])]

return body

Expand Down

0 comments on commit 187c5b1

Please sign in to comment.