dh-mc commited on
Commit
ef1ef76
1 Parent(s): 30bf870
Files changed (1) hide show
  1. app_modules/llm_inference.py +5 -1
app_modules/llm_inference.py CHANGED
@@ -80,7 +80,11 @@ class LLMInference(metaclass=abc.ABCMeta):
80
  if self.llm_loader.streamer is not None and isinstance(
81
  self.llm_loader.streamer, TextIteratorStreamer
82
  ):
83
- count = 2 if len(inputs.get("chat_history")) > 0 else 1
 
 
 
 
84
 
85
  while count > 0:
86
  try:
 
80
  if self.llm_loader.streamer is not None and isinstance(
81
  self.llm_loader.streamer, TextIteratorStreamer
82
  ):
83
+ count = (
84
+ 2
85
+ if "chat_history" in inputs and len(inputs.get("chat_history")) > 0
86
+ else 1
87
+ )
88
 
89
  while count > 0:
90
  try: