mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-26 13:59:49 +00:00
multiple: langchain-standard-tests -> langchain-tests (#28139)
This commit is contained in:
@@ -79,8 +79,7 @@ def my_adder(a: int, b: int) -> int:
|
||||
class ChatModelTests(BaseStandardTests):
|
||||
@property
|
||||
@abstractmethod
|
||||
def chat_model_class(self) -> Type[BaseChatModel]:
|
||||
...
|
||||
def chat_model_class(self) -> Type[BaseChatModel]: ...
|
||||
|
||||
@property
|
||||
def chat_model_params(self) -> dict:
|
||||
@@ -244,17 +243,19 @@ class ChatModelUnitTests(ChatModelTests):
|
||||
|
||||
ls_params = model._get_ls_params()
|
||||
try:
|
||||
ExpectedParams(**ls_params)
|
||||
ExpectedParams(**ls_params) # type: ignore
|
||||
except ValidationErrorV1 as e:
|
||||
pytest.fail(f"Validation error: {e}")
|
||||
|
||||
# Test optional params
|
||||
model = self.chat_model_class(
|
||||
max_tokens=10, stop=["test"], **self.chat_model_params
|
||||
max_tokens=10,
|
||||
stop=["test"],
|
||||
**self.chat_model_params, # type: ignore
|
||||
)
|
||||
ls_params = model._get_ls_params()
|
||||
try:
|
||||
ExpectedParams(**ls_params)
|
||||
ExpectedParams(**ls_params) # type: ignore
|
||||
except ValidationErrorV1 as e:
|
||||
pytest.fail(f"Validation error: {e}")
|
||||
|
||||
|
@@ -13,8 +13,7 @@ from langchain_standard_tests.base import BaseStandardTests
|
||||
class EmbeddingsTests(BaseStandardTests):
|
||||
@property
|
||||
@abstractmethod
|
||||
def embeddings_class(self) -> Type[Embeddings]:
|
||||
...
|
||||
def embeddings_class(self) -> Type[Embeddings]: ...
|
||||
|
||||
@property
|
||||
def embedding_model_params(self) -> dict:
|
||||
|
@@ -13,8 +13,7 @@ from langchain_standard_tests.base import BaseStandardTests
|
||||
class ToolsTests(BaseStandardTests):
|
||||
@property
|
||||
@abstractmethod
|
||||
def tool_constructor(self) -> Union[Type[BaseTool], Callable]:
|
||||
...
|
||||
def tool_constructor(self) -> Union[Type[BaseTool], Callable]: ...
|
||||
|
||||
@property
|
||||
def tool_constructor_params(self) -> dict:
|
||||
|
Reference in New Issue
Block a user