ollama/server/images_test.go
Bruce MacDonald 7a0899d62d
chat api (#991)
- update chat docs
- add messages chat endpoint
- remove deprecated context and template generate parameters from docs
- context and template are still supported for the time being and will continue to work as expected
- add partial response to chat history
2023-12-04 18:01:06 -05:00

21 lines
290 B
Go

package server
import (
"testing"
)
func TestModelPrompt(t *testing.T) {
m := Model{
Template: "a{{ .Prompt }}b",
}
s, err := m.Prompt(PromptVars{
Prompt: "<h1>",
})
if err != nil {
t.Fatal(err)
}
want := "a<h1>b"
if s != want {
t.Errorf("got %q, want %q", s, want)
}
}