feat(core): APP use new SDK component (#1050)

This commit is contained in:
Fangyin Cheng
2024-01-10 10:39:04 +08:00
committed by GitHub
parent e11b72c724
commit fa8b5b190c
242 changed files with 2768 additions and 2163 deletions

View File

@@ -196,7 +196,7 @@ def truncate_text(text: str, max_length: int) -> str:
def iter_batch(iterable: Union[Iterable, Generator], size: int) -> Iterable:
"""Iterate over an iterable in batches.
>>> list(iter_batch([1,2,3,4,5], 3))
>>> list(iter_batch([1, 2, 3, 4, 5], 3))
[[1, 2, 3], [4, 5]]
"""
source_iter = iter(iterable)