mirror of
https://github.com/wassname/Clover-Edition.git
synced 2026-10-29 12:40:16 +08:00
fix for when no action
This commit is contained in:
1 parent
d86ced8a0e
commit
02c080e40f
1 file changed
+1
-1
+1
-1
@@ -122,7 +122,7 @@ def clean_suggested_action(result_raw, min_length=4):
|
||||
results = [s.strip() for s in results]
|
||||
results = [s for s in results if len(s) > min_length]
|
||||
# Sometimes actions are generated with leading > ! . or ?. Likely the model trying to finish the prompt or start an action.
|
||||
result = results[0].strip().lstrip(" >!.?")
|
||||
result = results[0].strip().lstrip(" >!.?") if len(results) else ''
|
||||
result = cut_trailing_quotes(result)
|
||||
logger.debug(
|
||||
"full suggested action '%s'. Cropped: '%s'. Split '%s'",
|
||||
|
||||
Reference in new issue
Block a user