Update agent.py and experimental components
This commit is contained in:
parent
16e91a00de
commit
a92dcaf37d
3 changed files with 6 additions and 4 deletions
|
|
@ -1,6 +1,8 @@
|
||||||
from typing import List, Union
|
from typing import List, Union
|
||||||
|
|
||||||
from langchain.agents import AgentExecutor, BaseMultiActionAgent, BaseSingleActionAgent
|
from langchain.agents import AgentExecutor, BaseMultiActionAgent, BaseSingleActionAgent
|
||||||
|
from langchain_core.runnables import Runnable
|
||||||
|
|
||||||
from langflow.field_typing import BaseMemory, Text, Tool
|
from langflow.field_typing import BaseMemory, Text, Tool
|
||||||
from langflow.interface.custom.custom_component import CustomComponent
|
from langflow.interface.custom.custom_component import CustomComponent
|
||||||
|
|
||||||
|
|
@ -38,7 +40,7 @@ class LCAgentComponent(CustomComponent):
|
||||||
|
|
||||||
async def run_agent(
|
async def run_agent(
|
||||||
self,
|
self,
|
||||||
agent: Union[BaseSingleActionAgent, BaseMultiActionAgent, AgentExecutor],
|
agent: Union[Runnable, BaseSingleActionAgent, BaseMultiActionAgent, AgentExecutor],
|
||||||
inputs: str,
|
inputs: str,
|
||||||
input_variables: list[str],
|
input_variables: list[str],
|
||||||
tools: List[Tool],
|
tools: List[Tool],
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from .ClearMessageHistory import ClearMessageHistoryComponent
|
from .ClearMessageHistory import ClearMessageHistoryComponent
|
||||||
from .ExtractDataFromRecord import ExtractKeyFromRecordComponent
|
from .ExtractDataFromRecord import ExtractKeyFromRecordComponent
|
||||||
from .Listen import GetNotifiedComponent
|
from .Listen import ListenComponent
|
||||||
from .ListFlows import ListFlowsComponent
|
from .ListFlows import ListFlowsComponent
|
||||||
from .MergeRecords import MergeRecordsComponent
|
from .MergeRecords import MergeRecordsComponent
|
||||||
from .Notify import NotifyComponent
|
from .Notify import NotifyComponent
|
||||||
|
|
@ -11,7 +11,7 @@ from .SQLExecutor import SQLExecutorComponent
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"ClearMessageHistoryComponent",
|
"ClearMessageHistoryComponent",
|
||||||
"ExtractKeyFromRecordComponent",
|
"ExtractKeyFromRecordComponent",
|
||||||
"GetNotifiedComponent",
|
"ListenComponent",
|
||||||
"ListFlowsComponent",
|
"ListFlowsComponent",
|
||||||
"MergeRecordsComponent",
|
"MergeRecordsComponent",
|
||||||
"MessageHistoryComponent",
|
"MessageHistoryComponent",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# Path: src/backend/langflow/database/models/flow.py
|
# Path: src/backend/langflow/services/database/models/flow/model.py
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import TYPE_CHECKING, Dict, Optional
|
from typing import TYPE_CHECKING, Dict, Optional
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue