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]