mirror of
https://github.com/go-micro/go-micro.git
synced 2025-06-30 22:33:49 +02:00
20 lines
335 B
Go
20 lines
335 B
Go
![]() |
package genai
|
||
|
|
||
|
// Option sets options for a GenAI provider.
|
||
|
func WithAPIKey(key string) Option {
|
||
|
return func(o *Options) {
|
||
|
o.APIKey = key
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func WithEndpoint(endpoint string) Option {
|
||
|
return func(o *Options) {
|
||
|
o.Endpoint = endpoint
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func WithModel(model string) Option {
|
||
|
return func(o *Options) {
|
||
|
o.Model = model
|
||
|
}
|
||
|
}
|