lmcli/pkg/lmcli/provider/provider.go

24 lines
703 B
Go
Raw Normal View History

package provider
import "git.mlow.ca/mlow/lmcli/pkg/lmcli/model"
type ChatCompletionClient interface {
// CreateChatCompletion requests a response to the provided messages.
// Replies are appended to the given replies struct, and the
// complete user-facing response is returned as a string.
CreateChatCompletion(
params model.RequestParameters,
messages []model.Message,
replies *[]model.Message,
) (string, error)
// Like CreateChageCompletion, except the response is streamed via
// the output channel as it's received.
CreateChatCompletionStream(
params model.RequestParameters,
messages []model.Message,
replies *[]model.Message,
output chan<- string,
) (string, error)
}