Connection
Base URL, credentials and a reachable server.
Make a Go worker stop when its context is cancelled while waiting to send a result. Exercise cancellation before startup and during a blocked send, checking that the worker exits without closing a channel it does not own.
Base URL, credentials and a reachable server.
A model available through the configured endpoint.
Context limits and tool support are determined by the model and server.
if err := ctx.Err(); err != nil {
return err
}
select {
case results <- value:
return nil
case <-ctx.Done():
return ctx.Err()
}