Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ custom_template = {
|
|
11 |
}
|
12 |
}
|
13 |
|
14 |
-
def format_messages(message, history):
|
15 |
formatted_messages = []
|
16 |
|
17 |
# Add system message if present
|
@@ -38,7 +38,7 @@ def respond(
|
|
38 |
temperature,
|
39 |
top_p,
|
40 |
):
|
41 |
-
formatted_messages = format_messages(message, history)
|
42 |
response = ""
|
43 |
|
44 |
# Call chat_completion with formatted messages
|
@@ -72,3 +72,4 @@ demo = gr.ChatInterface(
|
|
72 |
|
73 |
if __name__ == "__main__":
|
74 |
demo.launch()
|
|
|
|
11 |
}
|
12 |
}
|
13 |
|
14 |
+
def format_messages(message, history, system_message):
|
15 |
formatted_messages = []
|
16 |
|
17 |
# Add system message if present
|
|
|
38 |
temperature,
|
39 |
top_p,
|
40 |
):
|
41 |
+
formatted_messages = format_messages(message, history, system_message)
|
42 |
response = ""
|
43 |
|
44 |
# Call chat_completion with formatted messages
|
|
|
72 |
|
73 |
if __name__ == "__main__":
|
74 |
demo.launch()
|
75 |
+
|