-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementing a basic AsyncGuard to logically separate out async calls from Guard() into a new client #767
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Can we have AsyncGuard inherit guard and only override the call functions?
- In AsyncGuard, should all call overloads be Awaitables and marked async on the def?
Done & fixed.
I think this is up to where we want to handle the async management. Right now the _call function calls _call_async which sets the entry point there. Anything from the chain down there needs to be async. I think this is correct. Otherwise, If the call function is async it would be a bit awkward to need the user to manage any async functionality from the outside. With the current setup we will never have to call |
My expectation for an AsyncGuard would be to have to always await both |
Yeah understood and can agree on that. Conforming to the other llm apis seems good. I just see this as a design preference of abstracting away async or not. Will make this change |
Change is made and pushed |
Replaces async functionality in the Guard() class with a second class that is solely for Async calls. Any async calls found in Guard are now deprecated