refactor: Update LCModelComponent inheritance and imports

Update the LCModelComponent class in model.py to inherit from the Component class instead of the deprecated CustomComponent class. Also, update the import statement for the Component class. This change ensures compatibility with the latest version of the langflow library and improves code readability.
This commit is contained in:
ogabrielluiz 2024-06-11 22:56:43 -03:00
commit 2ae46f2b08

View file

@ -5,11 +5,11 @@ from langchain_core.language_models.chat_models import BaseChatModel
from langchain_core.language_models.llms import LLM
from langchain_core.messages import AIMessage, HumanMessage, SystemMessage
from langflow.custom import CustomComponent
from langflow.custom import Component
from langflow.field_typing.prompt import Prompt
class LCModelComponent(CustomComponent):
class LCModelComponent(Component):
display_name: str = "Model Name"
description: str = "Model Description"