Sambanova

Use Sambanova models with Kern agents.

Sambanova is a platform for providing endpoints for Large Language models. Note that Sambanova currently does not support function calling.

Authentication

Set your SAMBANOVA_API_KEY environment variable. Get your key from here.

1export SAMBANOVA_API_KEY=***
1setx SAMBANOVA_API_KEY ***

Example

Use Sambanova with your Agent:

1from kern.agent import Agent
2from kern.models.sambanova import Sambanova
3
4agent = Agent(model=Sambanova(), markdown=True)
5
6# Print the response in the terminal
7agent.print_response("Share a 2 sentence horror story.")

Params

ParameterTypeDefaultDescription
idstr"Meta-Llama-3.1-8B-Instruct"The id of the SambaNova model to use
namestr"SambaNova"The name of the model
providerstr"SambaNova"The provider of the model
api_keyOptional[str]NoneThe API key for SambaNova (defaults to SAMBANOVA_API_KEY env var)
base_urlstr"https://api.sambanova.ai/v1"The base URL for the SambaNova API

Sambanova also supports the params of OpenAI.