SVEndpointHandler#
- class langchain_community.llms.sambanova.SVEndpointHandler(host_url: str)[source]#
SambaNova Systems Interface for Sambaverse endpoint.
- Parameters:
host_url (str) β Base URL of the DaaS API service
Initialize the SVEndpointHandler.
- Parameters:
host_url (str) β Base URL of the DaaS API service
Attributes
API_BASE_PATH
Methods
__init__
(host_url)Initialize the SVEndpointHandler.
nlp_predict
(key,Β sambaverse_model_name,Β input)NLP predict using inline input string.
nlp_predict_stream
(key,Β ...[,Β params])NLP predict using inline input string.
- __init__(host_url: str)[source]#
Initialize the SVEndpointHandler.
- Parameters:
host_url (str) β Base URL of the DaaS API service
- nlp_predict(key: str, sambaverse_model_name: str | None, 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
sambaverse_model_name (str | None) β
input (List[str] | str) β
stream (bool) β
- Returns:
Prediction results
- Type:
dict
- Return type:
Dict
- nlp_predict_stream(key: str, sambaverse_model_name: str | None, 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
sambaverse_model_name (str | None) β
input (List[str] | str) β
- Returns:
Prediction results
- Type:
dict
- Return type:
Iterator[Dict]