mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-10 07:46:59 +00:00
move prompt templates out of python bindings
This commit is contained in:
@@ -36,6 +36,8 @@ func Serve(ln net.Listener) error {
|
||||
})
|
||||
|
||||
r.POST("/api/generate", func(c *gin.Context) {
|
||||
// TODO: set prompt from template
|
||||
|
||||
var req api.GenerateRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"message": err.Error()})
|
||||
@@ -64,13 +66,10 @@ func Serve(ln net.Listener) error {
|
||||
return true
|
||||
})
|
||||
|
||||
/*
|
||||
embeds, err := l.Embeddings(text)
|
||||
if err != nil {
|
||||
fmt.Printf("Embeddings: error %s \n", err.Error())
|
||||
}
|
||||
*/
|
||||
|
||||
// embeds, err := l.Embeddings(text)
|
||||
// if err != nil {
|
||||
// fmt.Printf("Embeddings: error %s \n", err.Error())
|
||||
// }
|
||||
})
|
||||
|
||||
log.Printf("Listening on %s", ln.Addr())
|
||||
|
||||
Reference in New Issue
Block a user