1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-30 22:33:49 +02:00
Files
go-micro/genai/options.go
Asim Aslam ee9f3afe37 GenAI interface (#2790)
* 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>
2025-06-20 10:24:31 +01:00

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
}
}