MCPcopy Create free account
hub / github.com/ZBayes/basic_rag / StartVecModelHandler

Function StartVecModelHandler

src/server/handlers/vec_model_handler.py:40–48  ·  view source on GitHub ↗
(request_config: dict, vec_model: VectorizeModel)

Source from the content-addressed store, hash-verified

38 self.write(response_body)
39
40def StartVecModelHandler(request_config: dict, vec_model: VectorizeModel):
41 # 启动TestClass服务的进程
42 # 注:如果是同端口,只是不同的url路径,则直接都放在handler_routes里面即可
43 # 注:test_class需要在外面初始化后再传进来,而不能在initialize里面加载,initialize是每次请求都会执行一遍,例如知识问答的索引更新,肯定不能在这里面修改
44 handler_routes = [(request_config["url_suffix"], VecModelHandler, {"vec_model":vec_model})]
45 app = Application(handlers=handler_routes)
46 http_server = HTTPServer(app)
47 http_server.listen(request_config["port"])
48 tornado.ioloop.IOLoop.current().start()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected