trinity-tandon commited on
Commit
fe69f0a
·
verified ·
1 Parent(s): 6aeb881

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -14,16 +14,17 @@ def respond(message, history):
14
  if history:
15
  messages.extend(history)
16
  messages.append({"role": "user", "content": message})
 
17
  response = ""
18
  for message in client.chat_completion(
19
  messages,
20
  temperature = 0.1
 
21
  stream = True
22
  ):
23
  token = messages.choices[0].delta.content
24
  response += token
25
  yield response
26
- return response['choices'][0]['message']['content'].strip()
27
 
28
  chatbot = gr.ChatInterface(respond, type = "messages")
29
 
 
14
  if history:
15
  messages.extend(history)
16
  messages.append({"role": "user", "content": message})
17
+
18
  response = ""
19
  for message in client.chat_completion(
20
  messages,
21
  temperature = 0.1
22
+ top_p = 0.9
23
  stream = True
24
  ):
25
  token = messages.choices[0].delta.content
26
  response += token
27
  yield response
 
28
 
29
  chatbot = gr.ChatInterface(respond, type = "messages")
30