Skip to content

[Feature] Abstract process_input and process_response should be async #8

Open
@ryanmeans

Description

@ryanmeans

Is your feature request related to a problem? Please describe.
It's not unlikely that process_input / response would like to themselves make some kind of external call. The Processor is already running in an event loop, it would greatly improve developer ergonomics to make the public facing API async as well.

Describe the solution you'd like
Make these two functions async

Describe alternatives you've considered
The above might be a breaking change. You could calls inspect.iscoroutinefunction from the base class to not break the API (typecheckers would be unhappy), or make a separate AsyncProcessor (bad name, since the processor is async), or have a separate abstract process_input_async method and ensure only one of the two is implemented.

Overall I'd expect this is a pretty small change and could add it, but I'm probably not as opinionated on the exact specifics of how to add this to the sdk.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions