mirror of
https://github.com/Hopiu/llm.git
synced 2026-05-28 06:54:01 +00:00
Fix for TypeError: 'coroutine' object is not iterable
This commit is contained in:
parent
511892b30c
commit
96f910bb30
1 changed files with 2 additions and 2 deletions
|
|
@ -975,10 +975,10 @@ class AsyncResponse(_BaseResponse):
|
||||||
await self._force()
|
await self._force()
|
||||||
return self._tool_calls
|
return self._tool_calls
|
||||||
|
|
||||||
def tool_calls_or_raise(self) -> str:
|
def tool_calls_or_raise(self) -> List[ToolCall]:
|
||||||
if not self._done:
|
if not self._done:
|
||||||
raise ValueError("Response not yet awaited")
|
raise ValueError("Response not yet awaited")
|
||||||
return self.tool_calls()
|
return self._tool_calls
|
||||||
|
|
||||||
async def json(self) -> Optional[Dict[str, Any]]:
|
async def json(self) -> Optional[Dict[str, Any]]:
|
||||||
await self._force()
|
await self._force()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue