Update app.py
Browse files35 unmodified lines36373839404135 unmodified lines# ============ CHAT FUNCTION ============@spaces.GPUdef chat(message, history, system_prompt):sys_prompt = system_prompt if system_prompt.strip() else DEFAULT_SYSTEM# Build conversation with system prompt + history35 unmodified lines3637383940414235 unmodified lines# ============ CHAT FUNCTION ============@spaces.GPUdef chat(message, history, system_prompt):history = [{"role": h["role"], "content": h["content"]} for h in history]sys_prompt = system_prompt if system_prompt.strip() else DEFAULT_SYSTEM# Build conversation with system prompt + history
app.py+1