chat api endpoint (#1392)

This commit is contained in:
Bruce MacDonald 2023-12-05 14:57:33 -05:00 committed by GitHub
parent 00d06619a1
commit 195e3d9dbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 550 additions and 132 deletions

View file

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