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
9ae76ba8
Unverified
Commit
9ae76ba8
authored
Sep 05, 2023
by
Michael Yang
Committed by
GitHub
Sep 05, 2023
Browse files
Merge pull request #471 from jmorganca/mxyng/fix-empty-response
fix empty response
parents
d1c2558f
2bc06565
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
llm/ggml_llama.go
llm/ggml_llama.go
+4
-2
No files found.
llm/ggml_llama.go
View file @
9ae76ba8
...
...
@@ -497,8 +497,10 @@ func (llm *llama) Predict(ctx context.Context, prevContext []int, prompt string,
return
fmt
.
Errorf
(
"error unmarshaling llm prediction response: %v"
,
err
)
}
fn
(
api
.
GenerateResponse
{
Response
:
p
.
Content
})
nextContext
.
WriteString
(
p
.
Content
)
if
p
.
Content
!=
""
{
fn
(
api
.
GenerateResponse
{
Response
:
p
.
Content
})
nextContext
.
WriteString
(
p
.
Content
)
}
if
p
.
Stop
{
embd
,
err
:=
llm
.
Encode
(
ctx
,
nextContext
.
String
())
...
...
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