Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
|
|
|
|
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 |
|