Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
embed templates
Michael Yang9b8a456c7d8e
diff --git a/server/routes.go b/server/routes.goindex 16c50029c..99c589fde 100644--- a/server/routes.go+++ b/server/routes.go@@ -1,6 +1,7 @@package serverimport (+ "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 parametersdiff --git a/templates/alpaca.prompt b/server/templates/alpaca.promptsimilarity index 100%rename from templates/alpaca.promptrename to server/templates/alpaca.promptdiff --git a/templates/falcon.prompt b/server/templates/falcon.promptsimilarity index 100%rename from templates/falcon.promptrename to server/templates/falcon.promptdiff --git a/templates/gpt4.prompt b/server/templates/gpt4.promptsimilarity index 100%rename from templates/gpt4.promptrename to server/templates/gpt4.promptdiff --git a/templates/hermes.prompt b/server/templates/hermes.promptsimilarity index 100%rename from templates/hermes.promptrename to server/templates/hermes.promptdiff --git a/templates/mpt.prompt b/server/templates/mpt.promptsimilarity index 100%rename from templates/mpt.promptrename to server/templates/mpt.promptdiff --git a/templates/oasst.prompt b/server/templates/oasst.promptsimilarity index 100%rename from templates/oasst.promptrename to server/templates/oasst.promptdiff --git a/templates/orca.prompt b/server/templates/orca.promptsimilarity index 100%rename from templates/orca.promptrename to server/templates/orca.promptdiff --git a/templates/qlora.prompt b/server/templates/qlora.promptsimilarity index 100%rename from templates/qlora.promptrename to server/templates/qlora.promptdiff --git a/templates/tulu.prompt b/server/templates/tulu.promptsimilarity index 100%rename from templates/tulu.promptrename to server/templates/tulu.promptdiff --git a/templates/ultralm.prompt b/server/templates/ultralm.promptsimilarity index 100%rename from templates/ultralm.promptrename to server/templates/ultralm.promptdiff --git a/templates/vicuna.prompt b/server/templates/vicuna.promptsimilarity index 100%rename from templates/vicuna.promptrename to server/templates/vicuna.promptdiff --git a/templates/wizardcoder.prompt b/server/templates/wizardcoder.promptsimilarity index 100%rename from templates/wizardcoder.promptrename to server/templates/wizardcoder.promptdiff --git a/templates/wizardlm.prompt b/server/templates/wizardlm.promptsimilarity index 100%rename from templates/wizardlm.promptrename to server/templates/wizardlm.prompt