Skip to content

Add support for cancellation tokens #86

@reecerussell

Description

@reecerussell

It would be really helpful if this SDK supported cancellation tokens on the public APIs, such as Models.GenerateContentAsync. This would allow clients to continue to follow best practice by supporting cancellations in their projects, which you can and should do with I/O bound work.

This would be a relatively easy feature to add, as the underlying HttpApiClient already supports and just Models would need to be updated. It could also be done in a non-breaking way buy introducing overloads or default parameters to current method signatures.

I would happily open a pull request to tackle this, but the contributing guide said that contributions are not being accepted currently.

Thanks team!

Metadata

Metadata

Labels

priority: p3Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions