Spaces:
Runtime error
Runtime error
:zap: [Enhance] API: Ensure temperature to be positive
Browse files
networks/message_streamer.py
CHANGED
@@ -42,7 +42,7 @@ class MessageStreamer:
|
|
42 |
self.request_body = {
|
43 |
"inputs": prompt,
|
44 |
"parameters": {
|
45 |
-
"temperature": temperature,
|
46 |
"max_new_tokens": max_new_tokens,
|
47 |
"return_full_text": False,
|
48 |
},
|
|
|
42 |
self.request_body = {
|
43 |
"inputs": prompt,
|
44 |
"parameters": {
|
45 |
+
"temperature": max(temperature, 0.01), # must be positive
|
46 |
"max_new_tokens": max_new_tokens,
|
47 |
"return_full_text": False,
|
48 |
},
|