Skip to content

Commit

Permalink
fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
anakin87 committed Dec 13, 2024
1 parent 94a103a commit 873ae4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion haystack/components/generators/chat/hugging_face_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def _convert_message_to_hfapi_format(message: ChatMessage) -> Dict[str, str]:
- `role`
- `content`
"""
return {"role": message.role.value, "content": message.text}
return {"role": message.role.value, "content": message.text or ""}


@component
Expand Down

0 comments on commit 873ae4f

Please sign in to comment.