continue conversation

feed responses back into the llm
This commit is contained in:
Michael Yang
2023-07-13 11:02:53 -07:00
parent 77dc1a6d74
commit 1775647f76
11 changed files with 47 additions and 10 deletions

View File

@@ -18,8 +18,9 @@ type PullProgress struct {
}
type GenerateRequest struct {
Model string `json:"model"`
Prompt string `json:"prompt"`
Model string `json:"model"`
Prompt string `json:"prompt"`
Context []int `json:"context,omitempty"`
Options `json:"options"`
}
@@ -29,7 +30,8 @@ type GenerateResponse struct {
CreatedAt time.Time `json:"created_at"`
Response string `json:"response,omitempty"`
Done bool `json:"done"`
Done bool `json:"done"`
Context []int `json:"context,omitempty"`
TotalDuration time.Duration `json:"total_duration,omitempty"`
PromptEvalCount int `json:"prompt_eval_count,omitempty"`
@@ -104,7 +106,7 @@ func DefaultOptions() Options {
UseNUMA: false,
NumCtx: 512,
NumCtx: 2048,
NumBatch: 512,
NumGPU: 1,
LowVRAM: false,