models: rm workDir from CreateModel
unused after removing EMBED
This commit is contained in:
parent
a7dad24d92
commit
a19d47642e
2 changed files with 2 additions and 4 deletions
|
@ -252,7 +252,7 @@ func filenameWithPath(path, f string) (string, error) {
|
|||
return f, nil
|
||||
}
|
||||
|
||||
func CreateModel(ctx context.Context, workDir, name string, path string, fn func(resp api.ProgressResponse)) error {
|
||||
func CreateModel(ctx context.Context, name string, path string, fn func(resp api.ProgressResponse)) error {
|
||||
mp := ParseModelPath(name)
|
||||
|
||||
var manifest *ManifestV2
|
||||
|
|
|
@ -334,8 +334,6 @@ func CreateModelHandler(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
workDir := c.GetString("workDir")
|
||||
|
||||
ch := make(chan any)
|
||||
go func() {
|
||||
defer close(ch)
|
||||
|
@ -346,7 +344,7 @@ func CreateModelHandler(c *gin.Context) {
|
|||
ctx, cancel := context.WithCancel(c.Request.Context())
|
||||
defer cancel()
|
||||
|
||||
if err := CreateModel(ctx, workDir, req.Name, req.Path, fn); err != nil {
|
||||
if err := CreateModel(ctx, req.Name, req.Path, fn); err != nil {
|
||||
ch <- gin.H{"error": err.Error()}
|
||||
}
|
||||
}()
|
||||
|
|
Loading…
Reference in a new issue