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
e26085b9
Commit
e26085b9
authored
Aug 14, 2023
by
Michael Yang
Browse files
close open files
parent
2ab20095
Changes
3
Show 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 @
e26085b9
...
@@ -39,6 +39,7 @@ func initBackend() error {
...
@@ -39,6 +39,7 @@ func initBackend() error {
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
defer
actual
.
Close
()
actualSum
:=
sha256
.
New
()
actualSum
:=
sha256
.
New
()
if
_
,
err
:=
io
.
Copy
(
actualSum
,
actual
);
err
!=
nil
{
if
_
,
err
:=
io
.
Copy
(
actualSum
,
actual
);
err
!=
nil
{
...
...
llm/llm.go
View file @
e26085b9
...
@@ -28,6 +28,7 @@ func New(model string, adapters []string, opts api.Options) (LLM, error) {
...
@@ -28,6 +28,7 @@ func New(model string, adapters []string, opts api.Options) (LLM, error) {
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
defer
f
.
Close
()
ggml
,
err
:=
DecodeGGML
(
f
,
ModelFamilyLlama
)
ggml
,
err
:=
DecodeGGML
(
f
,
ModelFamilyLlama
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
server/images.go
View file @
e26085b9
...
@@ -1117,6 +1117,7 @@ func uploadBlobChunked(ctx context.Context, mp ModelPath, url string, layer *Lay
...
@@ -1117,6 +1117,7 @@ func uploadBlobChunked(ctx context.Context, mp ModelPath, url string, layer *Lay
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
defer
f
.
Close
()
totalUploaded
:=
0
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