Spaces:
Runtime error
Runtime error
acecalisto3
commited on
Commit
•
12a539f
1
Parent(s):
2db6252
Update app.py
Browse files
app.py
CHANGED
@@ -922,18 +922,18 @@ def respond(
|
|
922 |
response = execute_command(command, params)
|
923 |
else:
|
924 |
# Generate a regular response using OpenLlama
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
|
938 |
|
939 |
# Extract the assistant's reply
|
|
|
922 |
response = execute_command(command, params)
|
923 |
else:
|
924 |
# Generate a regular response using OpenLlama
|
925 |
+
prompt = (
|
926 |
+
f"System: {system_message}\n"
|
927 |
+
f"History: {history}\n"
|
928 |
+
f"User: {message}\n"
|
929 |
+
f"Assistant:"
|
930 |
+
)
|
931 |
+
response = openllama_pipeline(
|
932 |
+
prompt,
|
933 |
+
max_length=max_tokens,
|
934 |
+
temperature=temperature,
|
935 |
+
top_p=top_p,
|
936 |
+
)[0]["generated_text"]
|
937 |
|
938 |
|
939 |
# Extract the assistant's reply
|