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]