CineAI commited on
Commit
48edb58
·
verified ·
1 Parent(s): 385f711

Update llm/llm_factory.py

Browse files
Files changed (1) hide show
  1. llm/llm_factory.py +11 -11
llm/llm_factory.py CHANGED
@@ -12,16 +12,16 @@ class LLM_Factory:
12
 
13
  print(trigger)
14
 
15
- if trigger.keys() == "hf" and trigger.values() == "effective":
16
- print(trigger)
17
- model = HF_Mistaril(prompt_entity=prompt_entity, prompt_id=prompt_id)
18
- elif trigger.keys() == "hf" and trigger.values() == "small":
19
- model = HF_TinyLlama(prompt_entity=prompt_entity, prompt_id=prompt_id)
20
- elif trigger.keys() == "lc" and trigger.values() == "effective":
21
- model = LC_Phi3(prompt_entity=prompt_entity, prompt_id=prompt_id)
22
- elif trigger.keys() == "lc" and trigger.values() == "small":
23
- model = LC_TinyLlama(prompt_entity=prompt_entity, prompt_id=prompt_id)
24
- else:
25
- model = None
26
 
27
  return model
 
12
 
13
  print(trigger)
14
 
15
+ for key, value in trigger.items():
16
+ if key == "hf" and value == "effective":
17
+ model = HF_Mistaril(prompt_entity=prompt_entity, prompt_id=prompt_id)
18
+ elif key == "hf" and value == "small":
19
+ model = HF_TinyLlama(prompt_entity=prompt_entity, prompt_id=prompt_id)
20
+ elif key == "lc" and value == "effective":
21
+ model = LC_Phi3(prompt_entity=prompt_entity, prompt_id=prompt_id)
22
+ elif key == "lc" and value == "small":
23
+ model = LC_TinyLlama(prompt_entity=prompt_entity, prompt_id=prompt_id)
24
+ else:
25
+ model = None
26
 
27
  return model