kh-CHEUNG commited on
Commit
4a91257
1 Parent(s): 3dd17b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -95,12 +95,15 @@ def respond(
95
  print(messages)
96
  response = ""
97
 
98
- for message in client.chat_completion(
99
- messages,
100
- max_tokens=max_tokens,
 
 
101
  stream=True,
102
  temperature=temperature,
103
  top_p=top_p,
 
104
  ):
105
  token = message.choices[0].delta.content
106
 
 
95
  print(messages)
96
  response = ""
97
 
98
+ for message in client.chat.completions.create( #client.chat_completion(
99
+ messages=messages,
100
+ streamer=streamer,
101
+ max_new_tokens=max_new_tokens,
102
+ do_sample=True,
103
  stream=True,
104
  temperature=temperature,
105
  top_p=top_p,
106
+ eos_token_id=terminators,
107
  ):
108
  token = message.choices[0].delta.content
109