Update function base classes to use Callable

instead of function
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-11-02 22:45:49 -03:00
commit d87b6228df
8 changed files with 18 additions and 18 deletions

View file

@ -12,7 +12,7 @@ def test_zero_shot_agent(client: TestClient, logged_in_headers):
"ZeroShotAgent",
"BaseSingleActionAgent",
"Agent",
"function",
"Callable",
}
template = zero_shot_agent["template"]
@ -202,7 +202,7 @@ def test_initialize_agent(client: TestClient, logged_in_headers):
agents = json_response["agents"]
initialize_agent = agents["AgentInitializer"]
assert initialize_agent["base_classes"] == ["AgentExecutor", "function"]
assert initialize_agent["base_classes"] == ["AgentExecutor", "Callable"]
template = initialize_agent["template"]
assert template["agent"] == {

View file

@ -22,7 +22,7 @@ def test_conversation_chain(client: TestClient, logged_in_headers):
"ConversationChain",
"LLMChain",
"Chain",
"function",
"Callable",
}
template = chain["template"]
@ -111,7 +111,7 @@ def test_llm_chain(client: TestClient, logged_in_headers):
# Test the base classes, template, memory, verbose, llm, input_key, output_key, and _type objects
assert set(chain["base_classes"]) == {
"function",
"Callable",
"LLMChain",
"Chain",
}
@ -182,7 +182,7 @@ def test_llm_checker_chain(client: TestClient, logged_in_headers):
# Test the base classes, template, memory, verbose, llm, input_key, output_key, and _type objects
assert set(chain["base_classes"]) == {
"function",
"Callable",
"LLMCheckerChain",
"Chain",
}
@ -216,7 +216,7 @@ def test_llm_math_chain(client: TestClient, logged_in_headers):
chain = chains["LLMMathChain"]
# Test the base classes, template, memory, verbose, llm, input_key, output_key, and _type objects
assert set(chain["base_classes"]) == {
"function",
"Callable",
"LLMMathChain",
"Chain",
}
@ -309,7 +309,7 @@ def test_series_character_chain(client: TestClient, logged_in_headers):
# Test the base classes, template, memory, verbose, llm, input_key, output_key, and _type objects
assert set(chain["base_classes"]) == {
"function",
"Callable",
"LLMChain",
"BaseCustomChain",
"Chain",

View file

@ -69,7 +69,7 @@ def test_build_template_from_function():
"ExampleClass1", type_to_loader_dict, add_function=True
)
assert result_with_function is not None
assert "function" in result_with_function["base_classes"]
assert "Callable" in result_with_function["base_classes"]
# Test with invalid name
with pytest.raises(ValueError, match=r".* not found"):