Skip to content

Commit

Permalink
Merge pull request #1128 from wang149876/master
Browse files Browse the repository at this point in the history
让llm重载可以直接获取本地最新的llm_models.json里面的内容
  • Loading branch information
RockChinQ authored Feb 25, 2025
2 parents 6761a31 + 6c2843e commit 54b87ff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/core/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
from ..utils import logcache, ip
from . import taskmgr
from . import entities as core_entities
from .bootutils import config


class Application:
Expand Down Expand Up @@ -203,6 +204,8 @@ async def reload(
case core_entities.LifecycleControlScope.PROVIDER.value:
self.logger.info("执行热重载 scope="+scope)

latest_llm_model_config = await config.load_json_config("data/metadata/llm-models.json", "templates/metadata/llm-models.json")
self.llm_models_meta = latest_llm_model_config
llm_model_mgr_inst = llm_model_mgr.ModelManager(self)
await llm_model_mgr_inst.initialize()
self.model_mgr = llm_model_mgr_inst
Expand Down

0 comments on commit 54b87ff

Please sign in to comment.