resolvePath joins a relative path onto `relTo`. The gallery convention is that Options[] carry paths relative to the LocalAI models dir (opts.ModelPath), so anything not absolute is treated as a sibling of the primary ModelFile - never CWD. Empty / already- absolute / no-relTo inputs pass through un
(p, relTo string)
| 151 | // as a sibling of the primary ModelFile - never CWD. Empty / already- |
| 152 | // absolute / no-relTo inputs pass through unchanged. |
| 153 | func resolvePath(p, relTo string) string { |
| 154 | if p == "" || filepath.IsAbs(p) || relTo == "" { |
| 155 | return p |
| 156 | } |
| 157 | return filepath.Join(relTo, p) |
| 158 | } |
| 159 | |
| 160 | // parseOptions reads opts.Options[] and pulls out the per-role |
| 161 | // overrides documented in the gallery entries. Accepts both "key=value" |
no outgoing calls
no test coverage detected