mirror of
https://github.com/ollama/ollama.git
synced 2025-04-08 03:48:21 +02:00
add basic /
route for server
This commit is contained in:
parent
ea809df196
commit
74e92d1258
@ -125,6 +125,10 @@ func generate(c *gin.Context) {
|
||||
func Serve(ln net.Listener) error {
|
||||
r := gin.Default()
|
||||
|
||||
r.GET("/", func(c *gin.Context) {
|
||||
c.String(http.StatusOK, "Ollama is running")
|
||||
})
|
||||
|
||||
r.POST("api/pull", func(c *gin.Context) {
|
||||
var req api.PullRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user