Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Re-apply #1963 #2062

wants to merge 1 commit into from

Conversation

mudler
Copy link
Owner

@mudler mudler commented Apr 17, 2024

Reverts #2056

cc @dave-gray101

This reverts commit af9e5a2.
Copy link

netlify bot commented Apr 17, 2024

Deploy Preview for localai canceled.

Name Link
🔨 Latest commit 47743b7
🔍 Latest deploy log https://app.netlify.com/sites/localai/deploys/662040e22509bd0007ab4bf4

// 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

Potential file inclusion via variable

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

Potential file inclusion via variable

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

Potential file inclusion via variable

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

Potential file inclusion via variable
}
defer os.RemoveAll(out)

fileData, err = os.ReadFile(out)

Check failure

Code scanning / Golang security checks by gosec

Potential file inclusion via variable Error

Potential file inclusion via variable
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

Errors unhandled.
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

Errors unhandled.
close(resultChannel)
return
}
outputFile.Close()

Check warning

Code scanning / Golang security checks by gosec

Errors unhandled. Warning

Errors unhandled.
close(resultChannel)
return
}
outputFile.Close()

Check warning

Code scanning / Golang security checks by gosec

Errors unhandled. Warning

Errors unhandled.
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

Errors unhandled.
@dave-gray101
Copy link
Collaborator

Note: this is unlikely to be ever merged directly, but is useful to me for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants