Arcana::AI::Context
Cancellation context for in-flight API requests.
Create a context, pass it to complete, and call cancel from
another fiber to abort the request.
ctx = Arcana::AI::Context.new spawn { sleep 5.seconds; ctx.cancel } response = provider.complete(request, ctx)
Constructors
new
SourceInstance methods
cancelled?
SourceBlock until cancelled or timeout. Returns true if cancelled.