Sarvam AI is also available as a speech-to-text plugin.
Setup
Set your Sarvam AI API key in the worker environment. Generate a key from the Sarvam AI dashboard:The runtime picks up
SARVAMAI_API_KEY from the worker environment. If you pass the key directly to the constructor’s api_key parameter and leave it unset, the SDK falls back to the SARVAM_API_KEY environment variable instead.Usage
Import the plugin and pass it to the pipeline’sllm slot.
Configuration Options
Constructor parameters for the Python SDK (SarvamAILLM). The JavaScript and Go SDKs expose model, temperature, and max_completion_tokens/maxCompletionTokens in their idiomatic form (camelCase / LLMOptions struct).
Import paths
The reply is streamed to the text-to-speech plugin, which
synthesizes the agent’s voice.