Merge branch 'update_lc' of github.com:logspace-ai/langflow into update_lc
This commit is contained in:
commit
7f8348727b
1 changed files with 3 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
from langflow import CustomComponent
|
||||
from langflow.field_typing import BaseLanguageModel, AgentExecutor
|
||||
|
||||
from langchain_experimental.agents.agent_toolkits.csv.base import create_csv_agent
|
||||
|
||||
class CSVAgentComponent(CustomComponent):
|
||||
display_name = "CSVAgent"
|
||||
|
|
@ -10,7 +10,7 @@ class CSVAgentComponent(CustomComponent):
|
|||
def build_config(self):
|
||||
return {
|
||||
"llm": {"display_name": "LLM", "type": BaseLanguageModel},
|
||||
"path": {"display_name": "Path", "type": "file", "suffixes": [".csv"], "file_types": ["csv"]},
|
||||
"path": {"display_name": "Path", "field_type": "file", "suffixes": [".csv"], "file_types": [".csv"]},
|
||||
}
|
||||
|
||||
def build(
|
||||
|
|
@ -19,4 +19,4 @@ class CSVAgentComponent(CustomComponent):
|
|||
path: str,
|
||||
) -> AgentExecutor:
|
||||
# Instantiate and return the CSV agent class with the provided llm and path
|
||||
return AgentExecutor(llm=llm, path=path)
|
||||
return create_csv_agent(llm=llm, path=path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue