mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-02-13 07:25:10 -05:00
### CHANGES - Introduce local `chat` package for message abstraction - Replace sashabaranov/go-openai with official openai-go SDK - Update OpenAI, Azure, and Exolab plugins for new client - Refactor all AI providers to use internal chat types - Decouple codebase from third-party AI provider structs - Replace deprecated `ioutil` functions with `os` equivalents
19 lines
450 B
Go
19 lines
450 B
Go
package ai
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/danielmiessler/fabric/chat"
|
|
"github.com/danielmiessler/fabric/plugins"
|
|
|
|
"github.com/danielmiessler/fabric/common"
|
|
)
|
|
|
|
type Vendor interface {
|
|
plugins.Plugin
|
|
ListModels() ([]string, error)
|
|
SendStream([]*chat.ChatCompletionMessage, *common.ChatOptions, chan string) error
|
|
Send(context.Context, []*chat.ChatCompletionMessage, *common.ChatOptions) (string, error)
|
|
NeedsRawMode(modelName string) bool
|
|
}
|