ChenyuRabbitLove commited on
Commit
521edbf
1 Parent(s): 8452d18

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -12
app.py CHANGED
@@ -58,17 +58,8 @@ tools = [
58
 
59
  def respond(
60
  message,
61
- history: list[tuple[str, str]],
62
- system_message,
63
  ):
64
  messages = [{"role": "system", "content": system_message}]
65
-
66
- for val in history:
67
- if val[0]:
68
- messages.append({"role": "user", "content": val[0]})
69
- if val[1]:
70
- messages.append({"role": "assistant", "content": val[1]})
71
-
72
  messages.append({"role": "user", "content": message})
73
 
74
  response = chat_completion_request(messages, tools=tools, tool_choice='auto')
@@ -107,9 +98,6 @@ For information on how to customize the ChatInterface, peruse the gradio docs: h
107
  """
108
  demo = gr.ChatInterface(
109
  respond,
110
- additional_inputs=[
111
- gr.Textbox(value="", label="System message"),
112
- ],
113
  )
114
 
115
 
 
58
 
59
  def respond(
60
  message,
 
 
61
  ):
62
  messages = [{"role": "system", "content": system_message}]
 
 
 
 
 
 
 
63
  messages.append({"role": "user", "content": message})
64
 
65
  response = chat_completion_request(messages, tools=tools, tool_choice='auto')
 
98
  """
99
  demo = gr.ChatInterface(
100
  respond,
 
 
 
101
  )
102
 
103