Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
eyurtsev committed Jul 26, 2024
1 parent c4d2a53 commit 80a47e3
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@

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_together import ChatTogether

# Initialize the rate limiter in global scope, so it can be re-used
# across tests.
rate_limiter = InMemoryRateLimiter(
requests_per_second=0.5,
)


class TestTogetherStandard(ChatModelIntegrationTests):
@property
Expand All @@ -18,7 +23,10 @@ def chat_model_class(self) -> Type[BaseChatModel]:

@property
def chat_model_params(self) -> dict:
return {"model": "mistralai/Mistral-7B-Instruct-v0.1"}
return {
"model": "mistralai/Mistral-7B-Instruct-v0.1",
"rate_limiter": rate_limiter,
}

@pytest.mark.xfail(reason=("May not call a tool."))
def test_tool_calling_with_no_arguments(self, model: BaseChatModel) -> None:
Expand Down

0 comments on commit 80a47e3

Please sign in to comment.