forked from langchain-ai/langchain
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
multiple: standard chat model tests (langchain-ai#20359)
- Loading branch information
Showing
17 changed files
with
237 additions
and
11 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
libs/partners/ai21/tests/integration_tests/test_standard.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"""Standard LangChain interface tests""" | ||
|
||
from typing import Type | ||
|
||
import pytest | ||
from langchain_core.language_models import BaseChatModel | ||
from langchain_standard_tests.integration_tests import ChatModelIntegrationTests | ||
|
||
from langchain_ai21 import ChatAI21 | ||
|
||
|
||
class TestAI21Standard(ChatModelIntegrationTests): | ||
@pytest.fixture | ||
def chat_model_class(self) -> Type[BaseChatModel]: | ||
return ChatAI21 | ||
|
||
@pytest.fixture | ||
def chat_model_params(self) -> dict: | ||
return { | ||
"model": "j2-ultra", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
"""Standard LangChain interface tests""" | ||
|
||
from typing import Type | ||
|
||
import pytest | ||
from langchain_core.language_models import BaseChatModel | ||
from langchain_standard_tests.unit_tests import ChatModelUnitTests | ||
|
||
from langchain_ai21 import ChatAI21 | ||
|
||
|
||
class TestAI21Standard(ChatModelUnitTests): | ||
@pytest.fixture | ||
def chat_model_class(self) -> Type[BaseChatModel]: | ||
return ChatAI21 | ||
|
||
@pytest.fixture | ||
def chat_model_params(self) -> dict: | ||
return { | ||
"model": "j2-ultra", | ||
"api_key": "test_api_key", | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
libs/partners/anthropic/tests/integration_tests/test_standard.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"""Standard LangChain interface tests""" | ||
|
||
from typing import Type | ||
|
||
import pytest | ||
from langchain_core.language_models import BaseChatModel | ||
from langchain_standard_tests.integration_tests import ChatModelIntegrationTests | ||
|
||
from langchain_anthropic import ChatAnthropic | ||
|
||
|
||
class TestAnthropicStandard(ChatModelIntegrationTests): | ||
@pytest.fixture | ||
def chat_model_class(self) -> Type[BaseChatModel]: | ||
return ChatAnthropic | ||
|
||
@pytest.fixture | ||
def chat_model_params(self) -> dict: | ||
return { | ||
"model": "claude-3-haiku-20240307", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"""Standard LangChain interface tests""" | ||
|
||
from typing import Type | ||
|
||
import pytest | ||
from langchain_core.language_models import BaseChatModel | ||
from langchain_standard_tests.unit_tests import ChatModelUnitTests | ||
|
||
from langchain_anthropic import ChatAnthropic | ||
|
||
|
||
class TestAnthropicStandard(ChatModelUnitTests): | ||
@pytest.fixture | ||
def chat_model_class(self) -> Type[BaseChatModel]: | ||
return ChatAnthropic | ||
|
||
@pytest.fixture | ||
def chat_model_params(self) -> dict: | ||
return { | ||
"model": "claude-3-haiku-20240307", | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
libs/partners/fireworks/tests/integration_tests/test_standard.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
"""Standard LangChain interface tests""" | ||
|
||
from typing import Type | ||
|
||
import pytest | ||
from langchain_core.language_models import BaseChatModel | ||
from langchain_standard_tests.integration_tests import ChatModelIntegrationTests | ||
|
||
from langchain_fireworks import ChatFireworks | ||
|
||
|
||
class TestFireworksStandard(ChatModelIntegrationTests): | ||
@pytest.fixture | ||
def chat_model_class(self) -> Type[BaseChatModel]: | ||
return ChatFireworks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"""Standard LangChain interface tests""" | ||
|
||
from typing import Type | ||
|
||
import pytest | ||
from langchain_core.language_models import BaseChatModel | ||
from langchain_standard_tests.unit_tests import ChatModelUnitTests | ||
|
||
from langchain_fireworks import ChatFireworks | ||
|
||
|
||
class TestFireworksStandard(ChatModelUnitTests): | ||
@pytest.fixture | ||
def chat_model_class(self) -> Type[BaseChatModel]: | ||
return ChatFireworks | ||
|
||
@pytest.fixture | ||
def chat_model_params(self) -> dict: | ||
return { | ||
"api_key": "test_api_key", | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
libs/partners/groq/tests/integration_tests/test_standard.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
"""Standard LangChain interface tests""" | ||
|
||
from typing import Type | ||
|
||
import pytest | ||
from langchain_core.language_models import BaseChatModel | ||
from langchain_standard_tests.integration_tests import ChatModelIntegrationTests | ||
|
||
from langchain_groq import ChatGroq | ||
|
||
|
||
class TestMistralStandard(ChatModelIntegrationTests): | ||
@pytest.fixture | ||
def chat_model_class(self) -> Type[BaseChatModel]: | ||
return ChatGroq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
"""Standard LangChain interface tests""" | ||
|
||
from typing import Type | ||
|
||
import pytest | ||
from langchain_core.language_models import BaseChatModel | ||
from langchain_standard_tests.unit_tests import ChatModelUnitTests | ||
|
||
from langchain_groq import ChatGroq | ||
|
||
|
||
class TestGroqStandard(ChatModelUnitTests): | ||
@pytest.fixture | ||
def chat_model_class(self) -> Type[BaseChatModel]: | ||
return ChatGroq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters