2023-05-02 02:07:26 +00:00
|
|
|
from langchain.agents import __all__ as agents_all
|
|
|
|
|
|
|
|
_EXPECTED = [
|
|
|
|
"Agent",
|
|
|
|
"AgentExecutor",
|
|
|
|
"AgentOutputParser",
|
|
|
|
"AgentType",
|
|
|
|
"BaseMultiActionAgent",
|
|
|
|
"BaseSingleActionAgent",
|
|
|
|
"ConversationalAgent",
|
|
|
|
"ConversationalChatAgent",
|
|
|
|
"LLMSingleActionAgent",
|
|
|
|
"MRKLChain",
|
|
|
|
"ReActChain",
|
|
|
|
"ReActTextWorldAgent",
|
|
|
|
"SelfAskWithSearchChain",
|
2023-05-02 03:34:50 +00:00
|
|
|
"StructuredChatAgent",
|
2023-05-02 02:07:26 +00:00
|
|
|
"Tool",
|
|
|
|
"ZeroShotAgent",
|
|
|
|
"create_csv_agent",
|
|
|
|
"create_json_agent",
|
|
|
|
"create_openapi_agent",
|
|
|
|
"create_pandas_dataframe_agent",
|
|
|
|
"create_pbi_agent",
|
|
|
|
"create_pbi_chat_agent",
|
2023-05-04 05:45:23 +00:00
|
|
|
"create_spark_dataframe_agent",
|
2023-05-02 02:07:26 +00:00
|
|
|
"create_sql_agent",
|
|
|
|
"create_vectorstore_agent",
|
|
|
|
"create_vectorstore_router_agent",
|
|
|
|
"get_all_tool_names",
|
|
|
|
"initialize_agent",
|
|
|
|
"load_agent",
|
2023-05-11 07:07:36 +00:00
|
|
|
"load_huggingface_tool",
|
2023-05-02 02:07:26 +00:00
|
|
|
"load_tools",
|
|
|
|
"tool",
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
def test_public_api() -> None:
|
|
|
|
"""Test for regressions or changes in the agents public API."""
|
2023-05-10 04:07:56 +00:00
|
|
|
assert sorted(agents_all) == sorted(_EXPECTED)
|