SSEndpointHandler#
- class langchain_community.llms.sambanova.SSEndpointHandler(host_url: str, api_base_uri: str)[source]#
SambaNova Systems Interface for SambaStudio model endpoints.
- Parameters:
host_url (str) – Base URL of the DaaS API service
api_base_uri (str) –
Initialize the SSEndpointHandler.
- Parameters:
host_url (str) – Base URL of the DaaS API service
api_base_uri (str) – Base URI of the DaaS API service
Methods
__init__
(host_url, api_base_uri)Initialize the SSEndpointHandler.
nlp_predict
(project, endpoint, key, input[, ...])NLP predict using inline input string.
nlp_predict_stream
(project, endpoint, key, input)NLP predict using inline input string.
- __init__(host_url: str, api_base_uri: str)[source]#
Initialize the SSEndpointHandler.
- Parameters:
host_url (str) – Base URL of the DaaS API service
api_base_uri (str) – Base URI of the DaaS API service
- nlp_predict(project: str, endpoint: str, key: str, input: List[str] | str, params: str | None = '', stream: bool = False) Dict [source]#
NLP predict using inline input string.
- Parameters:
project (str) – Project ID in which the endpoint exists
endpoint (str) – Endpoint ID
key (str) – API Key
input_str (str) – Input string
params (str) – Input params string
input (List[str] | str) –
stream (bool) –
- Returns:
Prediction results
- Type:
dict
- Return type:
Dict
- nlp_predict_stream(project: str, endpoint: str, key: str, input: List[str] | str, params: str | None = '') Iterator[Dict] [source]#
NLP predict using inline input string.
- Parameters:
project (str) – Project ID in which the endpoint exists
endpoint (str) – Endpoint ID
key (str) – API Key
input_str (str) – Input string
params (str) – Input params string
input (List[str] | str) –
- Returns:
Prediction results
- Type:
dict
- Return type:
Iterator[Dict]