Documentation
¶
Index ¶
- Variables
- func Chat(ctx context.Context, req Request, ...) (modelrepo.LLMChatClient, modelrepo.Provider, string, error)
- func Embed(ctx context.Context, embedReq EmbedRequest, ...) (modelrepo.LLMEmbedClient, modelrepo.Provider, string, error)
- func NormalizeModelName(modelName string) string
- func PromptExecute(ctx context.Context, req Request, ...) (modelrepo.LLMPromptExecClient, modelrepo.Provider, string, error)
- func Randomly(candidates []modelrepo.Provider) (modelrepo.Provider, string, error)
- func Stream(ctx context.Context, req Request, ...) (modelrepo.LLMStreamClient, modelrepo.Provider, string, error)
- type EmbedRequest
- type Policy
- type Request
- type Selection
- func AutocompleteSelections(ctx context.Context, req Request, ...) ([]Selection, error)
- func ChatSelections(ctx context.Context, req Request, ...) ([]Selection, error)
- func NextEditSelections(ctx context.Context, req Request, ...) ([]Selection, error)
- func PromptExecuteSelections(ctx context.Context, req Request, ...) ([]Selection, error)
- func StreamSelections(ctx context.Context, req Request, ...) ([]Selection, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoAudioCapableModel = fmt.Errorf("%w: no available model supports audio input", ErrNoSatisfactoryModel)
View Source
var ErrNoAvailableModels = errors.New("no models found in runtime state")
View Source
var ErrNoSatisfactoryModel = errors.New("no model matched the requirements")
View Source
var ErrNoVisionCapableModel = fmt.Errorf("%w: no available model supports image input (vision)", ErrNoSatisfactoryModel)
View Source
var ErrPinnedModelLacksAudio = errors.New("explicitly requested model lacks audio capability")
View Source
var ErrPinnedModelLacksVision = errors.New("explicitly requested model lacks vision capability")
Functions ¶
func NormalizeModelName ¶
func PromptExecute ¶
Types ¶
type EmbedRequest ¶
type EmbedRequest struct {
ModelName string
ProviderType string
Tracker libtracker.ActivityTracker
}
type Policy ¶
func StickyOrRandom ¶
type Request ¶
type Request struct {
ProviderTypes []string
ModelNames []string
ContextLength int
FitContextToModel bool
RequiresVision bool
RequiresAudio bool
Tracker libtracker.ActivityTracker
}
type Selection ¶
func AutocompleteSelections ¶
func ChatSelections ¶
func NextEditSelections ¶
func PromptExecuteSelections ¶
Click to show internal directories.
Click to hide internal directories.