You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As it stands Invokables can only be called with a single (or no) arg(s). To call an Invokable with multiple args, they must be they must be wrapped in a resource, which either requires the user to define a new resource that repeats the information already in the type signature and leads to awkward user experience or loses type information (e.g. using CallArgs). Ideally, Invokables could be defined with arbitrary args, and the types could be dynamically determined from the call signature at registration time.
A sketch of what to do at registration time:
Parse out its arguments using inspect.
Create a new dynamically generated type that represents the signature. Register it and store it on the invokable class as the input type.
Then in __call__ wrap *args and *kwargs in the new dynamic type, commit it, unwrap it and pass it to call.
The text was updated successfully, but these errors were encountered:
As it stands Invokables can only be called with a single (or no) arg(s). To call an Invokable with multiple args, they must be they must be wrapped in a resource, which either requires the user to define a new resource that repeats the information already in the type signature and leads to awkward user experience or loses type information (e.g. using
CallArgs
). Ideally, Invokables could be defined with arbitrary args, and the types could be dynamically determined from the call signature at registration time.A sketch of what to do at registration time:
__call__
wrap*args
and*kwargs
in the new dynamic type, commit it, unwrap it and pass it to call.The text was updated successfully, but these errors were encountered: