generated from langchain-ai/integration-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 106
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
6 changed files
with
31 additions
and
0 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
Empty file.
Empty file.
Empty file.
21 changes: 21 additions & 0 deletions
21
libs/aws/tests/integration_tests/llms/test_sagemaker_endpoint.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 @@ | ||
from typing import Dict | ||
|
||
from langchain_aws.llms import SagemakerEndpoint | ||
from langchain_aws.llms.sagemaker_endpoint import LLMContentHandler | ||
|
||
|
||
class ContentHandler(LLMContentHandler): | ||
def transform_input(self, prompt: str, model_kwargs: Dict) -> bytes: | ||
return b"" | ||
|
||
def transform_output(self, output: bytes) -> str: | ||
return "" | ||
|
||
|
||
def test_sagemaker_endpoint_name_param() -> None: | ||
llm = SagemakerEndpoint( | ||
endpoint_name="foo", | ||
content_handler=ContentHandler(), | ||
region_name="us-west-2", | ||
) | ||
assert llm.endpoint_name == "foo" |
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,7 @@ | ||
import pytest | ||
|
||
|
||
@pytest.mark.compile | ||
def test_placeholder() -> None: | ||
"""Used for compiling integration tests without running any real tests.""" | ||
pass |