mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-19 05:51:16 +00:00
**Description:** : Add SambaNova Cloud Chat model community integration Includes - chat model integration (following Standardize ChatModel docstrings) - tests - docs usage notebook (following Standardize ChatModel integration docs) https://cloud.sambanova.ai/ --------- Co-authored-by: luisfucros <luisfucros@gmail.com> Co-authored-by: ccurme <chester.curme@gmail.com>
12 lines
379 B
Python
12 lines
379 B
Python
from langchain_core.messages import AIMessage, HumanMessage
|
|
|
|
from langchain_community.chat_models.sambanova import ChatSambaNovaCloud
|
|
|
|
|
|
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)
|