MCPcopy
hub / github.com/yihong0618/xiaogpt / split_sentences

Function split_sentences

xiaogpt/utils.py:38–46  ·  view source on GitHub ↗
(text_stream: AsyncIterator[str])

Source from the content-addressed store, hash-verified

36
37
38async def split_sentences(text_stream: AsyncIterator[str]) -> AsyncIterator[str]:
39 cur = ""
40 async for text in text_stream:
41 cur += text
42 if cur.endswith(_ending_punctuations):
43 yield cur
44 cur = ""
45 if cur:
46 yield cur
47
48
49def validate_proxy(proxy_str: str) -> bool:

Callers 2

ask_streamMethod · 0.90
ask_streamMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected