community[patch]: Skip unit test that depends on langchain-aws and fix pydantic settings (#26111)

* Skip unit test that depends on langchain-aws
* fix pydantic settings
This commit is contained in:
Eugene Yurtsev
2024-09-05 15:08:34 -04:00
committed by GitHub
parent a111098230
commit 6e1b0d0228
9 changed files with 31 additions and 44 deletions

View File

@@ -254,7 +254,7 @@ class FakeCallbackHandler(BaseCallbackHandler, BaseFakeCallbackHandlerMixin):
) -> Any:
self.on_retriever_error_common()
def __deepcopy__(self, memo: dict) -> "FakeCallbackHandler":
def __deepcopy__(self, memo: dict) -> "FakeCallbackHandler": # type: ignore
return self
@@ -388,5 +388,5 @@ class FakeAsyncCallbackHandler(AsyncCallbackHandler, BaseFakeCallbackHandlerMixi
) -> None:
self.on_text_common()
def __deepcopy__(self, memo: dict) -> "FakeAsyncCallbackHandler":
def __deepcopy__(self, memo: dict) -> "FakeAsyncCallbackHandler": # type: ignore
return self

View File

@@ -112,6 +112,14 @@ def test_serializable_mapping() -> None:
"chat_models",
"ChatGroq",
),
# TODO(0.3): For now we're skipping this test. Need to fix
# so that it only runs when langchain-aws is installed.
("langchain", "chat_models", "bedrock", "ChatBedrock"): (
"langchain_aws",
"chat_models",
"bedrock",
"ChatBedrock",
),
}
serializable_modules = import_all_modules("langchain")