Skip to content

Commit

Permalink
standard-tests: fix default fixtures (#20520)
Browse files Browse the repository at this point in the history
  • Loading branch information
efriis authored Apr 16, 2024
1 parent 5acc7ba commit 77eba10
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/scripts/check_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
dirs_to_run["lint"].add("libs/standard-tests")
dirs_to_run["test"].add("libs/partners/mistralai")
dirs_to_run["test"].add("libs/partners/openai")
dirs_to_run["test"].add("libs/partners/anthropic")
dirs_to_run["test"].add("libs/partners/ai21")
dirs_to_run["test"].add("libs/partners/fireworks")
dirs_to_run["test"].add("libs/partners/groq")

elif file.startswith("libs/cli"):
# todo: add cli makefile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,16 @@ def chat_model_params(self) -> dict:
def chat_model_has_tool_calling(
self, chat_model_class: Type[BaseChatModel]
) -> bool:
return hasattr(chat_model_class, "bind_tools")
return chat_model_class.bind_tools is not BaseChatModel.bind_tools

@pytest.fixture
def chat_model_has_structured_output(
self, chat_model_class: Type[BaseChatModel]
) -> bool:
return hasattr(chat_model_class, "with_structured_output")
return (
chat_model_class.with_structured_output
is not BaseChatModel.with_structured_output
)

def test_invoke(
self, chat_model_class: Type[BaseChatModel], chat_model_params: dict
Expand Down

0 comments on commit 77eba10

Please sign in to comment.