mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-08 22:42:05 +00:00
community: sambastudio chat model (#27056)
**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>
This commit is contained in:
committed by
GitHub
parent
f70650f67d
commit
14de81b140
@@ -149,6 +149,7 @@ if TYPE_CHECKING:
|
||||
)
|
||||
from langchain_community.chat_models.sambanova import (
|
||||
ChatSambaNovaCloud,
|
||||
ChatSambaStudio,
|
||||
)
|
||||
from langchain_community.chat_models.snowflake import (
|
||||
ChatSnowflakeCortex,
|
||||
@@ -215,6 +216,7 @@ __all__ = [
|
||||
"ChatPerplexity",
|
||||
"ChatPremAI",
|
||||
"ChatSambaNovaCloud",
|
||||
"ChatSambaStudio",
|
||||
"ChatSparkLLM",
|
||||
"ChatSnowflakeCortex",
|
||||
"ChatTongyi",
|
||||
@@ -274,6 +276,7 @@ _module_lookup = {
|
||||
"ChatOpenAI": "langchain_community.chat_models.openai",
|
||||
"ChatPerplexity": "langchain_community.chat_models.perplexity",
|
||||
"ChatSambaNovaCloud": "langchain_community.chat_models.sambanova",
|
||||
"ChatSambaStudio": "langchain_community.chat_models.sambanova",
|
||||
"ChatSnowflakeCortex": "langchain_community.chat_models.snowflake",
|
||||
"ChatSparkLLM": "langchain_community.chat_models.sparkllm",
|
||||
"ChatTongyi": "langchain_community.chat_models.tongyi",
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,9 @@
|
||||
from langchain_core.messages import AIMessage, HumanMessage
|
||||
|
||||
from langchain_community.chat_models.sambanova import ChatSambaNovaCloud
|
||||
from langchain_community.chat_models.sambanova import (
|
||||
ChatSambaNovaCloud,
|
||||
ChatSambaStudio,
|
||||
)
|
||||
|
||||
|
||||
def test_chat_sambanova_cloud() -> None:
|
||||
@@ -9,3 +12,11 @@ def test_chat_sambanova_cloud() -> None:
|
||||
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)
|
||||
|
@@ -35,6 +35,7 @@ EXPECTED_ALL = [
|
||||
"ChatPerplexity",
|
||||
"ChatPremAI",
|
||||
"ChatSambaNovaCloud",
|
||||
"ChatSambaStudio",
|
||||
"ChatSparkLLM",
|
||||
"ChatTongyi",
|
||||
"ChatVertexAI",
|
||||
|
Reference in New Issue
Block a user