WithAPIKey sets the API key for the provider Example: client := goai.New("openai", "gpt-4o", goai.WithAPIKey(os.Getenv("OPENAI_API_KEY")), )
(key string)
| 32 | // goai.WithAPIKey(os.Getenv("OPENAI_API_KEY")), |
| 33 | // ) |
| 34 | func WithAPIKey(key string) Option { |
| 35 | return func(o *Options) { |
| 36 | o.APIKey = key |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | // WithEndpoint sets a custom API endpoint |
| 41 | // |
nothing calls this directly
no outgoing calls
no test coverage detected