mirror of
https://github.com/go-micro/go-micro.git
synced 2025-06-30 22:33:49 +02:00
* genai interface * x * x * text to speech * Re-add events package (#2761) * Re-add events package * run redis as a dep * remove redis events * fix: data race on event subscriber * fix: data race in tests * fix: store errors * fix: lint issues * feat: default stream * Update file.go --------- Co-authored-by: Brian Ketelsen <bketelsen@gmail.com> * . * copilot couldn't make it compile so I did * copilot couldn't make it compile so I did * x --------- Co-authored-by: Brian Ketelsen <bketelsen@gmail.com>
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
|
|
}
|
|
} |