arohi-k commited on
Commit
1812f55
·
verified ·
1 Parent(s): 1f739f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -16,14 +16,15 @@ def respond(message, history):
16
 
17
  response = ""
18
  for message in client.chat_completion(
19
- messages, max_tokens = 100, stream=True,
20
  #temperature= .1, top_p= 0.7)
21
  # max tokens = change the length of the response
22
  # temp = between 0-2
23
  # top-p = between 0-1
24
  ):
25
  token = messages.choices[0].delta.content
26
- response += token
 
27
  yield response
28
 
29
  def random_message(message, history):
 
16
 
17
  response = ""
18
  for message in client.chat_completion(
19
+ messages, max_tokens = 100, stream=True
20
  #temperature= .1, top_p= 0.7)
21
  # max tokens = change the length of the response
22
  # temp = between 0-2
23
  # top-p = between 0-1
24
  ):
25
  token = messages.choices[0].delta.content
26
+ if token:
27
+ response += token
28
  yield response
29
 
30
  def random_message(message, history):