Closed holymode closed 1 year ago
I've added a new method to GPTFunctionLibrary in the latest release that can invoke coroutines called call_by_dict_async
check examples/async_functions.py for an example.
How does it work if you have mixed functions? For example, a couple of sync functions and then a bunch of async, would call_by_dict_async still work for both?
call_by_dict_async works for both sync and async functions.
Sweet. Thanks for adding it.
Actually, it doesnt work for me. I'm getting: Object of type coroutine is not JSON serializable
Edit: Actually nvm, might be my issue
I have a decorator function that makes sync function async, however if I add it to the class, it acts like the function doesn't exist, even tho i can see in the log that it loads it up as coroutine.
Can you give me an example for it?
I really like this lib, makes it a breeze to add.
Decorators on a function: @AILibFunction @LibParam @make_async