matthoffner commited on
Commit
3afb5fe
1 Parent(s): c796178

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -98,7 +98,7 @@ async def stream_response(tokens: Any) -> None:
98
  'role': 'system',
99
  'content': llm.detokenize(chat_chunk)
100
  },
101
- 'finish_reason': 'stop' if llm.detokenize(chat_chunk) == "[DONE]" else 'unknown'
102
  }
103
  ]
104
  }
 
98
  'role': 'system',
99
  'content': llm.detokenize(chat_chunk)
100
  },
101
+ 'finish_reason': 'stop' if llm.is_eos_token(chat_chunk) else 'unknown'
102
  }
103
  ]
104
  }