mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 18:50:33 +00:00
standard-tests: add override check (#24407)
This commit is contained in:
@@ -2,12 +2,10 @@
|
||||
|
||||
from typing import Type
|
||||
|
||||
import pytest
|
||||
from langchain_core.language_models import BaseChatModel
|
||||
from langchain_core.runnables import RunnableBinding
|
||||
from langchain_standard_tests.unit_tests.chat_models import ( # type: ignore[import-not-found]
|
||||
from langchain_standard_tests.unit_tests.chat_models import (
|
||||
ChatModelUnitTests,
|
||||
Person,
|
||||
my_adder_tool,
|
||||
)
|
||||
|
||||
from langchain_groq import ChatGroq
|
||||
@@ -18,10 +16,6 @@ class TestGroqStandard(ChatModelUnitTests):
|
||||
def chat_model_class(self) -> Type[BaseChatModel]:
|
||||
return ChatGroq
|
||||
|
||||
@pytest.mark.xfail(reason="Groq does not support tool_choice='any'")
|
||||
def test_bind_tool_pydantic(self, model: BaseChatModel) -> None:
|
||||
"""Does not currently support tool_choice='any'."""
|
||||
if not self.has_tool_calling:
|
||||
return
|
||||
|
||||
tool_model = model.bind_tools([Person, Person.schema(), my_adder_tool])
|
||||
assert isinstance(tool_model, RunnableBinding)
|
||||
super().test_bind_tool_pydantic(model)
|
||||
|
||||
Reference in New Issue
Block a user