mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-17 20:02:37 +00:00
Minor
This commit is contained in:
parent
1bcc26ccd1
commit
7a1b60fccf
2 changed files with 4 additions and 16 deletions
|
|
@ -25,7 +25,6 @@ from llama_stack_client import (
|
|||
AsyncStream,
|
||||
LlamaStackClient,
|
||||
NOT_GIVEN,
|
||||
Stream,
|
||||
)
|
||||
from pydantic import BaseModel, TypeAdapter
|
||||
from rich.console import Console
|
||||
|
|
@ -370,8 +369,10 @@ class AsyncLlamaStackAsLibraryClient(AsyncLlamaStackClient):
|
|||
json=options.json_data,
|
||||
),
|
||||
)
|
||||
origin = get_origin(stream_cls)
|
||||
assert origin is Stream
|
||||
|
||||
# we use asynchronous impl always internally and channel all requests to AsyncLlamaStackClient
|
||||
# however, the top-level caller may be a SyncAPIClient -- so its stream_cls might be a Stream (SyncStream)
|
||||
# so we need to convert it to AsyncStream
|
||||
args = get_args(stream_cls)
|
||||
stream_cls = AsyncStream[args[0]]
|
||||
response = AsyncAPIResponse(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue