feat: add capability to understand images

Signed-off-by: mudler <mudler@localai.io>
This commit is contained in:
mudler
2025-03-08 17:52:19 +01:00
parent 106d1e61d4
commit 3827ebebdf
7 changed files with 218 additions and 56 deletions

View File

@@ -7,10 +7,12 @@ import (
)
type Option func(*options) error
type llmOptions struct {
APIURL string
APIKey string
Model string
APIURL string
APIKey string
Model string
MultimodalModel string
}
type options struct {
@@ -44,6 +46,10 @@ type options struct {
conversationsPath string
}
func (o *options) SeparatedMultimodalModel() bool {
return o.LLMAPI.MultimodalModel != "" && o.LLMAPI.Model != o.LLMAPI.MultimodalModel
}
func defaultOptions() *options {
return &options{
periodicRuns: 15 * time.Minute,
@@ -209,6 +215,13 @@ func WithLLMAPIKey(key string) Option {
}
}
func WithMultimodalModel(model string) Option {
return func(o *options) error {
o.LLMAPI.MultimodalModel = model
return nil
}
}
func WithPermanentGoal(goal string) Option {
return func(o *options) error {
o.permanentGoal = goal