🐛 fix(loading.py): add missing return statement to instantiate_llm function

The missing return statement caused the function to not return any value when the node_type is not "VertexAI". Adding the return statement ensures that the function returns the instantiated class object with the provided parameters in all cases.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-30 16:47:59 -03:00
commit 8f66ea7088

View file

@ -95,6 +95,7 @@ def instantiate_llm(node_type, class_object, params: Dict):
# False if condition is True
if node_type == "VertexAI":
return initialize_vertexai(class_object=class_object, params=params)
return class_object(**params)
def instantiate_memory(node_type, class_object, params):