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
7487229c
Unverified
Commit
7487229c
authored
May 28, 2024
by
Lei Jitang
Committed by
GitHub
May 27, 2024
Browse files
llm/server.go: Fix 2 minor typos (#4661)
Signed-off-by:
Lei Jitang
<
leijitang@outlook.com
>
parent
8a8e7afa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
llm/server.go
llm/server.go
+3
-3
No files found.
llm/server.go
View file @
7487229c
...
...
@@ -24,9 +24,9 @@ import (
"golang.org/x/sync/semaphore"
"github.com/ollama/ollama/api"
"github.com/ollama/ollama/envconfig"
"github.com/ollama/ollama/format"
"github.com/ollama/ollama/gpu"
"github.com/ollama/ollama/envconfig"
)
type
LlamaServer
interface
{
...
...
@@ -243,7 +243,7 @@ func NewLlamaServer(gpus gpu.GpuInfoList, model string, ggml *GGML, adapters, pr
gpuCount
=
0
}
// Find an availableServers port, retry on each iter
r
ation in case the failure was a port conflict race
// Find an availableServers port, retry on each iteration in case the failure was a port conflict race
port
:=
0
if
a
,
err
:=
net
.
ResolveTCPAddr
(
"tcp"
,
"localhost:0"
);
err
==
nil
{
var
l
*
net
.
TCPListener
...
...
@@ -756,7 +756,7 @@ func (s *llmServer) Completion(ctx context.Context, req CompletionRequest, fn fu
var
c
completion
if
err
:=
json
.
Unmarshal
(
evt
,
&
c
);
err
!=
nil
{
return
fmt
.
Errorf
(
"error unmarshaling llm prediction response: %v"
,
err
)
return
fmt
.
Errorf
(
"error unmarshal
l
ing llm prediction response: %v"
,
err
)
}
switch
{
...
...
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