From 677a01e8f309a02d9958cc8bcd77d641b1d8ca85 Mon Sep 17 00:00:00 2001 From: Sven Knoblauch Date: Wed, 9 Oct 2024 14:51:33 +0200 Subject: [PATCH] update code for case of no lora adapter --- src/engine.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/engine.py b/src/engine.py index b6e91d3..48e8aac 100644 --- a/src/engine.py +++ b/src/engine.py @@ -134,18 +134,19 @@ async def _initialize_engines(self): if lora_modules is not None: try: lora_modules = json.loads(lora_modules) - lora_modules = LoRAModulePath(**lora_modules) + lora_modules = [LoRAModulePath(**lora_modules)] except: lora_modules = None + self.chat_engine = OpenAIServingChat( engine_client=self.llm, model_config=self.model_config, base_model_paths=self.base_model_paths, response_role=self.response_role, chat_template=self.tokenizer.tokenizer.chat_template, - lora_modules=[lora_modules], + lora_modules=lora_modules, prompt_adapters=None, request_logger=None ) @@ -153,7 +154,7 @@ async def _initialize_engines(self): engine_client=self.llm, model_config=self.model_config, base_model_paths=self.base_model_paths, - lora_modules=[lora_modules], + lora_modules=lora_modules, prompt_adapters=None, request_logger=None )