Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
4dcf5c3e
Unverified
Commit
4dcf5c3e
authored
Aug 14, 2023
by
Michael Yang
Committed by
GitHub
Aug 14, 2023
Browse files
Merge pull request #349 from jmorganca/close-files
close open files
parents
d1b2f532
e26085b9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
0 deletions
+3
-0
llm/llama_darwin.go
llm/llama_darwin.go
+1
-0
llm/llm.go
llm/llm.go
+1
-0
server/images.go
server/images.go
+1
-0
No files found.
llm/llama_darwin.go
View file @
4dcf5c3e
...
...
@@ -39,6 +39,7 @@ func initBackend() error {
if
err
!=
nil
{
return
err
}
defer
actual
.
Close
()
actualSum
:=
sha256
.
New
()
if
_
,
err
:=
io
.
Copy
(
actualSum
,
actual
);
err
!=
nil
{
...
...
llm/llm.go
View file @
4dcf5c3e
...
...
@@ -28,6 +28,7 @@ func New(model string, adapters []string, opts api.Options) (LLM, error) {
if
err
!=
nil
{
return
nil
,
err
}
defer
f
.
Close
()
ggml
,
err
:=
DecodeGGML
(
f
,
ModelFamilyLlama
)
if
err
!=
nil
{
...
...
server/images.go
View file @
4dcf5c3e
...
...
@@ -1117,6 +1117,7 @@ func uploadBlobChunked(ctx context.Context, mp ModelPath, url string, layer *Lay
if
err
!=
nil
{
return
err
}
defer
f
.
Close
()
totalUploaded
:=
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment