mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-15 00:07:28 +00:00
Model: Fix generation when stream = false
References #91. Check if the length of the generation array is > 0 after popping the finish reason. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -602,6 +602,7 @@ class ExllamaV2Container:
|
||||
else:
|
||||
joined_generation["finish_reason"] = "stop"
|
||||
|
||||
if len(generations) > 0:
|
||||
for generation in generations:
|
||||
joined_generation["text"] += unwrap(generation.get("text"), "")
|
||||
joined_generation["offset"].append(unwrap(generation.get("offset"), -1))
|
||||
|
||||
Reference in New Issue
Block a user