-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
98 additions
and
11 deletions.
There are no files selected for viewing
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
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
23 changes: 23 additions & 0 deletions
23
libs/ai-endpoints/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,23 @@ | ||
"""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_nvidia_ai_endpoints import ChatNVIDIA | ||
|
||
|
||
class TestNVIDIAStandard(ChatModelIntegrationTests): | ||
@property | ||
def chat_model_class(self) -> Type[BaseChatModel]: | ||
return ChatNVIDIA | ||
|
||
@property | ||
def chat_model_params(self) -> dict: | ||
return {"model": "meta/llama-3.1-8b-instruct"} | ||
|
||
@pytest.mark.xfail(reason="anthropic-style list content not supported") | ||
def test_tool_message_histories_list_content(self, model: BaseChatModel) -> None: | ||
return super().test_tool_message_histories_list_content(model) |
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,18 @@ | ||
"""Standard LangChain interface tests""" | ||
|
||
from typing import Type | ||
|
||
from langchain_core.language_models import BaseChatModel | ||
from langchain_standard_tests.unit_tests import ChatModelUnitTests | ||
|
||
from langchain_nvidia_ai_endpoints import ChatNVIDIA | ||
|
||
|
||
class TestNVIDIAStandard(ChatModelUnitTests): | ||
@property | ||
def chat_model_class(self) -> Type[BaseChatModel]: | ||
return ChatNVIDIA | ||
|
||
@property | ||
def chat_model_params(self) -> dict: | ||
return {"model": "meta/llama-3.1-8b-instruct"} |