Commit 09d8bf67 authored by Bruce MacDonald's avatar Bruce MacDonald
Browse files

fix build errors

parent 7a5f3616
...@@ -416,7 +416,7 @@ func (llm *LLM) Embedding(input string) ([]float64, error) { ...@@ -416,7 +416,7 @@ func (llm *LLM) Embedding(input string) ([]float64, error) {
return nil, errors.New("llama: embedding not enabled") return nil, errors.New("llama: embedding not enabled")
} }
tokens := llm.tokenize(input) tokens := llm.Encode(input)
if tokens == nil { if tokens == nil {
return nil, errors.New("llama: tokenize embedding") return nil, errors.New("llama: tokenize embedding")
} }
......
...@@ -87,13 +87,13 @@ func GenerateHandler(c *gin.Context) { ...@@ -87,13 +87,13 @@ func GenerateHandler(c *gin.Context) {
} }
if opts.NumKeep < 0 { if opts.NumKeep < 0 {
promptWithSystem, err := model.Prompt(api.GenerateRequest{}) promptWithSystem, err := model.Prompt(api.GenerateRequest{}, "")
if err != nil { if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
return return
} }
promptNoSystem, err := model.Prompt(api.GenerateRequest{Context: []int{0}}) promptNoSystem, err := model.Prompt(api.GenerateRequest{Context: []int{0}}, "")
if err != nil { if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
return return
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment