mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 18:36:41 +02:00
chat api endpoint (#1392)
This commit is contained in:
parent
00d06619a1
commit
195e3d9dbd
9 changed files with 550 additions and 132 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue