forked from phoenix-oss/llama-stack-mirror
llama-stack version alpha -> v1
This commit is contained in:
parent
a51c8b4efc
commit
b78e6675ea
8 changed files with 390 additions and 407 deletions
|
@ -342,7 +342,6 @@ def is_type_union(typ: object) -> bool:
|
|||
"True if the type annotation corresponds to a union type (e.g. `Union[T1,T2,T3]`)."
|
||||
|
||||
typ = unwrap_annotated_type(typ)
|
||||
|
||||
if _is_union_like(typ):
|
||||
args = typing.get_args(typ)
|
||||
return len(args) > 2 or type(None) not in args
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue