Bringing support to o1 family back + any models that don't support stop words

This commit is contained in:
João Moura
2024-09-24 22:18:20 -03:00
parent b8aa46a767
commit e19bdcb97d
104 changed files with 56051 additions and 65319 deletions

View File

@@ -321,8 +321,8 @@ def test_output_json_hierarchical():
manager_llm="gpt-4o",
)
result = crew.kickoff()
assert '{"score": 5}' == result.json
assert result.to_dict() == {"score": 5}
assert result.json == '{"score": 4}'
assert result.to_dict() == {"score": 4}
@pytest.mark.vcr(filter_headers=["authorization"])
@@ -443,7 +443,7 @@ def test_output_pydantic_to_another_task():
assert isinstance(
pydantic_result, ScoreOutput
), "Expected pydantic result to be of type ScoreOutput"
assert 4 == pydantic_result.score
assert pydantic_result.score == 5
@pytest.mark.vcr(filter_headers=["authorization"])
@@ -685,7 +685,7 @@ def test_increment_tool_errors():
with patch.object(Task, "increment_tools_errors") as increment_tools_errors:
increment_tools_errors.return_value = None
crew.kickoff()
assert len(increment_tools_errors.mock_calls) == 18
assert len(increment_tools_errors.mock_calls) == 12
def test_task_definition_based_on_dict():