Skip to content

Commit

Permalink
add rate limiter for llama 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ccurme committed Jul 29, 2024
1 parent f7d139f commit 8e057fb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libs/partners/groq/tests/integration_tests/test_standard.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@

import pytest
from langchain_core.language_models import BaseChatModel
from langchain_standard_tests.integration_tests import ( # type: ignore[import-not-found]
ChatModelIntegrationTests, # type: ignore[import-not-found]
from langchain_core.rate_limiters import InMemoryRateLimiter
from langchain_standard_tests.integration_tests import (
ChatModelIntegrationTests,
)

from langchain_groq import ChatGroq

rate_limiter = InMemoryRateLimiter(requests_per_second=0.45)


class BaseTestGroq(ChatModelIntegrationTests):
@property
Expand All @@ -27,6 +30,7 @@ def chat_model_params(self) -> dict:
return {
"model": "llama-3.1-8b-instant",
"temperature": 0,
"rate_limiter": rate_limiter,
}

@pytest.mark.xfail(
Expand Down

0 comments on commit 8e057fb

Please sign in to comment.