langchain/libs/partners/ai21/tests/unit_tests/test_standard.py
Asaf Joseph Gardin 642975dd9f
partners: AI21 Labs Jamba Support (#20815)
Description: Added support for AI21 new model - Jamba
Twitter handle: https://github.com/AI21Labs

---------

Co-authored-by: Asaf Gardin <asafg@ai21.com>
Co-authored-by: Erick Friis <erick@langchain.dev>
2024-05-01 10:12:44 -07:00

36 lines
851 B
Python

"""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 TestAI21J2(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",
}
class TestAI21Jamba(ChatModelUnitTests):
@pytest.fixture
def chat_model_class(self) -> Type[BaseChatModel]:
return ChatAI21
@pytest.fixture
def chat_model_params(self) -> dict:
return {
"model": "jamba-instruct",
"api_key": "test_api_key",
}