MCPcopy
hub / github.com/lm-sys/FastChat / is_partial_stop

Function is_partial_stop

fastchat/utils.py:299–304  ·  view source on GitHub ↗

Check whether the output contains a partial stop str.

(output: str, stop_str: str)

Source from the content-addressed store, hash-verified

297
298
299def is_partial_stop(output: str, stop_str: str):
300 """Check whether the output contains a partial stop str."""
301 for i in range(0, min(len(output), len(stop_str))):
302 if stop_str.startswith(output[-i:]):
303 return True
304 return False
305
306
307def run_cmd(cmd: str):

Callers 7

generate_streamMethod · 0.90
generate_streamMethod · 0.90
generate_streamMethod · 0.90
generate_streamFunction · 0.90
generate_streamMethod · 0.90
generate_stream_falconFunction · 0.90
generate_stream_yuan2Function · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…