You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/libs/community/tests/integration_tests/llms/test_deepsparse.py

18 lines
522 B
Python

"""Test DeepSparse wrapper."""
from langchain_community.llms import DeepSparse
def test_deepsparse_call() -> None:
"""Test valid call to DeepSparse."""
config = {"max_generated_tokens": 5, "use_deepsparse_cache": False}
llm = DeepSparse(
model="zoo:nlg/text_generation/codegen_mono-350m/pytorch/huggingface/bigpython_bigquery_thepile/base-none",
config=config,
)
output = llm("def ")
assert isinstance(output, str)
assert len(output) > 1
assert output == "ids_to_names"