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:
parent
d4dff2e027
commit
2ae46f2b08
1 changed files with 2 additions and 2 deletions
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue