浏览代码

update runtime options (#864)

Michael Yang 1 年之前
父节点
当前提交
386169205c
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      server/routes.go

+ 4 - 0
server/routes.go

@@ -112,6 +112,10 @@ func load(ctx context.Context, workDir string, model *Model, reqOpts map[string]
 		loaded.Options = &opts
 	}
 
+	// update options for the loaded llm
+	// TODO(mxyng): this isn't thread safe, but it should be fine for now
+	loaded.runner.SetOptions(opts)
+
 	loaded.expireAt = time.Now().Add(sessionDuration)
 
 	if loaded.expireTimer == nil {