mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-16 23:13:31 +00:00
community: sambanovacloud llm integration (#27526)
- **Description:** SambaNovaCloud llm integration added, previously only chat model integration --------- Co-authored-by: Chester Curme <chester.curme@gmail.com>
This commit is contained in:
committed by
GitHub
parent
d696728278
commit
39956a3ef0
@@ -1,13 +1,20 @@
|
||||
"""Test sambanova API wrapper.
|
||||
"""Test sambanova API llm wrappers.
|
||||
|
||||
In order to run this test, you need to have a sambastudio base url,
|
||||
project id, endpoint id, and api key.
|
||||
You'll then need to set SAMBASTUDIO_BASE_URL, SAMBASTUDIO_BASE_URI
|
||||
SAMBASTUDIO_PROJECT_ID, SAMBASTUDIO_ENDPOINT_ID, and SAMBASTUDIO_API_KEY
|
||||
environment variables.
|
||||
In order to run this test, you need to have a sambastudio url, and api key
|
||||
and a sambanova cloud api key.
|
||||
You'll then need to set SAMBASTUDIO_URL, and SAMBASTUDIO_API_KEY,
|
||||
and SAMBANOVA_API_KEY environment variables.
|
||||
"""
|
||||
|
||||
from langchain_community.llms.sambanova import SambaStudio
|
||||
from langchain_community.llms.sambanova import SambaNovaCloud, SambaStudio
|
||||
|
||||
|
||||
def test_sambanova_cloud_call() -> None:
|
||||
"""Test simple non-streaming call to sambastudio."""
|
||||
llm = SambaNovaCloud()
|
||||
output = llm.invoke("What is LangChain")
|
||||
assert output
|
||||
assert isinstance(output, str)
|
||||
|
||||
|
||||
def test_sambastudio_call() -> None:
|
||||
|
@@ -78,6 +78,7 @@ EXPECT_ALL = [
|
||||
"RWKV",
|
||||
"Replicate",
|
||||
"SagemakerEndpoint",
|
||||
"SambaNovaCloud",
|
||||
"SambaStudio",
|
||||
"SelfHostedHuggingFaceLLM",
|
||||
"SelfHostedPipeline",
|
||||
|
Reference in New Issue
Block a user