Usage guide
Setup, environment variables, and Python/JavaScript/Go usage examples.
SarvamAILLM
Chat completions from Sarvam AI, using your Sarvam key. Good for agents that converse in Indian languages. Authenticates with SARVAMAI_API_KEY from your environment, or an explicitapi_key.
Fields
Sarvam model name, e.g. “sarvam-105b”. Other hosted models such as “glm5.3” are also accepted. Defaults to ‘sarvam-105b’.
Sampling temperature. Lower values give more focused, predictable replies; higher values more varied ones. Defaults to 0.7.
Whether the model may call tools: “auto” lets it decide, “required” forces a tool call, “none” disables tools. Defaults to ‘auto’.
How much the model reasons before answering: “low”, “medium”, “high” or “max”. Higher is slower but more thorough. Defaults to None (not set).
Let the model search Wikipedia to ground its answers in facts. Defaults to False.
Nucleus sampling: only tokens within this cumulative probability mass are considered. An alternative to temperature. Defaults to None (not set).
Penalizes tokens by how often they have already appeared, reducing repetition. -2.0 to 2.0. Defaults to None (not set).
Penalizes tokens that have already appeared at all, nudging the model toward new topics. -2.0 to 2.0. Defaults to None (not set).