Skip to content

Commit

Permalink
Fix: return message in message_to_openai_message
Browse files Browse the repository at this point in the history
  • Loading branch information
jackmpcollins committed Dec 4, 2024
1 parent 59249bd commit 31a47f6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/magentic/chat_model/openai_chat_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def _(message: UserMessage[Any]) -> ChatCompletionUserMessageParam:
else:
msg = f"Invalid block type: {type(block)}"
raise TypeError(msg)
return {"role": OpenaiMessageRole.USER.value, "content": content}
msg = f"Invalid content type: {type(message.content)}"
raise TypeError(msg)

Expand Down

0 comments on commit 31a47f6

Please sign in to comment.