Spaces:
Sleeping
Sleeping
File size: 242 Bytes
819ac9a | 1 2 3 4 5 6 | def format_history(history):
"""Format chat history for the model input."""
formatted = ""
for user_msg, assistant_msg in history:
formatted += f"User: {user_msg}\nAssistant: {assistant_msg}\n"
return formatted.strip() |