加上tools的enum属性

This commit is contained in:
UnCLAS-Prommer
2025-08-03 10:27:47 +08:00
parent 5246a0bb34
commit 1f53ecff10
8 changed files with 55 additions and 29 deletions

View File

@@ -192,17 +192,6 @@ def _build_stream_api_resp(
return resp
async def _to_async_iterable(iterable: Iterable[T]) -> AsyncIterator[T]:
"""
将迭代器转换为异步迭代器
:param iterable: 迭代器对象
:return: 异步迭代器对象
"""
for item in iterable:
await asyncio.sleep(0)
yield item
async def _default_stream_response_handler(
resp_stream: AsyncIterator[GenerateContentResponse],
interrupt_flag: asyncio.Event | None,