Charsarg commited on
Commit
f18008f
·
verified ·
1 Parent(s): c3c24f5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -30,11 +30,14 @@ def respond(
30
 
31
  response = ""
32
 
 
 
33
  for message in client.chat_completion(messages,max_tokens=max_tokens,stream=True,temperature=temperature,top_p=top_p,):
34
  token = message.choices[0].delta.content
35
  print(token,end = '|')
36
  response += token
37
- yield response
 
38
 
39
 
40
  """
 
30
 
31
  response = ""
32
 
33
+ messageEnd = False
34
+
35
  for message in client.chat_completion(messages,max_tokens=max_tokens,stream=True,temperature=temperature,top_p=top_p,):
36
  token = message.choices[0].delta.content
37
  print(token,end = '|')
38
  response += token
39
+ yield token
40
+ #yield response
41
 
42
 
43
  """