limeiz commited on
Commit
a3dd3c4
·
verified ·
1 Parent(s): 1f23eea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -29,11 +29,13 @@ def respond(message, history):
29
  ):
30
  token = messages.choices[0].delta.content
31
  response += token
 
 
32
  # change length using max_tokens
33
 
34
  print(response['choices'][0]['message']['content'].strip())
35
 
36
- yield response['choices'][0]['message']['content'].strip()
37
 
38
  def random_message(message, history):
39
  choices = ["yes.", "no.", "it is certain","without a doubt","outlook good","ask again later", "better not tell you now","very doubtful","don't count on it","my sources say no","outlook not so good","very doubtful","reply hazy, try again", "cannot predict now"]
 
29
  ):
30
  token = messages.choices[0].delta.content
31
  response += token
32
+
33
+ yield response['choices'][0]['message']['content'].strip()
34
  # change length using max_tokens
35
 
36
  print(response['choices'][0]['message']['content'].strip())
37
 
38
+
39
 
40
  def random_message(message, history):
41
  choices = ["yes.", "no.", "it is certain","without a doubt","outlook good","ask again later", "better not tell you now","very doubtful","don't count on it","my sources say no","outlook not so good","very doubtful","reply hazy, try again", "cannot predict now"]