2024-04-05 19:17:51 +00:00
|
|
|
from langchain_community.callbacks import __all__, _module_lookup
|
2023-12-11 21:53:30 +00:00
|
|
|
|
|
|
|
EXPECTED_ALL = [
|
|
|
|
"AimCallbackHandler",
|
|
|
|
"ArgillaCallbackHandler",
|
|
|
|
"ArizeCallbackHandler",
|
|
|
|
"PromptLayerCallbackHandler",
|
|
|
|
"ArthurCallbackHandler",
|
|
|
|
"ClearMLCallbackHandler",
|
|
|
|
"CometCallbackHandler",
|
|
|
|
"ContextCallbackHandler",
|
|
|
|
"HumanApprovalCallbackHandler",
|
|
|
|
"InfinoCallbackHandler",
|
|
|
|
"MlflowCallbackHandler",
|
|
|
|
"LLMonitorCallbackHandler",
|
|
|
|
"OpenAICallbackHandler",
|
|
|
|
"LLMThoughtLabeler",
|
|
|
|
"StreamlitCallbackHandler",
|
|
|
|
"WandbCallbackHandler",
|
|
|
|
"WhyLabsCallbackHandler",
|
|
|
|
"get_openai_callback",
|
|
|
|
"wandb_tracing_enabled",
|
|
|
|
"FlyteCallbackHandler",
|
|
|
|
"SageMakerCallbackHandler",
|
|
|
|
"LabelStudioCallbackHandler",
|
|
|
|
"TrubricsCallbackHandler",
|
2024-02-26 02:17:03 +00:00
|
|
|
"FiddlerCallbackHandler",
|
2024-04-16 19:32:03 +00:00
|
|
|
"UpTrainCallbackHandler",
|
2024-06-07 21:02:06 +00:00
|
|
|
"UpstashRatelimitError",
|
|
|
|
"UpstashRatelimitHandler",
|
2023-12-11 21:53:30 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
def test_all_imports() -> None:
|
2024-04-05 19:17:51 +00:00
|
|
|
"""Test that __all__ is correctly set."""
|
2023-12-11 21:53:30 +00:00
|
|
|
assert set(__all__) == set(EXPECTED_ALL)
|
2024-04-05 19:17:51 +00:00
|
|
|
assert set(__all__) == set(_module_lookup.keys())
|