Aksh1t commited on
Commit
8358a85
1 Parent(s): 173bcd0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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
+