Skip to content

Commit

Permalink
get rid of empty messages
Browse files Browse the repository at this point in the history
  • Loading branch information
PCSwingle committed Jul 25, 2024
1 parent 19a0df7 commit bf3b05a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions spice/wrapped_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ def _convert_messages(
) -> Tuple[str, List[MessageParam]]:
# Anthropic handles both images and system messages different from OpenAI, only allows alternating user / assistant messages,
# and doesn't support tools / function calling (still in beta, and doesn't support streaming)
messages = [m for m in messages if m.get("content", "").strip()]

system = ""
converted_messages: List[MessageParam] = []
Expand Down

0 comments on commit bf3b05a

Please sign in to comment.