"examples/langchain-python-simple/main.py" did not exist on "820f95c4c4c774aeedbb84297e4912f09c3bbb1a"
Commit 9b8a456c authored by Michael Yang's avatar Michael Yang Committed by Jeffrey Morgan
Browse files

embed templates

parent 39f4d8ed
package server
import (
"embed"
"encoding/json"
"fmt"
"io"
......@@ -19,7 +20,9 @@ import (
"github.com/jmorganca/ollama/llama"
)
var templates = template.Must(template.ParseGlob("templates/*.prompt"))
//go:embed templates/*
var templatesFS embed.FS
var templates = template.Must(template.ParseFS(templatesFS, "templates/*.prompt"))
func generate(c *gin.Context) {
// TODO: these should be request parameters
......
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