Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fastchat/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def parse_gradio_auth_creds(filename: str):

def is_partial_stop(output: str, stop_str: str):
"""Check whether the output contains a partial stop str."""
for i in range(0, min(len(output), len(stop_str))):
for i in range(1, min(len(output), len(stop_str)) + 1):
if stop_str.startswith(output[-i:]):
return True
return False
Expand Down
Loading