2024-08-22 18:57:49 +00:00
|
|
|
package vendors
|
|
|
|
|
2024-08-22 21:20:27 +00:00
|
|
|
import (
|
|
|
|
"bytes"
|
2024-08-26 10:34:15 +00:00
|
|
|
"context"
|
|
|
|
|
2024-08-22 21:20:27 +00:00
|
|
|
"github.com/danielmiessler/fabric/common"
|
|
|
|
)
|
2024-08-22 18:57:49 +00:00
|
|
|
|
|
|
|
type Vendor interface {
|
|
|
|
GetName() string
|
|
|
|
IsConfigured() bool
|
|
|
|
Configure() error
|
|
|
|
ListModels() ([]string, error)
|
|
|
|
SendStream([]*common.Message, *common.ChatOptions, chan string) error
|
2024-08-26 10:34:15 +00:00
|
|
|
Send(context.Context, []*common.Message, *common.ChatOptions) (string, error)
|
2024-08-22 18:57:49 +00:00
|
|
|
Setup() error
|
2024-08-22 21:20:27 +00:00
|
|
|
SetupFillEnvFileContent(*bytes.Buffer)
|
2024-08-22 18:57:49 +00:00
|
|
|
}
|