mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-29 03:14:19 +00:00
parent
f969b561ea
commit
16d103842a
1 changed files with 2 additions and 2 deletions
|
@ -295,7 +295,7 @@ class AsyncLlamaStackAsLibraryClient(AsyncLlamaStackClient):
|
||||||
body = self._convert_body(path, body)
|
body = self._convert_body(path, body)
|
||||||
return convert_pydantic_to_json_value(await func(**body), cast_to)
|
return convert_pydantic_to_json_value(await func(**body), cast_to)
|
||||||
finally:
|
finally:
|
||||||
await end_trace()
|
end_trace()
|
||||||
|
|
||||||
async def _call_streaming(self, path: str, body: dict = None, cast_to: Any = None):
|
async def _call_streaming(self, path: str, body: dict = None, cast_to: Any = None):
|
||||||
await start_trace(path, {"__location__": "library_client"})
|
await start_trace(path, {"__location__": "library_client"})
|
||||||
|
@ -308,7 +308,7 @@ class AsyncLlamaStackAsLibraryClient(AsyncLlamaStackClient):
|
||||||
async for chunk in await func(**body):
|
async for chunk in await func(**body):
|
||||||
yield convert_pydantic_to_json_value(chunk, cast_to)
|
yield convert_pydantic_to_json_value(chunk, cast_to)
|
||||||
finally:
|
finally:
|
||||||
await end_trace()
|
end_trace()
|
||||||
|
|
||||||
def _convert_body(self, path: str, body: Optional[dict] = None) -> dict:
|
def _convert_body(self, path: str, body: Optional[dict] = None) -> dict:
|
||||||
if not body:
|
if not body:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue