(text_stream: AsyncIterator[str])
| 36 | |
| 37 | |
| 38 | async 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 | |
| 49 | def validate_proxy(proxy_str: str) -> bool: |
no outgoing calls
no test coverage detected