template extra args
This commit is contained in:
parent
adaa13088b
commit
cdc9aa14ed
11
api/types.go
11
api/types.go
@ -32,11 +32,12 @@ func (e StatusError) Error() string {
|
||||
}
|
||||
|
||||
type GenerateRequest struct {
|
||||
Model string `json:"model"`
|
||||
Prompt string `json:"prompt"`
|
||||
System string `json:"system"`
|
||||
Template string `json:"template"`
|
||||
Context []int `json:"context,omitempty"`
|
||||
Model string `json:"model"`
|
||||
Prompt string `json:"prompt"`
|
||||
System string `json:"system"`
|
||||
Template string `json:"template"`
|
||||
Context []int `json:"context,omitempty"`
|
||||
Args map[string]any `json:"args,omitempty"`
|
||||
|
||||
Options map[string]interface{} `json:"options"`
|
||||
}
|
||||
|
@ -66,6 +66,7 @@ func (m *Model) Prompt(request api.GenerateRequest, embedding string) (string, e
|
||||
System string
|
||||
Prompt string
|
||||
Embed string
|
||||
Args map[string]any
|
||||
|
||||
// deprecated: versions <= 0.0.7 used this to omit the system prompt
|
||||
Context []int
|
||||
@ -75,6 +76,7 @@ func (m *Model) Prompt(request api.GenerateRequest, embedding string) (string, e
|
||||
vars.System = m.System
|
||||
vars.Prompt = request.Prompt
|
||||
vars.Context = request.Context
|
||||
vars.Args = request.Args
|
||||
vars.Embed = embedding
|
||||
|
||||
if request.System != "" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user