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
17678b72
Commit
17678b72
authored
Nov 03, 2023
by
Jeffrey Morgan
Browse files
Restore system prompt on requests and default `num_keep` to `0`
parent
6109bebb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
api/types.go
api/types.go
+1
-1
llm/llama.go
llm/llama.go
+2
-0
No files found.
api/types.go
View file @
17678b72
...
@@ -293,7 +293,7 @@ func DefaultOptions() Options {
...
@@ -293,7 +293,7 @@ func DefaultOptions() Options {
return
Options
{
return
Options
{
// options set on request to runner
// options set on request to runner
NumPredict
:
-
1
,
NumPredict
:
-
1
,
NumKeep
:
4
,
NumKeep
:
0
,
Temperature
:
0.8
,
Temperature
:
0.8
,
TopK
:
40
,
TopK
:
40
,
TopP
:
0.9
,
TopP
:
0.9
,
...
...
llm/llama.go
View file @
17678b72
...
@@ -529,6 +529,8 @@ func (llm *llama) Predict(ctx context.Context, prevContext []int, prompt string,
...
@@ -529,6 +529,8 @@ func (llm *llama) Predict(ctx context.Context, prevContext []int, prompt string,
"stop"
:
llm
.
Stop
,
"stop"
:
llm
.
Stop
,
}
}
fmt
.
Println
(
request
)
// Handling JSON marshaling with special characters unescaped.
// Handling JSON marshaling with special characters unescaped.
buffer
:=
&
bytes
.
Buffer
{}
buffer
:=
&
bytes
.
Buffer
{}
enc
:=
json
.
NewEncoder
(
buffer
)
enc
:=
json
.
NewEncoder
(
buffer
)
...
...
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