MCPcopy
hub / github.com/mudler/LocalAI / MMProjFileName

Method MMProjFileName

core/config/model_config.go:1160–1168  ·  view source on GitHub ↗

MMProjFileName returns the filename of the MMProj file If the MMProj is a URL, it will return the MD5 of the URL which is the filename

()

Source from the content-addressed store, hash-verified

1158// MMProjFileName returns the filename of the MMProj file
1159// If the MMProj is a URL, it will return the MD5 of the URL which is the filename
1160func (c *ModelConfig) MMProjFileName() string {
1161 uri := downloader.URI(c.MMProj)
1162 if uri.LooksLikeURL() {
1163 f, _ := uri.FilenameFromUrl()
1164 return f
1165 }
1166
1167 return c.MMProj
1168}
1169
1170func (c *ModelConfig) IsMMProjURL() bool {
1171 uri := downloader.URI(c.MMProj)

Callers 2

listModelFilesFunction · 0.95
PreloadMethod · 0.80

Calls 3

URITypeAlias · 0.92
LooksLikeURLMethod · 0.80
FilenameFromUrlMethod · 0.80

Tested by

no test coverage detected