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
730996e5
You need to sign in or sign up before continuing.
Commit
730996e5
authored
Oct 18, 2023
by
Arne Müller
Browse files
use TrimPrefix instead of TrimLeft
parent
ce6197a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
llm/llama.go
llm/llama.go
+1
-1
No files found.
llm/llama.go
View file @
730996e5
...
@@ -465,7 +465,7 @@ func (llm *llama) Predict(ctx context.Context, prevContext []int, prompt string,
...
@@ -465,7 +465,7 @@ func (llm *llama) Predict(ctx context.Context, prevContext []int, prompt string,
}
}
// Remove leading spaces from prevConvo if present
// Remove leading spaces from prevConvo if present
prevConvo
=
strings
.
Trim
Left
(
prevConvo
,
" "
)
prevConvo
=
strings
.
Trim
Prefix
(
prevConvo
,
" "
)
var
nextContext
strings
.
Builder
var
nextContext
strings
.
Builder
nextContext
.
WriteString
(
prevConvo
)
nextContext
.
WriteString
(
prevConvo
)
...
...
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