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

Function is_sentence_complete

fastchat/utils.py:313–316  ·  view source on GitHub ↗

Check whether the output is a complete sentence.

(output: str)

Source from the content-addressed store, hash-verified

311
312
313def is_sentence_complete(output: str):
314 """Check whether the output is a complete sentence."""
315 end_symbols = (".", "?", "!", "...", "。", "?", "!", "…", '"', "'", "”")
316 return output.endswith(end_symbols)
317
318
319# Models don't use the same configuration key for determining the maximum

Callers 1

generate_streamFunction · 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…