-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-apply #1963 #2062
base: master
Are you sure you want to change the base?
Re-apply #1963 #2062
Conversation
✅ Deploy Preview for localai canceled.
|
// copy to modelPath | ||
md5Name := utils.MD5(url) | ||
|
||
modelYAML, err := os.ReadFile(url) |
Check failure
Code scanning / Golang security checks by gosec
Potential file inclusion via variable Error
|
||
func readBackendConfig(file string, opts ...ConfigLoaderOption) (*BackendConfig, error) { | ||
c := &BackendConfig{} | ||
f, err := os.ReadFile(file) |
Check failure
Code scanning / Golang security checks by gosec
Potential file inclusion via variable Error
|
||
func readBackendConfigFile(file string, opts ...ConfigLoaderOption) ([]*BackendConfig, error) { | ||
c := &[]*BackendConfig{} | ||
f, err := os.ReadFile(file) |
Check failure
Code scanning / Golang security checks by gosec
Potential file inclusion via variable Error
|
||
if b64JSON { | ||
defer os.RemoveAll(output) | ||
data, err := os.ReadFile(output) |
Check failure
Code scanning / Golang security checks by gosec
Potential file inclusion via variable Error
} | ||
defer os.RemoveAll(out) | ||
|
||
fileData, err = os.ReadFile(out) |
Check failure
Code scanning / Golang security checks by gosec
Potential file inclusion via variable Error
log.Debug().Msgf("Sending chunk: %s", buf.String()) | ||
if ev.Error != nil { | ||
log.Debug().Err(ev.Error).Msg("[ChatEndpoint] error to debug during tokenChannel handler") | ||
enc.Encode(ev.Error) |
Check warning
Code scanning / Golang security checks by gosec
Errors unhandled. Warning
case []interface{}: | ||
dat, _ := json.Marshal(content) | ||
c := []schema.Content{} | ||
json.Unmarshal(dat, &c) |
Check warning
Code scanning / Golang security checks by gosec
Errors unhandled. Warning
close(resultChannel) | ||
return | ||
} | ||
outputFile.Close() |
Check warning
Code scanning / Golang security checks by gosec
Errors unhandled. Warning
close(resultChannel) | ||
return | ||
} | ||
outputFile.Close() |
Check warning
Code scanning / Golang security checks by gosec
Errors unhandled. Warning
writer := bufio.NewWriter(outputFile) | ||
_, err = writer.Write(fileData) | ||
if err != nil { | ||
outputFile.Close() |
Check warning
Code scanning / Golang security checks by gosec
Errors unhandled. Warning
Note: this is unlikely to be ever merged directly, but is useful to me for now. |
Reverts #2056
cc @dave-gray101