Skip to content

Commit 2503a55

Browse files
committed
Update serialize.py to fix llm serialization bug.
1 parent 31956da commit 2503a55

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ads/llm/serialize.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626

2727
# This is a temp solution for supporting custom LLM in legacy load_chain
2828
__lc_llm_dict = llms.get_type_to_cls_dict()
29-
for llm_class in [GenerativeAI, ModelDeploymentTGI, ModelDeploymentVLLM]:
30-
__lc_llm_dict[llm_class.__name__] = lambda: llm_class
29+
__lc_llm_dict[GenerativeAI.__name__] = lambda: GenerativeAI
30+
__lc_llm_dict[ModelDeploymentTGI.__name__] = lambda: ModelDeploymentTGI
31+
__lc_llm_dict[ModelDeploymentVLLM.__name__] = lambda: ModelDeploymentVLLM
3132

3233

3334
def __new_type_to_cls_dict():

0 commit comments

Comments
 (0)