mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-09 07:16:04 +00:00
fix(model): preserve UUID when updating LLM and embedding models in runtime
Agent-Logs-Url: https://github.com/langbot-app/LangBot/sessions/ffaa444c-501a-41ef-bf8b-d2cdef3b7625 Co-authored-by: RockChinQ <45992437+RockChinQ@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
4c7ee6a9c9
commit
eefb0ddde1
@@ -173,7 +173,7 @@ class LLMModelsService:
|
||||
raise Exception('provider not found')
|
||||
|
||||
runtime_llm_model = await self.ap.model_mgr.load_llm_model_with_provider(
|
||||
persistence_model.LLMModel(**model_data),
|
||||
persistence_model.LLMModel(uuid=model_uuid, **model_data),
|
||||
runtime_provider,
|
||||
)
|
||||
self.ap.model_mgr.llm_models.append(runtime_llm_model)
|
||||
@@ -334,7 +334,7 @@ class EmbeddingModelsService:
|
||||
raise Exception('provider not found')
|
||||
|
||||
runtime_embedding_model = await self.ap.model_mgr.load_embedding_model_with_provider(
|
||||
persistence_model.EmbeddingModel(**model_data),
|
||||
persistence_model.EmbeddingModel(uuid=model_uuid, **model_data),
|
||||
runtime_provider,
|
||||
)
|
||||
self.ap.model_mgr.embedding_models.append(runtime_embedding_model)
|
||||
|
||||
Reference in New Issue
Block a user