Hansimov commited on
Commit
3dfcb72
1 Parent(s): e28221f

:zap: [Enhance] API: Ensure temperature to be positive

Browse files
Files changed (1) hide show
  1. networks/message_streamer.py +1 -1
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
  },