mirror of
https://github.com/Mintplex-Labs/langchain-python.git
synced 2026-08-27 19:29:56 -04:00
88a3a56c1a
# Add Spark SQL support * Add Spark SQL support. It can connect to Spark via building a local/remote SparkSession. * Include a notebook example I tried some complicated queries (window function, table joins), and the tool works well. Compared to the [Spark Dataframe agent](https://python.langchain.com/en/latest/modules/agents/toolkits/examples/spark.html), this tool is able to generate queries across multiple tables. --------- # Your PR Title (What it does) <!-- Thank you for contributing to LangChain! Your PR will appear in our next release under the title you set. Please make sure it highlights your valuable contribution. Replace this with a description of the change, the issue it fixes (if applicable), and relevant context. List any dependencies required for this change. After you're done, someone will review your PR. They may suggest improvements. If no one reviews your PR within a few days, feel free to @-mention the same people again, as notifications can get lost. --> <!-- Remove if not applicable --> Fixes # (issue) ## Before submitting <!-- If you're adding a new integration, include an integration test and an example notebook showing its use! --> ## Who can review? Community members can review the PR once tests pass. Tag maintainers/contributors who might be interested: <!-- For a quicker response, figure out the right person to tag with @ @hwchase17 - project lead Tracing / Callbacks - @agola11 Async - @agola11 DataLoaders - @eyurtsev Models - @hwchase17 - @agola11 Agents / Tools / Toolkits - @vowelparrot VectorStores / Retrievers / Memory - @dev2049 --> --------- Co-authored-by: Gengliang Wang <gengliang@apache.org> Co-authored-by: Mike W <62768671+skcoirz@users.noreply.github.com> Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com> Co-authored-by: UmerHA <40663591+UmerHA@users.noreply.github.com> Co-authored-by: 张城铭 <z@hyperf.io> Co-authored-by: assert <zhangchengming@kkguan.com> Co-authored-by: blob42 <spike@w530> Co-authored-by: Yuekai Zhang <zhangyuekai@foxmail.com> Co-authored-by: Richard He <he.yucheng@outlook.com> Co-authored-by: Dev 2049 <dev.dev2049@gmail.com> Co-authored-by: Leonid Ganeline <leo.gan.57@gmail.com> Co-authored-by: Alexey Nominas <60900649+Chae4ek@users.noreply.github.com> Co-authored-by: elBarkey <elbarkey@gmail.com> Co-authored-by: Davis Chase <130488702+dev2049@users.noreply.github.com> Co-authored-by: Jeffrey D <1289344+verygoodsoftwarenotvirus@users.noreply.github.com> Co-authored-by: so2liu <yangliu35@outlook.com> Co-authored-by: Viswanadh Rayavarapu <44315599+vishwa-rn@users.noreply.github.com> Co-authored-by: Chakib Ben Ziane <contact@blob42.xyz> Co-authored-by: Daniel Chalef <131175+danielchalef@users.noreply.github.com> Co-authored-by: Daniel Chalef <daniel.chalef@private.org> Co-authored-by: Jari Bakken <jari.bakken@gmail.com> Co-authored-by: escafati <scafatieugenio@gmail.com>
74 lines
2.1 KiB
Python
74 lines
2.1 KiB
Python
"""Interface for agents."""
|
|
from langchain.agents.agent import (
|
|
Agent,
|
|
AgentExecutor,
|
|
AgentOutputParser,
|
|
BaseMultiActionAgent,
|
|
BaseSingleActionAgent,
|
|
LLMSingleActionAgent,
|
|
)
|
|
from langchain.agents.agent_toolkits import (
|
|
create_csv_agent,
|
|
create_json_agent,
|
|
create_openapi_agent,
|
|
create_pandas_dataframe_agent,
|
|
create_pbi_agent,
|
|
create_pbi_chat_agent,
|
|
create_spark_dataframe_agent,
|
|
create_spark_sql_agent,
|
|
create_sql_agent,
|
|
create_vectorstore_agent,
|
|
create_vectorstore_router_agent,
|
|
)
|
|
from langchain.agents.agent_types import AgentType
|
|
from langchain.agents.conversational.base import ConversationalAgent
|
|
from langchain.agents.conversational_chat.base import ConversationalChatAgent
|
|
from langchain.agents.initialize import initialize_agent
|
|
from langchain.agents.load_tools import (
|
|
get_all_tool_names,
|
|
load_huggingface_tool,
|
|
load_tools,
|
|
)
|
|
from langchain.agents.loading import load_agent
|
|
from langchain.agents.mrkl.base import MRKLChain, ZeroShotAgent
|
|
from langchain.agents.react.base import ReActChain, ReActTextWorldAgent
|
|
from langchain.agents.self_ask_with_search.base import SelfAskWithSearchChain
|
|
from langchain.agents.structured_chat.base import StructuredChatAgent
|
|
from langchain.agents.tools import Tool, tool
|
|
|
|
__all__ = [
|
|
"Agent",
|
|
"AgentExecutor",
|
|
"AgentOutputParser",
|
|
"AgentType",
|
|
"BaseMultiActionAgent",
|
|
"BaseSingleActionAgent",
|
|
"ConversationalAgent",
|
|
"ConversationalChatAgent",
|
|
"LLMSingleActionAgent",
|
|
"MRKLChain",
|
|
"ReActChain",
|
|
"ReActTextWorldAgent",
|
|
"SelfAskWithSearchChain",
|
|
"StructuredChatAgent",
|
|
"Tool",
|
|
"ZeroShotAgent",
|
|
"create_csv_agent",
|
|
"create_json_agent",
|
|
"create_openapi_agent",
|
|
"create_pandas_dataframe_agent",
|
|
"create_pbi_agent",
|
|
"create_pbi_chat_agent",
|
|
"create_spark_dataframe_agent",
|
|
"create_spark_sql_agent",
|
|
"create_sql_agent",
|
|
"create_vectorstore_agent",
|
|
"create_vectorstore_router_agent",
|
|
"get_all_tool_names",
|
|
"initialize_agent",
|
|
"load_agent",
|
|
"load_huggingface_tool",
|
|
"load_tools",
|
|
"tool",
|
|
]
|