mirror of
https://github.com/hwchase17/langchain.git
synced 2025-04-30 04:45:23 +00:00
**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>
23 lines
647 B
Python
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)
|