Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,9 +52,11 @@ def respond(
|
|
| 52 |
max_tokens,
|
| 53 |
temperature,
|
| 54 |
top_p,
|
|
|
|
| 55 |
):
|
| 56 |
# Preprocess the user input
|
| 57 |
-
|
|
|
|
| 58 |
|
| 59 |
messages = [{"role": "system", "content": system_message}]
|
| 60 |
|
|
|
|
| 52 |
max_tokens,
|
| 53 |
temperature,
|
| 54 |
top_p,
|
| 55 |
+
preprocess_user_input
|
| 56 |
):
|
| 57 |
# Preprocess the user input
|
| 58 |
+
if preprocess:
|
| 59 |
+
message = preprocess_user_input(message)
|
| 60 |
|
| 61 |
messages = [{"role": "system", "content": system_message}]
|
| 62 |
|