Revert "chat api (#991)" while context variable is fixed

This reverts commit 7a0899d62d.
This commit is contained in:
Jeffrey Morgan
2023-12-04 21:16:27 -08:00
parent f1ef3f9947
commit 00d06619a1
8 changed files with 144 additions and 559 deletions

View File

@ -2,15 +2,17 @@ package server
import (
"testing"
"github.com/jmorganca/ollama/api"
)
func TestModelPrompt(t *testing.T) {
m := Model{
var m Model
req := api.GenerateRequest{
Template: "a{{ .Prompt }}b",
Prompt: "<h1>",
}
s, err := m.Prompt(PromptVars{
Prompt: "<h1>",
})
s, err := m.Prompt(req)
if err != nil {
t.Fatal(err)
}