1
0
mirror of https://github.com/hwchase17/langchain.git synced 2025-04-30 04:45:23 +00:00
langchain/libs/community/tests/integration_tests/chat_models/test_sambanova.py
Jorge Piedrahita Ortiz 14de81b140
community: sambastudio chat model ()
**Description:**: sambastudio chat model integration added, previously
only LLM integration
     included docs and tests

---------

Co-authored-by: luisfucros <luisfucros@gmail.com>
Co-authored-by: Chester Curme <chester.curme@gmail.com>
2024-10-07 14:31:39 -04:00

23 lines
647 B
Python

from langchain_core.messages import AIMessage, HumanMessage
from langchain_community.chat_models.sambanova import (
ChatSambaNovaCloud,
ChatSambaStudio,
)
def test_chat_sambanova_cloud() -> None:
chat = ChatSambaNovaCloud()
message = HumanMessage(content="Hello")
response = chat.invoke([message])
assert isinstance(response, AIMessage)
assert isinstance(response.content, str)
def test_chat_sambastudio() -> None:
chat = ChatSambaStudio()
message = HumanMessage(content="Hello")
response = chat.invoke([message])
assert isinstance(response, AIMessage)
assert isinstance(response.content, str)