Adding better support for open source tool calling models (#952)

* Adding better support for open source tool calling models

* making sure the right tool is called

* fixing tests

* better support opensource models
This commit is contained in:
João Moura
2024-07-17 01:54:13 -07:00
committed by GitHub
parent 99ada42d97
commit 7baaeacac3
10 changed files with 5642 additions and 909 deletions

View File

@@ -317,6 +317,7 @@ def test_output_json_hierarchical():
assert result.to_dict() == {"score": 4}
@pytest.mark.vcr(filter_headers=["authorization"])
def test_json_property_without_output_json():
class ScoreOutput(BaseModel):
score: int
@@ -397,8 +398,8 @@ def test_output_json_dict_hierarchical():
manager_llm=ChatOpenAI(model="gpt-4o"),
)
result = crew.kickoff()
assert {"score": 4} == result.json_dict
assert result.to_dict() == {"score": 4}
assert {"score": 5} == result.json_dict
assert result.to_dict() == {"score": 5}
@pytest.mark.vcr(filter_headers=["authorization"])