download models when creating from modelfile

This commit is contained in:
Bruce MacDonald
2023-07-25 14:25:13 -04:00
parent 12ab8f8f5f
commit 4c1caa3733
5 changed files with 73 additions and 41 deletions

View File

@@ -147,10 +147,8 @@ func CreateModelHandler(c *gin.Context) {
ch := make(chan any)
go func() {
defer close(ch)
fn := func(status string) {
ch <- api.CreateProgress{
Status: status,
}
fn := func(resp api.ProgressResponse) {
ch <- resp
}
if err := CreateModel(req.Name, req.Path, fn); err != nil {