Enha: check if model has vision before giving it vision tools

This commit is contained in:
Grail Finder
2026-03-02 11:25:20 +03:00
parent 9ba46b40cc
commit 4f6000a43a
5 changed files with 91 additions and 7 deletions

View File

@@ -172,3 +172,16 @@ func (orm *ORModels) ListModels(free bool) []string {
}
return resp
}
func (orm *ORModels) HasVision(modelID string) bool {
for i := range orm.Data {
if orm.Data[i].ID == modelID {
for _, mod := range orm.Data[i].Architecture.InputModalities {
if mod == "image" {
return true
}
}
}
}
return false
}