Document llm NewClient logger help

This commit is contained in:
dwrz
2026-09-26 17:16:40 +00:00
parent 036434b5a4
commit ef6cf36f48
+2 -1
View File
@@ -58,7 +58,8 @@ type Client struct {
}
// NewClient creates a client from cfg. If cfg.Timeout is empty, requests have a
// five-minute timeout. log must be non-nil.
// five-minute timeout. log must be non-nil; pass
// slog.New(slog.DiscardHandler) to run without logs.
func NewClient(cfg Config, log *slog.Logger) (*Client, error) {
if err := cfg.Validate(); err != nil {
return nil, fmt.Errorf("invalid config: %w", err)