Home / Function/ test_serialization_with_rate_limiter() — langchain Function Reference

test_serialization_with_rate_limiter() — langchain Function Reference

Architecture documentation for the test_serialization_with_rate_limiter() function in test_rate_limiting.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  dfc00c30_5b75_f3df_01de_dad8a227fcf1["test_serialization_with_rate_limiter()"]
  df01695c_1dbe_973d_756a_a5cd86e49330["test_rate_limiting.py"]
  dfc00c30_5b75_f3df_01de_dad8a227fcf1 -->|defined in| df01695c_1dbe_973d_756a_a5cd86e49330
  style dfc00c30_5b75_f3df_01de_dad8a227fcf1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/language_models/chat_models/test_rate_limiting.py lines 231–240

def test_serialization_with_rate_limiter() -> None:
    """Test model serialization with rate limiter."""
    model = SerializableModel(
        messages=iter(["hello", "world", "!"]),
        rate_limiter=InMemoryRateLimiter(
            requests_per_second=100, check_every_n_seconds=0.01, max_bucket_size=1
        ),
    )
    serialized_model = dumps(model)
    assert InMemoryRateLimiter.__name__ not in serialized_model

Subdomains

Frequently Asked Questions

What does test_serialization_with_rate_limiter() do?
test_serialization_with_rate_limiter() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/language_models/chat_models/test_rate_limiting.py.
Where is test_serialization_with_rate_limiter() defined?
test_serialization_with_rate_limiter() is defined in libs/core/tests/unit_tests/language_models/chat_models/test_rate_limiting.py at line 231.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free